From b05daffedb09ea4af02fe9c839964089c97686e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Fri, 6 Mar 2026 09:19:32 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[approvals]=20=EC=9E=AC=EC=A7=81?= =?UTF-8?q?=EC=A6=9D=EB=AA=85=EC=84=9C=20=EC=96=91=EC=8B=9D=EC=97=90=20?= =?UTF-8?q?=EB=8C=80=ED=91=9C=EC=9E=90=EB=AA=85/=ED=9A=8C=EC=82=AC?= =?UTF-8?q?=EC=A3=BC=EC=86=8C=20=EB=88=84=EB=9D=BD=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 재직증명서 폼/제출/미리보기/PDF에 ceo_name, company_address 추가 - tenants 테이블에서 가져온 회사 정보를 모든 기안 양식에 통일 적용 - 경력/위촉/사직서는 이미 정상 처리, 재직증명서만 누락되어 있었음 --- app/Services/EmploymentCertService.php | 5 ++--- resources/views/approvals/create.blade.php | 9 +++++++-- resources/views/approvals/edit.blade.php | 11 +++++++++-- .../approvals/partials/_certificate-form.blade.php | 2 ++ resources/views/approvals/show.blade.php | 3 ++- 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/app/Services/EmploymentCertService.php b/app/Services/EmploymentCertService.php index a22e8e27..06e66b21 100644 --- a/app/Services/EmploymentCertService.php +++ b/app/Services/EmploymentCertService.php @@ -148,10 +148,9 @@ public function generatePdfResponse(array $content): \Illuminate\Http\Response $pdf->Ln(12); // 회사명 + 대표이사 + $ceoName = $content['ceo_name'] ?? ''; $pdf->SetFont($font, 'B', 14); - $pdf->Cell(0, 10, $content['company_name'] ?? '', 0, 1, 'C'); - $pdf->SetFont($font, '', 12); - $pdf->Cell(0, 10, '대표이사 (인)', 0, 1, 'C'); + $pdf->Cell(0, 10, ($content['company_name'] ?? '').' 대표이사 '.$ceoName.' (인)', 0, 1, 'C'); $pdfContent = $pdf->Output('', 'S'); $fileName = '재직증명서_'.($content['name'] ?? '').'.pdf'; diff --git a/resources/views/approvals/create.blade.php b/resources/views/approvals/create.blade.php index 11e23655..8be7c080 100644 --- a/resources/views/approvals/create.blade.php +++ b/resources/views/approvals/create.blade.php @@ -674,6 +674,8 @@ function applyBodyTemplate(formId) { hire_date: document.getElementById('cert-hire-date').value, company_name: document.getElementById('cert-company').value, business_num: document.getElementById('cert-business-num').value, + ceo_name: document.getElementById('cert-ceo-name').value, + company_address: document.getElementById('cert-company-address').value, purpose: purpose, issue_date: document.getElementById('cert-issue-date').value, }; @@ -955,6 +957,8 @@ function closeExpenseLoadModal() { document.getElementById('cert-department').value = d.department || ''; document.getElementById('cert-position').value = d.position || ''; document.getElementById('cert-hire-date').value = d.hire_date ? d.hire_date + ' ~' : ''; + document.getElementById('cert-ceo-name').value = d.ceo_name || ''; + document.getElementById('cert-company-address').value = d.company_address || ''; } else { showToast(data.message || '사원 정보를 불러올 수 없습니다.', 'error'); } @@ -993,11 +997,12 @@ function openCertPreview() { const hireDate = document.getElementById('cert-hire-date').value || '-'; const purpose = getCertPurpose() || '-'; const issueDate = document.getElementById('cert-issue-date').value || '-'; + const ceoName = document.getElementById('cert-ceo-name').value || '-'; const issueDateFormatted = issueDate !== '-' ? issueDate.replace(/-/g, function(m, i) { return i === 4 ? '년 ' : '월 '; }) + '일' : '-'; const el = document.getElementById('cert-preview-content'); - el.innerHTML = buildCertPreviewHtml({ name, resident, address, company, businessNum, department, position, hireDate, purpose, issueDateFormatted }); + el.innerHTML = buildCertPreviewHtml({ name, resident, address, company, businessNum, department, position, hireDate, purpose, issueDateFormatted, ceoName }); document.getElementById('cert-preview-modal').style.display = ''; document.body.style.overflow = 'hidden'; @@ -1541,7 +1546,7 @@ function buildCertPreviewHtml(d) {

${e(d.company)}

-

대표이사            (인)

+

대표이사    ${e(d.ceoName)}    (인)

`; } diff --git a/resources/views/approvals/edit.blade.php b/resources/views/approvals/edit.blade.php index 1390f382..34b3894c 100644 --- a/resources/views/approvals/edit.blade.php +++ b/resources/views/approvals/edit.blade.php @@ -514,6 +514,8 @@ function applyBodyTemplate(formId) { document.getElementById('cert-department').value = certContent.department || ''; document.getElementById('cert-position').value = certContent.position || ''; document.getElementById('cert-hire-date').value = certContent.hire_date || ''; + document.getElementById('cert-ceo-name').value = certContent.ceo_name || ''; + document.getElementById('cert-company-address').value = certContent.company_address || ''; document.getElementById('cert-issue-date').value = certContent.issue_date || '{{ now()->format("Y-m-d") }}'; // 용도 복원 @@ -596,6 +598,8 @@ function applyBodyTemplate(formId) { hire_date: document.getElementById('cert-hire-date').value, company_name: document.getElementById('cert-company').value, business_num: document.getElementById('cert-business-num').value, + ceo_name: document.getElementById('cert-ceo-name').value, + company_address: document.getElementById('cert-company-address').value, purpose: purpose, issue_date: document.getElementById('cert-issue-date').value, }; @@ -704,6 +708,8 @@ function applyBodyTemplate(formId) { document.getElementById('cert-department').value = d.department || ''; document.getElementById('cert-position').value = d.position || ''; document.getElementById('cert-hire-date').value = d.hire_date ? d.hire_date + ' ~' : ''; + document.getElementById('cert-ceo-name').value = d.ceo_name || ''; + document.getElementById('cert-company-address').value = d.company_address || ''; } else { showToast(data.message || '사원 정보를 불러올 수 없습니다.', 'error'); } @@ -742,11 +748,12 @@ function openCertPreview() { const hireDate = document.getElementById('cert-hire-date').value || '-'; const purpose = getCertPurpose() || '-'; const issueDate = document.getElementById('cert-issue-date').value || '-'; + const ceoName = document.getElementById('cert-ceo-name').value || '-'; const issueDateFormatted = issueDate !== '-' ? issueDate.replace(/-/g, function(m, i) { return i === 4 ? '년 ' : '월 '; }) + '일' : '-'; const el = document.getElementById('cert-preview-content'); - el.innerHTML = buildCertPreviewHtml({ name, resident, address, company, businessNum, department, position, hireDate, purpose, issueDateFormatted }); + el.innerHTML = buildCertPreviewHtml({ name, resident, address, company, businessNum, department, position, hireDate, purpose, issueDateFormatted, ceoName }); document.getElementById('cert-preview-modal').style.display = ''; document.body.style.overflow = 'hidden'; @@ -831,7 +838,7 @@ function buildCertPreviewHtml(d) {

${e(d.company)}

-

대표이사            (인)

+

대표이사    ${e(d.ceoName)}    (인)

`; } diff --git a/resources/views/approvals/partials/_certificate-form.blade.php b/resources/views/approvals/partials/_certificate-form.blade.php index fcabdddb..f9cc054e 100644 --- a/resources/views/approvals/partials/_certificate-form.blade.php +++ b/resources/views/approvals/partials/_certificate-form.blade.php @@ -9,6 +9,8 @@ @endphp