Files
safekat/httpdocs/assets/js/safekat/components/datatables/ImposicionEsquemaDatatable.js
2025-04-20 19:26:07 +02:00

35 lines
956 B
JavaScript

class ImposicionEsquemaDatatable {
constructor(domItem) {
this.item = domItem
this.datatableColumns = [
{ data: 'id', searchable: false, sortable: true },
{ data: 'name', searchable: true, sortable: true },
{ data: 'action', searchable: true, sortable: true },
]
}
init() {
this.datatable = this.item.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: '/imposiciones/esquema/datatable',
});
}
}
export default ImposicionEsquemaDatatable;