fix: don't add class method to interface

This commit is contained in:
Dominik Pschenitschni 2022-10-03 12:34:29 +02:00
parent a5925baff0
commit 367ad1e5a5
No known key found for this signature in database
GPG key ID: B257AC0149F43A77
2 changed files with 3 additions and 8 deletions

View file

@ -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

View file

@ -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
}