Card Changes for New Dashboard

This commit is contained in:
2026-03-18 18:27:30 +01:00
parent 003d88587a
commit a9d3d0038f
2 changed files with 67 additions and 2 deletions

View File

@@ -4,11 +4,15 @@ const openTasks = ref([])
const router = useRouter()
const auth = useAuthStore()
function isCompletedTask(task) {
return ["Abgeschlossen", "Erledigt"].includes(String(task?.categorie || "").trim())
}
const setupPage = async () => {
openTasks.value = (await useEntities("tasks").select()).filter((task) => {
const assignee = task.userId || task.user_id || task.profile
const currentUser = auth.user?.user_id || auth.user?.id
return !task.archived && assignee === currentUser
return !task.archived && !isCompletedTask(task) && assignee === currentUser
})
}