diff --git a/models/recruit/src/index.ts b/models/recruit/src/index.ts index 104bd158f8..21a59725df 100644 --- a/models/recruit/src/index.ts +++ b/models/recruit/src/index.ts @@ -1033,24 +1033,6 @@ export function createModel (builder: Builder): void { }, recruit.action.MoveApplicant ) - - createAction( - builder, - { - label: recruit.string.RecognizeAttachment, - action: recruit.actionImpl.MoveApplicant, - icon: view.icon.Move, - input: 'any', - category: view.category.General, - target: recruit.class.Applicant, - context: { - mode: ['context', 'browser'], - group: 'tools' - }, - override: [task.action.Move] - }, - recruit.action.MoveApplicant - ) } export { recruitOperation } from './migration' diff --git a/models/recruit/src/plugin.ts b/models/recruit/src/plugin.ts index 966d6bf6ba..f4f96bd6f7 100644 --- a/models/recruit/src/plugin.ts +++ b/models/recruit/src/plugin.ts @@ -14,7 +14,6 @@ // import type { Client, Doc, Ref } from '@hcengineering/core' -import { ObjectSearchCategory, ObjectSearchFactory } from '@hcengineering/model-presentation' import type { IntlString, Resource, Status } from '@hcengineering/platform' import { mergeIds } from '@hcengineering/platform' import { recruitId } from '@hcengineering/recruit' @@ -51,7 +50,6 @@ export default mergeIds(recruitId, recruit, { TalentPools: '' as IntlString, SearchApplication: '' as IntlString, SearchVacancy: '' as IntlString, - Application: '' as IntlString, AssignedRecruiter: '' as IntlString, Due: '' as IntlString, Source: '' as IntlString, @@ -63,8 +61,7 @@ export default mergeIds(recruitId, recruit, { GotoAssigned: '' as IntlString, GotoApplicants: '' as IntlString, GotoRecruitApplication: '' as IntlString, - VacancyList: '' as IntlString, - RecognizeAttachment: '' as IntlString + VacancyList: '' as IntlString }, validator: { ApplicantValidator: '' as Resource<(doc: T, client: Client) => Promise> @@ -100,12 +97,6 @@ export default mergeIds(recruitId, recruit, { DefaultVacancy: '' as Ref, Task: '' as Ref }, - completion: { - ApplicationQuery: '' as Resource, - ApplicationCategory: '' as Ref, - VacancyCategory: '' as Ref, - VacancyQuery: '' as Resource - }, viewlet: { TableCandidate: '' as Ref, TableVacancy: '' as Ref, diff --git a/models/recruit/src/review-model.ts b/models/recruit/src/review-model.ts index 7379e62d66..e6fbe8910b 100644 --- a/models/recruit/src/review-model.ts +++ b/models/recruit/src/review-model.ts @@ -7,7 +7,7 @@ import chunter from '@hcengineering/model-chunter' import contact from '@hcengineering/model-contact' import core, { TAttachedDoc } from '@hcengineering/model-core' import task from '@hcengineering/model-task' -import { Candidate, Opinion, Review } from '@hcengineering/recruit' +import { Applicant, Candidate, Opinion, Review } from '@hcengineering/recruit' import recruit from './plugin' @Model(recruit.class.Review, calendar.class.Event) @@ -24,6 +24,9 @@ export class TReview extends TEvent implements Review { @Index(IndexKind.FullText) verdict!: string + @Prop(TypeRef(recruit.class.Applicant), recruit.string.Application, { icon: recruit.icon.Application }) + application?: Ref + @Prop(TypeRef(contact.class.Organization), recruit.string.Company, { icon: contact.icon.Company }) company?: Ref diff --git a/plugins/recruit-assets/lang/en.json b/plugins/recruit-assets/lang/en.json index ca41ee6aad..648e68aa89 100644 --- a/plugins/recruit-assets/lang/en.json +++ b/plugins/recruit-assets/lang/en.json @@ -105,7 +105,8 @@ "Score": "Score", "Match": "Match", "PerformMatch": "Match", - "MoveApplication": "Move to another vacancy" + "MoveApplication": "Move to another vacancy", + "SearchVacancy": "Search vacancy..." }, "status": { "TalentRequired": "Please select talent", diff --git a/plugins/recruit-assets/lang/ru.json b/plugins/recruit-assets/lang/ru.json index dcd445d8be..1c700fbe9a 100644 --- a/plugins/recruit-assets/lang/ru.json +++ b/plugins/recruit-assets/lang/ru.json @@ -107,7 +107,8 @@ "Score": "Оценка", "Match": "Совпадение", "PerformMatch": "Сопоставить", - "MoveApplication": "Поменять Вакансию" + "MoveApplication": "Поменять Вакансию", + "SearchVacancy": "Найти вакансию..." }, "status": { "TalentRequired": "Пожалуйста выберите таланта", diff --git a/plugins/recruit-resources/src/components/ApplicationsPopup.svelte b/plugins/recruit-resources/src/components/ApplicationsPopup.svelte index ba06b5ec80..6650bf134f 100644 --- a/plugins/recruit-resources/src/components/ApplicationsPopup.svelte +++ b/plugins/recruit-resources/src/components/ApplicationsPopup.svelte @@ -23,7 +23,7 @@ diff --git a/plugins/recruit-resources/src/components/EditApplication.svelte b/plugins/recruit-resources/src/components/EditApplication.svelte index ee125b8a14..0ea9f6945e 100644 --- a/plugins/recruit-resources/src/components/EditApplication.svelte +++ b/plugins/recruit-resources/src/components/EditApplication.svelte @@ -60,7 +60,13 @@
- +
{/if} diff --git a/plugins/recruit-resources/src/components/review/CreateReview.svelte b/plugins/recruit-resources/src/components/review/CreateReview.svelte index cb35ca3bb2..7f9bac2a45 100644 --- a/plugins/recruit-resources/src/components/review/CreateReview.svelte +++ b/plugins/recruit-resources/src/components/review/CreateReview.svelte @@ -16,14 +16,15 @@ import calendar from '@hcengineering/calendar' import type { Contact, EmployeeAccount, Organization, Person } from '@hcengineering/contact' import contact from '@hcengineering/contact' - import { Account, Class, Client, Doc, generateId, getCurrentAccount, Ref, DateRangeMode } from '@hcengineering/core' + import { Account, Class, Client, DateRangeMode, Doc, generateId, getCurrentAccount, Ref } from '@hcengineering/core' import { getResource, OK, Resource, Severity, Status } from '@hcengineering/platform' import { Card, getClient, UserBox, UserBoxList } from '@hcengineering/presentation' - import type { Candidate, Review } from '@hcengineering/recruit' + import type { Applicant, Candidate, Review } from '@hcengineering/recruit' import task from '@hcengineering/task' import { StyledTextArea } from '@hcengineering/text-editor' import { DateRangePresenter, EditBox, Status as StatusControl } from '@hcengineering/ui' import view from '@hcengineering/view' + import { ObjectSearchBox } from '@hcengineering/view-resources' import { createEventDispatcher } from 'svelte' import recruit from '../../plugin' @@ -46,7 +47,9 @@ let startDate: number = initDate.getTime() let dueDate: number = initDate.getTime() + 30 * 60 * 1000 let location: string = '' - let company: Ref | undefined = undefined + + export let company: Ref | undefined = undefined + export let application: Ref | undefined = undefined const doc: Review = { number: 0, @@ -61,6 +64,7 @@ date: 0, dueDate: undefined, description, + application, company, verdict: '', title, @@ -106,6 +110,7 @@ title, participants: doc.participants, company, + application, location }) } @@ -169,6 +174,19 @@ label={recruit.string.Company} kind={'no-border'} size={'small'} + showNavigate={false} + create={{ component: contact.component.CreateOrganization, label: contact.string.CreateOrganization }} + /> + +
{ if (candidate !== undefined) { showPanel(view.component.EditDoc, candidate._id, Hierarchy.mixinOrClass(candidate), 'content') } }} > +
diff --git a/plugins/recruit-resources/src/components/review/Reviews.svelte b/plugins/recruit-resources/src/components/review/Reviews.svelte index 17f8e16757..7770a0a566 100644 --- a/plugins/recruit-resources/src/components/review/Reviews.svelte +++ b/plugins/recruit-resources/src/components/review/Reviews.svelte @@ -13,11 +13,12 @@ // limitations under the License. -->
(wSection = element.clientWidth)}> @@ -41,58 +58,34 @@
{#if reviews > 0} - {#if wSection < 640} - -
- - {:else} -
- {/if} + } + ]} + {options} + query={{ attachedTo: objectId }} + loadingProps={{ length: reviews }} + /> {:else}
@@ -101,6 +94,7 @@ + diff --git a/plugins/recruit-resources/src/plugin.ts b/plugins/recruit-resources/src/plugin.ts index 99871f019e..93b20f74a9 100644 --- a/plugins/recruit-resources/src/plugin.ts +++ b/plugins/recruit-resources/src/plugin.ts @@ -16,6 +16,7 @@ import { Client, Doc, Ref, Space } from '@hcengineering/core' import type { IntlString, Resource, StatusCode } from '@hcengineering/platform' import { mergeIds } from '@hcengineering/platform' +import { ObjectSearchCategory, ObjectSearchFactory } from '@hcengineering/presentation' import recruit, { recruitId } from '@hcengineering/recruit' import { TagCategory } from '@hcengineering/tags' import { AnyComponent } from '@hcengineering/ui' @@ -118,7 +119,8 @@ export default mergeIds(recruitId, recruit, { Score: '' as IntlString, Match: '' as IntlString, PerformMatch: '' as IntlString, - MoveApplication: '' as IntlString + MoveApplication: '' as IntlString, + Application: '' as IntlString }, space: { CandidatesPublic: '' as Ref @@ -127,6 +129,12 @@ export default mergeIds(recruitId, recruit, { Other: '' as Ref, Category: '' as Ref }, + completion: { + ApplicationQuery: '' as Resource, + ApplicationCategory: '' as Ref, + VacancyCategory: '' as Ref, + VacancyQuery: '' as Resource + }, component: { VacancyItemPresenter: '' as AnyComponent, VacancyCountPresenter: '' as AnyComponent, diff --git a/plugins/recruit/src/index.ts b/plugins/recruit/src/index.ts index d5de1b3aae..1deffb2c1f 100644 --- a/plugins/recruit/src/index.ts +++ b/plugins/recruit/src/index.ts @@ -111,6 +111,8 @@ export interface Review extends Event { verdict: string + application?: Ref + company?: Ref opinions?: number diff --git a/plugins/view-resources/src/components/ObjectSearchBox.svelte b/plugins/view-resources/src/components/ObjectSearchBox.svelte new file mode 100644 index 0000000000..4fc9a8542b --- /dev/null +++ b/plugins/view-resources/src/components/ObjectSearchBox.svelte @@ -0,0 +1,169 @@ + + + +
+ {#if $$slots.content} +
+ +
+ {:else} + + {/if} +
diff --git a/plugins/view-resources/src/index.ts b/plugins/view-resources/src/index.ts index 2b2a9b86cb..42e130f14b 100644 --- a/plugins/view-resources/src/index.ts +++ b/plugins/view-resources/src/index.ts @@ -94,6 +94,7 @@ export { default as LinkPresenter } from './components/LinkPresenter.svelte' export { default as List } from './components/list/List.svelte' export { default as ContextMenu } from './components/Menu.svelte' export { default as ObjectBox } from './components/ObjectBox.svelte' +export { default as ObjectSearchBox } from './components/ObjectSearchBox.svelte' export { default as ObjectPresenter } from './components/ObjectPresenter.svelte' export { default as TableBrowser } from './components/TableBrowser.svelte' export { default as ValueSelector } from './components/ValueSelector.svelte'