Esqueleto presupuesto

This commit is contained in:
2021-05-10 23:34:58 -05:00
parent a05bc18d5a
commit e3abbfd0dc
17 changed files with 677 additions and 29 deletions

View File

@@ -34,6 +34,7 @@
prop="categoria"
label="Categoria"
sortable
></el-TableColumn>
<el-TableColumn>
<div slot-scope="{ row, $index }">
@@ -107,14 +108,23 @@ export default {
openForm: false,
};
},
mounted() {
mounted() {
// this.$store.dispatch("getCategorias");
//this.$store.dispatch("getMetodos");
this.newCompra.fecha = this.$store.state.fecha;
this.$store.dispatch("getCategorias");
this.$store.dispatch("getMetodos");
this.categorias = this.$store.state.categorias;
this.metodos_pago = this.$store.state.metodos_de_pago;
this.getCompras();
},
methods: {
cell(row, column, cellValue, index) {
@@ -203,9 +213,10 @@ export default {
this.newCompra.categoria = "";
this.isUpdate = false;
},
getIcon(name) {
const found = this.$store.state.categorias.find((ic) => ic.name === name);
console.log(found);
getIcon(row, column, cellValue, index) {
const found = this.$store.state.categorias.filter((ic) => ic.name === cellValue)[0];
//console.log(found);
return `<i class="${found.icon}"></i>${cellValue}`
},
formatMoneda(dato) {