token expire, remove console
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<card title='Filtro general'>
|
||||
<card title="Filtro general">
|
||||
<base-input label="Filtro de fechas" v-model="filtro.fechas"></base-input>
|
||||
<base-input label="Número de presupuestos" type="number" v-model="filtro.npresupuesto"></base-input>
|
||||
<base-button @click='guardarFiltro()' type="info">Guardar</base-button>
|
||||
<base-input
|
||||
label="Número de presupuestos"
|
||||
type="number"
|
||||
v-model="filtro.npresupuesto"
|
||||
></base-input>
|
||||
<base-button @click="guardarFiltro()" type="info">Guardar</base-button>
|
||||
</card>
|
||||
<div class="row">
|
||||
<card title="Categorias">
|
||||
@@ -37,22 +41,20 @@
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<form>
|
||||
|
||||
<base-input
|
||||
type="text"
|
||||
placeholder="Nombre de categoria"
|
||||
v-model="newCategoria.name"
|
||||
/>
|
||||
|
||||
|
||||
<base-input>
|
||||
<select class="form-control" v-model="newCategoria.icon">
|
||||
<option v-for="icono in iconos">
|
||||
{{ icono.icon }}
|
||||
</option>
|
||||
</select>
|
||||
</base-input>
|
||||
|
||||
<base-input
|
||||
type="text"
|
||||
placeholder="Nombre de categoria"
|
||||
v-model="newCategoria.name"
|
||||
/>
|
||||
|
||||
<base-input>
|
||||
<select class="form-control" v-model="newCategoria.icon">
|
||||
<option v-for="icono in iconos">
|
||||
{{ icono.icon }}
|
||||
</option>
|
||||
</select>
|
||||
</base-input>
|
||||
|
||||
<div class="col pull-buttom">
|
||||
<base-button
|
||||
type="info"
|
||||
@@ -99,17 +101,20 @@
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<form>
|
||||
<base-input placeholder="Nombre pago" v-model="newMetodo.name"></base-input>
|
||||
<base-input>
|
||||
<select class="form-control" v-model="newMetodo.icon">
|
||||
<option v-for="icono in iconos">
|
||||
{{ icono.icon }}
|
||||
</option>
|
||||
</select>
|
||||
</base-input>
|
||||
|
||||
<div class="col pull-buttom">
|
||||
<form>
|
||||
<base-input
|
||||
placeholder="Nombre pago"
|
||||
v-model="newMetodo.name"
|
||||
></base-input>
|
||||
<base-input>
|
||||
<select class="form-control" v-model="newMetodo.icon">
|
||||
<option v-for="icono in iconos">
|
||||
{{ icono.icon }}
|
||||
</option>
|
||||
</select>
|
||||
</base-input>
|
||||
|
||||
<div class="col pull-buttom">
|
||||
<base-button
|
||||
type="info"
|
||||
class="mb-3"
|
||||
@@ -118,7 +123,7 @@
|
||||
>Enviar</base-button
|
||||
>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</card>
|
||||
@@ -130,14 +135,14 @@
|
||||
import { Table, TableColumn } from "element-ui";
|
||||
export default {
|
||||
middleware: "authenticated",
|
||||
components: {
|
||||
components: {
|
||||
[Table.name]: Table,
|
||||
[TableColumn.name]: TableColumn,
|
||||
},
|
||||
mounted() {
|
||||
this.getCategorias();
|
||||
this.getMetodos();
|
||||
this.filtro=this.$store.state.filtro
|
||||
this.getMetodos();
|
||||
this.filtro = JSON.parse(JSON.stringify(this.$store.state.filtro));
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -145,11 +150,11 @@ export default {
|
||||
name: "",
|
||||
icon: "",
|
||||
},
|
||||
newMetodo: {
|
||||
newMetodo: {
|
||||
name: "",
|
||||
icon: "",
|
||||
},
|
||||
|
||||
|
||||
iconos: [
|
||||
{ icon: "fa-bell" },
|
||||
{ icon: "fa-book" },
|
||||
@@ -183,15 +188,15 @@ export default {
|
||||
],
|
||||
categorias: [],
|
||||
metodos: [],
|
||||
filtro:{
|
||||
fechas:this.$store.state.filtro.fechas,
|
||||
npresupuesto:this.$store.state.filtro.npresupuesto
|
||||
}
|
||||
filtro: {
|
||||
fechas: "",
|
||||
npresupuesto: 0
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
guardarFiltro(){
|
||||
this.$store.commit("actualizarFiltro",this.filtro)
|
||||
guardarFiltro() {
|
||||
this.$store.commit("actualizarFiltro", this.filtro);
|
||||
},
|
||||
enviarCategoria() {
|
||||
const axiosHeader = {
|
||||
@@ -204,7 +209,6 @@ export default {
|
||||
this.$axios
|
||||
.post("/categoria", toSend, axiosHeader)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
this.getCategorias();
|
||||
})
|
||||
.catch((e) => {
|
||||
@@ -213,7 +217,6 @@ export default {
|
||||
icon: "tim-icons icon-alert-circle-exc",
|
||||
message: JSON.parse(e.request.response).error,
|
||||
});
|
||||
console.log(e.request.responseText);
|
||||
});
|
||||
},
|
||||
|
||||
@@ -226,7 +229,6 @@ export default {
|
||||
this.$axios
|
||||
.get("/categoria", axiosHeader)
|
||||
.then((res) => {
|
||||
console.log(res.data.data);
|
||||
this.categorias = res.data.data;
|
||||
this.$store.commit("setCategorias", this.categorias);
|
||||
})
|
||||
@@ -244,14 +246,13 @@ export default {
|
||||
this.$axios
|
||||
.delete("/categoria", axiosHeader)
|
||||
.then((res) => {
|
||||
console.log(res.data);
|
||||
this.getCategorias();
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
});
|
||||
},
|
||||
enviarMetodo() {
|
||||
enviarMetodo() {
|
||||
const axiosHeader = {
|
||||
headers: {
|
||||
token: this.$store.state.auth.token,
|
||||
@@ -262,7 +263,6 @@ export default {
|
||||
this.$axios
|
||||
.post("/metodo", toSend, axiosHeader)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
this.getMetodos();
|
||||
})
|
||||
.catch((e) => {
|
||||
@@ -271,7 +271,6 @@ export default {
|
||||
icon: "tim-icons icon-alert-circle-exc",
|
||||
message: JSON.parse(e.request.response).error,
|
||||
});
|
||||
console.log(e.request.responseText);
|
||||
});
|
||||
},
|
||||
|
||||
@@ -284,7 +283,6 @@ export default {
|
||||
this.$axios
|
||||
.get("/metodo", axiosHeader)
|
||||
.then((res) => {
|
||||
console.log(res.data.data);
|
||||
this.metodos = res.data.data;
|
||||
this.$store.commit("setMetodos", this.metodos);
|
||||
})
|
||||
@@ -302,7 +300,6 @@ export default {
|
||||
this.$axios
|
||||
.delete("/metodo", axiosHeader)
|
||||
.then((res) => {
|
||||
console.log(res.data);
|
||||
this.getMetodos();
|
||||
})
|
||||
.catch((e) => {
|
||||
|
||||
Reference in New Issue
Block a user