mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-29 03:34:31 +00:00
Fix sprints switch url update (#2458)
Signed-off-by: Denis Maslennikov <denis.maslennikov@gmail.com>
This commit is contained in:
parent
2930c51fa1
commit
ffe9a70804
@ -4,6 +4,7 @@
|
|||||||
import { Sprint } from '@hcengineering/tracker'
|
import { Sprint } from '@hcengineering/tracker'
|
||||||
import { Button, DatePresenter, EditBox, Icon, IconMoreH, Label, showPopup } from '@hcengineering/ui'
|
import { Button, DatePresenter, EditBox, Icon, IconMoreH, Label, showPopup } from '@hcengineering/ui'
|
||||||
import { ContextMenu, DocAttributeBar } from '@hcengineering/view-resources'
|
import { ContextMenu, DocAttributeBar } from '@hcengineering/view-resources'
|
||||||
|
import { createEventDispatcher } from 'svelte'
|
||||||
import { onDestroy } from 'svelte'
|
import { onDestroy } from 'svelte'
|
||||||
import { activeSprint } from '../../issues'
|
import { activeSprint } from '../../issues'
|
||||||
import tracker from '../../plugin'
|
import tracker from '../../plugin'
|
||||||
@ -15,6 +16,7 @@
|
|||||||
export let sprint: Sprint
|
export let sprint: Sprint
|
||||||
|
|
||||||
const client = getClient()
|
const client = getClient()
|
||||||
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
async function change (field: string, value: any) {
|
async function change (field: string, value: any) {
|
||||||
await client.update(sprint, { [field]: value })
|
await client.update(sprint, { [field]: value })
|
||||||
@ -24,6 +26,7 @@
|
|||||||
showPopup(SprintPopup, { _class: tracker.class.Sprint }, container, (value) => {
|
showPopup(SprintPopup, { _class: tracker.class.Sprint }, container, (value) => {
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
sprint = value
|
sprint = value
|
||||||
|
dispatch('sprint', sprint._id)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
import { IntlString } from '@hcengineering/platform'
|
import { IntlString } from '@hcengineering/platform'
|
||||||
import { createQuery } from '@hcengineering/presentation'
|
import { createQuery } from '@hcengineering/presentation'
|
||||||
import { Sprint, Team } from '@hcengineering/tracker'
|
import { Sprint, Team } from '@hcengineering/tracker'
|
||||||
import { closePopup, closeTooltip, location } from '@hcengineering/ui'
|
import { closePopup, closeTooltip, getCurrentLocation, location, navigate } from '@hcengineering/ui'
|
||||||
import { onDestroy } from 'svelte'
|
import { onDestroy } from 'svelte'
|
||||||
import tracker from '../../plugin'
|
import tracker from '../../plugin'
|
||||||
import { SprintViewMode } from '../../utils'
|
import { SprintViewMode } from '../../utils'
|
||||||
@ -53,7 +53,14 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if sprint}
|
{#if sprint}
|
||||||
<EditSprint {sprint} />
|
<EditSprint
|
||||||
|
{sprint}
|
||||||
|
on:sprint={(evt) => {
|
||||||
|
const loc = getCurrentLocation()
|
||||||
|
loc.path[5] = evt.detail
|
||||||
|
navigate(loc)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
{:else}
|
{:else}
|
||||||
<SprintBrowser {label} query={{ space: currentSpace }} {search} {mode} />
|
<SprintBrowser {label} query={{ space: currentSpace }} {search} {mode} />
|
||||||
{/if}
|
{/if}
|
||||||
|
Loading…
Reference in New Issue
Block a user