PC-IV Workflow
Option D — Phase → State → Transition (Action + Who → Next state). Super Admin can add stages/states and edit the flow here.
Check
@if ($canEdit)
Save
Add stage
Reset defaults
@endif
{{ (int) ($summary['stages'] ?? 0) }} stages
{{ (int) ($summary['sub_stages'] ?? 0) }} states
{{ (int) ($summary['transitions'] ?? 0) }} transitions
{{ (int) ($summary['errors'] ?? 0) }} errors
{{ (int) ($summary['warnings'] ?? 0) }} warnings
@forelse ($issues as $issue)
@php $sev = (string) ($issue['severity'] ?? 'info'); @endphp
{{ strtoupper($sev) }} — {{ $issue['message'] ?? '' }}
@empty
No issues — workflow looks healthy.
@endforelse
@foreach (($definition['stages'] ?? []) as $stage)
@include('admin-controls.partials.pc-iv-wf-stage', ['stage' => $stage, 'canEdit' => $canEdit, 'actions' => $actions, 'allSubs' => $allSubs, 'whoCat' => $whoCat, 'catalog' => $catalog])
@endforeach
How it works: each state lists transitions .
A transition = Action + Who may do it + Next state.
Live cases use these rules for forward / return / edit (not the old permission checkboxes).