fix: [leave] HTMX 사이드바 네비게이션 시 HX-Redirect 적용
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user