mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
44 lines
1.3 KiB
JavaScript
44 lines
1.3 KiB
JavaScript
|
|
class ServicioClienteDatatable {
|
|
constructor(domItem) {
|
|
this.datatableItem = domItem
|
|
|
|
this.datatableColumns = [
|
|
{ data: 'nombre', searchable: true, sortable: true },
|
|
{ data: 'code', searchable: true, sortable: true },
|
|
{ data: 'created_at', searchable: true, sortable: true },
|
|
{
|
|
data: 'action', searchable: false, sortable: false,
|
|
render: (d, t) => {
|
|
return `<div class="btn-group btn-group-sm">
|
|
<a href="/configuracion/servicios/edit/${d}" class="servicio-cliente-edit"><i class="ti ti-eye ti-sm mx-2"></i></a>
|
|
</div>`
|
|
}
|
|
}
|
|
]
|
|
|
|
|
|
|
|
}
|
|
init() {
|
|
this.datatable = this.datatableItem.DataTable({
|
|
processing: true,
|
|
layout: {
|
|
topStart: 'pageLength',
|
|
topEnd: 'search',
|
|
bottomStart: 'info',
|
|
bottomEnd: 'paging'
|
|
},
|
|
serverSide: true,
|
|
pageLength: 25,
|
|
language: {
|
|
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
|
},
|
|
columns: this.datatableColumns,
|
|
ajax: '/configuracion/servicios/datatable'
|
|
});
|
|
}
|
|
|
|
}
|
|
|
|
export default ServicioClienteDatatable; |