{{-- The shared row-delete confirmation — CR-16 §2 item J8. @include('partials.ajax-delete-modal') Included by the SEVEN module listings whose delete control CR-16 converted: projects, inquiries, users, roles, brokers, booking_types and customer_doc_types. Always at the END of the index page's content section and never inside a `.card`, for the reason CR-15.3's own dialog records: a Bootstrap dialog is `position: fixed`, but its containing block is whatever ancestor establishes one, so nesting it in a card the wireframe gives `overflow: hidden` is a way to have it clipped on some browsers and not others. ## One instance, seven modules, one sentence per ROW There is one dialog on a page and one shared module behind it, which is the client's own instruction: *"if you will use this logic then you can create common ajax request and popup for all modules"*. What differs per row is the warning, and that arrives on the button as `data-confirm` — the module's EXISTING `.delete_confirm` lang sentence, the one its `confirm()` used to show. Those sentences are worth keeping because several of them say something no generic wording could: *"Its wings, floor plans and units are removed with it"*, *"Its whole follow up history is removed with it"*. Reusing them is not a lang migration and does not cross §0.2 (the client forbade a lang FILE for the new success and error messages, and those three — below — are written here inline). A confirmation sentence that already exists in lang stays in lang; copying it into seven inline literals would have been the change worth objecting to. ## The three strings that ARE this partial's own `failed`, `deleted` and `dismiss`, inline per §0.2. They are generic because this dialog serves seven modules; the SERVER's own success sentence wins over `deleted` whenever the JSON answer carries one (item J6 gives each module its own: "Project deleted.", "Inquiry deleted.", …), so the fallback is only ever seen if a response arrives without a message. ## It confirms; it does not decide Cancel closes the dialog and sends nothing. Confirm sends the DELETE by ajax to the url the button carries — server-rendered by `route()`, never assembled in Javascript — and every gate on that route still applies: the policy `@can`, `abort_unless($user->isDestructibleBy(...))`, the roles and booking-type guards. A hand-rolled DELETE gets exactly the answers it gets today, now also as JSON when it asks for JSON (item J9). --}}
{{-- The row's own warning. Written with `textContent` by the module, so a name like `');alert(1)//` inside the sentence is visible characters and not markup — the CR-15.3 isolation pattern, and the reason this element is empty here. --}}

{{-- `type="button"`: this dialog is not a form. The module sends the request itself so the page never navigates and the table is redrawn in place (item J4). --}}
@push('scripts') {{-- The toaster (CR-15.3 item H6, reused as-is) and this dialog's client. Both do nothing at all without their roots, and the toaster is `@once` because a page could include more than one dialog that wants it. --}} @once @endonce @endpush