mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
se actualiza el comparador despues de cargar para evitar el mensaje de seleccione papel
This commit is contained in:
@ -40,6 +40,7 @@ class PresupuestoAdminEdit {
|
||||
calcularSolapas: this.calcularSolapas.bind(this),
|
||||
});
|
||||
this.comparador = new Comparador(this.domItem.find('#accordionDatosPresupuestoClienteTip'),
|
||||
() => {return this.cargandoPresupuesto},
|
||||
{
|
||||
getDimensionLibro: this.getDimensionLibro,
|
||||
});
|
||||
@ -298,6 +299,9 @@ class PresupuestoAdminEdit {
|
||||
};
|
||||
|
||||
if (self.cargandoPresupuesto == false) {
|
||||
|
||||
self.comparador.updateComparador();
|
||||
|
||||
// Ejecutar los pasos de forma secuencial si están habilitados
|
||||
if (update_lineas) {
|
||||
$(document).trigger('update-lineas-presupuesto');
|
||||
|
||||
@ -4,10 +4,12 @@ import Ajax from '../../../components/ajax.js';
|
||||
|
||||
class Comparador {
|
||||
|
||||
constructor(domItem, functions = {}) {
|
||||
constructor(domItem, cargando, functions = {}) {
|
||||
|
||||
this.domItem = domItem;
|
||||
|
||||
this.cargando = cargando;
|
||||
|
||||
this.getDimensionLibro = functions.getDimensionLibro;
|
||||
|
||||
this.tipo_impresion_id = parseInt($('#tipo_impresion_id').val());
|
||||
@ -267,7 +269,6 @@ class Comparador {
|
||||
this.btnInsertarCubierta = $('#insertarCubiertaBtn');
|
||||
this.btnInsertarFaja = $('#insertarFajaBtn');
|
||||
|
||||
this.cargando = false;
|
||||
this.comparadorPlanaRunning = false;
|
||||
}
|
||||
|
||||
@ -473,8 +474,6 @@ class Comparador {
|
||||
|
||||
cargarDatos(datos) {
|
||||
|
||||
this.cargando = true;
|
||||
|
||||
this.tipo_impresion.val(datos.tipo_impresion).trigger('change');
|
||||
this.updateOpcionesComparador();
|
||||
|
||||
@ -544,9 +543,10 @@ class Comparador {
|
||||
this.#computarPaginasColor(datos.posPagColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.cargando = false;
|
||||
|
||||
updateComparador(){
|
||||
|
||||
if (this.paginasColor.val() > 0) {
|
||||
this.paginasColor.trigger('change');
|
||||
}
|
||||
@ -565,7 +565,6 @@ class Comparador {
|
||||
this.carasGuardas.trigger('change');
|
||||
}
|
||||
this.faja.trigger('change');
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1009,6 +1008,9 @@ class Comparador {
|
||||
|
||||
getDataForComp(uso = 'interior') {
|
||||
|
||||
if(this.cargando)
|
||||
return { error: true, data: {} };
|
||||
|
||||
let ancho = 0;
|
||||
let alto = 0;
|
||||
let papel_generico = {};
|
||||
|
||||
Reference in New Issue
Block a user