mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
menu lateral datos generales
This commit is contained in:
@ -27,6 +27,10 @@ class PresupuestoCliente {
|
||||
this.lc = $("#lc");
|
||||
this.lsc = $("#lsc");
|
||||
|
||||
this.rl_interior = $(".rl-interior");
|
||||
this.rl_cubierta = $(".rl-cubierta");
|
||||
this.rl_sobrecubierta = $(".rl-sobrecubierta");
|
||||
|
||||
this.datosGenerales = new DatosGenerales($("#datos-generales"), this.clientePresupuestoWizard, this.validationStepper);
|
||||
this.disenioInterior = new DisenioInterior($("#interior-libro"), this.clientePresupuestoWizard, this.validationStepper);
|
||||
this.disenioCubierta = new DisenioCubierta($("#cubierta-libro"), this.clientePresupuestoWizard, this.validationStepper);
|
||||
@ -45,6 +49,10 @@ class PresupuestoCliente {
|
||||
|
||||
this.actualizarTiradasEnvio = false;
|
||||
this.calcularPresupuesto = false;
|
||||
|
||||
if(!window.location.href.includes("edit")) {
|
||||
this.#processResumenLateral();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -84,7 +92,10 @@ class PresupuestoCliente {
|
||||
|
||||
if (window.location.href.includes("edit")) {
|
||||
|
||||
this.#cargarPresupuesto();
|
||||
setTimeout(() => {
|
||||
this.#cargarPresupuesto();
|
||||
}, 0);
|
||||
|
||||
const successMessage = sessionStorage.getItem('message');
|
||||
if (successMessage) {
|
||||
popSuccessAlert(successMessage);
|
||||
@ -99,6 +110,14 @@ class PresupuestoCliente {
|
||||
}
|
||||
|
||||
|
||||
#processResumenLateral() {
|
||||
|
||||
this.datosGenerales.processMenuLateral();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#checkTiradas() {
|
||||
|
||||
let tiradas = [parseInt(this.datosGenerales.tirada1.val())];
|
||||
@ -135,6 +154,8 @@ class PresupuestoCliente {
|
||||
|
||||
checkForm(event) {
|
||||
|
||||
this.#processResumenLateral();
|
||||
|
||||
if (!this.#checkTiradas()) {
|
||||
return;
|
||||
}
|
||||
@ -192,12 +213,17 @@ class PresupuestoCliente {
|
||||
return;
|
||||
}
|
||||
|
||||
if (nextElement === 'resumen-libro') {
|
||||
$(".rl-item").addClass('d-none');
|
||||
}
|
||||
|
||||
if (currentElement !== 'resumen-libro') {
|
||||
this.#validateCurrentForm(currentElement, nextElement);
|
||||
}
|
||||
else {
|
||||
this.#goToForm(nextElement);
|
||||
}
|
||||
this.#processResumenLateral();
|
||||
}
|
||||
|
||||
#goToForm(form) {
|
||||
@ -682,6 +708,8 @@ class PresupuestoCliente {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
async function validateForm(formValidation) {
|
||||
try {
|
||||
const validationResult = await formValidation.validate();
|
||||
|
||||
Reference in New Issue
Block a user