diff --git a/src/components/tasks/partials/kanban-card.vue b/src/components/tasks/partials/kanban-card.vue index b9121ce9..f816f015 100644 --- a/src/components/tasks/partials/kanban-card.vue +++ b/src/components/tasks/partials/kanban-card.vue @@ -74,7 +74,8 @@ import User from '../../../components/misc/user.vue' import Done from '@/components/misc/Done.vue' import Labels from '../../../components/tasks/partials/labels.vue' import ChecklistSummary from './checklist-summary.vue' -import {TASK_DEFAULT_COLOR} from '@/models/task' + +import {TASK_DEFAULT_COLOR, getHexColor} from '@/models/task' import type {ITask} from '@/modelTypes/ITask' import {formatDateLong, formatISO, formatDateSince} from '@/helpers/time/formatDate' @@ -92,11 +93,7 @@ const props = withDefaults(defineProps<{ loading: false, }) -const color = computed(() => { - return props.task.getHexColor - ? props.task.getHexColor() - : TASK_DEFAULT_COLOR -}) +const color = computed(() => getHexColor(props.task.hexColor)) async function toggleTaskDone(task: ITask) { loadingInternal.value = true diff --git a/src/modelTypes/ITask.ts b/src/modelTypes/ITask.ts index 80eaad69..6616a680 100644 --- a/src/modelTypes/ITask.ts +++ b/src/modelTypes/ITask.ts @@ -47,6 +47,4 @@ export interface ITask extends IAbstract { listId: IList['id'] // Meta, only used when creating a new task bucketId: IBucket['id'] - - getHexColor(): string } \ No newline at end of file