mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-27 21:43:20 +03:00
EZQMS-531: Prop to disable Save As and Save buttons in FilterBar
(#4560)
Signed-off-by: Petr Vyazovetskiy <develop.pit@gmail.com>
This commit is contained in:
parent
7510879147
commit
9d87641a73
@ -31,6 +31,7 @@
|
||||
export let space: Ref<Space> | undefined
|
||||
export let query: DocumentQuery<Doc>
|
||||
export let viewOptions: ViewOptions | undefined = undefined
|
||||
export let hideSaveButtons: boolean = false
|
||||
|
||||
const client = getClient()
|
||||
const hierarchy = client.getHierarchy()
|
||||
@ -190,26 +191,28 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex gap-1-5">
|
||||
<Button
|
||||
icon={view.icon.Views}
|
||||
label={view.string.SaveAs}
|
||||
width={'fit-content'}
|
||||
on:click={async () => {
|
||||
await saveFilteredView()
|
||||
}}
|
||||
/>
|
||||
{#if selectedFilterChanged($selectedFilterStore, $filterStore, $activeViewlet, $viewOptionStore)}
|
||||
{#if !hideSaveButtons}
|
||||
<div class="flex gap-1-5">
|
||||
<Button
|
||||
icon={view.icon.Views}
|
||||
label={view.string.Save}
|
||||
label={view.string.SaveAs}
|
||||
width={'fit-content'}
|
||||
on:click={async () => {
|
||||
await saveCurrentFilteredView($selectedFilterStore)
|
||||
await saveFilteredView()
|
||||
}}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
{#if selectedFilterChanged($selectedFilterStore, $filterStore, $activeViewlet, $viewOptionStore)}
|
||||
<Button
|
||||
icon={view.icon.Views}
|
||||
label={view.string.Save}
|
||||
width={'fit-content'}
|
||||
on:click={async () => {
|
||||
await saveCurrentFilteredView($selectedFilterStore)
|
||||
}}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user