mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-22 08:20:39 +00:00
Issue presenter fix (#2091)
Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
This commit is contained in:
parent
c41fd157f8
commit
c6f759e1f9
@ -14,6 +14,7 @@
|
|||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { WithLookup } from '@anticrm/core'
|
import { WithLookup } from '@anticrm/core'
|
||||||
|
import { createQuery } from '@anticrm/presentation'
|
||||||
import type { Issue, Team } from '@anticrm/tracker'
|
import type { Issue, Team } from '@anticrm/tracker'
|
||||||
import { Icon, showPanel } from '@anticrm/ui'
|
import { Icon, showPanel } from '@anticrm/ui'
|
||||||
import tracker from '../../plugin'
|
import tracker from '../../plugin'
|
||||||
@ -25,7 +26,16 @@
|
|||||||
showPanel(tracker.component.EditIssue, value._id, value._class, 'content')
|
showPanel(tracker.component.EditIssue, value._id, value._class, 'content')
|
||||||
}
|
}
|
||||||
|
|
||||||
$: title = `${(value?.$lookup?.space as Team)?.identifier}-${value.number}`
|
const spaceQuery = createQuery()
|
||||||
|
let currentTeam: Team | undefined = value?.$lookup?.space
|
||||||
|
|
||||||
|
$: if (value?.$lookup?.space === undefined) {
|
||||||
|
spaceQuery.query(tracker.class.Team, { _id: value.space }, (res) => ([currentTeam] = res))
|
||||||
|
} else {
|
||||||
|
spaceQuery.unsubscribe()
|
||||||
|
}
|
||||||
|
|
||||||
|
$: title = currentTeam ? `${currentTeam.identifier}-${value.number}` : `${value.number}`
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if value}
|
{#if value}
|
||||||
|
Loading…
Reference in New Issue
Block a user