mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-10 03:37:43 +02:00
Vacancy templates (#2351)
Signed-off-by: muhtimur <timur.mukhamedishin@xored.com>
This commit is contained in:
@@ -180,7 +180,7 @@ export class TIssue extends TTask implements Issue {
|
||||
@Index(IndexKind.FullText)
|
||||
name!: string
|
||||
|
||||
@Prop(TypeMarkup(), task.string.TaskDescription)
|
||||
@Prop(TypeMarkup(), task.string.Description)
|
||||
@Index(IndexKind.FullText)
|
||||
description!: string
|
||||
|
||||
@@ -211,6 +211,7 @@ export class TKanbanTemplateSpace extends TDoc implements KanbanTemplateSpace {
|
||||
name!: IntlString
|
||||
description!: IntlString
|
||||
icon!: AnyComponent
|
||||
editor!: AnyComponent
|
||||
}
|
||||
|
||||
@Model(task.class.StateTemplate, core.class.AttachedDoc, DOMAIN_KANBAN, [task.interface.DocWithRank])
|
||||
@@ -244,6 +245,12 @@ export class TKanbanTemplate extends TDoc implements KanbanTemplate {
|
||||
@Index(IndexKind.FullText)
|
||||
title!: string
|
||||
|
||||
@Prop(TypeString(), task.string.Description)
|
||||
description!: string
|
||||
|
||||
@Prop(TypeString(), task.string.ShortDescription)
|
||||
shortDescription!: string
|
||||
|
||||
@Prop(Collection(task.class.StateTemplate), task.string.States)
|
||||
statesC!: number
|
||||
|
||||
@@ -347,7 +354,7 @@ export function createModel (builder: Builder): void {
|
||||
core.space.Model,
|
||||
{
|
||||
label: task.string.States,
|
||||
icon: task.icon.ManageStatuses,
|
||||
icon: task.icon.ManageTemplates,
|
||||
component: task.component.StatusTableView
|
||||
},
|
||||
task.viewlet.StatusTable
|
||||
@@ -381,6 +388,10 @@ export function createModel (builder: Builder): void {
|
||||
presenter: task.component.TaskPresenter
|
||||
})
|
||||
|
||||
builder.mixin(task.class.KanbanTemplate, core.class.Class, view.mixin.AttributePresenter, {
|
||||
presenter: task.component.KanbanTemplatePresenter
|
||||
})
|
||||
|
||||
builder.mixin(task.class.Issue, core.class.Class, view.mixin.ObjectEditor, {
|
||||
editor: task.component.EditIssue
|
||||
})
|
||||
|
||||
@@ -28,6 +28,8 @@ export interface KanbanTemplateData {
|
||||
kanbanId: Ref<KanbanTemplate>
|
||||
space: Ref<Space>
|
||||
title: KanbanTemplate['title']
|
||||
description?: string
|
||||
shortDescription?: string
|
||||
states: Pick<StateTemplate, 'title' | 'color'>[]
|
||||
doneStates: (Pick<DoneStateTemplate, 'title'> & { isWon: boolean })[]
|
||||
}
|
||||
@@ -157,6 +159,8 @@ async function createDefaultKanbanTemplate (tx: TxOperations): Promise<Ref<Kanba
|
||||
kanbanId: task.template.DefaultProject,
|
||||
space: task.space.ProjectTemplates as Ref<Doc> as Ref<Space>,
|
||||
title: 'Default project',
|
||||
description: '',
|
||||
shortDescription: '',
|
||||
states: defaultKanban.states,
|
||||
doneStates: defaultKanban.doneStates
|
||||
})
|
||||
|
||||
@@ -46,6 +46,7 @@ export default mergeIds(taskId, task, {
|
||||
CreateProject: '' as AnyComponent,
|
||||
EditIssue: '' as AnyComponent,
|
||||
TaskPresenter: '' as AnyComponent,
|
||||
KanbanTemplatePresenter: '' as AnyComponent,
|
||||
KanbanCard: '' as AnyComponent,
|
||||
TemplatesIcon: '' as AnyComponent,
|
||||
StatePresenter: '' as AnyComponent,
|
||||
|
||||
Reference in New Issue
Block a user