{{-- Row actions for the Brokers DataTable — docs/wireframes-v12/broker-management.html:
v12 shows view + edit. **Delete is added** (decision D3): the client asked for one, the module has a `brokers.delete` permission, and no other screen exposes it. It wears the same `.btn-icon` with the wireframe's own `.text-danger` utility, which is the colouring v12 gives a destructive icon button elsewhere — the same addition, for the same reason and in the same markup, that projects/partials/actions.blade.php records. Rendered by BrokersDataTable through rawColumns(['actions']), which means this output is injected into the page unescaped. Nothing user-controlled may reach it unescaped: the broker's name only appears inside Js::from(), which emits it as a JSON string literal with < > & " escaped to \u sequences. `{{ }}` escapes for HTML and not for Javascript, and commit 3492ec1 is the stored XSS that proved the difference. Every control is gated on its own ability rather than on one blanket check, so a holder of `brokers.view` alone gets the eye and nothing else. Bare permission gates and not a policy — CR-12 §0.2. Delete is a real POST form with a confirm() guard, not a link: a GET that destroys data would be triggered by any crawler or prefetch. It is a SOFT delete and there is no in-use guard — an inquiry outlives its broker by CR-6's design — which is why the confirmation says so rather than warning about data that is not going anywhere. yajra hands the row's model in as $model. --}} @php /** @var \App\Models\Broker $model */ @endphp
@can('brokers.view') @endcan @can('brokers.edit') @endcan @can('brokers.delete') {{-- CR-16 item J2: a plain button, not a form with a confirm(). `data-url` is the destroy route rendered by route() — the client's own instruction — and `data-confirm` is the SAME lang sentence the confirm() showed, which the shared dialog writes with textContent. nrems-ajax-delete.js sends the DELETE and redraws this table in place, so the page and the filters survive the delete. --}} @endcan