- 재직증명서: 주민번호 뒷자리 ****** 마스킹 제거, 전체 표시 - 경력증명서: 주민등록번호 필드 추가 (폼/조회/미리보기/PDF) - EmploymentCertService: maskedResident 로직 제거 - CareerCertService: resident_number 반환 추가, PDF 행 추가
201 lines
13 KiB
PHP
201 lines
13 KiB
PHP
{{--
|
|
경력증명서 전용 폼
|
|
Props:
|
|
$employees (Collection) - 활성 사원 목록
|
|
--}}
|
|
@php
|
|
$employees = $employees ?? collect();
|
|
$currentUserId = auth()->id();
|
|
@endphp
|
|
|
|
<div id="career-cert-form-container" style="display: none;" class="mb-4">
|
|
<div class="space-y-4">
|
|
{{-- 대상 사원 --}}
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700 mb-1">대상 사원 <span class="text-red-500">*</span></label>
|
|
<div class="flex items-center gap-2">
|
|
<select id="cc-user-id" onchange="loadCareerCertInfo(this.value)"
|
|
class="px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"
|
|
style="max-width: 300px;">
|
|
@foreach($employees as $emp)
|
|
<option value="{{ $emp->user_id }}" {{ $emp->user_id == $currentUserId ? 'selected' : '' }}>
|
|
{{ $emp->display_name }}
|
|
</option>
|
|
@endforeach
|
|
</select>
|
|
<button type="button" onclick="openCareerCertPreview()"
|
|
class="shrink-0 px-3 py-2 bg-indigo-50 text-indigo-600 hover:bg-indigo-100 border border-indigo-200 rounded-lg text-sm font-medium transition inline-flex items-center gap-1">
|
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/>
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"/>
|
|
</svg>
|
|
미리보기
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
{{-- 인적사항 --}}
|
|
<div class="border border-gray-200 rounded-lg overflow-hidden">
|
|
<div class="bg-gray-50 px-4 py-2 border-b border-gray-200">
|
|
<h3 class="text-sm font-semibold text-gray-700">1. 인적사항</h3>
|
|
</div>
|
|
<div class="p-4 space-y-3">
|
|
<div class="flex gap-4 flex-wrap">
|
|
<div style="flex: 1 1 200px; max-width: 300px;">
|
|
<label class="block text-xs font-medium text-gray-500 mb-1">성명</label>
|
|
<input type="text" id="cc-name" readonly
|
|
class="w-full px-3 py-2 border border-gray-200 rounded-lg text-sm bg-gray-50 text-gray-700">
|
|
</div>
|
|
<div style="flex: 1 1 200px; max-width: 300px;">
|
|
<label class="block text-xs font-medium text-gray-500 mb-1">주민등록번호</label>
|
|
<input type="text" id="cc-resident" readonly
|
|
class="w-full px-3 py-2 border border-gray-200 rounded-lg text-sm bg-gray-50 text-gray-700">
|
|
</div>
|
|
<div style="flex: 1 1 200px; max-width: 300px;">
|
|
<label class="block text-xs font-medium text-gray-500 mb-1">생년월일</label>
|
|
<input type="text" id="cc-birth-date" readonly
|
|
class="w-full px-3 py-2 border border-gray-200 rounded-lg text-sm bg-gray-50 text-gray-700">
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<label class="block text-xs font-medium text-gray-500 mb-1">주소 <span class="text-blue-500 text-xs">(수정 가능)</span></label>
|
|
<input type="text" id="cc-address"
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{{-- 경력사항 --}}
|
|
<div class="border border-gray-200 rounded-lg overflow-hidden">
|
|
<div class="bg-gray-50 px-4 py-2 border-b border-gray-200">
|
|
<h3 class="text-sm font-semibold text-gray-700">2. 경력사항</h3>
|
|
</div>
|
|
<div class="p-4 space-y-3">
|
|
<div class="flex gap-4 flex-wrap">
|
|
<div style="flex: 1 1 250px;">
|
|
<label class="block text-xs font-medium text-gray-500 mb-1">회사명</label>
|
|
<input type="text" id="cc-company" readonly
|
|
class="w-full px-3 py-2 border border-gray-200 rounded-lg text-sm bg-gray-50 text-gray-700">
|
|
</div>
|
|
<div style="flex: 1 1 200px; max-width: 250px;">
|
|
<label class="block text-xs font-medium text-gray-500 mb-1">사업자번호</label>
|
|
<input type="text" id="cc-business-num" readonly
|
|
class="w-full px-3 py-2 border border-gray-200 rounded-lg text-sm bg-gray-50 text-gray-700">
|
|
</div>
|
|
</div>
|
|
<div class="flex gap-4 flex-wrap">
|
|
<div style="flex: 1 1 200px; max-width: 250px;">
|
|
<label class="block text-xs font-medium text-gray-500 mb-1">대표자</label>
|
|
<input type="text" id="cc-ceo-name" readonly
|
|
class="w-full px-3 py-2 border border-gray-200 rounded-lg text-sm bg-gray-50 text-gray-700">
|
|
</div>
|
|
<div style="flex: 1 1 200px; max-width: 250px;">
|
|
<label class="block text-xs font-medium text-gray-500 mb-1">대표전화</label>
|
|
<input type="text" id="cc-phone" readonly
|
|
class="w-full px-3 py-2 border border-gray-200 rounded-lg text-sm bg-gray-50 text-gray-700">
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<label class="block text-xs font-medium text-gray-500 mb-1">소재지</label>
|
|
<input type="text" id="cc-company-address" readonly
|
|
class="w-full px-3 py-2 border border-gray-200 rounded-lg text-sm bg-gray-50 text-gray-700">
|
|
</div>
|
|
<div class="flex gap-4 flex-wrap">
|
|
<div style="flex: 1 1 200px; max-width: 200px;">
|
|
<label class="block text-xs font-medium text-gray-500 mb-1">소속부서</label>
|
|
<input type="text" id="cc-department" readonly
|
|
class="w-full px-3 py-2 border border-gray-200 rounded-lg text-sm bg-gray-50 text-gray-700">
|
|
</div>
|
|
<div style="flex: 1 1 200px; max-width: 200px;">
|
|
<label class="block text-xs font-medium text-gray-500 mb-1">직위/직급</label>
|
|
<input type="text" id="cc-position" readonly
|
|
class="w-full px-3 py-2 border border-gray-200 rounded-lg text-sm bg-gray-50 text-gray-700">
|
|
</div>
|
|
</div>
|
|
<div class="flex gap-4 flex-wrap">
|
|
<div style="flex: 1 1 200px; max-width: 200px;">
|
|
<label class="block text-xs font-medium text-gray-500 mb-1">근무기간 (시작)</label>
|
|
<input type="text" id="cc-hire-date" readonly
|
|
class="w-full px-3 py-2 border border-gray-200 rounded-lg text-sm bg-gray-50 text-gray-700">
|
|
</div>
|
|
<div style="flex: 1 1 200px; max-width: 200px;">
|
|
<label class="block text-xs font-medium text-gray-500 mb-1">근무기간 (종료) <span class="text-blue-500 text-xs">(수정 가능)</span></label>
|
|
<input type="date" id="cc-resign-date"
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<label class="block text-xs font-medium text-gray-500 mb-1">담당업무 <span class="text-blue-500 text-xs">(수정 가능)</span></label>
|
|
<input type="text" id="cc-job-description" placeholder="예: 소프트웨어 개발, 프로젝트 관리 등"
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{{-- 발급정보 --}}
|
|
<div class="border border-gray-200 rounded-lg overflow-hidden">
|
|
<div class="bg-gray-50 px-4 py-2 border-b border-gray-200">
|
|
<h3 class="text-sm font-semibold text-gray-700">3. 발급정보</h3>
|
|
</div>
|
|
<div class="p-4 space-y-3">
|
|
<div class="flex gap-4 flex-wrap">
|
|
<div style="flex: 1 1 250px; max-width: 300px;">
|
|
<label class="block text-xs font-medium text-gray-500 mb-1">사용용도 <span class="text-red-500">*</span></label>
|
|
<select id="cc-purpose-select" onchange="onCareerCertPurposeChange()"
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
|
|
<option value="은행 제출용">은행 제출용</option>
|
|
<option value="관공서 제출용">관공서 제출용</option>
|
|
<option value="비자 신청용">비자 신청용</option>
|
|
<option value="대출 신청용">대출 신청용</option>
|
|
<option value="이직 제출용">이직 제출용</option>
|
|
<option value="__custom__">기타 (직접입력)</option>
|
|
</select>
|
|
</div>
|
|
<div id="cc-purpose-custom-wrap" style="flex: 1 1 250px; max-width: 300px; display: none;">
|
|
<label class="block text-xs font-medium text-gray-500 mb-1">직접입력</label>
|
|
<input type="text" id="cc-purpose-custom" placeholder="용도를 입력하세요"
|
|
class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
|
|
</div>
|
|
</div>
|
|
<div style="max-width: 200px;">
|
|
<label class="block text-xs font-medium text-gray-500 mb-1">발급일</label>
|
|
<input type="text" id="cc-issue-date" readonly
|
|
class="w-full px-3 py-2 border border-gray-200 rounded-lg text-sm bg-gray-50 text-gray-700"
|
|
value="{{ now()->format('Y-m-d') }}">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{{-- 경력증명서 미리보기 모달 --}}
|
|
<div id="career-cert-preview-modal" style="display: none;" class="fixed inset-0 z-50">
|
|
<div class="absolute inset-0 bg-black/50" onclick="closeCareerCertPreview()"></div>
|
|
<div class="relative flex items-center justify-center min-h-full p-4">
|
|
<div class="bg-white rounded-xl shadow-2xl w-full overflow-hidden relative" style="max-width: 700px;">
|
|
<div class="flex items-center justify-between px-5 py-3 border-b border-gray-200 bg-gray-50">
|
|
<h3 class="text-base font-semibold text-gray-800">경력증명서 미리보기</h3>
|
|
<div class="flex items-center gap-2">
|
|
<button type="button" onclick="printCareerCertPreview()"
|
|
class="px-3 py-1.5 bg-white border border-gray-300 hover:bg-gray-50 rounded-lg text-xs font-medium transition inline-flex items-center gap-1">
|
|
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z"/>
|
|
</svg>
|
|
인쇄
|
|
</button>
|
|
<button type="button" onclick="closeCareerCertPreview()"
|
|
class="p-1 text-gray-400 hover:text-gray-600 transition">
|
|
<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="M6 18L18 6M6 6l12 12"/>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="overflow-y-auto" style="max-height: 80vh;">
|
|
<div id="career-cert-preview-content" style="padding: 48px 56px; font-family: 'Pretendard', 'Malgun Gothic', sans-serif;">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|