diff --git a/packages/core/src/client.ts b/packages/core/src/client.ts index e99281dd03..3cab323963 100644 --- a/packages/core/src/client.ts +++ b/packages/core/src/client.ts @@ -35,6 +35,7 @@ export type TxHander = (tx: Tx) => void export interface Client extends Storage { notify?: (tx: Tx) => void getHierarchy: () => Hierarchy + getModel: () => ModelDb findOne: ( _class: Ref>, query: DocumentQuery, @@ -50,6 +51,8 @@ class ClientImpl implements Client { getHierarchy (): Hierarchy { return this.hierarchy } + getModel (): ModelDb { return this.model } + async findAll( _class: Ref>, query: DocumentQuery, diff --git a/packages/presentation/src/utils.ts b/packages/presentation/src/utils.ts index deec128f87..794f1e93dd 100644 --- a/packages/presentation/src/utils.ts +++ b/packages/presentation/src/utils.ts @@ -16,7 +16,7 @@ import { onDestroy } from 'svelte' -import { Doc, Ref, Class, DocumentQuery, FindOptions, Client, Hierarchy, Tx, getCurrentAccount } from '@anticrm/core' +import { Doc, Ref, Class, DocumentQuery, FindOptions, Client, Hierarchy, Tx, getCurrentAccount, ModelDb } from '@anticrm/core' import { TxOperations } from '@anticrm/core' import { LiveQuery as LQ } from '@anticrm/query' import core from '@anticrm/core' @@ -34,6 +34,10 @@ class UIClient extends TxOperations implements Client { return this.client.getHierarchy() } + getModel (): ModelDb { + return this.client.getModel() + } + tx(tx: Tx): Promise { return Promise.all([super.tx(tx), this.liveQuery.tx(tx)]) as unknown as Promise } diff --git a/packages/query/src/index.ts b/packages/query/src/index.ts index ff34b46cc1..458fb94736 100644 --- a/packages/query/src/index.ts +++ b/packages/query/src/index.ts @@ -16,7 +16,7 @@ import { Ref, Class, Doc, Tx, DocumentQuery, TxCreateDoc, TxRemoveDoc, Client, FindOptions, TxUpdateDoc, _getOperator, TxProcessor, resultSort, SortingQuery, - FindResult, Hierarchy, Refs, WithLookup, LookupData, TxMixin, TxPutBag + FindResult, Hierarchy, Refs, WithLookup, LookupData, TxMixin, TxPutBag, ModelDb } from '@anticrm/core' interface Query { @@ -43,6 +43,10 @@ export class LiveQuery extends TxProcessor implements Client { return this.client.getHierarchy() } + getModel (): ModelDb { + return this.client.getModel() + } + private match (q: Query, doc: Doc): boolean { if (!this.getHierarchy().isDerived(doc._class, q._class)) { return false diff --git a/plugins/recruit-resources/src/components/ApplicationsPopup.svelte b/plugins/recruit-resources/src/components/ApplicationsPopup.svelte index c8af1a4c06..3a0310afd4 100644 --- a/plugins/recruit-resources/src/components/ApplicationsPopup.svelte +++ b/plugins/recruit-resources/src/components/ApplicationsPopup.svelte @@ -16,23 +16,35 @@
- {#each apps as app} + {#each applications as app}
-
{app.label}
-
{app.description}
+
{getApplicationLabel(app)}
+
Cisco
{/each} diff --git a/plugins/recruit-resources/src/components/ApplicationsPresenter.svelte b/plugins/recruit-resources/src/components/ApplicationsPresenter.svelte index 1c15ab2c2e..5d5f2b53b1 100644 --- a/plugins/recruit-resources/src/components/ApplicationsPresenter.svelte +++ b/plugins/recruit-resources/src/components/ApplicationsPresenter.svelte @@ -17,19 +17,15 @@ {#if value.applications && value.applications > 0} - +
 {value.applications}