feat: [approval] 반려 이력 관리 기능 추가

- rejection_history JSON 컬럼으로 반려 이력 누적 저장
- 재상신 시 반려자, 사유, 일시를 이력에 기록
- 상세 페이지에 반려 이력 섹션 표시 (빨간 테두리)
- 수정 페이지에 이전 반려 이력 표시 (주황 배경)
This commit is contained in:
김보곤
2026-03-05 13:50:45 +09:00
parent 5fd69830ca
commit 9727a092e6
4 changed files with 65 additions and 1 deletions

View File

@@ -35,6 +35,28 @@
</div>
@endif
{{-- 반려 이력 (재상신 문서인 경우) --}}
@if(!empty($approval->rejection_history))
<div class="bg-orange-50 border border-orange-200 p-4 mb-6 rounded-lg" style="max-width: 960px; margin-left: auto; margin-right: auto;">
<h4 class="text-sm font-semibold text-orange-800 mb-2 flex items-center gap-2">
이전 반려 이력
<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-orange-200 text-orange-700">{{ count($approval->rejection_history) }}</span>
</h4>
<div class="space-y-2">
@foreach($approval->rejection_history as $history)
<div class="text-sm border-l-2 border-orange-300 pl-3 py-1">
<div class="flex items-center gap-2">
<span class="text-xs font-medium text-orange-600">{{ $history['round'] ?? '-' }}</span>
<span class="font-medium text-gray-800">{{ $history['approver_name'] ?? '' }}</span>
<span class="text-gray-400 text-xs">{{ $history['rejected_at'] ?? '' }}</span>
</div>
<p class="text-gray-600 mt-0.5">{{ $history['comment'] ?? '' }}</p>
</div>
@endforeach
</div>
</div>
@endif
<div class="mx-auto" style="max-width: 960px;">
<div class="bg-white rounded-lg shadow-sm p-6">
<h2 class="text-lg font-semibold text-gray-800 mb-4">문서 내용</h2>