From f5a58dc32d2fd965b014cb38c1983ec8f3e9ed01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Jim=C3=A9nez?= Date: Mon, 30 Jun 2025 11:47:20 +0200 Subject: [PATCH 1/3] arreglado el bucle infinito the change faja --- .../safekat/pages/presupuestoAdmin/sections/datosLibro.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosLibro.js b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosLibro.js index 8b8ad994..1c706ff3 100644 --- a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosLibro.js +++ b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosLibro.js @@ -73,6 +73,8 @@ class DatosLibro { this.div_faja = this.domItem.find('.faja-div'); this.cargando = cargando; + + this._bloqueoCambioFaja = false; } init() { @@ -187,6 +189,9 @@ class DatosLibro { changeFaja() { + if (this._bloqueoCambioFaja) return; + this._bloqueoCambioFaja = true; + if (this.faja.prop('checked')) { this.div_faja.removeClass('d-none'); $('#compFaja').val(1).trigger('change'); @@ -210,6 +215,8 @@ class DatosLibro { $(document).trigger('remove-servicio-lineas', 'solapas_grandes_faja'); } + + this._bloqueoCambioFaja = false; } checkMinMaxInput(event) { From 266e872f8fc418daf01c5f5a35b722da4087f007 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Jim=C3=A9nez?= Date: Mon, 30 Jun 2025 12:13:23 +0200 Subject: [PATCH 2/3] arreglado --- .../js/safekat/pages/presupuestoAdmin/sections/datosLibro.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosLibro.js b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosLibro.js index 1c706ff3..e8386283 100644 --- a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosLibro.js +++ b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosLibro.js @@ -804,7 +804,7 @@ class DatosLibro { if (isNaN(valorActual) || valorActual < min) { this.paginas.val(min); - } else if (valorActual > max) { + } else if (valorActual > max && max !== null) { this.paginas.val(max); } } From bbd2a389af34577c8049cebcb6d7690e44e7824f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Jim=C3=A9nez?= Date: Mon, 30 Jun 2025 12:19:53 +0200 Subject: [PATCH 3/3] arreglado --- .../js/safekat/pages/presupuestoAdmin/sections/comparador.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/comparador.js b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/comparador.js index 8e95d906..f3a42937 100644 --- a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/comparador.js +++ b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/comparador.js @@ -273,6 +273,8 @@ class Comparador { this.comparadorExterioresRunning = false; this.comparadorGuardasRunning = false; this.comparadorFajaRunning = false; + + this._bloqueoCambioSobrecubierta = false; } init() { @@ -359,6 +361,8 @@ class Comparador { self.gramajeSobrecubierta.empty() }); this.sobrecubierta.on('change', () => { + if(this._bloqueoCambioSobrecubierta) return; + this._bloqueoCambioSobrecubierta = true; if (this.sobrecubierta.select2('data')[0].id == 1) { /*if ($('#solapas_sobrecubierta').prop('checked') == false) { this.sobrecubierta.val('0').trigger('change'); @@ -380,6 +384,7 @@ class Comparador { $('#compGramajeSobrecubierta').prop('disabled', true); } + this._bloqueoCambioSobrecubierta = false; }); }