funcion/pedido-ollas #47

Merged
rho merged 92 commits from funcion/pedido-ollas into master 2025-07-15 11:27:30 -03:00
2 changed files with 11 additions and 3 deletions
Showing only changes of commit db056e7d34 - Show all commits

View file

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

View file

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