Add Bitrix required mixins (#2713)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2023-03-06 22:44:51 +07:00
committed by GitHub
parent c6dd5a6619
commit 7997d34d17
5 changed files with 63 additions and 5 deletions
+4 -1
View File
@@ -1,5 +1,5 @@
import { ChannelProvider } from '@hcengineering/contact'
import { AttachedDoc, Class, Doc, Ref } from '@hcengineering/core'
import { AttachedDoc, Class, Doc, Mixin, Ref } from '@hcengineering/core'
import { ExpertKnowledge, InitialKnowledge, MeaningfullKnowledge } from '@hcengineering/tags'
/**
@@ -164,6 +164,9 @@ export interface BitrixEntityMapping extends Doc {
comments: boolean
activity: boolean
attachments: boolean
// If specified, will include this mixins in any case.
mixins?: Ref<Mixin<Doc>>[]
}
/**
* @public
+5
View File
@@ -114,6 +114,11 @@ export async function convert (
][] = []
const mixins: Record<Ref<Mixin<Doc>>, Data<Doc>> = {}
// Fill required mixins.
for (const m of entity.mixins ?? []) {
mixins[m] = {}
}
const syncRequests: BitrixSyncRequest[] = []
const extractValue = (field?: string, alternatives?: string[]): any | undefined => {