{{-- Mottagare tab of an import (#5205; DESIGN.md list page with toolbar and data table). ImportController@receivers passes $import (the grouped import), $data (its json), $rows (paginator of receivers or null), $source ('recorded', 'list' for an older import whose list was created for it, 'none'), $list, $search and $outcome (''/created/updated). Toolbar: search on e-mail or phone and, for recorded imports, Alla/Nya/Uppdaterade. The Telefon column shows only when a receiver in the result has a phone number ($hasPhone). Imports queued with the record (receivers_logged) use it even when it is empty. --}} @extends('layouts.nuhet') @php $invalidCount = count($data['invalid'] ?? []); $filtered = $search !== '' || $outcome !== ''; @endphp @section('_pageTitle', __('import.show.pageTitle')) @section('pagename', __('import.show.pageTitle')) @section('page') @include('import.partials.nh-head', ['lead' => __($source === 'list' ? 'import.nh.receiversLeadList' : 'import.nh.receiversLead'), 'invalidCount' => $invalidCount]) {{-- package_limit_reached counts the group's jobs stopped by the package (the grouped import query). --}} @if ($source === 'recorded' && (int) ($import->package_limit_reached ?? 0) > 0) {{ __('import.nh.receiversLimitNote') }} @endif @if ($source === 'none') {{ $list ? __('import.nh.receiversUnknown') : __('import.nh.receiversUnknownNoList') }} @else @if ($source === 'list') {{ __('import.nh.receiversFromList', ['list' => $list->name]) }} @endif {{-- nh-invfilter: the toolbar's inline select sizing, shared with the invoice filter (no new CSS). --}} @if ($rows->isEmpty()) @if ($filtered) {{-- "Visa alla" is already in the toolbar while a filter is active. --}} {{ __('import.nh.receiversNoMatch') }} @else {{ __('import.nh.receiversEmpty') }} @endif @else @if ($hasPhone) @endif @if ($source === 'recorded') @endif @foreach ($rows as $receiver) @php $edit = route('receiver.edit', $receiver->id); @endphp @if ($hasPhone) @endif @if ($source === 'recorded') @endif @endforeach
{{ __('import.nh.columnEmail') }}{{ __('import.nh.columnPhone') }}{{ __('import.nh.columnOutcome') }}{{ __('import.nh.columnActions') }}
{{ $receiver->email ?? $receiver->phone }}{{ $receiver->phone }} @if ($receiver->import_outcome === 'created') {{ __('import.nh.outcomeCreatedOne') }} @else {{ __('import.nh.outcomeUpdatedOne') }} @endif {{ __('import.nh.openReceiver') }}
{{ __('import.nh.receiversCount', ['count' => formatNumber($rows->total())]) }}
@endif @endif @endsection