Declare index fix (#2166)

Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
This commit is contained in:
Denis Bykhov 2022-06-29 13:00:26 +06:00 committed by GitHub
parent 4d42059ec8
commit 8a41433171
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -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<Department>
@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<Staff>
@Index(IndexKind.Indexed)
declare attachedToClass: Ref<Class<Staff>>
@Prop(TypeRef(hr.class.Department), hr.string.Department)
@Index(IndexKind.Indexed)
declare space: Ref<Department>
@Prop(TypeRef(hr.class.RequestType), hr.string.RequestType)

View File

@ -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<Candidate>
// We need to declare, to provide property with label
@Prop(TypeRef(recruit.class.Vacancy), recruit.string.Vacancy)
@Index(IndexKind.Indexed)
declare space: Ref<Vacancy>
@Prop(Collection(attachment.class.Attachment), attachment.string.Attachments, undefined, attachment.string.Files)