Skip to content

Commit 29aa123

Browse files
authored
Merge pull request #842 from OpenSignLabs/resolve_stage
fix: showing blank screen when try to send document
2 parents 48e0e0e + f69caf0 commit 29aa123

File tree

6 files changed

+41
-54
lines changed

6 files changed

+41
-54
lines changed

apps/OpenSign/src/components/dashboard/GetDashboard.js

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { Suspense, lazy } from "react";
2-
import Loader from "../../primitives/Loader";
32
const DashboardButton = lazy(() => import("./DashboardButton"));
43
const DashboardCard = lazy(() => import("./DashboardCard"));
54
const DashboardReport = lazy(() => import("./DashboardReport"));
@@ -19,19 +18,11 @@ const buttonList = [
1918
];
2019
const GetDashboard = (props) => {
2120
const Button = ({ label, redirectId, redirectType, icon }) => (
22-
<Suspense
23-
fallback={
24-
<div className="h-[300px] w-full flex justify-center items-center">
25-
<Loader />
26-
</div>
27-
}
28-
>
29-
<DashboardButton
30-
Icon={icon}
31-
Label={label}
32-
Data={{ Redirect_type: redirectType, Redirect_id: redirectId }}
33-
/>
34-
</Suspense>
21+
<DashboardButton
22+
Icon={icon}
23+
Label={label}
24+
Data={{ Redirect_type: redirectType, Redirect_id: redirectId }}
25+
/>
3526
);
3627
const renderSwitchWithTour = (col) => {
3728
switch (col.widget.type) {
@@ -45,8 +36,8 @@ const GetDashboard = (props) => {
4536
>
4637
<Suspense
4738
fallback={
48-
<div className="h-[300px] w-full flex justify-center items-center">
49-
<Loader />
39+
<div className="h-[150px] w-full flex justify-center items-center">
40+
loading...
5041
</div>
5142
}
5243
>

apps/OpenSign/src/components/pdf/DraftDocument.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useEffect, useState } from "react";
22
import { useNavigate } from "react-router-dom";
3-
import Loader from "../../primitives/LoaderWithMsg";
3+
import LoaderWithMsg from "../../primitives/LoaderWithMsg";
44
import { contractDocument } from "../../constant/Utils";
55
import HandleError from "../../primitives/HandleError";
66
function DraftDocument() {
@@ -86,7 +86,7 @@ function DraftDocument() {
8686
return (
8787
<div>
8888
{isLoading.isLoader ? (
89-
<Loader isLoading={isLoading} />
89+
<LoaderWithMsg isLoading={isLoading} />
9090
) : (
9191
<HandleError handleError={isLoading.message} />
9292
)}

apps/OpenSign/src/pages/PlaceHolderSign.js

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import RenderAllPdfPage from "../components/pdf/RenderAllPdfPage";
1111
import WidgetComponent from "../components/pdf/WidgetComponent";
1212
import Tour from "reactour";
1313
import { useLocation, useParams } from "react-router-dom";
14-
import Loader from "../primitives/LoaderWithMsg";
14+
import LoaderWithMsg from "../primitives/LoaderWithMsg";
1515
import HandleError from "../primitives/HandleError";
1616
import SignerListPlace from "../components/pdf/SignerListPlace";
1717
import Header from "../components/pdf/PdfHeader";
@@ -48,6 +48,7 @@ import { SaveFileSize } from "../constant/saveFileSize";
4848
import { EmailBody } from "../components/pdf/EmailBody";
4949
import Upgrade from "../primitives/Upgrade";
5050
import Alert from "../primitives/Alert";
51+
import Loader from "../primitives/Loader";
5152

5253
function PlaceHolderSign() {
5354
const editorRef = useRef();
@@ -1013,34 +1014,25 @@ function PlaceHolderSign() {
10131014
className="flex flex-row justify-between items-center mb-1"
10141015
key={ind}
10151016
>
1016-
{copied && <Alert type="success">Copied</Alert>}
1017+
{copied && (
1018+
<Alert type="success">
1019+
<div className="ml-3">Copied</div>
1020+
</Alert>
1021+
)}
10171022
<span className="w-[220px] md:w-[300px] whitespace-nowrap overflow-hidden text-ellipsis ">
10181023
{data.signerEmail}
10191024
</span>
10201025
<div className="flex flex-row items-center gap-3 ">
10211026
<button
10221027
onClick={() => copytoclipboard(data.url)}
10231028
type="button"
1024-
className="flex flex-row items-center text-white font-[500]"
1029+
className="flex flex-row items-center op-link op-link-primary"
10251030
>
1026-
<i
1027-
className="fa-solid fa-link underline text-blue-700"
1028-
aria-hidden="true"
1029-
></i>
1030-
<span className=" hidden md:block ml-1 underline text-blue-700">
1031-
Copy link
1032-
</span>
1031+
<i className="fa-solid fa-link" aria-hidden="true"></i>
1032+
<span className=" hidden md:block ml-1 ">Copy link</span>
10331033
</button>
1034-
<RWebShare
1035-
data={{
1036-
url: data.url,
1037-
title: "Sign url"
1038-
}}
1039-
>
1040-
<i
1041-
className="fa-solid fa-share-from-square cursor-pointer"
1042-
style={{ color: themeColor }}
1043-
></i>
1034+
<RWebShare data={{ url: data.url, title: "Sign url" }}>
1035+
<i className="fa-solid fa-share-from-square op-link op-link-secondary no-underline"></i>
10441036
</RWebShare>
10451037
</div>
10461038
</div>
@@ -1632,7 +1624,7 @@ function PlaceHolderSign() {
16321624
<Title title={state?.title ? state.title : "New Document"} />
16331625
<DndProvider backend={HTML5Backend}>
16341626
{isLoading.isLoad ? (
1635-
<Loader isLoading={isLoading} />
1627+
<LoaderWithMsg isLoading={isLoading} />
16361628
) : handleError ? (
16371629
<HandleError handleError={handleError} />
16381630
) : (
@@ -1726,9 +1718,7 @@ function PlaceHolderSign() {
17261718
setRequestSubject={setRequestSubject}
17271719
/>
17281720
<div
1729-
className={
1730-
"flex justify-end items-center gap-1 mt-2 underline text-blue-700 focus:outline-none cursor-pointer "
1731-
}
1721+
className="flex justify-end items-center gap-1 mt-2 op-link op-link-primary"
17321722
onClick={() => {
17331723
setRequestBody(defaultBody);
17341724
setRequestSubject(defaultSubject);
@@ -1759,7 +1749,7 @@ function PlaceHolderSign() {
17591749
{!isCustomize &&
17601750
(isSubscribe || !isEnableSubscription) && (
17611751
<span
1762-
className="link link-primary text-sm"
1752+
className="op-link op-link-accent text-sm"
17631753
onClick={() => setIsCustomize(!isCustomize)}
17641754
>
17651755
Cutomize Email
@@ -1788,7 +1778,6 @@ function PlaceHolderSign() {
17881778
)}
17891779
</div>
17901780
</ModalUi>
1791-
17921781
{/* this modal is used show send mail message and after send mail success message */}
17931782
<ModalUi
17941783
isOpen={isSend}
@@ -2062,7 +2051,7 @@ function PlaceHolderSign() {
20622051
<button
20632052
onClick={() => handleRecipientSign()}
20642053
type="button"
2065-
className="finishBtn cancelBtn"
2054+
className="op-btn op-btn-primary"
20662055
>
20672056
View
20682057
</button>

apps/OpenSign/src/pages/SignyourselfPdf.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Parse from "parse";
55
import { isEnableSubscription } from "../constant/const";
66
import Confetti from "react-confetti";
77
import axios from "axios";
8-
import Loader from "../primitives/LoaderWithMsg";
8+
import LoaderWithMsg from "../primitives/LoaderWithMsg";
99
import RenderAllPdfPage from "../components/pdf/RenderAllPdfPage";
1010
import { DndProvider } from "react-dnd";
1111
import { HTML5Backend } from "react-dnd-html5-backend";
@@ -47,7 +47,7 @@ import Title from "../components/Title";
4747
import ModalUi from "../primitives/ModalUi";
4848
import DropdownWidgetOption from "../components/pdf/DropdownWidgetOption";
4949
import VerifyEmail from "../components/pdf/VerifyEmail";
50-
50+
import Loader from "../primitives/Loader";
5151
//For signYourself inProgress section signer can add sign and complete doc sign.
5252
function SignYourSelf() {
5353
const [pdfDetails, setPdfDetails] = useState([]);
@@ -1092,7 +1092,7 @@ function SignYourSelf() {
10921092
<DndProvider backend={HTML5Backend}>
10931093
<Title title={"Self Sign"} />
10941094
{isLoading.isLoad ? (
1095-
<Loader isLoading={isLoading} />
1095+
<LoaderWithMsg isLoading={isLoading} />
10961096
) : handleError ? (
10971097
<HandleError handleError={handleError} />
10981098
) : (

apps/OpenSign/src/pages/TemplatePlaceholder.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { HTML5Backend } from "react-dnd-html5-backend";
99
import { useDrag, useDrop } from "react-dnd";
1010
import WidgetComponent from "../components/pdf/WidgetComponent";
1111
import Tour from "reactour";
12-
import Loader from "../primitives/LoaderWithMsg";
12+
import LoaderWithMsg from "../primitives/LoaderWithMsg";
1313
import HandleError from "../primitives/HandleError";
1414
import SignerListPlace from "../components/pdf/SignerListPlace";
1515
import Header from "../components/pdf/PdfHeader";
@@ -1207,7 +1207,7 @@ const TemplatePlaceholder = () => {
12071207
<Title title={"Template"} />
12081208
<DndProvider backend={HTML5Backend}>
12091209
{isLoading.isLoad ? (
1210-
<Loader isLoading={isLoading} />
1210+
<LoaderWithMsg isLoading={isLoading} />
12111211
) : handleError ? (
12121212
<HandleError handleError={handleError} />
12131213
) : (
@@ -1308,7 +1308,7 @@ const TemplatePlaceholder = () => {
13081308
)}
13091309
</div>
13101310
</ModalUi>
1311-
{isCreateDoc && <Loader isLoading={isLoading} />}
1311+
{isCreateDoc && <LoaderWithMsg isLoading={isLoading} />}
13121312
<ModalUi
13131313
isOpen={isShowEmail}
13141314
title={"signers alert"}

apps/OpenSign/src/primitives/GetReportDisplay.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useState, useEffect } from "react";
22
import pad from "../assets/images/pad.svg";
3-
import { useNavigate } from "react-router-dom";
3+
import { useLocation, useNavigate } from "react-router-dom";
44
import axios from "axios";
55
import ModalUi from "./ModalUi";
66
import AddSigner from "../components/AddSigner";
@@ -27,6 +27,9 @@ import Loader from "./Loader";
2727

2828
const ReportTable = (props) => {
2929
const navigate = useNavigate();
30+
const location = useLocation();
31+
const isDashboard =
32+
location?.pathname === "/dashboard/35KBoSgoAK" ? true : false;
3033
const [currentPage, setCurrentPage] = useState(1);
3134
const [actLoader, setActLoader] = useState({});
3235
const [isAlert, setIsAlert] = useState(false);
@@ -960,8 +963,12 @@ const ReportTable = (props) => {
960963
</div>
961964
)}
962965
</div>
963-
<div className="overflow-x-auto w-full">
964-
<table className="op-table border-collapse h-[317px] w-full">
966+
<div
967+
className={`${
968+
isDashboard ? "h-[317px]" : "h-full"
969+
} overflow-x-auto w-full`}
970+
>
971+
<table className="op-table border-collapse w-full">
965972
<thead className="text-[14px]">
966973
<tr className="border-y-[1px]">
967974
{props.heading?.map((item, index) => (

0 commit comments

Comments
 (0)