diff --git a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts index e9bc51488..ed66e61dc 100644 --- a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts +++ b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts @@ -552,6 +552,8 @@ export class WorkflowEditDialogComponent this.checkRemovalActionFields(this.objectForm.value) } + private allowedActionTypes: typeof WORKFLOW_ACTION_OPTIONS = null + private getAllowedActionTypes() { let allowed = WORKFLOW_ACTION_OPTIONS @@ -574,6 +576,13 @@ export class WorkflowEditDialogComponent allowed = allowed.filter((a) => a.id !== WorkflowActionType.RemoteOcr) } + if ( + this.allowedActionTypes?.length === allowed.length && + this.allowedActionTypes.every((a, i) => a.id === allowed[i].id) + ) { + return this.allowedActionTypes + } + this.allowedActionTypes = allowed return allowed }