diff --git a/ci4/app/Models/Configuracion/PapelImpresionModel.php b/ci4/app/Models/Configuracion/PapelImpresionModel.php
index afe4a799..f1ec4025 100644
--- a/ci4/app/Models/Configuracion/PapelImpresionModel.php
+++ b/ci4/app/Models/Configuracion/PapelImpresionModel.php
@@ -14,9 +14,15 @@ class PapelImpresionModel extends \App\Models\GoBaseModel
const SORTABLE = [
0 => "t1.nombre",
- 1 => "t1.papel_generico_id",
- 2 => "t1.gramaje",
- 3 => "t2.nombre",
+ 1 => "t2.nombre",
+ 2 => "t1.bn",
+ 3 => "t1.gramaje",
+ 4 => "t1.color",
+ 5 => "t1.cubierta",
+ 6 => "t1.sobrecubierta",
+ 7 => "t1.rotativa",
+ 8 => "t1.isActivo",
+
/*1 => "t1.id",
2 => "t1.papel_generico_id",
diff --git a/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/viewPapelImpresionForm.php b/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/viewPapelImpresionForm.php
index 30572113..66a21ee9 100644
--- a/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/viewPapelImpresionForm.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/configuracion/papel/viewPapelImpresionForm.php
@@ -26,8 +26,8 @@
-
- rotativa == true): ?>
+
+ rotativa == true): ?>
@@ -213,47 +211,50 @@
`;
};
+
+ if(url_parts[url_parts.length-2] == 'edit'){
- theTable = $('#tableOfPapelimpresiontipologias').DataTable({
- processing: true,
- serverSide: true,
- autoWidth: true,
- responsive: true,
- scrollX: true,
- lengthMenu: [ 5],
- pageLength: 5,
- lengthChange: false,
- searching: false,
- //paging: false,
- info: false,
- "dom": 'lrt',
- stateSave: true,
- language: {
- url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/= config('Basics')->i18n ?>.json"
- },
- ajax : $.fn.dataTable.pipeline( {
- url: '= route_to('dataTableOfPapelesImpresion') ?>',
- data: {
- id_PI: id,
+
+ theTable = $('#tableOfPapelimpresiontipologias').DataTable({
+ processing: true,
+ serverSide: true,
+ autoWidth: true,
+ responsive: true,
+ scrollX: true,
+ lengthMenu: [ 5],
+ pageLength: 5,
+ lengthChange: false,
+ searching: false,
+ //paging: false,
+ info: false,
+ "dom": 'lrt',
+ stateSave: true,
+ language: {
+ url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/= config('Basics')->i18n ?>.json"
},
- method: 'POST',
- headers: {'X-Requested-With': 'XMLHttpRequest'},
- async: true,
- }),
- columns : [
- { 'data': 'tipo' },
- { 'data': 'negro' },
- { 'data': 'cyan' },
- { 'data': 'magenta' },
- { 'data': 'amarillo' },
- { 'data': 'gota_negro' },
- { 'data': 'gota_color' },
- { data: actionBtns}
- ]
- });
-
+ ajax : $.fn.dataTable.pipeline( {
+ url: '= route_to('dataTableOfPapelesImpresion') ?>',
+ data: {
+ id_PI: id,
+ },
+ method: 'POST',
+ headers: {'X-Requested-With': 'XMLHttpRequest'},
+ async: true,
+ }),
+ columns : [
+ { 'data': 'tipo' },
+ { 'data': 'negro' },
+ { 'data': 'cyan' },
+ { 'data': 'magenta' },
+ { 'data': 'amarillo' },
+ { 'data': 'gota_negro' },
+ { 'data': 'gota_color' },
+ { data: actionBtns}
+ ]
+ });
+ }
// Add new tipología
$('#newTipologia').on("click", function(e) {
if ($('#tableOfPapelimpresiontipologias').DataTable().data().count() >= 3){
@@ -456,11 +457,11 @@
}).done((data, textStatus, jqXHR) => {
Toast.fire({
- icon: 'success',
+ icon: 'success',
title: data.msg ?? jqXHR.statusText,
});
-
+
theTable.clearPipeline();
theTable.row($(row)).invalidate().draw();
}).fail((jqXHR, textStatus, errorThrown) => {
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 676d8628..c49ff858 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
@@ -89,7 +89,7 @@
{
orderable: false,
searchable: false,
- targets: [3, 4, 5, 6, 7, lastColNr] //JJO añadidas bool cols
+ targets: [lastColNr] //JJO añadidas bool cols
}
],
columns : [