@@ -49,25 +50,26 @@
=$this->section('additionalInlineJs') ?>
- const lastColNr = $('#tableOfMaquinas').find("tr:first th").length - 1;
- const actionBtns = function(data) {
- return `
-
-
-
-
- | `;
- };
- theTable = $('#tableOfMaquinas').DataTable({
- processing: true,
- serverSide: true,
- autoWidth: true,
- responsive: true,
- scrollX: true,
- lengthMenu: [ 5, 10, 25, 50, 75, 100, 250, 500, 1000, 2500 ],
- pageLength: 10,
- lengthChange: true,
- "dom": 'lfBrtip',
+ const lastColNr = $('#tableOfMaquinas').find("tr:first th").length - 1;
+ const actionBtns = function(data) {
+ return `
+
+
+ | `;
+ };
+ theTable = $('#tableOfMaquinas').DataTable({
+ processing: true,
+ serverSide: true,
+ autoWidth: true,
+ responsive: true,
+ scrollX: true,
+ lengthMenu: [ 5, 10, 25, 50, 75, 100, 250, 500, 1000, 2500 ],
+ pageLength: 10,
+ lengthChange: true,
+ "dom": 'lfBrtip',
"buttons": [
'copy', 'csv', 'excel', 'print', {
extend: 'pdfHtml5',
@@ -75,98 +77,76 @@
pageSize: 'A4'
}
],
- stateSave: true,
- order: [[0, 'asc']],
- language: {
- url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/= config('Basics')->i18n ?>.json"
- },
- ajax : $.fn.dataTable.pipeline( {
- url: '= route_to('dataTableOfMaquinas') ?>',
- method: 'POST',
- headers: {'X-Requested-With': 'XMLHttpRequest'},
- async: true,
- }),
- columnDefs: [
- {
- orderable: false,
- searchable: false,
- targets: [lastColNr]
- }
- ],
- columns : [
- { 'data': 'nombre' },
- { 'data': 'padre' },
- { 'data': 'tipo' },
- { 'data': 'velocidad' },
- { 'data': 'duracion_jornada' },
- { 'data': 'ancho' },
- { 'data': 'alto' },
- { 'data': 'ancho_impresion' },
- { 'data': 'alto_impresion' },
- { 'data': 'orden_planning' },
- { 'data': 'min' },
- { 'data': 'max' },
- { 'data': actionBtns }
- ]
- });
-
-
- theTable.on( 'draw.dt', function () {
- const boolCols = [];
- for (let coln of boolCols) {
- theTable.column(coln, { page: 'current' }).nodes().each( function (cell, i) {
- cell.innerHTML = cell.innerHTML == '1' ? '
' : '';
- });
+ stateSave: true,
+ order: [[0, 'asc']],
+ language: {
+ url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/= config('Basics')->i18n ?>.json"
+ },
+ ajax : $.fn.dataTable.pipeline( {
+ url: '= route_to('dataTableOfMaquinas') ?>',
+ method: 'POST',
+ headers: {'X-Requested-With': 'XMLHttpRequest'},
+ async: true,
+ }),
+ columnDefs: [
+ {
+ orderable: false,
+ searchable: false,
+ targets: [lastColNr]
}
-
+ ],
+ columns : [
+ { 'data': 'nombre' },
+ { 'data': 'padre' },
+ { 'data': 'tipo' },
+ { 'data': 'velocidad' },
+ { 'data': 'duracion_jornada' },
+ { 'data': 'ancho' },
+ { 'data': 'alto' },
+ { 'data': 'ancho_impresion' },
+ { 'data': 'alto_impresion' },
+ { 'data': 'orden_planning' },
+ { 'data': 'min' },
+ { 'data': 'max' },
+ { 'data': actionBtns }
+ ]
});
-$(document).on('click', '.btn-edit', function(e) {
- //window.location.href = `= route_to('maquinaList') ?>/${$(this).attr('data-id')}/edit`;
+
+ theTable.on( 'draw.dt', function () {
+ const boolCols = [];
+ for (let coln of boolCols) {
+ theTable.column(coln, { page: 'current' }).nodes().each( function (cell, i) {
+ cell.innerHTML = cell.innerHTML == '1' ? '
' : '';
+ });
+ }
+ });
+
+ $(document).on('click', '.btn-edit', function(e) {
window.location.href = `/configuracion/maquinas/edit/${$(this).attr('data-id')}`;
});
-
-$(document).on('click', '.btn-delete', function(e) {
- Swal.fire({
- title: '= lang('Basic.global.sweet.sureToDeleteTitle', [mb_strtolower(lang('Maquinas.maquina'))]) ?>',
- text: '= lang('Basic.global.sweet.sureToDeleteText') ?>',
- icon: 'warning',
- showCancelButton: true,
- confirmButtonColor: '#3085d6',
- confirmButtonText: '= lang('Basic.global.sweet.deleteConfirmationButton') ?>',
- cancelButtonText: '= lang('Basic.global.Cancel') ?>',
- cancelButtonColor: '#d33'
- })
- .then((result) => {
- const dataId = $(this).data('id');
- const row = $(this).closest('tr');
- if (result.value) {
- $.ajax({
- //url: `= route_to('maquinaList') ?>/${dataId}`,
- //method: 'DELETE',
- url: `/configuracion/maquinas/delete/${dataId}`,
- method: 'GET',
- }).done((data, textStatus, jqXHR) => {
- Toast.fire({
- icon: 'success',
- title: data.msg ?? jqXHR.statusText,
- });
-
- theTable.clearPipeline();
- theTable.row($(row)).invalidate().draw();
- }).fail((jqXHR, textStatus, errorThrown) => {
- Toast.fire({
- icon: 'error',
- title: jqXHR.responseJSON.messages.error,
- });
- })
- }
- });
- });
-
-
-
+ $(document).on('click', '.btn-delete', function(e) {
+ $(".btn-remove").attr('data-id', $(this).attr('data-id'));
+ });
+
+ $(document).on('click', '.btn-remove', function(e) {
+ const dataId = $(this).attr('data-id');
+ const row = $(this).closest('tr');
+ if ($.isNumeric(dataId)) {
+ $.ajax({
+ url: `/configuracion/maquinas/delete/${dataId}`,
+ method: 'GET',
+ }).done((data, textStatus, jqXHR) => {
+ $('#confirm2delete').modal('toggle');
+ theTable.clearPipeline();
+ theTable.row($(row)).invalidate().draw();
+ popSuccessAlert(data.msg ?? jqXHR.statusText);
+ }).fail((jqXHR, textStatus, errorThrown) => {
+ popErrorAlert(jqXHR.responseJSON.messages.error)
+ })
+ }
+ });
=$this->endSection() ?>
diff --git a/ci4/app/Views/themes/backend/vuexy/form/configuracion/maquinas/viewMaquinaPorDefectoList.php b/ci4/app/Views/themes/backend/vuexy/form/configuracion/maquinas/viewMaquinaPorDefectoList.php
index 9d808c59..f4ed92c2 100644
--- a/ci4/app/Views/themes/backend/vuexy/form/configuracion/maquinas/viewMaquinaPorDefectoList.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/configuracion/maquinas/viewMaquinaPorDefectoList.php
@@ -1,9 +1,9 @@
-=$this->include('themes/_commonPartialsBs/select2bs5') ?>
-=$this->include('themes/_commonPartialsBs/datatables') ?>
-=$this->include('themes/_commonPartialsBs/sweetalert') ?>
-=$this->extend('themes/backend/vuexy/main/defaultlayout') ?>
+= $this->include('themes/_commonPartialsBs/select2bs5') ?>
+= $this->include('themes/_commonPartialsBs/datatables') ?>
+= $this->include('themes/_commonPartialsBs/_confirm2delete') ?>
+= $this->extend('themes/backend/vuexy/main/defaultlayout') ?>
-=$this->section('content'); ?>
+= $this->section('content'); ?>
@@ -50,8 +50,8 @@
const actionBtns = function(data) {
return `
| `;
};
@@ -120,51 +120,35 @@
$(document).on('click', '.btn-edit', function(e) {
window.location.href = `configuracion/maquinasdefecto/edit/${$(this).attr('data-id')}`;
});
-
+
$(document).on('click', '.btn-delete', function(e) {
- Swal.fire({
- title: '= lang('Basic.global.sweet.sureToDeleteTitle', [mb_strtolower(lang('MaquinasPorDefecto.maquinadefecto'))]) ?>',
- text: '= lang('Basic.global.sweet.sureToDeleteText') ?>',
- icon: 'warning',
- showCancelButton: true,
- confirmButtonColor: '#3085d6',
- confirmButtonText: '= lang('Basic.global.sweet.deleteConfirmationButton') ?>',
- cancelButtonText: '= lang('Basic.global.Cancel') ?>',
- cancelButtonColor: '#d33'
- })
- .then((result) => {
- const dataId = $(this).data('id');
- const row = $(this).closest('tr');
- if (result.value) {
- $.ajax({
- //url: `= route_to('maquinaPorDefectoList') ?>/${dataId}`,
- //method: 'DELETE',
- url: `/configuracion/maquinasdefecto/delete/${dataId}`,
- method: 'GET',
- }).done((data, textStatus, jqXHR) => {
- Toast.fire({
- icon: 'success',
- title: data.msg ?? jqXHR.statusText,
- });
-
- theTable.clearPipeline();
- theTable.row($(row)).invalidate().draw();
- }).fail((jqXHR, textStatus, errorThrown) => {
- Toast.fire({
- icon: 'error',
- title: jqXHR.responseJSON.messages.error,
- });
- })
- }
- });
+ $(".btn-remove").attr('data-id', $(this).attr('data-id'));
});
-
-=$this->endSection() ?>
+
+ $(document).on('click', '.btn-remove', function(e) {
+ const dataId = $(this).attr('data-id');
+ const row = $(this).closest('tr');
+ if ($.isNumeric(dataId)) {
+ $.ajax({
+ url: `/configuracion/maquinasdefecto/delete/${dataId}`,
+ method: 'GET',
+ }).done((data, textStatus, jqXHR) => {
+ $('#confirm2delete').modal('toggle');
+ theTable.clearPipeline();
+ theTable.row($(row)).invalidate().draw();
+ popSuccessAlert(data.msg ?? jqXHR.statusText);
+ }).fail((jqXHR, textStatus, errorThrown) => {
+ popErrorAlert(jqXHR.responseJSON.messages.error)
+ })
+ }
+ });
+
+= $this->endSection() ?>
-=$this->section('css') ?>
+= $this->section('css') ?>
-=$this->endSection() ?>
+= $this->endSection() ?>
= $this->section('additionalExternalJs') ?>
@@ -174,5 +158,5 @@
-=$this->endSection() ?>
+= $this->endSection() ?>
diff --git a/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/viewPapelGenericoList.php b/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/viewPapelGenericoList.php
index 2a32f237..13dc668d 100644
--- a/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/viewPapelGenericoList.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/viewPapelGenericoList.php
@@ -1,10 +1,10 @@
-=$this->include('themes/_commonPartialsBs/datatables') ?>
-=$this->include('themes/_commonPartialsBs/sweetalert') ?>
-=$this->extend('themes/backend/vuexy/main/defaultlayout') ?>
-=$this->section('content'); ?>
+= $this->include('themes/_commonPartialsBs/datatables') ?>
+= $this->include('themes/_commonPartialsBs/_confirm2delete') ?>
+= $this->extend('themes/backend/vuexy/main/defaultlayout') ?>
+
+= $this->section('content'); ?>
@@ -41,13 +40,15 @@
=$this->section('additionalInlineJs') ?>
const lastColNr = $('#tableOfPapelesgenericos').find("tr:first th").length - 1;
const actionBtns = function(data) {
- return `
-
-
-
-
- | `;
+ return `
+
+
+ | `;
};
+
theTable = $('#tableOfPapelesgenericos').DataTable({
processing: true,
serverSide: true,
@@ -105,53 +106,37 @@
});
$(document).on('click', '.btn-edit', function(e) {
- //window.location.href = `= route_to('papelGenericoList') ?>/edit/${$(this).attr('data-id')}`;
window.location.href = `/configuracion/papelesgenericos/edit/${$(this).attr('data-id')}`;
});
$(document).on('click', '.btn-delete', function(e) {
- Swal.fire({
- title: '= lang('Basic.global.sweet.sureToDeleteTitle', [mb_strtolower(lang('PapelGenerico.papel generico'))]) ?>',
- text: '= lang('Basic.global.sweet.sureToDeleteText') ?>',
- icon: 'warning',
- showCancelButton: true,
- confirmButtonColor: '#3085d6',
- confirmButtonText: '= lang('Basic.global.sweet.deleteConfirmationButton') ?>',
- cancelButtonText: '= lang('Basic.global.Cancel') ?>',
- cancelButtonColor: '#d33'
- })
- .then((result) => {
- const dataId = $(this).data('id');
- const row = $(this).closest('tr');
- if (result.value) {
- $.ajax({
- //url: `= route_to('papelGenericoList') ?>/${dataId}`,
- //method: 'DELETE',
- url: `/configuracion/papelesgenericos/delete/${dataId}`,
- method: 'GET',
- }).done((data, textStatus, jqXHR) => {
- Toast.fire({
- icon: 'success',
- title: data.msg ?? jqXHR.statusText,
- });
-
- theTable.clearPipeline();
- theTable.row($(row)).invalidate().draw();
- }).fail((jqXHR, textStatus, errorThrown) => {
- Toast.fire({
- icon: 'error',
- title: jqXHR.responseJSON.messages.error,
- });
- })
- }
- });
+ $(".btn-remove").attr('data-id', $(this).attr('data-id'));
});
-=$this->endSection() ?>
+
+ $(document).on('click', '.btn-remove', function(e) {
+ const dataId = $(this).attr('data-id');
+ const row = $(this).closest('tr');
+ if ($.isNumeric(dataId)) {
+ $.ajax({
+ url: `/configuracion/papelesgenericos/delete/${dataId}`,
+ method: 'GET',
+ }).done((data, textStatus, jqXHR) => {
+ $('#confirm2delete').modal('toggle');
+ theTable.clearPipeline();
+ theTable.row($(row)).invalidate().draw();
+ popSuccessAlert(data.msg ?? jqXHR.statusText);
+ }).fail((jqXHR, textStatus, errorThrown) => {
+ popErrorAlert(jqXHR.responseJSON.messages.error)
+ })
+ }
+ });
+
+= $this->endSection() ?>
-=$this->section('css') ?>
+= $this->section('css') ?>
-=$this->endSection() ?>
+= $this->endSection() ?>
= $this->section('additionalExternalJs') ?>
@@ -162,5 +147,5 @@
-=$this->endSection() ?>
+= $this->endSection() ?>
diff --git a/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/viewPapelImpresionList.php b/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/viewPapelImpresionList.php
index c49ff858..4ae5971d 100644
--- a/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/viewPapelImpresionList.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/viewPapelImpresionList.php
@@ -1,6 +1,6 @@
=$this->include('themes/_commonPartialsBs/select2bs5') ?>
=$this->include('themes/_commonPartialsBs/datatables') ?>
-=$this->include('themes/_commonPartialsBs/sweetalert') ?>
+= $this->include('themes/_commonPartialsBs/_confirm2delete') ?>
= $this->extend('themes/backend/vuexy/main/defaultlayout') ?>
=$this->section('content'); ?>
@@ -49,12 +49,13 @@
const lastColNr = $('#tableOfPapelesimpresion').find("tr:first th").length - 1;
const actionBtns = function(data) {
- return `
+ return `
+ |
- | `;
+ `;
};
theTable = $('#tableOfPapelesimpresion').DataTable({
processing: true,
@@ -107,78 +108,56 @@
});
-theTable.on( 'draw.dt', function () {
+ theTable.on( 'draw.dt', function () {
const boolCols = [3, 4, 5, 6, 7, 8];
- for (let coln of boolCols) {
- theTable.column(coln, { page: 'current' }).nodes().each( function (cell, i) {
- cell.innerHTML = cell.innerHTML == '1' ? '
' : '';
- });
- }
-});
+ for (let coln of boolCols) {
+ theTable.column(coln, { page: 'current' }).nodes().each( function (cell, i) {
+ cell.innerHTML = cell.innerHTML == '1' ? '
' : '';
+ });
+ }
+ });
-$(document).on('click', '.btn-edit', function(e) {
- //window.location.href = `= route_to('papelImpresionList') ?>/${$(this).attr('data-id')}/edit`;
+ $(document).on('click', '.btn-edit', function(e) {
window.location.href = `/configuracion/papelesimpresion/edit/${$(this).attr('data-id')}`;
});
-
-$(document).on('click', '.btn-delete', function(e) {
- Swal.fire({
- title: '= lang('Basic.global.sweet.sureToDeleteTitle', [mb_strtolower(lang('PapelImpresion.papel impresion'))]) ?>',
- text: '= lang('Basic.global.sweet.sureToDeleteText') ?>',
- icon: 'warning',
- showCancelButton: true,
- confirmButtonColor: '#3085d6',
- confirmButtonText: '= lang('Basic.global.sweet.deleteConfirmationButton') ?>',
- cancelButtonText: '= lang('Basic.global.Cancel') ?>',
- cancelButtonColor: '#d33'
- })
- .then((result) => {
- const dataId = $(this).data('id');
- const row = $(this).closest('tr');
- if (result.value) {
- $.ajax({
- //url: `= route_to('papelImpresionList') ?>/${dataId}`,
- //method: 'DELETE',
- url: `/configuracion/papelesimpresion/delete/${dataId}`,
- method: 'GET',
- }).done((data, textStatus, jqXHR) => {
- Toast.fire({
- icon: 'success',
- title: data.msg ?? jqXHR.statusText,
- });
-
- theTable.clearPipeline();
- theTable.row($(row)).invalidate().draw();
- }).fail((jqXHR, textStatus, errorThrown) => {
- Toast.fire({
- icon: 'error',
- title: jqXHR.responseJSON.messages.error,
- });
- })
- }
- });
+
+ $(document).on('click', '.btn-delete', function(e) {
+ $(".btn-remove").attr('data-id', $(this).attr('data-id'));
});
-
-
-
-=$this->endSection() ?>
+ $(document).on('click', '.btn-remove', function(e) {
+ const dataId = $(this).attr('data-id');
+ const row = $(this).closest('tr');
+ if ($.isNumeric(dataId)) {
+ $.ajax({
+ url: `/configuracion/papelesimpresion/delete/${dataId}`,
+ method: 'GET',
+ }).done((data, textStatus, jqXHR) => {
+ $('#confirm2delete').modal('toggle');
+ theTable.clearPipeline();
+ theTable.row($(row)).invalidate().draw();
+ popSuccessAlert(data.msg ?? jqXHR.statusText);
+ }).fail((jqXHR, textStatus, errorThrown) => {
+ popErrorAlert(jqXHR.responseJSON.messages.error)
+ })
+ }
+ });
+
+= $this->endSection() ?>
-=$this->section('css') ?>
+= $this->section('css') ?>
-=$this->endSection() ?>
+= $this->endSection() ?>
= $this->section('additionalExternalJs') ?>
-
+
-
-
-=$this->endSection() ?>
+= $this->endSection() ?>
diff --git a/ci4/app/Views/themes/backend/vuexy/form/tarifas/acabado/viewTarifaAcabadoList.php b/ci4/app/Views/themes/backend/vuexy/form/tarifas/acabado/viewTarifaAcabadoList.php
index 2420f8e8..d9f349e0 100644
--- a/ci4/app/Views/themes/backend/vuexy/form/tarifas/acabado/viewTarifaAcabadoList.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/tarifas/acabado/viewTarifaAcabadoList.php
@@ -1,6 +1,5 @@
= $this->include('themes/_commonPartialsBs/datatables') ?>
-include('themes/_commonPartialsBs/_confirm2delete') ?>
-include('themes/_commonPartialsBs/sweetalert') ?>
+= $this->include('themes/_commonPartialsBs/_confirm2delete') ?>
= $this->extend('themes/backend/vuexy/main/defaultlayout') ?>
= $this->section('content'); ?>
diff --git a/ci4/app/Views/themes/backend/vuexy/form/tarifas/manipulado/viewTarifaManipuladoList.php b/ci4/app/Views/themes/backend/vuexy/form/tarifas/manipulado/viewTarifaManipuladoList.php
index 9f51f7e6..49f3693b 100644
--- a/ci4/app/Views/themes/backend/vuexy/form/tarifas/manipulado/viewTarifaManipuladoList.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/tarifas/manipulado/viewTarifaManipuladoList.php
@@ -1,5 +1,5 @@
=$this->include('themes/_commonPartialsBs/datatables') ?>
-=$this->include('themes/_commonPartialsBs/sweetalert') ?>
+= $this->include('themes/_commonPartialsBs/_confirm2delete') ?>
=$this->extend('themes/backend/vuexy/main/defaultlayout') ?>
=$this->section('content'); ?>
@@ -41,8 +41,8 @@
const actionBtns = function(data) {
return `
| `;
};
@@ -90,49 +90,31 @@
$(document).on('click', '.btn-edit', function(e) {
- //window.location.href = `= route_to('tarifaManipuladoList') ?>/${$(this).attr('data-id')}/edit`;
window.location.href = `/tarifas/tarifasmanipulado/edit/${$(this).attr('data-id')}`;
});
-
+
$(document).on('click', '.btn-delete', function(e) {
- Swal.fire({
- title: '= lang('Basic.global.sweet.sureToDeleteTitle', [mb_strtolower(lang('Tarifamanipulado.tarifa manipulado'))]) ?>',
- text: '= lang('Basic.global.sweet.sureToDeleteText') ?>',
- icon: 'warning',
- showCancelButton: true,
- confirmButtonColor: '#3085d6',
- confirmButtonText: '= lang('Basic.global.sweet.deleteConfirmationButton') ?>',
- cancelButtonText: '= lang('Basic.global.Cancel') ?>',
- cancelButtonColor: '#d33'
- })
- .then((result) => {
- const dataId = $(this).data('id');
- const row = $(this).closest('tr');
- if (result.value) {
- $.ajax({
- //url: `= route_to('tarifaManipuladoList') ?>/${dataId}`,
- //method: 'DELETE',
- url: `/tarifas/tarifasmanipulado/delete/${dataId}`,
- method: 'GET',
- }).done((data, textStatus, jqXHR) => {
- Toast.fire({
- icon: 'success',
- title: data.msg ?? jqXHR.statusText,
- });
-
- theTable.clearPipeline();
- theTable.row($(row)).invalidate().draw();
- }).fail((jqXHR, textStatus, errorThrown) => {
- Toast.fire({
- icon: 'error',
- title: jqXHR.responseJSON.messages.error,
- });
- })
- }
- });
+ $(".btn-remove").attr('data-id', $(this).attr('data-id'));
+ });
+
+ $(document).on('click', '.btn-remove', function(e) {
+ const dataId = $(this).attr('data-id');
+ const row = $(this).closest('tr');
+ if ($.isNumeric(dataId)) {
+ $.ajax({
+ url: `/tarifas/tarifasmanipulado/delete/${dataId}`,
+ method: 'GET',
+ }).done((data, textStatus, jqXHR) => {
+ $('#confirm2delete').modal('toggle');
+ theTable.clearPipeline();
+ theTable.row($(row)).invalidate().draw();
+ popSuccessAlert(data.msg ?? jqXHR.statusText);
+ }).fail((jqXHR, textStatus, errorThrown) => {
+ popErrorAlert(jqXHR.responseJSON.messages.error)
+ })
+ }
});
-
=$this->endSection() ?>