mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
ots
This commit is contained in:
@ -0,0 +1,45 @@
|
||||
|
||||
class OrdenTrabajoDatatable {
|
||||
constructor(domItem) {
|
||||
this.datatableItem = domItem
|
||||
|
||||
this.datatableColumns = [
|
||||
{ data: 'pedido_id',searchable: false, sortable: false },
|
||||
{ data: 'fecha_encuadernado_at', searchable: false, sortable: false },
|
||||
{ data: 'cliente_nombre', searchable: false, sortable: false },
|
||||
{ data: 'presupuesto_titulo', searchable: false, sortable: false },
|
||||
{ data: 'ubicacion_nombre', searchable: false, sortable: false },
|
||||
{ data: 'total_tirada', searchable: false, sortable: false },
|
||||
{ data: 'tipo_presupuesto_impresion', searchable: false, sortable: false },
|
||||
{
|
||||
data: 'action', searchable: false, sortable: false,
|
||||
render: (d, t) => {
|
||||
return `<div class="btn-group btn-group-sm">
|
||||
<a href="/produccion/ordentrabajo/edit/${d}" class="ot-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: '/produccion/ordentrabajo/datatable'
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default OrdenTrabajoDatatable;
|
||||
6
httpdocs/assets/js/safekat/pages/produccion/index.js
Normal file
6
httpdocs/assets/js/safekat/pages/produccion/index.js
Normal file
@ -0,0 +1,6 @@
|
||||
import OrdenTrabajoDatatable from '../../components/datatables/otDatatable.js'
|
||||
|
||||
$(function() {
|
||||
const otDatatable = new OrdenTrabajoDatatable($("#ot-datatable"))
|
||||
otDatatable.init()
|
||||
})
|
||||
Reference in New Issue
Block a user