Sigo trabajando en papel generico. Problema del add resuelto. Orden de columnas mal y edit mal

This commit is contained in:
Jaime Jimenez
2023-05-24 21:49:08 +02:00
parent 7e50c53eea
commit e8d733f39d
4 changed files with 16 additions and 15 deletions

View File

@ -16,7 +16,6 @@
<table id="tableOfPapelesgenericos" class="table table-striped table-hover" style="width: 100%;">
<thead>
<tr>
<th><?=lang('PapelGenerico.id')?></th>
<th><?= lang('PapelGenerico.nombre') ?></th>
<th><?= lang('PapelGenerico.code') ?></th>
<th><?= lang('PapelGenerico.codeOt') ?></th>
@ -69,7 +68,7 @@
}
],
stateSave: true,
order: [[0, 'asc']],
order: [[1, 'asc']],
language: {
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
},
@ -87,8 +86,7 @@
}
],
columns : [
{ 'data': 'id' },
{ 'data': 'nombre' },
{ 'data': 'nombre' },
{ 'data': 'code' },
{ 'data': 'code_ot' },
{ 'data': 'show_in_client' },
@ -98,10 +96,10 @@
theTable.on( 'draw.dt', function () {
const boolCols = [4];
const boolCols = [3];
for (let coln of boolCols) {
theTable.column(coln, { page: 'current' }).nodes().each( function (cell, i) {
cell.innerHTML = cell.innerHTML == '1' ? '<i class="text-success bi bi-check-lg">Tick</i>' : '';
cell.innerHTML = cell.innerHTML == '1' ? '<i class="ti ti-check"></i>' : '';
});
}

View File

@ -121,10 +121,10 @@
</li>
<?php endif; ?>
<?php endif; ?>
<?php if (count($temp = getArrayItem($menus, 'name', 'Papelgenerico')) > 0): ?>
<?php if (count($temp = getArrayItem($menus, 'name', 'Papelesgenericos')) > 0): ?>
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
<li class="menu-item">
<a href="<?= site_url("configuracion/papelgenerico") ?>" class="menu-link">
<a href="<?= site_url("configuracion/papelesgenericos") ?>" class="menu-link">
<div data-i18n="<?= lang("App.menu_papelgenerico") ?>"><?= lang("App.menu_papelgenerico") ?></div>
</a>
</li>