mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-05-03 01:49:03 -05:00
feat: add comment count to tasks (#1771)
This commit is contained in:
@@ -41,6 +41,9 @@
|
||||
<FancyCheckbox v-model="activeColumns.assignees">
|
||||
{{ $t('task.attributes.assignees') }}
|
||||
</FancyCheckbox>
|
||||
<FancyCheckbox v-model="activeColumns.commentCount">
|
||||
{{ $t('task.attributes.commentCount') }}
|
||||
</FancyCheckbox>
|
||||
<FancyCheckbox v-model="activeColumns.dueDate">
|
||||
{{ $t('task.attributes.dueDate') }}
|
||||
</FancyCheckbox>
|
||||
@@ -132,6 +135,9 @@
|
||||
@click="sort('due_date', $event)"
|
||||
/>
|
||||
</th>
|
||||
<th v-if="activeColumns.commentCount">
|
||||
{{ $t('task.attributes.commentCount') }}
|
||||
</th>
|
||||
<th v-if="activeColumns.startDate">
|
||||
{{ $t('task.attributes.startDate') }}
|
||||
<Sort
|
||||
@@ -228,6 +234,15 @@
|
||||
v-if="activeColumns.dueDate"
|
||||
:date="t.dueDate"
|
||||
/>
|
||||
<td v-if="activeColumns.commentCount">
|
||||
<span
|
||||
v-if="t.commentCount && t.commentCount > 0"
|
||||
class="comment-badge"
|
||||
>
|
||||
<Icon icon="comment" />
|
||||
{{ t.commentCount }}
|
||||
</span>
|
||||
</td>
|
||||
<DateTableCell
|
||||
v-if="activeColumns.startDate"
|
||||
:date="t.startDate"
|
||||
@@ -320,6 +335,7 @@ const ACTIVE_COLUMNS_DEFAULT = {
|
||||
updated: false,
|
||||
createdBy: false,
|
||||
doneAt: false,
|
||||
commentCount: false,
|
||||
}
|
||||
|
||||
const SORT_BY_DEFAULT: SortBy = {
|
||||
@@ -329,7 +345,12 @@ const SORT_BY_DEFAULT: SortBy = {
|
||||
const activeColumns = useStorage('tableViewColumns', {...ACTIVE_COLUMNS_DEFAULT})
|
||||
const sortBy = useStorage<SortBy>('tableViewSortBy', {...SORT_BY_DEFAULT})
|
||||
|
||||
const taskList = useTaskList(() => props.projectId, () => props.viewId, sortBy.value)
|
||||
const taskList = useTaskList(
|
||||
() => props.projectId,
|
||||
() => props.viewId,
|
||||
sortBy.value,
|
||||
() => 'comment_count',
|
||||
)
|
||||
|
||||
const {
|
||||
loading,
|
||||
|
||||
Reference in New Issue
Block a user