mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-23 00:37:47 +00:00
fix for mixins for grouping by custom attributes (#3898)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
416dc7a2af
commit
e158788f4e
@ -55,7 +55,15 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
const customAttributes = classes
|
const customAttributes = classes
|
||||||
.flatMap((c) => Array.from(client.getHierarchy().getOwnAttributes(c).values()))
|
.flatMap((c) => {
|
||||||
|
const hierarchy = client.getHierarchy()
|
||||||
|
return hierarchy.isMixin(c)
|
||||||
|
? [
|
||||||
|
...Array.from(hierarchy.getOwnAttributes(c).values()),
|
||||||
|
...Array.from(hierarchy.getOwnAttributes(hierarchy.getBaseClass(c)).values())
|
||||||
|
]
|
||||||
|
: Array.from(client.getHierarchy().getOwnAttributes(c).values())
|
||||||
|
})
|
||||||
.filter(
|
.filter(
|
||||||
(attr) => attr.isCustom && !attr.isHidden && [core.class.RefTo, core.class.EnumOf].includes(attr.type._class)
|
(attr) => attr.isCustom && !attr.isHidden && [core.class.RefTo, core.class.EnumOf].includes(attr.type._class)
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user