mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 11:50:56 +00:00
initial CreateApplication
action
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
8149f57fd1
commit
a7a21b429f
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -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"
|
||||
}
|
||||
}
|
||||
|
@ -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'
|
||||
|
@ -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,
|
||||
|
@ -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
Loading…
Reference in New Issue
Block a user