Browse Source

feat: implement persistent local storage for marriage question answers with auto-sync and multi-language support

front-test-2
ghorbani 3 weeks ago
parent
commit
e7c5aef173
  1. 132
      proxy-debug.log
  2. 16
      src/app/api/proxy/route.ts
  3. 14
      src/app/finding-match/page.tsx
  4. 28
      src/app/page.tsx
  5. 70
      src/app/questions-list/[slug]/question-detail-client.tsx
  6. 95
      src/app/questions-list/page.tsx
  7. 58
      src/components/Componentes/error-toast.tsx
  8. 63
      src/components/Componentes/progress-helper.ts
  9. 95
      src/components/Componentes/question-answer-storage.tsx
  10. 4
      src/components/Componentes/question-checkbox.tsx
  11. 9
      src/components/Componentes/question-title.tsx
  12. 4
      src/data/question-data.ts
  13. 210
      src/data/questions/en.json
  14. 210
      src/data/questions/fa.json
  15. 3
      src/data/section-slug-map.ts
  16. 57
      src/hooks/marriage/use-section-data.ts
  17. 15
      src/lib/http.ts
  18. 5
      src/translations/locales/ar.json
  19. 5
      src/translations/locales/az.json
  20. 5
      src/translations/locales/bn.json
  21. 5
      src/translations/locales/da.json
  22. 5
      src/translations/locales/de.json
  23. 5
      src/translations/locales/en.json
  24. 5
      src/translations/locales/es.json
  25. 5
      src/translations/locales/fa.json
  26. 5
      src/translations/locales/fr.json
  27. 5
      src/translations/locales/gu.json
  28. 5
      src/translations/locales/ha.json
  29. 5
      src/translations/locales/he.json
  30. 5
      src/translations/locales/hi.json
  31. 5
      src/translations/locales/id.json
  32. 5
      src/translations/locales/ks.json
  33. 5
      src/translations/locales/pt.json
  34. 5
      src/translations/locales/ru.json
  35. 5
      src/translations/locales/sw.json
  36. 5
      src/translations/locales/tg.json
  37. 5
      src/translations/locales/tr.json
  38. 5
      src/translations/locales/ul.json
  39. 5
      src/translations/locales/ur.json
  40. 5
      src/translations/locales/uz.json
  41. 5
      src/translations/locales/zh.json

132
proxy-debug.log

@ -0,0 +1,132 @@
--- 2026-08-03T07:50:50.803Z ---
URL: http://127.0.0.1:8000/api/marriage/sections/family_background/data/
STATUS: 400
REQUEST: {"current_step":5,"total_steps":5,"fields":[{"key":"q1_number_of_siblings","type":"number","label":"Number of Siblings","value":5},{"key":"q2_parents_survival_status","label":"Parents' Survival Status","type":"radio","value":"Both parents are alive"},{"key":"q3_parents_marital_status","type":"radio","label":"Parents' Marital Status","value":"Living together"},{"key":"q4_do_you_currently_have_an_ongoing_financial_caregiving_or_guardianship_responsibility_for_a_family_member","label":"Do you currently have an ongoing financial, caregiving, or guardianship responsibility for a family member?","type":"checkbox","value":["I am responsible for caring for my parent(s) (father, mother, or both)."]},{"key":"q5_do_the_supported_individual_s_live_with_you","label":"Do the supported individual(s) live with you?","type":"radio","value":"Yes, they live with me permanently."},{"key":"q6_additional_details_about_family_responsibility","type":"textarea","label":"Additional details about family responsibility","value":"hi my name is "},{"key":"q7_family_s_religious_and_ideological_atmosphere","type":"radio","label":"Family's Religious and Ideological Atmosphere","value":"Religious (observant of obligations)"},{"key":"q8_family_economic_status","type":"radio","label":"Family Economic Status","value":"Average"},{"key":"q9_short_family_description","label":"Short Family Description","type":"textarea","value":"kjllkjkjl"}]}
RESPONSE: {"fields":[{},{},{},{"key":["Ensure this field has no more than 100 characters."]},{},{},{},{},{}]}
--- 2026-08-03T07:50:51.000Z ---
URL: http://127.0.0.1:8000/api/marriage/sections/?_t=1785743447984
STATUS: 200
REQUEST: ""
RESPONSE: [{"id":5,"slug":"katel_test","title":"Katel Test","is_required":false,"importance_weight":1,"estimated_minutes":30,"total_steps":4,"order":0,"current_step":0,"completion_percent":0},{"id":15,"slug":"personal_identity","title":"Personal and identity details","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":6,"order":0,"current_step":6,"completion_percent":100},{"id":7,"slug":"contact_residence","title":"Contact, Residence & Family Liaison","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":8,"order":2,"current_step":8,"completion_percent":100},{"id":8,"slug":"appearance_health","title":"Appearance, Health & Physical Activity","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":5,"order":3,"current_step":5,"completion_percent":100},{"id":9,"slug":"education_career","title":"Education, Career & Financial Status","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":4,"order":4,"current_step":4,"completion_percent":100},{"id":10,"slug":"family_background","title":"Family Background","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":3,"order":5,"current_step":3,"completion_percent":100},{"id":11,"slug":"marital_history","title":"Marital Status, Marriage History & Children","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":2,"order":6,"current_step":2,"completion_percent":100},{"id":12,"slug":"beliefs_lifestyle","title":"Beliefs, Lifestyle, Personality & Personal Boundaries","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":15,"order":7,"current_step":15,"completion_percent":100},{"id":13,"slug":"spouse_criteria","title":"Future Spouse Criteria & Deal-Breakers","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":23,"order":8,"current_step":23,"completion_percent":100},{"id":14,"slug":"documents_verification","title":"Document Upload, Verification & Photos","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":3,"order":9,"current_step":3,"completion_percent":100}]
--- 2026-08-03T07:50:56.579Z ---
URL: http://127.0.0.1:8000/api/marriage/profile/main/?_t=1785743447984
STATUS: 200
REQUEST: ""
RESPONSE: {"id":23,"status":"waiting","gender":"female","is_registering_for_self":true,"paid_fee":false,"can_edit_profile":true,"can_message_expert":false,"active_subscription":null,"is_ready_for_match":true,"active_case":null,"needs_subscription":false,"match_summary":null,"recommended_plan":{"id":1,"title":"اشتراک یک ماه","price":"5"}}
--- 2026-08-03T07:50:57.150Z ---
URL: http://127.0.0.1:8000/api/marriage/sections/marital_history/data/
STATUS: 200
REQUEST: {"current_step":2,"total_steps":2,"fields":[{"key":"q1_current_marital_status","label":"Current Marital Status","type":"radio","value":"Divorced; after living together"},{"key":"q2_previous_marriage_duration","type":"text","label":"Previous Marriage Duration","value":"3"},{"key":"q3_reason_for_separation","label":"Reason for Separation","type":"text","value":"kljklh"},{"key":"q4_children_and_guardianship_status","label":"Children and Guardianship Status","type":"checkbox","value":["Have children living with me"]},{"key":"q5_number_of_children","label":"Number of Children","type":"number","value":2},{"key":"q6_what_is_the_custody_status_of_your_child_ren","label":"What is the custody status of your child(ren)?","type":"radio","value":"Joint custody or periodic visitation/relocation between parents."},{"key":"q7_how_much_time_do_the_child_ren_usually_live_with_you","label":"How much time do the child(ren) usually live with you?","type":"radio","value":"Approximately half the time (joint custody/schedule)."},{"key":"q8_does_the_custody_visitation_or_relocation_schedule_impact_your_residence_or_immigration","label":"Does the custody, visitation, or relocation schedule impact your residence or immigration?","type":"radio","value":"Yes, relocation or immigration requires coordination, agreement, or a legal permit."},{"key":"q9_what_is_the_payment_or_receipt_status_of_child_support","label":"What is the payment or receipt status of child support?","type":"radio","value":"Receiving child support regularly."},{"key":"q10_acceptance_of_necessary_communication_between_future_spouse_and_the_other_parent","label":"Acceptance of necessary communication between future spouse and the other parent","type":"radio","value":"I only accept formal and highly limited communication regarding essential child matters."},{"key":"q11_short_children_guardianship_explanation","label":"Short Children/Guardianship Explanation","type":"textarea","value":"تانتلننتا"}]}
RESPONSE: {"id":124,"slug":"marital_history","data":[{"key":"q1_current_marital_status","label":"Current Marital Status","type":"radio","value":"Divorced; after living together"},{"key":"q3_reason_for_separation","label":"Reason for Separation","type":"text","value":"kljklh"},{"key":"q1_number_of_siblings","type":"number","label":"Number of Siblings","value":5},{"key":"q2_parents_survival_status","type":"radio","label":"Parents' Survival Status","value":"Both parents are alive"},{"key":"q3_parents_marital_status","type":"radio","label":"Parents' Marital Status","value":"Living together"},{"key":"q5_family_s_religious_and_ideological_atmosphere","type":"radio","label":"Family's Religious and Ideological Atmosphere","value":"Religious and strictly observant"},{"key":"q6_family_economic_status","type":"radio","label":"Family Economic Status","value":"Prosperous"},{"key":"q4_short_family_description","type":"text","label":"Short Family Description","value":"jhh"},{"key":"q2_previous_marriage_duration","label":"Previous Marriage Duration","type":"text","value":"3"},{"key":"q5_do_the_supported_individual_s_live_with_you","type":"radio","label":"Do the supported individual(s) live with you?","value":"Yes, they live with me permanently."},{"key":"q6_additional_details_about_family_responsibility","type":"textarea","label":"Additional details about family responsibility","value":"hi my name is "},{"key":"q9_family_economic_status","type":"radio","label":"Family Economic Status","value":"Prosperous"},{"key":"q7_family_s_religious_and_ideological_atmosphere","type":"radio","label":"Family's Religious and Ideological Atmosphere","value":"Religious (observant of obligations)"},{"key":"q8_family_economic_status","type":"radio","label":"Family Economic Status","value":"Average"},{"key":"q4_children_and_guardianship_status","label":"Children and Guardianship Status","type":"checkbox","value":["Have children living with me"]},{"key":"q5_number_of_children","label":"Number of Children","type":"number","value":2},{"key":"q7_what_is_the_custody_status_of_your_child_ren","type":"checkbox","label":"What is the custody status of your child(ren)?","value":["Custody is with the other parent or another person.","Joint custody or periodic visitation/relocation between parents.","Children have reached legal age (custody is not applicable)."]},{"key":"q8_how_much_time_do_the_child_ren_usually_live_with_you","type":"radio","label":"How much time do the child(ren) usually live with you?","value":"Permanently or most days of the week with me."},{"key":"q9_does_the_custody_visitation_or_relocation_schedule_impact_your_residence_or_immigration","type":"radio","label":"Does the custody, visitation, or relocation schedule impact your residence or immigration?","value":"Yes, relocation or immigration requires coordination, agreement, or a legal permit."},{"key":"q10_what_is_the_payment_or_receipt_status_of_child_support","type":"radio","label":"What is the payment or receipt status of child support?","value":"Receiving child support regularly."},{"key":"q9_short_family_description","type":"textarea","label":"Short Family Description","value":"kjllkj"},{"key":"q12_acceptance_of_necessary_communication_between_future_spouse_and_the_other_parent","type":"radio","label":"Acceptance of necessary communication between future spouse and the other parent","value":"I accept necessary, respectful, and limited communication regarding child matters."},{"key":"q6_what_is_the_custody_status_of_your_child_ren","label":"What is the custody status of your child(ren)?","type":"radio","value":"Joint custody or periodic visitation/relocation between parents."},{"key":"q7_how_much_time_do_the_child_ren_usually_live_with_you","label":"How much time do the child(ren) usually live with you?","type":"radio","value":"Approximately half the time (joint custody/schedule)."},{"key":"q8_does_the_custody_visitation_or_relocation_schedule_impact_your_residence_or_immigration","label":"Does the custody, visitation, or relocation schedule impact your residence or immigration?","type":"radio","value":"Yes, relocation or immigration requires coordination, agreement, or a legal permit."},{"key":"q9_what_is_the_payment_or_receipt_status_of_child_support","label":"What is the payment or receipt status of child support?","type":"radio","value":"Receiving child support regularly."},{"key":"q10_acceptance_of_necessary_communication_between_future_spouse_and_the_other_parent","label":"Acceptance of necessary communication between future spouse and the other parent","type":"radio","value":"I only accept formal and highly limited communication regarding essential child matters."},{"key":"q11_short_children_guardianship_explanation","label":"Short Children/Guardianship Explanation","type":"textarea","value":"تانتلننتا"}],"current_step":2,"total_steps":2,"completion_percent":100,"updated_at":"2026-08-03T11:20:50.946447"}
--- 2026-08-03T07:51:08.687Z ---
URL: http://127.0.0.1:8000/api/marriage/sections/?_t=1785743467848
STATUS: 200
REQUEST: ""
RESPONSE: [{"id":5,"slug":"katel_test","title":"Katel Test","is_required":false,"importance_weight":1,"estimated_minutes":30,"total_steps":4,"order":0,"current_step":0,"completion_percent":0},{"id":15,"slug":"personal_identity","title":"Personal and identity details","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":6,"order":0,"current_step":6,"completion_percent":100},{"id":7,"slug":"contact_residence","title":"Contact, Residence & Family Liaison","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":8,"order":2,"current_step":8,"completion_percent":100},{"id":8,"slug":"appearance_health","title":"Appearance, Health & Physical Activity","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":5,"order":3,"current_step":5,"completion_percent":100},{"id":9,"slug":"education_career","title":"Education, Career & Financial Status","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":4,"order":4,"current_step":4,"completion_percent":100},{"id":10,"slug":"family_background","title":"Family Background","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":3,"order":5,"current_step":3,"completion_percent":100},{"id":11,"slug":"marital_history","title":"Marital Status, Marriage History & Children","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":2,"order":6,"current_step":2,"completion_percent":100},{"id":12,"slug":"beliefs_lifestyle","title":"Beliefs, Lifestyle, Personality & Personal Boundaries","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":15,"order":7,"current_step":15,"completion_percent":100},{"id":13,"slug":"spouse_criteria","title":"Future Spouse Criteria & Deal-Breakers","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":23,"order":8,"current_step":23,"completion_percent":100},{"id":14,"slug":"documents_verification","title":"Document Upload, Verification & Photos","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":3,"order":9,"current_step":3,"completion_percent":100}]
--- 2026-08-03T07:51:09.604Z ---
URL: http://127.0.0.1:8000/api/marriage/sections/family_background/data/
STATUS: 400
REQUEST: {"current_step":5,"total_steps":5,"fields":[{"key":"q1_number_of_siblings","type":"number","label":"Number of Siblings","value":5},{"key":"q2_parents_survival_status","label":"Parents' Survival Status","type":"radio","value":"Both parents are alive"},{"key":"q3_parents_marital_status","type":"radio","label":"Parents' Marital Status","value":"Living together"},{"key":"q4_do_you_currently_have_an_ongoing_financial_caregiving_or_guardianship_responsibility_for_a_family_member","label":"Do you currently have an ongoing financial, caregiving, or guardianship responsibility for a family member?","type":"checkbox","value":["I am responsible for caring for my parent(s) (father, mother, or both)."]},{"key":"q5_do_the_supported_individual_s_live_with_you","label":"Do the supported individual(s) live with you?","type":"radio","value":"Yes, they live with me permanently."},{"key":"q6_additional_details_about_family_responsibility","type":"textarea","label":"Additional details about family responsibility","value":"hi my name is "},{"key":"q7_family_s_religious_and_ideological_atmosphere","type":"radio","label":"Family's Religious and Ideological Atmosphere","value":"Religious (observant of obligations)"},{"key":"q8_family_economic_status","type":"radio","label":"Family Economic Status","value":"Average"},{"key":"q9_short_family_description","label":"Short Family Description","type":"textarea","value":"kjllkjkjl"}]}
RESPONSE: {"fields":[{},{},{},{"key":["Ensure this field has no more than 100 characters."]},{},{},{},{},{}]}
--- 2026-08-03T07:51:14.444Z ---
URL: http://127.0.0.1:8000/api/marriage/profile/main/?_t=1785743467848
STATUS: 200
REQUEST: ""
RESPONSE: {"id":23,"status":"waiting","gender":"female","is_registering_for_self":true,"paid_fee":false,"can_edit_profile":true,"can_message_expert":false,"active_subscription":null,"is_ready_for_match":true,"active_case":null,"needs_subscription":false,"match_summary":null,"recommended_plan":{"id":1,"title":"اشتراک یک ماه","price":"5"}}
--- 2026-08-03T07:51:15.926Z ---
URL: http://127.0.0.1:8000/api/marriage/sections/marital_history/data/
STATUS: 200
REQUEST: {"current_step":2,"total_steps":2,"fields":[{"key":"q1_current_marital_status","label":"Current Marital Status","type":"radio","value":"Divorced; after living together"},{"key":"q2_previous_marriage_duration","type":"text","label":"Previous Marriage Duration","value":"3"},{"key":"q3_reason_for_separation","label":"Reason for Separation","type":"text","value":"kljklh"},{"key":"q4_children_and_guardianship_status","label":"Children and Guardianship Status","type":"checkbox","value":["Have children living with me"]},{"key":"q5_number_of_children","label":"Number of Children","type":"number","value":2},{"key":"q6_what_is_the_custody_status_of_your_child_ren","label":"What is the custody status of your child(ren)?","type":"radio","value":"Joint custody or periodic visitation/relocation between parents."},{"key":"q7_how_much_time_do_the_child_ren_usually_live_with_you","label":"How much time do the child(ren) usually live with you?","type":"radio","value":"Approximately half the time (joint custody/schedule)."},{"key":"q8_does_the_custody_visitation_or_relocation_schedule_impact_your_residence_or_immigration","label":"Does the custody, visitation, or relocation schedule impact your residence or immigration?","type":"radio","value":"Yes, relocation or immigration requires coordination, agreement, or a legal permit."},{"key":"q9_what_is_the_payment_or_receipt_status_of_child_support","label":"What is the payment or receipt status of child support?","type":"radio","value":"Receiving child support regularly."},{"key":"q10_acceptance_of_necessary_communication_between_future_spouse_and_the_other_parent","label":"Acceptance of necessary communication between future spouse and the other parent","type":"radio","value":"I only accept formal and highly limited communication regarding essential child matters."},{"key":"q11_short_children_guardianship_explanation","label":"Short Children/Guardianship Explanation","type":"textarea","value":"تانتلننتا"}]}
RESPONSE: {"id":124,"slug":"marital_history","data":[{"key":"q1_current_marital_status","label":"Current Marital Status","type":"radio","value":"Divorced; after living together"},{"key":"q3_reason_for_separation","label":"Reason for Separation","type":"text","value":"kljklh"},{"key":"q1_number_of_siblings","type":"number","label":"Number of Siblings","value":5},{"key":"q2_parents_survival_status","type":"radio","label":"Parents' Survival Status","value":"Both parents are alive"},{"key":"q3_parents_marital_status","type":"radio","label":"Parents' Marital Status","value":"Living together"},{"key":"q5_family_s_religious_and_ideological_atmosphere","type":"radio","label":"Family's Religious and Ideological Atmosphere","value":"Religious and strictly observant"},{"key":"q6_family_economic_status","type":"radio","label":"Family Economic Status","value":"Prosperous"},{"key":"q4_short_family_description","type":"text","label":"Short Family Description","value":"jhh"},{"key":"q2_previous_marriage_duration","label":"Previous Marriage Duration","type":"text","value":"3"},{"key":"q5_do_the_supported_individual_s_live_with_you","type":"radio","label":"Do the supported individual(s) live with you?","value":"Yes, they live with me permanently."},{"key":"q6_additional_details_about_family_responsibility","type":"textarea","label":"Additional details about family responsibility","value":"hi my name is "},{"key":"q9_family_economic_status","type":"radio","label":"Family Economic Status","value":"Prosperous"},{"key":"q7_family_s_religious_and_ideological_atmosphere","type":"radio","label":"Family's Religious and Ideological Atmosphere","value":"Religious (observant of obligations)"},{"key":"q8_family_economic_status","type":"radio","label":"Family Economic Status","value":"Average"},{"key":"q4_children_and_guardianship_status","label":"Children and Guardianship Status","type":"checkbox","value":["Have children living with me"]},{"key":"q5_number_of_children","label":"Number of Children","type":"number","value":2},{"key":"q7_what_is_the_custody_status_of_your_child_ren","type":"checkbox","label":"What is the custody status of your child(ren)?","value":["Custody is with the other parent or another person.","Joint custody or periodic visitation/relocation between parents.","Children have reached legal age (custody is not applicable)."]},{"key":"q8_how_much_time_do_the_child_ren_usually_live_with_you","type":"radio","label":"How much time do the child(ren) usually live with you?","value":"Permanently or most days of the week with me."},{"key":"q9_does_the_custody_visitation_or_relocation_schedule_impact_your_residence_or_immigration","type":"radio","label":"Does the custody, visitation, or relocation schedule impact your residence or immigration?","value":"Yes, relocation or immigration requires coordination, agreement, or a legal permit."},{"key":"q10_what_is_the_payment_or_receipt_status_of_child_support","type":"radio","label":"What is the payment or receipt status of child support?","value":"Receiving child support regularly."},{"key":"q9_short_family_description","type":"textarea","label":"Short Family Description","value":"kjllkj"},{"key":"q12_acceptance_of_necessary_communication_between_future_spouse_and_the_other_parent","type":"radio","label":"Acceptance of necessary communication between future spouse and the other parent","value":"I accept necessary, respectful, and limited communication regarding child matters."},{"key":"q6_what_is_the_custody_status_of_your_child_ren","label":"What is the custody status of your child(ren)?","type":"radio","value":"Joint custody or periodic visitation/relocation between parents."},{"key":"q7_how_much_time_do_the_child_ren_usually_live_with_you","label":"How much time do the child(ren) usually live with you?","type":"radio","value":"Approximately half the time (joint custody/schedule)."},{"key":"q8_does_the_custody_visitation_or_relocation_schedule_impact_your_residence_or_immigration","label":"Does the custody, visitation, or relocation schedule impact your residence or immigration?","type":"radio","value":"Yes, relocation or immigration requires coordination, agreement, or a legal permit."},{"key":"q9_what_is_the_payment_or_receipt_status_of_child_support","label":"What is the payment or receipt status of child support?","type":"radio","value":"Receiving child support regularly."},{"key":"q10_acceptance_of_necessary_communication_between_future_spouse_and_the_other_parent","label":"Acceptance of necessary communication between future spouse and the other parent","type":"radio","value":"I only accept formal and highly limited communication regarding essential child matters."},{"key":"q11_short_children_guardianship_explanation","label":"Short Children/Guardianship Explanation","type":"textarea","value":"تانتلننتا"}],"current_step":2,"total_steps":2,"completion_percent":100,"updated_at":"2026-08-03T11:21:09.741786"}
--- 2026-08-03T07:51:16.132Z ---
URL: http://127.0.0.1:8000/api/marriage/sections/?_t=1785743475001
STATUS: 200
REQUEST: ""
RESPONSE: [{"id":5,"slug":"katel_test","title":"Katel Test","is_required":false,"importance_weight":1,"estimated_minutes":30,"total_steps":4,"order":0,"current_step":0,"completion_percent":0},{"id":15,"slug":"personal_identity","title":"Personal and identity details","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":6,"order":0,"current_step":6,"completion_percent":100},{"id":7,"slug":"contact_residence","title":"Contact, Residence & Family Liaison","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":8,"order":2,"current_step":8,"completion_percent":100},{"id":8,"slug":"appearance_health","title":"Appearance, Health & Physical Activity","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":5,"order":3,"current_step":5,"completion_percent":100},{"id":9,"slug":"education_career","title":"Education, Career & Financial Status","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":4,"order":4,"current_step":4,"completion_percent":100},{"id":10,"slug":"family_background","title":"Family Background","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":3,"order":5,"current_step":3,"completion_percent":100},{"id":11,"slug":"marital_history","title":"Marital Status, Marriage History & Children","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":2,"order":6,"current_step":2,"completion_percent":100},{"id":12,"slug":"beliefs_lifestyle","title":"Beliefs, Lifestyle, Personality & Personal Boundaries","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":15,"order":7,"current_step":15,"completion_percent":100},{"id":13,"slug":"spouse_criteria","title":"Future Spouse Criteria & Deal-Breakers","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":23,"order":8,"current_step":23,"completion_percent":100},{"id":14,"slug":"documents_verification","title":"Document Upload, Verification & Photos","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":3,"order":9,"current_step":3,"completion_percent":100}]
--- 2026-08-03T07:51:17.779Z ---
URL: http://127.0.0.1:8000/api/marriage/sections/family_background/data/
STATUS: 400
REQUEST: {"current_step":5,"total_steps":5,"fields":[{"key":"q1_number_of_siblings","type":"number","label":"Number of Siblings","value":5},{"key":"q2_parents_survival_status","label":"Parents' Survival Status","type":"radio","value":"Both parents are alive"},{"key":"q3_parents_marital_status","type":"radio","label":"Parents' Marital Status","value":"Living together"},{"key":"q4_do_you_currently_have_an_ongoing_financial_caregiving_or_guardianship_responsibility_for_a_family_member","label":"Do you currently have an ongoing financial, caregiving, or guardianship responsibility for a family member?","type":"checkbox","value":["I am responsible for caring for my parent(s) (father, mother, or both)."]},{"key":"q5_do_the_supported_individual_s_live_with_you","label":"Do the supported individual(s) live with you?","type":"radio","value":"Yes, they live with me permanently."},{"key":"q6_additional_details_about_family_responsibility","type":"textarea","label":"Additional details about family responsibility","value":"hi my name is "},{"key":"q7_family_s_religious_and_ideological_atmosphere","type":"radio","label":"Family's Religious and Ideological Atmosphere","value":"Religious (observant of obligations)"},{"key":"q8_family_economic_status","type":"radio","label":"Family Economic Status","value":"Average"},{"key":"q9_short_family_description","label":"Short Family Description","type":"textarea","value":"kjllkjkjl"}]}
RESPONSE: {"fields":[{},{},{},{"key":["Ensure this field has no more than 100 characters."]},{},{},{},{},{}]}
--- 2026-08-03T07:51:21.694Z ---
URL: http://127.0.0.1:8000/api/marriage/profile/main/?_t=1785743475001
STATUS: 200
REQUEST: ""
RESPONSE: {"id":23,"status":"waiting","gender":"female","is_registering_for_self":true,"paid_fee":false,"can_edit_profile":true,"can_message_expert":false,"active_subscription":null,"is_ready_for_match":true,"active_case":null,"needs_subscription":false,"match_summary":null,"recommended_plan":{"id":1,"title":"اشتراک یک ماه","price":"5"}}
--- 2026-08-03T07:51:22.425Z ---
URL: http://127.0.0.1:8000/api/marriage/sections/?_t=1785743481293
STATUS: 200
REQUEST: ""
RESPONSE: [{"id":5,"slug":"katel_test","title":"Katel Test","is_required":false,"importance_weight":1,"estimated_minutes":30,"total_steps":4,"order":0,"current_step":0,"completion_percent":0},{"id":15,"slug":"personal_identity","title":"Personal and identity details","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":6,"order":0,"current_step":6,"completion_percent":100},{"id":7,"slug":"contact_residence","title":"Contact, Residence & Family Liaison","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":8,"order":2,"current_step":8,"completion_percent":100},{"id":8,"slug":"appearance_health","title":"Appearance, Health & Physical Activity","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":5,"order":3,"current_step":5,"completion_percent":100},{"id":9,"slug":"education_career","title":"Education, Career & Financial Status","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":4,"order":4,"current_step":4,"completion_percent":100},{"id":10,"slug":"family_background","title":"Family Background","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":3,"order":5,"current_step":3,"completion_percent":100},{"id":11,"slug":"marital_history","title":"Marital Status, Marriage History & Children","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":2,"order":6,"current_step":2,"completion_percent":100},{"id":12,"slug":"beliefs_lifestyle","title":"Beliefs, Lifestyle, Personality & Personal Boundaries","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":15,"order":7,"current_step":15,"completion_percent":100},{"id":13,"slug":"spouse_criteria","title":"Future Spouse Criteria & Deal-Breakers","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":23,"order":8,"current_step":23,"completion_percent":100},{"id":14,"slug":"documents_verification","title":"Document Upload, Verification & Photos","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":3,"order":9,"current_step":3,"completion_percent":100}]
--- 2026-08-03T07:51:24.117Z ---
URL: http://127.0.0.1:8000/api/marriage/sections/marital_history/data/
STATUS: 200
REQUEST: {"current_step":2,"total_steps":2,"fields":[{"key":"q1_current_marital_status","label":"Current Marital Status","type":"radio","value":"Divorced; after living together"},{"key":"q2_previous_marriage_duration","type":"text","label":"Previous Marriage Duration","value":"3"},{"key":"q3_reason_for_separation","label":"Reason for Separation","type":"text","value":"kljklh"},{"key":"q4_children_and_guardianship_status","label":"Children and Guardianship Status","type":"checkbox","value":["Have children living with me"]},{"key":"q5_number_of_children","label":"Number of Children","type":"number","value":2},{"key":"q6_what_is_the_custody_status_of_your_child_ren","label":"What is the custody status of your child(ren)?","type":"radio","value":"Joint custody or periodic visitation/relocation between parents."},{"key":"q7_how_much_time_do_the_child_ren_usually_live_with_you","label":"How much time do the child(ren) usually live with you?","type":"radio","value":"Approximately half the time (joint custody/schedule)."},{"key":"q8_does_the_custody_visitation_or_relocation_schedule_impact_your_residence_or_immigration","label":"Does the custody, visitation, or relocation schedule impact your residence or immigration?","type":"radio","value":"Yes, relocation or immigration requires coordination, agreement, or a legal permit."},{"key":"q9_what_is_the_payment_or_receipt_status_of_child_support","label":"What is the payment or receipt status of child support?","type":"radio","value":"Receiving child support regularly."},{"key":"q10_acceptance_of_necessary_communication_between_future_spouse_and_the_other_parent","label":"Acceptance of necessary communication between future spouse and the other parent","type":"radio","value":"I only accept formal and highly limited communication regarding essential child matters."},{"key":"q11_short_children_guardianship_explanation","label":"Short Children/Guardianship Explanation","type":"textarea","value":"تانتلننتا"}]}
RESPONSE: {"id":124,"slug":"marital_history","data":[{"key":"q1_current_marital_status","label":"Current Marital Status","type":"radio","value":"Divorced; after living together"},{"key":"q3_reason_for_separation","label":"Reason for Separation","type":"text","value":"kljklh"},{"key":"q1_number_of_siblings","type":"number","label":"Number of Siblings","value":5},{"key":"q2_parents_survival_status","type":"radio","label":"Parents' Survival Status","value":"Both parents are alive"},{"key":"q3_parents_marital_status","type":"radio","label":"Parents' Marital Status","value":"Living together"},{"key":"q5_family_s_religious_and_ideological_atmosphere","type":"radio","label":"Family's Religious and Ideological Atmosphere","value":"Religious and strictly observant"},{"key":"q6_family_economic_status","type":"radio","label":"Family Economic Status","value":"Prosperous"},{"key":"q4_short_family_description","type":"text","label":"Short Family Description","value":"jhh"},{"key":"q2_previous_marriage_duration","label":"Previous Marriage Duration","type":"text","value":"3"},{"key":"q5_do_the_supported_individual_s_live_with_you","type":"radio","label":"Do the supported individual(s) live with you?","value":"Yes, they live with me permanently."},{"key":"q6_additional_details_about_family_responsibility","type":"textarea","label":"Additional details about family responsibility","value":"hi my name is "},{"key":"q9_family_economic_status","type":"radio","label":"Family Economic Status","value":"Prosperous"},{"key":"q7_family_s_religious_and_ideological_atmosphere","type":"radio","label":"Family's Religious and Ideological Atmosphere","value":"Religious (observant of obligations)"},{"key":"q8_family_economic_status","type":"radio","label":"Family Economic Status","value":"Average"},{"key":"q4_children_and_guardianship_status","label":"Children and Guardianship Status","type":"checkbox","value":["Have children living with me"]},{"key":"q5_number_of_children","label":"Number of Children","type":"number","value":2},{"key":"q7_what_is_the_custody_status_of_your_child_ren","type":"checkbox","label":"What is the custody status of your child(ren)?","value":["Custody is with the other parent or another person.","Joint custody or periodic visitation/relocation between parents.","Children have reached legal age (custody is not applicable)."]},{"key":"q8_how_much_time_do_the_child_ren_usually_live_with_you","type":"radio","label":"How much time do the child(ren) usually live with you?","value":"Permanently or most days of the week with me."},{"key":"q9_does_the_custody_visitation_or_relocation_schedule_impact_your_residence_or_immigration","type":"radio","label":"Does the custody, visitation, or relocation schedule impact your residence or immigration?","value":"Yes, relocation or immigration requires coordination, agreement, or a legal permit."},{"key":"q10_what_is_the_payment_or_receipt_status_of_child_support","type":"radio","label":"What is the payment or receipt status of child support?","value":"Receiving child support regularly."},{"key":"q9_short_family_description","type":"textarea","label":"Short Family Description","value":"kjllkj"},{"key":"q12_acceptance_of_necessary_communication_between_future_spouse_and_the_other_parent","type":"radio","label":"Acceptance of necessary communication between future spouse and the other parent","value":"I accept necessary, respectful, and limited communication regarding child matters."},{"key":"q6_what_is_the_custody_status_of_your_child_ren","label":"What is the custody status of your child(ren)?","type":"radio","value":"Joint custody or periodic visitation/relocation between parents."},{"key":"q7_how_much_time_do_the_child_ren_usually_live_with_you","label":"How much time do the child(ren) usually live with you?","type":"radio","value":"Approximately half the time (joint custody/schedule)."},{"key":"q8_does_the_custody_visitation_or_relocation_schedule_impact_your_residence_or_immigration","label":"Does the custody, visitation, or relocation schedule impact your residence or immigration?","type":"radio","value":"Yes, relocation or immigration requires coordination, agreement, or a legal permit."},{"key":"q9_what_is_the_payment_or_receipt_status_of_child_support","label":"What is the payment or receipt status of child support?","type":"radio","value":"Receiving child support regularly."},{"key":"q10_acceptance_of_necessary_communication_between_future_spouse_and_the_other_parent","label":"Acceptance of necessary communication between future spouse and the other parent","type":"radio","value":"I only accept formal and highly limited communication regarding essential child matters."},{"key":"q11_short_children_guardianship_explanation","label":"Short Children/Guardianship Explanation","type":"textarea","value":"تانتلننتا"}],"current_step":2,"total_steps":2,"completion_percent":100,"updated_at":"2026-08-03T11:21:17.931770"}
--- 2026-08-03T07:51:28.070Z ---
URL: http://127.0.0.1:8000/api/marriage/profile/main/?_t=1785743481293
STATUS: 200
REQUEST: ""
RESPONSE: {"id":23,"status":"waiting","gender":"female","is_registering_for_self":true,"paid_fee":false,"can_edit_profile":true,"can_message_expert":false,"active_subscription":null,"is_ready_for_match":true,"active_case":null,"needs_subscription":false,"match_summary":null,"recommended_plan":{"id":1,"title":"اشتراک یک ماه","price":"5"}}
--- 2026-08-03T07:51:58.760Z ---
URL: http://127.0.0.1:8000/api/marriage/sections/?_t=1785743517875
STATUS: 200
REQUEST: ""
RESPONSE: [{"id":5,"slug":"katel_test","title":"Katel Test","is_required":false,"importance_weight":1,"estimated_minutes":30,"total_steps":4,"order":0,"current_step":0,"completion_percent":0},{"id":15,"slug":"personal_identity","title":"Personal and identity details","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":6,"order":0,"current_step":6,"completion_percent":100},{"id":7,"slug":"contact_residence","title":"Contact, Residence & Family Liaison","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":8,"order":2,"current_step":8,"completion_percent":100},{"id":8,"slug":"appearance_health","title":"Appearance, Health & Physical Activity","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":5,"order":3,"current_step":5,"completion_percent":100},{"id":9,"slug":"education_career","title":"Education, Career & Financial Status","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":4,"order":4,"current_step":4,"completion_percent":100},{"id":10,"slug":"family_background","title":"Family Background","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":3,"order":5,"current_step":3,"completion_percent":100},{"id":11,"slug":"marital_history","title":"Marital Status, Marriage History & Children","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":2,"order":6,"current_step":2,"completion_percent":100},{"id":12,"slug":"beliefs_lifestyle","title":"Beliefs, Lifestyle, Personality & Personal Boundaries","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":15,"order":7,"current_step":15,"completion_percent":100},{"id":13,"slug":"spouse_criteria","title":"Future Spouse Criteria & Deal-Breakers","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":23,"order":8,"current_step":23,"completion_percent":100},{"id":14,"slug":"documents_verification","title":"Document Upload, Verification & Photos","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":3,"order":9,"current_step":3,"completion_percent":100}]
--- 2026-08-03T07:51:59.495Z ---
URL: http://127.0.0.1:8000/api/marriage/sections/family_background/data/
STATUS: 400
REQUEST: {"current_step":5,"total_steps":5,"fields":[{"key":"q1_number_of_siblings","type":"number","label":"Number of Siblings","value":5},{"key":"q2_parents_survival_status","label":"Parents' Survival Status","type":"radio","value":"Both parents are alive"},{"key":"q3_parents_marital_status","type":"radio","label":"Parents' Marital Status","value":"Living together"},{"key":"q4_do_you_currently_have_an_ongoing_financial_caregiving_or_guardianship_responsibility_for_a_family_member","label":"Do you currently have an ongoing financial, caregiving, or guardianship responsibility for a family member?","type":"checkbox","value":["I am responsible for caring for my parent(s) (father, mother, or both)."]},{"key":"q5_do_the_supported_individual_s_live_with_you","label":"Do the supported individual(s) live with you?","type":"radio","value":"Yes, they live with me permanently."},{"key":"q6_additional_details_about_family_responsibility","type":"textarea","label":"Additional details about family responsibility","value":"hi my name is "},{"key":"q7_family_s_religious_and_ideological_atmosphere","type":"radio","label":"Family's Religious and Ideological Atmosphere","value":"Religious (observant of obligations)"},{"key":"q8_family_economic_status","type":"radio","label":"Family Economic Status","value":"Average"},{"key":"q9_short_family_description","label":"Short Family Description","type":"textarea","value":"kjllkjkjl"}]}
RESPONSE: {"fields":[{},{},{},{"key":["Ensure this field has no more than 100 characters."]},{},{},{},{},{}]}
--- 2026-08-03T07:52:04.434Z ---
URL: http://127.0.0.1:8000/api/marriage/profile/main/?_t=1785743517875
STATUS: 200
REQUEST: ""
RESPONSE: {"id":23,"status":"waiting","gender":"female","is_registering_for_self":true,"paid_fee":false,"can_edit_profile":true,"can_message_expert":false,"active_subscription":null,"is_ready_for_match":true,"active_case":null,"needs_subscription":false,"match_summary":null,"recommended_plan":{"id":1,"title":"اشتراک یک ماه","price":"5"}}
--- 2026-08-03T07:52:05.855Z ---
URL: http://127.0.0.1:8000/api/marriage/sections/marital_history/data/
STATUS: 200
REQUEST: {"current_step":2,"total_steps":2,"fields":[{"key":"q1_current_marital_status","label":"Current Marital Status","type":"radio","value":"Divorced; after living together"},{"key":"q2_previous_marriage_duration","type":"text","label":"Previous Marriage Duration","value":"3"},{"key":"q3_reason_for_separation","label":"Reason for Separation","type":"text","value":"kljklh"},{"key":"q4_children_and_guardianship_status","label":"Children and Guardianship Status","type":"checkbox","value":["Have children living with me"]},{"key":"q5_number_of_children","label":"Number of Children","type":"number","value":2},{"key":"q6_what_is_the_custody_status_of_your_child_ren","label":"What is the custody status of your child(ren)?","type":"radio","value":"Joint custody or periodic visitation/relocation between parents."},{"key":"q7_how_much_time_do_the_child_ren_usually_live_with_you","label":"How much time do the child(ren) usually live with you?","type":"radio","value":"Approximately half the time (joint custody/schedule)."},{"key":"q8_does_the_custody_visitation_or_relocation_schedule_impact_your_residence_or_immigration","label":"Does the custody, visitation, or relocation schedule impact your residence or immigration?","type":"radio","value":"Yes, relocation or immigration requires coordination, agreement, or a legal permit."},{"key":"q9_what_is_the_payment_or_receipt_status_of_child_support","label":"What is the payment or receipt status of child support?","type":"radio","value":"Receiving child support regularly."},{"key":"q10_acceptance_of_necessary_communication_between_future_spouse_and_the_other_parent","label":"Acceptance of necessary communication between future spouse and the other parent","type":"radio","value":"I only accept formal and highly limited communication regarding essential child matters."},{"key":"q11_short_children_guardianship_explanation","label":"Short Children/Guardianship Explanation","type":"textarea","value":"تانتلننتا"}]}
RESPONSE: {"id":124,"slug":"marital_history","data":[{"key":"q1_current_marital_status","label":"Current Marital Status","type":"radio","value":"Divorced; after living together"},{"key":"q3_reason_for_separation","label":"Reason for Separation","type":"text","value":"kljklh"},{"key":"q1_number_of_siblings","type":"number","label":"Number of Siblings","value":5},{"key":"q2_parents_survival_status","type":"radio","label":"Parents' Survival Status","value":"Both parents are alive"},{"key":"q3_parents_marital_status","type":"radio","label":"Parents' Marital Status","value":"Living together"},{"key":"q5_family_s_religious_and_ideological_atmosphere","type":"radio","label":"Family's Religious and Ideological Atmosphere","value":"Religious and strictly observant"},{"key":"q6_family_economic_status","type":"radio","label":"Family Economic Status","value":"Prosperous"},{"key":"q4_short_family_description","type":"text","label":"Short Family Description","value":"jhh"},{"key":"q2_previous_marriage_duration","label":"Previous Marriage Duration","type":"text","value":"3"},{"key":"q5_do_the_supported_individual_s_live_with_you","type":"radio","label":"Do the supported individual(s) live with you?","value":"Yes, they live with me permanently."},{"key":"q6_additional_details_about_family_responsibility","type":"textarea","label":"Additional details about family responsibility","value":"hi my name is "},{"key":"q9_family_economic_status","type":"radio","label":"Family Economic Status","value":"Prosperous"},{"key":"q7_family_s_religious_and_ideological_atmosphere","type":"radio","label":"Family's Religious and Ideological Atmosphere","value":"Religious (observant of obligations)"},{"key":"q8_family_economic_status","type":"radio","label":"Family Economic Status","value":"Average"},{"key":"q4_children_and_guardianship_status","label":"Children and Guardianship Status","type":"checkbox","value":["Have children living with me"]},{"key":"q5_number_of_children","label":"Number of Children","type":"number","value":2},{"key":"q7_what_is_the_custody_status_of_your_child_ren","type":"checkbox","label":"What is the custody status of your child(ren)?","value":["Custody is with the other parent or another person.","Joint custody or periodic visitation/relocation between parents.","Children have reached legal age (custody is not applicable)."]},{"key":"q8_how_much_time_do_the_child_ren_usually_live_with_you","type":"radio","label":"How much time do the child(ren) usually live with you?","value":"Permanently or most days of the week with me."},{"key":"q9_does_the_custody_visitation_or_relocation_schedule_impact_your_residence_or_immigration","type":"radio","label":"Does the custody, visitation, or relocation schedule impact your residence or immigration?","value":"Yes, relocation or immigration requires coordination, agreement, or a legal permit."},{"key":"q10_what_is_the_payment_or_receipt_status_of_child_support","type":"radio","label":"What is the payment or receipt status of child support?","value":"Receiving child support regularly."},{"key":"q9_short_family_description","type":"textarea","label":"Short Family Description","value":"kjllkj"},{"key":"q12_acceptance_of_necessary_communication_between_future_spouse_and_the_other_parent","type":"radio","label":"Acceptance of necessary communication between future spouse and the other parent","value":"I accept necessary, respectful, and limited communication regarding child matters."},{"key":"q6_what_is_the_custody_status_of_your_child_ren","label":"What is the custody status of your child(ren)?","type":"radio","value":"Joint custody or periodic visitation/relocation between parents."},{"key":"q7_how_much_time_do_the_child_ren_usually_live_with_you","label":"How much time do the child(ren) usually live with you?","type":"radio","value":"Approximately half the time (joint custody/schedule)."},{"key":"q8_does_the_custody_visitation_or_relocation_schedule_impact_your_residence_or_immigration","label":"Does the custody, visitation, or relocation schedule impact your residence or immigration?","type":"radio","value":"Yes, relocation or immigration requires coordination, agreement, or a legal permit."},{"key":"q9_what_is_the_payment_or_receipt_status_of_child_support","label":"What is the payment or receipt status of child support?","type":"radio","value":"Receiving child support regularly."},{"key":"q10_acceptance_of_necessary_communication_between_future_spouse_and_the_other_parent","label":"Acceptance of necessary communication between future spouse and the other parent","type":"radio","value":"I only accept formal and highly limited communication regarding essential child matters."},{"key":"q11_short_children_guardianship_explanation","label":"Short Children/Guardianship Explanation","type":"textarea","value":"تانتلننتا"}],"current_step":2,"total_steps":2,"completion_percent":100,"updated_at":"2026-08-03T11:21:59.669906"}
--- 2026-08-03T07:52:25.332Z ---
URL: http://127.0.0.1:8000/api/marriage/sections/?_t=1785743544353
STATUS: 200
REQUEST: ""
RESPONSE: [{"id":5,"slug":"katel_test","title":"Katel Test","is_required":false,"importance_weight":1,"estimated_minutes":30,"total_steps":4,"order":0,"current_step":0,"completion_percent":0},{"id":15,"slug":"personal_identity","title":"Personal and identity details","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":6,"order":0,"current_step":6,"completion_percent":100},{"id":7,"slug":"contact_residence","title":"Contact, Residence & Family Liaison","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":8,"order":2,"current_step":8,"completion_percent":100},{"id":8,"slug":"appearance_health","title":"Appearance, Health & Physical Activity","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":5,"order":3,"current_step":5,"completion_percent":100},{"id":9,"slug":"education_career","title":"Education, Career & Financial Status","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":4,"order":4,"current_step":4,"completion_percent":100},{"id":10,"slug":"family_background","title":"Family Background","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":3,"order":5,"current_step":3,"completion_percent":100},{"id":11,"slug":"marital_history","title":"Marital Status, Marriage History & Children","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":2,"order":6,"current_step":2,"completion_percent":100},{"id":12,"slug":"beliefs_lifestyle","title":"Beliefs, Lifestyle, Personality & Personal Boundaries","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":15,"order":7,"current_step":15,"completion_percent":100},{"id":13,"slug":"spouse_criteria","title":"Future Spouse Criteria & Deal-Breakers","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":23,"order":8,"current_step":23,"completion_percent":100},{"id":14,"slug":"documents_verification","title":"Document Upload, Verification & Photos","is_required":true,"importance_weight":1,"estimated_minutes":null,"total_steps":3,"order":9,"current_step":3,"completion_percent":100}]
--- 2026-08-03T07:52:26.038Z ---
URL: http://127.0.0.1:8000/api/marriage/sections/family_background/data/
STATUS: 400
REQUEST: {"current_step":5,"total_steps":5,"fields":[{"key":"q1_number_of_siblings","type":"number","label":"Number of Siblings","value":5},{"key":"q2_parents_survival_status","label":"Parents' Survival Status","type":"radio","value":"Both parents are alive"},{"key":"q3_parents_marital_status","type":"radio","label":"Parents' Marital Status","value":"Living together"},{"key":"q4_do_you_currently_have_an_ongoing_financial_caregiving_or_guardianship_responsibility_for_a_family_member","label":"Do you currently have an ongoing financial, caregiving, or guardianship responsibility for a family member?","type":"checkbox","value":["I am responsible for caring for my parent(s) (father, mother, or both)."]},{"key":"q5_do_the_supported_individual_s_live_with_you","label":"Do the supported individual(s) live with you?","type":"radio","value":"Yes, they live with me permanently."},{"key":"q6_additional_details_about_family_responsibility","type":"textarea","label":"Additional details about family responsibility","value":"hi my name is "},{"key":"q7_family_s_religious_and_ideological_atmosphere","type":"radio","label":"Family's Religious and Ideological Atmosphere","value":"Religious (observant of obligations)"},{"key":"q8_family_economic_status","type":"radio","label":"Family Economic Status","value":"Average"},{"key":"q9_short_family_description","label":"Short Family Description","type":"textarea","value":"kjllkjkjl"}]}
RESPONSE: {"fields":[{},{},{},{"key":["Ensure this field has no more than 100 characters."]},{},{},{},{},{}]}
--- 2026-08-03T07:52:30.995Z ---
URL: http://127.0.0.1:8000/api/marriage/profile/main/?_t=1785743544353
STATUS: 200
REQUEST: ""
RESPONSE: {"id":23,"status":"waiting","gender":"female","is_registering_for_self":true,"paid_fee":false,"can_edit_profile":true,"can_message_expert":false,"active_subscription":null,"is_ready_for_match":true,"active_case":null,"needs_subscription":false,"match_summary":null,"recommended_plan":{"id":1,"title":"اشتراک یک ماه","price":"5"}}
--- 2026-08-03T07:52:32.761Z ---
URL: http://127.0.0.1:8000/api/marriage/sections/marital_history/data/
STATUS: 200
REQUEST: {"current_step":2,"total_steps":2,"fields":[{"key":"q1_current_marital_status","label":"Current Marital Status","type":"radio","value":"Divorced; after living together"},{"key":"q2_previous_marriage_duration","type":"text","label":"Previous Marriage Duration","value":"3"},{"key":"q3_reason_for_separation","label":"Reason for Separation","type":"text","value":"kljklh"},{"key":"q4_children_and_guardianship_status","label":"Children and Guardianship Status","type":"checkbox","value":["Have children living with me"]},{"key":"q5_number_of_children","label":"Number of Children","type":"number","value":2},{"key":"q6_what_is_the_custody_status_of_your_child_ren","label":"What is the custody status of your child(ren)?","type":"radio","value":"Joint custody or periodic visitation/relocation between parents."},{"key":"q7_how_much_time_do_the_child_ren_usually_live_with_you","label":"How much time do the child(ren) usually live with you?","type":"radio","value":"Approximately half the time (joint custody/schedule)."},{"key":"q8_does_the_custody_visitation_or_relocation_schedule_impact_your_residence_or_immigration","label":"Does the custody, visitation, or relocation schedule impact your residence or immigration?","type":"radio","value":"Yes, relocation or immigration requires coordination, agreement, or a legal permit."},{"key":"q9_what_is_the_payment_or_receipt_status_of_child_support","label":"What is the payment or receipt status of child support?","type":"radio","value":"Receiving child support regularly."},{"key":"q10_acceptance_of_necessary_communication_between_future_spouse_and_the_other_parent","label":"Acceptance of necessary communication between future spouse and the other parent","type":"radio","value":"I only accept formal and highly limited communication regarding essential child matters."},{"key":"q11_short_children_guardianship_explanation","label":"Short Children/Guardianship Explanation","type":"textarea","value":"تانتلننتا"}]}
RESPONSE: {"id":124,"slug":"marital_history","data":[{"key":"q1_current_marital_status","label":"Current Marital Status","type":"radio","value":"Divorced; after living together"},{"key":"q3_reason_for_separation","label":"Reason for Separation","type":"text","value":"kljklh"},{"key":"q1_number_of_siblings","type":"number","label":"Number of Siblings","value":5},{"key":"q2_parents_survival_status","type":"radio","label":"Parents' Survival Status","value":"Both parents are alive"},{"key":"q3_parents_marital_status","type":"radio","label":"Parents' Marital Status","value":"Living together"},{"key":"q5_family_s_religious_and_ideological_atmosphere","type":"radio","label":"Family's Religious and Ideological Atmosphere","value":"Religious and strictly observant"},{"key":"q6_family_economic_status","type":"radio","label":"Family Economic Status","value":"Prosperous"},{"key":"q4_short_family_description","type":"text","label":"Short Family Description","value":"jhh"},{"key":"q2_previous_marriage_duration","label":"Previous Marriage Duration","type":"text","value":"3"},{"key":"q5_do_the_supported_individual_s_live_with_you","type":"radio","label":"Do the supported individual(s) live with you?","value":"Yes, they live with me permanently."},{"key":"q6_additional_details_about_family_responsibility","type":"textarea","label":"Additional details about family responsibility","value":"hi my name is "},{"key":"q9_family_economic_status","type":"radio","label":"Family Economic Status","value":"Prosperous"},{"key":"q7_family_s_religious_and_ideological_atmosphere","type":"radio","label":"Family's Religious and Ideological Atmosphere","value":"Religious (observant of obligations)"},{"key":"q8_family_economic_status","type":"radio","label":"Family Economic Status","value":"Average"},{"key":"q4_children_and_guardianship_status","label":"Children and Guardianship Status","type":"checkbox","value":["Have children living with me"]},{"key":"q5_number_of_children","label":"Number of Children","type":"number","value":2},{"key":"q7_what_is_the_custody_status_of_your_child_ren","type":"checkbox","label":"What is the custody status of your child(ren)?","value":["Custody is with the other parent or another person.","Joint custody or periodic visitation/relocation between parents.","Children have reached legal age (custody is not applicable)."]},{"key":"q8_how_much_time_do_the_child_ren_usually_live_with_you","type":"radio","label":"How much time do the child(ren) usually live with you?","value":"Permanently or most days of the week with me."},{"key":"q9_does_the_custody_visitation_or_relocation_schedule_impact_your_residence_or_immigration","type":"radio","label":"Does the custody, visitation, or relocation schedule impact your residence or immigration?","value":"Yes, relocation or immigration requires coordination, agreement, or a legal permit."},{"key":"q10_what_is_the_payment_or_receipt_status_of_child_support","type":"radio","label":"What is the payment or receipt status of child support?","value":"Receiving child support regularly."},{"key":"q9_short_family_description","type":"textarea","label":"Short Family Description","value":"kjllkj"},{"key":"q12_acceptance_of_necessary_communication_between_future_spouse_and_the_other_parent","type":"radio","label":"Acceptance of necessary communication between future spouse and the other parent","value":"I accept necessary, respectful, and limited communication regarding child matters."},{"key":"q6_what_is_the_custody_status_of_your_child_ren","label":"What is the custody status of your child(ren)?","type":"radio","value":"Joint custody or periodic visitation/relocation between parents."},{"key":"q7_how_much_time_do_the_child_ren_usually_live_with_you","label":"How much time do the child(ren) usually live with you?","type":"radio","value":"Approximately half the time (joint custody/schedule)."},{"key":"q8_does_the_custody_visitation_or_relocation_schedule_impact_your_residence_or_immigration","label":"Does the custody, visitation, or relocation schedule impact your residence or immigration?","type":"radio","value":"Yes, relocation or immigration requires coordination, agreement, or a legal permit."},{"key":"q9_what_is_the_payment_or_receipt_status_of_child_support","label":"What is the payment or receipt status of child support?","type":"radio","value":"Receiving child support regularly."},{"key":"q10_acceptance_of_necessary_communication_between_future_spouse_and_the_other_parent","label":"Acceptance of necessary communication between future spouse and the other parent","type":"radio","value":"I only accept formal and highly limited communication regarding essential child matters."},{"key":"q11_short_children_guardianship_explanation","label":"Short Children/Guardianship Explanation","type":"textarea","value":"تانتلننتا"}],"current_step":2,"total_steps":2,"completion_percent":100,"updated_at":"2026-08-03T11:22:26.209700"}

16
src/app/api/proxy/route.ts

@ -1,4 +1,5 @@
import type { NextRequest } from "next/server";
import { isLocale } from "@/translations/config";
export const dynamic = "force-dynamic";
export const runtime = "nodejs";
@ -140,8 +141,21 @@ function getRequestHeaders(request: NextRequest, targetUrl: URL) {
headers.set("authorization", `Token ${authKey}`);
}
// Dynamically set language headers
let lang =
getCookieValue(cookieHeader, "HABIB_LANGUAGE") ??
getCookieValue(cookieHeader, "habib_language") ??
request.headers.get("x-user-language") ??
request.headers.get("accept-language")?.split(",")[0]?.split("-")[0];
if (!isLocale(lang)) {
lang = "fa";
}
headers.set("accept-encoding", "identity");
headers.set("http_x_user_language", "en");
headers.set("accept-language", lang);
headers.set("x-user-language", lang);
headers.set("http_x_user_language", lang);
headers.set("origin", targetUrl.origin);
headers.set("platform", "android");
headers.set("referer", `${targetUrl.origin}/`);

14
src/app/finding-match/page.tsx

@ -4,7 +4,7 @@ import Image from "next/image";
import Link from "next/link";
import { useRouter } from "next/navigation";
import { useEffect } from "react";
import { FaPen } from "react-icons/fa6";
import { FaLock, FaPen } from "react-icons/fa6";
import AdvisorActionsCard from "@/components/Componentes/advisor-actions-card";
import NavigationButton from "@/components/Componentes/navigation-button";
import { PageBackground } from "@/components/Componentes/page-background";
@ -86,8 +86,17 @@ export default function FindingMatchPage() {
getAdvisorHref="/questions-list"
/>
{profile?.can_edit_profile === false ? (
<div
className="inline-flex mt-3.5 w-full items-center justify-center gap-2 rounded-[9px] border-none bg-[#D1D1D6] dark:bg-[#3D3E42] px-4 py-[17px] text-center text-[#747474] dark:text-[#A1A1A1] shadow-none"
role="status"
>
<FaLock aria-hidden="true" className="h-3.5 w-3.5 shrink-0" />
<span className="group-16 leading-none font-semibold">{t.requestSent.profileLocked}</span>
</div>
) : (
<Link
className="inline-flex mt-3.5 w-full cursor-pointer items-center justify-center rounded-[9px] border-none bg-[#2B2C31] bg-none px-4 py-[17px] text-center text-white shadow-none transition-opacity"
className="inline-flex mt-3.5 w-full cursor-pointer items-center justify-center rounded-[9px] border-none bg-[#2B2C31] bg-none px-4 py-[17px] text-center text-white shadow-none transition-opacity hover:opacity-90"
href={localizePath("/questions-list", locale)}
>
<span className="flex min-w-0 items-center justify-center gap-2 text-center group-16 leading-none font-semibold">
@ -95,6 +104,7 @@ export default function FindingMatchPage() {
<span>{copy.editProfile}</span>
</span>
</Link>
)}
</main>
</>
);

28
src/app/page.tsx

@ -1 +1,27 @@
export { default } from "@/app/intro/page";
import { redirect } from "next/navigation";
import { cookies, headers } from "next/headers";
import { isLocale, defaultLocale } from "@/translations/config";
export const dynamic = "force-dynamic";
export default async function RootPage() {
const cookieStore = await cookies();
const habibLanguage = cookieStore.get("HABIB_LANGUAGE")?.value ?? cookieStore.get("habib_language")?.value;
let targetLocale = defaultLocale;
if (isLocale(habibLanguage)) {
targetLocale = habibLanguage;
} else {
const headersList = await headers();
const acceptLanguage = headersList.get("accept-language");
if (acceptLanguage) {
const preferredLanguage = acceptLanguage.split(",")[0].split("-")[0];
if (isLocale(preferredLanguage)) {
targetLocale = preferredLanguage;
}
}
}
redirect(`/${targetLocale}`);
}

70
src/app/questions-list/[slug]/question-detail-client.tsx

@ -2,6 +2,9 @@
import { useRouter } from "next/navigation";
import { useEffect, useMemo, useState } from "react";
import { DotsLoader } from "@/components/Componentes/button";
import NavigationButton from "@/components/Componentes/navigation-button";
import { PageBackground } from "@/components/Componentes/page-background";
import {
hasQuestionAnswerValue,
QuestionAnswersProvider,
@ -10,14 +13,11 @@ import {
import QuestionExitNavigationButton from "@/components/Componentes/question-exit-navigation-button";
import QuestionRenderer from "@/components/Componentes/question-renderer";
import QuestionSectionFlow from "@/components/Componentes/question-section-flow";
import StickyHeader from "@/components/Componentes/sticky-header";
import TestIntroPage from "@/components/Componentes/test-intro-page";
import TestQuestionsFlow, {
type TestQuestion,
} from "@/components/Componentes/test-questions-flow";
import { DotsLoader } from "@/components/Componentes/button";
import NavigationButton from "@/components/Componentes/navigation-button";
import StickyHeader from "@/components/Componentes/sticky-header";
import { PageBackground } from "@/components/Componentes/page-background";
import { cattellFallbackQuestions } from "@/data/cattell-fallback";
import { glasserFallbackQuestions } from "@/data/glasser-fallback";
import {
@ -189,6 +189,24 @@ function QuestionFlowWrapper({
}
}
// Find Parents' Survival Status question index and check selected index
const survivalStatusQuestionIndex = visibleQuestions.findIndex((q) => {
return (
q.title === "Parents' Survival Status" ||
q.title === "وضعیت حیات والدین"
);
});
let survivalSelectedOptionIndex = -1;
if (survivalStatusQuestionIndex !== -1) {
const survivalQuestion = visibleQuestions[survivalStatusQuestionIndex];
const ans = getAnswerValue(survivalQuestion, survivalStatusQuestionIndex);
if (ans) {
survivalSelectedOptionIndex =
survivalQuestion.extras.options?.indexOf(String(ans)) ?? -1;
}
}
// Find Parents' Marital Status question index and check selected index
const maritalStatusQuestionIndex = visibleQuestions.findIndex((q) => {
return (
@ -351,6 +369,17 @@ function QuestionFlowWrapper({
}
}
// Check Parents' Survival Status to decide if Parents' Marital Status is visible
if (survivalStatusQuestionIndex !== -1) {
const isParentsMaritalStatus =
question.title === "Parents' Marital Status" ||
question.title === "وضعیت تأهل والدین";
if (isParentsMaritalStatus) {
return survivalSelectedOptionIndex === 0;
}
}
// Default dependsOn logic
if (question.logic?.dependsOn) {
const { title, values } = question.logic.dependsOn;
@ -364,6 +393,9 @@ function QuestionFlowWrapper({
dependentQuestion,
dependentQuestionIndex,
);
if (Array.isArray(answer)) {
return answer.some((ans) => values.includes(String(ans)));
}
return values.includes(String(answer));
}
return false;
@ -388,7 +420,25 @@ function QuestionFlowWrapper({
question.title === "Number of Children" ||
question.title === "تعداد فرزندان" ||
question.title === "Short Children/Guardianship Explanation" ||
question.title === "توضیح کوتاه درباره شرایط فرزند یا تکفل"
question.title === "توضیح کوتاه درباره شرایط فرزند یا تکفل" ||
question.title === "Additional details about family responsibility" ||
question.title === "توضیحات تکمیلی درباره مسئولیت خانوادگی" ||
question.title === "Do the supported individual(s) live with you?" ||
question.title === "آیا فرد یا افراد تحت حمایت با شما زندگی میکنند؟" ||
question.title === "What is the custody status of your child(ren)?" ||
question.title === "وضعیت حضانت فرزند یا فرزندان شما چگونه است؟" ||
question.title ===
"Does the custody, visitation, or relocation schedule impact your residence or immigration?" ||
question.title ===
"آیا برنامه حضانت، ملاقات یا جابهجایی فرزند بر محل زندگی یا امکان مهاجرت شما تأثیر میگذارد؟" ||
question.title ===
"What is the payment or receipt status of child support?" ||
question.title ===
"وضعیت پرداخت یا دریافت نفقه و حمایت مالی فرزند چگونه است؟" ||
question.title ===
"Acceptance of necessary communication between future spouse and the other parent" ||
question.title === "پذیرش ارتباط ضروری همسر آینده با والد دیگرِ فرزند" ||
question.title === "پذیرش ارتباط ضروری همسر آینده با والد دیگر فرزند"
) {
return {
...question,
@ -416,7 +466,13 @@ function QuestionFlowWrapper({
questions={dynamicQuestions}
>
{dynamicQuestions.map((question, index) => {
const originalIndex = visibleQuestions.indexOf(question);
let originalIndex = visibleQuestions.indexOf(question);
if (originalIndex === -1) {
// Spread-copied questions lose reference equality; fall back to title
originalIndex = visibleQuestions.findIndex(
(q) => q.title === question.title,
);
}
const answer = getAnswerValue(question, originalIndex);
const hasAnswer = hasQuestionAnswerValue(answer ?? null);
let isAnswered = hasAnswer;
@ -433,6 +489,8 @@ function QuestionFlowWrapper({
const parts = strVal.split(",").map((p) => p.trim());
isAnswered =
parts.length >= 2 && parts[0].length > 0 && parts[1].length > 0;
} else if (question.type === "checkbox") {
isAnswered = Array.isArray(answer) ? answer.length > 0 : hasAnswer;
}
}

95
src/app/questions-list/page.tsx

@ -2,8 +2,9 @@
import Image from "next/image";
import { useRouter } from "next/navigation";
import { useMemo, useState } from "react";
import { useEffect, useMemo, useState } from "react";
import { IoClose } from "react-icons/io5";
import { getSubmitPath } from "@/lib/get-submit-path";
import {
getLocalSectionProgress,
getStoredAge,
@ -14,12 +15,14 @@ import Button from "@/components/Componentes/button";
import InformationSheet from "@/components/Componentes/information-sheet";
import NavigationButton from "@/components/Componentes/navigation-button";
import { PageBackground } from "@/components/Componentes/page-background";
import ErrorToast from "@/components/Componentes/error-toast";
import {
getQuestionListItems,
isQuestionListItemVisibleForProfile,
type QuestionListItem,
} from "@/data/question-data";
import { toFrontendSlug } from "@/data/section-slug-map";
import { useQueryClient } from "@tanstack/react-query";
import { useStartMarriageMatchMutation } from "@/hooks/marriage/use-match-start";
import { useMarriageProfileQuery } from "@/hooks/marriage/use-profile-main";
import { useMarriageSectionsQuery } from "@/hooks/marriage/use-sections";
@ -36,10 +39,13 @@ export default function QuestionsListPage() {
useCloseServiceOnBack();
const { dictionary: t, locale } = useI18n();
const router = useRouter();
const queryClient = useQueryClient();
const { data: profile } = useMarriageProfileQuery();
const { data: sections } = useMarriageSectionsQuery({
refetchOnMount: "always",
});
const startMatchMutation = useStartMarriageMatchMutation({
onSuccess: () => {
markMatchStarted();
@ -128,10 +134,29 @@ export default function QuestionsListPage() {
const profileStatus = profile?.status;
const isProfileSuspended = profileStatus === "suspended";
const isProfileBlocked =
profileStatus === "in_case" || profileStatus === "matched";
profileStatus === "in_case" ||
profileStatus === "matched";
const canStartMatch =
!isProfileSuspended && !isProfileBlocked && allRequiredSectionsCompleted;
const isStartMatchDisabled = startMatchMutation.isPending || !canStartMatch;
const [isSyncError, setIsSyncError] = useState(false);
const [isSyncing, setIsSyncing] = useState(false);
const [toastMessage, setToastMessage] = useState<string | null>(null);
useEffect(() => {
if (startMatchMutation.isError || isSyncError) {
setToastMessage(t.questions.startMatchFailed);
}
}, [startMatchMutation.isError, isSyncError, t.questions.startMatchFailed]);
const handleCloseToast = () => {
setToastMessage(null);
setIsSyncError(false);
startMatchMutation.reset();
};
const isStartMatchDisabled =
startMatchMutation.isPending || isSyncing || !canStartMatch;
const hasIncompleteOptionalSections = useMemo(() => {
return questionListItems.some(
(item) =>
@ -139,16 +164,66 @@ export default function QuestionsListPage() {
);
}, [questionListItems, sectionProgressBySlug]);
const handleStartMatch = () => {
if (isStartMatchDisabled) {
const handleStartMatch = async () => {
if (isStartMatchDisabled || isSyncing) {
return;
}
setIsSyncing(true);
setIsSyncError(false);
try {
const slugsToCheck = [
"personal_info",
"contact_residence_family_communication",
"appearance_health_activity",
"education_career_economic_status",
"family_marital_history",
"beliefs_lifestyle_boundaries",
"future_spouse_criteria",
"identity_verification",
];
for (const slug of slugsToCheck) {
const rawValue = window.localStorage.getItem(
`marriage:sections:${slug}:answers`,
);
if (rawValue) {
const storedValue = JSON.parse(rawValue);
if (storedValue.pending_sync && storedValue.fields) {
const payload = {
current_step: storedValue.current_step,
fields: storedValue.fields,
};
const { updateMarriageSectionData } = await import(
"@/hooks/marriage/use-section-data"
);
await updateMarriageSectionData(slug, payload);
storedValue.pending_sync = false;
window.localStorage.setItem(
`marriage:sections:${slug}:answers`,
JSON.stringify(storedValue),
);
}
}
}
await queryClient.invalidateQueries();
startMatchMutation.mutate();
} catch (err) {
console.error("Failed to sync pending sections:", err);
setIsSyncError(true);
} finally {
setIsSyncing(false);
}
};
return (
<>
{toastMessage && (
<ErrorToast message={toastMessage} onClose={handleCloseToast} />
)}
{isOptionalInfoSheetOpen ? (
<InformationSheet
icon="warning"
@ -261,18 +336,10 @@ export default function QuestionsListPage() {
style={{ paddingBottom: "calc(16px + var(--safe-bottom))" }}
className="fixed inset-x-0 bottom-0 z-20 mx-auto w-full max-w-[375px] bg-[#F5F5F5]/95 px-[17px] pt-3 backdrop-blur-md"
>
{startMatchMutation.isError ? (
<p
role="alert"
className="pb-2 text-center group-12 font-semibold text-[#D93025]"
>
{t.questions.startMatchFailed}
</p>
) : null}
<Button
aria-label={t.questions.findMatches}
disabled={isStartMatchDisabled}
isLoading={startMatchMutation.isPending}
isLoading={startMatchMutation.isPending || isSyncing}
onClick={() => {
if (hasIncompleteOptionalSections) {
setIsOptionalInfoSheetOpen(true);

58
src/components/Componentes/error-toast.tsx

@ -0,0 +1,58 @@
"use client";
import { useEffect, useState } from "react";
import { IoAlertCircle, IoClose } from "react-icons/io5";
type ErrorToastProps = {
message: string;
onClose: () => void;
duration?: number;
};
export default function ErrorToast({
message,
onClose,
duration = 4000,
}: ErrorToastProps) {
const [isVisible, setIsVisible] = useState(true);
useEffect(() => {
const timer = setTimeout(() => {
setIsVisible(false);
setTimeout(onClose, 300); // Wait for fade-out animation to complete
}, duration);
return () => clearTimeout(timer);
}, [duration, onClose]);
const handleClose = () => {
setIsVisible(false);
setTimeout(onClose, 300);
};
return (
<div
className={[
"fixed top-4 left-1/2 z-50 flex w-[calc(100%-34px)] max-w-[341px] -translate-x-1/2 items-center gap-3 rounded-xl border p-4 shadow-lg backdrop-blur-md transition-all duration-300",
isVisible
? "translate-y-0 opacity-100 scale-100"
: "-translate-y-4 opacity-0 scale-95",
"bg-red-50/95 dark:bg-red-950/95 text-red-800 dark:text-red-200 border-red-100/80 dark:border-red-900/50",
].join(" ")}
role="alert"
>
<IoAlertCircle className="size-5 shrink-0 text-red-500" />
<span className="flex-1 text-sm font-semibold leading-normal">
{message}
</span>
<button
type="button"
onClick={handleClose}
className="flex size-6 items-center justify-center rounded-lg text-red-500 hover:bg-red-100/50 dark:hover:bg-red-900/50 transition-colors"
aria-label="Close error toast"
>
<IoClose className="size-4" />
</button>
</div>
);
}

63
src/components/Componentes/progress-helper.ts

@ -1,6 +1,6 @@
import {
isQuestionVisibleForProfile,
isQuestionRequiredForProfile,
isQuestionVisibleForProfile,
type QuestionListItem,
} from "@/data/question-data";
import type {
@ -206,6 +206,28 @@ export function getLocalSectionProgress(
}
}
// Find Parents' Survival Status question index and check selected index
const survivalStatusQuestionIndex = profileVisible.findIndex((q) => {
return (
q.title === "Parents' Survival Status" ||
q.title === "وضعیت حیات والدین"
);
});
let survivalSelectedOptionIndex = -1;
if (survivalStatusQuestionIndex !== -1) {
const survivalQuestion = profileVisible[survivalStatusQuestionIndex];
const ans = findAnswer(
survivalQuestion.title,
survivalStatusQuestionIndex,
survivalQuestion.originalIndex,
);
if (ans) {
survivalSelectedOptionIndex =
survivalQuestion.extras?.options?.indexOf(String(ans)) ?? -1;
}
}
// Find Parents' Marital Status question index and check selected index
const maritalStatusQuestionIndex = profileVisible.findIndex((q) => {
return (
@ -380,6 +402,17 @@ export function getLocalSectionProgress(
}
}
// Check Parents' Survival Status to decide if Parents' Marital Status is visible
if (survivalStatusQuestionIndex !== -1) {
const isParentsMaritalStatus =
question.title === "Parents' Marital Status" ||
question.title === "وضعیت تأهل والدین";
if (isParentsMaritalStatus) {
return survivalSelectedOptionIndex === 0;
}
}
// Default dependsOn logic
if (question.logic?.dependsOn) {
const { title, values } = question.logic.dependsOn;
@ -394,6 +427,9 @@ export function getLocalSectionProgress(
dependentQuestionIndex,
dependentQuestion.originalIndex,
);
if (Array.isArray(answer)) {
return answer.some((ans) => values.includes(String(ans)));
}
return values.includes(String(answer));
}
return false;
@ -418,7 +454,25 @@ export function getLocalSectionProgress(
question.title === "Number of Children" ||
question.title === "تعداد فرزندان" ||
question.title === "Short Children/Guardianship Explanation" ||
question.title === "توضیح کوتاه درباره شرایط فرزند یا تکفل"
question.title === "توضیح کوتاه درباره شرایط فرزند یا تکفل" ||
question.title === "Additional details about family responsibility" ||
question.title === "توضیحات تکمیلی درباره مسئولیت خانوادگی" ||
question.title === "Do the supported individual(s) live with you?" ||
question.title === "آیا فرد یا افراد تحت حمایت با شما زندگی میکنند؟" ||
question.title === "What is the custody status of your child(ren)?" ||
question.title === "وضعیت حضانت فرزند یا فرزندان شما چگونه است؟" ||
question.title ===
"Does the custody, visitation, or relocation schedule impact your residence or immigration?" ||
question.title ===
"آیا برنامه حضانت، ملاقات یا جابهجایی فرزند بر محل زندگی یا امکان مهاجرت شما تأثیر میگذارد؟" ||
question.title ===
"What is the payment or receipt status of child support?" ||
question.title ===
"وضعیت پرداخت یا دریافت نفقه و حمایت مالی فرزند چگونه است؟" ||
question.title ===
"Acceptance of necessary communication between future spouse and the other parent" ||
question.title === "پذیرش ارتباط ضروری همسر آینده با والد دیگرِ فرزند" ||
question.title === "پذیرش ارتباط ضروری همسر آینده با والد دیگر فرزند"
) {
return {
...question,
@ -446,7 +500,10 @@ export function getLocalSectionProgress(
return Math.max(
0,
Math.min(100, Math.round((answeredCount / requiredQuestions.length) * 100)),
Math.min(
100,
Math.round((answeredCount / requiredQuestions.length) * 100),
),
);
} catch (_e) {
return null;

95
src/components/Componentes/question-answer-storage.tsx

@ -23,6 +23,9 @@ import {
useMarriageSectionDataQuery,
useUpdateMarriageSectionDataMutation,
} from "@/hooks/marriage/use-section-data";
import { useMarriageProfileQuery } from "@/hooks/marriage/use-profile-main";
import { useQueryClient } from "@tanstack/react-query";
import { marriageQueryKeys } from "@/hooks/marriage/query-keys";
import { getApiRequestUrl } from "@/lib/http";
const STORAGE_VERSION = 1;
@ -126,6 +129,7 @@ function isMarriageField(value: unknown): value is MarriageField {
typeof field.value === "string" ||
typeof field.value === "number" ||
typeof field.value === "boolean" ||
Array.isArray(field.value) ||
isMarriagePhoneFieldValue(field.value))
);
}
@ -288,12 +292,19 @@ function getKeepalivePatchUrl(slug: string) {
);
}
function getCsrfToken() {
if (typeof document === "undefined") return "";
const match = document.cookie.match(/(^|;)\s*csrftoken\s*=\s*([^;]+)/);
return match ? match[2] : "";
}
export function QuestionAnswersProvider({
children,
questions,
slug,
}: QuestionAnswersProviderProps) {
const storageKey = useMemo(() => getQuestionAnswersStorageKey(slug), [slug]);
const queryClient = useQueryClient();
const [answers, setAnswers] = useState<QuestionAnswersByKey>({});
const [hasPendingSync, setHasPendingSync] = useState(false);
const { isPending: isSaving, mutateAsync } =
@ -304,6 +315,9 @@ export function QuestionAnswersProvider({
const storageKeyRef = useRef(storageKey);
const slugRef = useRef(slug);
const { data: profile } = useMarriageProfileQuery();
const canEdit = profile?.can_edit_profile !== false;
const backendSlug = useMemo(() => toBackendSlug(slug), [slug]);
const { data: serverSectionData } = useMarriageSectionDataQuery(backendSlug);
@ -316,25 +330,35 @@ export function QuestionAnswersProvider({
slugRef.current = slug;
const stored = readStoredAnswers(storageKey, slug);
let finalAnswers = stored.answers;
let finalPendingSync = stored.pendingSync;
// If local storage has answers, we prefer them (especially if pending sync).
// If local storage is empty, we check if the server has answers and seed local storage.
if (Object.keys(stored.answers).length === 0 && serverSectionData?.data) {
if (serverSectionData?.data) {
const serverAnswers = fieldsToAnswers(serverSectionData.data);
answersRef.current = serverAnswers;
hasPendingSyncRef.current = false;
setAnswers(serverAnswers);
setHasPendingSync(false);
// Seed localStorage with the fetched answers
writeStoredAnswers(storageKey, slug, questions, serverAnswers, false);
if (stored.pendingSync && canEdit) {
// Merge: local answers override server answers for unsynced changes
finalAnswers = { ...serverAnswers, ...stored.answers };
} else {
answersRef.current = stored.answers;
hasPendingSyncRef.current = stored.pendingSync;
setAnswers(stored.answers);
setHasPendingSync(stored.pendingSync);
// No pending changes locally or profile is locked, use server answers directly
finalAnswers = serverAnswers;
finalPendingSync = false;
}
}, [slug, storageKey, serverSectionData, questions]);
}
answersRef.current = finalAnswers;
hasPendingSyncRef.current = finalPendingSync;
setAnswers(finalAnswers);
setHasPendingSync(finalPendingSync);
// Update localStorage to stay in sync
writeStoredAnswers(
storageKey,
slug,
questions,
finalAnswers,
finalPendingSync,
);
}, [slug, storageKey, serverSectionData, questions, canEdit]);
const getAnswerValue = useCallback(
(question: QuestionField, questionIndex: number) =>
@ -348,6 +372,9 @@ export function QuestionAnswersProvider({
questionIndex: number,
value: MarriageFieldValue,
) => {
if (!canEdit) {
return;
}
const field = createQuestionField(question, questionIndex, value);
setAnswers((currentAnswers) => {
@ -375,11 +402,14 @@ export function QuestionAnswersProvider({
});
setHasPendingSync(true);
},
[],
[canEdit],
);
const flushAnswers = useCallback(
async (options?: FlushAnswersOptions) => {
if (!canEdit) {
return;
}
if (!hasPendingSyncRef.current && !options?.force) {
return;
}
@ -402,7 +432,7 @@ export function QuestionAnswersProvider({
false,
);
},
[mutateAsync],
[mutateAsync, canEdit],
);
const flushAnswersRef = useRef(flushAnswers);
@ -412,6 +442,9 @@ export function QuestionAnswersProvider({
useEffect(() => {
const flushWithKeepalive = () => {
if (!canEdit) {
return;
}
if (!hasPendingSyncRef.current) {
return;
}
@ -422,13 +455,19 @@ export function QuestionAnswersProvider({
return;
}
const headers: Record<string, string> = {
Accept: "application/json",
"Content-Type": "application/json",
};
const csrfToken = getCsrfToken();
if (csrfToken) {
headers["X-CSRFToken"] = csrfToken;
}
fetch(getKeepalivePatchUrl(slugRef.current), {
body: JSON.stringify(payload),
credentials: "include",
headers: {
Accept: "application/json",
"Content-Type": "application/json",
},
headers,
keepalive: true,
method: "PATCH",
})
@ -445,6 +484,16 @@ export function QuestionAnswersProvider({
answersRef.current,
false,
);
void queryClient.invalidateQueries({
queryKey: marriageQueryKeys.profile(),
});
void queryClient.invalidateQueries({
queryKey: marriageQueryKeys.sections(),
});
void queryClient.invalidateQueries({
queryKey: marriageQueryKeys.sectionData(slugRef.current),
});
})
.catch(() => {
// The local draft stays marked pending so a later exit can retry.
@ -455,9 +504,9 @@ export function QuestionAnswersProvider({
return () => {
window.removeEventListener("pagehide", flushWithKeepalive);
void flushAnswersRef.current();
flushWithKeepalive();
};
}, []);
}, [canEdit]);
const contextValue = useMemo<QuestionAnswersContextValue>(
() => ({

4
src/components/Componentes/question-checkbox.tsx

@ -42,7 +42,9 @@ export function QuestionCheckbox({
o.includes("مهم نیست") ||
o.includes("Doesn't matter") ||
o.includes("No children") ||
o.includes("فرزندی ندارم."),
o.includes("فرزندی ندارم.") ||
o.includes("مسئولیت مستمری ندارم") ||
o.includes("do not have any ongoing responsibility"),
);
if (exclusiveOption) {
if (option === exclusiveOption) {

9
src/components/Componentes/question-title.tsx

@ -77,7 +77,14 @@ export function QuestionTitle({ question, className }: QuestionTitleProps) {
<HelpModal
isOpen={isHelpOpen}
onClose={() => setIsHelpOpen(false)}
description={question.tooltip}
description={
(
t.questions as unknown as Record<
string,
string | undefined
>
)[question.tooltip] || question.tooltip
}
/>
</>
) : null}

4
src/data/question-data.ts

@ -147,6 +147,8 @@ export function getQuestionListItems(locale: Locale = defaultLocale) {
originalIndex: idx,
}));
const finalQuestions = [...fbQuestions, ...mhQuestions];
const mergedItem: QuestionListItem = {
slug: "family_marital_history",
title: mergedTitle,
@ -158,7 +160,7 @@ export function getQuestionListItems(locale: Locale = defaultLocale) {
summary: `${fbItem.summary}\n\n${mhItem.summary}`,
checkpoints: [...fbItem.checkpoints, ...mhItem.checkpoints],
tooltip: fbItem.tooltip || mhItem.tooltip,
questions: [...fbQuestions, ...mhQuestions],
questions: finalQuestions,
};
const newItems = [...items];

210
src/data/questions/en.json

@ -108,7 +108,6 @@
"options": []
}
},
{
"title": "Mother Tongue",
"type": "dropdown",
@ -218,7 +217,6 @@
]
}
},
{
"title": "Residence Status",
"type": "dropdown",
@ -677,15 +675,68 @@
"private": true
},
{
"title": "Short Family Description",
"title": "Do you currently have an ongoing financial, caregiving, or guardianship responsibility for a family member?",
"type": "checkbox",
"required": true,
"extras": {
"placeHolder": "Select option(s)",
"range": [0, 0],
"options": [
"No, I do not have any ongoing responsibility.",
"I am responsible for caring for my parent(s) (father, mother, or both).",
"I am responsible for the care, custody, or guardianship of other family members (sibling, etc.).",
"I regularly provide financial support for a family member's living expenses."
]
},
"private": true
},
{
"title": "Do the supported individual(s) live with you?",
"type": "radio",
"required": true,
"extras": {
"placeHolder": "Select one option",
"range": [0, 0],
"options": [
"Yes, they live with me permanently.",
"Yes, they live with me temporarily or periodically.",
"No, but they reside near my place of living.",
"No, they live in another city or country."
]
},
"private": true,
"logic": {
"dependsOn": {
"title": "Do you currently have an ongoing financial, caregiving, or guardianship responsibility for a family member?",
"values": [
"I am responsible for caring for my parent(s) (father, mother, or both).",
"I am responsible for the care, custody, or guardianship of other family members (sibling, etc.).",
"I regularly provide financial support for a family member's living expenses."
]
}
}
},
{
"title": "Additional details about family responsibility",
"type": "textarea",
"required": false,
"required": true,
"extras": {
"placeHolder": "Enter details here...",
"range": [0, 0],
"options": []
},
"tooltip": "Write any important point that was not covered in the options above here."
"private": true,
"tooltip": "familyResponsibilityTooltip",
"logic": {
"dependsOn": {
"title": "Do you currently have an ongoing financial, caregiving, or guardianship responsibility for a family member?",
"values": [
"I am responsible for caring for my parent(s) (father, mother, or both).",
"I am responsible for the care, custody, or guardianship of other family members (sibling, etc.).",
"I regularly provide financial support for a family member's living expenses."
]
}
}
},
{
"title": "Family's Religious and Ideological Atmosphere",
@ -713,6 +764,17 @@
"range": [0, 0],
"options": ["Weak", "Average", "Good", "Prosperous"]
}
},
{
"title": "Short Family Description",
"type": "textarea",
"required": true,
"extras": {
"placeHolder": "Enter details here...",
"range": [0, 0],
"options": []
},
"tooltip": "Write any important point that was not covered in the options above here."
}
]
},
@ -739,7 +801,8 @@
"Widowed"
]
},
"private": true
"private": true,
"tooltip": "currentMaritalStatusTooltip"
},
{
"title": "Previous Marriage Duration",
@ -784,7 +847,7 @@
},
{
"title": "Children and Guardianship Status",
"type": "checkbox",
"type": "radio",
"required": true,
"extras": {
"placeHolder": "Select one option",
@ -815,9 +878,136 @@
},
"private": true
},
{
"title": "What is the custody status of your child(ren)?",
"type": "radio",
"required": true,
"extras": {
"placeHolder": "Select one option",
"range": [0, 0],
"options": [
"I have full custody of the child(ren).",
"Joint custody or periodic visitation/relocation between parents.",
"Custody is with the other parent or another person.",
"Children have reached legal age (custody is not applicable).",
"Other circumstances (dispute, pending, or other)."
]
},
"private": true,
"logic": {
"dependsOn": {
"title": "Children and Guardianship Status",
"values": [
"Have children living with me",
"Have children not living with me"
]
}
}
},
{
"title": "How much time do the child(ren) usually live with you?",
"type": "radio",
"required": false,
"extras": {
"placeHolder": "Select one option",
"range": [0, 0],
"options": [
"Permanently or most days of the week with me.",
"Approximately half the time (joint custody/schedule).",
"Weekends, holidays, or specific days only.",
"They do not live with me, or there is no fixed schedule."
]
},
"private": true,
"logic": {
"dependsOn": {
"title": "Children and Guardianship Status",
"values": [
"Have children living with me",
"Have children not living with me"
]
}
}
},
{
"title": "Does the custody, visitation, or relocation schedule impact your residence or immigration?",
"type": "radio",
"required": true,
"extras": {
"placeHolder": "Select one option",
"range": [0, 0],
"options": [
"No, it has no significant impact on residence or relocation.",
"Yes, relocation or immigration requires coordination, agreement, or a legal permit.",
"Yes, I am restricted and must reside in the same city or region.",
"Unclear (pending dispute/agreement or depends on conditions)."
]
},
"private": true,
"logic": {
"dependsOn": {
"title": "Children and Guardianship Status",
"values": [
"Have children living with me",
"Have children not living with me"
]
}
}
},
{
"title": "What is the payment or receipt status of child support?",
"type": "radio",
"required": true,
"extras": {
"placeHolder": "Select one option",
"range": [0, 0],
"options": [
"Ongoing financial commitment (paying child support or sharing expenses).",
"Receiving child support regularly.",
"Payments are case-by-case, agreed, or irregular.",
"No formal child support commitment (or child is independent / pending)."
]
},
"private": true,
"logic": {
"dependsOn": {
"title": "Children and Guardianship Status",
"values": [
"Have children living with me",
"Have children not living with me"
]
}
}
},
{
"title": "Acceptance of necessary communication between future spouse and the other parent",
"type": "radio",
"required": true,
"extras": {
"placeHolder": "Select one option",
"range": [0, 0],
"options": [
"I accept necessary, respectful, and limited communication regarding child matters.",
"I only accept formal and highly limited communication regarding essential child matters.",
"I prefer communication to go through an intermediary, a family member, or a lawyer as much as possible.",
"Any ongoing communication beyond essential child matters with the other parent is a red line for me.",
"Acceptance depends on the type and extent of communication, custody conditions, and mutual trust."
]
},
"private": true,
"logic": {
"dependsOn": {
"title": "Children and Guardianship Status",
"values": [
"Have children living with me",
"Have children not living with me"
]
}
}
},
{
"title": "Short Children/Guardianship Explanation",
"type": "text",
"type": "textarea",
"required": false,
"extras": {
"placeHolder": "Enter details here...",
@ -1415,9 +1605,7 @@
"type": "dropdown",
"required": true,
"audience": {
"genders": [
"female"
]
"genders": ["female"]
},
"extras": {
"placeHolder": "Select one option",

210
src/data/questions/fa.json

@ -108,7 +108,6 @@
"options": []
}
},
{
"title": "زبان مادری",
"type": "dropdown",
@ -218,7 +217,6 @@
]
}
},
{
"title": "وضعیت اقامت در کشور فعلی",
"type": "dropdown",
@ -677,15 +675,68 @@
"private": true
},
{
"title": "توضیح کوتاه درباره خانواده",
"title": "آیا در حال حاضر مسئولیت مستمر مالی، مراقبتی یا سرپرستی یکی از اعضای خانواده را بر عهده دارید؟",
"type": "checkbox",
"required": true,
"extras": {
"placeHolder": "انتخاب گزینه‌ها",
"range": [0, 0],
"options": [
"خیر، مسئولیت مستمری ندارم.",
"مسئولیت مراقبت از والدین (پدر، مادر یا هر دو) را بر عهده دارم.",
"مسئولیت مراقبت، سرپرستی یا قیمومیت سایر اعضای خانواده (خواهر، برادر و...) را بر عهده دارم.",
"بهصورت منظم بخشی از هزینههای زندگی یا حمایت مالی یکی از اعضای خانواده را تأمین میکنم."
]
},
"private": true
},
{
"title": "آیا فرد یا افراد تحت حمایت با شما زندگی میکنند؟",
"type": "radio",
"required": true,
"extras": {
"placeHolder": "یک گزینه را انتخاب کنید",
"range": [0, 0],
"options": [
"بله، بهصورت دائم با من زندگی میکنند.",
"بله، بهصورت موقت یا دورهای با من زندگی میکنند.",
"خیر، اما در نزدیکی محل زندگی من سکونت دارند.",
"خیر، در شهر یا کشور دیگری زندگی میکنند."
]
},
"private": true,
"logic": {
"dependsOn": {
"title": "آیا در حال حاضر مسئولیت مستمر مالی، مراقبتی یا سرپرستی یکی از اعضای خانواده را بر عهده دارید؟",
"values": [
"مسئولیت مراقبت از والدین (پدر، مادر یا هر دو) را بر عهده دارم.",
"مسئولیت مراقبت، سرپرستی یا قیمومیت سایر اعضای خانواده (خواهر، برادر و...) را بر عهده دارم.",
"بهصورت منظم بخشی از هزینههای زندگی یا حمایت مالی یکی از اعضای خانواده را تأمین میکنم."
]
}
}
},
{
"title": "توضیحات تکمیلی درباره مسئولیت خانوادگی",
"type": "textarea",
"required": false,
"required": true,
"extras": {
"placeHolder": "توضیحات خود را اینجا وارد کنید...",
"range": [0, 0],
"options": []
},
"tooltip": "هر نکته مهمی که در گزینه‌های بالا نبود، اینجا بنویسید."
"private": true,
"tooltip": "familyResponsibilityTooltip",
"logic": {
"dependsOn": {
"title": "آیا در حال حاضر مسئولیت مستمر مالی، مراقبتی یا سرپرستی یکی از اعضای خانواده را بر عهده دارید؟",
"values": [
"مسئولیت مراقبت از والدین (پدر، مادر یا هر دو) را بر عهده دارم.",
"مسئولیت مراقبت، سرپرستی یا قیمومیت سایر اعضای خانواده (خواهر، برادر و...) را بر عهده دارم.",
"بهصورت منظم بخشی از هزینههای زندگی یا حمایت مالی یکی از اعضای خانواده را تأمین میکنم."
]
}
}
},
{
"title": "فضای مذهبی و اعتقادی خانواده",
@ -713,6 +764,17 @@
"range": [0, 0],
"options": ["ضعیف", "متوسط", "خوب", "مرفه"]
}
},
{
"title": "توضیح کوتاه درباره خانواده",
"type": "textarea",
"required": false,
"extras": {
"placeHolder": "توضیحات خود را اینجا وارد کنید...",
"range": [0, 0],
"options": []
},
"tooltip": "هر نکته مهمی که در گزینه‌های بالا نبود، اینجا بنویسید."
}
]
},
@ -739,7 +801,8 @@
"همسر فوت شده"
]
},
"private": true
"private": true,
"tooltip": "currentMaritalStatusTooltip"
},
{
"title": "مدت ازدواج یا عقد قبلی",
@ -784,7 +847,7 @@
},
{
"title": "وضعیت فرزند و تکفل",
"type": "checkbox",
"type": "radio",
"required": true,
"extras": {
"placeHolder": "یک گزینه را انتخاب کنید",
@ -815,9 +878,136 @@
},
"private": true
},
{
"title": "وضعیت حضانت فرزند یا فرزندان شما چگونه است؟",
"type": "radio",
"required": true,
"extras": {
"placeHolder": "یک گزینه را انتخاب کنید",
"range": [0, 0],
"options": [
"حضانت کامل فرزند یا فرزندان با من است.",
"حضانت به صورت مشترک یا رفت‌وآمد دوره‌ای انجام می‌شود.",
"حضانت با والد دیگر یا شخص دیگری است.",
"فرزندان به سن قانونی رسیده‌اند و حضانت مطرح نیست.",
"شرایط دیگر (در حال بررسی، اختلاف یا موارد دیگر)."
]
},
"private": true,
"logic": {
"dependsOn": {
"title": "وضعیت فرزند و تکفل",
"values": [
"فرزند دارم و با من زندگی می‌کند.",
"فرزند دارم اما با من زندگی نمی‌کند."
]
}
}
},
{
"title": "فرزند یا فرزندان معمولاً چه میزان با شما زندگی میکنند؟",
"type": "radio",
"required": false,
"extras": {
"placeHolder": "یک گزینه را انتخاب کنید",
"range": [0, 0],
"options": [
"به‌صورت تمام‌وقت یا بیشتر روزهای هفته با من زندگی می‌کنند.",
"تقریباً نیمی از زمان (به‌صورت مشترک) با من زندگی می‌کنند.",
"فقط آخر هفته‌ها، تعطیلات یا روزهای خاص با من زندگی می‌کنند.",
"با من زندگی نمی‌کنند یا برنامه ثابتی وجود ندارد."
]
},
"private": true,
"logic": {
"dependsOn": {
"title": "وضعیت فرزند و تکفل",
"values": [
"فرزند دارم و با من زندگی می‌کند.",
"فرزند دارم اما با من زندگی نمی‌کند."
]
}
}
},
{
"title": "آیا برنامه حضانت، ملاقات یا جابهجایی فرزند بر محل زندگی یا امکان مهاجرت شما تأثیر میگذارد؟",
"type": "radio",
"required": true,
"extras": {
"placeHolder": "یک گزینه را انتخاب کنید",
"range": [0, 0],
"options": [
"خیر، تأثیر قابل‌توجهی بر محل زندگی یا مهاجرت ندارد.",
"بله، جابه‌جایی یا مهاجرت نیازمند هماهنگی، رضایت والد دیگر یا مجوز قانونی است.",
"بله، محدودیت جدی دارد و باید در همین شهر/منطقه بمانم.",
"نامشخص (در حال بررسی یا بستگی به شرایط آینده دارد)."
]
},
"private": true,
"logic": {
"dependsOn": {
"title": "وضعیت فرزند و تکفل",
"values": [
"فرزند دارم و با من زندگی می‌کند.",
"فرزند دارم اما با من زندگی نمی‌کند."
]
}
}
},
{
"title": "وضعیت پرداخت یا دریافت نفقه و حمایت مالی فرزند چگونه است؟",
"type": "radio",
"required": true,
"extras": {
"placeHolder": "یک گزینه را انتخاب کنید",
"range": [0, 0],
"options": [
"تعهد مالی مستمر دارم (پرداخت منظم نفقه یا تقسیم هزینه‌ها).",
"حمایت مالی مستمر دریافت می‌کنم (دریافت منظم نفقه).",
"پرداخت‌ها به‌صورت موردی، توافقی یا غیرمنظم انجام می‌شود.",
"تعهد مالی یا نفقه رسمی وجود ندارد (یا فرزند مستقل است/پرونده در جریان است)."
]
},
"private": true,
"logic": {
"dependsOn": {
"title": "وضعیت فرزند و تکفل",
"values": [
"فرزند دارم و با من زندگی می‌کند.",
"فرزند دارم اما با من زندگی نمی‌کند."
]
}
}
},
{
"title": "پذیرش ارتباط ضروری همسر آینده با والد دیگرِ فرزند",
"type": "radio",
"required": true,
"extras": {
"placeHolder": "یک گزینه را انتخاب کنید",
"range": [0, 0],
"options": [
"ارتباط ضروری، محترمانه و محدود به امور فرزند را میپذیرم.",
"فقط ارتباط رسمی و محدود درباره امور ضروری فرزند را میپذیرم.",
"ترجیح میدهم ارتباط تا حد امکان از طریق واسطه، یکی از اعضای خانواده یا وکیل انجام شود.",
"وجود ارتباط مستمر و فراتر از امور ضروری فرزند برایم خط قرمز است.",
"پذیرش این موضوع به نوع و میزان ارتباط، شرایط حضانت و اعتماد متقابل بستگی دارد."
]
},
"private": true,
"logic": {
"dependsOn": {
"title": "وضعیت فرزند و تکفل",
"values": [
"فرزند دارم و با من زندگی می‌کند.",
"فرزند دارم اما با من زندگی نمی‌کند."
]
}
}
},
{
"title": "توضیح کوتاه درباره شرایط فرزند یا تکفل",
"type": "text",
"type": "textarea",
"required": false,
"extras": {
"placeHolder": "توضیحات را اینجا وارد کنید...",
@ -1415,9 +1605,7 @@
"type": "dropdown",
"required": true,
"audience": {
"genders": [
"female"
]
"genders": ["female"]
},
"extras": {
"placeHolder": "یک گزینه را انتخاب کنید",

3
src/data/section-slug-map.ts

@ -32,6 +32,9 @@ export const FRONTEND_TO_BACKEND_SLUG_MAP: Record<string, string> =
* the API expects. Falls back to the original slug when no mapping exists.
*/
export function toBackendSlug(frontendSlug: string): string {
if (frontendSlug === "marital_history_children") {
return "marital_history";
}
return FRONTEND_TO_BACKEND_SLUG_MAP[frontendSlug] ?? frontendSlug;
}

57
src/hooks/marriage/use-section-data.ts

@ -47,8 +47,7 @@ function hasQuestionAnswerValue(value: unknown) {
export async function getMarriageSectionData(
slug: string,
): Promise<MarriageSectionData> {
const backendSlug = toBackendSlug(slug);
if (backendSlug === "family_marital_history") {
if (slug === "family_marital_history") {
const [fbData, mhData] = await Promise.all([
getMarriageSectionData("family_background"),
getMarriageSectionData("marital_history_children"),
@ -68,6 +67,7 @@ export async function getMarriageSectionData(
};
}
const backendSlug = toBackendSlug(slug);
const { data } = await http.get<MarriageSectionData>(
`/api/marriage/sections/${pathParam(backendSlug)}/data/`,
);
@ -79,26 +79,38 @@ export async function updateMarriageSectionData(
slug: string,
payload: UpdateMarriageSectionDataPayload,
) {
const backendSlug = toBackendSlug(slug);
if (backendSlug === "family_marital_history") {
const fbQuestionsEn =
getQuestionListItemBySlug("family_background", "en")?.questions || [];
const mhQuestionsEn =
getQuestionListItemBySlug("marital_history_children", "en")?.questions ||
[];
const fbQuestionsFa =
getQuestionListItemBySlug("family_background", "fa")?.questions || [];
const mhQuestionsFa =
getQuestionListItemBySlug("marital_history_children", "fa")?.questions ||
[];
if (slug === "family_marital_history") {
const mergedItemEn = getQuestionListItemBySlug("family_marital_history", "en");
const mergedItemFa = getQuestionListItemBySlug("family_marital_history", "fa");
const fbQuestionsEn = mergedItemEn?.questions.filter(
(q) => q.originalSlug === "family_background",
) || [];
const mhQuestionsEn = mergedItemEn?.questions.filter(
(q) => q.originalSlug === "marital_history_children",
) || [];
const fbQuestionsFa = mergedItemFa?.questions.filter(
(q) => q.originalSlug === "family_background",
) || [];
const mhQuestionsFa = mergedItemFa?.questions.filter(
(q) => q.originalSlug === "marital_history_children",
) || [];
const fbKeys = new Set([
...fbQuestionsEn.map((q, idx) => getQuestionFieldKey(q.title, idx)),
...fbQuestionsFa.map((q, idx) => getQuestionFieldKey(q.title, idx)),
...fbQuestionsEn.map((q, idx) =>
getQuestionFieldKey(q.title, q.originalIndex ?? idx),
),
...fbQuestionsFa.map((q, idx) =>
getQuestionFieldKey(q.title, q.originalIndex ?? idx),
),
]);
const mhKeys = new Set([
...mhQuestionsEn.map((q, idx) => getQuestionFieldKey(q.title, idx)),
...mhQuestionsFa.map((q, idx) => getQuestionFieldKey(q.title, idx)),
...mhQuestionsEn.map((q, idx) =>
getQuestionFieldKey(q.title, q.originalIndex ?? idx),
),
...mhQuestionsFa.map((q, idx) =>
getQuestionFieldKey(q.title, q.originalIndex ?? idx),
),
]);
const fbFields = payload.fields.filter((f) => fbKeys.has(f.key));
@ -116,10 +128,10 @@ export async function updateMarriageSectionData(
const fbCurrentStep = fbQuestionsEn.filter((q, idx) => {
if (!q.required || q.logic?.dependsOn) return false;
const keyEn = getQuestionFieldKey(q.title, idx);
const keyEn = getQuestionFieldKey(q.title, q.originalIndex ?? idx);
const keyFa = getQuestionFieldKey(
fbQuestionsFa[idx]?.title || q.title,
idx,
fbQuestionsFa[idx]?.originalIndex ?? q.originalIndex ?? idx,
);
const field = fbFields.find((f) => f.key === keyEn || f.key === keyFa);
return field && hasQuestionAnswerValue(field.value);
@ -127,10 +139,10 @@ export async function updateMarriageSectionData(
const mhCurrentStep = mhQuestionsEn.filter((q, idx) => {
if (!q.required || q.logic?.dependsOn) return false;
const keyEn = getQuestionFieldKey(q.title, idx);
const keyEn = getQuestionFieldKey(q.title, q.originalIndex ?? idx);
const keyFa = getQuestionFieldKey(
mhQuestionsFa[idx]?.title || q.title,
idx,
mhQuestionsFa[idx]?.originalIndex ?? q.originalIndex ?? idx,
);
const field = mhFields.find((f) => f.key === keyEn || f.key === keyFa);
return field && hasQuestionAnswerValue(field.value);
@ -170,6 +182,7 @@ export async function updateMarriageSectionData(
};
}
const backendSlug = toBackendSlug(slug);
const { data } = await http.patch<MarriageSectionData>(
`/api/marriage/sections/${pathParam(backendSlug)}/data/`,
payload,

15
src/lib/http.ts

@ -1,6 +1,7 @@
import axios, { type InternalAxiosRequestConfig } from "axios";
import { authBridge } from "./auth-bridge";
import { getClientCookie } from "./cookies";
import { isLocale } from "../translations/config";
const PROXY_PATH_PARAM = "__proxyPath";
const LOCALHOST_HOSTNAMES = new Set(["localhost", "127.0.0.1", "::1"]);
@ -95,6 +96,20 @@ http.interceptors.request.use((config) => {
config.headers.Authorization = `Token ${token}`;
}
let lang: string | undefined = (getClientCookie("HABIB_LANGUAGE") ?? getClientCookie("habib_language")) ?? undefined;
if (!isLocale(lang)) {
const pathSegment = typeof window !== "undefined" ? window.location.pathname.split("/")[1] : undefined;
if (isLocale(pathSegment)) {
lang = pathSegment;
} else {
const docLang = typeof document !== "undefined" ? document.documentElement.lang : undefined;
lang = isLocale(docLang) ? docLang : "fa";
}
}
config.headers["Accept-Language"] = lang;
config.headers["X-User-Language"] = lang;
return config;
});

5
src/translations/locales/ar.json

@ -74,7 +74,10 @@
"notAPriority": "هذا الموضوع ليس أولوية بالنسبة لي.",
"writeOtherTraits": "Write other options...",
"fromAge": "من",
"toAge": "إلى"
"toAge": "إلى",
"familyResponsibilityTooltip": "يرجى توضيح نوع المسؤولية ومدتها ومدى الدعم المالي أو الرعائي وتأثيرها المحتمل على مكان الإقامة أو الهجرة أو شروط الحياة المشتركة المستقبلية باختصار.",
"childCustodyExplanationTooltip": "يرجى توضيح وضع الحضانة، وجدول حضور الطفل، والقيود المحتملة على الانتقال أو الهجرة، والالتزامات المالية ذات الصلة باختصار. تجنب ذكر اسم الطفل، أو اسم الوالد الآخر، أو أي تفاصيل شخصية غير ضرورية.",
"currentMaritalStatusTooltip": "يتطلب هذا الحقل الخاص من المستخدم الإعلان بدقة عن حالته الاجتماعية الحالية وتاريخ علاقاته من الخيارات المحددة المقدمة."
},
"match": {
"title": "New Match",

5
src/translations/locales/az.json

@ -74,7 +74,10 @@
"notAPriority": "Bu mövzu mənim üçün prioritet deyil.",
"writeOtherTraits": "Write other options...",
"fromAge": "Aşağı",
"toAge": "Yuxarı"
"toAge": "Yuxarı",
"familyResponsibilityTooltip": "Zəhmət olmasa məsuliyyətin növünü, müddətini, maliyyə və ya qayğı dəstəyinin dərəcəsini və onun gələcək yaşayış yerinə, köçməyə və ya birgə həyat şərtlərinə mümkün təsirini qısaca izah edin.",
"childCustodyExplanationTooltip": "Zəhmət olmasa, qəyyumluq statusunu, uşağın iştirak cədvəlini, köçmə və ya miqrasiya ilə bağlı potensial məhdudiyyətləri və əlaqədar maliyyə öhdəliklərini qısaca izah edin. Uşağın adını, digər valideynin adını və ya gərəksiz şəxsi məlumatları qeyd etməkdən çəkinin.",
"currentMaritalStatusTooltip": "Bu şəxsi sahə istifadəçidən təqdim olunan xüsusi variantlardan cari ailə vəziyyətini və münasibətlər tarixini dəqiq bəyan etməsini tələb edir."
},
"match": {
"title": "New Match",

5
src/translations/locales/bn.json

@ -74,7 +74,10 @@
"notAPriority": "এই বিষয়টি আমার জন্য অগ্রাধিকার নয়।",
"writeOtherTraits": "Write other options...",
"fromAge": "থেকে",
"toAge": "পর্যন্ত"
"toAge": "পর্যন্ত",
"familyResponsibilityTooltip": "দয়া করে দায়িত্বের ধরণ, এর মেয়াদ, আর্থিক বা যত্নশীল সহায়তার পরিমাণ এবং আপনার বসবাসের স্থান, স্থানান্তর বা ভবিষ্যতের বিবাহিত জীবনের অবস্থার উপর এর সম্ভাব্য প্রভাব সংক্ষেপে ব্যাখ্যা করুন।",
"childCustodyExplanationTooltip": "দয়া করে সন্তানের হেফাজতের অবস্থা, সন্তানের উপস্থিতির সময়সূচী, স্থানান্তর বা অভিবাসনের সম্ভাব্য সীমাবদ্ধতা এবং সংশ্লিষ্ট আর্থিক বাধ্যবাধকতা সংক্ষেপে ব্যাখ্যা করুন। সন্তানের নাম, অন্য অভিভাবকের নাম বা অপ্রয়োজনীয় ব্যক্তিগত তথ্য উল্লেখ করা এড়িয়ে চলুন।",
"currentMaritalStatusTooltip": "এই ব্যক্তিগত ক্ষেত্রটিতে ব্যবহারকারীকে প্রদত্ত নির্দিষ্ট বিকল্পগুলি থেকে তাদের বর্তমান বৈবাহিক অবস্থা এবং সম্পর্কের ইতিহাস সঠিকভাবে ঘোষণা করতে হবে।"
},
"match": {
"title": "New Match",

5
src/translations/locales/da.json

@ -74,7 +74,10 @@
"notAPriority": "Dette emne er ikke en prioritet for mig.",
"writeOtherTraits": "Write other options...",
"fromAge": "Fra",
"toAge": "Til"
"toAge": "Til",
"familyResponsibilityTooltip": "Angiv venligst kort typen af bopæl, varighed, omfang af den økonomiske eller plejemæssige støtte samt dens potentielle indvirkning på dit fremtidige bopæl, flytning eller fremtidige ægteskabelige forhold.",
"childCustodyExplanationTooltip": "Beskriv venligst kort forældremyndighedsstatus, tidsplan for barnets samvær, eventuelle begrænsninger på flytning eller emigration og relaterede økonomiske forpligtelser. Undgå at angive barnets navn, den anden forælders navn eller unødige personlige oplysninger.",
"currentMaritalStatusTooltip": "Dette private felt kræver, at brugeren nøjagtigt erklærer sin nuværende civilstand og forholdshistorik ud fra de specifikke muligheder."
},
"match": {
"title": "New Match",

5
src/translations/locales/de.json

@ -74,7 +74,10 @@
"notAPriority": "Dieses Thema hat für mich keine Priorität.",
"writeOtherTraits": "Write other options...",
"fromAge": "Von",
"toAge": "Bis"
"toAge": "Bis",
"familyResponsibilityTooltip": "Bitte erläutern Sie kurz die Art der Verantwortung, ihre Dauer, das Ausmaß der finanziellen Unterstützung oder Pflege sowie deren potenzielle Auswirkungen auf Ihren Wohnort, einen Umzug oder die Bedingungen des zukünftigen Ehelebens.",
"childCustodyExplanationTooltip": "Bitte erläutern Sie kurz den Sorgerechtsstatus, den Besuchsplan des Kindes, mögliche Einschränkungen bei Umzug oder Auswanderung sowie die damit verbundenen finanziellen Verpflichtungen. Vermeiden Sie die Nennung des Namens des Kindes, des anderen Elternteils oder unnötiger persönlicher Daten.",
"currentMaritalStatusTooltip": "Dieses private Feld erfordert, dass der Benutzer seinen aktuellen Familienstand und seine Beziehungshistorie anhand der bereitgestellten Optionen genau angibt."
},
"match": {
"title": "New Match",

5
src/translations/locales/en.json

@ -74,7 +74,10 @@
"notAPriority": "This is not a priority for me",
"writeOtherTraits": "Write other options...",
"fromAge": "From",
"toAge": "To"
"toAge": "To",
"familyResponsibilityTooltip": "Please briefly explain the type of responsibility, its duration, the extent of financial or caregiving support, and its potential impact on your place of residence, relocation, or future married life conditions.",
"childCustodyExplanationTooltip": "Please briefly explain the custody status, the child's visitation or presence schedule, potential restrictions on relocation or immigration, and related financial obligations. Avoid including the child's name, the other parent's name, or unnecessary personal details.",
"currentMaritalStatusTooltip": "This private field requires the user to accurately declare their current marital status and relationship history from the specific options provided."
},
"match": {
"title": "New Match",

5
src/translations/locales/es.json

@ -74,7 +74,10 @@
"notAPriority": "Este tema no es una prioridad para mí.",
"writeOtherTraits": "Write other options...",
"fromAge": "Desde",
"toAge": "Hasta"
"toAge": "Hasta",
"familyResponsibilityTooltip": "Por favor, explique brevemente el tipo de responsabilidad, su duración, el nivel de apoyo financiero o de cuidado, y su posible impacto en el lugar de residencia, la reubicación o las condiciones de la futura vida matrimonial.",
"childCustodyExplanationTooltip": "Por favor, explique brevemente el estado de la custodia, el horario de visitas o presencia del niño, las posibles restricciones de traslado o inmigración y las obligaciones financieras relacionadas. Evite mencionar el nombre del niño, el del otro progenitor o detalles personales innecesarios.",
"currentMaritalStatusTooltip": "Este campo privado requiere que el usuario declare con precisión su estado civil actual y su historial de relaciones a partir de las opciones específicas proporcionadas."
},
"match": {
"title": "New Match",

5
src/translations/locales/fa.json

@ -74,7 +74,10 @@
"notAPriority": "این موضوع برایم اولویت ندارد.",
"writeOtherTraits": "سایر موارد را بنویسید...",
"fromAge": "از",
"toAge": "تا"
"toAge": "تا",
"familyResponsibilityTooltip": "لطفاً نوع مسئولیت، مدت آن، میزان حمایت مالی یا مراقبتی و تأثیر احتمالی آن بر محل زندگی، مهاجرت یا شرایط زندگی مشترک آینده را به‌صورت کوتاه توضیح دهید.",
"childCustodyExplanationTooltip": "لطفاً وضعیت حضانت، برنامه حضور فرزند، محدودیت احتمالی برای جابه‌جایی یا مهاجرت و تعهدات مالی مرتبط را به‌صورت کوتاه توضیح دهید. از درج نام فرزند، والد دیگر یا جزئیات هویتی غیرضروری خودداری کنید.",
"currentMaritalStatusTooltip": "این فیلد خصوصی از کاربر می‌خواهد که وضعیت تأهل فعلی و سابقه روابط خود را از میان گزینه‌های مشخص‌شده به‌طور دقیق اعلام کند."
},
"match": {
"title": "گزینه جدید",

5
src/translations/locales/fr.json

@ -74,7 +74,10 @@
"notAPriority": "Ce sujet n'est pas une priorité pour moi.",
"writeOtherTraits": "Write other options...",
"fromAge": "De",
"toAge": "À"
"toAge": "À",
"familyResponsibilityTooltip": "Veuillez expliquer brièvement le type de responsabilité, sa durée, l'étendue du soutien financier ou des soins, et son impact potentiel sur votre lieu de résidence, votre déménagement ou les conditions de votre future vie commune.",
"childCustodyExplanationTooltip": "Veuillez expliquer brièvement les modalités de garde, le calendrier de présence de l'enfant, les restrictions éventuelles de déménagement ou d'émigration, ainsi que les obligations financières associées. Évitez de mentionner le nom de l'enfant, celui de l'autre parent ou des détails personnels inutiles.",
"currentMaritalStatusTooltip": "Ce champ privé exige que l'utilisateur déclare avec précision son état civil actuel et son historique de relations à partir des options spécifiques fournies."
},
"match": {
"title": "New Match",

5
src/translations/locales/gu.json

@ -74,7 +74,10 @@
"notAPriority": "આ વિષય મારા માટે પ્રાથમિકતા નથી.",
"writeOtherTraits": "Write other options...",
"fromAge": "થી",
"toAge": "સુધી"
"toAge": "સુધી",
"familyResponsibilityTooltip": "કૃપા કરીને જવાબદારીનો પ્રકાર, તેનો સમયગાળો, નાણાકીય કે સંભાળ સહાયની મર્યાદા અને તમારા રહેઠાણના સ્થળ, સ્થાનાંતરણ અથવા ભવિષ્યના લગ્ન જીવનની પરિસ્થિતિઓ પર તેની સંભવيت અસર ટૂંકમાં સમજાવો.",
"childCustodyExplanationTooltip": "કૃપા કરીને બાળકની કસ્ટડીની સ્થિતિ, બાળકની હાજરીનું સમયપત્રક, સ્થાનાંતરણ અથવા વિદેશ પ્રવાસ પરના સંભવિત નિયંત્રણો અને સંબંધિત નાણાકીય જવાબદારીઓ ટૂંકમાં સમજાવો. બાળકના નામ, અન્ય માતા કે પિતાના નામ અથવા બિનજરૂری અંગત વિગતોનો ઉલ્લેખ કરવાનું ટાળો.",
"currentMaritalStatusTooltip": "આ ખાનગી ફીલ્ડ માટે વપરાશકર્તાએ આપેલા ચોક્કસ વિકલ્પોમાંથી તેમની વર્તમાન વૈવાહಿಕ સ્થિતિ અને સંબંધોના ઇતિહાસની સચોટ જાહેરાت કરવી જરૂરી છે."
},
"match": {
"title": "New Match",

5
src/translations/locales/ha.json

@ -74,7 +74,10 @@
"notAPriority": "Wannan batu ba fifiko ba ne a gare ni.",
"writeOtherTraits": "Write other options...",
"fromAge": "Daga",
"toAge": "Zuwa"
"toAge": "Zuwa",
"familyResponsibilityTooltip": "Da fatan za a taƙaita bayanin nau'in alhakin, tsawonsa, gwargwadon tallafin kuɗi ko kulawa, da yuwuwar tasirinsa ga wurin zama, ƙaura, ko yanayin rayuwar aure na gaba.",
"childCustodyExplanationTooltip": "Da fatan za a taƙaita bayanin yanayin riƙon yaro, tsarin lokacin kasancewar yaro, yiwuwar hana ƙaura ko tafiya wata ƙasa, da kuma wajibai na kuɗi masu alaƙa. Guji shigar da sunan yaron, sunan ɗayan iyayen, ko bayanan sirri da ba su da mahimmanci.",
"currentMaritalStatusTooltip": "Wannan fili na sirri yana buƙatar mai amfani ya bayyana daidai matsayin aurensu na yanzu da tarihin dangantakarsu daga takamaiman zaɓuɓɓukan da aka bayar."
},
"match": {
"title": "New Match",

5
src/translations/locales/he.json

@ -74,7 +74,10 @@
"notAPriority": "נושא זה אינו בראש סדר העדיפויות שלי.",
"writeOtherTraits": "Write other options...",
"fromAge": "מ-",
"toAge": "עד"
"toAge": "עד",
"familyResponsibilityTooltip": "אנא הסבר בקצרה את סוג האחריות, משכה, היقף התמיכה הפיננסית או הטיפולית, והשפעתה הפוטנציאלית על מקום המגורים, המעבר או תנאי חיי הנישואין העתידיים.",
"childCustodyExplanationTooltip": "אנא הסבר בקצרה את סטטוס המשמורת, לוח הזמנים של נוכחות הילד, מגבלות פוטנציאליות על מעבר או הגירה, והתחייבויות כספיות נלוות. הימנע מלציין את שם הילד, ההורה השני או פרטים אישיים מיותרים.",
"currentMaritalStatusTooltip": "שדה פרטי זה דורש מהמשתמש להצהיר במדויק על מצבו המשפחתי הנוכحي והיסטוריית היחסים שלו מתוך האפשרויות הספציפיות המפורטות."
},
"match": {
"title": "New Match",

5
src/translations/locales/hi.json

@ -74,7 +74,10 @@
"notAPriority": "यह विषय मेरे लिए प्राथमिकता नहीं है।",
"writeOtherTraits": "Write other options...",
"fromAge": "से",
"toAge": "तक"
"toAge": "तक",
"familyResponsibilityTooltip": "कृपया जिम्मेदारी के प्रकार, उसकी अवधि, वित्तीय या देखभाल सहायता की सीमा, और आपके निवास स्थान, स्थानांतरण या भविष्य के वैवाहिक जीवन की स्थितियों पर इसके संभावित प्रभाव को संक्षेप में स्पष्ट करें।",
"childCustodyExplanationTooltip": "कृपया बच्चे की कस्टडी की स्थिति, बच्चे की उपस्थिति की समय सारिणी, स्थानांतरण या प्रवास पर संभावित प्रतिबंधों और संबंधित वित्तीय दायित्वों को संक्षेप में स्पष्ट करें। बच्चे का नाम, दूसरे अभिभावक का नाम या अनावश्यक व्यक्तिगत विवरण शामिल करने से बचें।",
"currentMaritalStatusTooltip": "इस निजी क्षेत्र में उपयोगकर्ता को प्रदान किए गए विशिष्ट विकल्पों में से अपनी वर्तमान वैवाहिक स्थिति और संबंधों के इतिहास को सटीक रूप से घोषित करने की आवश्यकता होती है।"
},
"match": {
"title": "New Match",

5
src/translations/locales/id.json

@ -74,7 +74,10 @@
"notAPriority": "Topik ini bukan prioritas bagi saya.",
"writeOtherTraits": "Write other options...",
"fromAge": "Dari",
"toAge": "Hingga"
"toAge": "Hingga",
"familyResponsibilityTooltip": "Harap jelaskan secara singkat jenis tanggung jawab, durasinya, tingkat dukungan finansial atau perawatan, dan potensi dampaknya terhadap tempat tinggal, relokasi, atau kondisi kehidupan pernikahan di masa depan.",
"childCustodyExplanationTooltip": "Harap jelaskan secara singkat status hak asuh, jadwal kehadiran anak, potensi batasan untuk relokasi atau imigrasi, dan kewajiban keuangan terkait. Hindari mencantumkan nama anak, nama orang tua lainnya, atau detail pribadi yang tidak perlu.",
"currentMaritalStatusTooltip": "Kolom pribadi ini mengharuskan pengguna untuk menyatakan status pernikahan dan riwayat hubungan mereka saat ini secara akurat dari opsi spesifik yang disediakan."
},
"match": {
"title": "New Match",

5
src/translations/locales/ks.json

@ -74,7 +74,10 @@
"notAPriority": "یہ موضوع چھ نہ میہ خاطرہ ترجیح۔",
"writeOtherTraits": "Write other options...",
"fromAge": "پؠٹھ",
"toAge": "تام"
"toAge": "تام",
"familyResponsibilityTooltip": "مہربانی کٔرتھ وچھو ذمہ داری ہنز قسم، امیک وقت، مالی یا دیکھ بھال ہنز مدد تہٕ امیک اثر تمہِ جایہِ، ہجرت یا مستقبلٕچ ازدواجی زندگی ہنزہِ حالہِ پیٹھ۔",
"childCustodyExplanationTooltip": "مہربانی کٔرتھ وچھو بچس ہنزہِ حفاظتٕچ حالت، بچس ہنزہِ موجودگی ہنز سکیجول، ہجرت یا دوسری جایہِ گژھنٕچ پابندی تہٕ امیک متعلقہ مالی ذمہ داری ہنزہِ قلیل تشریح۔ بچس ناو، دوسرے مٲلس/مٲجہِ ناو یا غیر ضروری ذاتی معلومات لکھنہٕ نش پرہیز کٔریو۔",
"currentMaritalStatusTooltip": "یہ خانگی فیلڈ چھُ صارفس نشہِ توقع کران زِ سہُ کٔرِ پننہِ موجودہ ازدواجی حالت تہٕ خاندانی پس منظرک بالکل صحیح اعلان یمن دِتین اختیارن منزہ۔"
},
"match": {
"title": "New Match",

5
src/translations/locales/pt.json

@ -74,7 +74,10 @@
"notAPriority": "Este assunto não é uma prioridade para mim.",
"writeOtherTraits": "Write other options...",
"fromAge": "De",
"toAge": "Até"
"toAge": "Até",
"familyResponsibilityTooltip": "Por favor, explique brevemente o tipo de responsabilidade, a sua duração, a extensão do apoio financeiro ou de cuidados e o seu impacto potencial no local de residência, na recolocação ou nas condições da futura vida conjugal.",
"childCustodyExplanationTooltip": "Por favor, explique brevemente o regime de custódia, o calendário de permanência do filho, possíveis limitações para mudança ou emigração e obrigações financeiras associadas. Evite indicar o nome do filho, do outro progenitor ou detalhes pessoais desnecessários.",
"currentMaritalStatusTooltip": "Este campo privado exige que o utilizador declare com precisão o seu estado civil atual e histórico de relacionamentos a partir das opções específicas fornecidas."
},
"match": {
"title": "New Match",

5
src/translations/locales/ru.json

@ -74,7 +74,10 @@
"notAPriority": "Эта тема не является приоритетом для меня.",
"writeOtherTraits": "Write other options...",
"fromAge": "От",
"toAge": "До"
"toAge": "До",
"familyResponsibilityTooltip": "Пожалуйста, кратко опишите тип ответственности, ее продолжительность, объем финансовой помощи или ухода, а также ее возможное влияние на место жительства, переезд или условия будущей совместной жизни.",
"childCustodyExplanationTooltip": "Пожалуйста, кратко опишите статус опеки, график пребывания ребенка, возможные ограничения на переезд или эмиграцию, а также связанные с этим финансовые обязательства. Избегайте указания имени ребенка, имени другого родителя или ненужных личных данных.",
"currentMaritalStatusTooltip": "Это приватное поле требует от пользователя точно указать свое текущее семейное положение и историю отношений из предложенных вариантов."
},
"match": {
"title": "New Match",

5
src/translations/locales/sw.json

@ -74,7 +74,10 @@
"notAPriority": "Mada hii sio kipaumbele kwangu.",
"writeOtherTraits": "Write other options...",
"fromAge": "Kuanzia",
"toAge": "Hadi"
"toAge": "Hadi",
"familyResponsibilityTooltip": "Tafadhali eleza kwa ufupi aina ya jukumu, muda wake, kiwango cha usaidizi wa kifedha au utunzaji, ya athari yake inayoweza kutokea kwenye mahali pako pa kuishi, kuhamia, au masharti ya maisha ya ndoa ya baadaye.",
"childCustodyExplanationTooltip": "Tafadhali eleza kwa ufupi hali ya ulezi, ratiba ya kuwepo kwa mtoto, vikwazo vinavyoweza kutokea vya kuhama au uhamiaji, na majukumu ya kifedha yanayohusiana. Epuka kuweka jina la mtoto, mzazi mwingine au maelezo ya kibinafsi yasiyo ya lazima.",
"currentMaritalStatusTooltip": "Sehemu hii ya siri inataka mtumiaji kutangaza kwa usahihi hali yake ya sasa ya ndoa na historia ya uhusiano kutoka kwa chaguzi maalum zilizotolewa."
},
"match": {
"title": "New Match",

5
src/translations/locales/tg.json

@ -74,7 +74,10 @@
"notAPriority": "Ин мавзӯъ барои ман афзалият надорад.",
"writeOtherTraits": "Write other options...",
"fromAge": "Аз",
"toAge": "То"
"toAge": "То",
"familyResponsibilityTooltip": "Лутфан намуди масъулият, давомнокии он, ҳаҷми дастгирии молиявӣ ё нигоҳубин ва таъсири эҳтимолии онро ба маҳалли зист, муҳоҷират ё шароити зиндагии муштараки оянда кӯтоҳ шарҳ диҳед.",
"childCustodyExplanationTooltip": "Лутфан вазъияти васоят, ҷадвали ҳузури фарзанд, маҳдудиятҳои эҳтимолӣ барои кӯчидан ё муҳоҷират ва уҳдадориҳои молиявии марбутаро кӯтоҳ шарҳ диҳед. Аз зикри номи фарзанд, волиди дигар ё ҷузъиёти шахсии ғайризарурӣ худдорӣ намоед.",
"currentMaritalStatusTooltip": "Ин бахши хусусӣ аз корбар талаб мекунад, ки вазъи оилавии ҷорӣ ва таърихи муносибатҳои худро аз рӯи имконоти пешниҳодшуда дақиқ эълон кунад."
},
"match": {
"title": "New Match",

5
src/translations/locales/tr.json

@ -74,7 +74,10 @@
"notAPriority": "Bu konu benim için bir öncelik değil.",
"writeOtherTraits": "Write other options...",
"fromAge": "En az",
"toAge": "En çok"
"toAge": "En çok",
"familyResponsibilityTooltip": "Lütfen sorumluluğun türünü, süresini, mali desteğin veya bakımın boyutunu ve bunun gelecekteki ikamet yerinize, taşınmanıza veya gelecekteki evlilik hayatı koşullarınıza olası etkisini kısaca açıklayın.",
"childCustodyExplanationTooltip": "Lütfen velayet durumunu, çocuğun ziyaret/birlikte kalma planını, taşınma veya göç konusundaki olası kısıtlamaları ve ilgili mali yükümlülükleri kısaca açıklayın. Çocuğun ismini, diğer ebeveynin ismini veya gereksiz kişisel detayları belirtmekten kaçının.",
"currentMaritalStatusTooltip": "Bu özel alan, kullanıcının sunulan seçenekler arasından mevcut medeni durumunu ve ilişki geçmişini doğru bir şekilde beyan etmesini gerektirir."
},
"match": {
"title": "New Match",

5
src/translations/locales/ul.json

@ -74,7 +74,10 @@
"notAPriority": "بۇ مەسىلە مەن ئۈچۈن مۇھىم ئەمەس.",
"writeOtherTraits": "Write other options...",
"fromAge": "ياشتىن",
"toAge": "ياشقىچە"
"toAge": "ياشقىچە",
"familyResponsibilityTooltip": "قىسقىچە قىلىپ مەسئۇلىيەتنىڭ تۈرى، ئۇنىڭ داۋاملىشىش ۋاقتى، مالىيە ياكى بېقىش ياردىمىنىڭ دەرىجىسى ۋە ئۇنىڭ ياشاش ئورنىڭىز، كۆچۈش ياكى كەلگۈسى توي تۇرمۇش شارائىتىڭىزغا كۆرسىتىدىغان تەسىرىنى چۈشەندۈرۈڭ.",
"childCustodyExplanationTooltip": "بالىنىڭ بېقىش ھوقۇقى ھالىتى، بالىنىڭ بىللە تۇرۇش ۋاقتى، كۆچۈش ياكى كۆچمەن بولۇش چەكلىمىلىرى ۋە مۇناسىۋەتلىك مالىيە مەسئۇلىيەتلىرىنى قىسقىچە قىلىپ چۈشەندۈرۈڭ. بالىنىڭ ئىسمى، يەنە بىر تەرەپنىڭ ئىسمى ياكى زۆرۈر بولمىغان شەخسىي ئۇچۇرلارنى يېزىشتىن ساقلىنىڭ.",
"currentMaritalStatusTooltip": "بۇ شەخسىي قىسىم ئىشلەتكۈچىدىن تەمىنلەنگەن تاللاشلار ئىچىدىن نۆۋەتتىكى ئائىلە ئەھۋالى ۋە مۇناسىۋەت تارىخىنى توغرا مەلۇم قىلىشىنى تەلەپ قىلىدۇ."
},
"match": {
"title": "New Match",

5
src/translations/locales/ur.json

@ -74,7 +74,10 @@
"notAPriority": "یہ موضوع میرے لیے ترجیح نہیں ہے۔",
"writeOtherTraits": "Write other options...",
"fromAge": "سے",
"toAge": "تک"
"toAge": "تک",
"familyResponsibilityTooltip": "براہ کرم ذمہ داری کی قسم، اس کا دورانیہ، مالی یا دیکھ بھال کی امداد کی حد، اور رہائش گاہ، منتقلی، یا مستقبل کی ازدواجی زندگی کے حالات پر اس کے ممکنہ اثرات کو مختصراً واضح کریں۔",
"childCustodyExplanationTooltip": "براہ کرم بچے کی تحویل کی صورتحال، بچے کی موجودگی کے شیڈول، رہائش کی تبدیلی یا نقل مکانی پر ممکنہ پابندیوں، اور متعلقہ مالی ذمہ داریوں کو مختصراً واضح کریں۔ بچے کا نام، دوسرے والدین کا نام یا غیر ضروری ذاتی تفصیلات درج کرنے سے گریز کریں۔",
"currentMaritalStatusTooltip": "اس نجی فیلڈ میں صارف کو فراہم کردہ مخصوص اختیارات میں سے اپنی موجودہ ازدواجی حیثیت اور تعلقات کی تاریخ کا درست اعلان کرنے کی ضرورت ہوتی ہے۔"
},
"match": {
"title": "New Match",

5
src/translations/locales/uz.json

@ -74,7 +74,10 @@
"notAPriority": "Bu mavzu men uchun ustuvor emas.",
"writeOtherTraits": "Write other options...",
"fromAge": "Yoshdan",
"toAge": "Yoshgacha"
"toAge": "Yoshgacha",
"familyResponsibilityTooltip": "Iltimos, mas'uliyat turini, uning davomiyligini, moliyaviy yoki g'amxo'rlik yordamining darajasini hamda uning yashash joyi, ko'chish yoki kelajakdagi oilaviy hayot sharoitlariga ehtimoliy ta'sirini qisqacha tushuntiring.",
"childCustodyExplanationTooltip": "Iltimos, vasiylik holatini, bolaning uchrashuv rejalarini, yashash joyini o'zgartirish yoki ko'chish bilan bog'liq ehtimoliy cheklovlarni hamda tegishli moliyaviy majburiyatlarni qisqacha tushuntiring. Bolaning ismi, boshqa ota/onaning ismi yoki keraksiz shaxsiy ma'lumotlarni yozishdan saqlaning.",
"currentMaritalStatusTooltip": "Ushbu shaxsiy maydon foydalanuvchidan taqdim etilgan variantlardan joriy oilaviy ahvoli va munosabatlar tarixini aniq e'lon qilishini talab qiladi."
},
"match": {
"title": "New Match",

5
src/translations/locales/zh.json

@ -74,7 +74,10 @@
"notAPriority": "这个话题对我不重要。",
"writeOtherTraits": "Write other options...",
"fromAge": "从",
"toAge": "到"
"toAge": "到",
"familyResponsibilityTooltip": "请简要说明责任类型、持续时间、资金支持或照顾的程度,以及其对您的居住地、搬迁或未来已婚生活条件的潜在影响。",
"childCustodyExplanationTooltip": "请简要说明抚养权状况、子女共同生活的时间安排、对居住地变更或移民的潜在限制,以及相关的财务义务。请避免提供子女姓名、另一方家长的姓名或其他不必要的个人隐私细节。",
"currentMaritalStatusTooltip": "此私密字段要求用户根据所提供的具体选项准确声明其当前的婚姻状况和恋爱史。"
},
"match": {
"title": "New Match",

Loading…
Cancel
Save