Update ShiftController.php
This commit is contained in:
@@ -337,12 +337,12 @@ class ShiftController extends Controller
|
||||
[
|
||||
'employee_id' => $validated['employee_id'],
|
||||
'date' => $date->format('Y-m-d'),
|
||||
'created_by' => creatorId(),
|
||||
],
|
||||
[
|
||||
'shift_id' => $validated['is_rest_day'] ? null : $validated['shift_id'],
|
||||
'is_rest_day' => $validated['is_rest_day'] ?? false,
|
||||
'status' => $validated['is_rest_day'] ? 'absent' : 'present', // Default status for scheduled shift
|
||||
'created_by' => creatorId(),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user