UBER-537: review support in inbox (#3471)

Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
Vyacheslav Tumanov 2023-06-29 22:10:38 +05:00 committed by GitHub
parent 090348fc47
commit d17918932b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 55 additions and 18 deletions

View File

@ -125,6 +125,18 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
} }
], ],
[taskModel, taskId], [taskModel, taskId],
[
calendarModel,
calendarId,
{
label: calendar.string.ConfigLabel,
description: calendar.string.ConfigDescription,
enabled: false,
beta: true,
icon: calendar.icon.Calendar,
classFilter: defaultFilter
}
],
[ [
recruitModel, recruitModel,
recruitId, recruitId,
@ -237,18 +249,6 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
classFilter: defaultFilter classFilter: defaultFilter
} }
], ],
[
calendarModel,
calendarId,
{
label: calendar.string.ConfigLabel,
description: calendar.string.ConfigDescription,
enabled: false,
beta: true,
icon: calendar.icon.Calendar,
classFilter: defaultFilter
}
],
[ [
bitrixModel, bitrixModel,
bitrixId, bitrixId,
@ -284,8 +284,8 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
[serverTagsModel, serverTagsId], [serverTagsModel, serverTagsId],
[serverTaskModel, serverTaskId], [serverTaskModel, serverTaskId],
[serverTrackerModel, serverTrackerId], [serverTrackerModel, serverTrackerId],
[serverRecruitModel, serverRecruitId],
[serverCalendarModel, serverCalendarId], [serverCalendarModel, serverCalendarId],
[serverRecruitModel, serverRecruitId],
[serverGmailModel, serverGmailId], [serverGmailModel, serverGmailId],
[serverTelegramModel, serverTelegramId], [serverTelegramModel, serverTelegramId],
[serverHrModel, serverHrId], [serverHrModel, serverHrId],

View File

@ -72,9 +72,11 @@ export default mergeIds(recruitId, recruit, {
ids: { ids: {
VacancyNotificationGroup: '' as Ref<NotificationGroup>, VacancyNotificationGroup: '' as Ref<NotificationGroup>,
CandidateNotificationGroup: '' as Ref<NotificationGroup>, CandidateNotificationGroup: '' as Ref<NotificationGroup>,
ReviewNotificationGroup: '' as Ref<NotificationGroup>,
ApplicationNotificationGroup: '' as Ref<NotificationGroup>, ApplicationNotificationGroup: '' as Ref<NotificationGroup>,
AssigneeNotification: '' as Ref<NotificationType>, AssigneeNotification: '' as Ref<NotificationType>,
ApplicationCreateNotification: '' as Ref<NotificationType> ApplicationCreateNotification: '' as Ref<NotificationType>,
ReviewCreateNotification: '' as Ref<NotificationType>
}, },
component: { component: {
CreateApplication: '' as AnyComponent, CreateApplication: '' as AnyComponent,

View File

@ -7,6 +7,8 @@ import view, { createAction } from '@hcengineering/model-view'
import { Review } from '@hcengineering/recruit' import { Review } from '@hcengineering/recruit'
import { BuildModelKey } from '@hcengineering/view' import { BuildModelKey } from '@hcengineering/view'
import recruit from './plugin' import recruit from './plugin'
import notification from '@hcengineering/notification'
import { generateClassNotificationTypes } from '@hcengineering/model-notification'
export const reviewTableOptions: FindOptions<Review> = { export const reviewTableOptions: FindOptions<Review> = {
lookup: { lookup: {
@ -113,6 +115,36 @@ export function createReviewModel (builder: Builder): void {
}, },
recruit.viewlet.CalendarReview recruit.viewlet.CalendarReview
) )
builder.createDoc(
notification.class.NotificationGroup,
core.space.Model,
{
label: recruit.string.Review,
icon: recruit.icon.Reviews,
objectClass: recruit.class.Review
},
recruit.ids.ReviewNotificationGroup
)
generateClassNotificationTypes(builder, recruit.class.Review, recruit.ids.ReviewNotificationGroup, [], ['comments'])
builder.createDoc(
notification.class.NotificationType,
core.space.Model,
{
hidden: false,
generated: false,
label: recruit.string.NewReview,
group: recruit.ids.ReviewNotificationGroup,
txClasses: [core.class.TxCreateDoc],
objectClass: recruit.class.Review,
providers: {
[notification.providers.PlatformNotification]: true
}
},
recruit.ids.ReviewCreateNotification
)
} }
function createTableViewlet (builder: Builder): void { function createTableViewlet (builder: Builder): void {

View File

@ -13,7 +13,7 @@
"VacancyPlaceholder": "Software Engineer", "VacancyPlaceholder": "Software Engineer",
"CreateAnApplication": "New Application", "CreateAnApplication": "New Application",
"NoApplicationsForTalent": "There are no applications for this talent.", "NoApplicationsForTalent": "There are no applications for this talent.",
"NoApplicationsForVacany": "There are no applications for this vacancy.", "NoApplicationsForVacancy": "There are no applications for this vacancy.",
"CreateApplication": "New Application", "CreateApplication": "New Application",
"ApplicationCreateLabel": "Application", "ApplicationCreateLabel": "Application",
"SelectVacancy": "Select vacancy", "SelectVacancy": "Select vacancy",
@ -64,6 +64,7 @@
"Reviews": "Reviews", "Reviews": "Reviews",
"Review": "Review", "Review": "Review",
"ReviewCreateLabel": "Review", "ReviewCreateLabel": "Review",
"NewReview": "New Review",
"Opinions": "Opinions", "Opinions": "Opinions",
"Opinion": "Opinion", "Opinion": "Opinion",
"OpinionValue": "Rating", "OpinionValue": "Rating",

View File

@ -13,7 +13,7 @@
"VacancyPlaceholder": "Разработчик", "VacancyPlaceholder": "Разработчик",
"CreateAnApplication": "Новый Кандидат", "CreateAnApplication": "Новый Кандидат",
"NoApplicationsForTalent": "Нет кандидатов для данного таланта.", "NoApplicationsForTalent": "Нет кандидатов для данного таланта.",
"NoApplicationsForVacany": "Нет кандидатов для данной вакансии.", "NoApplicationsForVacancy": "Нет кандидатов для данной вакансии.",
"CreateApplication": "Новый Кандидат", "CreateApplication": "Новый Кандидат",
"SelectVacancy": "Выбрать вакансию", "SelectVacancy": "Выбрать вакансию",
"Talent": "Талант", "Talent": "Талант",
@ -65,6 +65,7 @@
"Reviews": "Ревью", "Reviews": "Ревью",
"Review": "Ревью", "Review": "Ревью",
"ReviewCreateLabel": "Ревью", "ReviewCreateLabel": "Ревью",
"NewReview": "Новое Ревью",
"Opinions": "Мнения", "Opinions": "Мнения",
"Opinion": "Мнение", "Opinion": "Мнение",
"OpinionValue": "Значение", "OpinionValue": "Значение",

View File

@ -98,7 +98,7 @@
<FileDuo size={'large'} /> <FileDuo size={'large'} />
</div> </div>
<span class="content-dark-color"> <span class="content-dark-color">
<Label label={recruit.string.NoApplicationsForVacany} /> <Label label={recruit.string.NoApplicationsForVacancy} />
</span> </span>
<span class="over-underline content-color" on:click={createApp}> <span class="over-underline content-color" on:click={createApp}>
<Label label={recruit.string.CreateAnApplication} /> <Label label={recruit.string.CreateAnApplication} />

View File

@ -40,7 +40,7 @@ export default mergeIds(recruitId, recruit, {
CandidatesDescription: '' as IntlString, CandidatesDescription: '' as IntlString,
CreateAnApplication: '' as IntlString, CreateAnApplication: '' as IntlString,
NoApplicationsForTalent: '' as IntlString, NoApplicationsForTalent: '' as IntlString,
NoApplicationsForVacany: '' as IntlString, NoApplicationsForVacancy: '' as IntlString,
FirstName: '' as IntlString, FirstName: '' as IntlString,
LastName: '' as IntlString, LastName: '' as IntlString,
Talents: '' as IntlString, Talents: '' as IntlString,
@ -91,6 +91,7 @@ export default mergeIds(recruitId, recruit, {
Review: '' as IntlString, Review: '' as IntlString,
ReviewCreateLabel: '' as IntlString, ReviewCreateLabel: '' as IntlString,
NewReview: '' as IntlString,
CreateReview: '' as IntlString, CreateReview: '' as IntlString,
CreateReviewParams: '' as IntlString, CreateReviewParams: '' as IntlString,
Reviews: '' as IntlString, Reviews: '' as IntlString,