{{-- Brokers listing — docs/wireframes-v12/broker-management.html, content region for content region. Two regions, top to bottom: the page action bar ("All Brokers" + its sub-line on the left, the Add Broker button on the right), then ONE card carrying the `.filter-bar` and the `.data-table` — the filters are the card's own header strip, not a card of their own. That is the shape every v12 management page uses and the shape projects/index uses. v12 draws a `.grid-4` stat strip between the two; **CR-12.1 A5 removed it at the client's instruction**, along with BrokerController::stats(), the `stats` payload key and the `brokers.stats.*` lang keys. Nothing on this page counts anything any more, which is why the controller's page-only payload is down to one key. DataTables drives the table. Its own search box stays out of the dom string because the wireframe's `.search-input` in the filter bar is the one the user sees; the script below feeds the plugin from it. The column list exists only in BrokersDataTable::getColumns(). ## Deliberate differences from the wireframe * **No stat strip at all** (CR-12.1 A5) — see above. * **No "Companies" column** — the client removed multiple companies per broker (§0.3) and the Company column already names the one firm. * **No Broker ID, Total Referrals or Active Bookings columns** (CR-12.1 A6, client instruction). Seven columns are left, in the wireframe's own order. * **The City filter is dynamic** (decision D7) where v12 hardcodes five cities: a filter offering a city no broker is in returns an empty table and looks broken. * **A Delete action per row** (decision D3), which v12's action group does not draw. See brokers/partials/actions.blade.php. --}} @extends('layouts.app') @section('title', __('brokers.title')) @section('breadcrumbs') @endsection @section('content') @php /* * Defaulted here as well as skipped in the controller on an ajax draw. * Either alone would be enough today; together they mean the page * cannot break on the difference between two ways of asking for it — * the 500 CR-7 shipped and then closed twice over. */ $cities = $cities ?? []; @endphp {{-- v12 puts the heading pair and the primary action on one row at the top of the content region. The left-hand block is not gated, so a view-only user still gets the heading; only the button is. --}}

{{ __('brokers.all_brokers') }}

{{ __('brokers.all_brokers_sub') }}

@can('brokers.create') {{ __('brokers.add_button') }} @endcan
{{-- The filter bar IS the card's header strip in v12. It is a
here only so Enter does not reload the page; `.filter-bar` is the flex row, so the form element carries it directly. v12 labels none of these controls — a placeholder and an option list are all it draws. The visually-hidden labels are ours and are not a visual change: a select whose only name is its first option is unusable with a screen reader. --}}
{{-- `table-wrapper` is v12's own scroll box. `table-responsive` rides along because it is Bootstrap's name for the same thing and the one the shared component and its test both use; this screen does not go through that component (v12's card has no card-body around the table) but the two names stay together so a later reader does not read the difference as meaningful. --}}
{!! $dataTable->table(['class' => 'data-table']) !!}
{{-- The shared row-delete confirmation (CR-16 item J8). At the END of the content section and outside every `.card`, for the clipping reason the partial's own header records. It also pushes the toaster and the shared delete client, which is why the row buttons need nothing of their own. --}} @include('partials.ajax-delete-modal') @endsection @push('styles') @endpush @push('scripts') {{-- Order is load bearing: jQuery (plugins.bundle.js, already in the layout) → core library → the Bootstrap 5 integration that patches its renderers → yajra's init, which calls $(…).DataTable(…) and would throw without the two above. --}} {!! $dataTable->scripts() !!} @endpush