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

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

{{ $importedCount }} {{ __('laravel-crm::lang.users_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_user_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.CRM_access')) }} {{ ucfirst(__('laravel-crm::lang.role')) }} Email Verified Created At Updated At Last Online Mailing List {{ ucfirst(__('laravel-crm::lang.status')) }}
{{ $row['row'] }} {{ $row['name'] }} {{ $row['email'] }} @if($row['crm_access']) {{ ucfirst(__('laravel-crm::lang.yes')) }} @else {{ ucfirst(__('laravel-crm::lang.no')) }} @endif {{ $row['role'] ?: '—' }} {{ $row['email_verified_at'] ?: '—' }} {{ $row['created_at'] ?: '—' }} {{ $row['updated_at'] ?: '—' }} {{ $row['last_online_at'] ?: '—' }} @if($row['mailing_list'] ?? 1) {{ ucfirst(__('laravel-crm::lang.yes')) }} @else {{ ucfirst(__('laravel-crm::lang.no')) }} @endif @if(! empty($row['errors']))
@foreach($row['errors'] as $err)
⚠ {{ $err }}
@endforeach
@else {{ ucfirst(__('laravel-crm::lang.ready')) }} @endif
{{-- Pagination --}} @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 (plain HTML — never touches Livewire file handling) --}} @else
{{-- Validation errors from the controller --}} @if($errors->has('csv_file'))
{{ $errors->first('csv_file') }}
@endif

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

  • name — {{ __('laravel-crm::lang.import_col_name') }}
  • email — {{ __('laravel-crm::lang.import_col_email') }}

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

  • crm_access — {{ __('laravel-crm::lang.import_col_crm_access') }} (1 / 0)
  • role — {{ __('laravel-crm::lang.import_col_role') }}
  • email_verified_at — datetime the email was verified (e.g. 2024-01-15 09:00:00); defaults to null (unverified) if blank
  • created_at — backdated account creation timestamp; defaults to now if blank
  • updated_at — backdated update timestamp; defaults to now if blank
  • last_online_at — last time the user was online; left null if blank
  • mailing_list — subscribed to mailing list (1 / 0); defaults to 1

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

{{-- Standard HTML form — file goes directly to the controller, never through Livewire --}}
@csrf
@endif