@extends('layouts.app') @section('title', 'R9 Tools — PC #'.$pcFormId) @section('contents')
@php $issue = $page['issue']; $form = $page['form']; $wf = $page['latest_pcfms_action']; $bbms = $page['bbms'] ?? []; @endphp
Scheme
UID
{{ $issue['scheme_uid'] ?? '—' }}
ADP (BMS)
{{ ($issue['adp_number'] ?? '') !== '' ? $issue['adp_number'] : '—' }}
PC form
#{{ $form['id'] }} · {{ $form['kind'] }}
PCFMS PC1ID
{{ $issue['pc1_id'] ?? '—' }}
PCFMS status
{{ $issue['pcfms_status'] ?? '—' }}
BBMS status
{{ $bbms['label'] ?? '—' }}
{{ $bbms['note'] ?? '' }}
PMS state / label
{{ $form['state'] ?: '—' }} · {{ $form['pms_label'] }}
Active
{{ !empty($form['status']) ? 'Yes' : 'No' }}
@if (is_array($wf) && ($wf['action'] ?? '') !== '')

Latest PCFMS action

{{ $wf['action'] }} @if(($wf['date'] ?? '') !== '') ({{ $wf['date'] }})@endif

@if (($wf['remarks'] ?? '') !== '')

{!! nl2br(e(\Illuminate\Support\Str::limit(html_entity_decode(strip_tags($wf['remarks'])), 400))) !!}

@endif @endif
Tools (SDPMS course only)

These buttons change this PC’s SDPMS course only — not BBMS Approved / UR / New. Every action writes a rollback batch (see below and Acted items).

@foreach ($page['tools'] as $tool) @php $enabled = array_key_exists('enabled', $tool) ? (bool) $tool['enabled'] : true; @endphp
{{ $tool['label'] }}
{{ $tool['help'] }}
@if (! $enabled && ($tool['disabled_reason'] ?? '') !== '')
{{ $tool['disabled_reason'] }}
@endif
@if ($enabled)
@csrf
@else @endif
@endforeach
Rollback (this PC) All acted items

Undo any tool run on this scheme. Restores previous SDPMS state / flags.

@forelse (($page['batches'] ?? []) as $batch) @empty @endforelse
Batch When Action Summary
#{{ $batch['id'] }} {{ $batch['created_at'] }} {{ $batch['action'] }} {{ $batch['summary'] }} @if (! empty($batch['rolled_back'])) Rolled back @else
@csrf
@endif
No R9 tool batches for this PC yet.
@endsection