@extends('hms.layout') @section('title','Import preview') @section('content')

{{ ucfirst(str_replace('_',' ',$record->kind)) }} import

{{ $record->row_count }} rows · {{ $record->status }} · Preview expires {{ $record->expires_at }}

Back to data imports @if($preview) @if($preview['validation']['errors'])
Fix these errors in the source CSV and upload again.
@else

All records passed validation. They will be checked again when you commit.

@endif

Preview (first 50 rows)

@foreach(array_keys($preview['source'][0]) as $column) @endforeach @foreach(array_slice($preview['source'],0,50) as $row) @foreach($row as $value) @endforeach @endforeach
{{ str_replace('_',' ',$column) }}
{{ $value }}
@if($record->status==='ready')
@csrf
@endif @else

{{ $record->status==='committed'?'Import completed. Preview data has been cleared.':'This preview is expired or discarded. Upload a fresh file to continue.' }}

@endif @if(in_array($record->status,['ready','invalid','expired'],true))
@csrf
@endif @endsection