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 Done from '@/components/misc/Done.vue'
|
||||||
import Labels from '../../../components/tasks/partials/labels.vue'
|
import Labels from '../../../components/tasks/partials/labels.vue'
|
||||||
import ChecklistSummary from './checklist-summary.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 type {ITask} from '@/modelTypes/ITask'
|
||||||
|
|
||||||
import {formatDateLong, formatISO, formatDateSince} from '@/helpers/time/formatDate'
|
import {formatDateLong, formatISO, formatDateSince} from '@/helpers/time/formatDate'
|
||||||
|
@ -92,11 +93,7 @@ const props = withDefaults(defineProps<{
|
||||||
loading: false,
|
loading: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
const color = computed(() => {
|
const color = computed(() => getHexColor(props.task.hexColor))
|
||||||
return props.task.getHexColor
|
|
||||||
? props.task.getHexColor()
|
|
||||||
: TASK_DEFAULT_COLOR
|
|
||||||
})
|
|
||||||
|
|
||||||
async function toggleTaskDone(task: ITask) {
|
async function toggleTaskDone(task: ITask) {
|
||||||
loadingInternal.value = true
|
loadingInternal.value = true
|
||||||
|
|
|
@ -47,6 +47,4 @@ export interface ITask extends IAbstract {
|
||||||
|
|
||||||
listId: IList['id'] // Meta, only used when creating a new task
|
listId: IList['id'] // Meta, only used when creating a new task
|
||||||
bucketId: IBucket['id']
|
bucketId: IBucket['id']
|
||||||
|
|
||||||
getHexColor(): string
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue