feat: select governed workflow scope targets

This commit is contained in:
2026-07-29 14:32:54 +02:00
parent b015569b5e
commit c45e2b808c
7 changed files with 194 additions and 26 deletions
+17 -1
View File
@@ -1,4 +1,9 @@
import { apiFetch, type ApiSettings } from "@govoplan/core-webui";
import {
apiFetch,
apiReferenceOptionProvider,
type ApiSettings,
type ReferenceOptionProvider
} from "@govoplan/core-webui";
import type {
DefinitionGraph,
DefinitionGraphNode,
@@ -216,3 +221,14 @@ export function validateWorkflowDefinition(
body: JSON.stringify({ graph })
});
}
export function workflowScopeReferenceProvider(
settings: ApiSettings,
scopeType: "user" | "group"
): ReferenceOptionProvider {
return apiReferenceOptionProvider(
settings,
"/api/v1/workflow/scope-targets",
{ scope_type: scopeType }
);
}