mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-20 07:10:02 +00:00
Fix title (#1800)
Signed-off-by: Artyom Grigorovich <grigorovichartyom@gmail.com>
This commit is contained in:
parent
06254e720f
commit
870f41f7de
@ -15,18 +15,15 @@
|
|||||||
<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, Ref, 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, Team } 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 { getIncludedProjectStatuses, ProjectsViewMode } from '../../utils'
|
|
||||||
import NewProject from './NewProject.svelte'
|
import NewProject from './NewProject.svelte'
|
||||||
import ProjectsListBrowser from './ProjectsListBrowser.svelte'
|
import ProjectsListBrowser from './ProjectsListBrowser.svelte'
|
||||||
|
import tracker from '../../plugin'
|
||||||
|
import { getIncludedProjectStatuses, ProjectsViewMode, projectsTitleMap } from '../../utils'
|
||||||
|
|
||||||
export let currentSpace: Ref<Team>
|
export let currentSpace: Ref<Team>
|
||||||
export let title: IntlString = tracker.string.AllProjects
|
|
||||||
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'
|
||||||
@ -43,6 +40,7 @@
|
|||||||
let resultProjects: Project[] = []
|
let resultProjects: Project[] = []
|
||||||
|
|
||||||
$: includedProjectStatuses = getIncludedProjectStatuses(mode)
|
$: includedProjectStatuses = getIncludedProjectStatuses(mode)
|
||||||
|
$: title = projectsTitleMap[mode]
|
||||||
$: includedProjectsQuery = { status: { $in: includedProjectStatuses } }
|
$: includedProjectsQuery = { status: { $in: includedProjectStatuses } }
|
||||||
|
|
||||||
$: baseQuery = {
|
$: baseQuery = {
|
||||||
|
@ -278,3 +278,10 @@ export const getIncludedProjectStatuses = (mode: ProjectsViewMode): ProjectStatu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const projectsTitleMap: Record<ProjectsViewMode, IntlString> = Object.freeze({
|
||||||
|
all: tracker.string.AllProjects,
|
||||||
|
backlog: tracker.string.BacklogProjects,
|
||||||
|
active: tracker.string.ActiveProjects,
|
||||||
|
closed: tracker.string.ClosedProjects
|
||||||
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user