TaskView is a self-hosted project and task management platform focused on clarity, ownership, and control. TaskView is built for teams that want a transparent, self-hosted alternative to SaaS task managers.
TypeScript graphviewkanban-boardnodejsproductivityproject-managementself-hostedtasktask-managementtask-managertodoapp
fix: lists load for task details
Nikolai Giman3c7733e5b025
diff --git a/web/src/components/features/tasks/parts/TaskListSelect.vue b/web/src/components/features/tasks/parts/TaskListSelect.vueindex 3fd24e4..a30f8a9 100644--- a/web/src/components/features/tasks/parts/TaskListSelect.vue+++ b/web/src/components/features/tasks/parts/TaskListSelect.vue@@ -68,6 +68,7 @@ import { computed } from 'vue'import { useI18n } from 'vue-i18n'import { useGoalListsStore } from '@/stores/goal-lists.store'import { useTasksStore } from '@/stores/tasks.store'+import { useProjectContext } from '@/composables/useProjectContext'import { ALL_TASKS_LIST_ID } from 'taskview-api'import { useColor } from '@/composables/useColotMode'@@ -79,8 +80,9 @@ const props = defineProps<{const { t } = useI18n()const goalListsStore = useGoalListsStore()const tasksStore = useTasksStore()+const projectContext = useProjectContext()const { isDark } = useColor()-const lists = computed(() => goalListsStore.lists)+const lists = computed(() => projectContext?.lists.value ?? goalListsStore.lists)const listItems = computed(() => [{ label: t('tasks.noList'), value: ALL_TASKS_LIST_ID },diff --git a/web/src/composables/useProjectContext.ts b/web/src/composables/useProjectContext.tsindex 195cf74..0d86abf 100644--- a/web/src/composables/useProjectContext.ts+++ b/web/src/composables/useProjectContext.ts@@ -1,10 +1,11 @@import { ref, computed, watch, provide, inject, type InjectionKey, type Ref, type ComputedRef } from 'vue'-import type { CollaborationResponseFetchAllUsers, KanbanColumnItem } from 'taskview-api'+import type { CollaborationResponseFetchAllUsers, GoalListItem, KanbanColumnItem } from 'taskview-api'import type { TagItem } from '@/types/tags.types'import { DEFAULT_ID } from '@/types/app.types'import { $tvApi } from '@/plugins/axios'import { useTagsStore } from '@/stores/tag.store'import { useGoalsStore } from '@/stores/goals.store'+import { useGoalListsStore } from '@/stores/goal-lists.store'import { useCollaborationStore } from '@/stores/collaboration.store'import { useKanbanStore } from '@/stores/kanban.store'@@ -12,6 +13,7 @@ export type ProjectContext = {tags: ComputedRef<TagItem[]>users: Ref<CollaborationResponseFetchAllUsers[]>statuses: Ref<KanbanColumnItem[]>+ lists: Ref<GoalListItem[]>}const PROJECT_CONTEXT_KEY: InjectionKey<ProjectContext> = Symbol('projectContext')@@ -30,12 +32,14 @@ export function provideProjectContext(goalId: Ref<number>) {const users = ref<CollaborationResponseFetchAllUsers[]>([])const statuses = ref<KanbanColumnItem[]>([])+ const lists = ref<GoalListItem[]>([])let requestId = 0watch(goalId, async (id) => {if (id <= 0) {users.value = []statuses.value = []+ lists.value = []return}@@ -47,17 +51,20 @@ export function provideProjectContext(goalId: Ref<number>) {if (goalsStore.selectedItemId === id) {const collaborationStore = useCollaborationStore()const kanbanStore = useKanbanStore()+ const goalListsStore = useGoalListsStore()users.value = collaborationStore.usersstatuses.value = kanbanStore.statuses+ lists.value = goalListsStore.listsreturn}// Otherwise fetch project data without touching global storesconst currentRequestId = ++requestId- const [usersResult, columnsResult] = await Promise.all([+ const [usersResult, columnsResult, listsResult] = await Promise.all([$tvApi.collaboration.fetchUsersForGoal(id).catch(() => null),$tvApi.kanban.fetchAllColumns(id).catch(() => null),+ $tvApi.goalLists.fetchLists({ goalId: id }).catch(() => null),])// Stale check — goalId could have changed while requests were in flight@@ -70,9 +77,10 @@ export function provideProjectContext(goalId: Ref<number>) {...columnsResult,]}+ if (listsResult) lists.value = listsResult}, { immediate: true })- const context: ProjectContext = { tags, users, statuses }+ const context: ProjectContext = { tags, users, statuses, lists }provide(PROJECT_CONTEXT_KEY, context)return context