From f86ea04a02de3bce8bd4baf1e96b4db076429dc3 Mon Sep 17 00:00:00 2001 From: RaktimaNXG Date: Mon, 12 Feb 2024 17:36:23 +0530 Subject: [PATCH] feat: label widget for prefill data --- .../FolderDrive/legaDriveComponent.js | 7 +- .../Component/WidgetComponent/placeholder.js | 4 +- .../WidgetComponent/placeholderType.js | 24 +- .../Component/component/fieldsComponent.js | 30 +- .../src/Component/component/header.js | 11 +- .../src/Component/placeHolderSign.js | 295 ++++++++++++------ .../SignDocuments/src/utils/Utils.js | 35 +-- 7 files changed, 264 insertions(+), 142 deletions(-) diff --git a/microfrontends/SignDocuments/src/Component/LegaDrive/FolderDrive/legaDriveComponent.js b/microfrontends/SignDocuments/src/Component/LegaDrive/FolderDrive/legaDriveComponent.js index e080a49da..493a766b7 100644 --- a/microfrontends/SignDocuments/src/Component/LegaDrive/FolderDrive/legaDriveComponent.js +++ b/microfrontends/SignDocuments/src/Component/LegaDrive/FolderDrive/legaDriveComponent.js @@ -40,7 +40,6 @@ function PdfFileComponent({ //to focus input box on press rename to change doc name useEffect(() => { if (rename && inputRef.current) { - // console.log("ref", inputRef.current) setTimeout(() => { inputRef.current.focus(); }, 10); @@ -477,7 +476,7 @@ function PdfFileComponent({ onClick={() => handleMenuItemClick("Rename", data)} className="ContextMenuItem" > - + Rename @@ -542,7 +541,7 @@ function PdfFileComponent({ onClick={() => handleMenuItemClick("Rename", data)} className="ContextMenuItem" > - + Rename @@ -628,7 +627,7 @@ function PdfFileComponent({ onClick={() => handleMenuItemClick(menu.type, data)} className="ContextMenuItem" > - + {menu.type} ); diff --git a/microfrontends/SignDocuments/src/Component/WidgetComponent/placeholder.js b/microfrontends/SignDocuments/src/Component/WidgetComponent/placeholder.js index d550c2580..f584c7c8a 100644 --- a/microfrontends/SignDocuments/src/Component/WidgetComponent/placeholder.js +++ b/microfrontends/SignDocuments/src/Component/WidgetComponent/placeholder.js @@ -2,7 +2,7 @@ import React, { useState, useEffect } from "react"; import BorderResize from "../component/borderResize"; import PlaceholderBorder from "./placeholderBorder"; import { Rnd } from "react-rnd"; -import { defaultWidthHeight, isMobile, onChangeInput } from "../../utils/Utils"; +import { defaultWidthHeight, isMobile } from "../../utils/Utils"; import PlaceholderType from "./placeholderType"; import moment from "moment"; import "../LegaDrive/LegaDrive.css"; @@ -486,7 +486,7 @@ function Placeholder(props) { } onDragStop={(event, dragElement) => props.handleStop && - props.handleStop(event, dragElement, props.signerObjId, props.pos.key) + props.handleStop(event, dragElement, props.data.Id, props.pos.key) } default={{ x: props.xPos(props.pos, props.isSignYourself), diff --git a/microfrontends/SignDocuments/src/Component/WidgetComponent/placeholderType.js b/microfrontends/SignDocuments/src/Component/WidgetComponent/placeholderType.js index 1a041685c..a2bac02af 100644 --- a/microfrontends/SignDocuments/src/Component/WidgetComponent/placeholderType.js +++ b/microfrontends/SignDocuments/src/Component/WidgetComponent/placeholderType.js @@ -74,7 +74,6 @@ function PlaceholderType(props) { useEffect(() => { if (props.pos?.type && props.pos.type === "radio" && props.isNeedSign) { - console.log("props.pos?.type", props.pos?.type); onChangeInput( isCheckedRadio.selectValue, props.pos.key, @@ -131,7 +130,7 @@ function PlaceholderType(props) { ref={ref} > {dateValue(value)} - + )); @@ -543,7 +542,26 @@ function PlaceholderType(props) { })} ); - + case "label": + return ( +