Borradas cosas de admin ya no usadas
This commit is contained in:
parent
d64659d653
commit
fff9b5b65f
1 changed files with 1 additions and 25 deletions
26
resources/js/app.js
vendored
26
resources/js/app.js
vendored
|
@ -19,16 +19,6 @@ window.bulmaToast = require('bulma-toast');
|
||||||
*/
|
*/
|
||||||
import './components';
|
import './components';
|
||||||
import store from "./store";
|
import store from "./store";
|
||||||
import {mapState} from "vuex";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constants
|
|
||||||
*/
|
|
||||||
Vue.prototype.$rootMiga = {
|
|
||||||
nombre: "Categorías",
|
|
||||||
href: "/productos"
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Global methods
|
* Global methods
|
||||||
*/
|
*/
|
||||||
|
@ -82,12 +72,7 @@ const app = new Vue({
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
Event.$on('obtener-sesion', () => {
|
Event.$on('obtener-sesion', () => {
|
||||||
if (window.location.pathname.startsWith('/admin')) {
|
if (!window.location.pathname.startsWith('/admin')) {
|
||||||
axios.get('/admin/obtener_sesion')
|
|
||||||
.then(response => {
|
|
||||||
this.gdc = response.data.gdc
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
axios.get('/subpedidos/obtener_sesion')
|
axios.get('/subpedidos/obtener_sesion')
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.gdc = response.data.gdc;
|
this.gdc = response.data.gdc;
|
||||||
|
@ -132,15 +117,6 @@ const app = new Vue({
|
||||||
Event.$emit("pedido-actualizado");
|
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')
|
Event.$emit('obtener-sesion')
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue