diff --git a/app/Actions/HumanResources/Employee/UI/EditEmployee.php b/app/Actions/HumanResources/Employee/UI/EditEmployee.php index f6eeda3235..a474275d2e 100644 --- a/app/Actions/HumanResources/Employee/UI/EditEmployee.php +++ b/app/Actions/HumanResources/Employee/UI/EditEmployee.php @@ -220,6 +220,11 @@ public function htmlResponse(Employee $employee, ActionRequest $request): Respon 'label' => __('personal email'), 'value' => $employee->email ], + 'emergency_contact' => [ + 'type' => 'input', + 'label' => __('Emergency Contact'), + 'value' => $employee->emergency_contact + ], ] ]; diff --git a/app/Actions/HumanResources/Employee/UpdateEmployee.php b/app/Actions/HumanResources/Employee/UpdateEmployee.php index 7cc94702ad..df867c38a8 100644 --- a/app/Actions/HumanResources/Employee/UpdateEmployee.php +++ b/app/Actions/HumanResources/Employee/UpdateEmployee.php @@ -180,6 +180,7 @@ public function rules(): array 'job_positions.*.scopes.fulfilments.slug.*' => ['sometimes', Rule::exists('fulfilments', 'slug')->where('organisation_id', $this->organisation->id)], 'job_positions.*.scopes.shops.slug.*' => ['sometimes', Rule::exists('shops', 'slug')->where('organisation_id', $this->organisation->id)], 'email' => ['sometimes', 'nullable', 'email'], + 'emergency_contact' => ['sometimes', 'nullable', 'string', 'max:256'], 'type' => ['sometimes', Rule::enum(EmployeeTypeEnum::class)]