Delete notes from table view

This commit is contained in:
Hubert Van De Walle 2020-04-25 19:05:57 +02:00
parent f1eed842d2
commit eaccc85c80

View File

@ -70,14 +70,19 @@ export default {
], ],
}), }),
mounted() { mounted() {
this.$axios.get('/notes').then((e) => { this.loadNotes()
this.notes = e.data
this.loading = false
})
}, },
methods: { methods: {
async loadNotes() {
await this.$axios.get('/notes').then((e) => {
this.notes = e.data
this.loading = false
})
},
editItem(item) {}, editItem(item) {},
deleteItem(item) {}, async deleteItem(item) {
await this.$axios.delete(`/notes/${item.uuid}`).then(this.loadNotes)
},
format, format,
}, },
} }