Make all employee fields optional except core requirements (name, email, password, salary)

This commit is contained in:
2026-04-30 13:04:26 +08:00
parent 45cd7dc795
commit 7b1b5f8f00
417 changed files with 14436 additions and 14393 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' => 'required|string|max:20',
'date_of_birth' => 'required|date',
'gender' => 'required|in:male,female,other',
'phone' => 'nullable|string|max:20',
'date_of_birth' => 'nullable|date',
'gender' => 'nullable|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,12 +226,12 @@ class EmployeeController extends Controller
'salary' => 'required|numeric|min:0',
// Employment details
'branch_id' => 'required|exists:branches,id',
'department_id' => 'required|exists:departments,id',
'designation_id' => 'required|exists:designations,id',
'date_of_joining' => 'required|date',
'employment_type' => 'required|string|max:50',
'employee_status' => 'required|string|max:50',
'branch_id' => 'nullable|exists:branches,id',
'department_id' => 'nullable|exists:departments,id',
'designation_id' => 'nullable|exists:designations,id',
'date_of_joining' => 'nullable|date',
'employment_type' => 'nullable|string|max:50',
'employee_status' => 'nullable|string|max:50',
// Contact information
'address_line_1' => 'nullable|string|max:255',
@@ -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' => 'required|string|max:20',
'date_of_birth' => 'required|date',
'gender' => 'required|in:male,female,other',
'phone' => 'nullable|string|max:20',
'date_of_birth' => 'nullable|date',
'gender' => 'nullable|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,12 +550,12 @@ class EmployeeController extends Controller
'salary' => 'required|numeric|min:0',
// Employment details
'branch_id' => 'required|exists:branches,id',
'department_id' => 'required|exists:departments,id',
'designation_id' => 'required|exists:designations,id',
'date_of_joining' => 'required|date',
'employment_type' => 'required|string|max:50',
'employee_status' => 'required|string|max:50',
'branch_id' => 'nullable|exists:branches,id',
'department_id' => 'nullable|exists:departments,id',
'designation_id' => 'nullable|exists:designations,id',
'date_of_joining' => 'nullable|date',
'employment_type' => 'nullable|string|max:50',
'employee_status' => 'nullable|string|max:50',
// Contact information
'address_line_1' => 'nullable|string|max:255',