@php $pcFormId = (int) ($row['pc_form_id'] ?? 0); $pcnId = (int) ($row['pcn_id'] ?? 0); $projectId = (int) ($row['project_id'] ?? 0); $openMode = (string) ($row['open_mode'] ?? ''); // Approved + UR → scheme details first (Generate PC from footer), not PC preview / Select PC. $openSchemeFirst = $openMode === 'generate_pc' && $projectId > 0; $hasPc = $pcFormId > 0 && ! $openSchemeFirst; $hasPcn = ! $hasPc && ! $openSchemeFirst && $pcnId > 0; $schemeName = (string) ($row['scheme_name'] ?? '—'); @endphp {{ $row['adp_number'] }} {{ $row['uid'] }} @if ($openSchemeFirst)
{{ $schemeName }}
@elseif ($hasPc)
{{ $schemeName }}
@elseif ($hasPcn)
{{ $schemeName }}
@else
{{ $schemeName }}
@endif @php $statusAction = (string) ($row['status_action'] ?? $row['status_label'] ?? $row['status'] ?? '—'); $statusFor = (string) ($row['status_for'] ?? ''); $statusTitle = $statusFor !== '' ? trim($statusAction.' · '.$statusFor) : $statusAction; $actor = (string) ($row['current_actor'] ?? ''); $actorIsPerson = (bool) ($row['actor_is_person'] ?? false); $showActor = $actorIsPerson && $actor !== '' && ! in_array($actor, ['—', '-'], true); @endphp
{{ $statusAction }} @if ($statusFor !== '') for: {{ $statusFor }} @endif @if (! empty($row['revision_label'])) {{ $row['revision_label'] }} @endif @if (! empty($row['is_modified'])) Modified @endif @if (! empty($row['pc_form_kind_label'])) {{ $row['pc_form_kind_label'] }} @endif
@if ($showActor) to: {{ $actor }} @endif
{{ $row['received_date'] ?? '—' }} {{ $row['submission_date'] ?? '—' }} {{ $row['created_on'] ?? '—' }}