forked from vikunja/frontend
fix: related task not removed from the list when deleting it
This commit is contained in:
parent
edc74fd598
commit
21ddd25714
|
@ -244,15 +244,19 @@ export default {
|
||||||
try {
|
try {
|
||||||
await this.taskRelationService.delete(rel)
|
await this.taskRelationService.delete(rel)
|
||||||
|
|
||||||
Object.entries(this.relatedTasks).some(([relationKind, t]) => {
|
outer:
|
||||||
const found = typeof this.relatedTasks[relationKind][t] !== 'undefined' &&
|
for (const kind in this.relatedTasks) {
|
||||||
this.relatedTasks[relationKind][t].id === this.relationToDelete.otherTaskId &&
|
for (const t in this.relatedTasks[kind]) {
|
||||||
relationKind === this.relationToDelete.relationKind
|
const found = typeof this.relatedTasks[kind][t] !== 'undefined' &&
|
||||||
if (!found) return false
|
this.relatedTasks[kind][t].id === this.relationToDelete.otherTaskId &&
|
||||||
|
kind === this.relationToDelete.relationKind
|
||||||
|
if (!found) continue
|
||||||
|
|
||||||
this.relatedTasks[relationKind].splice(t, 1)
|
this.relatedTasks[kind].splice(t, 1)
|
||||||
return true
|
|
||||||
})
|
break outer
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.saved = true
|
this.saved = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user