We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f3022f commit 80c40baCopy full SHA for 80c40ba
src/components/workflow/workflow.service.ts
@@ -150,11 +150,11 @@ export const WorkflowService = <W extends Workflow>(workflow: () => W) => {
150
return WorkflowServiceClass;
151
};
152
153
-export const findTransition = <T extends { key: ID }>(
+export const findTransition = <T extends { key: ID; disabled?: boolean }>(
154
transitions: readonly T[],
155
needle: ExecuteTransitionInput['transition'],
156
) => {
157
- const transition = transitions.find((t) => t.key === needle);
+ const transition = transitions.find((t) => t.key === needle && !t.disabled);
158
if (!transition) {
159
throw new UnauthorizedException('This transition is not available');
160
}
0 commit comments