fix: showing blank screen when try to send document

This commit is contained in:
prafull-opensignlabs
2024-06-14 19:13:07 +05:30
parent f7bb11ede1
commit f69caf016a
6 changed files with 41 additions and 54 deletions
@@ -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 }) => (
<Suspense
fallback={
<div className="h-[300px] w-full flex justify-center items-center">
<Loader />
</div>
}
>
<DashboardButton
Icon={icon}
Label={label}
Data={{ Redirect_type: redirectType, Redirect_id: redirectId }}
/>
</Suspense>
<DashboardButton
Icon={icon}
Label={label}
Data={{ Redirect_type: redirectType, Redirect_id: redirectId }}
/>
);
const renderSwitchWithTour = (col) => {
switch (col.widget.type) {
@@ -45,8 +36,8 @@ const GetDashboard = (props) => {
>
<Suspense
fallback={
<div className="h-[300px] w-full flex justify-center items-center">
<Loader />
<div className="h-[150px] w-full flex justify-center items-center">
loading...
</div>
}
>
@@ -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 (
<div>
{isLoading.isLoader ? (
<Loader isLoading={isLoading} />
<LoaderWithMsg isLoading={isLoading} />
) : (
<HandleError handleError={isLoading.message} />
)}
+16 -27
View File
@@ -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 && <Alert type="success">Copied</Alert>}
{copied && (
<Alert type="success">
<div className="ml-3">Copied</div>
</Alert>
)}
<span className="w-[220px] md:w-[300px] whitespace-nowrap overflow-hidden text-ellipsis ">
{data.signerEmail}
</span>
@@ -1021,26 +1026,13 @@ function PlaceHolderSign() {
<button
onClick={() => copytoclipboard(data.url)}
type="button"
className="flex flex-row items-center text-white font-[500]"
className="flex flex-row items-center op-link op-link-primary"
>
<i
className="fa-solid fa-link underline text-blue-700"
aria-hidden="true"
></i>
<span className=" hidden md:block ml-1 underline text-blue-700">
Copy link
</span>
<i className="fa-solid fa-link" aria-hidden="true"></i>
<span className=" hidden md:block ml-1 ">Copy link</span>
</button>
<RWebShare
data={{
url: data.url,
title: "Sign url"
}}
>
<i
className="fa-solid fa-share-from-square cursor-pointer"
style={{ color: themeColor }}
></i>
<RWebShare data={{ url: data.url, title: "Sign url" }}>
<i className="fa-solid fa-share-from-square op-link op-link-secondary no-underline"></i>
</RWebShare>
</div>
</div>
@@ -1632,7 +1624,7 @@ function PlaceHolderSign() {
<Title title={state?.title ? state.title : "New Document"} />
<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>
+3 -3
View File
@@ -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} />
) : (
@@ -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"}
@@ -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) => (