mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 21:50:34 +03:00
Allow to disable creation in special view (#2865)
Signed-off-by: Denis Bunakalya <denis.bunakalya@xored.com>
This commit is contained in:
parent
15c082e62f
commit
c6e00595d4
@ -45,6 +45,7 @@
|
||||
export let createLabel: IntlString | undefined
|
||||
export let createComponent: AnyComponent | undefined
|
||||
export let createComponentProps: Record<string, any> = {}
|
||||
export let isCreationDisabled = false
|
||||
export let descriptor: Ref<ViewletDescriptor> | undefined = undefined
|
||||
export let baseQuery: DocumentQuery<Doc> = {}
|
||||
|
||||
@ -116,7 +117,14 @@
|
||||
</div>
|
||||
<div class="ac-header-full" class:secondRow={twoRows}>
|
||||
{#if createLabel && createComponent}
|
||||
<Button label={createLabel} icon={IconAdd} kind={'primary'} size={'small'} on:click={() => showCreateDialog()} />
|
||||
<Button
|
||||
label={createLabel}
|
||||
icon={IconAdd}
|
||||
kind={'primary'}
|
||||
size={'small'}
|
||||
disabled={isCreationDisabled}
|
||||
on:click={() => showCreateDialog()}
|
||||
/>
|
||||
{/if}
|
||||
<ViewletSettingButton bind:viewOptions {viewlet} />
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user