Use presenter for table layout

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-08-07 13:37:27 +01:00
parent fbaf738454
commit f528a46c60

View file

@ -68,6 +68,7 @@
<div class="row">
<div class="col-md-12">
<table
data-columns="{{ \App\Presenters\AccessoryPresenter::assignedDataTableLayout() }}"
data-cookie-id-table="checkoutsTable"
data-pagination="true"
data-id-table="checkoutsTable"
@ -85,14 +86,7 @@
"fileName": "export-accessories-{{ str_slug($accessory->name) }}-checkouts-{{ date('Y-m-d') }}",
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
}'>
<thead>
<tr>
<th data-searchable="false" data-formatter="polymorphicItemFormatter" data-sortable="false" data-field="assigned_to">{{ trans('general.checked_out_to') }}</th>
<th data-searchable="false" data-sortable="false" data-field="checkout_notes">{{ trans('general.notes') }}</th>
<th data-searchable="false" data-formatter="dateDisplayFormatter" data-sortable="false" data-field="last_checkout">{{ trans('admin/hardware/table.checkout_date') }}</th>
<th data-searchable="false" data-sortable="false" data-field="actions" data-formatter="accessoriesInOutFormatter">{{ trans('table.actions') }}</th>
</tr>
</thead>
</table>
</div><!--col-md-9-->
</div> <!-- close tab-pane div -->