mirror of
https://github.com/DCsunset/taskwarrior-webui.git
synced 2025-08-18 21:43:06 +02:00
fix(frontend): fix waiting tasks
This commit is contained in:
parent
bda44030e5
commit
0664c3ba4b
1 changed files with 12 additions and 1 deletions
|
@ -280,9 +280,20 @@ export default defineComponent({
|
||||||
|
|
||||||
const tempTasks: { [key: string]: ComputedRef<Task[]> } = {};
|
const tempTasks: { [key: string]: ComputedRef<Task[]> } = {};
|
||||||
for (const status of allStatus) {
|
for (const status of allStatus) {
|
||||||
tempTasks[status] = computed((): Task[] => props.tasks?.filter(task => task.status === status));
|
tempTasks[status] = computed((): Task[] => props.tasks?.filter(task => {
|
||||||
|
if (status === "waiting") {
|
||||||
|
return task.status === "pending" && task.wait && !expiredDate(task.wait);
|
||||||
|
}
|
||||||
|
else if (status === "pending") {
|
||||||
|
return task.status === "pending" && !(task.wait && !expiredDate(task.wait));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return task.status === status;
|
||||||
|
}
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
const classifiedTasks = reactive(tempTasks);
|
const classifiedTasks = reactive(tempTasks);
|
||||||
|
console.log(classifiedTasks)
|
||||||
|
|
||||||
const refresh = () => {
|
const refresh = () => {
|
||||||
context.root.$store.dispatch('fetchTasks');
|
context.root.$store.dispatch('fetchTasks');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue