mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-26 13:47:26 +03:00
Tracker: Introduce Roadmap (#2139)
Signed-off-by: Dvinyanin Alexandr <dvinyanin.alexandr@gmail.com>
This commit is contained in:
parent
3b8690248b
commit
32d2b6ed69
@ -6,6 +6,7 @@ Tracker:
|
||||
|
||||
- Remember view options
|
||||
- My issues
|
||||
- Roadmap
|
||||
|
||||
Chunter:
|
||||
|
||||
|
@ -465,6 +465,13 @@ export function createModel (builder: Builder): void {
|
||||
label: tracker.string.Views,
|
||||
icon: tracker.icon.Views,
|
||||
component: tracker.component.Views
|
||||
},
|
||||
{
|
||||
id: 'roadmap',
|
||||
position: 'top',
|
||||
label: tracker.string.Roadmap,
|
||||
icon: tracker.icon.Projects,
|
||||
component: tracker.component.Roadmap
|
||||
}
|
||||
],
|
||||
spaces: [
|
||||
@ -500,7 +507,7 @@ export function createModel (builder: Builder): void {
|
||||
id: projectsId,
|
||||
label: tracker.string.Projects,
|
||||
icon: tracker.icon.Projects,
|
||||
component: tracker.component.Projects
|
||||
component: tracker.component.TeamProjects
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -120,6 +120,7 @@
|
||||
"ProjectMembersTitle": "Project members",
|
||||
"ProjectLeadSearchPlaceholder": "Set project lead\u2026",
|
||||
"ProjectMembersSearchPlaceholder": "Change project members\u2026",
|
||||
"Roadmap": "Roadmap",
|
||||
|
||||
"GotoIssues": "Go to issues",
|
||||
"GotoActive": "Go to active issues",
|
||||
|
@ -120,6 +120,7 @@
|
||||
"ProjectMembersTitle": "Участники проекта",
|
||||
"ProjectLeadSearchPlaceholder": "Назначьте руководителя проекта\u2026",
|
||||
"ProjectMembersSearchPlaceholder": "Измененить участников проекта\u2026",
|
||||
"Roadmap": "Планирование",
|
||||
|
||||
"GotoIssues": "Перейти к задачам",
|
||||
"GotoActive": "Перейти к активным задачам",
|
||||
|
@ -15,7 +15,7 @@
|
||||
<script lang="ts">
|
||||
import contact, { Employee } from '@anticrm/contact'
|
||||
import { Class, Doc, Ref } from '@anticrm/core'
|
||||
import { Project, Team } from '@anticrm/tracker'
|
||||
import { Project } from '@anticrm/tracker'
|
||||
import { UsersPopup, getClient } from '@anticrm/presentation'
|
||||
import { AttributeModel } from '@anticrm/view'
|
||||
import { eventToHTMLElement, showPopup, Tooltip } from '@anticrm/ui'
|
||||
@ -27,7 +27,6 @@
|
||||
export let value: Employee | null
|
||||
export let projectId: Ref<Project>
|
||||
export let defaultClass: Ref<Class<Doc>> | undefined = undefined
|
||||
export let currentSpace: Ref<Team> | undefined = undefined
|
||||
export let isEditable: boolean = true
|
||||
export let shouldShowLabel: boolean = false
|
||||
export let defaultName: IntlString | undefined = undefined
|
||||
@ -53,7 +52,7 @@
|
||||
return
|
||||
}
|
||||
|
||||
const currentProject = await client.findOne(tracker.class.Project, { space: currentSpace, _id: projectId })
|
||||
const currentProject = await client.findOne(tracker.class.Project, { _id: projectId })
|
||||
|
||||
if (currentProject === undefined) {
|
||||
return
|
||||
|
@ -14,16 +14,17 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import contact from '@anticrm/contact'
|
||||
import { DocumentQuery, FindOptions, Ref, SortingOrder } from '@anticrm/core'
|
||||
import { DocumentQuery, FindOptions, SortingOrder } from '@anticrm/core'
|
||||
import { IntlString } from '@anticrm/platform'
|
||||
import { createQuery } from '@anticrm/presentation'
|
||||
import { Project, Team } from '@anticrm/tracker'
|
||||
import { Project } from '@anticrm/tracker'
|
||||
import { Button, IconAdd, IconOptions, Label, showPopup } from '@anticrm/ui'
|
||||
import tracker from '../../plugin'
|
||||
import { getIncludedProjectStatuses, projectsTitleMap, ProjectsViewMode } from '../../utils'
|
||||
import NewProject from './NewProject.svelte'
|
||||
import ProjectsListBrowser from './ProjectsListBrowser.svelte'
|
||||
|
||||
export let currentSpace: Ref<Team>
|
||||
export let label: IntlString
|
||||
export let query: DocumentQuery<Project> = {}
|
||||
export let search: string = ''
|
||||
export let mode: ProjectsViewMode = 'all'
|
||||
@ -44,7 +45,6 @@
|
||||
$: includedProjectsQuery = { status: { $in: includedProjectStatuses } }
|
||||
|
||||
$: baseQuery = {
|
||||
space: currentSpace,
|
||||
...includedProjectsQuery,
|
||||
...query
|
||||
}
|
||||
@ -60,8 +60,9 @@
|
||||
projectOptions
|
||||
)
|
||||
|
||||
const space = typeof query.space === 'string' ? query.space : tracker.team.DefaultTeam
|
||||
const showCreateDialog = async () => {
|
||||
showPopup(NewProject, { space: currentSpace, targetElement: null }, null)
|
||||
showPopup(NewProject, { space, targetElement: null }, null)
|
||||
}
|
||||
|
||||
const handleViewModeChanged = (newMode: ProjectsViewMode) => {
|
||||
@ -76,7 +77,7 @@
|
||||
<div>
|
||||
<div class="fs-title flex-between header">
|
||||
<div class="flex-center">
|
||||
<Label label={tracker.string.Projects} />
|
||||
<Label {label} />
|
||||
<div class="projectTitle">
|
||||
› <Label label={title} />
|
||||
</div>
|
||||
@ -156,7 +157,7 @@
|
||||
{
|
||||
key: '$lookup.lead',
|
||||
presenter: tracker.component.LeadPresenter,
|
||||
props: { currentSpace, defaultClass: contact.class.Employee, shouldShowLabel: false }
|
||||
props: { defaultClass: contact.class.Employee, shouldShowLabel: false }
|
||||
},
|
||||
{ key: '', presenter: tracker.component.ProjectMembersPresenter, props: { kind: 'link' } },
|
||||
{ key: '', presenter: tracker.component.TargetDatePresenter },
|
||||
|
@ -14,8 +14,9 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { DocumentQuery, Ref } from '@anticrm/core'
|
||||
import { IntlString } from '@anticrm/platform'
|
||||
import { createQuery } from '@anticrm/presentation'
|
||||
import { Project, Team } from '@anticrm/tracker'
|
||||
import { Project } from '@anticrm/tracker'
|
||||
import { closePopup, closeTooltip, location } from '@anticrm/ui'
|
||||
import { onDestroy } from 'svelte'
|
||||
import tracker from '../../plugin'
|
||||
@ -23,7 +24,7 @@
|
||||
import EditProject from './EditProject.svelte'
|
||||
import ProjectBrowser from './ProjectBrowser.svelte'
|
||||
|
||||
export let currentSpace: Ref<Team>
|
||||
export let label: IntlString = tracker.string.Projects
|
||||
export let query: DocumentQuery<Project> = {}
|
||||
export let search: string = ''
|
||||
export let mode: ProjectsViewMode = 'all'
|
||||
@ -57,5 +58,5 @@
|
||||
{#if project}
|
||||
<EditProject {project} />
|
||||
{:else}
|
||||
<ProjectBrowser {currentSpace} {query} {search} {mode} />
|
||||
<ProjectBrowser {label} {query} {search} {mode} />
|
||||
{/if}
|
||||
|
@ -0,0 +1,20 @@
|
||||
<!--
|
||||
// Copyright © 2022 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import Projects from './Projects.svelte'
|
||||
import tracker from '../../plugin'
|
||||
</script>
|
||||
|
||||
<Projects label={tracker.string.Roadmap} />
|
@ -0,0 +1,23 @@
|
||||
<!--
|
||||
// Copyright © 2022 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { Ref } from '@anticrm/core'
|
||||
import { Team } from '@anticrm/tracker'
|
||||
import Projects from './Projects.svelte'
|
||||
|
||||
export let currentSpace: Ref<Team>
|
||||
</script>
|
||||
|
||||
<Projects query={{ space: currentSpace }} />
|
@ -44,6 +44,8 @@ import LeadPresenter from './components/projects/LeadPresenter.svelte'
|
||||
import ProjectEditor from './components/projects/ProjectEditor.svelte'
|
||||
import ProjectMembersPresenter from './components/projects/ProjectMembersPresenter.svelte'
|
||||
import ProjectPresenter from './components/projects/ProjectPresenter.svelte'
|
||||
import Roadmap from './components/projects/Roadmap.svelte'
|
||||
import TeamProjects from './components/projects/TeamProjects.svelte'
|
||||
import Projects from './components/projects/Projects.svelte'
|
||||
import ProjectStatusEditor from './components/projects/ProjectStatusEditor.svelte'
|
||||
import ProjectStatusPresenter from './components/projects/ProjectStatusPresenter.svelte'
|
||||
@ -140,6 +142,8 @@ export default async (): Promise<Resources> => ({
|
||||
IssuesView,
|
||||
ListView,
|
||||
KanbanView,
|
||||
TeamProjects,
|
||||
Roadmap,
|
||||
IssuePreview
|
||||
},
|
||||
completion: {
|
||||
|
@ -136,6 +136,7 @@ export default mergeIds(trackerId, tracker, {
|
||||
ProjectMembersSearchPlaceholder: '' as IntlString,
|
||||
List: '' as IntlString,
|
||||
NumberLabels: '' as IntlString,
|
||||
Roadmap: '' as IntlString,
|
||||
|
||||
IssueTitlePlaceholder: '' as IntlString,
|
||||
IssueDescriptionPlaceholder: '' as IntlString,
|
||||
@ -205,6 +206,8 @@ export default mergeIds(trackerId, tracker, {
|
||||
IssuesView: '' as AnyComponent,
|
||||
ListView: '' as AnyComponent,
|
||||
KanbanView: '' as AnyComponent,
|
||||
Roadmap: '' as AnyComponent,
|
||||
TeamProjects: '' as AnyComponent,
|
||||
IssuePreview: '' as AnyComponent
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user