Fix redirection on remove all associated roles (#3160)
This commit is contained in:
parent
9e4ecc8a1b
commit
e74969b9e0
1 changed files with 15 additions and 2 deletions
|
@ -264,8 +264,7 @@ export default function RealmRoleTabs() {
|
|||
AlertVariant.success,
|
||||
t("compositesRemovedAlertDescription")
|
||||
);
|
||||
const loc = url.replace(/\/AssociatedRoles/g, "/details");
|
||||
navigate(loc);
|
||||
toDetail();
|
||||
refresh();
|
||||
} catch (error) {
|
||||
addError("roles:roleDeleteError", error);
|
||||
|
@ -281,6 +280,20 @@ export default function RealmRoleTabs() {
|
|||
ClientRoleRoute.path
|
||||
);
|
||||
|
||||
const toDetail = () => {
|
||||
const to = clientRoleRouteMatch
|
||||
? toClientRole({
|
||||
...clientRoleRouteMatch.params,
|
||||
tab: "details",
|
||||
})
|
||||
: toRealmRole({
|
||||
realm: realm?.realm!,
|
||||
id,
|
||||
tab: "details",
|
||||
});
|
||||
navigate(to);
|
||||
};
|
||||
|
||||
const toAssociatedRoles = () => {
|
||||
const to = clientRoleRouteMatch
|
||||
? toClientRole({
|
||||
|
|
Loading…
Reference in a new issue