From a279d8b96dc57515c33636ace6f26abd0545a6d5 Mon Sep 17 00:00:00 2001 From: John Duprey Date: Wed, 12 Feb 2025 20:23:35 -0500 Subject: [PATCH] null safety sam wizard --- .../CippWizard/CIPPDeploymentStep.js | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/components/CippWizard/CIPPDeploymentStep.js b/src/components/CippWizard/CIPPDeploymentStep.js index 5ebc0ecf67fd..90a0840fc16e 100644 --- a/src/components/CippWizard/CIPPDeploymentStep.js +++ b/src/components/CippWizard/CIPPDeploymentStep.js @@ -16,7 +16,7 @@ import { CippWizardStepButtons } from "./CippWizardStepButtons"; import { ApiGetCall } from "../../api/ApiCall"; import CippButtonCard from "../CippCards/CippButtonCard"; import { CippCopyToClipBoard } from "../CippComponents/CippCopyToClipboard"; -import { CheckCircle } from "@mui/icons-material"; +import { CheckCircle, Sync } from "@mui/icons-material"; import CippPermissionCheck from "../CippSettings/CippPermissionCheck"; import { useQueryClient } from "@tanstack/react-query"; import { CippApiResults } from "../CippComponents/CippApiResults"; @@ -43,7 +43,7 @@ export const CippDeploymentStep = (props) => { const appId = ApiGetCall({ url: `/api/ExecListAppId`, queryKey: `ExecListAppId`, - waiting: values.selectedOption !== "UpdateTokens" ? false : true, + waiting: true, }); useEffect(() => { if ( @@ -260,19 +260,29 @@ export const CippDeploymentStep = (props) => { disabled={ appId.isLoading || !/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test( - appId.data.applicationId + appId?.data?.applicationId ) } - onClick={() => openPopup(appId.data.refreshUrl)} + onClick={() => openPopup(appId?.data?.refreshUrl)} color="primary" > Refresh Graph Token + {!/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test( - appId.data.applicationId + appId?.data?.applicationId ) && ( - The Application ID is not valid. Please return to the first page of the SAM wizard and use the Manual . + The Application ID is not valid. Please return to the first page of the SAM + wizard and use the Manual . )}