V13-FE-011: finalize search list layout slice
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
|
||||
import type { KbxStatusSemantic } from './status'
|
||||
|
||||
export interface KbxWorkflowStateDefinition {
|
||||
value: string
|
||||
label: string
|
||||
semantic: KbxStatusSemantic
|
||||
terminal?: boolean
|
||||
}
|
||||
|
||||
export interface KbxWorkflowTransitionDefinition {
|
||||
id: string
|
||||
from: string[]
|
||||
to: string
|
||||
label: string
|
||||
permission?: string
|
||||
confirm?: boolean
|
||||
reasonRequired?: boolean
|
||||
}
|
||||
|
||||
export interface KbxWorkflowDefinition {
|
||||
id: string
|
||||
version: string
|
||||
states: KbxWorkflowStateDefinition[]
|
||||
transitions: KbxWorkflowTransitionDefinition[]
|
||||
}
|
||||
|
||||
export function allowedKbxTransitions(workflow: KbxWorkflowDefinition, current: string) {
|
||||
return workflow.transitions.filter(x => x.from.includes(current))
|
||||
}
|
||||
Reference in New Issue
Block a user