@extends('layouts::admin') @section('page_title', 'Import Preview') @section('page_subtitle', 'Review and confirm participant import') @section('content')
{{-- Summary Cards --}}
{{ $importData['total'] }}
Total Records
{{ count($importData['valid']) }}
Valid
{{ count($importData['duplicates']) }}
Duplicates (will skip)
{{ count($importData['errored']) }}
Errors
{{-- File info --}}

{{ $importData['filename'] }}

{{ $importData['total'] }} rows detected · Program ID: {{ $importData['program_id'] }}

Upload Different File
{{-- Errors section --}} @if (count($importData['errored']) > 0)

{{ count($importData['errored']) }} rows with errors (will be skipped)

@foreach (array_slice($importData['errored'], 0, 20) as $err) @endforeach @if (count($importData['errored']) > 20) @endif
RowNameEmailErrors
{{ $err['row'] }} {{ $err['name'] ?: '—' }} {{ $err['email'] ?: '—' }} {{ implode('; ', $err['errors']) }}
… and {{ count($importData['errored']) - 20 }} more errors
@endif {{-- Duplicates --}} @if (count($importData['duplicates']) > 0)

{{ count($importData['duplicates']) }} duplicate emails (will be skipped automatically)

@foreach (array_slice($importData['duplicates'], 0, 10) as $dup) @endforeach
RowNameEmailCourse
{{ $dup['row'] }} {{ $dup['name'] }} {{ $dup['email'] }} {{ $dup['course'] }}
@endif {{-- Valid Preview --}}

{{ count($importData['valid']) }} valid records ready to import

@if (count($importData['valid']) > 0)
@foreach (array_slice($importData['valid'], 0, 15) as $row) @endforeach @if (count($importData['valid']) > 15) @endif
RowNameEmailPhoneCourse
{{ $row['row'] }} {{ $row['name'] }} {{ $row['email'] }} {{ $row['phone'] ?: '—' }} {{ $row['course'] }}
… and {{ count($importData['valid']) - 15 }} more valid records
@endif
Cancel @if (count($importData['valid']) > 0)
@csrf
@else

No valid records to import.

@endif
@endsection