mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-11 20:27:43 +02:00
[UBER-155] Replace "Back" button with "Breadcrumbs" (#3239)
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@icloud.com>
This commit is contained in:
@@ -34,14 +34,11 @@
|
||||
const spaceQuery = createQuery()
|
||||
let currentProject: Project | undefined = value?.$lookup?.space
|
||||
|
||||
$: if (projects === undefined) {
|
||||
if (value && value?.$lookup?.space === undefined) {
|
||||
spaceQuery.query(tracker.class.Project, { _id: value.space }, (res) => ([currentProject] = res))
|
||||
} else {
|
||||
spaceQuery.unsubscribe()
|
||||
}
|
||||
$: if (value?.$lookup?.space === undefined && !projects?.has(value.space)) {
|
||||
spaceQuery.query(tracker.class.Project, { _id: value.space }, (res) => ([currentProject] = res))
|
||||
} else {
|
||||
currentProject = projects.get(value.space)
|
||||
currentProject = value?.$lookup?.space ?? projects?.get(value.space)
|
||||
spaceQuery.unsubscribe()
|
||||
}
|
||||
|
||||
$: title = currentProject ? `${currentProject.identifier}-${value?.number}` : `${value?.number}`
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
import { getResource } from '@hcengineering/platform'
|
||||
import presentation, { createQuery, getClient } from '@hcengineering/presentation'
|
||||
import setting, { settingId } from '@hcengineering/setting'
|
||||
import type { Issue, Project } from '@hcengineering/tracker'
|
||||
import { Issue, Project } from '@hcengineering/tracker'
|
||||
import {
|
||||
Button,
|
||||
EditBox,
|
||||
@@ -34,7 +34,14 @@
|
||||
navigate,
|
||||
showPopup
|
||||
} from '@hcengineering/ui'
|
||||
import { ActionContext, ContextMenu, DocNavLink, UpDownNavigator, contextStore } from '@hcengineering/view-resources'
|
||||
import {
|
||||
ActionContext,
|
||||
ContextMenu,
|
||||
DocNavLink,
|
||||
ParentsNavigator,
|
||||
UpDownNavigator,
|
||||
contextStore
|
||||
} from '@hcengineering/view-resources'
|
||||
import { createEventDispatcher, onDestroy } from 'svelte'
|
||||
import { generateIssueShortLink, getIssueId } from '../../../issues'
|
||||
import tracker from '../../../plugin'
|
||||
@@ -158,6 +165,7 @@
|
||||
<svelte:fragment slot="navigator">
|
||||
{#if !embedded}
|
||||
<UpDownNavigator element={issue} />
|
||||
<ParentsNavigator element={issue} />
|
||||
{/if}
|
||||
|
||||
<span class="ml-4 fs-title select-text-i">
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
import core, { Class, Doc, Ref, SortingOrder, TxCUD, WithLookup } from '@hcengineering/core'
|
||||
import { createQuery, getClient } from '@hcengineering/presentation'
|
||||
import type { Scrum, ScrumRecord } from '@hcengineering/tracker'
|
||||
import { UpDownNavigator } from '@hcengineering/view-resources'
|
||||
import { ParentsNavigator, UpDownNavigator } from '@hcengineering/view-resources'
|
||||
import { Panel } from '@hcengineering/panel'
|
||||
import { Button, closePanel, TabItem, TabList } from '@hcengineering/ui'
|
||||
import tracker from '../../plugin'
|
||||
@@ -99,6 +99,7 @@
|
||||
<Panel object={scrumRecord} isUtils={isRecording} isHeader={false} on:close>
|
||||
<svelte:fragment slot="navigator">
|
||||
<UpDownNavigator element={scrumRecord} />
|
||||
<ParentsNavigator element={scrumRecord} />
|
||||
</svelte:fragment>
|
||||
<svelte:fragment slot="title">
|
||||
<span class="fs-title select-text-i">
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
navigate,
|
||||
showPopup
|
||||
} from '@hcengineering/ui'
|
||||
import { ContextMenu, UpDownNavigator } from '@hcengineering/view-resources'
|
||||
import { ContextMenu, ParentsNavigator, UpDownNavigator } from '@hcengineering/view-resources'
|
||||
import { createEventDispatcher, onDestroy, onMount } from 'svelte'
|
||||
import tracker from '../../plugin'
|
||||
|
||||
@@ -158,6 +158,7 @@
|
||||
<svelte:fragment slot="navigator">
|
||||
{#if !embedded}
|
||||
<UpDownNavigator element={template} />
|
||||
<ParentsNavigator element={template} />
|
||||
{/if}
|
||||
|
||||
<div class="ml-2">
|
||||
|
||||
Reference in New Issue
Block a user