Skip to content

Commit

Permalink
add emergency contact in Update and Edit Employee
Browse files Browse the repository at this point in the history
  • Loading branch information
KirinZero0 committed Feb 21, 2025
1 parent 32c7278 commit 8927b81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/Actions/HumanResources/Employee/UI/EditEmployee.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
],
]
];

Expand Down
1 change: 1 addition & 0 deletions app/Actions/HumanResources/Employee/UpdateEmployee.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)]


Expand Down

0 comments on commit 8927b81

Please sign in to comment.