diff --git a/models/contact/package.json b/models/contact/package.json index 51fc94cac1..cdab99018b 100644 --- a/models/contact/package.json +++ b/models/contact/package.json @@ -26,6 +26,7 @@ }, "dependencies": { "@anticrm/model-core": "~0.6.0", + "@anticrm/model-chunter": "~0.6.0", "@anticrm/model-workbench": "~0.6.0", "@anticrm/model-attachment": "~0.6.0", "@anticrm/model-view": "~0.6.0", diff --git a/models/lead/src/index.ts b/models/lead/src/index.ts index 6753c96a26..140625ea2b 100644 --- a/models/lead/src/index.ts +++ b/models/lead/src/index.ts @@ -19,7 +19,7 @@ import type { Contact } from '@anticrm/contact' import type { Doc, FindOptions, Ref } from '@anticrm/core' import type { Funnel, Lead } from '@anticrm/lead' import { createKanban } from '@anticrm/lead' -import { Builder, Model, Prop, TypeRef, TypeString, UX } from '@anticrm/model' +import { Builder, Collection, Model, Prop, TypeRef, TypeString, UX } from '@anticrm/model' import attachment from '@anticrm/model-attachment' import chunter from '@anticrm/model-chunter' import contact from '@anticrm/model-contact' @@ -44,10 +44,10 @@ export class TLead extends TTask implements Lead { @Prop(TypeRef(contact.class.Contact), lead.string.Customer) customer!: Ref - @Prop(TypeString(), 'Comments' as IntlString) + @Prop(Collection(chunter.class.Comment), 'Comments' as IntlString) comments?: number - @Prop(TypeString(), 'Attachments' as IntlString) + @Prop(Collection(attachment.class.Attachment), 'Attachments' as IntlString) attachments?: number } diff --git a/models/recruit/src/index.ts b/models/recruit/src/index.ts index 18602a406b..8dc507243a 100644 --- a/models/recruit/src/index.ts +++ b/models/recruit/src/index.ts @@ -33,7 +33,7 @@ export class TVacancy extends TSpaceWithStates implements Vacancy { @Prop(TypeString(), 'Full description' as IntlString) fullDescription?: string - @Prop(TypeString(), 'Attachments' as IntlString) + @Prop(Collection(attachment.class.Attachment), 'Attachments' as IntlString) attachments?: number @Prop(TypeDate(), 'Due date' as IntlString, recruit.icon.Calendar) @@ -76,10 +76,10 @@ export class TApplicant extends TTask implements Applicant { @Prop(TypeRef(recruit.class.Candidate), 'Candidate' as IntlString) declare attachedTo: Ref - @Prop(TypeString(), 'Attachments' as IntlString) + @Prop(Collection(attachment.class.Attachment), 'Attachments' as IntlString) attachments?: number - @Prop(TypeString(), 'Comments' as IntlString) + @Prop(Collection(chunter.class.Comment), 'Comments' as IntlString) comments?: number @Prop(TypeRef(contact.class.Employee), 'Assigned recruiter' as IntlString) diff --git a/models/task/src/index.ts b/models/task/src/index.ts index 166338a7df..543b68b1fc 100644 --- a/models/task/src/index.ts +++ b/models/task/src/index.ts @@ -97,10 +97,10 @@ export class TIssue extends TTask implements Issue { @Prop(TypeString(), 'Description' as IntlString) description!: string - @Prop(TypeString(), 'Comments' as IntlString) + @Prop(Collection(chunter.class.Comment), 'Comments' as IntlString) comments!: number - @Prop(TypeString(), 'Attachments' as IntlString) + @Prop(Collection(attachment.class.Attachment), 'Attachments' as IntlString) attachments!: number @Prop(TypeString(), 'Labels' as IntlString)