Fix Gender

This commit is contained in:
R
2022-11-15 14:05:12 +07:00
parent f71eb71cfc
commit 81f25f31de

View File

@@ -103,7 +103,6 @@ class PersonController extends Controller
'name_suffix',
'phone',
'email',
'gender',
'birth_date',
'birth_place',
'citizenship',
@@ -119,6 +118,7 @@ class PersonController extends Controller
]);
$personData['last_weight_kg'] = $request->weight ?? null;
$personData['last_height_cm'] = $request->height ?? null;
$personData['gender'] = $request->has('gender') ? ($request->gender == 'P' ? 'M' : ($request->gender == 'W' ? 'F' : null)) : null;
$family->fill($personData);
$family->save();