Borradas cosas de admin ya no usadas

This commit is contained in:
Alejandro Tasistro 2025-05-21 20:48:06 -03:00
parent d64659d653
commit fff9b5b65f

26
resources/js/app.js vendored
View file

@ -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')
},
});