Agregada información de productos y cantidades pedidas por el barrio

This commit is contained in:
Alejandro Tasistro 2025-09-13 18:35:35 -03:00
parent f155f0d824
commit d7cef79a50
2 changed files with 9 additions and 0 deletions

View file

@ -17,6 +17,7 @@ const state: AdminState = {
total_transporte: undefined,
cantidad_transporte: undefined,
saldo: undefined,
productos_cantidades: [],
};
const mutations = {
@ -40,6 +41,8 @@ const mutations = {
state.total_transporte = grupo_de_compra.total_transporte;
state.cantidad_transporte = grupo_de_compra.cantidad_transporte;
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 }) {
state[`${caracteristica_id}_habilitadas`] = !state[`${caracteristica_id}_habilitadas`];

View file

@ -17,6 +17,7 @@ export interface Barrio {
total_transporte?: number,
cantidad_transporte?: number,
saldo?: number,
productos_cantidades: ProductoCantidad[],
}
export interface Pedido {
@ -31,3 +32,8 @@ export interface Pedido {
devoluciones_total: number,
devoluciones_notas: string
}
export interface ProductoCantidad {
id: number,
cantidad: number,
}