Fix integration selector (#2871)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2023-04-03 09:25:00 +06:00 committed by GitHub
parent 4fbe792df3
commit 91dd4513ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -23,13 +23,13 @@
export let kind: ButtonKind = 'link'
export let size: ButtonSize = 'small'
$: ids = Array.from(new Set(integrations.map((p) => p.space as string as Ref<Account>)))
$: ids = Array.from(new Set(integrations.map((p) => p.createdBy as Ref<Account>)))
function change (e: CustomEvent<Ref<Account> | null>) {
if (e.detail === null) {
selected = undefined
} else {
selected = integrations.find((p) => (p.space as string as Ref<Account>) === e.detail)
selected = integrations.find((p) => p.createdBy === e.detail)
}
}
</script>

View File

@ -16,7 +16,7 @@
import attachmentP, { Attachment } from '@hcengineering/attachment'
import { AttachmentPresenter } from '@hcengineering/attachment-resources'
import contact, { Channel, Contact, getName } from '@hcengineering/contact'
import { Account, Data, generateId, Ref } from '@hcengineering/core'
import { Data, generateId } from '@hcengineering/core'
import { NewMessage, SharedMessage } from '@hcengineering/gmail'
import { NotificationClientImpl } from '@hcengineering/notification-resources'
import { getResource, setPlatformStatus, unknownError } from '@hcengineering/platform'
@ -65,7 +65,7 @@
{
...obj,
attachments: attachments.length,
from: selectedIntegration.space as string as Ref<Account>,
from: selectedIntegration.createdBy,
copy: copy
.split(',')
.map((m) => m.trim())

View File

@ -16,7 +16,7 @@
import attachmentP, { Attachment } from '@hcengineering/attachment'
import { AttachmentPresenter } from '@hcengineering/attachment-resources'
import contact, { Channel, Contact, getName as getContactName } from '@hcengineering/contact'
import { Account, generateId, getCurrentAccount, Ref, toIdMap } from '@hcengineering/core'
import { generateId, getCurrentAccount, Ref, toIdMap } from '@hcengineering/core'
import { NotificationClientImpl } from '@hcengineering/notification-resources'
import { getResource, setPlatformStatus, unknownError } from '@hcengineering/platform'
import { createQuery, getClient } from '@hcengineering/presentation'
@ -80,7 +80,7 @@
content: message,
to: channel.value,
status: 'new',
from: selectedIntegration.space as string as Ref<Account>,
from: selectedIntegration.createdBy,
copy: copy
.split(',')
.map((m) => m.trim())