Card Changes for New Dashboard
This commit is contained in:
@@ -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
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user