mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
feat/ot-datatable-news
This commit is contained in:
@ -6,6 +6,12 @@ class OrdenTrabajoDatatable {
|
||||
this.datatablePendientesItem = this.item.find("#ot-datatable-pendientes")
|
||||
this.datatableFerroPendienteItem = this.item.find("#ot-datatable-ferro-pendiente")
|
||||
this.datatableFerroOkItem = this.item.find("#ot-datatable-ferro-ok")
|
||||
this.datatableNews = this.item.find("#ot-datatable-news")
|
||||
this.datatableProd = this.item.find("#ot-datatable-prod")
|
||||
this.datatableWaiting = this.item.find("#ot-datatable-waiting")
|
||||
this.datatableRevisionComerical = this.item.find("#ot-datatable-revision-com")
|
||||
|
||||
|
||||
|
||||
|
||||
this.datatableColumns = [
|
||||
@ -37,15 +43,15 @@ class OrdenTrabajoDatatable {
|
||||
render: (d, t) => {
|
||||
return `<div class="btn-group btn-group-sm">
|
||||
<a type="button" href="/produccion/ordentrabajo/edit/${d}" class=" btn btn-outline ot-edit"><i class="ti ti-eye ti-sm mx-2"></i></a>
|
||||
<a type="button" target="_blank" href="/produccion/ordentrabajo/pdf/${d}" class="btn btn-outline ot-pdf"><i class="ti ti-download ti-sm mx-2"></i></a>
|
||||
|
||||
</div>`
|
||||
}
|
||||
// <a type="button" target="_blank" href="/produccion/ordentrabajo/pdf/${d}" class="btn btn-outline ot-pdf"><i class="ti ti-download ti-sm mx-2"></i></a>
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
init() {
|
||||
this.datatable = this.datatableItem.DataTable({
|
||||
this.datatableItem.DataTable({
|
||||
processing: true,
|
||||
layout: {
|
||||
topStart: 'pageLength',
|
||||
@ -71,7 +77,7 @@ class OrdenTrabajoDatatable {
|
||||
});
|
||||
}
|
||||
initPendientes() {
|
||||
this.datatable = this.datatablePendientesItem.DataTable({
|
||||
this.datatablePendientesItem.DataTable({
|
||||
processing: true,
|
||||
layout: {
|
||||
topStart: 'pageLength',
|
||||
@ -98,7 +104,7 @@ class OrdenTrabajoDatatable {
|
||||
});
|
||||
}
|
||||
initFerroPendiente() {
|
||||
this.datatable = this.datatableFerroPendienteItem.DataTable({
|
||||
this.datatableFerroPendienteItem.DataTable({
|
||||
processing: true,
|
||||
layout: {
|
||||
topStart: 'pageLength',
|
||||
@ -124,7 +130,7 @@ class OrdenTrabajoDatatable {
|
||||
});
|
||||
}
|
||||
initFerroOk() {
|
||||
this.datatable = this.datatableFerroOkItem.DataTable({
|
||||
this.datatableFerroOkItem.DataTable({
|
||||
processing: true,
|
||||
layout: {
|
||||
topStart: 'pageLength',
|
||||
@ -149,6 +155,110 @@ class OrdenTrabajoDatatable {
|
||||
}
|
||||
});
|
||||
}
|
||||
initNews() {
|
||||
this.datatableNews.DataTable({
|
||||
processing: true,
|
||||
layout: {
|
||||
topStart: 'pageLength',
|
||||
topEnd: 'search',
|
||||
bottomStart: 'info',
|
||||
bottomEnd: 'paging'
|
||||
},
|
||||
serverSide: true,
|
||||
columnDefs: [
|
||||
{ className: 'dt-center', targets: '_all' },
|
||||
|
||||
],
|
||||
pageLength: 25,
|
||||
language: {
|
||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||
},
|
||||
columns: this.datatableColumns,
|
||||
ajax: '/produccion/ordentrabajo/datatable_news',
|
||||
createdRow: (row,data,dataIndex) => {
|
||||
$(row).css("border-left",`20px solid ${data.logo.color}`)
|
||||
$(row).css("border-right",`20px solid ${data.logo.color}`)
|
||||
}
|
||||
});
|
||||
}
|
||||
initWaiting() {
|
||||
this.datatableWaiting.DataTable({
|
||||
processing: true,
|
||||
layout: {
|
||||
topStart: 'pageLength',
|
||||
topEnd: 'search',
|
||||
bottomStart: 'info',
|
||||
bottomEnd: 'paging'
|
||||
},
|
||||
serverSide: true,
|
||||
columnDefs: [
|
||||
{ className: 'dt-center', targets: '_all' },
|
||||
|
||||
],
|
||||
pageLength: 25,
|
||||
language: {
|
||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||
},
|
||||
columns: this.datatableColumns,
|
||||
ajax: '/produccion/ordentrabajo/datatable_waiting',
|
||||
createdRow: (row,data,dataIndex) => {
|
||||
$(row).css("border-left",`20px solid ${data.logo.color}`)
|
||||
$(row).css("border-right",`20px solid ${data.logo.color}`)
|
||||
}
|
||||
});
|
||||
}
|
||||
initProd() {
|
||||
this.datatableProd.DataTable({
|
||||
processing: true,
|
||||
layout: {
|
||||
topStart: 'pageLength',
|
||||
topEnd: 'search',
|
||||
bottomStart: 'info',
|
||||
bottomEnd: 'paging'
|
||||
},
|
||||
serverSide: true,
|
||||
columnDefs: [
|
||||
{ className: 'dt-center', targets: '_all' },
|
||||
|
||||
],
|
||||
pageLength: 25,
|
||||
language: {
|
||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||
},
|
||||
columns: this.datatableColumns,
|
||||
ajax: '/produccion/ordentrabajo/datatable_prod',
|
||||
createdRow: (row,data,dataIndex) => {
|
||||
$(row).css("border-left",`20px solid ${data.logo.color}`)
|
||||
$(row).css("border-right",`20px solid ${data.logo.color}`)
|
||||
}
|
||||
});
|
||||
}
|
||||
initRevisionComercial() {
|
||||
this.datatableRevisionComerical.DataTable({
|
||||
processing: true,
|
||||
layout: {
|
||||
topStart: 'pageLength',
|
||||
topEnd: 'search',
|
||||
bottomStart: 'info',
|
||||
bottomEnd: 'paging'
|
||||
},
|
||||
serverSide: true,
|
||||
columnDefs: [
|
||||
{ className: 'dt-center', targets: '_all' },
|
||||
|
||||
],
|
||||
pageLength: 25,
|
||||
language: {
|
||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||
},
|
||||
columns: this.datatableColumns,
|
||||
ajax: '/produccion/ordentrabajo/datatable_revision_com',
|
||||
createdRow: (row,data,dataIndex) => {
|
||||
$(row).css("border-left",`20px solid ${data.logo.color}`)
|
||||
$(row).css("border-right",`20px solid ${data.logo.color}`)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user