EZQMS-236: QE templates >> Have the ability to make a section mandatory (#3581)

Signed-off-by: Anna No <anna.no@xored.com>
This commit is contained in:
Anna No 2023-08-11 14:22:56 +07:00 committed by GitHub
parent 659f3dcd40
commit 281cd65f4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View File

@ -52,6 +52,7 @@
on:click on:click
on:delete on:delete
on:action on:action
on:valid
> >
<slot /> <slot />
</Ctor> </Ctor>
@ -67,6 +68,7 @@
on:click on:click
on:delete on:delete
on:action on:action
on:valid
/> />
{/if} {/if}
</ErrorBoundary> </ErrorBoundary>

View File

@ -75,6 +75,11 @@
function openFile () { function openFile () {
inputFile.click() inputFile.click()
} }
function updateContent (evt: CustomEvent) {
attachments = evt.detail.length
dispatch('attachments', evt.detail)
}
</script> </script>
<div class="antiSection" use:resizeObserver={(element) => (wSection = element.clientWidth)}> <div class="antiSection" use:resizeObserver={(element) => (wSection = element.clientWidth)}>
@ -151,9 +156,7 @@
options={{ sort: { pinned: -1 } }} options={{ sort: { pinned: -1 } }}
query={{ ...query, attachedTo: objectId }} query={{ ...query, attachedTo: objectId }}
loadingProps={{ length: attachments ?? 0 }} loadingProps={{ length: attachments ?? 0 }}
on:content={(evt) => { on:content={updateContent}
attachments = evt.detail.length
}}
{readonly} {readonly}
/> />
</Scroller> </Scroller>
@ -175,9 +178,7 @@
options={{ sort: { pinned: -1 } }} options={{ sort: { pinned: -1 } }}
query={{ ...query, attachedTo: objectId }} query={{ ...query, attachedTo: objectId }}
loadingProps={{ length: attachments ?? 0 }} loadingProps={{ length: attachments ?? 0 }}
on:content={(evt) => { on:content={updateContent}
attachments = evt.detail.length
}}
{readonly} {readonly}
/> />
{/if} {/if}