add field activo in papel_generico

This commit is contained in:
amazuecos
2025-02-16 23:04:15 +00:00
parent ea8765e708
commit 61fdceb8e1
8 changed files with 65 additions and 16 deletions

View File

@ -23,7 +23,15 @@
<input type="text" id="codeOt" name="code_ot" maxLength="5" class="form-control"
value="<?= old('code_ot', $papelGenerico->code_ot) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<div class="form-check">
<label for="activo_papel_generico" class="form-check-label">
<?= lang('PapelGenerico.activo') ?>
</label>
<input type="checkbox" id="activo_papel_generico" name="activo" value="1"
class="form-check-input" <?= $papelGenerico->activo == true ? 'checked' : ''; ?>>
</div><!--//.form-check -->
</div><!--//.mb-3 -->
<div class="mb-3">
<div class="form-check">

View File

@ -144,6 +144,7 @@
}
});
<?=$this->endSection() ?>

View File

@ -21,6 +21,7 @@
<th><?= lang('PapelGenerico.codeOt') ?></th>
<th><?= lang('PapelGenerico.showInClient') ?></th>
<th><?= lang('PapelGenerico.showInClientSpecial') ?></th>
<th><?= lang('PapelGenerico.activo') ?></th>
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
</tr>
</thead>
@ -92,13 +93,14 @@
{ 'data': 'code_ot' },
{ 'data': 'show_in_client' },
{ 'data': 'show_in_client_special' },
{ 'data': 'activo' },
{ 'data': actionBtns }
]
});
theTable.on( 'draw.dt', function () {
const boolCols = [3, 4];
const boolCols = [3, 4, 5];
for (let coln of boolCols) {
theTable.column(coln, { page: 'current' }).nodes().each( function (cell, i) {
cell.innerHTML = cell.innerHTML == '1' ? '<i class="ti ti-check"></i>' : '';