From 092bcbd66c05ef551a3825fc58facbc6e97cb30c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Wed, 4 Mar 2026 00:02:40 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[hr]=20=ED=86=B5=ED=95=A9=20=EA=B7=BC?= =?UTF-8?q?=ED=83=9C=EA=B4=80=EB=A6=AC=20JS=20API=20URL=EC=97=90=20/api=20?= =?UTF-8?q?=EC=A0=91=EB=91=90=EC=82=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hr/attendance-integrated/index.blade.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/views/hr/attendance-integrated/index.blade.php b/resources/views/hr/attendance-integrated/index.blade.php index 00670e3a..104abcab 100644 --- a/resources/views/hr/attendance-integrated/index.blade.php +++ b/resources/views/hr/attendance-integrated/index.blade.php @@ -129,14 +129,14 @@ function loadAttendances(page) { if (to) params.set('date_to', to); if (page) params.set('page', page); - htmx.ajax('GET', '/admin/hr/attendances?' + params.toString(), { + htmx.ajax('GET', '/api/admin/hr/attendances?' + params.toString(), { target: '#attendance-table-container', swap: 'innerHTML' }); } function loadAttendanceStats(year, month) { - htmx.ajax('GET', '/admin/hr/attendances/stats?year=' + year + '&month=' + month, { + htmx.ajax('GET', '/api/admin/hr/attendances/stats?year=' + year + '&month=' + month, { target: '#attendance-stats-container', swap: 'innerHTML' }); @@ -160,7 +160,7 @@ function loadRequests(page) { if (to) params.set('date_to', to); if (page) params.set('page', page); - htmx.ajax('GET', '/admin/hr/leaves?' + params.toString(), { + htmx.ajax('GET', '/api/admin/hr/leaves?' + params.toString(), { target: '#requests-table-container', swap: 'innerHTML' }); @@ -171,7 +171,7 @@ function loadRequests(page) { // ========================================================================= function loadBalance() { const year = document.getElementById('balance-year')?.value || new Date().getFullYear(); - htmx.ajax('GET', '/admin/hr/leaves/balance?year=' + year, { + htmx.ajax('GET', '/api/admin/hr/leaves/balance?year=' + year, { target: '#balance-table-container', swap: 'innerHTML' }); @@ -237,7 +237,7 @@ function onUserChange() { if (!userId) return; // 잔여연차 조회 - fetch('/admin/hr/leaves/balance/' + userId) + fetch('/api/admin/hr/leaves/balance/' + userId) .then(r => r.json()) .then(data => { if (data.success && data.data) { @@ -269,7 +269,7 @@ function submitLeave() { approval_line_id: document.getElementById('modal-approval-line')?.value || null, }; - fetch('/admin/hr/leaves', { + fetch('/api/admin/hr/leaves', { method: 'POST', headers: { 'Content-Type': 'application/json', @@ -295,7 +295,7 @@ function submitLeave() { function cancelLeave(id) { if (!confirm('신청을 취소하시겠습니까? 승인된 건은 연차가 복원됩니다.')) return; - fetch('/admin/hr/leaves/' + id + '/cancel', { + fetch('/api/admin/hr/leaves/' + id + '/cancel', { method: 'POST', headers: { 'Content-Type': 'application/json', @@ -317,7 +317,7 @@ function cancelLeave(id) { function deleteLeave(id) { if (!confirm('신청을 삭제하시겠습니까?')) return; - fetch('/admin/hr/leaves/' + id, { + fetch('/api/admin/hr/leaves/' + id, { method: 'DELETE', headers: { 'X-CSRF-TOKEN': document.querySelector('meta[name="csrf-token"]').content,