Skip to content

Commit 06677d9

Browse files
Merge pull request #680 from OpenSignLabs/documentLoad_issue
fix: document loading error No PDF file specified
2 parents dc67d2c + 2ae7e8c commit 06677d9

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

apps/OpenSign/src/pages/PdfRequestFiles.js

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,8 @@ function PdfRequestFiles() {
471471
const maxCount =
472472
requiredCheckbox[i].options?.validation?.maxRequiredCount;
473473
const parseMax = maxCount && parseInt(maxCount);
474-
const response = requiredCheckbox[i].options?.response?.length;
474+
const response =
475+
requiredCheckbox[i].options?.response?.length;
475476
const defaultValue =
476477
requiredCheckbox[i].options?.defaultValue?.length;
477478
if (parseMin === 0 && parseMax === 0) {
@@ -670,7 +671,8 @@ function PdfRequestFiles() {
670671
)}&${localStorage.getItem("_appName")}`;
671672
const hostUrl = window.location.origin;
672673
let signPdf = `${hostUrl}/login/${pdfDetails?.[0].objectId}/${user.Email}/${objectId}/${serverParams}`;
673-
const openSignUrl = "https://www.opensignlabs.com/contact-us";
674+
const openSignUrl =
675+
"https://www.opensignlabs.com/contact-us";
674676
const orgName = pdfDetails[0]?.ExtUserPtr.Company
675677
? pdfDetails[0].ExtUserPtr.Company
676678
: "";
@@ -681,7 +683,10 @@ function PdfRequestFiles() {
681683
requestSubject &&
682684
(!isEnableSubscription || isSubscribed)
683685
) {
684-
const replacedRequestBody = requestBody.replace(/"/g, "'");
686+
const replacedRequestBody = requestBody.replace(
687+
/"/g,
688+
"'"
689+
);
685690
const htmlReqBody =
686691
"<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /></head><body>" +
687692
replacedRequestBody +
@@ -1148,9 +1153,9 @@ function PdfRequestFiles() {
11481153
isDecline.currnt === "Sure"
11491154
? "Are you sure want to decline this document ?"
11501155
: isDecline.currnt === "YouDeclined"
1151-
? "You have declined this document!"
1152-
: isDecline.currnt === "another" &&
1153-
"You can not sign this document as it has been declined/revoked."
1156+
? "You have declined this document!"
1157+
: isDecline.currnt === "another" &&
1158+
"You can not sign this document as it has been declined/revoked."
11541159
}
11551160
footerMessage={isDecline.currnt === "Sure"}
11561161
declineDoc={declineDoc}
@@ -1229,7 +1234,10 @@ function PdfRequestFiles() {
12291234
</ModalUi>
12301235
{/* this component used to render all pdf pages in left side */}
12311236
<RenderAllPdfPage
1232-
signPdfUrl={pdfDetails[0] && pdfDetails[0].SignedUrl}
1237+
signPdfUrl={
1238+
pdfDetails[0] &&
1239+
(pdfDetails[0].SignedUrl || pdfDetails[0].URL)
1240+
}
12331241
allPages={allPages}
12341242
setAllPages={setAllPages}
12351243
setPageNumber={setPageNumber}

0 commit comments

Comments
 (0)