funcion/refactor-general #45

Open
atasistro wants to merge 111 commits from funcion/refactor-general into master
Showing only changes of commit caebf1b53b - Show all commits

View file

@ -36,10 +36,8 @@ const actions = {
commit('setFiltro', null);
commit('setProductos', response.data.data);
},
async seleccionarCategoria({ commit }, { categoria }) {
const response = await axios.get("/api/productos");
commit('setFiltro', { clave: "categoria", valor: categoria });
commit('setProductos', response.data.data);
async seleccionarCategoria({ dispatch }, { categoria }) {
dispatch('filtrarProductos', { filtro: "categoria", valor: categoria });
},
async filtrarProductos({ commit }, { filtro, valor }) {
const response = await axios.get("/api/productos", {