Skip to content

Commit

Permalink
fix currentTenant stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Sep 29, 2024
1 parent 26a8941 commit cf817f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/components/CippWizard/CippWizardOffboarding.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { CippFormCondition } from "../CippComponents/CippFormCondition";

export const CippWizardOffboarding = (props) => {
const { postUrl, formControl, onPreviousStep, onNextStep, currentStep } = props;
const currentTenant = formControl.watch("tenantFilter");

return (
<Stack spacing={3}>
<>
Expand Down Expand Up @@ -102,6 +104,7 @@ export const CippWizardOffboarding = (props) => {
formControl={formControl}
multi
api={{
tenantFilter: currentTenant ? currentTenant.value : undefined,
url: "/api/ListGraphRequest",
dataKey: "Results",
labelField: (option) => `${option.displayName} (${option.userPrincipalName})`,
Expand Down Expand Up @@ -129,6 +132,7 @@ export const CippWizardOffboarding = (props) => {
valueField: "id",
url: "/api/ListGraphRequest",
dataKey: "Results",
tenantFilter: currentTenant ? currentTenant.value : undefined,
data: {
Endpoint: "users",
manualPagination: true,
Expand All @@ -148,6 +152,7 @@ export const CippWizardOffboarding = (props) => {
formControl={formControl}
multi
api={{
tenantFilter: currentTenant ? currentTenant.value : undefined,
labelField: (option) => `${option.displayName} (${option.userPrincipalName})`,
valueField: "id",
url: "/api/ListGraphRequest",
Expand All @@ -169,7 +174,9 @@ export const CippWizardOffboarding = (props) => {
type="autoComplete"
placeholder="leave blank to not forward"
formControl={formControl}
multiple={false}
api={{
tenantFilter: currentTenant ? currentTenant.value : undefined,
labelField: (option) => `${option.displayName} (${option.userPrincipalName})`,
valueField: "id",
url: "/api/ListGraphRequest",
Expand Down
1 change: 0 additions & 1 deletion src/utils/get-cipp-formatting.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export const getCippFormatting = (data, cellName, type) => {
if (data?.label) {
return data.label;
}
console.log(data);
if (data?.enabled === true && data?.date) {
return isText
? `Yes, Scheduled for ${new Date(data.date).toLocaleString()}`
Expand Down

0 comments on commit cf817f4

Please sign in to comment.