@extends('layouts.app') @section('title', 'PCFMS Evidence — '.$uid) @section('contents') @php $project = $page['project']; $pc = $page['pc_form']; $fields = $page['fields'] ?? []; $files = $page['files'] ?? []; $fieldRows = collect($fields)->except(['_pc_form_id']); @endphp
{{ $page['warning'] ?? '' }}
Root: {{ $page['attachments_root'] }}
If there are no fields to import but this UID has files, you can still Submit to link those files. UID folder files also appear on the scheme Document Repository tab without importing.
Scheme / PC
UID
{{ $uid }}
ADP
{{ $project['adp_number'] !== '' ? $project['adp_number'] : '—' }}
Scheme
{{ $project['scheme_name'] }}
Target PC
#{{ $pc['id'] }} · {{ $pc['kind'] }} · state={{ $pc['state'] ?: '—' }} (unchanged on submit)
Already linked
{{ $page['existing_links'] ?? 0 }} file(s)
@csrf
Fields found (select to import into empty PC slots)
@forelse ($fieldRows as $key => $item) @php $preview = $item['value'] ?? ''; if (($key ?? '') === 'proposed_cost' && is_array($preview)) { $pm = $preview['proposed_million'] ?? null; $src = $preview['source'] ?? ''; $method = $preview['method'] ?? ''; $parts = []; if ($pm !== null) { $parts[] = number_format((float) $pm, 3).' Million'; } if (!empty($preview['capital_million'])) { $parts[] = 'Capital '.$preview['capital_million']; } if (!empty($preview['revenue_million'])) { $parts[] = 'Revenue '.$preview['revenue_million']; } $compCount = is_array($preview['components'] ?? null) ? count($preview['components']) : 0; if ($compCount > 0) { $parts[] = $compCount.' G.Abs line(s)'; } if ($method !== '') { $parts[] = $method; } if ($src !== '') { $parts[] = $src; } $preview = implode(' · ', $parts); } elseif (is_array($preview)) { $preview = \Illuminate\Support\Str::limit(json_encode($preview, JSON_UNESCAPED_UNICODE), 220); } else { $preview = \Illuminate\Support\Str::limit((string) $preview, 220); } @endphp @empty @endforelse
Field Source Target Value preview
{{ $item['label'] ?? $key }}
{{ $key }}
{{ $item['source'] ?? '—' }} {{ $item['target'] ?? '—' }} {{ $preview }}
No structured field candidates found (DB empty + no Office extract hits). You can still link files.
@if (!empty($page['office_notes'])) @endif
Files to link in Document repository (PCFMS Data)
@forelse ($files as $file) @empty @endforelse
Group File Size Office?
{{ $file['group_name'] }}
{{ $file['title'] }}
{{ $file['file_name'] }}
{{ $file['size_label'] }} {{ !empty($file['is_office']) ? 'Yes (also mined for fields)' : '—' }}
No files in this UID folder.
@if(!empty($files) && $fieldRows->isEmpty()) No field candidates — Submit will still link the selected files. @endif
@php $batches = $page['batches'] ?? []; @endphp
Import batches / Rollback
@forelse ($batches as $batch) @empty @endforelse
Batch When PC Files Fields Status
#{{ $batch['id'] }} {{ $batch['created_at'] ?? '—' }} #{{ $batch['pc_form_id'] }} {{ $batch['files_linked'] }} {{ $batch['fields_written'] }} @if(!empty($batch['written_keys']))
{{ implode(', ', $batch['written_keys']) }}
@endif
@if(!empty($batch['rolled_back_at'])) Rolled back
{{ $batch['rolled_back_at'] }}
@if(!empty($batch['rollback_summary']))
{{ $batch['rollback_summary'] }}
@endif @else Active @endif
@if(!empty($batch['can_rollback']))
@csrf
@else @endif
No import batches yet for this UID.
@endsection