Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
Andrey Platov 2021-09-07 14:18:19 +02:00
parent a26c10ad8c
commit e9328d3d6b
No known key found for this signature in database
GPG Key ID: C8787EFEB4B64AF0
2 changed files with 4 additions and 2 deletions

View File

@ -28,6 +28,7 @@
export let label: IntlString
export let okLabel: IntlString
export let okAction: () => void
export let canSave: boolean = false
const dispatch = createEventDispatcher()
</script>
@ -36,7 +37,7 @@
<div class="card-bg" />
<div class="flex-between header">
<div class="overflow-label label"><Label {label} /></div>
<div class="tool"><Button label={okLabel} size={'small'} transparent on:click={() => { okAction(); dispatch('close') }} /></div>
<div class="tool"><Button disabled={!canSave} label={okLabel} size={'small'} transparent on:click={() => { okAction(); dispatch('close') }} /></div>
</div>
<div class="content"><slot /></div>
<div class="flex-col pool">

View File

@ -54,6 +54,7 @@
<Card label={'Create Application'}
okLabel={'Save'}
okAction={createApplication}
canSave={candidate !== undefined}
on:close={() => { dispatch('close') }}>
<Grid column={1} rowGap={1.75}>
<UserBox _class={recruit.class.Candidate} title='Candidate' caption='Candidates' bind:value={candidate} />