fix flow status (#26685)

fixes: #26636

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
Erik Jan de Wit 2024-02-12 09:21:23 +01:00 committed by GitHub
parent c34ff84d6e
commit 39bd59cada
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 6 deletions

View file

@ -22,7 +22,7 @@ type BindingForm = {
type BindFlowDialogProps = {
flowAlias: string;
onClose: () => void;
onClose: (used?: boolean) => void;
};
export const BindFlowDialog = ({ flowAlias, onClose }: BindFlowDialogProps) => {
@ -44,7 +44,7 @@ export const BindFlowDialog = ({ flowAlias, onClose }: BindFlowDialogProps) => {
addError("updateFlowError", error);
}
onClose();
onClose(true);
};
const flowKeys = Array.from(REALM_FLOWS.keys());
@ -62,7 +62,7 @@ export const BindFlowDialog = ({ flowAlias, onClose }: BindFlowDialogProps) => {
data-testid="cancel"
key="cancel"
variant={ButtonVariant.link}
onClick={onClose}
onClick={() => onClose()}
>
{t("cancel")}
</Button>,

View file

@ -45,7 +45,7 @@ import {
LevelChange,
} from "./execution-model";
import { toAuthentication } from "./routes/Authentication";
import type { FlowParams } from "./routes/Flow";
import { toFlow, type FlowParams } from "./routes/Flow";
export const providerConditionFilter = (
value: AuthenticationProviderRepresentation,
@ -310,9 +310,16 @@ export default function FlowDetails() {
{bindFlowOpen && (
<BindFlowDialog
flowAlias={flow?.alias!}
onClose={() => {
onClose={(usedBy) => {
toggleBindFlow();
refresh();
navigate(
toFlow({
realm,
id: id!,
usedBy: usedBy ? "DEFAULT" : "notInUse",
builtIn: builtIn ? "builtIn" : undefined,
}),
);
}}
/>
)}