From cdf5663b16cfcc75e071c22cdadce322f402d041 Mon Sep 17 00:00:00 2001 From: ale Date: Wed, 21 May 2025 22:40:23 -0300 Subject: [PATCH] =?UTF-8?q?Redirecci=C3=B3n=20movida=20a=20vuex?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/js/components/pedidos/SubpedidoSelect.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/js/components/pedidos/SubpedidoSelect.vue b/resources/js/components/pedidos/SubpedidoSelect.vue index a7230e0..17ac61e 100644 --- a/resources/js/components/pedidos/SubpedidoSelect.vue +++ b/resources/js/components/pedidos/SubpedidoSelect.vue @@ -55,14 +55,13 @@ export default { }, methods: { ...mapActions('barrio',["getGrupoDeCompra","getPedidos"]), - ...mapActions('pedido',["crearPedido"]), + ...mapActions('pedido',["crearPedido","elegirPedido"]), ...mapMutations('barrio',["setPedidos"]), onType() { if (!this.searchString) { this.setPedidos([]); return; } - this.getPedidos(this.searchString); }, async submit() { @@ -74,13 +73,14 @@ export default { this.guardarSubpedidoEnSesion(subpedido); }, guardarSubpedidoEnSesion(subpedido) { + console.log(`select: ${JSON.stringify(subpedido)}`); axios.post("/subpedidos/guardar_sesion", { subpedido: subpedido, grupo_de_compra_id: this.grupo_de_compra_id }).then(_ => { Event.$emit('obtener-sesion') - window.location.href = 'productos'; }); + this.elegirPedido({ pedido: subpedido }); } } }