fix: [approvals] 재직/경력증명서 주민번호 전체 표시 (마스킹 제거)
- 재직증명서: 주민번호 뒷자리 ****** 마스킹 제거, 전체 표시 - 경력증명서: 주민등록번호 필드 추가 (폼/조회/미리보기/PDF) - EmploymentCertService: maskedResident 로직 제거 - CareerCertService: resident_number 반환 추가, PDF 행 추가
This commit is contained in:
@@ -62,6 +62,7 @@ public function getCertInfo(int $userId, int $tenantId): array
|
||||
|
||||
return [
|
||||
'name' => $employee->user->name ?? $employee->display_name ?? '',
|
||||
'resident_number' => $residentNumber,
|
||||
'birth_date' => $birthDate,
|
||||
'address' => $employee->address ?? '',
|
||||
'department' => $employee->department?->name ?? '',
|
||||
@@ -108,6 +109,9 @@ public function generatePdfResponse(array $content): \Illuminate\Http\Response
|
||||
|
||||
$this->addTableRow($pdf, $font, [
|
||||
['성 명', $content['name'] ?? '-', 40],
|
||||
['주민등록번호', $content['resident_number'] ?? '-', 40],
|
||||
]);
|
||||
$this->addTableRow($pdf, $font, [
|
||||
['생년월일', $content['birth_date'] ?? '-', 40],
|
||||
]);
|
||||
$this->addTableRow($pdf, $font, [
|
||||
|
||||
@@ -43,15 +43,11 @@ public function getCertInfo(int $userId, int $tenantId): array
|
||||
$displayName = $displaySetting?->setting_value ?? '';
|
||||
$companyName = ! empty($displayName) ? $displayName : ($tenant->company_name ?? '');
|
||||
|
||||
$residentNumber = $employee->resident_number;
|
||||
$maskedResident = $residentNumber
|
||||
? substr($residentNumber, 0, 8).'******'
|
||||
: '';
|
||||
$residentNumber = $employee->resident_number ?? '';
|
||||
|
||||
return [
|
||||
'name' => $employee->user->name ?? $employee->display_name ?? '',
|
||||
'resident_number' => $maskedResident,
|
||||
'resident_number_full' => $residentNumber ?? '',
|
||||
'resident_number' => $residentNumber,
|
||||
'address' => $employee->address ?? '',
|
||||
'department' => $employee->department?->name ?? '',
|
||||
'position' => $employee->position_label ?? '',
|
||||
|
||||
@@ -897,6 +897,7 @@ function applyBodyTemplate(formId) {
|
||||
formContent = {
|
||||
cert_user_id: document.getElementById('cc-user-id').value,
|
||||
name: document.getElementById('cc-name').value,
|
||||
resident_number: document.getElementById('cc-resident').value,
|
||||
birth_date: document.getElementById('cc-birth-date').value,
|
||||
address: document.getElementById('cc-address').value,
|
||||
department: document.getElementById('cc-department').value,
|
||||
@@ -1248,6 +1249,7 @@ function printCertPreview() {
|
||||
if (data.success) {
|
||||
const d = data.data;
|
||||
document.getElementById('cc-name').value = d.name || '';
|
||||
document.getElementById('cc-resident').value = d.resident_number || '';
|
||||
document.getElementById('cc-birth-date').value = d.birth_date || '';
|
||||
document.getElementById('cc-address').value = d.address || '';
|
||||
document.getElementById('cc-company').value = d.company_name || '';
|
||||
@@ -1289,6 +1291,7 @@ function getCareerCertPurpose() {
|
||||
|
||||
function openCareerCertPreview() {
|
||||
const name = document.getElementById('cc-name').value || '-';
|
||||
const residentNumber = document.getElementById('cc-resident').value || '-';
|
||||
const birthDate = document.getElementById('cc-birth-date').value || '-';
|
||||
const address = document.getElementById('cc-address').value || '-';
|
||||
const company = document.getElementById('cc-company').value || '-';
|
||||
@@ -1306,7 +1309,7 @@ function openCareerCertPreview() {
|
||||
const issueDateFormatted = issueDate !== '-' ? issueDate.replace(/-/g, function(m, i) { return i === 4 ? '년 ' : '월 '; }) + '일' : '-';
|
||||
|
||||
const el = document.getElementById('career-cert-preview-content');
|
||||
el.innerHTML = buildCareerCertPreviewHtml({ name, birthDate, address, company, businessNum, ceoName, phone, companyAddress, department, position, hireDate, resignDate, jobDescription, purpose, issueDateFormatted });
|
||||
el.innerHTML = buildCareerCertPreviewHtml({ name, residentNumber, birthDate, address, company, businessNum, ceoName, phone, companyAddress, department, position, hireDate, resignDate, jobDescription, purpose, issueDateFormatted });
|
||||
|
||||
document.getElementById('career-cert-preview-modal').style.display = '';
|
||||
document.body.style.overflow = 'hidden';
|
||||
@@ -1342,8 +1345,14 @@ function buildCareerCertPreviewHtml(d) {
|
||||
<tr>
|
||||
<th style="${thStyle}">성 명</th>
|
||||
<td style="${tdStyle}">${e(d.name)}</td>
|
||||
<th style="${thStyle}">주민등록번호</th>
|
||||
<td style="${tdStyle}">${e(d.residentNumber)}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="${thStyle}">생년월일</th>
|
||||
<td style="${tdStyle}">${e(d.birthDate)}</td>
|
||||
<th style="${thStyle}"></th>
|
||||
<td style="${tdStyle}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="${thStyle}">주 소</th>
|
||||
|
||||
@@ -46,6 +46,11 @@ class="shrink-0 px-3 py-2 bg-indigo-50 text-indigo-600 hover:bg-indigo-100 borde
|
||||
<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
|
||||
|
||||
@@ -34,6 +34,10 @@ class="px-3 py-1.5 bg-green-50 text-green-600 hover:bg-green-100 border border-g
|
||||
<span class="text-xs text-gray-500">성명</span>
|
||||
<div class="text-sm font-medium mt-0.5">{{ $content['name'] ?? '-' }}</div>
|
||||
</div>
|
||||
<div>
|
||||
<span class="text-xs text-gray-500">주민등록번호</span>
|
||||
<div class="text-sm font-medium mt-0.5">{{ $content['resident_number'] ?? '-' }}</div>
|
||||
</div>
|
||||
<div>
|
||||
<span class="text-xs text-gray-500">생년월일</span>
|
||||
<div class="text-sm font-medium mt-0.5">{{ $content['birth_date'] ?? '-' }}</div>
|
||||
|
||||
Reference in New Issue
Block a user