- 셀 패딩 10px→16px, min-width 64px→96px - 기본 폰트 12px→15px, 도장 32px→42px - 결재 헤더 13px→16px, 이름/날짜 비례 확대
84 lines
4.9 KiB
PHP
84 lines
4.9 KiB
PHP
{{--
|
|
결재서명란 (전통 테이블 형식)
|
|
Props:
|
|
$approval (Approval model) - 결재 문서
|
|
--}}
|
|
@php
|
|
$drafter = $approval->drafter;
|
|
$approverSteps = $approval->steps->whereIn('step_type', ['approval', 'agreement'])->sortBy('step_order')->values();
|
|
@endphp
|
|
|
|
<table style="border-collapse: collapse; border: 2px solid #4338ca; font-size: 15px; min-width: 180px;">
|
|
<tbody>
|
|
{{-- 1행: 직급/역할 --}}
|
|
<tr>
|
|
<td rowspan="3" style="border: 1px solid #a5b4fc; padding: 6px 8px; text-align: center; font-weight: 700; color: #4338ca; background: #eef2ff; writing-mode: vertical-rl; letter-spacing: 8px; width: 36px; font-size: 16px;">
|
|
결재
|
|
</td>
|
|
<td style="border: 1px solid #c7d2fe; padding: 6px 16px; text-align: center; font-weight: 600; color: #374151; background: #f9fafb; min-width: 96px; white-space: nowrap;">
|
|
작성자
|
|
</td>
|
|
@foreach($approverSteps as $step)
|
|
<td style="border: 1px solid #c7d2fe; padding: 6px 16px; text-align: center; font-weight: 600; color: #374151; background: #f9fafb; min-width: 96px; white-space: nowrap;">
|
|
{{ $step->approver_position ?: ($step->step_type === 'agreement' ? '합의' : '결재') }}
|
|
</td>
|
|
@endforeach
|
|
</tr>
|
|
{{-- 2행: 서명/도장 영역 --}}
|
|
<tr>
|
|
<td style="border: 1px solid #c7d2fe; padding: 8px 16px; text-align: center; height: 56px; vertical-align: middle;">
|
|
@if(in_array($approval->status, ['pending', 'approved', 'rejected', 'cancelled', 'on_hold']))
|
|
<span style="color: #2563eb; font-size: 14px; font-weight: 500;">{{ $drafter?->name ?? '-' }}</span>
|
|
@endif
|
|
</td>
|
|
@foreach($approverSteps as $step)
|
|
<td style="border: 1px solid #c7d2fe; padding: 8px 16px; text-align: center; height: 56px; vertical-align: middle;">
|
|
@if($step->status === 'approved')
|
|
@if(($step->approval_type ?? 'normal') === 'pre_decided')
|
|
<div style="display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 2px solid #6366f1; border-radius: 50%; color: #6366f1; font-size: 12px; font-weight: 700; line-height: 1;">
|
|
전결
|
|
</div>
|
|
@else
|
|
<div style="display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 2px solid #dc2626; border-radius: 50%; color: #dc2626; font-size: 12px; font-weight: 700; line-height: 1;">
|
|
승인
|
|
</div>
|
|
@endif
|
|
@elseif($step->status === 'rejected')
|
|
<div style="display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 2px solid #dc2626; border-radius: 50%; color: #dc2626; font-size: 12px; font-weight: 700; line-height: 1;">
|
|
반려
|
|
</div>
|
|
@elseif($step->status === 'on_hold')
|
|
<div style="display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 2px solid #d97706; border-radius: 50%; color: #d97706; font-size: 12px; font-weight: 700; line-height: 1;">
|
|
보류
|
|
</div>
|
|
@elseif($step->status === 'skipped')
|
|
<span style="color: #9ca3af; font-size: 13px;">-</span>
|
|
@endif
|
|
</td>
|
|
@endforeach
|
|
</tr>
|
|
{{-- 3행: 이름 + 처리일시 --}}
|
|
<tr>
|
|
<td style="border: 1px solid #c7d2fe; padding: 5px 16px; text-align: center; white-space: nowrap;">
|
|
@if(in_array($approval->status, ['pending', 'approved', 'rejected', 'cancelled', 'on_hold']))
|
|
<div style="font-size: 13px; color: #6b7280;">
|
|
{{ $approval->drafted_at?->format('m/d') ?? '' }}
|
|
</div>
|
|
@endif
|
|
</td>
|
|
@foreach($approverSteps as $step)
|
|
<td style="border: 1px solid #c7d2fe; padding: 5px 16px; text-align: center; white-space: nowrap;">
|
|
<div style="font-size: 14px; color: #374151; font-weight: 500;">
|
|
{{ $step->approver_name ?? ($step->approver?->name ?? '') }}
|
|
</div>
|
|
@if($step->acted_at)
|
|
<div style="font-size: 13px; color: #6b7280;">
|
|
{{ $step->acted_at->format('m/d') }}
|
|
</div>
|
|
@endif
|
|
</td>
|
|
@endforeach
|
|
</tr>
|
|
</tbody>
|
|
</table>
|