Vacancy templates (#2351)

Signed-off-by: muhtimur <timur.mukhamedishin@xored.com>
This commit is contained in:
Timur Mukhamedishin
2022-11-09 17:24:02 +06:00
committed by GitHub
parent bd1079cb53
commit cdbead6584
43 changed files with 378 additions and 72 deletions
+13 -2
View File
@@ -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
})
+4
View File
@@ -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
})
+1
View File
@@ -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,