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

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

{{ $importedCount }} {{ __('laravel-crm::lang.organizations_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_organization_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.name')) }} {{ ucfirst(__('laravel-crm::lang.email')) }} {{ ucfirst(__('laravel-crm::lang.phone')) }} {{ ucfirst(__('laravel-crm::lang.website')) }} {{ ucfirst(__('laravel-crm::lang.status')) }}
{{ $row['row'] }} {{ $row['name'] }} {{ $row['email'] ?: '—' }} {{ $row['phone'] ?: '—' }} {{ $row['website_url'] ?: '—' }} @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')) }}:

  • name — {{ __('laravel-crm::lang.import_col_organization_name_required') }}

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

  • email
  • phone
  • website_url
  • vat_number
  • description

@csrf
@endif