mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-23 08:48:01 +00: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 kind: ButtonKind = 'link'
|
||||||
export let size: ButtonSize = 'small'
|
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>) {
|
function change (e: CustomEvent<Ref<Account> | null>) {
|
||||||
if (e.detail === null) {
|
if (e.detail === null) {
|
||||||
selected = undefined
|
selected = undefined
|
||||||
} else {
|
} else {
|
||||||
selected = integrations.find((p) => (p.space as string as Ref<Account>) === e.detail)
|
selected = integrations.find((p) => p.createdBy === e.detail)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
import attachmentP, { Attachment } from '@hcengineering/attachment'
|
import attachmentP, { Attachment } from '@hcengineering/attachment'
|
||||||
import { AttachmentPresenter } from '@hcengineering/attachment-resources'
|
import { AttachmentPresenter } from '@hcengineering/attachment-resources'
|
||||||
import contact, { Channel, Contact, getName } from '@hcengineering/contact'
|
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 { NewMessage, SharedMessage } from '@hcengineering/gmail'
|
||||||
import { NotificationClientImpl } from '@hcengineering/notification-resources'
|
import { NotificationClientImpl } from '@hcengineering/notification-resources'
|
||||||
import { getResource, setPlatformStatus, unknownError } from '@hcengineering/platform'
|
import { getResource, setPlatformStatus, unknownError } from '@hcengineering/platform'
|
||||||
@ -65,7 +65,7 @@
|
|||||||
{
|
{
|
||||||
...obj,
|
...obj,
|
||||||
attachments: attachments.length,
|
attachments: attachments.length,
|
||||||
from: selectedIntegration.space as string as Ref<Account>,
|
from: selectedIntegration.createdBy,
|
||||||
copy: copy
|
copy: copy
|
||||||
.split(',')
|
.split(',')
|
||||||
.map((m) => m.trim())
|
.map((m) => m.trim())
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
import attachmentP, { Attachment } from '@hcengineering/attachment'
|
import attachmentP, { Attachment } from '@hcengineering/attachment'
|
||||||
import { AttachmentPresenter } from '@hcengineering/attachment-resources'
|
import { AttachmentPresenter } from '@hcengineering/attachment-resources'
|
||||||
import contact, { Channel, Contact, getName as getContactName } from '@hcengineering/contact'
|
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 { NotificationClientImpl } from '@hcengineering/notification-resources'
|
||||||
import { getResource, setPlatformStatus, unknownError } from '@hcengineering/platform'
|
import { getResource, setPlatformStatus, unknownError } from '@hcengineering/platform'
|
||||||
import { createQuery, getClient } from '@hcengineering/presentation'
|
import { createQuery, getClient } from '@hcengineering/presentation'
|
||||||
@ -80,7 +80,7 @@
|
|||||||
content: message,
|
content: message,
|
||||||
to: channel.value,
|
to: channel.value,
|
||||||
status: 'new',
|
status: 'new',
|
||||||
from: selectedIntegration.space as string as Ref<Account>,
|
from: selectedIntegration.createdBy,
|
||||||
copy: copy
|
copy: copy
|
||||||
.split(',')
|
.split(',')
|
||||||
.map((m) => m.trim())
|
.map((m) => m.trim())
|
||||||
|
Loading…
Reference in New Issue
Block a user