mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-09 01:10:17 +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 attachment from '@anticrm/model-attachment'
|
||||||
import chunter from '@anticrm/model-chunter'
|
import chunter from '@anticrm/model-chunter'
|
||||||
import contact from '@anticrm/model-contact'
|
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 task, { TSpaceWithStates, TTask } from '@anticrm/model-task'
|
||||||
import view from '@anticrm/model-view'
|
import view from '@anticrm/model-view'
|
||||||
import workbench from '@anticrm/model-workbench'
|
import workbench from '@anticrm/model-workbench'
|
||||||
@ -37,6 +37,13 @@ export class TBoard extends TSpaceWithStates implements Board {
|
|||||||
background!: string
|
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)
|
@Model(board.class.Card, task.class.Task)
|
||||||
@UX(board.string.Card, board.icon.Card, undefined, 'title')
|
@UX(board.string.Card, board.icon.Card, undefined, 'title')
|
||||||
export class TCard extends TTask implements Card {
|
export class TCard extends TTask implements Card {
|
||||||
@ -88,7 +95,7 @@ export class TCardAction extends TDoc implements CardAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function createModel (builder: Builder): void {
|
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, {
|
builder.mixin(board.class.Board, core.class.Class, workbench.mixin.SpaceView, {
|
||||||
view: {
|
view: {
|
||||||
|
@ -42,8 +42,6 @@ export interface BoardView extends SpaceWithStates {
|
|||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
export interface CardLabel extends AttachedDoc {
|
export interface CardLabel extends AttachedDoc {
|
||||||
attachedTo: Ref<Board>
|
|
||||||
|
|
||||||
title: string
|
title: string
|
||||||
color: number
|
color: number
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user