{{-- Customer choice of a job page using the PicksCustomer trait: a search field whose results are buttons, the number of matches announced, and "Lisää uusi asiakas" for a name not found. Once chosen, the customer is shown as text with a "Vaihda asiakas" button. --}} @props([ 'customerId', 'customerName', 'search', 'results', 'errorKey' => 'form.customer_id', ])
class('space-y-2') }}> @if ($customerId !== '')

{{ __('jobs.fields.customer') }}

{{ $customerName }}
@else @error($errorKey)

{{ $message }}

@enderror @if (mb_strlen(trim($search)) >= 2)

{{ trans_choice('jobs.customer_picker.results', count($results), ['count' => count($results)]) }}

@can('customers.use') @endcan @endif @endif