- {/* Age Range */}
+ {/* 1. Age Range */}
-
- Age Range{requiredMark}
-
-
- Select Age Range
- handleChange("ageRange", e.target.value)}
- inputRef={inputRef}
- disabled={isPartnerMastersLoading}
- sx={{
- "& .MuiSelect-select.Mui-disabled": {
- cursor: "not-allowed",
- },
- }}
- >
- {ageRangeOptions.map((opt) => (
-
- {opt.name || opt}
-
- ))}
-
- {errors.ageRange && (
- Age Range (From - To)
+
+
+ From Age
+ handleChange("age_from", e.target.value)}
>
- {errors.ageRange}
-
- )}
-
+ {ageOptions.map((age) => (
+
{age}
+ ))}
+
+ {errors.age_from && (
+
+ {errors.age_from}
+
+ )}
+
+
+ To Age
+ handleChange("age_to", e.target.value)}
+ >
+ {ageOptions.map((age) => (
+ {age}
+ ))}
+
+ {errors.age_to && (
+
+ {errors.age_to}
+
+ )}
+
+
- {/* Caste */}
+ {/* 2. Height Range */}
-
- Caste{requiredMark}
-
+
Height Range (From - To)
+
+
+ From Height
+ handleChange("height_from", e.target.value)}
+ >
+ {heightOptions.map((h) => (
+ {h.height_text}
+ ))}
+
+ {errors.height_from && (
+
+ {errors.height_from}
+
+ )}
+
+
+ To Height
+ handleChange("height_to", e.target.value)}
+ >
+ {heightOptions.map((h) => (
+ {h.height_text}
+ ))}
+
+ {errors.height_to && (
+
+ {errors.height_to}
+
+ )}
+
+
+
+
+ {/* 3. Marital Status */}
+
+ Marital Status
+ {renderMultiSelect({
+ name: "marital_statuses",
+ label: "Marital Status",
+ options: maritalStatusOptions,
+ value: data.marital_statuses,
+ getLabel: (opt) => opt.marital_status_name || opt.name,
+ getValue: (opt) => opt.id,
+ disabled: isPartnerMastersLoading,
+ })}
+
+
+ {/* 4. Birth Star */}
+
+ Birth Star
+ {renderMultiSelect({
+ name: "birth_stars",
+ label: "Birth Star",
+ options: starOptions,
+ value: data.birth_stars,
+ getLabel: (opt) => opt.star_name || opt.name,
+ getValue: (opt) => opt.id,
+ disabled: isPartnerMastersLoading,
+ })}
+
+
+ {/* 5. Caste */}
+
+ Caste
{renderMultiSelect({
name: "castes",
label: "Caste",
options: casteOptions,
value: data.castes,
- getLabel: (opt) => opt.caste_name || opt.name || String(opt),
- getValue: (opt) => opt.id ?? opt,
+ getLabel: (opt) => opt.caste_name || opt.name,
+ getValue: (opt) => opt.id,
disabled: isPartnerMastersLoading,
})}
- {/* Sub Caste */}
+ {/* 6. Sub-Sect */}
-
- Sub Caste{requiredMark}
-
+ Sub-Sect
{renderMultiSelect({
- name: "subCastes",
- label: "Sub Caste",
+ name: "sub_castes",
+ label: "Sub-Sect",
options: subCasteOptions,
- value: data.subCastes,
- getLabel: (opt) =>
- opt.sub_caste_name || opt.subCaste_name || opt.name || String(opt),
- getValue: (opt) => opt.id ?? opt,
+ value: data.sub_castes,
+ getLabel: (opt) => opt.sub_caste_name || opt.name,
+ getValue: (opt) => opt.id,
disabled: data.castes.length === 0 || subCasteQuery.isLoading,
})}
- {/* Occupation */}
+ {/* 7. Qualification */}
-
- Occupation{requiredMark}
-
- {renderMultiSelect({
- name: "occupations",
- label: "Occupation",
- options: occupationOptions,
- value: data.occupations,
- getLabel: (opt) => opt.occupation_name || opt.name || String(opt),
- getValue: (opt) => opt.id ?? opt,
- disabled: isPartnerMastersLoading,
- })}
-
-
- {/* Qualification */}
-
-
- Qualification{requiredMark}
-
+ Qualification
{renderMultiSelect({
name: "educations",
label: "Qualification",
options: educationOptions,
value: data.educations,
- getLabel: (opt) => opt.education_name || opt.name || String(opt),
- getValue: (opt) => opt.id ?? opt,
+ getLabel: (opt) => opt.education_name || opt.name,
+ getValue: (opt) => opt.id,
disabled: isPartnerMastersLoading,
})}
- {/* Lifestyle and Hobbies */}
+ {/* 8. Occupation */}
-
- Lifestyle & Hobbies{requiredMark}
-
+ Occupation
{renderMultiSelect({
- name: "hobbies",
- label: "Lifestyle & Hobbies",
- options: hobbyOptions,
- value: data.hobbies,
- getLabel: (opt) => opt.hobby_name || opt.name || String(opt),
- getValue: (opt) => opt.id ?? opt,
+ name: "occupations",
+ label: "Occupation",
+ options: occupationOptions,
+ value: data.occupations,
+ getLabel: (opt) => opt.occupation_name || opt.name,
+ getValue: (opt) => opt.id,
disabled: isPartnerMastersLoading,
})}
- {/* Annual Income */}
+ {/* 9. Employee Type */}
-
- Annual Income{requiredMark}
-
-
-
- Select Annual Income
-
- handleChange("annualIncome", e.target.value)}
- disabled={isPartnerMastersLoading}
- sx={{
- "& .MuiSelect-select.Mui-disabled": {
- cursor: "not-allowed",
- },
- }}
- >
- {annualIncomeOptions.map((opt) => (
-
- {opt.annual_income_name || opt.name || opt}
-
- ))}
-
- {errors.annualIncome && (
-
- {errors.annualIncome}
-
- )}
-
+
Employee Type
+ {renderMultiSelect({
+ name: "employee_types",
+ label: "Employee Type",
+ options: employeeTypeOptions,
+ value: data.employee_types,
+ getLabel: (opt) => opt.employee_type_name || opt.name,
+ getValue: (opt) => opt.id,
+ disabled: isPartnerMastersLoading,
+ })}
- {/* State */}
+ {/* 10. Currency Type */}
-
- State{requiredMark}
-
+ Income Currency Type
+ {renderMultiSelect({
+ name: "currencies",
+ label: "Currency",
+ options: currencyOptions,
+ value: data.currencies,
+ getLabel: (opt) => opt,
+ getValue: (opt) => opt,
+ disabled: isPartnerMastersLoading,
+ })}
+
+
+ {/* 11. Income Range */}
+ {data.currencies.includes("INR") && (
+
+
Annual Income (INR Range)
+
+ handleChange("inr_from", e.target.value)}
+ />
+ handleChange("inr_to", e.target.value)}
+ />
+
+
+ )}
+
+ {data.currencies.includes("USD") && (
+
+
Annual Income (USD Range)
+
+ handleChange("usd_from", e.target.value)}
+ />
+ handleChange("usd_to", e.target.value)}
+ />
+
+
+ )}
+
+ {/* 12. State */}
+
+ State
{renderMultiSelect({
name: "states",
label: "State",
options: stateOptions,
value: data.states,
- getLabel: (opt) => opt.state_name || opt.name || String(opt),
- getValue: (opt) => opt.id ?? opt,
+ getLabel: (opt) => opt.state_name || opt.name,
+ getValue: (opt) => opt.id,
disabled: isPartnerMastersLoading,
})}
- {/* City */}
+ {/* 13. City */}
-
- City{requiredMark}
-
+ City
{renderMultiSelect({
name: "districts",
label: "City",
options: cityOptions,
value: data.districts,
- getLabel: (opt) =>
- opt.district_name || opt.city_name || opt.name || String(opt),
- getValue: (opt) => opt.id ?? opt,
+ getLabel: (opt) => opt.district_name || opt.city_name || opt.name,
+ getValue: (opt) => opt.id,
disabled: data.states.length === 0 || cityQuery.isLoading,
})}