diff --git a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/comparador.js b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/comparador.js index 6bed090c..7aac7b45 100644 --- a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/comparador.js +++ b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/comparador.js @@ -365,6 +365,7 @@ class Comparador { popErrorAlert(window.language.Presupuestos.errores.error_sobrecubierta_sin_solapas, 'divAlarmasComparador') }*/ $('#solapas_sobrecubierta').prop('checked', true); + $('#solapas_sobrecubierta').trigger('change'); $('#div_solapas_ancho_sobrecubierta').removeClass('d-none'); $('#solapas_ancho_sobrecubierta').val(60); $('#compPapelSobrecubierta').prop('disabled', false); @@ -373,6 +374,8 @@ class Comparador { else { this.papelSobrecubierta.setVal(0); this.gramajeSobrecubierta.setVal(0); + $('#solapas_sobrecubierta').prop('checked', false); + $('#solapas_sobrecubierta').trigger('change') $('#compPapelSobrecubierta').prop('disabled', true); $('#compGramajeSobrecubierta').prop('disabled', true); @@ -387,6 +390,7 @@ class Comparador { popErrorAlert(window.language.Presupuestos.errores.error_faja_sin_solapas, 'divAlarmasComparador'); } $('#faja').prop('checked', true); + $('#faja').trigger('change'); $('.faja-div').removeClass('d-none'); $('#compPapelFaja').prop('disabled', false); $('#compGramajeFaja').prop('disabled', false); @@ -394,6 +398,8 @@ class Comparador { else { this.papelFaja.setVal(0); this.gramajeFaja.setVal(0); + $('#faja').prop('checked', false); + $('#faja').trigger('change'); $('#compPapelFaja').prop('disabled', true); $('#compGramajeFaja').prop('disabled', true); } diff --git a/httpdocs/assets/js/safekat/pages/presupuestoCliente/disenioCubierta.js b/httpdocs/assets/js/safekat/pages/presupuestoCliente/disenioCubierta.js index 2d7c7dd5..0cb63017 100644 --- a/httpdocs/assets/js/safekat/pages/presupuestoCliente/disenioCubierta.js +++ b/httpdocs/assets/js/safekat/pages/presupuestoCliente/disenioCubierta.js @@ -339,9 +339,24 @@ class DisenioCubierta { div.find('.fv-plugins-message-container').remove(); }); - this.papelFaja.item.on('change', () => { this.gramajeFaja.empty(); }); + this.papelSobrecubierta.item.on('change', () => { + this.papelSobrecubierta.item.find('option').remove(); + this.papelSobrecubierta.item.val(null); + this.papelSobrecubierta.item.trigger('select2:clear'); + }); - this.papelGuardas.item.on('change', () => { this.gramajeGuardas.empty(); }); + this.papelFaja.item.on('change', () => { + this.gramajeFaja.item.find('option').remove(); + this.gramajeFaja.item.val(null); + this.gramajeFaja.item.trigger('select2:clear'); + }); + + this.papelGuardas.item.on('change', () => { + this.gramajeGuardas.item.find('option').remove(); + this.gramajeGuardas.item.val(null); + this.gramajeGuardas.item.trigger('select2:clear'); + + }); // Observadores this.observer.observe(this.tapaBlanda[0], { attributes: true });