diff --git a/resources/views/hr/employees/partials/salary-info.blade.php b/resources/views/hr/employees/partials/salary-info.blade.php
index 2e419930..f53dc51c 100644
--- a/resources/views/hr/employees/partials/salary-info.blade.php
+++ b/resources/views/hr/employees/partials/salary-info.blade.php
@@ -99,7 +99,8 @@ class="px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-
적용일 |
비고 |
기록일 |
- 기록자 |
+ 기록자 |
+ 삭제 |
@@ -109,7 +110,17 @@ class="px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-
|
|
|
- |
+ |
+
+
+ |
@@ -143,6 +154,29 @@ function salaryManager() {
return isNaN(num) ? '' : num;
},
+ async deleteHistory(originalIndex) {
+ if (!confirm('이 연봉 이력을 삭제하시겠습니까?')) return;
+ try {
+ const res = await fetch(`/api/admin/hr/employees/{{ $employee->id }}/salary/history/${originalIndex}`, {
+ method: 'DELETE',
+ headers: {
+ 'X-CSRF-TOKEN': '{{ csrf_token() }}',
+ 'Accept': 'application/json',
+ 'X-Requested-With': 'XMLHttpRequest',
+ },
+ });
+ const json = await res.json();
+ if (json.success) {
+ this.salaryData = json.data;
+ showToast(json.message, 'success');
+ } else {
+ showToast(json.message || '삭제에 실패했습니다.', 'error');
+ }
+ } catch (e) {
+ showToast('이력 삭제 중 오류가 발생했습니다.', 'error');
+ }
+ },
+
async saveSalary() {
this.saving = true;
try {