{{-- Receivers of Dina mottagare (#2957 slice 4a, card #3018). Included by receiver/index only. Expects: $data (paginator of Receiver, scoped to the company by ReceiverController@index). Toolbar: the existing search and filter GET parameters (q, list, consentFilter, no_list, inactive, blacklist); everything but the search sits in the "Filter" disclosure, which starts open while one of those filters is in use. Without JavaScript the filters remain visible. Table: DESIGN.md data table, stacked labelled rows below 700 px. Status icons disclose the existing labels and reasons on hover, focus or tap. "Skapa lista för dessa mottagare" shows, as before, when no_list is set and something matched. --}} @php $data->appends(request()->query()); $data->loadMissing(['lists', 'complaints']); $query = (string) request('q', ''); $listId = (string) request('list', '0'); $consent = (string) request('consentFilter', '0'); $filterOpen = $listId !== '0' || $consent !== '0' || request()->filled('itemsPerPage') || request()->filled('no_list') || request()->filled('inactive') || request()->filled('blacklist') || request('hard_bounce') == 1; $tagChoices = Auth::user()->company->receiverLists()->get(); $consentOptions = [ 0 => __('receiver.form.consentStatusAll'), 1 => __('receiver.form.consentStatusConsented'), 2 => __('receiver.form.consentStatusNotConsent'), ]; @endphp
@if (request()->filled('no_list') && $data->count() > 0)| {{ __('receiver.name') }} | {{ __('receiver.status') }} | {{ __('receiver.stats') }} | {{ __('taggingReceiver.index.columnLists') }} | {{ __('receiver.index.columnActions') }} |
|---|---|---|---|---|
| {{ $hasEmail ? $receiver->email : $receiver->phone }} |
@if ($receiver->hard_bounced_at) |
|
@if ($receiver->lists->isEmpty()) {{ __('taggingReceiver.index.noList') }} @else @endif |