district mpping isue resolved after table changes

This commit is contained in:
laxman h 2026-03-30 20:09:40 +05:30
parent 9b645b0480
commit c0a97854e0
3 changed files with 63 additions and 63 deletions

View File

@ -36,26 +36,26 @@ async function restoreQuestionnaire() {
text: "Educational Qualification",
type: "radio",
section: "Profile & Background",
weight: 15,
weight: 5,
order: 8,
options: [
{ text: "Under Graduate", score: 5 },
{ text: "Graduate", score: 10 },
{ text: "Post Graduate", score: 15 }
{ text: "Under Graduate", score: 2 },
{ text: "Graduate", score: 3 },
{ text: "Post Graduate", score: 5 }
]
},
{
text: "What is your Personal Networth",
type: "select",
section: "Financials",
weight: 25,
weight: 15,
order: 9,
options: [
{ text: "Less than 2 Crores", score: 5 },
{ text: "Between 2 - 5 Crores", score: 10 },
{ text: "Between 5 - 10 Crores", score: 15 },
{ text: "Between 10 - 15 Crores", score: 20 },
{ text: "Greater than 15 Crores", score: 25 }
{ text: "Less than 2 Crores", score: 3 },
{ text: "Between 2 - 5 Crores", score: 6 },
{ text: "Between 5 - 10 Crores", score: 9 },
{ text: "Between 10 - 15 Crores", score: 12 },
{ text: "Greater than 15 Crores", score: 15 }
]
},
{
@ -75,12 +75,12 @@ async function restoreQuestionnaire() {
text: "Why do you want to partner with Royal Enfield?",
type: "radio",
section: "Strategy",
weight: 10,
weight: 5,
order: 12,
options: [
{ text: "Absence of Royal Enfield in the particular location and presence of opportunity", score: 5 },
{ text: "Passionate about the brand", score: 5 },
{ text: "Experience in the automobile business and would like to expand with Royal Enfield", score: 10 }
{ text: "Absence of Royal Enfield in the particular location and presence of opportunity", score: 2 },
{ text: "Passionate about the brand", score: 2 },
{ text: "Experience in the automobile business and would like to expand with Royal Enfield", score: 5 }
]
},
{
@ -112,13 +112,13 @@ async function restoreQuestionnaire() {
text: "Proposed Firm Type",
type: "radio",
section: "Business Structure",
weight: 10,
weight: 5,
order: 15,
options: [
{ text: "Proprietorship", score: 5 },
{ text: "Partnership", score: 5 },
{ text: "Limited Liability partnership", score: 5 },
{ text: "Private Limited Company", score: 10 }
{ text: "Proprietorship", score: 3 },
{ text: "Partnership", score: 3 },
{ text: "Limited Liability partnership", score: 3 },
{ text: "Private Limited Company", score: 5 }
]
},
{
@ -161,11 +161,11 @@ async function restoreQuestionnaire() {
text: "What are your plans of expansion with RE?",
type: "radio",
section: "Strategy",
weight: 10,
weight: 5,
order: 19,
options: [
{ text: "Willing to expand with the help of partners", score: 5 },
{ text: "Willing to expand by myself", score: 10 },
{ text: "Willing to expand with the help of partners", score: 2 },
{ text: "Willing to expand by myself", score: 5 },
{ text: "No plans for expansion", score: 0 }
]
},
@ -173,23 +173,23 @@ async function restoreQuestionnaire() {
text: "Will you be expanding to any other automobile OEM in the future?",
type: "radio",
section: "Strategy",
weight: 5,
weight: 4,
order: 20,
options: [
{ text: "Yes", score: 0 },
{ text: "No", score: 5 }
{ text: "No", score: 4 }
]
},
{
text: "Do you own a Royal Enfield ?",
type: "radio",
section: "Brand Loyalty",
weight: 5,
weight: 3,
order: 21,
options: [
{ text: "Yes, it is registered in my name", score: 5 },
{ text: "Yes, it is registered to my immediate family member", score: 3 },
{ text: "Not at the moment but owned it earlier", score: 2 },
{ text: "Yes, it is registered in my name", score: 3 },
{ text: "Yes, it is registered to my immediate family member", score: 2 },
{ text: "Not at the moment but owned it earlier", score: 1 },
{ text: "No", score: 0 }
]
},
@ -197,11 +197,11 @@ async function restoreQuestionnaire() {
text: "Do you go for long leisure rides",
type: "radio",
section: "Brand Loyalty",
weight: 5,
weight: 3,
order: 22,
options: [
{ text: "Yes, with the Royal Enfield riders", score: 5 },
{ text: "Yes, with other brands", score: 3 },
{ text: "Yes, with the Royal Enfield riders", score: 3 },
{ text: "Yes, with other brands", score: 2 },
{ text: "No", score: 0 }
]
},

View File

@ -35,7 +35,7 @@ export default (sequelize: Sequelize) => {
(State as any).associate = (models: any) => {
State.belongsTo(models.Zone, { foreignKey: 'zoneId', as: 'zone' });
State.hasMany(models.Location, { foreignKey: 'stateId', as: 'districts' });
State.hasMany(models.District, { foreignKey: 'stateId', as: 'districts' });
};
return State;

View File

@ -135,11 +135,11 @@ const seedQuestionnaire = async () => {
type: "radio",
section: "Profile & Background",
options: [
{ text: "Under Graduate", score: 5 },
{ text: "Graduate", score: 10 },
{ text: "Post Graduate", score: 15 }
{ text: "Under Graduate", score: 2 },
{ text: "Graduate", score: 3 },
{ text: "Post Graduate", score: 5 }
],
weight: 15, // Max possible
weight: 5, // Max possible
order: 8
},
{
@ -147,13 +147,13 @@ const seedQuestionnaire = async () => {
type: "select",
section: "Financials",
options: [
{ text: "Less than 2 Crores", score: 5 },
{ text: "Between 2 - 5 Crores", score: 10 },
{ text: "Between 5 - 10 Crores", score: 15 },
{ text: "Between 10 - 15 Crores", score: 20 },
{ text: "Greater than 15 Crores", score: 25 }
{ text: "Less than 2 Crores", score: 3 },
{ text: "Between 2 - 5 Crores", score: 6 },
{ text: "Between 5 - 10 Crores", score: 9 },
{ text: "Between 10 - 15 Crores", score: 12 },
{ text: "Greater than 15 Crores", score: 15 }
],
weight: 25,
weight: 15,
order: 9
},
{
@ -181,11 +181,11 @@ const seedQuestionnaire = async () => {
type: "radio",
section: "Strategy",
options: [
{ text: "Absence of Royal Enfield in the particular location and presence of opportunity", score: 5 },
{ text: "Passionate about the brand", score: 5 },
{ text: "Experience in the automobile business and would like to expand with Royal Enfield", score: 10 }
{ text: "Absence of Royal Enfield in the particular location and presence of opportunity", score: 2 },
{ text: "Passionate about the brand", score: 2 },
{ text: "Experience in the automobile business and would like to expand with Royal Enfield", score: 5 }
],
weight: 10,
weight: 5,
order: 12
},
{
@ -218,12 +218,12 @@ const seedQuestionnaire = async () => {
type: "radio",
section: "Business Structure",
options: [
{ text: "Proprietorship", score: 5 },
{ text: "Partnership", score: 5 },
{ text: "Limited Liability partnership", score: 5 },
{ text: "Private Limited Company", score: 10 }
{ text: "Proprietorship", score: 3 },
{ text: "Partnership", score: 3 },
{ text: "Limited Liability partnership", score: 3 },
{ text: "Private Limited Company", score: 5 }
],
weight: 10,
weight: 5,
order: 15
},
{
@ -267,11 +267,11 @@ const seedQuestionnaire = async () => {
type: "radio",
section: "Strategy",
options: [
{ text: "Willing to expand with the help of partners", score: 5 },
{ text: "Willing to expand by myself", score: 10 },
{ text: "Willing to expand with the help of partners", score: 2 },
{ text: "Willing to expand by myself", score: 5 },
{ text: "No plans for expansion", score: 0 }
],
weight: 10,
weight: 5,
order: 19
},
{
@ -280,9 +280,9 @@ const seedQuestionnaire = async () => {
section: "Strategy",
options: [
{ text: "Yes", score: 0 },
{ text: "No", score: 5 }
{ text: "No", score: 4 }
],
weight: 5,
weight: 4,
order: 20
},
{
@ -290,12 +290,12 @@ const seedQuestionnaire = async () => {
type: "radio",
section: "Brand Loyalty",
options: [
{ text: "Yes, it is registered in my name", score: 5 },
{ text: "Yes, it is registered to my immediate family member", score: 3 },
{ text: "Not at the moment but owned it earlier", score: 2 },
{ text: "Yes, it is registered in my name", score: 3 },
{ text: "Yes, it is registered to my immediate family member", score: 2 },
{ text: "Not at the moment but owned it earlier", score: 1 },
{ text: "No", score: 0 }
],
weight: 5,
weight: 3,
order: 21
},
{
@ -303,11 +303,11 @@ const seedQuestionnaire = async () => {
type: "radio",
section: "Brand Loyalty",
options: [
{ text: "Yes, with the Royal Enfield riders", score: 5 },
{ text: "Yes, with other brands", score: 3 },
{ text: "Yes, with the Royal Enfield riders", score: 3 },
{ text: "Yes, with other brands", score: 2 },
{ text: "No", score: 0 }
],
weight: 5,
weight: 3,
order: 22
},
{