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

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
Alexey Zinoviev 2025-04-16 17:06:58 +04:00 committed by GitHub
parent 7015461c72
commit 45aaa26011
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,20 +15,20 @@
<script lang="ts">
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 { type PersonId, type Ref, notEmpty } from '@hcengineering/core'
import { type Ref, type AccountUuid, notEmpty } from '@hcengineering/core'
import activity, { DocAttributeUpdates } from '@hcengineering/activity'
import notification from '@hcengineering/notification'
export let value: DocAttributeUpdates
$: removed = getPersonRefs(value.removed, $personRefByPersonIdStore)
$: added = getPersonRefs(value.added.length > 0 ? value.added : value.set, $personRefByPersonIdStore)
$: removed = getPersonRefs(value.removed, $personRefByAccountUuidStore)
$: added = getPersonRefs(value.added.length > 0 ? value.added : value.set, $personRefByAccountUuidStore)
function getPersonRefs (
values: DocAttributeUpdates['removed' | 'added' | 'set'],
personRefByPersonId: Map<PersonId, Ref<Person>>
personRefByAccountUuid: Map<AccountUuid, Ref<Person>>
): Ref<Person>[] {
const persons = new Set(
values
@ -37,7 +37,7 @@
return undefined
}
const person = personRefByPersonId.get(value as PersonId)
const person = personRefByAccountUuid.get(value as AccountUuid)
if (person === undefined) {
return undefined