@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
|
@if ($openSchemeFirst)
@elseif ($hasPc)
@elseif ($hasPcn)
@else
@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
|