Expand member profile fields

This commit is contained in:
2026-01-25 06:37:10 +08:00
parent 29c44f2dbe
commit 2cf0c19b61
4 changed files with 205 additions and 6 deletions

View File

@@ -50,11 +50,21 @@ class ProfileController extends Controller
$request->user()->save();
$memberFields = [
'national_id',
'phone',
'phone_home',
'phone_fax',
'address_line_1',
'address_line_2',
'city',
'postal_code',
'birth_date',
'gender',
'identity_type',
'identity_other_text',
'occupation',
'employer',
'job_title',
'emergency_contact_name',
'emergency_contact_phone',
];

View File

@@ -18,7 +18,17 @@ class ProfileUpdateRequest extends FormRequest
return [
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'lowercase', 'email', 'max:255', Rule::unique(User::class)->ignore($this->user()->id)],
'national_id' => ['nullable', 'string', 'max:50'],
'phone' => ['nullable', 'string', 'max:50'],
'phone_home' => ['nullable', 'string', 'max:50'],
'phone_fax' => ['nullable', 'string', 'max:50'],
'birth_date' => ['nullable', 'date'],
'gender' => ['nullable', 'in:male,female,other'],
'identity_type' => ['nullable', 'in:patient,parent,social,other'],
'identity_other_text' => ['nullable', 'string', 'max:255', 'required_if:identity_type,other'],
'occupation' => ['nullable', 'string', 'max:120'],
'employer' => ['nullable', 'string', 'max:255'],
'job_title' => ['nullable', 'string', 'max:120'],
'address_line_1' => ['nullable', 'string', 'max:255'],
'address_line_2' => ['nullable', 'string', 'max:255'],
'city' => ['nullable', 'string', 'max:120'],