initial CreateApplication action

Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
Andrey Platov 2021-09-25 20:33:36 +02:00
parent 8149f57fd1
commit a7a21b429f
No known key found for this signature in database
GPG Key ID: C8787EFEB4B64AF0
7 changed files with 825 additions and 708 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -29,6 +29,7 @@
"@anticrm/recruit": "~0.6.0",
"@anticrm/recruit-resources": "~0.6.0",
"@anticrm/chunter": "~0.6.0",
"@anticrm/model-chunter": "~0.6.0"
"@anticrm/model-chunter": "~0.6.0",
"@anticrm/view": "~0.6.0"
}
}

View File

@ -148,6 +148,17 @@ export function createModel (builder: Builder): void {
builder.mixin(recruit.class.Candidate, core.class.Class, view.mixin.ObjectEditor, {
editor: recruit.component.EditCandidate
})
builder.createDoc(view.class.Action, core.space.Model, {
label: 'Create Application' as IntlString,
icon: view.icon.Table,
action: recruit.actionImpl.CreateApplication
}, recruit.action.CreateApplication)
builder.createDoc(view.class.ActionTarget, core.space.Model, {
target: recruit.class.Candidate,
action: recruit.action.CreateApplication
})
}
export { default } from './plugin'

View File

@ -14,13 +14,20 @@
//
import { mergeIds } from '@anticrm/platform'
import type { IntlString } from '@anticrm/platform'
import type { Ref, Space } from '@anticrm/core'
import type { IntlString, Resource } from '@anticrm/platform'
import type { Ref, Space, Doc } from '@anticrm/core'
import type { AnyComponent } from '@anticrm/ui'
import type { Action } from '@anticrm/view'
import { recruitId } from '@anticrm/recruit'
import recruit from '@anticrm/recruit-resources/src/plugin'
export default mergeIds(recruitId, recruit, {
action: {
CreateApplication: '' as Ref<Action>
},
actionImpl: {
CreateApplication: '' as Resource<(object: Doc) => Promise<void>>
},
string: {
RecruitApplication: '' as IntlString,
Vacancies: '' as IntlString,

View File

@ -13,6 +13,8 @@
// limitations under the License.
//
import type { Doc } from '@anticrm/core'
import CreateVacancy from './components/CreateVacancy.svelte'
import CreateCandidates from './components/CreateCandidates.svelte'
import CreateCandidate from './components/CreateCandidate.svelte'
@ -24,7 +26,16 @@ import KanbanCard from './components/KanbanCard.svelte'
import CreateApplicationPresenter from './components/CreateApplicationPresenter.svelte'
import ApplicationPresenter from './components/ApplicationPresenter.svelte'
import { showPopup } from '@anticrm/ui'
async function createApplication(object: Doc): Promise<void> {
showPopup(CreateApplication, { candidate: object._id, preserveCandidate: true })
}
export default async () => ({
actionImpl: {
CreateApplication: createApplication
},
component: {
CreateVacancy,
CreateCandidates,

File diff suppressed because it is too large Load Diff