@extends('layouts.app') @section('title', 'Import '.$import->original_filename) @section('content')
isRunning()) x-data x-init="const poll = setInterval(async () => { const response = await fetch(@js(route('imports.progress', $import)), { headers: { Accept: 'application/json' } }); if (!response.ok) return; const data = await response.json(); document.getElementById('import-progress-bar').style.width = data.percent + '%'; document.getElementById('import-progress-text').textContent = data.processed_rows + ' / ' + data.total_rows + ' rows · ' + data.percent + '%'; if (['completed', 'failed', 'cancelled'].includes(data.status)) { clearInterval(poll); window.location.reload(); } }, 4000)" @endif >

{{ $import->original_filename }}

Uploaded {{ $import->created_at->format('d M Y H:i') }} by {{ $import->user?->name ?? '—' }} @if ($import->contactList) · into {{ $import->contactList->name }}@endif

@if ($import->isRunning()) @can('manage imports') Cancel @endcan @endif
@if ($import->isRunning())
Processing in background batches (cron)… {{ $import->processed_rows }} / {{ $import->total_rows }} rows · {{ $import->progressPercent() }}%
@endif @if ($import->error)
{{ $import->error }}
@endif

Rows with problems

@if ($errorRows->total() > 0) Download error report @endif
@forelse ($errorRows as $row) @empty @endforelse
RowStatusReasonData
{{ $row->row_number }} {{ $row->reason }} {{ implode(' | ', array_map('strval', array_slice($row->data ?? [], 0, 6))) }}
No problem rows 🎉
{{ $errorRows->links() }}
@endsection