Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/tasks/tasks.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export type TWatchListTask = {
status: TASK_STATUS_ENUM
isAcknowledged: boolean | null
isDeleted: boolean | null
labels?: string[]
labels?: TLabel[]
dueAt: string
createdAt: string
createdBy: string
Expand Down
9 changes: 2 additions & 7 deletions modules/dashboard/components/dashboard-tasks-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { TasksApi } from '@/api/tasks/tasks.api'
import { TTask } from '@/api/tasks/tasks.types'
import { EditTodoButton } from '@/components/edit-task-button'
import { TaskPriorityLabel } from '@/components/task-priority-label'
import { TodoLabelsList } from '@/components/todo-labels-list'
import { TodoStatusTable } from '@/components/todo-status-table'
import {
Table,
Expand Down Expand Up @@ -92,13 +93,7 @@ export const DashboardTasksTable = ({ tasks }: DashboardTasksTableProps) => {
<TableRow key={task.id} className="transition-colors hover:bg-gray-50">
<TableCell className="font-medium">{task.title}</TableCell>
<TableCell>
<span className="rounded-full bg-purple-100 px-2 py-1 text-xs text-purple-700">
{Array.isArray(task.labels)
? typeof task.labels[0] === 'object' && task.labels[0] !== null
? (task.labels[0] as { name?: string }).name || '-'
: task.labels[0] || '-'
: '-'}
</span>
<TodoLabelsList labels={task.labels ?? []} />
</TableCell>

<TableCell>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const DashboardWatchlistTasksTable = () => {
id: task.taskId,
in_watchlist: true,
priority: NUM_TASK_PRIORITY_TO_TASK_ENUM[task.priority ?? 1],
labels: [],
labels: task.labels,
}))
return <DashboardTasksTable tasks={formattedTasks} />
}