keycloak-scim/src/realm-settings/routes/Attribute.ts
agagancarczyk 4c70064bd4
Ream-settings -> User Profile -> Edit Attribute (#2343)
* edit attribute - wip

* edit attribute - wip

* edit attribute - wip

* edit attribute - wip

* edit attribute - wip

* edit attribute - wip

* edit attribute - wip

* edit attribute - wip

* edit attribute - wip

* edit attribute - wip

* edit attribute - wip

* edit attribute - wip

* edit attribute - wip

* edit attribute - wip

* edit attribute - wip

* edit attribute - wip

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* moved form initialisation to central place

* fixed loading values

Co-authored-by: Agnieszka Gancarczyk <agancarc@redhat.com>
Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
2022-03-31 14:28:48 +01:00

22 lines
690 B
TypeScript

import type { LocationDescriptorObject } from "history";
import { lazy } from "react";
import { generatePath } from "react-router-dom";
import type { RouteDef } from "../../route-config";
export type AttributeParams = {
realm: string;
attributeName: string;
};
export const AttributeRoute: RouteDef = {
path: "/:realm/realm-settings/userProfile/attributes/:attributeName/edit-attribute",
component: lazy(() => import("../NewAttributeSettings")),
breadcrumb: (t) => t("realm-settings:editAttribute"),
access: "manage-realm",
};
export const toAttribute = (
params: AttributeParams
): LocationDescriptorObject => ({
pathname: generatePath(AttributeRoute.path, params),
});