mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-11 20:27:43 +02:00
TSK-1189: Fix showing all available categories (#2987)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
ActionContext,
|
||||
focusStore,
|
||||
getCategories,
|
||||
getCategorySpaces,
|
||||
getGroupByValues,
|
||||
getPresenter,
|
||||
groupBy,
|
||||
@@ -167,9 +168,15 @@
|
||||
const categoryFunc = viewOption as CategoryOption
|
||||
if (viewOptions[viewOption.key] ?? viewOption.defaultValue) {
|
||||
const categoryAction = await getResource(categoryFunc.action)
|
||||
|
||||
const spaces = getCategorySpaces(categories)
|
||||
if (space !== undefined) {
|
||||
spaces.push(space)
|
||||
}
|
||||
|
||||
const res = await categoryAction(
|
||||
_class,
|
||||
space ? { space } : {},
|
||||
spaces.length > 0 ? { space: { $in: Array.from(spaces.values()) } } : {},
|
||||
groupByKey,
|
||||
update,
|
||||
queryId,
|
||||
|
||||
Reference in New Issue
Block a user