From fff9b5b65f6ac1a13f61a1646203ca8cb960afb4 Mon Sep 17 00:00:00 2001 From: ale Date: Wed, 21 May 2025 20:48:06 -0300 Subject: [PATCH] Borradas cosas de admin ya no usadas --- resources/js/app.js | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/resources/js/app.js b/resources/js/app.js index aadb9e8..dd45c1e 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -19,16 +19,6 @@ window.bulmaToast = require('bulma-toast'); */ import './components'; import store from "./store"; -import {mapState} from "vuex"; - -/** - * Constants - */ -Vue.prototype.$rootMiga = { - nombre: "Categorías", - href: "/productos" -} - /** * Global methods */ @@ -82,12 +72,7 @@ const app = new Vue({ }, mounted() { Event.$on('obtener-sesion', () => { - if (window.location.pathname.startsWith('/admin')) { - axios.get('/admin/obtener_sesion') - .then(response => { - this.gdc = response.data.gdc - }); - } else { + if (!window.location.pathname.startsWith('/admin')) { axios.get('/subpedidos/obtener_sesion') .then(response => { this.gdc = response.data.gdc; @@ -132,15 +117,6 @@ const app = new Vue({ Event.$emit("pedido-actualizado"); }); }); - - Event.$on('aprobacion-subpedido', (subpedidoId, aprobado) => { - axios.post("/api/admin/subpedidos/" + subpedidoId + "/aprobacion", { - aprobacion: aprobado - }).then((response) => { - Event.$emit('sync-aprobacion', response.data.data); - this.$toast('Pedido ' + (aprobado ? 'aprobado' : 'desaprobado') + ' exitosamente') - }) - }) Event.$emit('obtener-sesion') }, });