Skip to content

🔥 The free & Open Source DocuSign alternative

fix: expired document message

RaktimaNXGfebb50c3cd08
diff --git a/apps/OpenSign/src/pages/PdfRequestFiles.js b/apps/OpenSign/src/pages/PdfRequestFiles.js
index 4b430c934..e810cf503 100644
--- a/apps/OpenSign/src/pages/PdfRequestFiles.js
+++ b/apps/OpenSign/src/pages/PdfRequestFiles.js
@@ -10,6 +10,7 @@ import { useParams } from "react-router-dom";
import SignPad from "../components/pdf/SignPad";
import RenderAllPdfPage from "../components/pdf/RenderAllPdfPage";
import Tour from "reactour";
+import moment from "moment";
import {
contractDocument,
multiSignEmbed,
@@ -65,6 +66,7 @@ function PdfRequestFiles() {
const [currentSigner, setCurrentSigner] = useState(false);
const [isAlert, setIsAlert] = useState({ isShow: false, alertMessage: "" });
const [unSignedWidgetId, setUnSignedWidgetId] = useState("");
+ const [expiredDate, setExpiredDate] = useState("");
const [defaultSignAlert, setDefaultSignAlert] = useState({
isShow: false,
alertMessage: ""
@@ -168,7 +170,11 @@ function PdfRequestFiles() {
};
setIsDecline(currentDecline);
} else if (currDate > expireUpdateDate) {
+ const expireDateFormat = moment(new Date(expireDate)).format(
+ "MMM DD, YYYY"
+ );
setIsExpired(true);
+ setExpiredDate(expireDateFormat);
}
if (documentData.length > 0) {
@@ -368,7 +374,6 @@ function PdfRequestFiles() {
return true;
}
};
-
//function for embed signature or image url in pdf
async function embedWidgetsData() {
const validateSigning = checkSendInOrder();
@@ -928,7 +933,17 @@ function PdfRequestFiles() {
</div>
)}
- <div className="signatureContainer" ref={divRef}>
+ <div
+ className="signatureContainer"
+ style={{
+ pointerEvents:
+ isExpired ||
+ (isDecline.isDeclined && isDecline.currnt === "another")
+ ? "none"
+ : "auto"
+ }}
+ ref={divRef}
+ >
<ModalUi
headerColor={"#dc3545"}
isOpen={isAlert.isShow}
@@ -1001,7 +1016,7 @@ function PdfRequestFiles() {
containerWH={containerWH}
show={isExpired}
headMsg="Document Expired!"
- bodyMssg="This Document is no longer available."
+ bodyMssg={`This document expired on ${expiredDate} and is no longer available to sign.`}
/>
<ModalUi