From caca3fda97f4d7a495e8fcded60ea1f35f100720 Mon Sep 17 00:00:00 2001 From: hamed <15238-genius.ha@users.noreply.drupalcode.org> Date: Mon, 15 Jun 2026 22:17:25 +0330 Subject: [PATCH] fix(dashboard): show name from profile label field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The backend stores the first name in the profile's label field, but the account form binds the نام input to information.name, so a saved name never displayed on reload. Map label→name when loading the profile (and drop the raw label) so the field populates; saving still sends name, which the backend hydrates back into label. Co-Authored-By: Claude Opus 4.8 --- .../dashboard/userAccount/detailUser/information/index.js | 3 +++ 1 file changed, 3 insertions(+) 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 ?? {