From 8a41433171f3ba7d72640ead42c7e98dd42c2dbb Mon Sep 17 00:00:00 2001 From: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com> Date: Wed, 29 Jun 2022 13:00:26 +0600 Subject: [PATCH] Declare index fix (#2166) Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com> --- models/hr/src/index.ts | 4 ++++ models/recruit/src/index.ts | 2 ++ 2 files changed, 6 insertions(+) diff --git a/models/hr/src/index.ts b/models/hr/src/index.ts index 9b52fc33d7..f87c500068 100644 --- a/models/hr/src/index.ts +++ b/models/hr/src/index.ts @@ -48,6 +48,7 @@ export const DOMAIN_HR = 'hr' as Domain @UX(hr.string.Department, hr.icon.Department) export class TDepartment extends TSpace implements Department { @Prop(TypeRef(hr.class.Department), hr.string.ParentDepartmentLabel) + @Index(IndexKind.Indexed) declare space: Ref @Prop(TypeString(), core.string.Name) @@ -98,11 +99,14 @@ export class TRequestType extends TDoc implements RequestType { @UX(hr.string.Request, hr.icon.PTO) export class TRequest extends TAttachedDoc implements Request { @Prop(TypeRef(hr.mixin.Staff), contact.string.Employee) + @Index(IndexKind.Indexed) declare attachedTo: Ref + @Index(IndexKind.Indexed) declare attachedToClass: Ref> @Prop(TypeRef(hr.class.Department), hr.string.Department) + @Index(IndexKind.Indexed) declare space: Ref @Prop(TypeRef(hr.class.RequestType), hr.string.RequestType) diff --git a/models/recruit/src/index.ts b/models/recruit/src/index.ts index 005b740f45..5ff8f110b4 100644 --- a/models/recruit/src/index.ts +++ b/models/recruit/src/index.ts @@ -107,10 +107,12 @@ export class TCandidate extends TPerson implements Candidate { export class TApplicant extends TTask implements Applicant { // We need to declare, to provide property with label @Prop(TypeRef(recruit.mixin.Candidate), recruit.string.Talent) + @Index(IndexKind.Indexed) declare attachedTo: Ref // We need to declare, to provide property with label @Prop(TypeRef(recruit.class.Vacancy), recruit.string.Vacancy) + @Index(IndexKind.Indexed) declare space: Ref @Prop(Collection(attachment.class.Attachment), attachment.string.Attachments, undefined, attachment.string.Files)