clean up types
This commit is contained in:
parent
b3f8c45ddc
commit
7b22ac4659
2 changed files with 4 additions and 5 deletions
|
@ -33,7 +33,7 @@ export const AssociatedRolesModal = (props: AssociatedRolesModalProps) => {
|
||||||
const { t } = useTranslation("roles");
|
const { t } = useTranslation("roles");
|
||||||
const [name, setName] = useState("");
|
const [name, setName] = useState("");
|
||||||
const adminClient = useAdminClient();
|
const adminClient = useAdminClient();
|
||||||
const [selectedRows, setSelectedRows] = useState<Role[]>([]);
|
const [selectedRows, setSelectedRows] = useState<RoleRepresentation[]>([]);
|
||||||
const errorHandler = useErrorHandler();
|
const errorHandler = useErrorHandler();
|
||||||
|
|
||||||
const [isFilterDropdownOpen, setIsFilterDropdownOpen] = useState(false);
|
const [isFilterDropdownOpen, setIsFilterDropdownOpen] = useState(false);
|
||||||
|
@ -69,10 +69,10 @@ export const AssociatedRolesModal = (props: AssociatedRolesModalProps) => {
|
||||||
)!.clientId!)
|
)!.clientId!)
|
||||||
);
|
);
|
||||||
|
|
||||||
return alphabetize(filterDupes).filter((role: Role) => {
|
return alphabetize(filterDupes).filter((role: RoleRepresentation) => {
|
||||||
return (
|
return (
|
||||||
props.existingCompositeRoles.find(
|
props.existingCompositeRoles.find(
|
||||||
(existing: Role) => existing.name === role.name
|
(existing: RoleRepresentation) => existing.name === role.name
|
||||||
) === undefined && role.name !== name
|
) === undefined && role.name !== name
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -170,7 +170,6 @@ export const AssociatedRolesModal = (props: AssociatedRolesModalProps) => {
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.toggleDialog();
|
props.toggleDialog();
|
||||||
props.onConfirm(selectedRows);
|
props.onConfirm(selectedRows);
|
||||||
console.log(selectedRows);
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t("common:add")}
|
{t("common:add")}
|
||||||
|
|
|
@ -134,7 +134,7 @@ export const AssociatedRolesTab = ({
|
||||||
refresh();
|
refresh();
|
||||||
}, [additionalRoles, isInheritedHidden]);
|
}, [additionalRoles, isInheritedHidden]);
|
||||||
|
|
||||||
const InheritedRoleName = (role: Role) => {
|
const InheritedRoleName = (role: RoleRepresentation) => {
|
||||||
return <>{inheritanceMap.current[role.id!]}</>;
|
return <>{inheritanceMap.current[role.id!]}</>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue