fix: [attendance] 근태현황 HTMX 부분 로드 시 스크립트 미실행 오류 수정

- index 메서드에 HX-Redirect 추가하여 전체 페이지 로드 보장
- 근태관리→근태현황 이동 시 switchTab null 참조 에러 해결
This commit is contained in:
김보곤
2026-02-27 09:53:27 +09:00
parent 11b2c0ec17
commit 9c14f1df25

View File

@@ -18,8 +18,12 @@ public function __construct(
/**
* 근태현황 목록 페이지 (조회 전용)
*/
public function index(): View
public function index(Request $request): View|Response
{
if ($request->header('HX-Request')) {
return response('', 200)->header('HX-Redirect', route('hr.attendances.index'));
}
$stats = $this->attendanceService->getMonthlyStats();
$departments = $this->attendanceService->getDepartments();
$statusMap = Attendance::STATUS_MAP;