No sincronizar subpedidos aprobados #21

Merged
rho merged 4 commits from funcion/congelar-pedidos-aprobados into master 2023-09-04 20:33:10 -03:00
Showing only changes of commit f50d4b975d - Show all commits

4
resources/js/app.js vendored
View file

@ -69,6 +69,10 @@ const app = new Vue({
})
})
Event.$on('sync-subpedido', (cantidad, id) => {
if (this.pedido.aprobado) {
this.$toast('No se puede modificar un pedido ya aprobado');
return;
}
axios.post("/api/subpedidos/" + this.pedido.id + "/sync", {
cantidad: cantidad,
producto_id: id