diff --git a/components/dashboard/userAccount/detailUser/information/index.js b/components/dashboard/userAccount/detailUser/information/index.js index b90bcaa..8e767d3 100644 --- a/components/dashboard/userAccount/detailUser/information/index.js +++ b/components/dashboard/userAccount/detailUser/information/index.js @@ -35,6 +35,9 @@ function Information({ information, setInformation }) { if (hasProfileData) { let changedData = { ...profile }; + // backend stores the first name in `label`; the form binds to `name` + changedData.name = profile?.label ?? ""; + delete changedData.label; changedData.basic_insurance = profile?.basic_insurance_id ? [profile.basic_insurance_id] : []; changedData.supplementary_insurance = profile?.supplementary_insurance_id ? [profile.supplementary_insurance_id] : []; changedData.other = profile?.other ?? {