fix: [leave] HTMX 사이드바 네비게이션 시 HX-Redirect 적용

This commit is contained in:
김보곤
2026-02-26 22:56:57 +09:00
parent 0b19728fef
commit c26ede01b5

View File

@@ -14,8 +14,12 @@ public function __construct(
private LeaveService $leaveService
) {}
public function index(): View|Response
public function index(\Illuminate\Http\Request $request): View|Response
{
if ($request->header('HX-Request')) {
return response('', 200)->header('HX-Redirect', route('hr.leaves.index'));
}
$employees = $this->leaveService->getActiveEmployees();
$departments = $this->leaveService->getDepartments();
$typeMap = Leave::TYPE_MAP;