mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-20 22:52:39 +02:00
fix: expired document message
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user