diff --git a/.env.local_dev b/.env.local_dev
index 6059c326e..cf19e847c 100644
--- a/.env.local_dev
+++ b/.env.local_dev
@@ -42,7 +42,7 @@ DO_SECRET_ACCESS_KEY=
# Digital ocean spaces region or AWS s3 region
DO_REGION=us-west
# local storage
-USE_LOCAL=TRUE
+USE_LOCAL=FALSE
# Email mailgun config (The app will not initialize if any of these 3 variables are not set) *********************************************************************************************************************
MAILGUN_API_KEY=XXXXX
@@ -50,7 +50,61 @@ MAILGUN_DOMAIN=mail.yourdomain.com
MAILGUN_SENDER=postmaster@mail.yourdomain.com
# Base64 encoded PFX or p12 document signing certificate file *********************************************************************************************************************
-PFX_BASE64=
+PFX_BASE64='MIIKLwIBAzCCCeUGCSqGSIb3DQEHAaCCCdYEggnSMIIJzjCCBEIGCSqGSIb3DQEH
+BqCCBDMwggQvAgEAMIIEKAYJKoZIhvcNAQcBMFcGCSqGSIb3DQEFDTBKMCkGCSqG
+SIb3DQEFDDAcBAh6cQqVpHfTzAICCAAwDAYIKoZIhvcNAgkFADAdBglghkgBZQME
+ASoEEFKEIGJTTRo3voO/FvsXs7yAggPAI7rMCboTFFBfdMuuV3Y9/xfphAgdGD7P
+0xAN10CcmXlMtedc8cRxOaD9n3Q7zJx5iIbqEGDTc0dgp5EtdWsGl7MP76iHkSfB
+ZUPc13nbnRU4Nq4hNFcSj1m6NVa0lT9UobbTsG+wUkJn8aLfijzZ1OY82KLlKUoJ
+lqLsQ1yZkeLiLKI0aEew/2vzfiLUX9A99qnCRoryo8ZbLiWl0Vu/FEKM5mqIRFEp
+BKeSUsRxBfJCMZ2Ks5t4/MTCV+yrcsuhLPF/AJpzKfIinEFDhm7MxP4RXtk2LWNe
++EO2GuFRjZCfsMO0oNWybFmDeNDMCHZj5TeoqL1JwAV5e1lEeqR38v4Wcr4OVefY
+DfdrJ2xdvm7XbBZ8Lgx8L4fwugw7oDyTpR2jJqHMlpOsQrxipN6UKkN6EVYeCC5K
+4dF5LHdCcIa7L/OI/feD5g/zz8S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UWZQHKhnBH4noZydrzBBJN1po9dkxb8LKuKZDEcnKo+tQrTnZJaFRXK
+pQDsAjQ0HcYi8ZqN/GPezXOqzRgvObevXeDYTJrNejr46B1HqjPw8doai+AEf//1
+iiM9EK4y3bGbX837oebTByRi112AOctISHTWbF0zdFMiBO9X9PML4n3i14ToqLH1
+EUp0WtCdKLJmrRnO9PKJUMpce3yNu6oRSBzB4EkgUMOTVx9tM66h/gcR3wr+qKJP
+1EABMbbCsJeYYLujhQHVh0JluqLBXYuCmr5n6o8qmonj5tEfTn9zs2gi0OvKTliH
+wRXWsar004alt8D8o4M/Oqu3qyVV1O8BlVEofUC1CfAMIh/T1NJBeKG/FPfAFoEz
+9liLLkoDvGvFVJ4Ezy4BaPtg+G3yU/SeiruwsCB3unHRD7G6VvS4jY2B8vEYl0yM
+Z1mLFbKK8CIEvg8+v/vbc0noYUOzd6bkwh6Y6cziR/u78y2nALYZpQK+3XiVVH/v
+SaVoDckZgUwAX+dMd1P4U3a487MPXBZZmLVFMHTuv3NvW6NIQCMd4l35ViRd7YcS
+V2QDKTnUtPN2MSUwIwYJKoZIhvcNAQkVMRYEFMSz7PlBO5VzTDqC/foidPWrMjkw
+MEEwMTANBglghkgBZQMEAgEFAAQgPlLuG+67SxPOEPbgFuEnVgewvY6LUzFmrprx
+c6yryFgECIld0S5kDk7JAgIIAA=='
# Provide Pass pharse of above PFX or p12 document
-PASS_PHRASE=
+PASS_PHRASE=
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index cc964cb27..b6dcebdf3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,6 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
+apps/OpenSign/public/mfbuild/*
+microfrontends/SignDocuments/build/*
+apps/OpenSignServer/files/files/*
\ No newline at end of file
diff --git a/INSTALLATION.md b/INSTALLATION.md
index e10a73caa..86a9fb8e6 100644
--- a/INSTALLATION.md
+++ b/INSTALLATION.md
@@ -88,5 +88,63 @@ You can install all 3 components on digital ocean using the button below -
## Localhost(Docker)
-Below are the steps to follow -
-- Execute `make build`
\ No newline at end of file
+For local Setup we need to need following prerequisite:
+
+Environment Varaibles:
+
+| Environment Varibale | Value | Description |
+| ------------- | ------------- | ------------- |
+| CI | false | Set CI to false while running the app locally |
+| PUBLIC_URL | http://localhost:3000 | Set it to the URL form where the app home page will be accessed |
+| GENERATE_SOURCEMAP | false | Set it to true if you want to generate the Sourcemap for debugging |
+| REACT_APP_SERVERURL | http://localhost:8080/app | Set it to the URL from where APIs will be accessible, for local development it should be localhost:3000/api/app (use your local port number instead) |
+| REACT_APP_APPID | http://localhost:3000 | Set it to the URL form where the app home page will be accessed |
+| PUBLIC_URL | opensignstgn | A 12 character long random app identifier. The value of this should be same as APP_ID which is a variable used by backend API. |
+| APP_ID | opensignstgn | A 12 character long random app identifier. The value of this should be same as REACT_APP_APPID which is a variable used by Frontend React App. |
+| appName | open_sign_server | Name of the app. It will be visible in the verification emails sent out. |
+| MASTER_KEY | XnAadwKxxByMr | A 12 character long random secret key that allows access to all the data. It is used in Parse dashboard config to view all the data in the database. |
+| MONGODB_URI | mongodb://host.docker.internal:27017/OpenSignDB | Mongodb URI to connect to |
+| PARSE_MOUNT |/app | Path on which APIs should be mounted. Do not change this. This variable shall be removed & value hardcoded in the source code in coming versions. |
+| SERVER_URL | http://127.0.0.1:8080/app | Set it to the URL from where APIs will be accessible to the NodeJS functions, for local development it should be localhost:3000/api/app (use your local port number instead) |
+| DO_SPACE | DOSPACENAME | Digital ocean space name or AWS S3 bucket name for uploading documents |
+| DO_ENDPOINT | ams3.digitaloceanspaces.com | Digital ocean spaces endpoint or AWS S3 endpoint for uploading documents |
+| DO_BASEURL |https://DOSPACENAME.ams3.digitaloceanspaces.com | Digital ocean baseurl or AWS S3 base URL |
+| DO_ACCESS_KEY_ID | YOUR_S3_ACCESS_ID | Digital ocean spaces access key ID or AWS s3 Access key ID for uploading the docs |
+| DO_SECRET_ACCESS_KEY | YOUR_S3_ACCESS_KEY | Digital ocean spaces secret access key or AWS s3 secret access key for uploading the docs |
+| DO_REGION | YOUR_S3_REGION | Digital ocean spaces region or AWS s3 region |
+| USE_LOCAL | FALSE | To use local file storage to save file |
+| MAILGUN_API_KEY | YOUR_MAILGUNAPI_KEY | Mailgun API Key |
+| MAILGUN_DOMAIN | YOUR_MAILGUNAPI_DOMAIN | Mailgun API Domain |
+| MAILGUN_SENDER | - | Mailgun Sender Mail ID |
+| PFX_BASE64 | - | Base64 encoded PFX or p12 document signing certificate file. You can generate base64 encoded self sign certificate using the passphrase `emudhra` |
+
+# Steps to Generate Self Sign Certificate
+```
+# execute below command and use passphrase emudhra
+openssl genrsa -des3 -out ./cert/local_dev.key 2048
+openssl req -key ./cert/local_dev.key -new -x509 -days 365 -out ./cert/local_dev.crt
+openssl pkcs12 -inkey ./cert/local_dev.key -in ./cert/local_dev.crt -export -out ./cert/local_dev.pfx
+openssl base64 -in ./cert/local_dev.pfx -out ./cert/base64_pfx
+```
+
+# CORS Configuration
+
+As document storage is delegated to S3-compatible services that reside in a different host than the OpenSign one, document operations (loading, storing, deleting) are subject to [Cross-Origin Resource Sharing](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) restriction policies; as a consequence, OpenSign app may fail with (browser console) errors like the following:
+```
+Access to fetch at 'https://foo.nyc3.digitaloceanspaces.com/exported_file_4627_0000-00-00T00%3A45%3A43.344Z.pdf'
+from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header
+is present on the requested resource. If an opaque response serves your needs, set the request's mode to
+'no-cors' to fetch the resource with CORS disabled.
+```
+
+In order to address this, your document storage system must be instructed to accept requests from other hosts; below the relevant documentation links:
+- [How to Configure CORS on DigitalOcean Spaces](https://docs.digitalocean.com/products/spaces/how-to/configure-cors/)
+- [Configuring cross-origin resource sharing on AWS S3](https://docs.aws.amazon.com/AmazonS3/latest/userguide/enabling-cors-examples.html)
+
+# Build Local Environment
+
+Command to build project -
+- Execute `make build`
+
+Command to run project -
+- Execute `make run`
\ No newline at end of file
diff --git a/Makefile b/Makefile
index 35fa55901..bf7f219d3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,9 @@
build:
+ cp .env.local_dev .env
+ rm -rf apps/OpenSign/public/mfbuild
+ cd microfrontends/SignDocuments && npm install && npm run build
+ docker compose up -d
+
+run:
cp .env.local_dev .env
docker compose up -d
\ No newline at end of file
diff --git a/apps/OpenSign/Dockerfile b/apps/OpenSign/Dockerfile
index 7d8542bf6..57c815846 100644
--- a/apps/OpenSign/Dockerfile
+++ b/apps/OpenSign/Dockerfile
@@ -21,5 +21,5 @@ EXPOSE 3000
# ENV NODE_ENV production
# Run the application
-CMD ["npm", "start"]
+ENTRYPOINT npm run start-dev
diff --git a/apps/OpenSign/public/mfbuild/.gitkeep b/apps/OpenSign/public/mfbuild/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/apps/OpenSign/src/components/LoginGoogle.js b/apps/OpenSign/src/components/LoginGoogle.js
index e1db3abb4..5fbf3309c 100644
--- a/apps/OpenSign/src/components/LoginGoogle.js
+++ b/apps/OpenSign/src/components/LoginGoogle.js
@@ -141,6 +141,32 @@ const GoogleSignInBtn = ({
alert("Please fill required details!");
}
};
+ const handleCloseModal = () => {
+ setIsModal(false);
+ Parse.User.logOut();
+
+ let appdata = localStorage.getItem("userSettings");
+ let applogo = localStorage.getItem("appLogo");
+ let appName = localStorage.getItem("appName");
+ let defaultmenuid = localStorage.getItem("defaultmenuid");
+ let PageLanding = localStorage.getItem("PageLanding");
+ let domain = localStorage.getItem("domain");
+ let _appName = localStorage.getItem("_appName");
+ let baseUrl = localStorage.getItem("BaseUrl12");
+ let appid = localStorage.getItem("AppID12");
+
+ localStorage.clear();
+
+ localStorage.setItem("appLogo", applogo);
+ localStorage.setItem("appName", appName);
+ localStorage.setItem("_appName", _appName);
+ localStorage.setItem("defaultmenuid", defaultmenuid);
+ localStorage.setItem("PageLanding", PageLanding);
+ localStorage.setItem("domain", domain);
+ localStorage.setItem("userSettings", appdata);
+ localStorage.setItem("BaseUrl12", baseUrl);
+ localStorage.setItem("AppID12", appid);
+ };
return (
+ {/* this modal is used to show decline alert */}
+
+ Are you sure want to decline this document ?
+
+ ) : isDecline.currnt === "YouDeclined" ? (
+
You have declined this document!
+ ) : (
+ isDecline.currnt === "another" && (
+
+ You cannot sign this document as it has been declined by
+ one or more person(s).
+
+ )
+ )
+ }
+ footerMessage={isDecline.currnt === "Sure"}
+ declineDoc={declineDoc}
+ setIsDecline={setIsDecline}
+ />
+ {/* this modal is used for show expired alert */}
+
{/* this component used to render all pdf pages in left side */}
500 && "20px"
}}
>
-
-
- Document Expired!
-
-
-
-
- This Document is no longer available.
-
-
-
- {/* this modal is used for show decline alert */}
-
-
- Document Declined Alert!
-
-
-
- {isDecline.currnt === "Sure" ? (
-
- Are you sure want to decline this document ?
-
- ) : isDecline.currnt === "YouDeclined" ? (
-
You have declined this document!
- ) : (
- isDecline.currnt === "another" && (
-
- You cannot sign this document as it has been declined by
- one or more person(s).
-
- )
- )}
-
-
- {isDecline.currnt === "Sure" && (
- <>
-
-
- >
- )}
-
-
{/* this modal is used show this document is already sign */}
diff --git a/microfrontends/SignDocuments/src/Component/component/CustomModal.js b/microfrontends/SignDocuments/src/Component/component/CustomModal.js
new file mode 100644
index 000000000..bdf5fef6e
--- /dev/null
+++ b/microfrontends/SignDocuments/src/Component/component/CustomModal.js
@@ -0,0 +1,59 @@
+import React from "react";
+import "../../css/customModal.css";
+import "../../css/signature.css";
+
+function CustomModal({
+ show,
+ headMsg,
+ bodyMssg,
+ footerMessage,
+ declineDoc,
+ setIsDecline,
+ containerWH
+}) {
+ const isMobile = window.innerWidth < 767;
+ return (
+ show && (
+
+
+
{headMsg && headMsg}
+
+
{bodyMssg && bodyMssg}
+
+ {footerMessage && (
+
+
+
+
+ )}
+
+
+ )
+ );
+}
+
+export default CustomModal;
diff --git a/microfrontends/SignDocuments/src/Component/component/defaultSignature.js b/microfrontends/SignDocuments/src/Component/component/defaultSignature.js
index 782133bea..5bc7fedd9 100644
--- a/microfrontends/SignDocuments/src/Component/component/defaultSignature.js
+++ b/microfrontends/SignDocuments/src/Component/component/defaultSignature.js
@@ -1,5 +1,5 @@
-import React, { useEffect } from "react";
-import axios from "axios";
+import React from "react";
+
function DefaultSignature({
themeColor,
diff --git a/microfrontends/SignDocuments/src/Component/component/emailComponent.js b/microfrontends/SignDocuments/src/Component/component/emailComponent.js
index b9bb36752..5892c8ef5 100644
--- a/microfrontends/SignDocuments/src/Component/component/emailComponent.js
+++ b/microfrontends/SignDocuments/src/Component/component/emailComponent.js
@@ -26,7 +26,7 @@ function EmailComponent({
//function for send email
const sendEmail = async () => {
setIsLoading(true);
- let sendMail, recipent;
+ let sendMail;
for (let i = 0; i < emailCount.length; i++) {
try {
diff --git a/microfrontends/SignDocuments/src/Component/component/header.js b/microfrontends/SignDocuments/src/Component/component/header.js
index 8ab8d6994..94f7fa68f 100644
--- a/microfrontends/SignDocuments/src/Component/component/header.js
+++ b/microfrontends/SignDocuments/src/Component/component/header.js
@@ -37,7 +37,7 @@ function Header({
}) {
const isMobile = window.innerWidth < 767;
const navigate = useNavigate();
-
+ const isGuestSigner = localStorage.getItem("isGuestSigner");
//for go to previous page
function previousPage() {
changePage(-1);
@@ -81,14 +81,16 @@ function Header({
return (
{isMobile && isShowHeader ? (
{
+ let width;
+ if (isMobile) {
+ if (!pos.isMobile) {
+ width = pos.Width / scale ? pos.Width / scale : 150 / scale;
+ return width;
+ } else {
+ width = pos.Width ? pos.Width : 150;
+ return width;
+ }
+ } else {
+ width = pos.Width ? pos.Width : 150;
+ return width;
+ }
+ };
+ const posHeight = (pos) => {
+ let width;
+ if (isMobile) {
+ if (!pos.isMobile) {
+ width = pos.Height / scale ? pos.Height / scale : 60 / scale;
+ return width;
+ } else {
+ width = pos.Height ? pos.Height : 60;
+ return width;
+ }
+ } else {
+ width = pos.Height ? pos.Height : 60;
+ return width;
+ }
+ };
+ //check isGuestSigner is present in local if yes than handle login flow header in mobile view
+ const isGuestSigner = localStorage.getItem("isGuestSigner");
+ //function for render placeholder block over pdf document
const checkSignedSignes = (data) => {
const checkSign = signedSigners.filter(
(sign) => sign.objectId === data.signerObjId
@@ -56,7 +90,7 @@ function RenderPdf({
if (isMobile) {
//if pos.isMobile false -- placeholder saved from desktop view then handle position in mobile view divided by scale
if (!pos.isMobile) {
- return pos.xPosition / scale;
+ return pos.xPosition / scale - 20;
}
//pos.isMobile true -- placeholder save from mobile view(small device) handle position in mobile view(small screen) view divided by scale
else {
@@ -134,8 +168,8 @@ function RenderPdf({
borderWidth: "0.2px"
}}
size={{
- width: pos.Width ? pos.Width : 150,
- height: pos.Height ? pos.Height : 60
+ width: posWidth(pos),
+ height: posHeight(pos)
}}
lockAspectRatio={pos.Width && 2.5}
default={{
@@ -205,8 +239,8 @@ function RenderPdf({
y: yPos(pos)
}}
size={{
- width: pos.Width ? pos.Width : 150,
- height: pos.Height ? pos.Height : 60
+ width: posWidth(pos),
+ height: posHeight(pos)
}}
lockAspectRatio={pos.Width ? pos.Width / pos.Height : 2.5}
>
@@ -235,7 +269,8 @@ function RenderPdf({
{isMobile && scale ? (
{
const { value } = event.target;
-
setOTP(value);
};
//send email OTP function
-
const SendOtp = async (e) => {
const serverUrl =
localStorage.getItem("baseUrl") && localStorage.getItem("baseUrl");
-
const parseId =
localStorage.getItem("parseAppId") && localStorage.getItem("parseAppId");
-
if (serverUrl && localStorage) {
setLoading(true);
e.preventDefault();
@@ -84,13 +80,10 @@ function Login() {
e.preventDefault();
const serverUrl =
localStorage.getItem("baseUrl") && localStorage.getItem("baseUrl");
-
const parseId =
localStorage.getItem("parseAppId") && localStorage.getItem("parseAppId");
-
if (OTP) {
setLoading(true);
-
try {
let url = `${serverUrl}functions/AuthLoginAsMail/`;
const headers = {
@@ -102,7 +95,6 @@ function Login() {
otp: OTP
};
let user = await axios.post(url, body, { headers: headers });
-
if (user.data.result === "Invalid Otp") {
alert("Invalid Otp");
setLoading(false);
@@ -114,10 +106,12 @@ function Login() {
localStorage.setItem("UserInformation", JSON.stringify(_user));
localStorage.setItem("username", _user.name);
localStorage.setItem("accesstoken", _user.sessionToken);
+ //save isGuestSigner true in local to handle login flow header in mobile view
+ localStorage.setItem("isGuestSigner", true);
setLoading(false);
- //navigate user to on signature page
- // navigate(`/recipientSignPdf/${id}/${contactBookId}`);
- navigate(`/loadmf/signmicroapp/recipientSignPdf/${id}/${contactBookId}`);
+ navigate(
+ `/loadmf/signmicroapp/recipientSignPdf/${id}/${contactBookId}`
+ );
}
} catch (error) {}
} else {
@@ -173,9 +167,7 @@ function Login() {
Verification code is sent to your email
-
+
{loading ? (
diff --git a/microfrontends/SignDocuments/src/Component/placeHolderSign.js b/microfrontends/SignDocuments/src/Component/placeHolderSign.js
index 39db3656b..93be3b571 100644
--- a/microfrontends/SignDocuments/src/Component/placeHolderSign.js
+++ b/microfrontends/SignDocuments/src/Component/placeHolderSign.js
@@ -952,7 +952,7 @@ function PlaceHolderSign() {
background: themeColor()
}}
>
- Send Mail
+ Mails Sent
{/* signature modal */}
diff --git a/microfrontends/SignDocuments/src/Component/recipientSignPdf.js b/microfrontends/SignDocuments/src/Component/recipientSignPdf.js
index a60627218..d34dcf963 100644
--- a/microfrontends/SignDocuments/src/Component/recipientSignPdf.js
+++ b/microfrontends/SignDocuments/src/Component/recipientSignPdf.js
@@ -23,8 +23,8 @@ import Loader from "./component/loader";
import HandleError from "./component/HandleError";
import Nodata from "./component/Nodata";
import Header from "./component/header";
-import ModalComponent from "./component/modalComponent";
import RenderPdf from "./component/renderPdf";
+import CustomModal from "./component/CustomModal";
function EmbedPdfImage() {
const { id, contactBookId } = useParams();
const [isSignPad, setIsSignPad] = useState(false);
@@ -67,13 +67,15 @@ function EmbedPdfImage() {
status: false,
type: "load"
});
-
+ const [containerWH, setContainerWH] = useState({});
const docId = id && id;
const isMobile = window.innerWidth < 767;
const index = xyPostion.findIndex((object) => {
return object.pageNumber === pageNumber;
});
-
+ const divRef = useRef(null);
+ //check isGuestSigner is present in local if yes than handle login flow header in mobile view
+ const isGuestSigner = localStorage.getItem("isGuestSigner");
useEffect(() => {
const clientWidth = window.innerWidth;
const pdfWidth = clientWidth - 160 - 220 - 30;
@@ -82,6 +84,14 @@ function EmbedPdfImage() {
setPdfNewWidth(pdfWidth);
getDocumentDetails();
}, []);
+ useEffect(() => {
+ if (divRef.current) {
+ setContainerWH({
+ width: divRef.current.offsetWidth,
+ height: divRef.current.offsetHeight
+ });
+ }
+ }, [divRef.current]);
//function for get document details for perticular signer with signer'object id
const getDocumentDetails = async () => {
@@ -952,7 +962,37 @@ function EmbedPdfImage() {
) : noData ? (
) : (
-
+
+ {/* this modal is used to show decline alert */}
+ Are you sure want to decline this document ?
+ ) : isDecline.currnt === "YouDeclined" ? (
+
You have declined this document!
+ ) : (
+ isDecline.currnt === "another" && (
+
+ You cannot sign this document as it has been declined by one
+ or more person(s).
+
+ )
+ )
+ }
+ footerMessage={isDecline.currnt === "Sure"}
+ declineDoc={declineDoc}
+ setIsDecline={setIsDecline}
+ />
+ {/* this modal is used for show expired alert */}
+
{/* this component used for UI interaction and show their functionality */}
{pdfLoadFail.status &&
!isExpired &&
@@ -971,61 +1011,10 @@ function EmbedPdfImage() {
{/* pdf render view */}
- You cannot sign this document as it has been declined by
- one or more person(s).
-
- )
- )}
-
-
- {isDecline.currnt === "Sure" && (
- <>
-
-
- >
- )}
-
-
-
- {/* this modal component is used for show expired document */}
-
-
{/* this modal is used show this document is already sign */}
@@ -1138,9 +1127,9 @@ function EmbedPdfImage() {
)}