-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
abc54a9
commit 1ce88db
Showing
8 changed files
with
166 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { Stack } from "@mui/material"; | ||
import { CippWizardStepButtons } from "./CippWizardStepButtons"; | ||
import CippFormComponent from "../CippComponents/CippFormComponent"; | ||
|
||
export const CippWizardAutoComplete = (props) => { | ||
const { | ||
title, | ||
type = "single", | ||
name, | ||
placeholder, | ||
api, | ||
onNextStep, | ||
formControl, | ||
currentStep, | ||
onPreviousStep, | ||
} = props; | ||
|
||
const currentTenant = formControl.watch("tenantFilter"); | ||
|
||
return ( | ||
<Stack spacing={3}> | ||
<label>{title}</label> | ||
<CippFormComponent | ||
key={currentTenant ? currentTenant.value : "default"} | ||
type="autoComplete" | ||
name={name} | ||
formControl={formControl} | ||
placeholder={placeholder} | ||
api={{ | ||
...api, | ||
tenantFilter: currentTenant ? currentTenant.value : undefined, | ||
queryKey: `${api.url}-${currentTenant ? currentTenant.value : "default"}`, | ||
}} | ||
multiple={type === "single" ? false : true} | ||
disableClearable={true} | ||
validators={{ | ||
required: { value: true, message: "This field is required" }, | ||
}} | ||
/> | ||
<CippWizardStepButtons | ||
currentStep={currentStep} | ||
onPreviousStep={onPreviousStep} | ||
onNextStep={onNextStep} | ||
formControl={formControl} | ||
/> | ||
</Stack> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 52 additions & 6 deletions
58
src/pages/identity/administration/offboarding-wizard/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters