mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
corregidos errores en logica
This commit is contained in:
@ -360,6 +360,7 @@ return [
|
||||
'tipo_cubierta' => 'Seleccione tipo de cubierta',
|
||||
'opcion_solapas' => 'Seleccione la opción para las solapas',
|
||||
'paginas_cosido' => 'El número de páginas para <b>cosido</b> debe ser múltiplo de 4',
|
||||
'paginas_pares' => 'El número de páginas debe ser par',
|
||||
],
|
||||
|
||||
'errores' => [
|
||||
|
||||
@ -191,7 +191,17 @@ class DatosGenerales {
|
||||
callback: function (input) {
|
||||
// Get the selected options
|
||||
const value = $("#paginasColor").val();
|
||||
return value.length >= 0 && Number.isInteger(parseInt(value)) && parseInt(value) >= 0;
|
||||
if (value.length >= 0 && Number.isInteger(parseInt(value)) && parseInt(value) >= 0) {
|
||||
|
||||
if (parseInt(value) % 2 != 0) {
|
||||
return {
|
||||
valid: false,
|
||||
message: window.translations["validation"].paginas_pares
|
||||
};
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
}
|
||||
}
|
||||
@ -203,7 +213,17 @@ class DatosGenerales {
|
||||
callback: function (input) {
|
||||
// Get the selected options
|
||||
const value = $("#paginasNegro").val();
|
||||
return value.length >= 0 && Number.isInteger(parseInt(value)) && parseInt(value) >= 0;
|
||||
if (value.length >= 0 && Number.isInteger(parseInt(value)) && parseInt(value) >= 0) {
|
||||
|
||||
if (parseInt(value) % 2 != 0) {
|
||||
return {
|
||||
valid: false,
|
||||
message: window.translations["validation"].paginas_pares
|
||||
};
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@ -353,11 +353,9 @@ class DisenioInterior {
|
||||
if ($('#fresado').hasClass('selected')) {
|
||||
if (this.estucadoMate.hasClass('selected') || this.estucadoMate_color.hasClass('selected')) {
|
||||
$('#tapaDuraLomoRedondo').addClass('d-none');
|
||||
$('#tapaDura').removeClass('d-none');
|
||||
}
|
||||
else {
|
||||
$('#tapaDuraLomoRedondo').removeClass('d-none');
|
||||
$('#tapaDura').addClass('d-none');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ class PresupuestoCliente {
|
||||
this.disenioInterior.init();
|
||||
this.disenioCubierta.init();
|
||||
|
||||
//this.RELLENAR_PRESUPUESTO();
|
||||
this.RELLENAR_PRESUPUESTO();
|
||||
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ class PresupuestoCliente {
|
||||
$("#titulo").trigger('change');
|
||||
|
||||
const clienteId = $("#clienteId");
|
||||
const newOption = new Option("Cliente 1", "1", true, true);
|
||||
const newOption = new Option("Cliente Potencial", "1", true, true);
|
||||
clienteId.append(newOption).trigger('change');
|
||||
|
||||
const papelFormatoId = $("#papelFormatoId");
|
||||
|
||||
Reference in New Issue
Block a user