{{-- Inquiries listing — docs/wireframes-v12/inquiry.html, content region for content region. v12's order, top to bottom: a right-aligned "Add New Inquiry" row, then ONE card carrying the `.filter-bar` and the `.data-table` — the filters are the card's own header strip (border-bottom), not a card of their own. That is the shape every v12 management page uses, and it is the shape projects/index.blade.php already draws. Unlike the projects listing there is no stat strip: inquiry.html has none. The page starts at the Add button. 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 wiring below feeds the plugin from it, with the same 300ms debounce and the same preXhr filter parameters projects uses. The table markup and its configuration both come from the html builder, so the column list exists in exactly one place: InquiriesDataTable::getColumns(). The three Booking Action modals are included once at the foot, and nrems-inquiry-actions.js re-targets them per row — see partials/modals and partials/booking-action for why one instance each rather than one per row. --}} @extends('layouts.app') @section('title', __('inquiries.title')) @section('breadcrumbs') @endsection @section('content') {{-- v12 puts the primary action on its own row above the listing card, at the right edge, and leaves an empty div on the left. The empty div is kept: `.justify-between` needs two children to push the button right, and the button is gated, so without it a user without the create permission would get a bare row rather than no row at all. --}} @can('create', \App\Models\Inquiry::class)
{{ __('inquiries.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 five 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, and two bare date inputs are unusable with one either way. Order is the wireframe's: search, status, source, date-from, date-to. --}}
{{-- `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. --}}
{{-- yajra's own element. `{!! !!}` because it IS markup; the builder emits a table shell built from getColumns(), and no row data passes through here at all — the rows arrive later as JSON. --}} {!! $dataTable->table(['class' => 'data-table']) !!} @include('inquiries.partials.modals') {{-- 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') {{-- DataTables is not in the Metronic bundles — plugins.bundle.js carries jQuery and nothing else of the plugin. It is vendored under public/assets/plugins/custom/datatables (see VERSIONS.md there) rather than pulled from a CDN, because a strict CSP is planned. --}} @include('inquiries.partials.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. --}} {{-- yajra's init script — a @endpush