mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 11:31:57 +03:00
fix popup result
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
601d971147
commit
945f7e8fe0
@ -28,9 +28,9 @@ export let zIndex: number
|
||||
let modalHTML: HTMLElement
|
||||
let modalOHTML: HTMLElement
|
||||
|
||||
function close(ev: CustomEvent) {
|
||||
console.log('got close, data', ev.detail)
|
||||
if (onClose !== undefined) onClose(ev.detail)
|
||||
function close(result: any) {
|
||||
console.log('popup close result', result)
|
||||
if (onClose !== undefined) onClose(result)
|
||||
closePopup()
|
||||
}
|
||||
|
||||
@ -65,12 +65,12 @@ $: {
|
||||
|
||||
<div class="popup" bind:this={modalHTML} style={`z-index: ${zIndex + 1};`}>
|
||||
{#if typeof(is) === 'string'}
|
||||
<Component is={is} props={props} on:close={close}/>
|
||||
<Component is={is} props={props} on:close={ (ev) => close(ev.detail) }/>
|
||||
{:else}
|
||||
<svelte:component this={is} {...props} on:close={close} />
|
||||
<svelte:component this={is} {...props} on:close={ (ev) => close(ev.detail) } />
|
||||
{/if}
|
||||
</div>
|
||||
<div bind:this={modalOHTML} class="modal-overlay" style={`z-index: ${zIndex};`} on:click={close} />
|
||||
<div bind:this={modalOHTML} class="modal-overlay" style={`z-index: ${zIndex};`} on:click={() => close(undefined)} />
|
||||
|
||||
<style lang="scss">
|
||||
.popup {
|
||||
|
@ -42,14 +42,14 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<Dialog label={'Create Application'}
|
||||
<!-- <Dialog label={'Create Application'}
|
||||
okLabel={'Create Application'}
|
||||
okAction={createCandidate}
|
||||
on:close={() => { dispatch('close') }}>
|
||||
<Section icon={File} label={'General Information'}>
|
||||
on:close={() => { dispatch('close') }}> -->
|
||||
<!-- <Section icon={File} label={'General Information'}> -->
|
||||
<Grid>
|
||||
<UserBox _class={recruit.class.Candidate} title='Candidate' caption='Candidates' bind:value={candidate} show />
|
||||
<DatePicker title={'Pick due date'} />
|
||||
</Grid>
|
||||
</Section>
|
||||
</Dialog>
|
||||
<!-- </Section> -->
|
||||
<!-- </Dialog> -->
|
||||
|
Loading…
Reference in New Issue
Block a user