Fix org member channel open (#2725)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2023-03-13 13:47:31 +06:00 committed by GitHub
parent 626fb36e7a
commit fff54ea212
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,6 @@
-->
<script lang="ts">
import type { Channel } from '@hcengineering/contact'
import { Doc } from '@hcengineering/core'
import { getResource } from '@hcengineering/platform'
import type { ButtonKind, ButtonSize } from '@hcengineering/ui'
import { showPopup } from '@hcengineering/ui'
@ -29,11 +28,14 @@
export let size: ButtonSize = 'small'
export let length: 'tiny' | 'short' | 'full' = 'short'
export let shape: 'circle' | undefined = 'circle'
export let object: Doc
async function _open (ev: CustomEvent): Promise<void> {
if (ev.detail.presenter !== undefined && Array.isArray(value)) {
showPopup(ev.detail.presenter, { _id: object._id, _class: object._class }, 'float')
showPopup(
ev.detail.presenter,
{ _id: ev.detail.channel.attachedTo, _class: ev.detail.channel.attachedToClass },
'float'
)
}
if (ev.detail.action !== undefined && Array.isArray(value)) {
const action = await getResource(ev.detail.action as ViewAction)