mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-15 12:55:59 +00:00
fix props for panel (#6081)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
2b3caf6283
commit
89417c7f84
@ -21,7 +21,14 @@
|
|||||||
import notification, { DocNotifyContext, InboxNotification, notificationId } from '@hcengineering/notification'
|
import notification, { DocNotifyContext, InboxNotification, notificationId } from '@hcengineering/notification'
|
||||||
import { BrowserNotificatator, InboxNotificationsClientImpl } from '@hcengineering/notification-resources'
|
import { BrowserNotificatator, InboxNotificationsClientImpl } from '@hcengineering/notification-resources'
|
||||||
import { IntlString, broadcastEvent, getMetadata, getResource } from '@hcengineering/platform'
|
import { IntlString, broadcastEvent, getMetadata, getResource } from '@hcengineering/platform'
|
||||||
import { ActionContext, ComponentExtensions, getClient, isAdminUser, reduceCalls } from '@hcengineering/presentation'
|
import {
|
||||||
|
ActionContext,
|
||||||
|
ComponentExtensions,
|
||||||
|
createQuery,
|
||||||
|
getClient,
|
||||||
|
isAdminUser,
|
||||||
|
reduceCalls
|
||||||
|
} from '@hcengineering/presentation'
|
||||||
import setting from '@hcengineering/setting'
|
import setting from '@hcengineering/setting'
|
||||||
import support, { SupportStatus, supportLink } from '@hcengineering/support'
|
import support, { SupportStatus, supportLink } from '@hcengineering/support'
|
||||||
import {
|
import {
|
||||||
@ -406,6 +413,7 @@
|
|||||||
const _class = props[2] as Ref<Class<Doc>>
|
const _class = props[2] as Ref<Class<Doc>>
|
||||||
const _id = await parseLinkId(linkProviders, props[1], _class)
|
const _id = await parseLinkId(linkProviders, props[1], _class)
|
||||||
const doc = await client.findOne<Doc>(_class, { _id })
|
const doc = await client.findOne<Doc>(_class, { _id })
|
||||||
|
panelDoc = { _class, _id }
|
||||||
|
|
||||||
if (doc !== undefined) {
|
if (doc !== undefined) {
|
||||||
const provider = ListSelectionProvider.Find(doc._id)
|
const provider = ListSelectionProvider.Find(doc._id)
|
||||||
@ -428,6 +436,17 @@
|
|||||||
closePanel(false)
|
closePanel(false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let panelDoc: undefined | { _id: Ref<Doc>, _class: Ref<Class<Doc>> } = undefined
|
||||||
|
const panelQuery = createQuery()
|
||||||
|
|
||||||
|
$: if (panelDoc !== undefined) {
|
||||||
|
panelQuery.query(panelDoc._class, { _id: panelDoc._id }, (r) => {
|
||||||
|
if (r.length === 0) {
|
||||||
|
closePanel(false)
|
||||||
|
panelDoc = undefined
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
function clear (level: number): void {
|
function clear (level: number): void {
|
||||||
switch (level) {
|
switch (level) {
|
||||||
|
Loading…
Reference in New Issue
Block a user