person presenter to open corresponding editor

Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
Andrey Platov
2021-09-08 18:42:40 +02:00
parent a29afa4d98
commit 9874c47cf2
9 changed files with 520 additions and 441 deletions
@@ -20,13 +20,11 @@
import { buildModel } from '../utils'
import { getClient } from '@anticrm/presentation'
import { Label, showPopup, Loading, ScrollBox } from '@anticrm/ui'
import type { AnyComponent } from '@anticrm/ui'
import { createQuery } from '@anticrm/presentation'
export let _class: Ref<Class<Doc>>
export let space: Ref<Space>
export let open: AnyComponent
export let options: FindOptions<Doc> | undefined
export let config: string[]
@@ -49,9 +47,6 @@
const client = getClient()
function onClick(object: Doc) {
showPopup(open, { object, space }, 'float')
}
</script>
{#await buildModel(client, _class, config, options)}
@@ -70,7 +65,7 @@
{#if objects}
<tbody>
{#each objects as object (object._id)}
<tr class="tr-body" on:click={() => onClick(object)}>
<tr class="tr-body">
{#each model as attribute}
<td><svelte:component this={attribute.presenter} {object} value={getValue(object, attribute.key)}/></td>
{/each}