mirror of
https://github.com/hcengineering/platform.git
synced 2026-10-01 22:15:04 +02:00
filter automation processes in visibility check (#10832)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -959,6 +959,9 @@ export function getMockAttribute (_class: Ref<Class<Doc>>, label: IntlString, ty
|
||||
export async function checkProcessSectionVisibility (doc: Card): Promise<boolean> {
|
||||
const client = getClient()
|
||||
const anc = client.getHierarchy().getAncestors(doc._class)
|
||||
const processes = client.getModel().findAllSync(process.class.Process, { masterTag: { $in: anc } })
|
||||
const processes = client.getModel().findAllSync(process.class.Process, {
|
||||
masterTag: { $in: anc },
|
||||
automationOnly: { $ne: true }
|
||||
})
|
||||
return processes.length > 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user