funcion/refactor-general #45
1 changed files with 0 additions and 3 deletions
3
resources/js/store/modules/productos.js
vendored
3
resources/js/store/modules/productos.js
vendored
|
@ -11,7 +11,6 @@ const mutations = {
|
||||||
setCategorias(state, categorias) {
|
setCategorias(state, categorias) {
|
||||||
state.lastFetch = new Date();
|
state.lastFetch = new Date();
|
||||||
state.categorias = categorias;
|
state.categorias = categorias;
|
||||||
console.log(state);
|
|
||||||
},
|
},
|
||||||
setProductos(state, productos) {
|
setProductos(state, productos) {
|
||||||
state.lastFetch = new Date();
|
state.lastFetch = new Date();
|
||||||
|
@ -25,8 +24,6 @@ const mutations = {
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
async init({ dispatch }) {
|
async init({ dispatch }) {
|
||||||
if (state.lastFetch)
|
|
||||||
return;
|
|
||||||
dispatch('getCategorias');
|
dispatch('getCategorias');
|
||||||
dispatch('getProductos');
|
dispatch('getProductos');
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue