Fix shift assignment defaulting to present and update employee creation fields

This commit is contained in:
2026-04-30 13:46:32 +08:00
parent 30c24b707b
commit b63d58620f
422 changed files with 23693 additions and 14330 deletions

View File

@@ -215,9 +215,9 @@ class EmployeeController extends Controller
'biometric_emp_id' => 'nullable|string|max:255|unique:employees,biometric_emp_id',
'email' => 'required|email|max:255|unique:users,email',
'password' => 'required|string|min:8',
'phone' => 'nullable|string|max:20',
'date_of_birth' => 'nullable|date',
'gender' => 'nullable|in:male,female,other',
'phone' => 'required|string|max:20',
'date_of_birth' => 'required|date',
'gender' => 'required|in:male,female,other',
'profile_image' => 'nullable|image|mimes:jpeg,png,jpg,gif|max:2048',
'shift_id' => 'nullable|exists:shifts,id',
'rest_days' => 'nullable|array',
@@ -226,9 +226,9 @@ class EmployeeController extends Controller
'salary' => 'required|numeric|min:0',
// Employment details
'branch_id' => 'nullable|exists:branches,id',
'department_id' => 'nullable|exists:departments,id',
'designation_id' => 'nullable|exists:designations,id',
'branch_id' => 'required|exists:branches,id',
'department_id' => 'required|exists:departments,id',
'designation_id' => 'required|exists:designations,id',
'date_of_joining' => 'nullable|date',
'employment_type' => 'nullable|string|max:50',
'employee_status' => 'nullable|string|max:50',
@@ -539,9 +539,9 @@ class EmployeeController extends Controller
'biometric_emp_id' => 'nullable|string|max:255|unique:employees,biometric_emp_id,' . $employee->id,
'email' => 'required|email|max:255|unique:users,email,' . $employee->user_id,
'password' => 'nullable|string|min:8',
'phone' => 'nullable|string|max:20',
'date_of_birth' => 'nullable|date',
'gender' => 'nullable|in:male,female,other',
'phone' => 'required|string|max:20',
'date_of_birth' => 'required|date',
'gender' => 'required|in:male,female,other',
'profile_image' => 'nullable|image|mimes:jpeg,png,jpg,gif|max:2048',
'shift_id' => 'nullable|exists:shifts,id',
'rest_days' => 'nullable|array',
@@ -550,9 +550,9 @@ class EmployeeController extends Controller
'salary' => 'required|numeric|min:0',
// Employment details
'branch_id' => 'nullable|exists:branches,id',
'department_id' => 'nullable|exists:departments,id',
'designation_id' => 'nullable|exists:designations,id',
'branch_id' => 'required|exists:branches,id',
'department_id' => 'required|exists:departments,id',
'designation_id' => 'required|exists:designations,id',
'date_of_joining' => 'nullable|date',
'employment_type' => 'nullable|string|max:50',
'employee_status' => 'nullable|string|max:50',