From f69caf016af7d55455ce7c5ad36a937fc6d4e6f1 Mon Sep 17 00:00:00 2001 From: prafull-opensignlabs Date: Fri, 14 Jun 2024 19:13:07 +0530 Subject: [PATCH] fix: showing blank screen when try to send document --- .../src/components/dashboard/GetDashboard.js | 23 +++------- .../src/components/pdf/DraftDocument.js | 4 +- apps/OpenSign/src/pages/PlaceHolderSign.js | 43 +++++++------------ apps/OpenSign/src/pages/SignyourselfPdf.js | 6 +-- .../OpenSign/src/pages/TemplatePlaceholder.js | 6 +-- .../src/primitives/GetReportDisplay.js | 13 ++++-- 6 files changed, 41 insertions(+), 54 deletions(-) diff --git a/apps/OpenSign/src/components/dashboard/GetDashboard.js b/apps/OpenSign/src/components/dashboard/GetDashboard.js index bfbad4d8a..a4c9fe12a 100644 --- a/apps/OpenSign/src/components/dashboard/GetDashboard.js +++ b/apps/OpenSign/src/components/dashboard/GetDashboard.js @@ -1,5 +1,4 @@ import React, { Suspense, lazy } from "react"; -import Loader from "../../primitives/Loader"; const DashboardButton = lazy(() => import("./DashboardButton")); const DashboardCard = lazy(() => import("./DashboardCard")); const DashboardReport = lazy(() => import("./DashboardReport")); @@ -19,19 +18,11 @@ const buttonList = [ ]; const GetDashboard = (props) => { const Button = ({ label, redirectId, redirectType, icon }) => ( - - - - } - > - - + ); const renderSwitchWithTour = (col) => { switch (col.widget.type) { @@ -45,8 +36,8 @@ const GetDashboard = (props) => { > - +
+ loading...
} > diff --git a/apps/OpenSign/src/components/pdf/DraftDocument.js b/apps/OpenSign/src/components/pdf/DraftDocument.js index 750a9ad96..73811ca2f 100644 --- a/apps/OpenSign/src/components/pdf/DraftDocument.js +++ b/apps/OpenSign/src/components/pdf/DraftDocument.js @@ -1,6 +1,6 @@ import React, { useEffect, useState } from "react"; import { useNavigate } from "react-router-dom"; -import Loader from "../../primitives/LoaderWithMsg"; +import LoaderWithMsg from "../../primitives/LoaderWithMsg"; import { contractDocument } from "../../constant/Utils"; import HandleError from "../../primitives/HandleError"; function DraftDocument() { @@ -86,7 +86,7 @@ function DraftDocument() { return (
{isLoading.isLoader ? ( - + ) : ( )} diff --git a/apps/OpenSign/src/pages/PlaceHolderSign.js b/apps/OpenSign/src/pages/PlaceHolderSign.js index bf947653a..14f0264fd 100644 --- a/apps/OpenSign/src/pages/PlaceHolderSign.js +++ b/apps/OpenSign/src/pages/PlaceHolderSign.js @@ -11,7 +11,7 @@ import RenderAllPdfPage from "../components/pdf/RenderAllPdfPage"; import WidgetComponent from "../components/pdf/WidgetComponent"; import Tour from "reactour"; import { useLocation, useParams } from "react-router-dom"; -import Loader from "../primitives/LoaderWithMsg"; +import LoaderWithMsg from "../primitives/LoaderWithMsg"; import HandleError from "../primitives/HandleError"; import SignerListPlace from "../components/pdf/SignerListPlace"; import Header from "../components/pdf/PdfHeader"; @@ -48,6 +48,7 @@ import { SaveFileSize } from "../constant/saveFileSize"; import { EmailBody } from "../components/pdf/EmailBody"; import Upgrade from "../primitives/Upgrade"; import Alert from "../primitives/Alert"; +import Loader from "../primitives/Loader"; function PlaceHolderSign() { const editorRef = useRef(); @@ -1013,7 +1014,11 @@ function PlaceHolderSign() { className="flex flex-row justify-between items-center mb-1" key={ind} > - {copied && Copied} + {copied && ( + +
Copied
+
+ )} {data.signerEmail} @@ -1021,26 +1026,13 @@ function PlaceHolderSign() { - - + +
@@ -1632,7 +1624,7 @@ function PlaceHolderSign() { <DndProvider backend={HTML5Backend}> {isLoading.isLoad ? ( - <Loader isLoading={isLoading} /> + <LoaderWithMsg isLoading={isLoading} /> ) : handleError ? ( <HandleError handleError={handleError} /> ) : ( @@ -1726,9 +1718,7 @@ function PlaceHolderSign() { setRequestSubject={setRequestSubject} /> <div - className={ - "flex justify-end items-center gap-1 mt-2 underline text-blue-700 focus:outline-none cursor-pointer " - } + className="flex justify-end items-center gap-1 mt-2 op-link op-link-primary" onClick={() => { setRequestBody(defaultBody); setRequestSubject(defaultSubject); @@ -1759,7 +1749,7 @@ function PlaceHolderSign() { {!isCustomize && (isSubscribe || !isEnableSubscription) && ( <span - className="link link-primary text-sm" + className="op-link op-link-accent text-sm" onClick={() => setIsCustomize(!isCustomize)} > Cutomize Email @@ -1788,7 +1778,6 @@ function PlaceHolderSign() { )} </div> </ModalUi> - {/* this modal is used show send mail message and after send mail success message */} <ModalUi isOpen={isSend} @@ -2062,7 +2051,7 @@ function PlaceHolderSign() { <button onClick={() => handleRecipientSign()} type="button" - className="finishBtn cancelBtn" + className="op-btn op-btn-primary" > View </button> diff --git a/apps/OpenSign/src/pages/SignyourselfPdf.js b/apps/OpenSign/src/pages/SignyourselfPdf.js index e6aae86a2..f8820d901 100644 --- a/apps/OpenSign/src/pages/SignyourselfPdf.js +++ b/apps/OpenSign/src/pages/SignyourselfPdf.js @@ -5,7 +5,7 @@ import Parse from "parse"; import { isEnableSubscription } from "../constant/const"; import Confetti from "react-confetti"; import axios from "axios"; -import Loader from "../primitives/LoaderWithMsg"; +import LoaderWithMsg from "../primitives/LoaderWithMsg"; import RenderAllPdfPage from "../components/pdf/RenderAllPdfPage"; import { DndProvider } from "react-dnd"; import { HTML5Backend } from "react-dnd-html5-backend"; @@ -47,7 +47,7 @@ import Title from "../components/Title"; import ModalUi from "../primitives/ModalUi"; import DropdownWidgetOption from "../components/pdf/DropdownWidgetOption"; import VerifyEmail from "../components/pdf/VerifyEmail"; - +import Loader from "../primitives/Loader"; //For signYourself inProgress section signer can add sign and complete doc sign. function SignYourSelf() { const [pdfDetails, setPdfDetails] = useState([]); @@ -1092,7 +1092,7 @@ function SignYourSelf() { <DndProvider backend={HTML5Backend}> <Title title={"Self Sign"} /> {isLoading.isLoad ? ( - <Loader isLoading={isLoading} /> + <LoaderWithMsg isLoading={isLoading} /> ) : handleError ? ( <HandleError handleError={handleError} /> ) : ( diff --git a/apps/OpenSign/src/pages/TemplatePlaceholder.js b/apps/OpenSign/src/pages/TemplatePlaceholder.js index 73e30ff90..cf4a8fea5 100644 --- a/apps/OpenSign/src/pages/TemplatePlaceholder.js +++ b/apps/OpenSign/src/pages/TemplatePlaceholder.js @@ -9,7 +9,7 @@ import { HTML5Backend } from "react-dnd-html5-backend"; import { useDrag, useDrop } from "react-dnd"; import WidgetComponent from "../components/pdf/WidgetComponent"; import Tour from "reactour"; -import Loader from "../primitives/LoaderWithMsg"; +import LoaderWithMsg from "../primitives/LoaderWithMsg"; import HandleError from "../primitives/HandleError"; import SignerListPlace from "../components/pdf/SignerListPlace"; import Header from "../components/pdf/PdfHeader"; @@ -1207,7 +1207,7 @@ const TemplatePlaceholder = () => { <Title title={"Template"} /> <DndProvider backend={HTML5Backend}> {isLoading.isLoad ? ( - <Loader isLoading={isLoading} /> + <LoaderWithMsg isLoading={isLoading} /> ) : handleError ? ( <HandleError handleError={handleError} /> ) : ( @@ -1308,7 +1308,7 @@ const TemplatePlaceholder = () => { )} </div> </ModalUi> - {isCreateDoc && <Loader isLoading={isLoading} />} + {isCreateDoc && <LoaderWithMsg isLoading={isLoading} />} <ModalUi isOpen={isShowEmail} title={"signers alert"} diff --git a/apps/OpenSign/src/primitives/GetReportDisplay.js b/apps/OpenSign/src/primitives/GetReportDisplay.js index c51704848..636c377a0 100644 --- a/apps/OpenSign/src/primitives/GetReportDisplay.js +++ b/apps/OpenSign/src/primitives/GetReportDisplay.js @@ -1,6 +1,6 @@ import React, { useState, useEffect } from "react"; import pad from "../assets/images/pad.svg"; -import { useNavigate } from "react-router-dom"; +import { useLocation, useNavigate } from "react-router-dom"; import axios from "axios"; import ModalUi from "./ModalUi"; import AddSigner from "../components/AddSigner"; @@ -27,6 +27,9 @@ import Loader from "./Loader"; const ReportTable = (props) => { const navigate = useNavigate(); + const location = useLocation(); + const isDashboard = + location?.pathname === "/dashboard/35KBoSgoAK" ? true : false; const [currentPage, setCurrentPage] = useState(1); const [actLoader, setActLoader] = useState({}); const [isAlert, setIsAlert] = useState(false); @@ -960,8 +963,12 @@ const ReportTable = (props) => { </div> )} </div> - <div className="overflow-x-auto w-full"> - <table className="op-table border-collapse h-[317px] w-full"> + <div + className={`${ + isDashboard ? "h-[317px]" : "h-full" + } overflow-x-auto w-full`} + > + <table className="op-table border-collapse w-full"> <thead className="text-[14px]"> <tr className="border-y-[1px]"> {props.heading?.map((item, index) => (