errores presupuesto

This commit is contained in:
2024-10-19 10:38:13 +02:00
parent 643e325e59
commit 8135e635ab
5 changed files with 1793 additions and 7 deletions

View File

@ -107,10 +107,14 @@ class PresupuestoCliente {
if (datos_to_check.direcciones) {
delete datos_to_check.direcciones;
}
if(datos_to_check.posPaginasColor){
delete datos_to_check.posPaginasColor;
}
if (Object.values(datos_to_check).every(this.#isValidDataForm)) {
try {
$('#loader').modal('show');
$('#loader').modal('show');
// Si se está ejecutando la petición, abortar la petición anterior
this.ajax_calcular.abort();
@ -409,6 +413,9 @@ class PresupuestoCliente {
this.datos.selectedTirada = this.direcciones.getSelectedTirada();
}
if (window.location.href.includes("edit")) {
this.datos["id"] = window.location.href.split("/").pop();
}
}
@ -444,7 +451,8 @@ class PresupuestoCliente {
return false;
}
if (typeof value === 'object' && value !== null) {
return Object.values(value).every(isValid);
const isValidData = Object.values(value).every(isValid);
return isValidData;
}
return true;
}

View File

@ -109,7 +109,7 @@ class Resumen {
this.cubiertaAcabados.text(this.disenioCubierta.getAcabados(true));
if (this.disenioCubierta.getSobrecubierta()) {
this.divSobrecubierta.rempveClass('d-none');
this.divSobrecubierta.removeClass('d-none');
const sobrecubierta = this.disenioCubierta.getSobrecubierta(true);
this.papelSobrecubierta.text(sobrecubierta.papel);
this.gramajeSobrecubierta.text(sobrecubierta.gramaje);