@@ -16,7 +16,7 @@ import { CippWizardStepButtons } from "./CippWizardStepButtons";
1616import { ApiGetCall } from "../../api/ApiCall" ;
1717import CippButtonCard from "../CippCards/CippButtonCard" ;
1818import { CippCopyToClipBoard } from "../CippComponents/CippCopyToClipboard" ;
19- import { CheckCircle } from "@mui/icons-material" ;
19+ import { CheckCircle , Sync } from "@mui/icons-material" ;
2020import CippPermissionCheck from "../CippSettings/CippPermissionCheck" ;
2121import { useQueryClient } from "@tanstack/react-query" ;
2222import { CippApiResults } from "../CippComponents/CippApiResults" ;
@@ -43,7 +43,7 @@ export const CippDeploymentStep = (props) => {
4343 const appId = ApiGetCall ( {
4444 url : `/api/ExecListAppId` ,
4545 queryKey : `ExecListAppId` ,
46- waiting : values . selectedOption !== "UpdateTokens" ? false : true ,
46+ waiting : true ,
4747 } ) ;
4848 useEffect ( ( ) => {
4949 if (
@@ -260,19 +260,29 @@ export const CippDeploymentStep = (props) => {
260260 disabled = {
261261 appId . isLoading ||
262262 ! / ^ [ 0 - 9 a - f A - F ] { 8 } - [ 0 - 9 a - f A - F ] { 4 } - [ 0 - 9 a - f A - F ] { 4 } - [ 0 - 9 a - f A - F ] { 4 } - [ 0 - 9 a - f A - F ] { 12 } $ / . test (
263- appId . data . applicationId
263+ appId ? .data ? .applicationId
264264 )
265265 }
266- onClick = { ( ) => openPopup ( appId . data . refreshUrl ) }
266+ onClick = { ( ) => openPopup ( appId ? .data ? .refreshUrl ) }
267267 color = "primary"
268268 >
269269 Refresh Graph Token
270270 </ Button >
271+ < Button
272+ onClick = { ( ) => appId . refetch ( ) }
273+ variant = "contained"
274+ color = "primary"
275+ startIcon = { < Sync /> }
276+ disabled = { appId . isFetching }
277+ >
278+ Check Application ID
279+ </ Button >
271280 { ! / ^ [ 0 - 9 a - f A - F ] { 8 } - [ 0 - 9 a - f A - F ] { 4 } - [ 0 - 9 a - f A - F ] { 4 } - [ 0 - 9 a - f A - F ] { 4 } - [ 0 - 9 a - f A - F ] { 12 } $ / . test (
272- appId . data . applicationId
281+ appId ? .data ? .applicationId
273282 ) && (
274283 < Alert severity = "warning" >
275- The Application ID is not valid. Please return to the first page of the SAM wizard and use the Manual .
284+ The Application ID is not valid. Please return to the first page of the SAM
285+ wizard and use the Manual .
276286 </ Alert >
277287 ) }
278288 </ >
0 commit comments