ATS-13: Copy ID action (#3533)

Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
Vyacheslav Tumanov 2023-07-29 14:20:25 +05:00 committed by GitHub
parent cef766c5a9
commit 98055e4dc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 38 additions and 5 deletions

View File

@ -1453,4 +1453,26 @@ export function createModel (builder: Builder): void {
},
recruit.action.MoveApplicant
)
createAction(
builder,
{
action: view.actionImpl.CopyTextToClipboard,
actionProps: {
textProvider: recruit.function.GetTalentId
},
label: recruit.string.GetTalentIds,
icon: view.icon.CopyId,
keyBinding: [],
input: 'any',
category: recruit.category.Recruit,
target: recruit.mixin.Candidate,
context: {
mode: ['context', 'browser'],
application: recruit.app.Recruit,
group: 'copy'
}
},
recruit.action.GetTalentIds
)
}

View File

@ -30,7 +30,8 @@ export default mergeIds(recruitId, recruit, {
CopyApplicationId: '' as Ref<Action>,
CopyApplicationLink: '' as Ref<Action>,
CopyCandidateLink: '' as Ref<Action>,
MoveApplicant: '' as Ref<Action>
MoveApplicant: '' as Ref<Action>,
GetTalentIds: '' as Ref<Action>
},
actionImpl: {
CreateOpinion: '' as ViewAction,
@ -42,7 +43,8 @@ export default mergeIds(recruitId, recruit, {
function: {
GetObjectLinkFragment: '' as Resource<(doc: Doc, props: Record<string, any>) => Promise<Location>>,
GetIdObjectLinkFragment: '' as Resource<(doc: Doc, props: Record<string, any>) => Promise<Location>>,
GetObjectLink: '' as Resource<(doc: Doc, props: Record<string, any>) => Promise<string>>
GetObjectLink: '' as Resource<(doc: Doc, props: Record<string, any>) => Promise<string>>,
GetTalentId: '' as Resource<(doc: Doc, props: Record<string, any>) => Promise<string>>
},
string: {
ApplicationsShort: '' as IntlString,

View File

@ -117,7 +117,8 @@
"ConfigDescription": "Extension to manage Talents/Applicants and Vacancies.",
"MyApplications": "My applications",
"ShowApplications": "Show applications"
"ShowApplications": "Show applications",
"GetTalentIds": "Get talents' ids"
},
"status": {
"ApplicationExists": "Application already exists",

View File

@ -117,7 +117,8 @@
"ConfigDescription": "Модуль по работе с талантами/кандидатами и вакансиями",
"MyApplications": "Мои кандидаты",
"ShowApplications": "Показать кандидатов"
"ShowApplications": "Показать кандидатов",
"GetTalentIds": "Получить ID талантов"
},
"status": {
"ApplicationExists": "Кандидат уже существует",

View File

@ -70,6 +70,7 @@ import {
getRevTitle,
getSequenceId,
getSequenceLink,
getTalentId,
getVacTitle,
objectLinkProvider,
resolveLocation
@ -335,6 +336,7 @@ export default async (): Promise<Resources> => ({
VacTitleProvider: getVacTitle,
RevTitleProvider: getRevTitle,
IdProvider: getSequenceId,
GetTalentId: getTalentId,
HasActiveApplicant: hasActiveApplicant,
HasNoActiveApplicant: hasNoActiveApplicant,
NoneApplications: noneApplicant,

View File

@ -131,7 +131,8 @@ export default mergeIds(recruitId, recruit, {
TemplateReplaceConfirm: '' as IntlString,
Apply: '' as IntlString,
OpenVacancyList: '' as IntlString,
Export: '' as IntlString
Export: '' as IntlString,
GetTalentIds: '' as IntlString
},
space: {
CandidatesPublic: '' as Ref<Space>

View File

@ -196,3 +196,7 @@ export async function getSequenceId (doc: RecruitDocument): Promise<string> {
return label !== undefined ? `${label}-${doc.number}` : doc.number.toString()
}
export async function getTalentId (doc: Candidate): Promise<string> {
return doc._id
}