mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
add errores presupuesto
This commit is contained in:
@ -0,0 +1,47 @@
|
||||
|
||||
class ErrorPresupuestoView {
|
||||
constructor(domItem) {
|
||||
this.item = domItem
|
||||
this.datatableItem = this.item.find("#tableErrorPresupuesto")
|
||||
this.datatableColumns = [
|
||||
{ data: 'id', name: "id", searchable: true, sortable: false },
|
||||
{ data: 'presupuestoTitulo',searchable: true, sortable: false },
|
||||
{ data: 'presupuestoUser',searchable: true, sortable: false },
|
||||
{ data: 'lastUser', searchable: true, sortable: false },
|
||||
{ data: 'visto', searchable: false, sortable: false ,
|
||||
render : (d,t) => {
|
||||
const iconClass = d ? "ti ti-sm ti-check" : "ti ti-sm ti-x"
|
||||
return `<span class="${iconClass}"</span>`
|
||||
}
|
||||
},
|
||||
{ data: 'created_at', searchable: false, sortable: true },
|
||||
{
|
||||
data: 'action', sortable: false, searchable: false,
|
||||
render: (d, t) => {
|
||||
return `
|
||||
<div class="btn-group btn-group-sm">
|
||||
<a href="/configuracion/errores-presupuesto/edit/${d}" data-id="${d}" class="edit-error-presupuesto"><i class="ti ti-eye ti-sm mx-2"></i></a>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
init() {
|
||||
this.datatable = this.datatableItem.DataTable({
|
||||
processing: true,
|
||||
dom: 'Brtip',
|
||||
serverSide: true,
|
||||
|
||||
language: {
|
||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||
},
|
||||
columns: this.datatableColumns,
|
||||
ajax: '/configuracion/errores-presupuesto/datatable'
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default ErrorPresupuestoView;
|
||||
@ -0,0 +1,44 @@
|
||||
import Ajax from "../../../components/ajax.js"
|
||||
|
||||
|
||||
|
||||
class ErrorPresupuestoView {
|
||||
constructor(domItem) {
|
||||
this.item = domItem
|
||||
this.datatableItem = this.item.find("#tableErrorPresupuesto")
|
||||
this.datatableColumns = [
|
||||
{ data: 'id', searchable: true, sortable: false },
|
||||
{ data: 'presupuestoTitulo', searchable: true, sortable: false },
|
||||
{ data: 'presupuestoUser', searchable: true, sortable: false },
|
||||
{ data: 'visto', searchable: false, sortable: false },
|
||||
{ data: 'lastUser', searchable: true, sortable: false },
|
||||
{
|
||||
data: 'action', sortable: false, searchable: false,
|
||||
render: (d, t) => {
|
||||
return `
|
||||
<div class="btn-group btn-group-sm">
|
||||
<a href="javascript:void(0)" data-id="${d}" class="edit-error-presupuesto"><i class="ti ti-eye ti-sm mx-2"></i></a>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
init() {
|
||||
this.datatable = this.datatableItem.DataTable({
|
||||
processing: true,
|
||||
dom: 'Brtip',
|
||||
serverSide: true,
|
||||
|
||||
language: {
|
||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||
},
|
||||
columns: this.datatableColumns,
|
||||
ajax: '/configuracion/errores-presupuesto/datatable'
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default ErrorPresupuestoView;
|
||||
@ -0,0 +1,6 @@
|
||||
import ErrorPresupuestoView from "./errorPresupuesto.js";
|
||||
|
||||
$(document).ready(()=>{
|
||||
const errorPresupuesto = new ErrorPresupuestoView($("#errorPresupuestoCard"))
|
||||
errorPresupuesto.init()
|
||||
})
|
||||
Reference in New Issue
Block a user