fix: don't add class method to interface
This commit is contained in:
parent
a5925baff0
commit
367ad1e5a5
2 changed files with 3 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
Loading…
Reference in a new issue