- 모델 4개: Approval, ApprovalStep, ApprovalForm, ApprovalLine - ApprovalService: 목록/CRUD/워크플로우(상신/승인/반려/회수) 비즈니스 로직 - ApprovalApiController: JSON API 엔드포인트 (기안함/결재함/완료함/참조함) - ApprovalController: Blade 뷰 컨트롤러 (HX-Redirect 처리) - 뷰 8개: drafts, pending, completed, references, create, edit, show - partials: _status-badge, _step-progress, _approval-line-editor - api.php/web.php 라우트 등록
17 lines
709 B
PHP
17 lines
709 B
PHP
@props(['status' => 'draft'])
|
|
|
|
@php
|
|
$config = match($status) {
|
|
'draft' => ['label' => '임시저장', 'class' => 'bg-gray-100 text-gray-700'],
|
|
'pending' => ['label' => '진행', 'class' => 'bg-blue-100 text-blue-700'],
|
|
'approved' => ['label' => '완료', 'class' => 'bg-green-100 text-green-700'],
|
|
'rejected' => ['label' => '반려', 'class' => 'bg-red-100 text-red-700'],
|
|
'cancelled' => ['label' => '회수', 'class' => 'bg-yellow-100 text-yellow-700'],
|
|
default => ['label' => $status, 'class' => 'bg-gray-100 text-gray-700'],
|
|
};
|
|
@endphp
|
|
|
|
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium {{ $config['class'] }}">
|
|
{{ $config['label'] }}
|
|
</span>
|