mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-10 17:30:51 +00:00
uberf-10252: fix collaborators activity presenter (#8594)
Some checks are pending
CI / build (push) Waiting to run
CI / svelte-check (push) Blocked by required conditions
CI / formatting (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / uitest (push) Waiting to run
CI / uitest-pg (push) Waiting to run
CI / uitest-qms (push) Waiting to run
CI / uitest-workspaces (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions
Some checks are pending
CI / build (push) Waiting to run
CI / svelte-check (push) Blocked by required conditions
CI / formatting (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / uitest (push) Waiting to run
CI / uitest-pg (push) Waiting to run
CI / uitest-qms (push) Waiting to run
CI / uitest-workspaces (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
parent
7015461c72
commit
45aaa26011
@ -15,20 +15,20 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Icon, IconAdd, IconDelete, Label } from '@hcengineering/ui'
|
import { Icon, IconAdd, IconDelete, Label } from '@hcengineering/ui'
|
||||||
import { personRefByPersonIdStore, PersonRefPresenter } from '@hcengineering/contact-resources'
|
import { personRefByAccountUuidStore, PersonRefPresenter } from '@hcengineering/contact-resources'
|
||||||
import { Person } from '@hcengineering/contact'
|
import { Person } from '@hcengineering/contact'
|
||||||
import { type PersonId, type Ref, notEmpty } from '@hcengineering/core'
|
import { type Ref, type AccountUuid, notEmpty } from '@hcengineering/core'
|
||||||
import activity, { DocAttributeUpdates } from '@hcengineering/activity'
|
import activity, { DocAttributeUpdates } from '@hcengineering/activity'
|
||||||
import notification from '@hcengineering/notification'
|
import notification from '@hcengineering/notification'
|
||||||
|
|
||||||
export let value: DocAttributeUpdates
|
export let value: DocAttributeUpdates
|
||||||
|
|
||||||
$: removed = getPersonRefs(value.removed, $personRefByPersonIdStore)
|
$: removed = getPersonRefs(value.removed, $personRefByAccountUuidStore)
|
||||||
$: added = getPersonRefs(value.added.length > 0 ? value.added : value.set, $personRefByPersonIdStore)
|
$: added = getPersonRefs(value.added.length > 0 ? value.added : value.set, $personRefByAccountUuidStore)
|
||||||
|
|
||||||
function getPersonRefs (
|
function getPersonRefs (
|
||||||
values: DocAttributeUpdates['removed' | 'added' | 'set'],
|
values: DocAttributeUpdates['removed' | 'added' | 'set'],
|
||||||
personRefByPersonId: Map<PersonId, Ref<Person>>
|
personRefByAccountUuid: Map<AccountUuid, Ref<Person>>
|
||||||
): Ref<Person>[] {
|
): Ref<Person>[] {
|
||||||
const persons = new Set(
|
const persons = new Set(
|
||||||
values
|
values
|
||||||
@ -37,7 +37,7 @@
|
|||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
const person = personRefByPersonId.get(value as PersonId)
|
const person = personRefByAccountUuid.get(value as AccountUuid)
|
||||||
|
|
||||||
if (person === undefined) {
|
if (person === undefined) {
|
||||||
return undefined
|
return undefined
|
||||||
|
Loading…
Reference in New Issue
Block a user