fix(profile): persist & expose birthday as a single Unix field

Birthday was never saved (hydrate forced null) and not returned in a form the
clients use. Now:
- hydrate stores the incoming `birthday` (Unix) into date_of_birth; `birthday`
  takes priority over a stray `date_of_birth: null` in the same payload so it
  can't be wiped.
- toArray exposes a single `birthday` (Unix) key — drop the duplicate
  `date_of_birth` output to avoid overlap.
- admin UserDetailPage reads profile.birthday (formatDate renders Jalali).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
hamed
2026-06-16 11:42:31 +03:30
co-authored by Claude Opus 4.8
parent 800f9ad8cd
commit b60dbdadba
4 changed files with 90 additions and 9 deletions
+1 -1
View File
@@ -160,7 +160,7 @@ class UserProfile
'national_code' => $this->nationalCode,
'national_code_approved' => $this->nationalCodeApproved,
'gender' => $this->gender,
'date_of_birth' => $this->dateOfBirth,
'birthday' => $this->dateOfBirth,
'blood_type' => $this->bloodType,
'marital_status' => $this->maritalStatus,
'education' => $this->education,