Between criteria (#9901)

This commit is contained in:
Denis Bykhov
2025-09-21 18:47:59 +07:00
committed by GitHub
parent fa56d381f4
commit 7d1ecb60f0
19 changed files with 636 additions and 624 deletions
+8 -4
View File
@@ -50,9 +50,10 @@ import {
type Step,
type StepId,
type Transition,
type UpdateCriteriaComponent,
type UserResult
} from '@hcengineering/process'
import { type AnyComponent, showPopup } from '@hcengineering/ui'
import { showPopup } from '@hcengineering/ui'
import { type AttributeCategory } from '@hcengineering/view'
import process from './plugin'
@@ -638,17 +639,20 @@ export async function subProcessesDoneCheck (
return res === undefined
}
export function getCirteriaEditor (of: Ref<Class<Doc>>, category: AttributeCategory): AnyComponent | undefined {
export function getCirteriaEditor (
of: Ref<Class<Doc>>,
category: AttributeCategory
): UpdateCriteriaComponent | undefined {
const client = getClient()
if (category !== 'attribute') {
const res = client.getModel().findAllSync(process.class.UpdateCriteriaComponent, {
category
})[0]
return res?.editor
return res
}
const res = client.getModel().findAllSync(process.class.UpdateCriteriaComponent, {
category,
of
})[0]
return res?.editor
return res
}