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

@@ -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
]