customerQueries = $customerQueries; } public function mount(): void { $this->authorize('customers.use'); } public function updatedSearch(): void { $this->resetPage(); } /** * @return LengthAwarePaginator */ #[Computed] public function customers(): LengthAwarePaginator { return $this->customerQueries->paginate($this->search); } /** * @return list */ public function headers(): array { return [ ['index' => 'name', 'label' => __('customers.fields.name'), 'sortable' => false], ['index' => 'type', 'label' => __('customers.fields.type'), 'sortable' => false], ['index' => 'businessId', 'label' => __('customers.fields.business_id'), 'sortable' => false], ['index' => 'action', 'label' => __('customers.actions'), 'sortable' => false, 'align' => 'right'], ]; } public function render(): mixed { return $this->view()->title(__('customers.title')); } }; ?>

{{ __('customers.title') }}

@if (session('status')) @endif

{{ trans_choice('customers.result_count', $this->customers->total(), ['count' => $this->customers->total()]) }}

@if ($this->customers->total() === 0)

{{ __('customers.empty') }}

@else @interact('column_name', $customer) {{ $customer->name }} @if ($customer->isInternal) ({{ __('customers.internal') }}) @endif @endinteract @interact('column_type', $customer) {{ __('customers.types.'.$customer->type->value) }} @endinteract @interact('column_businessId', $customer) {{ $customer->businessId ?? '–' }} @endinteract @interact('column_action', $customer) {{ __('customers.edit') }}: {{ $customer->name }} @endinteract @endif