{{-- resources/views/workflows/approvals/previews/CAPA_LINKAGE.blade.php --}} @php /** * @var \App\Models\DeviationMaster $record (the deviation) * @var \App\Models\UniversalApprovalInstance $instance */ $pendingLink = $record->capaLinkages ->firstWhere('approval_instance_id', $instance->instance_id ?? null); @endphp
CAPA Linkage Approval for {{ $record->deviation_number }}
Deviation {{ $record->deviation_number }} — {{ $record->title }}
Classification @php $classification = $record->assessment?->classification; @endphp @if($classification) {{ $classification instanceof \BackedEnum ? $classification->value : (string) $classification }} @else Not classified @endif
Current Phase Phase {{ $record->current_phase }} of 5
Department {{ $record->department?->department_name ?? '—' }}
@if($pendingLink)
Proposed Linkage
CAPA @if($pendingLink->capa) {{ $pendingLink->capa->capa_number }} — {{ $pendingLink->capa->title }} @else CAPA #{{ $pendingLink->capa_id }} @endif
Linkage Type {{ $pendingLink->linkage_type }}
CAPA Priority {{ $pendingLink->capa?->priority ?? '—' }}
Submitted By {{ $pendingLink->linker?->name ?? '—' }}
Submitted At {{ $pendingLink->linked_date?->format('M j, Y H:i') ?? '—' }}
Current Status Pending approval
Approving this workflow will:
@else
No pending linkage found for this approval instance. It may have already been approved or cancelled.
@endif