Files
huly-platform/plugins/document-resources/src/components/DocumentToDoPresenter.svelte
T
2024-02-29 15:32:39 +07:00

32 lines
770 B
Svelte

<script lang="ts">
import core, { Space } from '@hcengineering/core'
import document, { Document } from '@hcengineering/document'
import { createQuery } from '@hcengineering/presentation'
import { Icon, Label } from '@hcengineering/ui'
export let value: Document
export let withoutSpace: boolean
let space: Space | undefined = undefined
const query = createQuery()
$: query.query(core.class.Space, { _id: value.space }, (res) => {
space = res[0]
})
</script>
{#if !withoutSpace}
<div>
<Label label={document.string.CreateDocument} />
/
{space?.name}
</div>
{/if}
<div class="flex-row-center flex-gap-1">
<div class="icon">
<Icon icon={document.icon.DocumentApplication} size={'small'} />
</div>
{value.name}
</div>