mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 11:50:56 +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">
|
||||
import contact from '@anticrm/contact'
|
||||
import { DocumentQuery, FindOptions, Ref, SortingOrder } from '@anticrm/core'
|
||||
import { IntlString } from '@anticrm/platform'
|
||||
import { createQuery } from '@anticrm/presentation'
|
||||
import { Project, Team } from '@anticrm/tracker'
|
||||
import { Button, IconAdd, IconOptions, Label, showPopup } from '@anticrm/ui'
|
||||
|
||||
import tracker from '../../plugin'
|
||||
import { getIncludedProjectStatuses, ProjectsViewMode } from '../../utils'
|
||||
import NewProject from './NewProject.svelte'
|
||||
import ProjectsListBrowser from './ProjectsListBrowser.svelte'
|
||||
import tracker from '../../plugin'
|
||||
import { getIncludedProjectStatuses, ProjectsViewMode, projectsTitleMap } from '../../utils'
|
||||
|
||||
export let currentSpace: Ref<Team>
|
||||
export let title: IntlString = tracker.string.AllProjects
|
||||
export let query: DocumentQuery<Project> = {}
|
||||
export let search: string = ''
|
||||
export let mode: ProjectsViewMode = 'all'
|
||||
@ -43,6 +40,7 @@
|
||||
let resultProjects: Project[] = []
|
||||
|
||||
$: includedProjectStatuses = getIncludedProjectStatuses(mode)
|
||||
$: title = projectsTitleMap[mode]
|
||||
$: includedProjectsQuery = { status: { $in: includedProjectStatuses } }
|
||||
|
||||
$: 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