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

View file

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