mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-30 05:25:00 +02:00
29 lines
904 B
Svelte
29 lines
904 B
Svelte
<script lang="ts">
|
|
import { Document } from '@hcengineering/controlled-documents'
|
|
import { Employee, PersonAccount } from '@hcengineering/contact'
|
|
import { DocumentQuery, Ref, getCurrentAccount } from '@hcengineering/core'
|
|
import DocumentsContainer from './DocumentsContainer.svelte'
|
|
|
|
import documents from '../plugin'
|
|
import { IntlString } from '@hcengineering/platform'
|
|
import { createEventDispatcher } from 'svelte'
|
|
|
|
export let query: DocumentQuery<Document> = {}
|
|
export let config: [string, IntlString, object][] = []
|
|
|
|
const dispatch = createEventDispatcher()
|
|
const currentEmployee = (getCurrentAccount() as PersonAccount).person as Ref<Employee>
|
|
|
|
$: resultQuery = {
|
|
...query,
|
|
owner: currentEmployee
|
|
}
|
|
</script>
|
|
|
|
<DocumentsContainer
|
|
query={resultQuery}
|
|
title={documents.string.MyDocuments}
|
|
{config}
|
|
on:action={(event) => dispatch('action', event.detail)}
|
|
/>
|