mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 11:31:57 +03:00
Fix integration selector (#2871)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
4fbe792df3
commit
91dd4513ec
@ -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>
|
||||
|
@ -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())
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user