mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-26 04:23:58 +03:00
ezqms-241: account for parent classes configurations in list view (#3537)
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
parent
2781082f81
commit
6e44e556f6
@ -349,6 +349,27 @@
|
||||
}
|
||||
|
||||
const listItems: ListItem[] = []
|
||||
|
||||
function getDocItemModel (docClass: Ref<Class<Doc>>): AttributeModel[] {
|
||||
let res = itemModels.get(docClass)
|
||||
if (res) {
|
||||
return res
|
||||
}
|
||||
|
||||
try {
|
||||
for (const ac of client.getHierarchy().getAncestors(docClass)) {
|
||||
res = itemModels.get(ac)
|
||||
|
||||
if (res) {
|
||||
return res
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
// suppress
|
||||
}
|
||||
|
||||
return []
|
||||
}
|
||||
</script>
|
||||
|
||||
<div
|
||||
@ -429,7 +450,7 @@
|
||||
<ListItem
|
||||
bind:this={listItems[i]}
|
||||
{docObject}
|
||||
model={itemModels.get(docObject._class) ?? []}
|
||||
model={getDocItemModel(docObject._class)}
|
||||
{groupByKey}
|
||||
selected={isSelected(docObject, $focusStore)}
|
||||
checked={selectedObjectIdsSet.has(docObject._id)}
|
||||
|
Loading…
Reference in New Issue
Block a user