Bugfixing

This commit is contained in:
Matej Glasnák committed 2023-02-16 07:56:31 +01:00
1 parent 1ef4bbd437
commit d6ad4ee350
3 files changed
+4 -3

No files matched your search

@@ -142,6 +142,7 @@ export default {
})
this.$events.on('on-task-deleted', (task) => {
if (!this.masterTask) return
this.masterTask.subtasks = this.masterTask.subtasks.filter((subtask) => subtask.id != task.id)
})
@@ -43,9 +43,9 @@ export default {
async deleteTask() {
try {
await this.$axios.delete(`v1/subtasks/${this.task.id}`)
// this.$emit('on-task-deleted', this.task)
this.$store.commit('tm/delete_subtask', this.task)
this.$emit('on-task-deleted', this.task)
this.closeModal()
} catch (error) {
this.$toast.error(error)
@@ -133,7 +133,7 @@ export default {
this.$forceUpdate()
})
this.$events.on("on-task-deleted", (task) => {
this.$events.on('on-task-deleted', (task) => {
if (task?.id == this.task?.id) this.closeModal()
})
},