Preview:
 // if (willPreviewCompleted && mirrorWillCheck) {
    //   // If modal handled from WillPreview
    //   if (fromWillPreview && !isSpouseSelected) {
    //     // From willPreview of Main Testator
    //     dispatch(setIsSpouseSelected(true));
    //     dispatch(setFromWillPreview(false));
    //   } else if (fromWillPreview && isSpouseSelected) {
    //     // From will Preview of Spouse
    //     dispatch(setIsSpouseSelected(false));
    //   }

    //   // If modal handled from UploadDocs ==> PS --> No need to check isSpouseSelected
    //   if (fromUploadDocs) {
    //     dispatch(setIsSpouseSelected(!!isSpouseSelected));
    //     dispatch(setFromUploadDocs(false));
    //   }
    //   try {
    //     const completedSteps = await trackPromise(
    //       api.getCompletedStepsListByGUID(
    //         isSpouseSelected ? spouseGuid : profileGuid,
    //       ),
    //     );
    //     const completedStepNumbers = completedSteps?.data?.Output;
    //     const steps = completedStepNumbers.map((stepNumber: any) => Number(stepNumber.stepNumber));
    //     console.log('willPreviewCompletedsteps', steps);
    //     setTimeout(() => {
    //       setNewCompletedSteps(steps);
    //     }, 100);
    //   } catch (error) {
    //     dispatch(resetErrorState());
    //     dispatch(setErrorInfo('Some Error occured !'));
    //   }
    // }

    // if (mirrorWillCheck && fromWillPreview) {
    //   dispatch(setFromWillPreview(false));
    //   if (!isSpouseSelected) { // Testator
    //     setIsSpouseSelected(!isSpouseSelected);
    //   } else if (isSpouseSelected) { // Spouse
    //     setIsSpouseSelected(false);
    //   }
    // }

    // setShowModal(false);
    // // setActiveStep(number);
    // // console.log('steplabelid', id);
    // dispatch(setNavigationIndex(id));
    // // // Handle highlighted step here
    // dispatch(setHighlightedSteps(id)); // PS:: This is stepNumber
    // // // setCurrentSelectedStep(number);
    // // // First incomplete stepID
    // // // Set willStep component here
    // dispatch(getNewActiveStep(number)); // PS:: This is stepID

    // Set scaffolding icons according to selection
    // if (willTypeID === 3) {
    //   // Property Will
    //   if (id === 3) {
    //     setIconNum1(0);
    //     setIconNum2(3);
    //     dispatch(setNavigationIndex(id));
    //   } else if (id === 4 || id === 5 || id === 6) {
    //     setIconNum1(3);
    //     setIconNum2(6);
    //     dispatch(setNavigationIndex(id));
    //   } else if (id === 7 || id === 8) {
    //     setIconNum1(6);
    //     setIconNum2(9);
    //     dispatch(setNavigationIndex(id));
    //   }
    // } else if (willTypeID === 2) {
    //   // Guardianship Will
    //   if (id === 2) {
    //     setIconNum1(0);
    //     setIconNum2(3);
    //     dispatch(setNavigationIndex(id));
    //   } else if (id === 3 || id === 4 || id === 5) {
    //     setIconNum1(3);
    //     setIconNum2(6);
    //     dispatch(setNavigationIndex(id));
    //   } else if (id === 6 || id === 7) {
    //     setIconNum1(6);
    //     setIconNum2(9);
    //     dispatch(setNavigationIndex(id));
    //   }
    // } else if (willTypeID === 6) {
    //   // Templated Full Will
    //   if (id === 3) {
    //     setIconNum1(0);
    //     setIconNum2(3);
    //     dispatch(setNavigationIndex(id));
    //   } else if (id === 4 || id === 5 || id === 6) {
    //     setIconNum1(3);
    //     setIconNum2(6);
    //     dispatch(setNavigationIndex(id));
    //   } else if (id === 7 || id === 8) {
    //     setIconNum1(6);
    //     setIconNum2(9);
    //     dispatch(setNavigationIndex(id));
    //   }
    // } else if (willTypeID === 4) {
    //   // Business Owners Will
    //   if (id === 3) {
    //     setIconNum1(0);
    //     setIconNum2(3);
    //     dispatch(setNavigationIndex(id));
    //   } else if (id === 4 || id === 5 || id === 6) {
    //     setIconNum1(3);
    //     setIconNum2(6);
    //     dispatch(setNavigationIndex(id));
    //   } else if (id === 7 || id === 8) {
    //     setIconNum1(6);
    //     setIconNum2(9);
    //     dispatch(setNavigationIndex(id));
    //   }
    // } else if (willTypeID === 5) {
    //   // Financial Assets Will
    //   if (id === 3) {
    //     setIconNum1(0);
    //     setIconNum2(3);
    //     dispatch(setNavigationIndex(id));
    //   } else if (id === 4 || id === 5 || id === 6) {
    //     setIconNum1(3);
    //     setIconNum2(6);
    //     dispatch(setNavigationIndex(id));
    //   } else if (id === 7 || id === 8) {
    //     setIconNum1(6);
    //     setIconNum2(9);
    //     dispatch(setNavigationIndex(id));
    //   }
    // } else if (willTypeID === 1) {
    //   // Full Will
    //   if (id === 3) {
    //     setIconNum1(0);
    //     setIconNum2(3);
    //     dispatch(setNavigationIndex(id));
    //   } else if (id === 4 || id === 5 || id === 6) {
    //     setIconNum1(3);
    //     setIconNum2(6);
    //     dispatch(setNavigationIndex(id));
    //   } else if (id === 7 || id === 8) {
    //     setIconNum1(6);
    //     setIconNum2(9);
    //     dispatch(setNavigationIndex(id));
    //   }
    // }
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter