mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-28 10:57:36 +00:00
cleanup
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
8df449d090
commit
091d8ef5b1
@ -30,8 +30,6 @@
|
||||
export let spaceLabel: IntlString
|
||||
export let spacePlaceholder: IntlString
|
||||
export let label: IntlString
|
||||
export let okLabel: IntlString
|
||||
export let cancelLabel: IntlString
|
||||
export let okAction: () => void
|
||||
export let canSave: boolean = false
|
||||
|
||||
@ -54,8 +52,8 @@
|
||||
<SpaceSelect _class={spaceClass} label={spaceLabel} placeholder={spacePlaceholder} bind:value={space} />
|
||||
</div>
|
||||
<div class="footer">
|
||||
<Button disabled={!canSave} label={okLabel} size={'small'} transparent primary on:click={() => { okAction(); dispatch('close') }} />
|
||||
<Button label={cancelLabel} size={'small'} transparent on:click={() => { dispatch('close') }} />
|
||||
<Button disabled={!canSave} label={'Create'} size={'small'} transparent primary on:click={() => { okAction(); dispatch('close') }} />
|
||||
<Button label={'Cancel'} size={'small'} transparent on:click={() => { dispatch('close') }} />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
@ -28,8 +28,8 @@
|
||||
<div class="overflow-label title"><Label {label} /></div>
|
||||
<div class="message"><Label label={message} /></div>
|
||||
<div class="footer">
|
||||
<Button label={'Ok'} size={'small'} primary on:click={() => dispatch('close', 'OK')} />
|
||||
<Button label={'Cancel'} size={'small'} on:click={() => dispatch('close', 'CANCEL')} />
|
||||
<Button label={'Ok'} size={'small'} primary on:click={() => dispatch('close', true)} />
|
||||
<Button label={'Cancel'} size={'small'} on:click={() => dispatch('close', false)} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -43,6 +43,10 @@
|
||||
const dispatch = createEventDispatcher()
|
||||
const client = getClient()
|
||||
|
||||
export function canClose(): boolean {
|
||||
return candidate === undefined && employee === undefined
|
||||
}
|
||||
|
||||
async function createApplication() {
|
||||
dispatch('close')
|
||||
const state = await client.findOne(core.class.State, { space: _space })
|
||||
@ -89,7 +93,6 @@
|
||||
</script>
|
||||
|
||||
<Card label={'Create Application'}
|
||||
okLabel={'Save'}
|
||||
okAction={createApplication}
|
||||
canSave={status.severity === Severity.OK}
|
||||
spaceClass={recruit.class.Vacancy}
|
||||
|
@ -140,8 +140,6 @@
|
||||
<!-- <DialogHeader {space} {object} {newValue} {resume} create={true} on:save={createCandidate}/> -->
|
||||
|
||||
<Card label={'Create Candidate'}
|
||||
okLabel={'Save'}
|
||||
cancelLabel={'Cancel'}
|
||||
okAction={createCandidate}
|
||||
canSave={firstName.length > 0 && lastName.length > 0}
|
||||
spaceClass={recruit.class.Candidates}
|
||||
|
@ -89,7 +89,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Applications
|
||||
<!-- Applications
|
||||
|
||||
<TableView
|
||||
_class={recruit.class.Applicant}
|
||||
@ -104,7 +104,7 @@
|
||||
}
|
||||
}
|
||||
search=""
|
||||
/>
|
||||
/> -->
|
||||
|
||||
<div class="attachments">
|
||||
<Attachments objectId={object._id} _class={object._class} space={object.space} {object}/>
|
||||
|
@ -23,13 +23,21 @@ import TimestampPresenter from './components/TimestampPresenter.svelte'
|
||||
import TableView from './components/TableView.svelte'
|
||||
import KanbanView from './components/KanbanView.svelte'
|
||||
|
||||
import { getClient } from '@anticrm/presentation'
|
||||
import { getClient, MessageBox } from '@anticrm/presentation'
|
||||
import { showPopup } from '@anticrm/ui'
|
||||
|
||||
export { TableView }
|
||||
|
||||
async function Delete(object: Doc): Promise<void> {
|
||||
const client = getClient()
|
||||
await client.removeDoc(object._class, object.space, object._id)
|
||||
function Delete(object: Doc): void {
|
||||
showPopup(MessageBox, {
|
||||
label: 'Delete object',
|
||||
message: 'Do you want to delete this object?'
|
||||
}, undefined, (result) => {
|
||||
if (result) {
|
||||
const client = getClient()
|
||||
client.removeDoc(object._class, object.space, object._id)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export default async () => ({
|
||||
|
@ -79,15 +79,7 @@
|
||||
</div>
|
||||
{#if navigator}
|
||||
<div class="panel-navigator">
|
||||
<NavHeader label={'Chat'} action={() => {
|
||||
showPopup(MessageBox, {
|
||||
label: 'Dialog title',
|
||||
message: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor anem isto orem ipsum dolor sit amet?'
|
||||
}, undefined, (result) => {
|
||||
if (result && result === 'OK') console.log('MessageBox - Ok!')
|
||||
else console.log('MessageBox - Cancel')
|
||||
})
|
||||
}} />
|
||||
<NavHeader label={'Chat'} action={() => {}} />
|
||||
<Navigator model={navigatorModel}/>
|
||||
</div>
|
||||
{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user