Revert "Auto sincronziar producto después de 3 segundos"

This reverts commit 80a28f4162.
This commit is contained in:
Rodrigo 2024-09-17 19:14:30 -03:00
parent 80a28f4162
commit d2fde9df83
1 changed files with 1 additions and 10 deletions

View File

@ -1,7 +1,7 @@
<template>
<div class="field has-addons">
<div class="control">
<button :disabled="cantidad < 1" class="button is-small" @click.capture="decrementar();">
<button class="button is-small" @click.capture="decrementar();">
<i class="fa fa-solid fa-minus"></i>
</button>
</div>
@ -50,18 +50,9 @@
methods: {
decrementar() {
this.cantidad -= 1;
this.programarSincronizacion();
},
incrementar() {
this.cantidad += 1;
this.programarSincronizacion();
},
programarSincronizacion() {
setTimeout(() => {
if (this.hayCambios()) {
this.confirmar();
}
}, 3000);
},
confirmar() {
Event.$emit('sync-subpedido', this.cantidad, this.producto.id);