Merge branch 'main' into 'dev/papeles_from_bd_presu_cliente'

Main

See merge request jjimenez/safekat!393
This commit is contained in:
2024-11-21 19:20:44 +00:00
9 changed files with 63 additions and 52 deletions

View File

@ -31,7 +31,7 @@
<?= lang('PapelGenerico.showInClient') ?>
</label>
<input type="checkbox" id="showInClient" name="show_in_client" value="1" class="form-check-input"
<?= $papelImpresion->show_in_client_special == true ? 'disabled' : ''; ?>
<?= $papelGenerico->show_in_client_special == true ? 'disabled' : ''; ?>
<?= $papelGenerico->show_in_client == true ? 'checked' : ''; ?>>
</div><!--//.form-check -->

View File

@ -134,22 +134,11 @@
<div class="mb-3">
<div class="form-check">
<label for="showInClient" class="form-check-label">
<?= lang('PapelImpresion.showInClient') ?>
<label for="useInClient" class="form-check-label">
<?= lang('PapelImpresion.useInClient') ?>
</label>
<input type="checkbox" id="showInClient" name="show_in_client" value="1" class="form-check-input"
<?= $papelImpresion->show_in_client_special == true ? 'disabled' : ''; ?>
<?= $papelImpresion->show_in_client == true ? 'checked' : ''; ?>>
</div><!--//.form-check -->
</div><!--//.mb-3 -->
<div class="mb-3">
<div class="form-check">
<label for="showInClientSpecial" class="form-check-label">
<?= lang('PapelImpresion.showInClientSpecial') ?>
</label>
<input type="checkbox" id="showInClientSpecial" name="show_in_client_special" value="1" class="form-check-input"
<?= $papelImpresion->show_in_client_special == true ? 'checked' : ''; ?>>
<input type="checkbox" id="useInClient" name="use_in_client" value="1" class="form-check-input"
<?= $papelImpresion->use_in_client == true ? 'checked' : ''; ?>>
</div><!--//.form-check -->
</div><!--//.mb-3 -->
</div><!--//.col -->

View File

@ -757,17 +757,7 @@
}
})
$('#showInClientSpecial').on('change', function() {
if($(this).is(':checked')) {
$('#showInClient').prop('disabled', true);
$('#showInClient').prop('checked', true);
}
else{
$('#showInClient').prop('disabled', false);
}
});
<?= $this->endSection() ?>
<?= $this->endSection() ?>
<?php endif; ?>

View File

@ -29,8 +29,7 @@
<th><?= lang('PapelImpresion.inkjet') ?></th>
<th><?= lang('PapelImpresion.rotativa') ?></th>
<th><?= lang('PapelImpresion.activo') ?></th>
<th><?= lang('PapelImpresion.showInClient') ?></th>
<th><?= lang('PapelImpresion.showInClientSpecial') ?></th>
<th><?= lang('PapelImpresion.useInClient') ?></th>
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
</tr>
</thead>
@ -108,15 +107,14 @@
{ 'data': 'inkjet' },
{ 'data': 'rotativa' },
{ 'data': 'isActivo' },
{ 'data': 'show_in_client' },
{ 'data': 'show_in_client_special' },
{ 'data': 'use_in_client' },
{ 'data': actionBtns }
]
});
theTable.on( 'draw.dt', function () {
const boolCols = [3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
const boolCols = [3, 4, 5, 6, 7, 8, 9, 10, 11];
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>' : '';