mirror of
https://github.com/hcengineering/platform.git
synced 2025-01-23 03:49:49 +00:00
Board: Fix labels model (#1405)
Signed-off-by: Anna No <anna.no@xored.com>
This commit is contained in:
parent
8d89816e8f
commit
16e3ae59bc
@ -22,7 +22,7 @@ import { Builder, Collection, Index, Model, Prop, TypeBoolean, TypeMarkup, TypeR
|
||||
import attachment from '@anticrm/model-attachment'
|
||||
import chunter from '@anticrm/model-chunter'
|
||||
import contact from '@anticrm/model-contact'
|
||||
import core, { TDoc } from '@anticrm/model-core'
|
||||
import core, { TAttachedDoc, TDoc } from '@anticrm/model-core'
|
||||
import task, { TSpaceWithStates, TTask } from '@anticrm/model-task'
|
||||
import view from '@anticrm/model-view'
|
||||
import workbench from '@anticrm/model-workbench'
|
||||
@ -37,6 +37,13 @@ export class TBoard extends TSpaceWithStates implements Board {
|
||||
background!: string
|
||||
}
|
||||
|
||||
@Model(board.class.CardLabel, core.class.AttachedDoc, DOMAIN_MODEL)
|
||||
@UX(board.string.Labels)
|
||||
export class TCardLabel extends TAttachedDoc implements CardLabel {
|
||||
title!: string;
|
||||
color!: number;
|
||||
}
|
||||
|
||||
@Model(board.class.Card, task.class.Task)
|
||||
@UX(board.string.Card, board.icon.Card, undefined, 'title')
|
||||
export class TCard extends TTask implements Card {
|
||||
@ -88,7 +95,7 @@ export class TCardAction extends TDoc implements CardAction {
|
||||
}
|
||||
|
||||
export function createModel (builder: Builder): void {
|
||||
builder.createModel(TBoard, TCard, TCardAction)
|
||||
builder.createModel(TBoard, TCard, TCardLabel, TCardAction)
|
||||
|
||||
builder.mixin(board.class.Board, core.class.Class, workbench.mixin.SpaceView, {
|
||||
view: {
|
||||
|
@ -42,8 +42,6 @@ export interface BoardView extends SpaceWithStates {
|
||||
* @public
|
||||
*/
|
||||
export interface CardLabel extends AttachedDoc {
|
||||
attachedTo: Ref<Board>
|
||||
|
||||
title: string
|
||||
color: number
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user