{{-- HEADER --}} {{-- SUCCESS STATE --}} @if($imported)

{{ ucfirst(__('laravel-crm::lang.import_complete')) }}

{{ $importedCount }} {{ __('laravel-crm::lang.people_imported_successfully') }}, {{ $skippedCount }} {{ __('laravel-crm::lang.rows_skipped') }}.

{{-- PROGRESS STATE --}} @elseif($processing)
{{ ucfirst(__('laravel-crm::lang.importing')) }}… {{ $pendingOffset }} / {{ $totalToProcess }}
{{ $importedCount }} {{ __('laravel-crm::lang.imported') }} {{ $skippedCount }} {{ __('laravel-crm::lang.skipped') }}
{{-- PREVIEW TABLE --}} @elseif($hasPreview && count($previewRows) > 0) @php $allRows = session('crm_person_import_preview', []); $validRows = collect($allRows)->filter(fn ($r) => empty($r['errors']))->count(); $invalidRows = collect($allRows)->filter(fn ($r) => ! empty($r['errors']))->count(); @endphp
@foreach($previewRows as $row) @endforeach
# {{ ucfirst(__('laravel-crm::lang.first_name')) }} {{ ucfirst(__('laravel-crm::lang.last_name')) }} {{ ucfirst(__('laravel-crm::lang.email')) }} {{ ucfirst(__('laravel-crm::lang.phone')) }} {{ ucfirst(__('laravel-crm::lang.organization')) }} {{ ucfirst(__('laravel-crm::lang.status')) }}
{{ $row['row'] }} {{ $row['first_name'] }} {{ $row['last_name'] ?: '—' }} {{ $row['email'] ?: '—' }} {{ $row['phone'] ?: '—' }} {{ $row['organization_name'] ?: '—' }} @if(! empty($row['errors']))
@foreach($row['errors'] as $err)
⚠ {{ $err }}
@endforeach
@else {{ ucfirst(__('laravel-crm::lang.ready')) }} @endif
@if($lastPage > 1)
{{ ucfirst(__('laravel-crm::lang.page')) }} {{ $currentPage }} / {{ $lastPage }}  •  {{ __('laravel-crm::lang.rows') }} {{ (($currentPage - 1) * $perPage) + 1 }}–{{ min($currentPage * $perPage, $totalRows) }} {{ __('laravel-crm::lang.of') }} {{ $totalRows }}
@endif
{{ $validRows }} {{ __('laravel-crm::lang.rows_ready_to_import') }} @if($invalidRows > 0) • {{ $invalidRows }} {{ __('laravel-crm::lang.rows_will_be_skipped') }} @endif
@if($validRows > 0) @endif
{{-- UPLOAD FORM --}} @else
@if($errors->has('csv_file'))
{{ $errors->first('csv_file') }}
@endif

{{ ucfirst(__('laravel-crm::lang.required_columns')) }}:

  • first_name — {{ __('laravel-crm::lang.import_col_first_name') }}

{{ ucfirst(__('laravel-crm::lang.optional_columns')) }}:

  • last_name
  • title
  • email
  • phone
  • organization_name — {{ __('laravel-crm::lang.import_col_organization_name') }}
  • description

@csrf
@endif