Agregada información de productos y cantidades pedidas por el barrio
This commit is contained in:
parent
f155f0d824
commit
d7cef79a50
2 changed files with 9 additions and 0 deletions
|
@ -17,6 +17,7 @@ const state: AdminState = {
|
||||||
total_transporte: undefined,
|
total_transporte: undefined,
|
||||||
cantidad_transporte: undefined,
|
cantidad_transporte: undefined,
|
||||||
saldo: undefined,
|
saldo: undefined,
|
||||||
|
productos_cantidades: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
|
@ -40,6 +41,8 @@ const mutations = {
|
||||||
state.total_transporte = grupo_de_compra.total_transporte;
|
state.total_transporte = grupo_de_compra.total_transporte;
|
||||||
state.cantidad_transporte = grupo_de_compra.cantidad_transporte;
|
state.cantidad_transporte = grupo_de_compra.cantidad_transporte;
|
||||||
state.saldo = grupo_de_compra.saldo;
|
state.saldo = grupo_de_compra.saldo;
|
||||||
|
state.productos_cantidades = grupo_de_compra.productos_cantidades
|
||||||
|
.map(pc => ({...pc, cantidad: parseInt(pc.cantidad)}));
|
||||||
},
|
},
|
||||||
toggleCaracteristica(state, { caracteristica_id }) {
|
toggleCaracteristica(state, { caracteristica_id }) {
|
||||||
state[`${caracteristica_id}_habilitadas`] = !state[`${caracteristica_id}_habilitadas`];
|
state[`${caracteristica_id}_habilitadas`] = !state[`${caracteristica_id}_habilitadas`];
|
||||||
|
|
|
@ -17,6 +17,7 @@ export interface Barrio {
|
||||||
total_transporte?: number,
|
total_transporte?: number,
|
||||||
cantidad_transporte?: number,
|
cantidad_transporte?: number,
|
||||||
saldo?: number,
|
saldo?: number,
|
||||||
|
productos_cantidades: ProductoCantidad[],
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Pedido {
|
export interface Pedido {
|
||||||
|
@ -31,3 +32,8 @@ export interface Pedido {
|
||||||
devoluciones_total: number,
|
devoluciones_total: number,
|
||||||
devoluciones_notas: string
|
devoluciones_notas: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ProductoCantidad {
|
||||||
|
id: number,
|
||||||
|
cantidad: number,
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue