Skip to content

Commit 98efff6

Browse files
Merge pull request #1295 from nxglabs/sync-to-public_repo-17787708673
fix: show signer name in typed signature instead in selfsign flow
1 parent fe21978 commit 98efff6

File tree

6 files changed

+852
-854
lines changed

6 files changed

+852
-854
lines changed

apps/OpenSign/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"version": "2.26.0",
44
"private": true,
55
"dependencies": {
6-
"@formkit/auto-animate": "^0.8.4",
6+
"@formkit/auto-animate": "^0.9.0",
77
"@imgly/background-removal": "^1.7.0",
8-
"@lottiefiles/dotlottie-react": "^0.15.2",
8+
"@lottiefiles/dotlottie-react": "^0.16.2",
99
"@pdf-lib/fontkit": "^1.1.1",
1010
"@radix-ui/themes": "^3.2.1",
1111
"@reduxjs/toolkit": "^2.8.2",
12-
"axios": "^1.11.0",
12+
"axios": "^1.12.2",
1313
"date-fns-tz": "^3.2.0",
1414
"file-saver": "^2.0.5",
1515
"i18next": "^25.4.0",
@@ -42,7 +42,7 @@
4242
"react-quill-new": "^3.6.0",
4343
"react-redux": "^9.2.0",
4444
"react-rnd": "^10.5.2",
45-
"react-router": "^7.8.2",
45+
"react-router": "^7.9.1",
4646
"react-scrollbars-custom": "^4.1.1",
4747
"react-select": "^5.10.2",
4848
"react-signature-canvas": "^1.1.0-alpha.2",
@@ -101,7 +101,7 @@
101101
"@testing-library/jest-dom": "^6.8.0",
102102
"@testing-library/react": "^16.3.0",
103103
"@testing-library/user-event": "^14.6.1",
104-
"@types/react": "^19.1.12",
104+
"@types/react": "^19.1.13",
105105
"@vitejs/plugin-react": "^4.7.0",
106106
"@vitest/ui": "^3.2.4",
107107
"autoprefixer": "^10.4.21",
@@ -113,7 +113,7 @@
113113
"eslint": "^9.34.0",
114114
"eslint-plugin-prettier": "^5.5.4",
115115
"eslint-plugin-react": "^7.37.5",
116-
"jsdom": "^26.1.0",
116+
"jsdom": "^27.0.0",
117117
"lint-staged": "^16.1.6",
118118
"postcss": "^8.5.6",
119119
"prettier": "^3.6.2",

apps/OpenSign/src/components/pdf/WidgetsValueModal.jsx

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -671,18 +671,21 @@ function WidgetsValueModal(props) {
671671
}
672672
}
673673
if (isTab === "type") {
674+
const signerName = localStorage.getItem("signer")
675+
? JSON.parse(localStorage.getItem("signer"))?.Name
676+
: currentUserName;
674677
//trim user name or typed name value to show in initial signature
675678
const trimmedName = typedSignature
676679
? typedSignature?.trim()
677680
: props?.journey === "kiosk-signing" && kiosk_signer
678681
? kiosk_signer[0]?.Name?.trim()
679-
: currentUserName?.trim();
682+
: signerName?.trim();
680683
//get full name of user
681684
const fullUserName =
682685
typedSignature ||
683686
(props?.journey === "kiosk-signing" && kiosk_signer
684687
? kiosk_signer[0]?.Name
685-
: currentUserName);
688+
: signerName);
686689
const firstCharacter = trimmedName?.charAt(0);
687690
const userName =
688691
currWidgetsDetails?.type === "initials" ? firstCharacter : fullUserName;
@@ -1201,8 +1204,8 @@ function WidgetsValueModal(props) {
12011204
)
12021205
) : isTab === "type" ? (
12031206
<>
1204-
<div className="flex justify-between items-center tabWidth">
1205-
<span className="mr-[5px] text-[12px]">
1207+
<div className="flex justify-between items-center tabWidth rounded-[4px]">
1208+
<span className="ml-[5px] text-[12px] text-base-content">
12061209
{currWidgetsDetails?.type === "initials"
12071210
? t("initial-teb")
12081211
: t("signature-tab")}
@@ -1229,7 +1232,7 @@ function WidgetsValueModal(props) {
12291232
}}
12301233
/>
12311234
</div>
1232-
<div className="border-[1px] border-[#d6d3d3] mt-[10px] ml-[5px]">
1235+
<div className="border-[1px] border-[#d6d3d3] mt-[10px] rounded-[4px]">
12331236
{fontOptions.map((font, ind) => {
12341237
return (
12351238
<div
@@ -1252,7 +1255,7 @@ function WidgetsValueModal(props) {
12521255
>
12531256
{typedSignature
12541257
? typedSignature
1255-
: "Your signature"}
1258+
: t("Your-Signature")}
12561259
</div>
12571260
</div>
12581261
);
@@ -1656,7 +1659,7 @@ function WidgetsValueModal(props) {
16561659
}
16571660
}, []);
16581661
return (
1659-
<span className="text-center text-[12px]">
1662+
<span className="text-center text-[12px] text-base-content">
16601663
{t("required-mssg", { leftRequiredWidget, totalWidget })}
16611664
</span>
16621665
);
@@ -1888,15 +1891,15 @@ function WidgetsValueModal(props) {
18881891
{isFinish ? (
18891892
<>
18901893
<div className="p-1 mt-3">
1891-
<span className="text-base">{t("finish-mssg")}</span>
1894+
<span className="text-base text-base-content">
1895+
{t("finish-mssg")}
1896+
</span>
18921897
</div>
18931898
<div className="flex gap-3 items-center mt-4">
18941899
<button
18951900
type="button"
18961901
className="op-btn op-btn-primary op-btn-sm px-4"
1897-
onClick={() => {
1898-
handleFinish();
1899-
}}
1902+
onClick={() => handleFinish()}
19001903
>
19011904
{t("finish")}
19021905
</button>
@@ -1956,9 +1959,7 @@ function WidgetsValueModal(props) {
19561959
<button
19571960
type="button"
19581961
className="op-btn op-btn-primary op-btn-sm"
1959-
onClick={() => {
1960-
handleClickOnNext();
1961-
}}
1962+
onClick={() => handleClickOnNext()}
19621963
disabled={handleDisable()}
19631964
>
19641965
{t("save")}
@@ -1968,20 +1969,15 @@ function WidgetsValueModal(props) {
19681969
type="button"
19691970
className="op-btn op-btn-primary op-btn-sm"
19701971
disabled={handleDisable()}
1971-
onClick={() => {
1972-
const isFinishDoc = true;
1973-
handleClickOnNext(isFinishDoc);
1974-
}}
1972+
onClick={() => handleClickOnNext(true)} // isFinishDoc
19751973
>
19761974
{t("done")}
19771975
</button>
19781976
) : (
19791977
<button
19801978
type="button"
19811979
className="op-btn op-btn-primary op-btn-sm text-xs md:text-sm"
1982-
onClick={() => {
1983-
handleClickOnNext();
1984-
}}
1980+
onClick={() => handleClickOnNext()}
19851981
disabled={handleDisable()}
19861982
>
19871983
{t("next-field")}

apps/OpenSign/src/pages/Form.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,10 +631,12 @@ const Forms = (props) => {
631631
};
632632

633633
return (
634-
<div className="shadow-md rounded-box my-[2px] p-3 bg-base-100 text-base-content">
634+
<div
635+
className={`${isSubmit ? "" : "shadow-md rounded-box my-[2px] p-3 bg-base-100 text-base-content"}`}
636+
>
635637
{isAlert?.message && <Alert type={isAlert.type}>{isAlert.message}</Alert>}
636638
{isSubmit ? (
637-
<div className="h-[300px] flex justify-center items-center">
639+
<div className="flex flex-col justify-center items-center h-[100vh]">
638640
<Loader />
639641
</div>
640642
) : (

apps/OpenSign/src/pages/UserProfile.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ function UserProfile() {
487487
) : (
488488
<>
489489
{deleteUserRes ? (
490-
<div className="h-[100px] p-[20px] flex justify-center items-center text-sm md:text-base">
490+
<div className="h-[100px] p-[20px] flex justify-center items-center text-base-content text-sm md:text-base">
491491
{deleteUserRes}
492492
</div>
493493
) : (

0 commit comments

Comments
 (0)