交接審核管理
返回清單
@if(auth()->user()->role === 'admin')
@endif
歷史審核紀錄
@foreach(['success','error'] as $t)
@if(session($t))
{{ session($t) }}
@endif
@endforeach
@php $user = auth()->user(); @endphp
@if($user->role === 'supervisor')
{{-- Supervisor: pending approvals waiting for them --}}
@if($pending->isEmpty())
@else
| 申請人 |
類型 |
預計日期 |
目前關卡 |
送出時間 |
|
@foreach($pending as $a)
@php $h = $a->handover; $sl = $h->statusLabel(); @endphp
| {{ $h->applicant->name }} |
{{ $h->type === 'resignation' ? '離職' : '調職' }} |
{{ $h->expected_date?->format('Y-m-d') ?? '—' }} |
{{ $sl['label'] }} |
{{ $h->updated_at->format('Y-m-d') }} |
審核
|
@endforeach
@endif
{{-- Pipeline: handovers heading toward this supervisor's stage --}}
@if($inProgress->isNotEmpty())
| 申請人 |
類型 |
預計日期 |
目前關卡 |
|
@foreach($inProgress as $h)
@php $sl = $h->statusLabel(); @endphp
| {{ $h->applicant->name }} |
{{ $h->type === 'resignation' ? '離職' : '調職' }} |
{{ $h->expected_date?->format('Y-m-d') ?? '—' }} |
{{ $sl['label'] }} |
檢視
|
@endforeach
@endif
@else
{{-- Admin: boss-stage pending first, then other in-progress --}}
{{-- 待營運長核准 --}}
@if($pending->isNotEmpty())
| 申請人 | 類型 | 預計日期 | 送出時間 | |
@foreach($pending as $a)
@php $h = $a->handover; @endphp
| {{ $h->applicant->name }} |
{{ $h->type === 'resignation' ? '離職' : '調職' }} |
{{ $h->expected_date?->format('Y-m-d') ?? '—' }} |
{{ $h->updated_at->format('Y-m-d') }} |
審核
|
@endforeach
@endif
{{-- 其他在途(尚未到營運長關卡) --}}
@if($byStage->isNotEmpty())
@foreach(\App\Models\Handover::STAGES as $status => $info)
@if($status === 'stage_5') @continue @endif
@php $group = $byStage[$status] ?? collect(); @endphp
@if($group->isNotEmpty())
@php $sl = \App\Models\Handover::STATUS_LABELS[$status]; @endphp
| 申請人 | 類型 | 預計日期 | 送出時間 | |
@foreach($group as $h)
| {{ $h->applicant->name }} |
{{ $h->type === 'resignation' ? '離職' : '調職' }} |
{{ $h->expected_date?->format('Y-m-d') ?? '—' }} |
{{ $h->updated_at->format('Y-m-d') }} |
查看
|
@endforeach
@endif
@endforeach
@endif
@if($pending->isEmpty() && $byStage->isEmpty())
@endif
@endif
@endsection