mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 11:31:57 +03:00
Fix project status (#2044)
Signed-off-by: Dvinyanin Alexandr <dvinyanin.alexandr@gmail.com>
This commit is contained in:
parent
2997efd17b
commit
b9a029ecaa
@ -98,6 +98,19 @@ export function TypeIssuePriority (): Type<IssuePriority> {
|
||||
@Model(tracker.class.TypeIssuePriority, core.class.Type, DOMAIN_MODEL)
|
||||
export class TTypeIssuePriority extends TType {}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export function TypeProjectStatus (): Type<ProjectStatus> {
|
||||
return { _class: tracker.class.TypeProjectStatus, label: 'TypeProjectStatus' as IntlString }
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
@Model(tracker.class.TypeProjectStatus, core.class.Type, DOMAIN_MODEL)
|
||||
export class TTypeProjectStatus extends TType {}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
@ -219,7 +232,7 @@ export class TProject extends TDoc implements Project {
|
||||
@Prop(TypeString(), tracker.string.AssetLabel)
|
||||
icon!: Asset
|
||||
|
||||
@Prop(TypeNumber(), tracker.string.Status)
|
||||
@Prop(TypeProjectStatus(), tracker.string.Status)
|
||||
status!: ProjectStatus
|
||||
|
||||
@Prop(TypeRef(contact.class.Employee), tracker.string.ProjectLead)
|
||||
@ -247,7 +260,15 @@ export class TProject extends TDoc implements Project {
|
||||
}
|
||||
|
||||
export function createModel (builder: Builder): void {
|
||||
builder.createModel(TTeam, TProject, TIssue, TIssueStatus, TIssueStatusCategory, TTypeIssuePriority)
|
||||
builder.createModel(
|
||||
TTeam,
|
||||
TProject,
|
||||
TIssue,
|
||||
TIssueStatus,
|
||||
TIssueStatusCategory,
|
||||
TTypeIssuePriority,
|
||||
TTypeProjectStatus
|
||||
)
|
||||
|
||||
builder.createDoc(view.class.Viewlet, core.space.Model, {
|
||||
attachTo: tracker.class.Issue,
|
||||
@ -376,6 +397,10 @@ export function createModel (builder: Builder): void {
|
||||
|
||||
builder.mixin(tracker.class.Issue, core.class.Class, setting.mixin.Editable, {})
|
||||
|
||||
builder.mixin(tracker.class.TypeProjectStatus, core.class.Class, view.mixin.AttributeEditor, {
|
||||
editor: tracker.component.ProjectStatusEditor
|
||||
})
|
||||
|
||||
builder.createDoc(
|
||||
workbench.class.Application,
|
||||
core.space.Model,
|
||||
|
@ -0,0 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { Project } from '@anticrm/tracker'
|
||||
import ProjectStatusPresenter from './ProjectStatusPresenter.svelte'
|
||||
|
||||
export let object: Project
|
||||
</script>
|
||||
|
||||
<ProjectStatusPresenter value={object} shouldShowLabel />
|
@ -45,6 +45,7 @@ import TargetDatePresenter from './components/projects/TargetDatePresenter.svelt
|
||||
import ProjectMembersPresenter from './components/projects/ProjectMembersPresenter.svelte'
|
||||
import ProjectStatusPresenter from './components/projects/ProjectStatusPresenter.svelte'
|
||||
import EditProject from './components/projects/EditProject.svelte'
|
||||
import ProjectStatusEditor from './components/projects/ProjectStatusEditor.svelte'
|
||||
|
||||
import ModificationDatePresenter from './components/issues/ModificationDatePresenter.svelte'
|
||||
import EditIssue from './components/issues/edit/EditIssue.svelte'
|
||||
@ -84,6 +85,7 @@ export default async (): Promise<Resources> => ({
|
||||
TargetDatePresenter,
|
||||
ProjectMembersPresenter,
|
||||
ProjectStatusPresenter,
|
||||
ProjectStatusEditor,
|
||||
SetDueDateActionPopup,
|
||||
SetParentIssueActionPopup,
|
||||
EditProject,
|
||||
|
@ -188,6 +188,7 @@ export default mergeIds(trackerId, tracker, {
|
||||
TargetDatePresenter: '' as AnyComponent,
|
||||
ProjectMembersPresenter: '' as AnyComponent,
|
||||
ProjectStatusPresenter: '' as AnyComponent,
|
||||
ProjectStatusEditor: '' as AnyComponent,
|
||||
SetDueDateActionPopup: '' as AnyComponent,
|
||||
SetParentIssueActionPopup: '' as AnyComponent,
|
||||
EditProject: '' as AnyComponent,
|
||||
|
@ -187,7 +187,8 @@ export default plugin(trackerId, {
|
||||
Project: '' as Ref<Class<Project>>,
|
||||
IssueStatus: '' as Ref<Class<IssueStatus>>,
|
||||
IssueStatusCategory: '' as Ref<Class<IssueStatusCategory>>,
|
||||
TypeIssuePriority: '' as Ref<Class<Type<IssuePriority>>>
|
||||
TypeIssuePriority: '' as Ref<Class<Type<IssuePriority>>>,
|
||||
TypeProjectStatus: '' as Ref<Class<Type<ProjectStatus>>>
|
||||
},
|
||||
ids: {
|
||||
NoParent: '' as Ref<Issue>
|
||||
|
Loading…
Reference in New Issue
Block a user