mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
funcionalidad completa de ferro prototipo en cliente a excepción de guardar los checks de usar la misma dirección
This commit is contained in:
@ -105,27 +105,26 @@ class DatosGenerales {
|
||||
|
||||
// check ferro y prototipo
|
||||
this.domItem.on('change', 'input[type="checkbox"][data-tarifa-extra-excluyente="1"]', (e) => {
|
||||
if (!this.cargando) {
|
||||
const current = $(e.target);
|
||||
|
||||
if (current.is(':checked')) {
|
||||
this.domItem.find('input[type="checkbox"][data-tarifa-extra-excluyente="1"]')
|
||||
.not(current)
|
||||
.prop('checked', false);
|
||||
const current = $(e.target);
|
||||
|
||||
if ((current.data('tarifa-nombre')?.toString().toLowerCase() || '').includes('2')) {
|
||||
$('#direccionesFerroPrototipo2').removeClass('d-none');
|
||||
}
|
||||
$('#direccionesFerroPrototipo').removeClass('d-none');
|
||||
if (current.is(':checked')) {
|
||||
this.domItem.find('input[type="checkbox"][data-tarifa-extra-excluyente="1"]')
|
||||
.not(current)
|
||||
.prop('checked', false);
|
||||
|
||||
if ((current.data('tarifa-nombre')?.toString().toLowerCase() || '').includes('2')) {
|
||||
$('#direccionesFerroPrototipo2').removeClass('d-none');
|
||||
}
|
||||
else {
|
||||
if (this.domItem.find('input[type="checkbox"][data-tarifa-extra-excluyente="1"]').prop('checked').length === 0) {
|
||||
$('#direccionesFerroPrototipo').removeClass('d-none');
|
||||
}
|
||||
else {
|
||||
if (this.domItem.find('input[type="checkbox"][data-tarifa-extra-excluyente="1"]').prop('checked').length === 0) {
|
||||
|
||||
$('#direccionesFerroPrototipo').addClass('d-none');
|
||||
$('#divDireccionesFerroPrototipo').empty();
|
||||
$('#direccionesFerroPrototipo2').addClass('d-none');
|
||||
$('#divDireccionesFerroPrototipo2').empty();
|
||||
}
|
||||
$('#direccionesFerroPrototipo').addClass('d-none');
|
||||
$('#divDireccionesFerroPrototipo').empty();
|
||||
$('#direccionesFerroPrototipo2').addClass('d-none');
|
||||
$('#divDireccionesFerroPrototipo2').empty();
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -597,6 +596,7 @@ class DatosGenerales {
|
||||
|
||||
if (datos.serviciosExtra.includes(tarifaId)) {
|
||||
$(this).prop('checked', true);
|
||||
$(this).trigger('change');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user