@php
$firstStep = $approval->steps->whereIn('step_type', ['approval', 'agreement'])->sortBy('step_order')->first();
$canCancel = $firstStep && in_array($firstStep->status, ['pending', 'on_hold']);
@endphp
@if($canCancel)
진행 중인 결재를 취소합니다.
@else
첫 번째 결재자가 이미 처리하여 회수할 수 없습니다.
@endif
@endif
{{-- 복사 재기안 (완료/반려/회수 상태에서 기안자만) --}}
@if($approval->isCopyable() && $approval->drafter_id === auth()->id())