diff --git a/packages/presentation/src/utils.ts b/packages/presentation/src/utils.ts index 84dfd646c8..af40774c01 100644 --- a/packages/presentation/src/utils.ts +++ b/packages/presentation/src/utils.ts @@ -224,14 +224,14 @@ export class LiveQuery { const unsub = liveQuery.query( _class, - piplineQuery.query ?? query, + query, (result) => { // If we have one more request after this one, no need to do something. if (id === this.reqId) { callback(result) } }, - piplineQuery.options ?? options + options ) this.unsubscribe = () => { unsub() diff --git a/plugins/activity-resources/src/components/TxView.svelte b/plugins/activity-resources/src/components/TxView.svelte index d3ea8fcca0..af8e3a344d 100644 --- a/plugins/activity-resources/src/components/TxView.svelte +++ b/plugins/activity-resources/src/components/TxView.svelte @@ -17,7 +17,7 @@ import type { DisplayTx, TxViewlet } from '@hcengineering/activity' import attachment from '@hcengineering/attachment' import chunter from '@hcengineering/chunter' - import contact, { Employee, PersonAccount, getName } from '@hcengineering/contact' + import contact, { Person, PersonAccount, getName } from '@hcengineering/contact' import core, { AnyAttribute, Class, Doc, Ref, TxCUD, getCurrentAccount } from '@hcengineering/core' import { Asset } from '@hcengineering/platform' import { createQuery, getClient } from '@hcengineering/presentation' @@ -56,7 +56,7 @@ let viewlet: TxDisplayViewlet | undefined let props: any let account: PersonAccount | undefined - let employee: Employee | undefined + let person: Person | undefined let model: AttributeModel[] = [] let modelIcon: Asset | undefined = undefined let iconComponent: AnyComponent | undefined = undefined @@ -67,7 +67,7 @@ $: if (tx.tx._id !== ptx?.tx._id) { if (tx.tx.modifiedBy !== account?._id) { account = undefined - employee = undefined + person = undefined } viewlet = undefined props = undefined @@ -107,10 +107,10 @@ $: account && employeeQuery.query( - contact.mixin.Employee, - { _id: account.person as Ref }, + contact.class.Person, + { _id: account.person }, (res) => { - ;[employee] = res + ;[person] = res }, { limit: 1 } ) @@ -191,7 +191,7 @@ {#if showIcon} {#if withAvatar}
- +
{:else}
@@ -212,8 +212,8 @@
- {#if employee} - {getName(client.getHierarchy(), employee)} + {#if person} + {getName(client.getHierarchy(), person)} {:else}