From 6981d0fc10a6587dc59d03b28af1ce567a052c11 Mon Sep 17 00:00:00 2001
From: =bhagwanSingh <=bhagwan.r@hicglobalsolutions.com>
Date: Tue, 19 Aug 2025 18:47:29 +0530
Subject: [PATCH] Client Side Fill Tags and Attribute Update
---
src/components/client/SignDocument.tsx | 54 +++++++++++--------
.../rightSideBar/RightSideBar.tsx | 2 +-
src/components/signature/SignCon.tsx | 2 +-
src/utlity/maskUtils.ts | 15 ++++++
4 files changed, 50 insertions(+), 23 deletions(-)
diff --git a/src/components/client/SignDocument.tsx b/src/components/client/SignDocument.tsx
index 845bde3..6fe79ac 100644
--- a/src/components/client/SignDocument.tsx
+++ b/src/components/client/SignDocument.tsx
@@ -28,6 +28,7 @@ import SignCompletionScreen from "./SignCompletionScreen";
import api from "../../config/api";
import RightSideBar from "../process/processStepTwo/rightSideBar/RightSideBar";
import { RiDragMoveFill } from "react-icons/ri";
+import { handleGroupBorderPosition } from "../../utlity/tagGroupConUtils";
@@ -71,7 +72,7 @@ interface TransactionType {
interface TagSubmitData {
id: string;
type?: string;
- subType: string;
+ subType?: string;
signed: boolean;
value: string;
}
@@ -152,7 +153,7 @@ const SignDocument = () => {
const [tagJson, setTagJson] = useState {
@@ -1185,15 +1183,14 @@ const SignDocument = () => {
> {
const val = e.currentTarget.textContent;
handleTagUpdate(index, val as string);
}}
contentEditable={true}
className="w-full outline-none max-h-max"
- >
-
{ // }} onBlur={(e) => { let val = e.target.textContent; - if (typeof item.maskType === "string" && typeof val === "string") { + if (typeof item.maskType === "string" && typeof val === "string" && item.maskCharacter) { val = val.replace(/ /g, ""); e.target.textContent = maskUtils(item.maskType, val, item.maskCharacter) } @@ -1306,6 +1303,25 @@ const SignDocument = () => { {/* NAME FIELD - END */} + {/* NUMBER FIELD - START */} + { + item.type === "NUMBER" && +
- {(item.id && item.id in dateValues) ? dateValues[item.id] : item.subType?.toLowerCase()} + {(item.id && item.id in dateValues) ? dateValues[item.id] : item.dateFormat?.toLowerCase()}
{ let val = e.target.value; // Adding dummy time in case of time as it giving Invalid date without that - if (item.subType?.toLowerCase() === "time") val = "09/02/2025 " + val + if (item.dateFormat?.toLowerCase() === "time") val = "09/02/2025 " + val if (!item.id) return; setIsDateOpen(null); @@ -1527,7 +1543,7 @@ const SignDocument = () => { onClick={() => { }} - type={`${item.subType?.toLowerCase() === "date" ? "date" : (item.subType?.toLowerCase() === "time" ? "time" : "datetime-local")}`} + type={`${item.dateFormat?.toLowerCase() === "date" ? "date" : (item.dateFormat?.toLowerCase() === "time" ? "time" : "datetime-local")}`} /> @@ -1687,10 +1703,6 @@ const SignDocument = () => {