keycloak-scim/src/clients/authorization/policy/Aggregate.tsx
Erik Jan de Wit 109c255d90
Added the policy screens (#1884)
* initial policies tab

* added initial edit create screen

* removed switch in favour of mapping list

* added pickers

* added groups

* added regex

* added role select component

* added time

* added js type

* fixed create route

* fixed details

* added tests

* changed table header to required

* added user type

* added missing validation message
2022-01-21 15:10:36 +01:00

36 lines
1 KiB
TypeScript

import React from "react";
import { useTranslation } from "react-i18next";
import { useParams } from "react-router-dom";
import { FormGroup } from "@patternfly/react-core";
import type { PolicyDetailsParams } from "../../routes/PolicyDetails";
import { HelpItem } from "../../../components/help-enabler/HelpItem";
import { ResourcesPolicySelect } from "../ResourcesPolicySelect";
import { DecisionStrategySelect } from "../DecisionStragegySelect";
export const Aggregate = () => {
const { t } = useTranslation("clients");
const { id } = useParams<PolicyDetailsParams>();
return (
<>
<FormGroup
label={t("applyPolicy")}
fieldId="policies"
labelIcon={
<HelpItem
helpText="clients-help:applyPolicy"
fieldLabelId="clients:policies"
/>
}
>
<ResourcesPolicySelect
name="policies"
searchFunction="listPolicies"
clientId={id}
/>
</FormGroup>
<DecisionStrategySelect helpLabel="policyDecisionStagey" />
</>
);
};