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", {