Skip to content

Commit

Permalink
added tenantformcomponent
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Sep 29, 2024
1 parent 4dadfe7 commit acacf48
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions src/components/CippWizard/CippTenantStep.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Stack } from "@mui/material";
import { CippWizardStepButtons } from "./CippWizardStepButtons";
import CippFormComponent from "../CippComponents/CippFormComponent";
import { CippFormTenantSelector } from "../CippComponents/CippFormTenantSelector";

export const CippTenantStep = (props) => {
const {
Expand All @@ -11,27 +11,11 @@ export const CippTenantStep = (props) => {
currentStep,
onPreviousStep,
} = props;

return (
<Stack spacing={3}>
<label>Select a tenant</label>
<CippFormComponent
type="autoComplete"
name="tenantFilter"
formControl={formControl}
placeholder="Select a tenant"
api={{
excludeTenantFilter: true,
url: allTenants ? "/api/ListTenants" : "/api/ListTenants?AllTenantSelector=true",
queryKey: "ListTenants",
labelField: (option) => `${option.displayName} (${option.defaultDomainName})`,
valueField: "customerId",
}}
multiple={type === "single" ? false : true}
disableClearable={true}
validators={{
required: { value: true, message: "This field is required" },
}}
/>
<CippFormTenantSelector formControl={formControl} allTenants={allTenants} type={type} />
<CippWizardStepButtons
currentStep={currentStep}
onPreviousStep={onPreviousStep}
Expand Down

0 comments on commit acacf48

Please sign in to comment.