Files
huly-platform/plugins/training-resources/src/components/ViewIncomingRequests.svelte
T
2024-06-03 19:55:54 +04:00

24 lines
732 B
Svelte

<!--
Copyright @ 2024 Hardcore Engineering Inc.
-->
<script lang="ts">
import type { TrainingRequest } from '@hcengineering/training'
import { DocumentQuery } from '@hcengineering/core'
import { SpecialView } from '@hcengineering/workbench-resources'
import type { ComponentProps } from 'svelte'
import { getCurrentEmployeeRef } from '../utils'
type $$Props = ComponentProps<SpecialView>
$: ({ baseQuery, ...rest } = $$props as $$Props)
let extendedBaseQuery: DocumentQuery<TrainingRequest>
$: extendedBaseQuery = {
...((baseQuery ?? {}) as DocumentQuery<TrainingRequest>),
trainees: getCurrentEmployeeRef(),
canceledOn: null
}
</script>
<SpecialView {...rest} baseQuery={extendedBaseQuery} />