Agregada logica de sesion
This commit is contained in:
parent
cdf5663b16
commit
36af26a647
1 changed files with 10 additions and 3 deletions
13
resources/js/store/modules/pedido.js
vendored
13
resources/js/store/modules/pedido.js
vendored
|
@ -34,12 +34,19 @@ const actions = {
|
||||||
nombre: nombre,
|
nombre: nombre,
|
||||||
grupo_de_compra_id: grupo_de_compra_id
|
grupo_de_compra_id: grupo_de_compra_id
|
||||||
});
|
});
|
||||||
commit('setState', response.data);
|
const pedido = response.data;
|
||||||
|
await axios.post("/subpedidos/sesion", { id: pedido.id, });
|
||||||
|
commit('setState', pedido);
|
||||||
},
|
},
|
||||||
async getPedido({ commit }, pedido_id) {
|
async getPedido({ commit }) {
|
||||||
const response = await axios.get(`/api/subpedidos/${pedido_id}`);
|
const sesion = await axios.get("/subpedidos/sesion");
|
||||||
|
const response = await axios.get(`/api/subpedidos/${sesion.data}`);
|
||||||
commit('setState', response.data.data);
|
commit('setState', response.data.data);
|
||||||
},
|
},
|
||||||
|
async elegirPedido({ commit }, { pedido }) {
|
||||||
|
await axios.post("/subpedidos/sesion", { id: pedido.id, });
|
||||||
|
window.location.href = 'productos';
|
||||||
|
},
|
||||||
async modificarChismosa({ commit }, producto_id, cantidad, notas) {},
|
async modificarChismosa({ commit }, producto_id, cantidad, notas) {},
|
||||||
async modificarDevoluciones({ commit }, monto, notas) {}
|
async modificarDevoluciones({ commit }, monto, notas) {}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue