From 6e44e556f6ee8a3f31de2700b5b75b93b12a465b Mon Sep 17 00:00:00 2001 From: Alexey Zinoviev Date: Tue, 1 Aug 2023 11:40:47 +0400 Subject: [PATCH] ezqms-241: account for parent classes configurations in list view (#3537) Signed-off-by: Alexey Zinoviev --- .../src/components/list/ListCategory.svelte | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/plugins/view-resources/src/components/list/ListCategory.svelte b/plugins/view-resources/src/components/list/ListCategory.svelte index 275ff166a2..3f82f9861c 100644 --- a/plugins/view-resources/src/components/list/ListCategory.svelte +++ b/plugins/view-resources/src/components/list/ListCategory.svelte @@ -349,6 +349,27 @@ } const listItems: ListItem[] = [] + + function getDocItemModel (docClass: Ref>): 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 [] + }