mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
corregido el tamaño maximo de solapas cuando se añade un presu
This commit is contained in:
@ -587,6 +587,8 @@ class DatosLibro {
|
|||||||
this.actualizarLimitesPaginas();
|
this.actualizarLimitesPaginas();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.calcularSolapas();
|
||||||
}
|
}
|
||||||
|
|
||||||
updateComparador() {
|
updateComparador() {
|
||||||
|
|||||||
@ -135,10 +135,10 @@ class PresupuestoCliente {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
calcularSolapas() {
|
calcularSolapas(exclude_guardas = false) {
|
||||||
|
|
||||||
/* Solapas Max */
|
/* Solapas Max */
|
||||||
this.#getDatos(false, true);
|
this.#getDatos(false, true, exclude_guardas);
|
||||||
if (Object.values(this.datos).every(this.#isValidDataForm)) {
|
if (Object.values(this.datos).every(this.#isValidDataForm)) {
|
||||||
new Ajax('/presupuestocliente/calcularsolapas',
|
new Ajax('/presupuestocliente/calcularsolapas',
|
||||||
this.datos,
|
this.datos,
|
||||||
@ -199,6 +199,7 @@ class PresupuestoCliente {
|
|||||||
if(!this.datosGenerales.validate(false)) {
|
if(!this.datosGenerales.validate(false)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'interior-libro':
|
case 'interior-libro':
|
||||||
@ -372,6 +373,14 @@ class PresupuestoCliente {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'interior-libro':
|
case 'interior-libro':
|
||||||
|
this.calcularSolapas(true);
|
||||||
|
this.btnPrev.removeClass('d-none');
|
||||||
|
this.btnNext.removeClass('d-none');
|
||||||
|
this.btnSave.removeClass('d-none');
|
||||||
|
this.btnDuplicate.addClass('d-none');
|
||||||
|
this.btnPrint.addClass('d-none');
|
||||||
|
this.btnConfirm.addClass('d-none');
|
||||||
|
break;
|
||||||
case 'cubierta-libro':
|
case 'cubierta-libro':
|
||||||
case 'direcciones-libro':
|
case 'direcciones-libro':
|
||||||
this.btnPrev.removeClass('d-none');
|
this.btnPrev.removeClass('d-none');
|
||||||
@ -623,9 +632,9 @@ class PresupuestoCliente {
|
|||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
this.disenioInterior.validate();
|
this.disenioInterior.validate();
|
||||||
|
this.calcularSolapas(true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
this.disenioCubierta.validate();
|
this.disenioCubierta.validate();
|
||||||
break;
|
break;
|
||||||
@ -695,7 +704,7 @@ class PresupuestoCliente {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#getDatos(save = false, calcularSolapas = false) {
|
#getDatos(save = false, calcularSolapas = false, exclude_guardas = false) {
|
||||||
|
|
||||||
this.datos = {
|
this.datos = {
|
||||||
|
|
||||||
@ -725,7 +734,8 @@ class PresupuestoCliente {
|
|||||||
this.datos.selectedTirada = this.direcciones.getSelectedTirada();
|
this.datos.selectedTirada = this.direcciones.getSelectedTirada();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.datos.guardas = this.disenioCubierta.getGuardas();
|
if(!exclude_guardas)
|
||||||
|
this.datos.guardas = this.disenioCubierta.getGuardas();
|
||||||
|
|
||||||
if (calcularSolapas) {
|
if (calcularSolapas) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user