Fix shift assignment defaulting to present and update employee creation fields
This commit is contained in:
@@ -386,7 +386,7 @@ class ShiftController extends Controller
|
||||
[
|
||||
'shift_id' => $targetShiftId,
|
||||
'is_rest_day' => $isRestDay,
|
||||
'status' => $isRestDay ? 'absent' : 'present', // Default status for scheduled shift
|
||||
'status' => 'absent', // Default status for scheduled shift
|
||||
'attendance_policy_id' => ($validated['attendance_policy_id'] ?? null),
|
||||
'created_by' => $companyId, // Ensure it's owned by the company for visibility
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user