Tracker: Introduce Roadmap (#2139)

Signed-off-by: Dvinyanin Alexandr <dvinyanin.alexandr@gmail.com>
This commit is contained in:
Alex 2022-06-24 13:05:05 +07:00 committed by GitHub
parent 3b8690248b
commit 32d2b6ed69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 75 additions and 14 deletions

View File

@ -6,6 +6,7 @@ Tracker:
- Remember view options - Remember view options
- My issues - My issues
- Roadmap
Chunter: Chunter:

View File

@ -465,6 +465,13 @@ export function createModel (builder: Builder): void {
label: tracker.string.Views, label: tracker.string.Views,
icon: tracker.icon.Views, icon: tracker.icon.Views,
component: tracker.component.Views component: tracker.component.Views
},
{
id: 'roadmap',
position: 'top',
label: tracker.string.Roadmap,
icon: tracker.icon.Projects,
component: tracker.component.Roadmap
} }
], ],
spaces: [ spaces: [
@ -500,7 +507,7 @@ export function createModel (builder: Builder): void {
id: projectsId, id: projectsId,
label: tracker.string.Projects, label: tracker.string.Projects,
icon: tracker.icon.Projects, icon: tracker.icon.Projects,
component: tracker.component.Projects component: tracker.component.TeamProjects
} }
] ]
} }

View File

@ -120,6 +120,7 @@
"ProjectMembersTitle": "Project members", "ProjectMembersTitle": "Project members",
"ProjectLeadSearchPlaceholder": "Set project lead\u2026", "ProjectLeadSearchPlaceholder": "Set project lead\u2026",
"ProjectMembersSearchPlaceholder": "Change project members\u2026", "ProjectMembersSearchPlaceholder": "Change project members\u2026",
"Roadmap": "Roadmap",
"GotoIssues": "Go to issues", "GotoIssues": "Go to issues",
"GotoActive": "Go to active issues", "GotoActive": "Go to active issues",

View File

@ -120,6 +120,7 @@
"ProjectMembersTitle": "Участники проекта", "ProjectMembersTitle": "Участники проекта",
"ProjectLeadSearchPlaceholder": "Назначьте руководителя проекта\u2026", "ProjectLeadSearchPlaceholder": "Назначьте руководителя проекта\u2026",
"ProjectMembersSearchPlaceholder": "Измененить участников проекта\u2026", "ProjectMembersSearchPlaceholder": "Измененить участников проекта\u2026",
"Roadmap": "Планирование",
"GotoIssues": "Перейти к задачам", "GotoIssues": "Перейти к задачам",
"GotoActive": "Перейти к активным задачам", "GotoActive": "Перейти к активным задачам",

View File

@ -15,7 +15,7 @@
<script lang="ts"> <script lang="ts">
import contact, { Employee } from '@anticrm/contact' import contact, { Employee } from '@anticrm/contact'
import { Class, Doc, Ref } from '@anticrm/core' 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 { UsersPopup, getClient } from '@anticrm/presentation'
import { AttributeModel } from '@anticrm/view' import { AttributeModel } from '@anticrm/view'
import { eventToHTMLElement, showPopup, Tooltip } from '@anticrm/ui' import { eventToHTMLElement, showPopup, Tooltip } from '@anticrm/ui'
@ -27,7 +27,6 @@
export let value: Employee | null export let value: Employee | null
export let projectId: Ref<Project> export let projectId: Ref<Project>
export let defaultClass: Ref<Class<Doc>> | undefined = undefined export let defaultClass: Ref<Class<Doc>> | undefined = undefined
export let currentSpace: Ref<Team> | undefined = undefined
export let isEditable: boolean = true export let isEditable: boolean = true
export let shouldShowLabel: boolean = false export let shouldShowLabel: boolean = false
export let defaultName: IntlString | undefined = undefined export let defaultName: IntlString | undefined = undefined
@ -53,7 +52,7 @@
return 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) { if (currentProject === undefined) {
return return

View File

@ -14,16 +14,17 @@
--> -->
<script lang="ts"> <script lang="ts">
import contact from '@anticrm/contact' 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 { 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 { Button, IconAdd, IconOptions, Label, showPopup } from '@anticrm/ui'
import tracker from '../../plugin' import tracker from '../../plugin'
import { getIncludedProjectStatuses, projectsTitleMap, ProjectsViewMode } from '../../utils' import { getIncludedProjectStatuses, projectsTitleMap, ProjectsViewMode } from '../../utils'
import NewProject from './NewProject.svelte' import NewProject from './NewProject.svelte'
import ProjectsListBrowser from './ProjectsListBrowser.svelte' import ProjectsListBrowser from './ProjectsListBrowser.svelte'
export let currentSpace: Ref<Team> export let label: IntlString
export let query: DocumentQuery<Project> = {} export let query: DocumentQuery<Project> = {}
export let search: string = '' export let search: string = ''
export let mode: ProjectsViewMode = 'all' export let mode: ProjectsViewMode = 'all'
@ -44,7 +45,6 @@
$: includedProjectsQuery = { status: { $in: includedProjectStatuses } } $: includedProjectsQuery = { status: { $in: includedProjectStatuses } }
$: baseQuery = { $: baseQuery = {
space: currentSpace,
...includedProjectsQuery, ...includedProjectsQuery,
...query ...query
} }
@ -60,8 +60,9 @@
projectOptions projectOptions
) )
const space = typeof query.space === 'string' ? query.space : tracker.team.DefaultTeam
const showCreateDialog = async () => { const showCreateDialog = async () => {
showPopup(NewProject, { space: currentSpace, targetElement: null }, null) showPopup(NewProject, { space, targetElement: null }, null)
} }
const handleViewModeChanged = (newMode: ProjectsViewMode) => { const handleViewModeChanged = (newMode: ProjectsViewMode) => {
@ -76,7 +77,7 @@
<div> <div>
<div class="fs-title flex-between header"> <div class="fs-title flex-between header">
<div class="flex-center"> <div class="flex-center">
<Label label={tracker.string.Projects} /> <Label {label} />
<div class="projectTitle"> <div class="projectTitle">
<Label label={title} /> <Label label={title} />
</div> </div>
@ -156,7 +157,7 @@
{ {
key: '$lookup.lead', key: '$lookup.lead',
presenter: tracker.component.LeadPresenter, 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.ProjectMembersPresenter, props: { kind: 'link' } },
{ key: '', presenter: tracker.component.TargetDatePresenter }, { key: '', presenter: tracker.component.TargetDatePresenter },

View File

@ -14,8 +14,9 @@
--> -->
<script lang="ts"> <script lang="ts">
import { DocumentQuery, Ref } from '@anticrm/core' import { DocumentQuery, Ref } from '@anticrm/core'
import { IntlString } from '@anticrm/platform'
import { createQuery } from '@anticrm/presentation' import { createQuery } from '@anticrm/presentation'
import { Project, Team } from '@anticrm/tracker' import { Project } from '@anticrm/tracker'
import { closePopup, closeTooltip, location } from '@anticrm/ui' import { closePopup, closeTooltip, location } from '@anticrm/ui'
import { onDestroy } from 'svelte' import { onDestroy } from 'svelte'
import tracker from '../../plugin' import tracker from '../../plugin'
@ -23,7 +24,7 @@
import EditProject from './EditProject.svelte' import EditProject from './EditProject.svelte'
import ProjectBrowser from './ProjectBrowser.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 query: DocumentQuery<Project> = {}
export let search: string = '' export let search: string = ''
export let mode: ProjectsViewMode = 'all' export let mode: ProjectsViewMode = 'all'
@ -57,5 +58,5 @@
{#if project} {#if project}
<EditProject {project} /> <EditProject {project} />
{:else} {:else}
<ProjectBrowser {currentSpace} {query} {search} {mode} /> <ProjectBrowser {label} {query} {search} {mode} />
{/if} {/if}

View File

@ -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} />

View File

@ -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 }} />

View File

@ -44,6 +44,8 @@ import LeadPresenter from './components/projects/LeadPresenter.svelte'
import ProjectEditor from './components/projects/ProjectEditor.svelte' import ProjectEditor from './components/projects/ProjectEditor.svelte'
import ProjectMembersPresenter from './components/projects/ProjectMembersPresenter.svelte' import ProjectMembersPresenter from './components/projects/ProjectMembersPresenter.svelte'
import ProjectPresenter from './components/projects/ProjectPresenter.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 Projects from './components/projects/Projects.svelte'
import ProjectStatusEditor from './components/projects/ProjectStatusEditor.svelte' import ProjectStatusEditor from './components/projects/ProjectStatusEditor.svelte'
import ProjectStatusPresenter from './components/projects/ProjectStatusPresenter.svelte' import ProjectStatusPresenter from './components/projects/ProjectStatusPresenter.svelte'
@ -140,6 +142,8 @@ export default async (): Promise<Resources> => ({
IssuesView, IssuesView,
ListView, ListView,
KanbanView, KanbanView,
TeamProjects,
Roadmap,
IssuePreview IssuePreview
}, },
completion: { completion: {

View File

@ -136,6 +136,7 @@ export default mergeIds(trackerId, tracker, {
ProjectMembersSearchPlaceholder: '' as IntlString, ProjectMembersSearchPlaceholder: '' as IntlString,
List: '' as IntlString, List: '' as IntlString,
NumberLabels: '' as IntlString, NumberLabels: '' as IntlString,
Roadmap: '' as IntlString,
IssueTitlePlaceholder: '' as IntlString, IssueTitlePlaceholder: '' as IntlString,
IssueDescriptionPlaceholder: '' as IntlString, IssueDescriptionPlaceholder: '' as IntlString,
@ -205,6 +206,8 @@ export default mergeIds(trackerId, tracker, {
IssuesView: '' as AnyComponent, IssuesView: '' as AnyComponent,
ListView: '' as AnyComponent, ListView: '' as AnyComponent,
KanbanView: '' as AnyComponent, KanbanView: '' as AnyComponent,
Roadmap: '' as AnyComponent,
TeamProjects: '' as AnyComponent,
IssuePreview: '' as AnyComponent IssuePreview: '' as AnyComponent
} }
}) })