feat: [hr] 사원등록 기능 확장

- 기본정보에 주민등록번호 필드 추가
- 급여이체정보 섹션 추가 (이체은행, 예금주, 계좌번호)
- 부양가족 정보 섹션 추가 (동적 행 추가/삭제)
- 첨부파일 업로드/다운로드/삭제 기능 추가
- 은행 목록 config/banks.php 설정 파일 생성
- show 페이지 주민등록번호 뒷자리 마스킹 처리
This commit is contained in:
김보곤
2026-02-26 19:59:15 +09:00
parent 5e06f53d2d
commit 2edce0d282
9 changed files with 739 additions and 12 deletions

View File

@@ -85,6 +85,16 @@ class="inline-flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 te
<div class="shrink-0 text-sm font-medium text-gray-500" style="width: 140px;">연락처</div>
<div class="text-sm text-gray-900">{{ $employee->user?->phone ?? '-' }}</div>
</div>
<div class="px-6 py-3 flex" style="flex-wrap: wrap;">
<div class="shrink-0 text-sm font-medium text-gray-500" style="width: 140px;">주민등록번호</div>
<div class="text-sm text-gray-900">
@if($employee->resident_number)
{{ Str::mask($employee->resident_number, '*', 8) }}
@else
-
@endif
</div>
</div>
{{-- 근무 정보 --}}
<div class="px-6 py-4 bg-gray-50">
@@ -142,6 +152,105 @@ class="inline-flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 te
<div class="shrink-0 text-sm font-medium text-gray-500" style="width: 140px;">수정일</div>
<div class="text-sm text-gray-900">{{ $employee->updated_at?->format('Y-m-d H:i') ?? '-' }}</div>
</div>
{{-- 급여이체정보 --}}
<div class="px-6 py-4 bg-gray-50">
<span class="text-sm font-semibold text-gray-600">급여이체정보</span>
</div>
@php $bankAccount = $employee->bank_account ?? []; @endphp
<div class="px-6 py-3 flex" style="flex-wrap: wrap;">
<div class="shrink-0 text-sm font-medium text-gray-500" style="width: 140px;">이체은행</div>
<div class="text-sm text-gray-900">{{ $bankAccount['bank_name'] ?? '-' }}</div>
</div>
<div class="px-6 py-3 flex" style="flex-wrap: wrap;">
<div class="shrink-0 text-sm font-medium text-gray-500" style="width: 140px;">예금주</div>
<div class="text-sm text-gray-900">{{ $bankAccount['account_holder'] ?? '-' }}</div>
</div>
<div class="px-6 py-3 flex" style="flex-wrap: wrap;">
<div class="shrink-0 text-sm font-medium text-gray-500" style="width: 140px;">계좌번호</div>
<div class="text-sm text-gray-900">{{ $bankAccount['account_number'] ?? '-' }}</div>
</div>
{{-- 부양가족 정보 --}}
<div class="px-6 py-4 bg-gray-50">
<span class="text-sm font-semibold text-gray-600">부양가족 정보</span>
</div>
@php $dependents = $employee->dependents ?? []; @endphp
@if(count($dependents) > 0)
<div class="px-6 py-3">
<div class="overflow-x-auto">
<table class="w-full text-sm">
<thead>
<tr class="border-b border-gray-200 text-gray-500">
<th class="text-left py-2 pr-3 font-medium">이름</th>
<th class="text-left py-2 pr-3 font-medium">/외국인</th>
<th class="text-left py-2 pr-3 font-medium">주민등록번호</th>
<th class="text-left py-2 pr-3 font-medium">관계</th>
<th class="text-left py-2 pr-3 font-medium">장애인</th>
<th class="text-left py-2 font-medium">피부양자</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-100">
@foreach($dependents as $dep)
<tr class="text-gray-900">
<td class="py-2 pr-3">{{ $dep['name'] ?? '-' }}</td>
<td class="py-2 pr-3">{{ ($dep['nationality'] ?? 'korean') === 'korean' ? '내국인' : '외국인' }}</td>
<td class="py-2 pr-3">
@if(!empty($dep['resident_number']))
{{ Str::mask($dep['resident_number'], '*', 8) }}
@else
-
@endif
</td>
<td class="py-2 pr-3">
@switch($dep['relationship'] ?? '')
@case('spouse') 배우자 @break
@case('child') 자녀 @break
@case('parent') 부모 @break
@case('sibling') 형제자매 @break
@case('grandparent') 조부모 @break
@case('other') 기타 @break
@default - @break
@endswitch
</td>
<td class="py-2 pr-3">{{ !empty($dep['is_disabled']) ? 'Y' : 'N' }}</td>
<td class="py-2">{{ !empty($dep['is_dependent']) ? 'Y' : 'N' }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@else
<div class="px-6 py-3">
<p class="text-sm text-gray-400">등록된 부양가족이 없습니다.</p>
</div>
@endif
{{-- 첨부파일 --}}
<div class="px-6 py-4 bg-gray-50">
<span class="text-sm font-semibold text-gray-600">첨부파일</span>
</div>
@if(!empty($files) && count($files) > 0)
<div class="px-6 py-3 space-y-2">
@foreach($files as $file)
<div class="flex items-center gap-2">
<svg class="w-4 h-4 text-gray-400 shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13"/>
</svg>
<a href="{{ route('api.admin.hr.employees.download-file', [$employee->id, $file->id]) }}"
class="text-sm text-blue-600 hover:text-blue-800">
{{ $file->original_name }}
</a>
<span class="text-xs text-gray-400">{{ number_format(($file->file_size ?? 0) / 1024, 0) }}KB</span>
</div>
@endforeach
</div>
@else
<div class="px-6 py-3">
<p class="text-sm text-gray-400">등록된 파일이 없습니다.</p>
</div>
@endif
</div>
</div>
</div>