From daa998c89eb3aceab57471e68a50ba588467faaa Mon Sep 17 00:00:00 2001 From: Ale Date: Sat, 27 May 2023 15:38:56 -0300 Subject: [PATCH] cambio de nombre de evento --- resources/js/components/CategoriasContainer.vue | 4 ++-- resources/js/components/NavBar.vue | 2 +- resources/js/components/ProductosContainer.vue | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/js/components/CategoriasContainer.vue b/resources/js/components/CategoriasContainer.vue index b2dab4f..65a06de 100644 --- a/resources/js/components/CategoriasContainer.vue +++ b/resources/js/components/CategoriasContainer.vue @@ -29,12 +29,12 @@ this.categorias = response.data; }); Event.$emit("migas-setear-como-inicio", this.$rootMiga); - Event.$on("categoria-seleccionada", (_) => this.visible = false) + Event.$on("filtrar-productos", (_) => this.visible = false) }, methods: { seleccionarCategoria(categoria) { this.visible = false; - Event.$emit("categoria-seleccionada",'categoria',categoria); + Event.$emit("filtrar-productos",'categoria',categoria); } } } diff --git a/resources/js/components/NavBar.vue b/resources/js/components/NavBar.vue index c7d758d..0587b63 100644 --- a/resources/js/components/NavBar.vue +++ b/resources/js/components/NavBar.vue @@ -75,7 +75,7 @@ buscar() { if (this.isActive) this.toggleState() Event.$emit("migas-setear-como-inicio", this.$rootMiga) - Event.$emit("categoria-seleccionada",'nombre',this.searchString) + Event.$emit("filtrar-productos",'nombre',this.searchString) } }, mounted() { diff --git a/resources/js/components/ProductosContainer.vue b/resources/js/components/ProductosContainer.vue index 373d43f..d30fd48 100644 --- a/resources/js/components/ProductosContainer.vue +++ b/resources/js/components/ProductosContainer.vue @@ -49,7 +49,7 @@ export default { } }, mounted() { - Event.$on('categoria-seleccionada', (filtro,valor) => { + Event.$on('filtrar-productos', (filtro,valor) => { this.filtro = filtro this.valor = valor axios.get("/api/productos", {