feat: add optional project column to table view (#2182)
Adds a Project column to the table view, useful when viewing tasks across multiple projects (e.g. in saved filters). Disabled by default to keep the current behavior. Co-authored-by: 2ZZ <ian@driv3r.uk>
This commit is contained in:
parent
b9e571fd0d
commit
48074d2358
|
|
@ -29,6 +29,9 @@
|
|||
<FancyCheckbox v-model="activeColumns.done">
|
||||
{{ $t('task.attributes.done') }}
|
||||
</FancyCheckbox>
|
||||
<FancyCheckbox v-model="activeColumns.project">
|
||||
{{ $t('task.attributes.project') }}
|
||||
</FancyCheckbox>
|
||||
<FancyCheckbox v-model="activeColumns.title">
|
||||
{{ $t('task.attributes.title') }}
|
||||
</FancyCheckbox>
|
||||
|
|
@ -108,6 +111,9 @@
|
|||
@click="sort('done', $event)"
|
||||
/>
|
||||
</th>
|
||||
<th v-if="activeColumns.project">
|
||||
{{ $t('task.attributes.project') }}
|
||||
</th>
|
||||
<th v-if="activeColumns.title">
|
||||
{{ $t('task.attributes.title') }}
|
||||
<Sort
|
||||
|
|
@ -206,6 +212,14 @@
|
|||
variant="small"
|
||||
/>
|
||||
</td>
|
||||
<td v-if="activeColumns.project">
|
||||
<RouterLink
|
||||
v-if="projectStore.projects[t.projectId]"
|
||||
:to="{ name: 'project.index', params: { projectId: t.projectId } }"
|
||||
>
|
||||
{{ projectStore.projects[t.projectId].title }}
|
||||
</RouterLink>
|
||||
</td>
|
||||
<td v-if="activeColumns.title">
|
||||
<TaskGlanceTooltip :task="t">
|
||||
<RouterLink :to="taskDetailRoutes[t.id]">
|
||||
|
|
@ -311,6 +325,7 @@ import AssigneeList from '@/components/tasks/partials/AssigneeList.vue'
|
|||
import type {IProjectView} from '@/modelTypes/IProjectView'
|
||||
import { camelCase } from 'change-case'
|
||||
import {isSavedFilter} from '@/services/savedFilter'
|
||||
import {useProjectStore} from '@/stores/projects'
|
||||
|
||||
const props = defineProps<{
|
||||
isLoadingProject: boolean,
|
||||
|
|
@ -318,9 +333,12 @@ const props = defineProps<{
|
|||
viewId: IProjectView['id'],
|
||||
}>()
|
||||
|
||||
const projectStore = useProjectStore()
|
||||
|
||||
const ACTIVE_COLUMNS_DEFAULT = {
|
||||
index: true,
|
||||
done: true,
|
||||
project: false,
|
||||
title: true,
|
||||
priority: false,
|
||||
labels: true,
|
||||
|
|
|
|||
|
|
@ -875,6 +875,7 @@
|
|||
"labels": "Labels",
|
||||
"percentDone": "Progress",
|
||||
"priority": "Priority",
|
||||
"project": "Project",
|
||||
"relatedTasks": "Related Tasks",
|
||||
"reminders": "Reminders",
|
||||
"repeat": "Repeat",
|
||||
|
|
|
|||
Loading…
Reference in New Issue