Primeras cosas de chismosa
This commit is contained in:
parent
5b65bc5d9f
commit
40e466aa82
2 changed files with 48 additions and 0 deletions
2
resources/js/store/index.js
vendored
2
resources/js/store/index.js
vendored
|
@ -2,6 +2,7 @@ import Vue from 'vue';
|
||||||
import Vuex from 'vuex';
|
import Vuex from 'vuex';
|
||||||
import admin from "./modules/admin";
|
import admin from "./modules/admin";
|
||||||
import login from "./modules/login";
|
import login from "./modules/login";
|
||||||
|
import chismosa from "./modules/chismosa";
|
||||||
|
|
||||||
Vue.use(Vuex);
|
Vue.use(Vuex);
|
||||||
|
|
||||||
|
@ -9,5 +10,6 @@ export default new Vuex.Store({
|
||||||
modules: {
|
modules: {
|
||||||
admin,
|
admin,
|
||||||
login,
|
login,
|
||||||
|
chismosa,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
46
resources/js/store/modules/chismosa.js
vendored
Normal file
46
resources/js/store/modules/chismosa.js
vendored
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
const state = {
|
||||||
|
lastFetch: null,
|
||||||
|
pedido_id: null,
|
||||||
|
nombre: null,
|
||||||
|
productos: null,
|
||||||
|
aprobado: null,
|
||||||
|
total: null,
|
||||||
|
total_transporte: null,
|
||||||
|
cantidad_transporte: null,
|
||||||
|
total_sin_devoluciones: null,
|
||||||
|
devoluciones_habilitadas: null,
|
||||||
|
devoluciones_total: null,
|
||||||
|
devoluciones_notas: null,
|
||||||
|
};
|
||||||
|
|
||||||
|
const mutations = {
|
||||||
|
setState(state, { pedido }) {
|
||||||
|
state.lastFetch = new Date();
|
||||||
|
state.pedido_id = pedido.id;
|
||||||
|
state.nombre = pedido.nombre;
|
||||||
|
state.productos = pedido.productos;
|
||||||
|
state.aprobado = pedido.aprobado;
|
||||||
|
state.total = pedido.total;
|
||||||
|
state.total_transporte = pedido.total_transporte;
|
||||||
|
state.cantidad_transporte = pedido.cantidad_transporte;
|
||||||
|
state.total_sin_devoluciones = pedido.total_sin_devoluciones;
|
||||||
|
state.devoluciones_habilitadas = pedido.grupo_de_compra.devoluciones_habilitadas;
|
||||||
|
state.devoluciones_total = pedido.devoluciones_total;
|
||||||
|
state.devoluciones_notas = pedido.devoluciones_notas;
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const actions = {
|
||||||
|
async getPedido({ commit }) {
|
||||||
|
},
|
||||||
|
async modificarChismosa({ commit }, { producto_id, cantidad, notas }) {
|
||||||
|
},
|
||||||
|
async modificarDevoluciones({ commit }, { monto, notas }) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
namespaced: true,
|
||||||
|
state,
|
||||||
|
mutations,
|
||||||
|
actions,
|
||||||
|
};
|
Loading…
Add table
Reference in a new issue