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,