nueva-chismosa #35

Merged
rho merged 11 commits from nueva-chismosa into master 2024-09-19 21:42:45 -03:00
Showing only changes of commit a998f76d44 - Show all commits

View file

@ -38,6 +38,10 @@
}
},
mounted() {
if (this.producto.pivot !== undefined) {
this.cantidad = this.producto.pivot.cantidad;
this.enChismosa = this.cantidad;
}
Event.$on('sync-subpedido', (cantidad,productoId) => {
if (this.producto.id === productoId)
this.sincronizar(cantidad);
@ -59,7 +63,11 @@
},
sincronizar(cantidad) {
this.cantidad = cantidad;
this.producto.cantidad = cantidad;
if (this.producto.pivot != null) {
this.producto.pivot.cantidad = cantidad;
} else {
this.producto.cantidad = cantidad;
}
this.enChismosa = cantidad;
},
hayCambios() {