Add Card component. Fix Popup. (#135)

Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Alexander Platov
2021-09-03 15:59:05 +02:00
committed by GitHub
parent 7a99603734
commit 246a4b3b5e
9 changed files with 151 additions and 69 deletions
@@ -16,8 +16,8 @@
<script lang="ts">
import { createEventDispatcher } from 'svelte'
import type { Ref, Space } from '@anticrm/core'
import { DatePicker, EditBox, Dialog, Tabs, Section, Grid, Button } from '@anticrm/ui'
import { UserBox } from '@anticrm/presentation'
import { DatePicker, EditBox, Card, Tabs, Section, Grid, Row, Button } from '@anticrm/ui'
import { UserBox, UserInfo, Avatar } from '@anticrm/presentation'
import type { Person } from '@anticrm/contact'
import File from './icons/File.svelte'
import Address from './icons/Address.svelte'
@@ -44,15 +44,14 @@
</script>
<!-- <Dialog label={'Create Application'}
okLabel={'Create Application'}
okAction={createCandidate}
on:close={() => { dispatch('close') }}> -->
<!-- <Section icon={File} label={'General Information'}> -->
<Button label="Save" on:click={createCandidate}/>
<Grid>
<UserBox _class={recruit.class.Candidate} title='Candidate' caption='Candidates' bind:value={candidate} show />
<DatePicker title={'Pick due date'} />
</Grid>
<!-- </Section> -->
<!-- </Dialog> -->
<Card label={'Create Application'}
okLabel={'Save'}
okAction={createCandidate}
on:close={() => { dispatch('close') }}>
<Grid rowGap={1.5}>
<Row><EditBox label={'Name'} placeholder={'John Connor'} /></Row>
<Row><UserInfo value={{firstName: 'First', lastName: 'Last', city: 'Cityvech'}} size={'large'} subtitle={'Candidate'} /></Row>
<UserBox _class={recruit.class.Candidate} title='Candidate' caption='Candidates' bind:value={candidate} />
<DatePicker title={'Pick due date'} />
</Grid>
</Card>
@@ -50,7 +50,7 @@
const client = getClient()
function onClick(object: Doc) {
showPopup(open, { object, space }, 'right')
showPopup(open, { object, space }, 'float')
}
</script>
@@ -42,7 +42,7 @@
label: model.addSpaceLabel,
icon: IconAdd,
action: async (): Promise<void> => {
showPopup(model.createComponent, {})
showPopup(model.createComponent, {}, 'right')
}
}