mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
terminada faja
This commit is contained in:
@ -111,6 +111,7 @@ class DisenioCubierta {
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
this.solapasSobrecubierta = this.domItem.find("#solapasSobrecubierta");
|
||||
this.textoSolapasSobrecubierta = this.domItem.find("#textoLimitesSolapasSobrecubierta");
|
||||
|
||||
@ -152,6 +153,16 @@ class DisenioCubierta {
|
||||
}
|
||||
);
|
||||
|
||||
this.acabadoFaja = new ClassSelect($("#acabadoFaja"),
|
||||
'/serviciosacabados/getacabados',
|
||||
'',
|
||||
false,
|
||||
{
|
||||
[this.csrf_token]: this.csrf_hash,
|
||||
"sobrecubierta": 1
|
||||
}
|
||||
);
|
||||
|
||||
this.initValidation();
|
||||
|
||||
// Creamos un nuevo observador que detecta cambios en los atributos
|
||||
@ -188,6 +199,7 @@ class DisenioCubierta {
|
||||
this.papelEspecial.init();
|
||||
this.acabadoCubierta.init();
|
||||
this.acabadoSobrecubierta.init();
|
||||
this.acabadoFaja.init();
|
||||
|
||||
this.papelFaja.init();
|
||||
this.gramajeFaja.init();
|
||||
@ -225,7 +237,7 @@ class DisenioCubierta {
|
||||
}
|
||||
|
||||
|
||||
cargarDatos(datosCubierta, datosGuardas, datosSobrecubierta) {
|
||||
cargarDatos(datosCubierta, datosGuardas, datosSobrecubierta, datosFaja) {
|
||||
|
||||
this.papelCubierta = datosCubierta.papel.id;
|
||||
this.gramaje = datosCubierta.gramaje;
|
||||
@ -274,6 +286,15 @@ class DisenioCubierta {
|
||||
this.acabadoSobrecubierta.setOption(datosSobrecubierta.acabado.id, datosSobrecubierta.acabado.text);
|
||||
}
|
||||
|
||||
if (datosFaja) {
|
||||
this.faja.trigger('click');
|
||||
this.papelFaja.setOption(datosFaja.papel.papel_id, datosFaja.papel.papel);
|
||||
this.gramajeFaja.setOption(datosFaja.papel.gramaje, datosFaja.papel.gramaje);
|
||||
this.solapasFaja.val(datosFaja.solapas_ancho);
|
||||
this.altoFaja.val(datosFaja.alto);
|
||||
this.acabadoFaja.setOption(datosFaja.acabado.id, datosFaja.acabado.text);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -716,7 +737,7 @@ class DisenioCubierta {
|
||||
faja.papel = this.papelFaja.getVal();
|
||||
faja.gramaje = this.gramajeFaja.getVal();
|
||||
faja.solapas = this.domItem.find("#solapasFaja").val();
|
||||
faja.plastificado = this.domItem.find("#plastificadoFaja").children("option:selected").val();
|
||||
faja.acabado = this.acabadoFaja.getVal();
|
||||
return faja;
|
||||
}
|
||||
|
||||
|
||||
@ -811,7 +811,7 @@ class PresupuestoCliente {
|
||||
console.log("Error al cargar diseño interior: " + e);
|
||||
}
|
||||
try {
|
||||
self.disenioCubierta.cargarDatos(response.data.cubierta, response.data.guardas, response.data.sobrecubierta);
|
||||
self.disenioCubierta.cargarDatos(response.data.cubierta, response.data.guardas, response.data.sobrecubierta, response.data.faja);
|
||||
}
|
||||
catch (e) {
|
||||
console.log("Error al cargar diseño cubierta: " + e);
|
||||
|
||||
Reference in New Issue
Block a user