Migas para ollas

This commit is contained in:
Alejandro Tasistro 2025-06-20 02:00:48 -03:00
parent 8649ff5bbd
commit db056e7d34
2 changed files with 11 additions and 3 deletions

View file

@ -1,16 +1,18 @@
<script>
import PedidosMain from "../pedidos/PedidosMain.vue";
import { mapActions } from "vuex";
import { mapActions, mapMutations } from "vuex";
export default {
name: "OllasBody",
components: { PedidosMain },
methods: {
...mapActions('pedido', ["getPedidoDeOllas", "getGrupoDeCompra"]),
...mapMutations('ui', ["migasOllas"])
},
async mounted() {
await this.getGrupoDeCompra();
await this.getPedidoDeOllas();
this.migasOllas();
},
}
</script>

View file

@ -35,7 +35,10 @@ const mutations = {
reset(state) {
state.show_chismosa = false;
state.show_devoluciones = false;
}
},
migasOllas(state) {
state.migas.reverse().pop();
},
};
const actions = {
@ -53,7 +56,7 @@ const actions = {
}
dispatch(miga.action, miga.arguments ?? null, { root: true });
state.migas = dropWhile(state.migas.reverse(),(m => m.nombre !== miga.nombre)).reverse();
state.migas = dropWhile(state.migas.reverse(), (m => m.nombre !== miga.nombre)).reverse();
},
toast(_, { mensaje }) {
return window.bulmaToast.toast({
@ -72,6 +75,9 @@ const actions = {
resetear({ commit }) {
commit("reset");
},
migasOllas({ commit }) {
commit("migasOllas");
},
};
export default {