@extends('layouts.app') @section('title', 'Workflow Actor Assignment') @push('stylesheets') @endpush @section('contents')
Assign current actor and workflow stage on in-flight PC-I, PC-II, or Concept Note records. Changes write an internal forward row and this screen’s audit log; they are hidden from the scheme workflow timeline. The PC listing status column and actor actions follow stage/actor labels after an admin assignment — post-forum Awaiting Advice and Generate Advice are suppressed until the scheme is forwarded again normally. The separate Modified badge reflects is_modified and is independent of workflow stage.

1. Select scheme

@php $waaSelectedId = $selected['id'] ?? ''; $waaSelectedName = $selected['text'] ?? ''; $waaSelectedAdp = ($selected['adp'] ?? '') !== '' ? $selected['adp'] : '—'; $waaSelectedUid = ($selected['uid'] ?? '') !== '' ? $selected['uid'] : '—'; $waaLookupUrl = route('admin-controls.workflow-actor-assignment.search'); @endphp
@if ($snapshot)

2. Current state — {{ $snapshot['label'] }}

Scheme
{{ $snapshot['scheme_name'] }}
ADP
{{ $snapshot['adp'] }}
UID
{{ $snapshot['uid'] }}
State
{{ $snapshot['state'] }}
Active
{{ $snapshot['status'] ? 'Yes' : 'No' }}
Workflow stage
{{ $snapshot['workflow_stage_label'] }} {{ $snapshot['workflow_stage'] ?: '—' }}
PC listing status
{{ $snapshot['listing_status_label'] ?? '—' }}@if(!empty($snapshot['is_modified'])) Modified@endif
@if (! empty($snapshot['forum_status_label']) && ($snapshot['forum_status_label'] ?? '') !== ($snapshot['listing_status_label'] ?? ''))
Forum-derived label
{{ $snapshot['forum_status_label'] }} (without admin stage override)
@endif
Current actor
{{ $snapshot['current_actor_name'] }}@if($snapshot['current_actor_id'] > 0) (#{{ $snapshot['current_actor_id'] }})@endif
Designation
{{ $snapshot['current_actor_designation'] }}
Revision badge
{{ $snapshot['revision_label'] }}
Revised
{{ $snapshot['is_revised'] ? 'Yes' : 'No' }}@if($snapshot['revision_version']) (v{{ $snapshot['revision_version'] }})@endif
Modified
{{ $snapshot['is_modified'] ? 'Yes' : 'No' }}
@if (! empty($snapshot['locked']))
{{ $snapshot['locked_reason'] }}
@elseif ($canAssign || $canMarkRevision)
@csrf @if ($canAssign)
Assign actor & stage
Must be an active, non–view-only user.
@endif @if ($canMarkRevision)
Revision flags
Sets is_revised; version follows chain order.
Sets is_modified on this record.

Uncheck both boxes on submit to leave revision flags unchanged. To clear a flag, contact an administrator — this screen only sets flags when checked.

@endif
@else

You can view scheme details but do not have assign or revision permissions.

@endif
@if (! empty($snapshot['recent_assignments']))

Recent assignments (this record)

@foreach ($snapshot['recent_assignments'] as $log) @endforeach
When By Actor Stage Revised Modified Remarks
{{ $log['created_at'] }} {{ $log['performed_by'] }} {{ $log['previous_actor'] }} → {{ $log['new_actor'] }} {{ $log['previous_stage'] ?? '—' }} → {{ $log['new_stage'] ?? '—' }} @if($log['new_is_revised'] !== null) {{ $log['previous_is_revised'] ? 'Y' : 'N' }}→{{ $log['new_is_revised'] ? 'Y' : 'N' }} @else — @endif @if($log['new_is_modified'] !== null) {{ $log['previous_is_modified'] ? 'Y' : 'N' }}→{{ $log['new_is_modified'] ? 'Y' : 'N' }} @else — @endif {{ \Illuminate\Support\Str::limit($log['remarks'], 80) }}
@endif @endif @if ($canViewLogs && ! empty($logs['data']))

Assignment audit log

@foreach ($logs['data'] as $log) @endforeach
When Entity By Actor change Stage change Remarks
{{ $log['created_at'] }} {{ $log['entity_type'] }} #{{ $log['entity_id'] }} {{ $log['performed_by'] }} {{ $log['previous_actor'] }} → {{ $log['new_actor'] }} {{ $log['previous_stage'] ?? '—' }} → {{ $log['new_stage'] ?? '—' }} {{ \Illuminate\Support\Str::limit($log['remarks'], 80) }}
@endif
@endsection @push('scripts') @endpush