mirror of
https://github.com/DCsunset/taskwarrior-webui.git
synced 2025-08-20 01:13:06 +02:00
fix(frontend): refetch tasks after deletion
This commit is contained in:
parent
a3ab682575
commit
002725fd8f
1 changed files with 2 additions and 2 deletions
|
@ -24,8 +24,8 @@ export const actions: ActionTree<RootState, RootState> = {
|
||||||
await this.$axios.$delete('/api/tasks', {
|
await this.$axios.$delete('/api/tasks', {
|
||||||
params: { tasks: tasks.map(task => task.uuid) }
|
params: { tasks: tasks.map(task => task.uuid) }
|
||||||
});
|
});
|
||||||
const newTasks = context.state.tasks.filter(task => tasks.findIndex(t => t.uuid === task.uuid) === -1);
|
// Refresh
|
||||||
context.commit('setTasks', newTasks);
|
await context.dispatch('fetchTasks');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue