From d7cef79a50f9cf29a5f5f27ce62ba7a4d5ccd9de Mon Sep 17 00:00:00 2001 From: ale Date: Sat, 13 Sep 2025 18:35:35 -0300 Subject: [PATCH] =?UTF-8?q?Agregada=20informaci=C3=B3n=20de=20productos=20?= =?UTF-8?q?y=20cantidades=20pedidas=20por=20el=20barrio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/js/store/modules/admin/index.ts | 3 +++ resources/js/store/modules/admin/types.ts | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/resources/js/store/modules/admin/index.ts b/resources/js/store/modules/admin/index.ts index bec6b01..4da30e9 100644 --- a/resources/js/store/modules/admin/index.ts +++ b/resources/js/store/modules/admin/index.ts @@ -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`]; diff --git a/resources/js/store/modules/admin/types.ts b/resources/js/store/modules/admin/types.ts index 6e38ad7..3991dbb 100644 --- a/resources/js/store/modules/admin/types.ts +++ b/resources/js/store/modules/admin/types.ts @@ -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, +}