mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-22 19:11:33 +03:00
ezqms-976: exclude other types mixins (#5795)
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
parent
83a1317c92
commit
617d835c4f
@ -58,13 +58,6 @@
|
||||
const notificationClient = getResource(notification.function.GetInboxNotificationsClient).then((res) => res())
|
||||
|
||||
const me = getCurrentAccount()._id
|
||||
// We need to think about this issue and redesign somehow?
|
||||
const ignoredMixins = [
|
||||
core.mixin.SpacesTypeData,
|
||||
documents.mixin.DocumentSpaceTypeData,
|
||||
'training:mixin:TrainingsTypeData' as any
|
||||
]
|
||||
|
||||
let object: Product | undefined
|
||||
let title = ''
|
||||
let showAllMixins = false
|
||||
@ -124,7 +117,24 @@
|
||||
checkMyPermission(core.permission.UpdateObject, core.space.Space, $permissionsStore))
|
||||
|
||||
$: descriptionKey = client.getHierarchy().getAttribute(products.class.Product, 'fullDescription')
|
||||
$: mixins = object !== undefined ? getDocMixins(object, showAllMixins, new Set(ignoredMixins)) : []
|
||||
$: otherSpaceTypesMixins = new Set(
|
||||
object !== undefined
|
||||
? client
|
||||
.getModel()
|
||||
.findAllSync(
|
||||
core.class.SpaceType,
|
||||
{
|
||||
_id: { $ne: object.type }
|
||||
},
|
||||
{
|
||||
projection: { targetClass: 1 }
|
||||
}
|
||||
)
|
||||
?.map((st) => st.targetClass) ?? []
|
||||
: []
|
||||
)
|
||||
$: mixins =
|
||||
object !== undefined ? getDocMixins(object, showAllMixins).filter((m) => !otherSpaceTypesMixins.has(m._id)) : []
|
||||
</script>
|
||||
|
||||
{#if object !== undefined}
|
||||
|
Loading…
Reference in New Issue
Block a user