mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-31 23:46:12 +03:00
Fix Candidate attachedToClass migration and add DoneState to Applicants (#817)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
cab04d037d
commit
0e12210e8e
@ -16,7 +16,10 @@
|
||||
import { Person } from '@anticrm/contact'
|
||||
import core, { AttachedDoc, Class, Doc, DOMAIN_TX, MixinData, Ref, TxCollectionCUD, TxCreateDoc, TxMixin, TxUpdateDoc } from '@anticrm/core'
|
||||
import { MigrateOperation, MigrationClient, MigrationResult, MigrationUpgradeClient } from '@anticrm/model'
|
||||
import { DOMAIN_ATTACHMENT } from '@anticrm/model-attachment'
|
||||
import { DOMAIN_COMMENT } from '@anticrm/model-chunter'
|
||||
import contact, { DOMAIN_CONTACT } from '@anticrm/model-contact'
|
||||
import { DOMAIN_TASK } from '@anticrm/model-task'
|
||||
import recruit, { Candidate } from '@anticrm/recruit'
|
||||
|
||||
function toCandidateData (c: Pick<Candidate, 'onsite'|'title'|'remote'|'source'> | undefined): MixinData<Person, Candidate> {
|
||||
@ -61,6 +64,30 @@ export const recruitOperation: MigrateOperation = {
|
||||
_class: contact.class.Person
|
||||
})
|
||||
|
||||
await client.update(DOMAIN_TASK, {
|
||||
attachedToClass: 'recruit:class:Candidate' as Ref<Class<Doc>>
|
||||
}, {
|
||||
attachedToClass: recruit.mixin.Candidate
|
||||
})
|
||||
|
||||
await client.update(DOMAIN_ATTACHMENT, {
|
||||
attachedToClass: 'recruit:class:Candidate' as Ref<Class<Doc>>
|
||||
}, {
|
||||
attachedToClass: recruit.mixin.Candidate
|
||||
})
|
||||
|
||||
await client.update(DOMAIN_ATTACHMENT, {
|
||||
attachedToClass: 'recruit:class:Candidate' as Ref<Class<Doc>>
|
||||
}, {
|
||||
attachedToClass: recruit.mixin.Candidate
|
||||
})
|
||||
|
||||
await client.update(DOMAIN_COMMENT, {
|
||||
attachedToClass: 'recruit:class:Candidate' as Ref<Class<Doc>>
|
||||
}, {
|
||||
attachedToClass: recruit.mixin.Candidate
|
||||
})
|
||||
|
||||
// Migrate Create operations.
|
||||
await client.update(DOMAIN_TX, {
|
||||
_class: core.class.TxCreateDoc,
|
||||
|
@ -41,12 +41,13 @@
|
||||
{#if applications > 0}
|
||||
<Table
|
||||
_class={recruit.class.Applicant}
|
||||
config={['', '$lookup.space.name', '$lookup.state']}
|
||||
config={['', '$lookup.space.name', '$lookup.state', '$lookup.doneState']}
|
||||
options={
|
||||
{
|
||||
lookup: {
|
||||
state: task.class.State,
|
||||
space: core.class.Space
|
||||
space: core.class.Space,
|
||||
doneState: task.class.DoneState
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user