Compare commits

...
Author SHA1 Message Date
prafull-opensignlabs 98efff65c9 Merge pull request #1295 from nxglabs/sync-to-public_repo-17787708673
fix: show signer name in typed signature instead in selfsign flow
2025-09-17 05:48:01 +00:00
6 changed files with 846 additions and 848 deletions
+6 -6
View File
@@ -3,13 +3,13 @@
"version": "2.26.0", "version": "2.26.0",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@formkit/auto-animate": "^0.8.4", "@formkit/auto-animate": "^0.9.0",
"@imgly/background-removal": "^1.7.0", "@imgly/background-removal": "^1.7.0",
"@lottiefiles/dotlottie-react": "^0.15.2", "@lottiefiles/dotlottie-react": "^0.16.2",
"@pdf-lib/fontkit": "^1.1.1", "@pdf-lib/fontkit": "^1.1.1",
"@radix-ui/themes": "^3.2.1", "@radix-ui/themes": "^3.2.1",
"@reduxjs/toolkit": "^2.8.2", "@reduxjs/toolkit": "^2.8.2",
"axios": "^1.11.0", "axios": "^1.12.2",
"date-fns-tz": "^3.2.0", "date-fns-tz": "^3.2.0",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
"i18next": "^25.4.0", "i18next": "^25.4.0",
@@ -42,7 +42,7 @@
"react-quill-new": "^3.6.0", "react-quill-new": "^3.6.0",
"react-redux": "^9.2.0", "react-redux": "^9.2.0",
"react-rnd": "^10.5.2", "react-rnd": "^10.5.2",
"react-router": "^7.8.2", "react-router": "^7.9.1",
"react-scrollbars-custom": "^4.1.1", "react-scrollbars-custom": "^4.1.1",
"react-select": "^5.10.2", "react-select": "^5.10.2",
"react-signature-canvas": "^1.1.0-alpha.2", "react-signature-canvas": "^1.1.0-alpha.2",
@@ -101,7 +101,7 @@
"@testing-library/jest-dom": "^6.8.0", "@testing-library/jest-dom": "^6.8.0",
"@testing-library/react": "^16.3.0", "@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1", "@testing-library/user-event": "^14.6.1",
"@types/react": "^19.1.12", "@types/react": "^19.1.13",
"@vitejs/plugin-react": "^4.7.0", "@vitejs/plugin-react": "^4.7.0",
"@vitest/ui": "^3.2.4", "@vitest/ui": "^3.2.4",
"autoprefixer": "^10.4.21", "autoprefixer": "^10.4.21",
@@ -113,7 +113,7 @@
"eslint": "^9.34.0", "eslint": "^9.34.0",
"eslint-plugin-prettier": "^5.5.4", "eslint-plugin-prettier": "^5.5.4",
"eslint-plugin-react": "^7.37.5", "eslint-plugin-react": "^7.37.5",
"jsdom": "^26.1.0", "jsdom": "^27.0.0",
"lint-staged": "^16.1.6", "lint-staged": "^16.1.6",
"postcss": "^8.5.6", "postcss": "^8.5.6",
"prettier": "^3.6.2", "prettier": "^3.6.2",
@@ -671,18 +671,21 @@ function WidgetsValueModal(props) {
} }
} }
if (isTab === "type") { if (isTab === "type") {
const signerName = localStorage.getItem("signer")
? JSON.parse(localStorage.getItem("signer"))?.Name
: currentUserName;
//trim user name or typed name value to show in initial signature //trim user name or typed name value to show in initial signature
const trimmedName = typedSignature const trimmedName = typedSignature
? typedSignature?.trim() ? typedSignature?.trim()
: props?.journey === "kiosk-signing" && kiosk_signer : props?.journey === "kiosk-signing" && kiosk_signer
? kiosk_signer[0]?.Name?.trim() ? kiosk_signer[0]?.Name?.trim()
: currentUserName?.trim(); : signerName?.trim();
//get full name of user //get full name of user
const fullUserName = const fullUserName =
typedSignature || typedSignature ||
(props?.journey === "kiosk-signing" && kiosk_signer (props?.journey === "kiosk-signing" && kiosk_signer
? kiosk_signer[0]?.Name ? kiosk_signer[0]?.Name
: currentUserName); : signerName);
const firstCharacter = trimmedName?.charAt(0); const firstCharacter = trimmedName?.charAt(0);
const userName = const userName =
currWidgetsDetails?.type === "initials" ? firstCharacter : fullUserName; currWidgetsDetails?.type === "initials" ? firstCharacter : fullUserName;
@@ -1201,8 +1204,8 @@ function WidgetsValueModal(props) {
) )
) : isTab === "type" ? ( ) : isTab === "type" ? (
<> <>
<div className="flex justify-between items-center tabWidth"> <div className="flex justify-between items-center tabWidth rounded-[4px]">
<span className="mr-[5px] text-[12px]"> <span className="ml-[5px] text-[12px] text-base-content">
{currWidgetsDetails?.type === "initials" {currWidgetsDetails?.type === "initials"
? t("initial-teb") ? t("initial-teb")
: t("signature-tab")} : t("signature-tab")}
@@ -1229,7 +1232,7 @@ function WidgetsValueModal(props) {
}} }}
/> />
</div> </div>
<div className="border-[1px] border-[#d6d3d3] mt-[10px] ml-[5px]"> <div className="border-[1px] border-[#d6d3d3] mt-[10px] rounded-[4px]">
{fontOptions.map((font, ind) => { {fontOptions.map((font, ind) => {
return ( return (
<div <div
@@ -1252,7 +1255,7 @@ function WidgetsValueModal(props) {
> >
{typedSignature {typedSignature
? typedSignature ? typedSignature
: "Your signature"} : t("Your-Signature")}
</div> </div>
</div> </div>
); );
@@ -1656,7 +1659,7 @@ function WidgetsValueModal(props) {
} }
}, []); }, []);
return ( return (
<span className="text-center text-[12px]"> <span className="text-center text-[12px] text-base-content">
{t("required-mssg", { leftRequiredWidget, totalWidget })} {t("required-mssg", { leftRequiredWidget, totalWidget })}
</span> </span>
); );
@@ -1888,15 +1891,15 @@ function WidgetsValueModal(props) {
{isFinish ? ( {isFinish ? (
<> <>
<div className="p-1 mt-3"> <div className="p-1 mt-3">
<span className="text-base">{t("finish-mssg")}</span> <span className="text-base text-base-content">
{t("finish-mssg")}
</span>
</div> </div>
<div className="flex gap-3 items-center mt-4"> <div className="flex gap-3 items-center mt-4">
<button <button
type="button" type="button"
className="op-btn op-btn-primary op-btn-sm px-4" className="op-btn op-btn-primary op-btn-sm px-4"
onClick={() => { onClick={() => handleFinish()}
handleFinish();
}}
> >
{t("finish")} {t("finish")}
</button> </button>
@@ -1956,9 +1959,7 @@ function WidgetsValueModal(props) {
<button <button
type="button" type="button"
className="op-btn op-btn-primary op-btn-sm" className="op-btn op-btn-primary op-btn-sm"
onClick={() => { onClick={() => handleClickOnNext()}
handleClickOnNext();
}}
disabled={handleDisable()} disabled={handleDisable()}
> >
{t("save")} {t("save")}
@@ -1968,10 +1969,7 @@ function WidgetsValueModal(props) {
type="button" type="button"
className="op-btn op-btn-primary op-btn-sm" className="op-btn op-btn-primary op-btn-sm"
disabled={handleDisable()} disabled={handleDisable()}
onClick={() => { onClick={() => handleClickOnNext(true)} // isFinishDoc
const isFinishDoc = true;
handleClickOnNext(isFinishDoc);
}}
> >
{t("done")} {t("done")}
</button> </button>
@@ -1979,9 +1977,7 @@ function WidgetsValueModal(props) {
<button <button
type="button" type="button"
className="op-btn op-btn-primary op-btn-sm text-xs md:text-sm" className="op-btn op-btn-primary op-btn-sm text-xs md:text-sm"
onClick={() => { onClick={() => handleClickOnNext()}
handleClickOnNext();
}}
disabled={handleDisable()} disabled={handleDisable()}
> >
{t("next-field")} {t("next-field")}
+4 -2
View File
@@ -631,10 +631,12 @@ const Forms = (props) => {
}; };
return ( return (
<div className="shadow-md rounded-box my-[2px] p-3 bg-base-100 text-base-content"> <div
className={`${isSubmit ? "" : "shadow-md rounded-box my-[2px] p-3 bg-base-100 text-base-content"}`}
>
{isAlert?.message && <Alert type={isAlert.type}>{isAlert.message}</Alert>} {isAlert?.message && <Alert type={isAlert.type}>{isAlert.message}</Alert>}
{isSubmit ? ( {isSubmit ? (
<div className="h-[300px] flex justify-center items-center"> <div className="flex flex-col justify-center items-center h-[100vh]">
<Loader /> <Loader />
</div> </div>
) : ( ) : (
+1 -1
View File
@@ -487,7 +487,7 @@ function UserProfile() {
) : ( ) : (
<> <>
{deleteUserRes ? ( {deleteUserRes ? (
<div className="h-[100px] p-[20px] flex justify-center items-center text-sm md:text-base"> <div className="h-[100px] p-[20px] flex justify-center items-center text-base-content text-sm md:text-base">
{deleteUserRes} {deleteUserRes}
</div> </div>
) : ( ) : (
+811 -811
View File
File diff suppressed because it is too large Load Diff
+7 -7
View File
@@ -18,8 +18,8 @@
"watch": "nodemon index.js" "watch": "nodemon index.js"
}, },
"dependencies": { "dependencies": {
"@aws-sdk/client-s3": "^3.886.0", "@aws-sdk/client-s3": "^3.888.0",
"@aws-sdk/s3-request-presigner": "^3.886.0", "@aws-sdk/s3-request-presigner": "^3.888.0",
"@parse/fs-files-adapter": "^3.0.0", "@parse/fs-files-adapter": "^3.0.0",
"@parse/s3-files-adapter": "^4.2.0", "@parse/s3-files-adapter": "^4.2.0",
"@pdf-lib/fontkit": "^1.1.1", "@pdf-lib/fontkit": "^1.1.1",
@@ -27,7 +27,7 @@
"@signpdf/signer-p12": "^3.2.4", "@signpdf/signer-p12": "^3.2.4",
"@signpdf/signpdf": "^3.2.5", "@signpdf/signpdf": "^3.2.5",
"aws-sdk": "^2.1692.0", "aws-sdk": "^2.1692.0",
"axios": "^1.11.0", "axios": "^1.12.2",
"coherentpdf": "^2.5.5", "coherentpdf": "^2.5.5",
"cors": "^2.8.5", "cors": "^2.8.5",
"date-fns-tz": "^3.2.0", "date-fns-tz": "^3.2.0",
@@ -36,7 +36,7 @@
"form-data": "^4.0.4", "form-data": "^4.0.4",
"generate-api-key": "^1.0.2", "generate-api-key": "^1.0.2",
"googleapis": "^159.0.0", "googleapis": "^159.0.0",
"libreoffice-convert": "^1.6.1", "libreoffice-convert": "^1.7.0",
"mailgun.js": "^12.0.3", "mailgun.js": "^12.0.3",
"mongodb": "^6.19.0", "mongodb": "^6.19.0",
"multer": "^2.0.2", "multer": "^2.0.2",
@@ -49,9 +49,9 @@
"parse-server": "^8.2.4", "parse-server": "^8.2.4",
"parse-server-api-mail-adapter": "^4.1.0", "parse-server-api-mail-adapter": "^4.1.0",
"pdf-lib": "^1.17.1", "pdf-lib": "^1.17.1",
"posthog-node": "^5.8.3", "posthog-node": "^5.8.4",
"qrcode": "^1.5.4", "qrcode": "^1.5.4",
"rate-limiter-flexible": "^7.3.0", "rate-limiter-flexible": "^7.3.1",
"sharp": "^0.34.3", "sharp": "^0.34.3",
"speakeasy": "^2.0.0", "speakeasy": "^2.0.0",
"ws": "^8.18.3" "ws": "^8.18.3"
@@ -61,7 +61,7 @@
"@babel/eslint-parser": "^7.28.4", "@babel/eslint-parser": "^7.28.4",
"eslint": "^9.35.0", "eslint": "^9.35.0",
"jasmine": "^5.10.0", "jasmine": "^5.10.0",
"mongodb-runner": "^5.9.2", "mongodb-runner": "^5.9.3",
"nodemon": "^3.1.10", "nodemon": "^3.1.10",
"nyc": "^17.1.0", "nyc": "^17.1.0",
"prettier": "^3.6.2" "prettier": "^3.6.2"