feat: [hr] 사원관리 퇴직자 영구삭제 기능 추가
- 슈퍼관리자만 퇴직 상태 사원을 영구삭제 가능
- 관련 첨부파일도 함께 삭제
- DELETE /admin/hr/employees/{id}/force 엔드포인트 추가
This commit is contained in:
@@ -143,6 +143,21 @@ class="text-red-600 hover:text-red-800" title="퇴직처리">
|
||||
</svg>
|
||||
</button>
|
||||
@endif
|
||||
|
||||
{{-- 영구삭제 (퇴직자 + 슈퍼관리자만) --}}
|
||||
@if($employee->employee_status === 'resigned' && auth()->user()?->is_super_admin)
|
||||
<button type="button"
|
||||
hx-delete="{{ route('api.admin.hr.employees.force-destroy', $employee->id) }}"
|
||||
hx-headers='{"X-CSRF-TOKEN": "{{ csrf_token() }}"}'
|
||||
hx-target="#employees-table"
|
||||
hx-swap="innerHTML"
|
||||
hx-confirm="⚠️ {{ $employee->display_name ?? $employee->user?->name }}님의 사원 정보를 영구삭제하시겠습니까? 이 작업은 되돌릴 수 없습니다."
|
||||
class="text-red-400 hover:text-red-600" title="영구삭제">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"/>
|
||||
</svg>
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user