fix: [approvals] 재직증명서 양식에 대표자명/회사주소 누락 수정
- 재직증명서 폼/제출/미리보기/PDF에 ceo_name, company_address 추가 - tenants 테이블에서 가져온 회사 정보를 모든 기안 양식에 통일 적용 - 경력/위촉/사직서는 이미 정상 처리, 재직증명서만 누락되어 있었음
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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) {
|
||||
|
||||
<div style="text-align:center; margin-top:32px;">
|
||||
<p style="font-size:16px; font-weight:600; margin-bottom:8px;">${e(d.company)}</p>
|
||||
<p style="font-size:14px; color:#555;">대표이사 (인)</p>
|
||||
<p style="font-size:14px; color:#555;">대표이사 ${e(d.ceoName)} (인)</p>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
<div style="text-align:center; margin-top:32px;">
|
||||
<p style="font-size:16px; font-weight:600; margin-bottom:8px;">${e(d.company)}</p>
|
||||
<p style="font-size:14px; color:#555;">대표이사 (인)</p>
|
||||
<p style="font-size:14px; color:#555;">대표이사 ${e(d.ceoName)} (인)</p>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
@endphp
|
||||
|
||||
<div id="cert-form-container" style="display: none;" class="mb-4">
|
||||
<input type="hidden" id="cert-ceo-name" value="">
|
||||
<input type="hidden" id="cert-company-address" value="">
|
||||
<div class="space-y-4">
|
||||
{{-- 대상 사원 --}}
|
||||
<div>
|
||||
|
||||
@@ -734,6 +734,7 @@ function openCertShowPreview() {
|
||||
hireDate: c.hire_date || '-',
|
||||
purpose: c.purpose || '-',
|
||||
issueDateFormatted: issueDateFormatted,
|
||||
ceoName: c.ceo_name || '-',
|
||||
});
|
||||
|
||||
document.getElementById('cert-show-preview-modal').style.display = '';
|
||||
@@ -784,7 +785,7 @@ function _buildCertHtml(d) {
|
||||
<p style="text-align:center; font-size:15px; font-weight:500; margin-bottom:48px;">${e(d.issueDateFormatted)}</p>
|
||||
<div style="text-align:center; margin-top:32px;">
|
||||
<p style="font-size:16px; font-weight:600; margin-bottom:8px;">${e(d.company)}</p>
|
||||
<p style="font-size:14px; color:#555;">대표이사 (인)</p>
|
||||
<p style="font-size:14px; color:#555;">대표이사 ${e(d.ceoName)} (인)</p>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user