mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 19:44:59 +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)
|
@Model(tracker.class.TypeIssuePriority, core.class.Type, DOMAIN_MODEL)
|
||||||
export class TTypeIssuePriority extends TType {}
|
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
|
* @public
|
||||||
*/
|
*/
|
||||||
@ -219,7 +232,7 @@ export class TProject extends TDoc implements Project {
|
|||||||
@Prop(TypeString(), tracker.string.AssetLabel)
|
@Prop(TypeString(), tracker.string.AssetLabel)
|
||||||
icon!: Asset
|
icon!: Asset
|
||||||
|
|
||||||
@Prop(TypeNumber(), tracker.string.Status)
|
@Prop(TypeProjectStatus(), tracker.string.Status)
|
||||||
status!: ProjectStatus
|
status!: ProjectStatus
|
||||||
|
|
||||||
@Prop(TypeRef(contact.class.Employee), tracker.string.ProjectLead)
|
@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 {
|
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, {
|
builder.createDoc(view.class.Viewlet, core.space.Model, {
|
||||||
attachTo: tracker.class.Issue,
|
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.Issue, core.class.Class, setting.mixin.Editable, {})
|
||||||
|
|
||||||
|
builder.mixin(tracker.class.TypeProjectStatus, core.class.Class, view.mixin.AttributeEditor, {
|
||||||
|
editor: tracker.component.ProjectStatusEditor
|
||||||
|
})
|
||||||
|
|
||||||
builder.createDoc(
|
builder.createDoc(
|
||||||
workbench.class.Application,
|
workbench.class.Application,
|
||||||
core.space.Model,
|
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 ProjectMembersPresenter from './components/projects/ProjectMembersPresenter.svelte'
|
||||||
import ProjectStatusPresenter from './components/projects/ProjectStatusPresenter.svelte'
|
import ProjectStatusPresenter from './components/projects/ProjectStatusPresenter.svelte'
|
||||||
import EditProject from './components/projects/EditProject.svelte'
|
import EditProject from './components/projects/EditProject.svelte'
|
||||||
|
import ProjectStatusEditor from './components/projects/ProjectStatusEditor.svelte'
|
||||||
|
|
||||||
import ModificationDatePresenter from './components/issues/ModificationDatePresenter.svelte'
|
import ModificationDatePresenter from './components/issues/ModificationDatePresenter.svelte'
|
||||||
import EditIssue from './components/issues/edit/EditIssue.svelte'
|
import EditIssue from './components/issues/edit/EditIssue.svelte'
|
||||||
@ -84,6 +85,7 @@ export default async (): Promise<Resources> => ({
|
|||||||
TargetDatePresenter,
|
TargetDatePresenter,
|
||||||
ProjectMembersPresenter,
|
ProjectMembersPresenter,
|
||||||
ProjectStatusPresenter,
|
ProjectStatusPresenter,
|
||||||
|
ProjectStatusEditor,
|
||||||
SetDueDateActionPopup,
|
SetDueDateActionPopup,
|
||||||
SetParentIssueActionPopup,
|
SetParentIssueActionPopup,
|
||||||
EditProject,
|
EditProject,
|
||||||
|
@ -188,6 +188,7 @@ export default mergeIds(trackerId, tracker, {
|
|||||||
TargetDatePresenter: '' as AnyComponent,
|
TargetDatePresenter: '' as AnyComponent,
|
||||||
ProjectMembersPresenter: '' as AnyComponent,
|
ProjectMembersPresenter: '' as AnyComponent,
|
||||||
ProjectStatusPresenter: '' as AnyComponent,
|
ProjectStatusPresenter: '' as AnyComponent,
|
||||||
|
ProjectStatusEditor: '' as AnyComponent,
|
||||||
SetDueDateActionPopup: '' as AnyComponent,
|
SetDueDateActionPopup: '' as AnyComponent,
|
||||||
SetParentIssueActionPopup: '' as AnyComponent,
|
SetParentIssueActionPopup: '' as AnyComponent,
|
||||||
EditProject: '' as AnyComponent,
|
EditProject: '' as AnyComponent,
|
||||||
|
@ -187,7 +187,8 @@ export default plugin(trackerId, {
|
|||||||
Project: '' as Ref<Class<Project>>,
|
Project: '' as Ref<Class<Project>>,
|
||||||
IssueStatus: '' as Ref<Class<IssueStatus>>,
|
IssueStatus: '' as Ref<Class<IssueStatus>>,
|
||||||
IssueStatusCategory: '' as Ref<Class<IssueStatusCategory>>,
|
IssueStatusCategory: '' as Ref<Class<IssueStatusCategory>>,
|
||||||
TypeIssuePriority: '' as Ref<Class<Type<IssuePriority>>>
|
TypeIssuePriority: '' as Ref<Class<Type<IssuePriority>>>,
|
||||||
|
TypeProjectStatus: '' as Ref<Class<Type<ProjectStatus>>>
|
||||||
},
|
},
|
||||||
ids: {
|
ids: {
|
||||||
NoParent: '' as Ref<Issue>
|
NoParent: '' as Ref<Issue>
|
||||||
|
Loading…
Reference in New Issue
Block a user