From 8d7b1a5b9b8fad6149d71cd24714106e455f0c45 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 28 Sep 2024 10:45:46 +0000 Subject: [PATCH 01/12] build(deps): bump rollup in /apps/OpenSign in the npm_and_yarn group Bumps the npm_and_yarn group in /apps/OpenSign with 1 update: [rollup](https://github.com/rollup/rollup). Updates `rollup` from 2.79.1 to 2.79.2 - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v2.79.1...v2.79.2) --- updated-dependencies: - dependency-name: rollup dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] --- apps/OpenSign/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/OpenSign/package-lock.json b/apps/OpenSign/package-lock.json index b46dbbcc1..d22b5d1fc 100644 --- a/apps/OpenSign/package-lock.json +++ b/apps/OpenSign/package-lock.json @@ -22508,9 +22508,9 @@ } }, "node_modules/rollup": { - "version": "2.79.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", - "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", + "version": "2.79.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.2.tgz", + "integrity": "sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==", "bin": { "rollup": "dist/bin/rollup" }, From 7e8ed42f46e9bae89727a5e11123cf0e2f94f66e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 00:49:48 +0000 Subject: [PATCH 02/12] build(deps): bump mongoose from 8.6.3 to 8.7.0 in /apps/OpenSignServer Bumps [mongoose](https://github.com/Automattic/mongoose) from 8.6.3 to 8.7.0. - [Release notes](https://github.com/Automattic/mongoose/releases) - [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md) - [Commits](https://github.com/Automattic/mongoose/compare/8.6.3...8.7.0) --- updated-dependencies: - dependency-name: mongoose dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- apps/OpenSignServer/package-lock.json | 16 ++++++++-------- apps/OpenSignServer/package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/OpenSignServer/package-lock.json b/apps/OpenSignServer/package-lock.json index 991518ba6..cd5e58bb6 100644 --- a/apps/OpenSignServer/package-lock.json +++ b/apps/OpenSignServer/package-lock.json @@ -25,7 +25,7 @@ "googleapis": "^144.0.0", "jsonschema": "^1.4.1", "mailgun.js": "^10.2.3", - "mongoose": "^8.6.3", + "mongoose": "^8.7.0", "multer": "^1.4.5-lts.1", "multer-s3": "^3.0.1", "node-forge": "^1.3.1", @@ -8247,13 +8247,13 @@ } }, "node_modules/mongoose": { - "version": "8.6.3", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.6.3.tgz", - "integrity": "sha512-++yRmm7hjMbqVA/8WeiygTnEfrFbiy+OBjQi49GFJIvCQuSYE56myyQWo4j5hbpcHjhHQU8NukMNGTwAWFWjIw==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.7.0.tgz", + "integrity": "sha512-rUCSF1mMYQXjXYdqEQLLlMD3xbcj2j1/hRn+9VnVj7ipzru/UoUZxlj/hWmteKMAh4EFnDZ+BIrmma9l/0Hi1g==", "dependencies": { "bson": "^6.7.0", "kareem": "2.6.3", - "mongodb": "6.8.0", + "mongodb": "6.9.0", "mpath": "0.9.0", "mquery": "5.0.0", "ms": "2.1.3", @@ -8325,9 +8325,9 @@ } }, "node_modules/mongoose/node_modules/mongodb": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.8.0.tgz", - "integrity": "sha512-HGQ9NWDle5WvwMnrvUxsFYPd3JEbqD3RgABHBQRuoCEND0qzhsd0iH5ypHsf1eJ+sXmvmyKpP+FLOKY8Il7jMw==", + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.9.0.tgz", + "integrity": "sha512-UMopBVx1LmEUbW/QE0Hw18u583PEDVQmUmVzzBRH0o/xtE9DBRA5ZYLOjpLIa03i8FXjzvQECJcqoMvCXftTUA==", "dependencies": { "@mongodb-js/saslprep": "^1.1.5", "bson": "^6.7.0", diff --git a/apps/OpenSignServer/package.json b/apps/OpenSignServer/package.json index 75d6c529f..2c7a31874 100644 --- a/apps/OpenSignServer/package.json +++ b/apps/OpenSignServer/package.json @@ -34,7 +34,7 @@ "googleapis": "^144.0.0", "jsonschema": "^1.4.1", "mailgun.js": "^10.2.3", - "mongoose": "^8.6.3", + "mongoose": "^8.7.0", "multer": "^1.4.5-lts.1", "multer-s3": "^3.0.1", "node-forge": "^1.3.1", From 0665bcf30aee76efeb4f7a7989de5be82ce440c2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 01:04:19 +0000 Subject: [PATCH 03/12] build(deps): bump react-bootstrap in /apps/OpenSign Bumps [react-bootstrap](https://github.com/react-bootstrap/react-bootstrap) from 2.10.4 to 2.10.5. - [Release notes](https://github.com/react-bootstrap/react-bootstrap/releases) - [Changelog](https://github.com/react-bootstrap/react-bootstrap/blob/master/CHANGELOG.md) - [Commits](https://github.com/react-bootstrap/react-bootstrap/compare/v2.10.4...v2.10.5) --- updated-dependencies: - dependency-name: react-bootstrap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/OpenSign/package-lock.json | 8 ++++---- apps/OpenSign/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/OpenSign/package-lock.json b/apps/OpenSign/package-lock.json index b46dbbcc1..e2f673fbd 100644 --- a/apps/OpenSign/package-lock.json +++ b/apps/OpenSign/package-lock.json @@ -28,7 +28,7 @@ "print-js": "^1.6.0", "radix-ui": "^1.0.1", "react": "^18.2.0", - "react-bootstrap": "^2.10.4", + "react-bootstrap": "^2.10.5", "react-confetti": "^6.1.0", "react-cookie": "^7.2.0", "react-datepicker": "^7.4.0", @@ -20271,9 +20271,9 @@ "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, "node_modules/react-bootstrap": { - "version": "2.10.4", - "resolved": "https://registry.npmjs.org/react-bootstrap/-/react-bootstrap-2.10.4.tgz", - "integrity": "sha512-W3398nBM2CBfmGP2evneEO3ZZwEMPtHs72q++eNw60uDGDAdiGn0f9yNys91eo7/y8CTF5Ke1C0QO8JFVPU40Q==", + "version": "2.10.5", + "resolved": "https://registry.npmjs.org/react-bootstrap/-/react-bootstrap-2.10.5.tgz", + "integrity": "sha512-XueAOEn64RRkZ0s6yzUTdpFtdUXs5L5491QU//8ZcODKJNDLt/r01tNyriZccjgRImH1REynUc9pqjiRMpDLWQ==", "dependencies": { "@babel/runtime": "^7.24.7", "@restart/hooks": "^0.4.9", diff --git a/apps/OpenSign/package.json b/apps/OpenSign/package.json index 579f02063..e1b1ff066 100644 --- a/apps/OpenSign/package.json +++ b/apps/OpenSign/package.json @@ -23,7 +23,7 @@ "print-js": "^1.6.0", "radix-ui": "^1.0.1", "react": "^18.2.0", - "react-bootstrap": "^2.10.4", + "react-bootstrap": "^2.10.5", "react-confetti": "^6.1.0", "react-cookie": "^7.2.0", "react-datepicker": "^7.4.0", From db640b04a6bdf1edc0f5d089a89f57bafcbe888f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 01:04:29 +0000 Subject: [PATCH 04/12] build(deps-dev): bump eslint-plugin-react in /apps/OpenSign Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.36.1 to 7.37.0. - [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases) - [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md) - [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.36.1...v7.37.0) --- updated-dependencies: - dependency-name: eslint-plugin-react dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- apps/OpenSign/package-lock.json | 8 ++++---- apps/OpenSign/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/OpenSign/package-lock.json b/apps/OpenSign/package-lock.json index b46dbbcc1..ea27abdb7 100644 --- a/apps/OpenSign/package-lock.json +++ b/apps/OpenSign/package-lock.json @@ -78,7 +78,7 @@ "dotenv-webpack": "^8.1.0", "eslint": "^9.11.1", "eslint-plugin-prettier": "^5.2.1", - "eslint-plugin-react": "^7.36.1", + "eslint-plugin-react": "^7.37.0", "lint-staged": "^15.2.10", "mini-css-extract-plugin": "^2.9.1", "postcss": "^8.4.47", @@ -10856,9 +10856,9 @@ } }, "node_modules/eslint-plugin-react": { - "version": "7.36.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.36.1.tgz", - "integrity": "sha512-/qwbqNXZoq+VP30s1d4Nc1C5GTxjJQjk4Jzs4Wq2qzxFM7dSmuG2UkIjg2USMLh3A/aVcUNrK7v0J5U1XEGGwA==", + "version": "7.37.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.0.tgz", + "integrity": "sha512-IHBePmfWH5lKhJnJ7WB1V+v/GolbB0rjS8XYVCSQCZKaQCAUhMoVoOEn1Ef8Z8Wf0a7l8KTJvuZg5/e4qrZ6nA==", "dependencies": { "array-includes": "^3.1.8", "array.prototype.findlast": "^1.2.5", diff --git a/apps/OpenSign/package.json b/apps/OpenSign/package.json index 579f02063..6c4f9fccf 100644 --- a/apps/OpenSign/package.json +++ b/apps/OpenSign/package.json @@ -110,7 +110,7 @@ "dotenv-webpack": "^8.1.0", "eslint": "^9.11.1", "eslint-plugin-prettier": "^5.2.1", - "eslint-plugin-react": "^7.36.1", + "eslint-plugin-react": "^7.37.0", "lint-staged": "^15.2.10", "mini-css-extract-plugin": "^2.9.1", "postcss": "^8.4.47", From 5cd0f55cb295a814627320dd1c0630954f1ca0b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 01:05:02 +0000 Subject: [PATCH 05/12] build(deps-dev): bump commitizen from 4.3.0 to 4.3.1 in /apps/OpenSign Bumps [commitizen](https://github.com/commitizen/cz-cli) from 4.3.0 to 4.3.1. - [Release notes](https://github.com/commitizen/cz-cli/releases) - [Commits](https://github.com/commitizen/cz-cli/compare/v4.3.0...v4.3.1) --- updated-dependencies: - dependency-name: commitizen dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- apps/OpenSign/package-lock.json | 8 ++++---- apps/OpenSign/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/OpenSign/package-lock.json b/apps/OpenSign/package-lock.json index b46dbbcc1..4ca098552 100644 --- a/apps/OpenSign/package-lock.json +++ b/apps/OpenSign/package-lock.json @@ -70,7 +70,7 @@ "autoprefixer": "^10.4.20", "babel-loader": "^9.2.1", "clean-webpack-plugin": "^4.0.0", - "commitizen": "^4.3.0", + "commitizen": "^4.3.1", "concurrently": "^9.0.1", "css-loader": "^7.1.2", "daisyui": "^4.12.10", @@ -8750,9 +8750,9 @@ } }, "node_modules/commitizen": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/commitizen/-/commitizen-4.3.0.tgz", - "integrity": "sha512-H0iNtClNEhT0fotHvGV3E9tDejDeS04sN1veIebsKYGMuGscFaswRoYJKmT3eW85eIJAs0F28bG2+a/9wCOfPw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/commitizen/-/commitizen-4.3.1.tgz", + "integrity": "sha512-gwAPAVTy/j5YcOOebcCRIijn+mSjWJC+IYKivTu6aG8Ei/scoXgfsMRnuAk6b0GRste2J4NGxVdMN3ZpfNaVaw==", "dev": true, "dependencies": { "cachedir": "2.3.0", diff --git a/apps/OpenSign/package.json b/apps/OpenSign/package.json index 579f02063..5fc089bbf 100644 --- a/apps/OpenSign/package.json +++ b/apps/OpenSign/package.json @@ -102,7 +102,7 @@ "autoprefixer": "^10.4.20", "babel-loader": "^9.2.1", "clean-webpack-plugin": "^4.0.0", - "commitizen": "^4.3.0", + "commitizen": "^4.3.1", "concurrently": "^9.0.1", "css-loader": "^7.1.2", "daisyui": "^4.12.10", From 76a69d8f3bb5cbb5c5d9bd28b175e7fc4e2b06df Mon Sep 17 00:00:00 2001 From: prafull-opensignlabs Date: Mon, 30 Sep 2024 10:42:31 +0530 Subject: [PATCH 06/12] fix: enableOTP is not working correctly --- .../customRoute/v1/routes/CreateDocumentWithTemplate.js | 5 +++-- .../cloud/customRoute/v1/routes/updateDocument.js | 4 ++-- .../cloud/customRoute/v1/routes/updateTemplate.js | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js b/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js index ec344b130..b0a46e603 100644 --- a/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js +++ b/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js @@ -196,8 +196,9 @@ export default async function createDocumentWithTemplate(request, response) { if (TimeToCompleteDays) { object.set('TimeToCompleteDays', TimeToCompleteDays); } - const enableOTP = request.body?.enableOTP === true ? true : false; - const IsEnableOTP = enableOTP || template?.IsEnableOTP || false; + const enableOTP = request.body?.enableOTP; + const IsEnableOTP = + enableOTP !== undefined ? enableOTP : template?.IsEnableOTP || false; object.set('IsEnableOTP', IsEnableOTP); object.set('CreatedBy', template.CreatedBy); object.set('ExtUserPtr', { diff --git a/apps/OpenSignServer/cloud/customRoute/v1/routes/updateDocument.js b/apps/OpenSignServer/cloud/customRoute/v1/routes/updateDocument.js index 81a3fa5d3..f2ea62ce6 100644 --- a/apps/OpenSignServer/cloud/customRoute/v1/routes/updateDocument.js +++ b/apps/OpenSignServer/cloud/customRoute/v1/routes/updateDocument.js @@ -48,10 +48,10 @@ export default async function updateDocument(request, response) { objectId: request?.body?.folderId, }); } - - if (request.body?.enableOTP) { + if (request.body?.enableOTP !== undefined) { updateQuery.set('IsEnableOTP', request.body?.enableOTP); } + const updatedRes = await updateQuery.save(null, { useMasterKey: true }); if (updatedRes) { if (request.posthog) { diff --git a/apps/OpenSignServer/cloud/customRoute/v1/routes/updateTemplate.js b/apps/OpenSignServer/cloud/customRoute/v1/routes/updateTemplate.js index 735e699aa..87bbcf11b 100644 --- a/apps/OpenSignServer/cloud/customRoute/v1/routes/updateTemplate.js +++ b/apps/OpenSignServer/cloud/customRoute/v1/routes/updateTemplate.js @@ -48,7 +48,7 @@ export default async function updateTemplate(request, response) { objectId: request?.body?.folderId, }); } - if (request.body?.enableOTP) { + if (request.body?.enableOTP !== undefined) { updateQuery.set('IsEnableOTP', request.body?.enableOTP); } const updatedRes = await updateQuery.save(null, { useMasterKey: true }); From 74df84e4493e1340d8418404f6d141585abc0b00 Mon Sep 17 00:00:00 2001 From: prafull-opensignlabs Date: Mon, 30 Sep 2024 16:23:48 +0530 Subject: [PATCH 07/12] feat: add upload option in initials in my signature --- apps/OpenSign/src/pages/Managesign.js | 131 ++++++++++++++++---------- 1 file changed, 83 insertions(+), 48 deletions(-) diff --git a/apps/OpenSign/src/pages/Managesign.js b/apps/OpenSign/src/pages/Managesign.js index fc905a002..326040082 100644 --- a/apps/OpenSign/src/pages/Managesign.js +++ b/apps/OpenSign/src/pages/Managesign.js @@ -24,9 +24,11 @@ const ManageSign = () => { const [Initials, setInitials] = useState(""); const [isInitials, setIsInitials] = useState(false); const [id, setId] = useState(""); + const [imgInitials, setImgInitials] = useState(""); const canvasRef = useRef(null); const imageRef = useRef(null); const initailsRef = useRef(null); + const imgInitialsRef = useRef(null); useEffect(() => { fetchUserSign(); // eslint-disable-next-line @@ -54,8 +56,9 @@ const ManageSign = () => { } setImage(res?.ImageURL); if (res && res.Initials) { - setInitials(res.Initials); + // setInitials(res.Initials); setIsInitials(true); + setImgInitials(res?.Initials); } } else { if (User?.get("name")) { @@ -95,6 +98,10 @@ const ManageSign = () => { if (initailsRef.current) { initailsRef.current.clear(); } + if (imgInitialsRef.current) { + imgInitialsRef.current.value = ""; + } + setImgInitials(""); setInitials(""); if (image) { setIsValue(true); @@ -119,8 +126,7 @@ const ManageSign = () => { }; const handleSubmit = async (e) => { e.preventDefault(); - const isUrl = image.includes("https") || image.includes("http"); - + const isUrl = image?.includes("https") || image?.includes("http"); if (!isvalue) { setWarning(true); setTimeout(() => setWarning(false), 1000); @@ -142,15 +148,25 @@ const ManageSign = () => { } else { imgUrl = image; } - let initialsUrl = ""; const isInitialsUrl = - Initials.includes("https") || Initials.includes("http"); - if (!isInitialsUrl && Initials) { - const initialsImg = base64StringtoFile( - Initials, - `${replaceSpace}_initials.png` - ); - initialsUrl = await uploadFile(initialsImg); + imgInitials?.includes("https") || imgInitials?.includes("http"); + + let initialFile; + if (Initials) { + initialFile = base64StringtoFile(Initials, `${replaceSpace}_sign.png`); + } else { + if (imgInitials && !isInitialsUrl) { + initialFile = base64StringtoFile( + imgInitials, + `${replaceSpace}__sign.png` + ); + } + } + let initialsUrl; + if (initialFile && !isInitialsUrl) { + initialsUrl = await uploadFile(initialFile); + } else { + initialsUrl = imgInitials; } if (imgUrl) { await saveEntry({ @@ -191,7 +207,7 @@ const ManageSign = () => { const saveEntry = async (obj) => { const signCls = "contracts_Signature"; - const User = Parse.User.current().id; + const User = Parse?.User?.current()?.id; const userId = { __type: "Pointer", className: "_User", objectId: User }; if (id) { try { @@ -202,20 +218,13 @@ const ManageSign = () => { updateSign.set("SignatureName", obj.name); updateSign.set("UserId", userId); const res = await updateSign.save(); - setIsLoader(false); - setIsAlert({ - type: "success", - message: t("signature-saved-alert") - }); - setTimeout(() => setIsAlert({}), 2000); + setIsAlert({ type: "success", message: t("signature-saved-alert") }); return res; } catch (err) { console.log(err); + setIsAlert({ type: "danger", message: `${err.message}` }); + } finally { setIsLoader(false); - setIsAlert({ - type: "danger", - message: `${err.message}` - }); setTimeout(() => setIsAlert({}), 2000); } } else { @@ -226,20 +235,13 @@ const ManageSign = () => { updateSign.set("SignatureName", obj.name); updateSign.set("UserId", userId); const res = await updateSign.save(); - setIsLoader(false); - setIsAlert({ - type: "success", - message: t("signature-saved-alert") - }); - setTimeout(() => setIsAlert({}), 2000); + setIsAlert({ type: "success", message: t("signature-saved-alert") }); return res; } catch (err) { console.log(err); + setIsAlert({ type: "success", message: `${err.message}` }); + } finally { setIsLoader(false); - setIsAlert({ - type: "success", - message: `${err.message}` - }); setTimeout(() => setIsAlert({}), 2000); } } @@ -250,7 +252,29 @@ const ManageSign = () => { }; const handleInitialsChange = () => { setInitials(initailsRef.current.toDataURL()); - setIsValue(true); + if (image || signature) { + setIsValue(true); + } + }; + const handleUploadInitials = () => { + imgInitialsRef.current.click(); + }; + const onImgInitialsChange = async (event) => { + if (initailsRef.current) { + initailsRef.current.clear(); + } + setInitials(""); + if (event.target.files && event.target.files[0]) { + const file = event.target.files[0]; + const base64Img = await toDataUrl(file); + setImgInitials(base64Img); + if (image || signature) { + setIsValue(true); + } + } else { + setImgInitials(""); + setIsValue(false); + } }; return (
@@ -348,7 +372,7 @@ const ManageSign = () => { className="op-link" onClick={() => handleUploadBtn()} > - {t("upload-image")} + {t("upload")}
{ {t("initials")} +
- {isInitials ? ( + {imgInitials ? (
inititals
) : ( @@ -393,9 +421,7 @@ const ManageSign = () => { className: "intialSignature rounded-box" }} // backgroundColor="rgb(255, 255, 255)" - onEnd={() => - handleInitialsChange(initailsRef.current.toDataURL()) - } + onEnd={() => handleInitialsChange()} dotSize={1} /> )} @@ -418,6 +444,7 @@ const ManageSign = () => { ? "2px solid black" : "2px solid white" }} + className="fa-light fa-pen-nib" onClick={() => { if (key === 0) { setInitialPen("blue"); @@ -428,7 +455,6 @@ const ManageSign = () => { } }} key={key} - className="fa-light fa-pen-nib" width={20} height={20} > @@ -437,13 +463,22 @@ const ManageSign = () => {
)}
-
+
handleClearInitials()} + onClick={() => handleUploadInitials()} > - {t("clear")} + {t("upload")} +
+
+
handleClearInitials()} + > + {t("clear")} +
From 86f0622c4ab7a099b92180582ee3bbab5f5e437d Mon Sep 17 00:00:00 2001 From: RaktimaNXG Date: Mon, 30 Sep 2024 19:37:17 +0530 Subject: [PATCH 08/12] fix: disable otp issue in public signing flow --- apps/OpenSign/src/pages/PdfRequestFiles.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/apps/OpenSign/src/pages/PdfRequestFiles.js b/apps/OpenSign/src/pages/PdfRequestFiles.js index 44a06b314..eec52bb83 100644 --- a/apps/OpenSign/src/pages/PdfRequestFiles.js +++ b/apps/OpenSign/src/pages/PdfRequestFiles.js @@ -1511,7 +1511,17 @@ function PdfRequestFiles(props) { if (userRes?.data?.result) { setRes(userRes.data.result); - await SendOtp(); + const isEnableOTP = pdfDetails?.[0]?.IsEnableOTP || false; + if (isEnableOTP) { + await SendOtp(); + } else { + setIsPublicContact(false); + setIsPublicTemplate(false); + setIsLoading({ isLoad: false }); + setDocumentId(userRes.data?.result?.docId); + getDocumentDetails(userRes?.data?.result?.docId); + contactBookId = userRes?.data?.result?.contactId || ""; + } } else { console.log("error in public-sign to create user details"); setIsAlert({ From 6bd8a8fea875e8a469b78ab204f681266607c0e9 Mon Sep 17 00:00:00 2001 From: prafull-opensignlabs Date: Mon, 30 Sep 2024 19:51:17 +0530 Subject: [PATCH 09/12] refactor: set fileAcl to none --- apps/OpenSignServer/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/OpenSignServer/index.js b/apps/OpenSignServer/index.js index 88569decf..26b16b5f9 100644 --- a/apps/OpenSignServer/index.js +++ b/apps/OpenSignServer/index.js @@ -24,8 +24,9 @@ if (useLocal !== 'true') { try { const spacesEndpoint = new AWS.Endpoint(process.env.DO_ENDPOINT); const s3Options = { - bucket: process.env.DO_SPACE, // globalConfig.S3FilesAdapter.bucket, + bucket: process.env.DO_SPACE, baseUrl: process.env.DO_BASEURL, + fileAcl: 'none', region: process.env.DO_REGION, directAccess: true, preserveFileName: true, From 05cf3ef7fecc341a3e4334ad64975dd5cdc25ec6 Mon Sep 17 00:00:00 2001 From: RaktimaNXG Date: Mon, 30 Sep 2024 20:55:43 +0530 Subject: [PATCH 10/12] fix: unexpected finish button visible after finish signature in disable otp public signing flow --- apps/OpenSign/src/pages/PdfRequestFiles.js | 11 ++++++----- apps/OpenSign/src/pages/PlaceHolderSign.js | 4 ++-- apps/OpenSign/src/primitives/GetReportDisplay.js | 6 +++--- apps/OpenSignServer/cloud/customRoute/autoReminder.js | 2 +- .../v1/routes/CreateDocumentWithTemplate.js | 2 +- .../v1/routes/createDocumentwithCoordinate.js | 2 +- .../cloud/customRoute/v1/routes/resendMail.js | 2 +- .../cloud/parsefunction/PublicUserLinkContactToDoc.js | 2 +- .../cloud/parsefunction/createBatchDocs.js | 2 +- 9 files changed, 17 insertions(+), 16 deletions(-) diff --git a/apps/OpenSign/src/pages/PdfRequestFiles.js b/apps/OpenSign/src/pages/PdfRequestFiles.js index eec52bb83..4805be403 100644 --- a/apps/OpenSign/src/pages/PdfRequestFiles.js +++ b/apps/OpenSign/src/pages/PdfRequestFiles.js @@ -429,7 +429,7 @@ function PdfRequestFiles(props) { currUserId = getCurrentSigner?.objectId ? getCurrentSigner.objectId - : contactBookId || ""; + : signerObjectId || ""; if (isEnableSubscription) { await checkIsSubscribed( documentData[0]?.ExtUserPtr?.objectId, @@ -1013,7 +1013,7 @@ function PdfRequestFiles(props) { receiver_phone: user.Phone, expiry_date: localExpireDate, company_name: orgName, - signing_url: `Sign here` + signing_url: `Sign here` }; replaceVar = replaceMailVaribles( requestSubject, @@ -1047,7 +1047,7 @@ function PdfRequestFiles(props) { orgName + " Expires on " + localExpireDate + - "

This is an automated email from OpenSign™. For any queries regarding this email, please contact the sender " + senderEmail + @@ -1517,10 +1517,11 @@ function PdfRequestFiles(props) { } else { setIsPublicContact(false); setIsPublicTemplate(false); - setIsLoading({ isLoad: false }); + setLoading(false); setDocumentId(userRes.data?.result?.docId); getDocumentDetails(userRes?.data?.result?.docId); - contactBookId = userRes?.data?.result?.contactId || ""; + const contactId = userRes.data.result?.contactId; + setSignerObjectId(contactId); } } else { console.log("error in public-sign to create user details"); diff --git a/apps/OpenSign/src/pages/PlaceHolderSign.js b/apps/OpenSign/src/pages/PlaceHolderSign.js index 819351290..aa31b6942 100644 --- a/apps/OpenSign/src/pages/PlaceHolderSign.js +++ b/apps/OpenSign/src/pages/PlaceHolderSign.js @@ -1121,7 +1121,7 @@ function PlaceHolderSign() { receiver_phone: signerMail[i]?.Phone || "", expiry_date: localExpireDate, company_name: orgName, - signing_url: `Sign here` + signing_url: `Sign here` }; replaceVar = replaceMailVaribles( requestSubject, @@ -1155,7 +1155,7 @@ function PlaceHolderSign() { orgName + " Expire on " + localExpireDate + - "

This is an automated email from OpenSign™. For any queries regarding this email, please contact the sender " + senderEmail + diff --git a/apps/OpenSign/src/primitives/GetReportDisplay.js b/apps/OpenSign/src/primitives/GetReportDisplay.js index 920246cde..d918b31a7 100644 --- a/apps/OpenSign/src/primitives/GetReportDisplay.js +++ b/apps/OpenSign/src/primitives/GetReportDisplay.js @@ -711,7 +711,7 @@ const ReportTable = (props) => { receiver_phone: userDetails?.Phone || "", expiry_date: localExpireDate, company_name: doc.ExtUserPtr.Company, - signing_url: `Sign here` + signing_url: `Sign here` }; const res = replaceMailVaribles(subject, "", variables); @@ -740,7 +740,7 @@ const ReportTable = (props) => { receiver_phone: userDetails?.Phone || "", expiry_date: localExpireDate, company_name: doc.ExtUserPtr.Company, - signing_url: `Sign here` + signing_url: `Sign here` }; const res = replaceMailVaribles("", body, variables); @@ -781,7 +781,7 @@ const ReportTable = (props) => { receiver_phone: user?.signerPtr?.Phone || "", expiry_date: localExpireDate, company_name: doc?.ExtUserPtr?.Company || "", - signing_url: `Sign here` + signing_url: `Sign here` }; const subject = diff --git a/apps/OpenSignServer/cloud/customRoute/autoReminder.js b/apps/OpenSignServer/cloud/customRoute/autoReminder.js index 05fc0cd25..a93c4291d 100644 --- a/apps/OpenSignServer/cloud/customRoute/autoReminder.js +++ b/apps/OpenSignServer/cloud/customRoute/autoReminder.js @@ -53,7 +53,7 @@ async function sendMail(doc, signer) { receiver_phone: signer?.Phone || '', expiry_date: localExpireDate, company_name: doc?.ExtUserPtr?.Company || '', - signing_url: `Sign here`, + signing_url: `Sign here`, }; const mail = replaceMailVaribles(subject, body, variables); diff --git a/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js b/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js index b0a46e603..d931b02d8 100644 --- a/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js +++ b/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js @@ -269,7 +269,7 @@ export default async function createDocumentWithTemplate(request, response) { orgName + " Expires on " + localExpireDate + - "

This is an automated email from OpenSign™. For any queries regarding this email, please contact the sender " + sender + diff --git a/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js b/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js index 29404049c..59c681c1e 100644 --- a/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js +++ b/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js @@ -325,7 +325,7 @@ export default async function createDocumentwithCoordinate(request, response) { orgName + " Expires on " + localExpireDate + - "

This is an automated email from OpenSign™. For any queries regarding this email, please contact the sender " + sender + diff --git a/apps/OpenSignServer/cloud/customRoute/v1/routes/resendMail.js b/apps/OpenSignServer/cloud/customRoute/v1/routes/resendMail.js index 794fc8943..b72d00528 100644 --- a/apps/OpenSignServer/cloud/customRoute/v1/routes/resendMail.js +++ b/apps/OpenSignServer/cloud/customRoute/v1/routes/resendMail.js @@ -86,7 +86,7 @@ export default async function resendMail(request, response) { orgName + " Expires on " + localExpireDate + - "

This is an automated email from OpenSign™. For any queries regarding this email, please contact the sender " + sender + diff --git a/apps/OpenSignServer/cloud/parsefunction/PublicUserLinkContactToDoc.js b/apps/OpenSignServer/cloud/parsefunction/PublicUserLinkContactToDoc.js index 0b103d83b..00c40e762 100644 --- a/apps/OpenSignServer/cloud/parsefunction/PublicUserLinkContactToDoc.js +++ b/apps/OpenSignServer/cloud/parsefunction/PublicUserLinkContactToDoc.js @@ -168,7 +168,7 @@ const sendMailToAllSigners = async docId => { receiver_phone: signerMail[i]?.Phone || '', expiry_date: localExpireDate, company_name: orgName, - signing_url: `Sign here`, + signing_url: `Sign here`, }; replaceVar = replaceMailVaribles(requestSubject, htmlReqBody, variables); } diff --git a/apps/OpenSignServer/cloud/parsefunction/createBatchDocs.js b/apps/OpenSignServer/cloud/parsefunction/createBatchDocs.js index 3df13cc65..dad7b197f 100644 --- a/apps/OpenSignServer/cloud/parsefunction/createBatchDocs.js +++ b/apps/OpenSignServer/cloud/parsefunction/createBatchDocs.js @@ -95,7 +95,7 @@ async function sendMail(document, sessionToken) { orgName + " Expires on " + localExpireDate + - "

This is an automated email from OpenSign™. For any queries regarding this email, please contact the sender " + sender + From 5556fafa94c23a4f86ac09cbef6422d985cf470d Mon Sep 17 00:00:00 2001 From: RaktimaNXG Date: Tue, 1 Oct 2024 12:20:28 +0530 Subject: [PATCH 11/12] fix: document download issue in the disabled OTP public sign flow before signing and subscription issue in the guest login process --- .../public/locales/en/translation.json | 7 ++++--- .../public/locales/fr/translation.json | 7 ++++--- apps/OpenSign/src/components/pdf/PdfHeader.js | 6 +----- apps/OpenSign/src/pages/PdfRequestFiles.js | 18 ++++++------------ apps/OpenSign/src/pages/TemplatePlaceholder.js | 2 +- apps/OpenSign/src/pages/UserProfile.js | 2 +- .../src/primitives/GetReportDisplay.js | 14 +++++++------- .../src/script/locales/en/translation.json | 7 ++++--- .../src/script/locales/fr/translation.json | 7 ++++--- 9 files changed, 32 insertions(+), 38 deletions(-) diff --git a/apps/OpenSign/public/locales/en/translation.json b/apps/OpenSign/public/locales/en/translation.json index 19f3e5610..461ce6af7 100644 --- a/apps/OpenSign/public/locales/en/translation.json +++ b/apps/OpenSign/public/locales/en/translation.json @@ -265,10 +265,10 @@ "make-template-public-alert": "Are you sure you want to make this template public?", "make-template-private-alert": "Are you sure you want to make this template private? This will remove it from your public profile.", "public-role": "Public role", - "public-url": "Public URL", + "public-url": "Public profile needed", "public-url-copy": "Here’s your public URL: ", "public-url-copy-mssg":"Copy it or share it with the signer, and you will be able to see all your publicly set templates.", - "add-public-url-alert": "Please add your public URL, and you will be able to make a public template.", + "add-public-url-alert": "Please complete your OpenSign public profile setup. Once done, you’ll be able to make templates public. This process only needs to be completed once.", "share-with-alert": "You cannot share a template if any roles already have contacts assigned. Please remove all contact assignments from the roles before sharing the template.", "share-with": "Share with", "team-not-found": "Team not found", @@ -672,6 +672,7 @@ "document-logs":"Document logs", "server-down": "Unable to connect to the OpenSign server. If you are self-hosting OpenSign, please ensure that all the steps in the documentation have been followed correctly. If you're running OpenSign locally, you might be accessing it through an incorrect port number.", "admin-exists": "Admin already exists. Please login to the application using admin credentials in order to manage users.", - "public-tour-message":"Please make template public to copy public URL" + "public-tour-message":"The template needs to be public before you can generate a shareable link.", + "add-user-template": "You need to add a role before you can add fields for it." } diff --git a/apps/OpenSign/public/locales/fr/translation.json b/apps/OpenSign/public/locales/fr/translation.json index 0e1cce477..52dbd9933 100644 --- a/apps/OpenSign/public/locales/fr/translation.json +++ b/apps/OpenSign/public/locales/fr/translation.json @@ -264,10 +264,10 @@ "make-template-public-alert": "Êtes-vous sûr de vouloir rendre ce modèle public ?", "make-template-private-alert": "Êtes-vous sûr de vouloir rendre ce modèle privé ? Cela le supprimera de votre profil public.", "public-role": "Rôle public", - "public-url": "URL publique", + "public-url": "Profil public requis", "public-url-copy": "Voici votre URL publique : ", "public-url-copy-mssg": "copiez-la ou partagez-le avec le signataire et vous pouvoir voir tous vos paramètres publics modèles.", - "add-public-url-alert": "Veuillez ajouter votre URL publique et vous pourra rendre public modèle.", + "add-public-url-alert": "Veuillez terminer la configuration de votre profil public OpenSign. Une fois cela fait, vous pourrez rendre les modèles publics. Ce processus ne doit être effectué qu’une seule fois.", "share-with-alert": "Vous ne pouvez pas partager un modèle si des contacts sont déjà attribués à des rôles. Veuillez supprimer toutes les attributions de contacts des rôles avant de partager le modèle.", "share-with": "Partager avec", "team-not-found": "Équipe introuvable", @@ -671,7 +671,8 @@ "document-logs":"Journaux de documents", "server-down": "Impossible de se connecter au serveur OpenSign. Si vous hébergez vous-même OpenSign, veuillez vous assurer que toutes les étapes de la documentation ont été correctement suivies. Si vous exécutez OpenSign localement, vous y accédez peut-être via un numéro de port incorrect.", "admin-exists": "L'administrateur existe déjà. Veuillez vous connecter à l'application en utilisant les informations d'identification de l'administrateur afin de gérer les utilisateurs.", - "public-tour-message":"Veuillez rendre le modèle public pour copier l'URL publique" + "public-tour-message": "Le modèle doit être public avant que vous puissiez générer un lien partageable.", + "add-user-template":"Vous devez ajouter un rôle avant de pouvoir lui ajouter des champs. " } diff --git a/apps/OpenSign/src/components/pdf/PdfHeader.js b/apps/OpenSign/src/components/pdf/PdfHeader.js index 93b74cef7..ed67d517b 100644 --- a/apps/OpenSign/src/components/pdf/PdfHeader.js +++ b/apps/OpenSign/src/components/pdf/PdfHeader.js @@ -418,11 +418,7 @@ function Header({ {templateId && (

)} diff --git a/apps/OpenSign/src/script/locales/en/translation.json b/apps/OpenSign/src/script/locales/en/translation.json index 3e9970d37..f96845408 100644 --- a/apps/OpenSign/src/script/locales/en/translation.json +++ b/apps/OpenSign/src/script/locales/en/translation.json @@ -265,10 +265,10 @@ "make-template-public-alert": "Are you sure you want to make this template public?", "make-template-private-alert": "Are you sure you want to make this template private? This will remove it from your public profile.", "public-role": "Public role", - "public-url": "Public URL", + "public-url": "Public profile needed", "public-url-copy": "Here’s your public URL: ", "public-url-copy-mssg": "Copy it or share it with the signer, and you will be able to see all your publicly set templates.", - "add-public-url-alert": "Please add your public URL, and you will be able to make a public template.", + "add-public-url-alert": "Please complete your OpenSign public profile setup. Once done, you’ll be able to make templates public. This process only needs to be completed once.", "share-with-alert": "You cannot share a template if any roles already have contacts assigned. Please remove all contact assignments from the roles before sharing the template.", "share-with": "Share with", "team-not-found": "Team not found", @@ -672,5 +672,6 @@ "document-logs": "Document logs", "server-down": "Unable to connect to the OpenSign server. If you are self-hosting OpenSign, please ensure that all the steps in the documentation have been followed correctly. If you're running OpenSign locally, you might be accessing it through an incorrect port number.", "admin-exists": "Admin already exists. Please login to the application using admin credentials in order to manage users.", - "public-tour-message": "Please make template public to copy public URL" + "public-tour-message":"The template needs to be public before you can generate a shareable link.", + "add-user-template": "You need to add a role before you can add fields for it." } diff --git a/apps/OpenSign/src/script/locales/fr/translation.json b/apps/OpenSign/src/script/locales/fr/translation.json index 6b3cde993..b83b915b7 100644 --- a/apps/OpenSign/src/script/locales/fr/translation.json +++ b/apps/OpenSign/src/script/locales/fr/translation.json @@ -264,10 +264,10 @@ "make-template-public-alert": "Êtes-vous sûr de vouloir rendre ce modèle public ?", "make-template-private-alert": "Êtes-vous sûr de vouloir rendre ce modèle privé ? Cela le supprimera de votre profil public.", "public-role": "Rôle public", - "public-url": "URL publique", + "public-url": "Profil public requis", "public-url-copy": "Voici votre URL publique : ", "public-url-copy-mssg": "copiez-la ou partagez-le avec le signataire et vous pouvoir voir tous vos paramètres publics modèles.", - "add-public-url-alert": "Veuillez ajouter votre URL publique et vous pourra rendre public modèle.", + "add-public-url-alert": "Veuillez terminer la configuration de votre profil public OpenSign. Une fois cela fait, vous pourrez rendre les modèles publics. Ce processus ne doit être effectué qu’une seule fois.", "share-with-alert": "Vous ne pouvez pas partager un modèle si des contacts sont déjà attribués à des rôles. Veuillez supprimer toutes les attributions de contacts des rôles avant de partager le modèle.", "share-with": "Partager avec", "team-not-found": "Équipe introuvable", @@ -671,5 +671,6 @@ "document-logs": "Journaux de documents", "server-down": "Impossible de se connecter au serveur OpenSign. Si vous hébergez vous-même OpenSign, veuillez vous assurer que toutes les étapes de la documentation ont été correctement suivies. Si vous exécutez OpenSign localement, vous y accédez peut-être via un numéro de port incorrect.", "admin-exists": "L'administrateur existe déjà. Veuillez vous connecter à l'application en utilisant les informations d'identification de l'administrateur afin de gérer les utilisateurs.", - "public-tour-message": "Veuillez rendre le modèle public pour copier l'URL publique" + "public-tour-message": "Le modèle doit être public avant que vous puissiez générer un lien partageable.", + "add-user-template":"Vous devez ajouter un rôle avant de pouvoir lui ajouter des champs. " } From c8f5c80d5b4c585c7bfcdfd397d9d5a0786a7a3a Mon Sep 17 00:00:00 2001 From: RaktimaNXG Date: Tue, 1 Oct 2024 12:40:53 +0530 Subject: [PATCH 12/12] fix: update tagline maxlength --- apps/OpenSign/src/pages/UserProfile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/OpenSign/src/pages/UserProfile.js b/apps/OpenSign/src/pages/UserProfile.js index 22e4e0c7d..f05321f98 100644 --- a/apps/OpenSign/src/pages/UserProfile.js +++ b/apps/OpenSign/src/pages/UserProfile.js @@ -564,7 +564,7 @@ function UserProfile() { {editmode || !extendUser?.[0]?.UserName ? ( <> {editmode || !extendUser?.[0]?.Tagline ? (