From 0715ca9d85df3ca7ff8c5611c83b198add0685d4 Mon Sep 17 00:00:00 2001 From: RaktimaNXG Date: Fri, 12 Jan 2024 14:07:53 +0530 Subject: [PATCH] fix: on-drag placeholder user-details popup open issue,close button design, remove unnecessary code & npm package --- .../SignDocuments/package-lock.json | 20 - microfrontends/SignDocuments/package.json | 1 - .../FolderDrive/legaDriveComponent.js | 32 +- .../src/Component/LegaDrive/LegaDrive.css | 4 +- .../src/Component/LegaDrive/LegaDrive.js | 15 +- .../src/Component/PdfRequestFiles.js | 27 +- .../src/Component/SignYourselfPdf.js | 107 +- .../src/Component/TemplatePlaceholder.js | 8 +- .../src/Component/component/AddRoleModal.js | 9 +- .../src/Component/component/CustomModal.js | 5 +- .../Component/component/PlaceholderCopy.js | 7 +- .../src/Component/component/emailComponent.js | 19 +- .../Component/component/fieldsComponent.js | 5 +- .../Component/component/renderAllPdfPage.js | 1 + .../src/Component/component/renderPdf.js | 41 +- .../src/Component/component/signPad.js | 39 +- .../Component/component/signerListPlace.js | 4 +- .../src/Component/placeHolderSign.js | 33 +- .../src/Component/recipientSignPdf.js | 949 ------------------ microfrontends/SignDocuments/src/Routes.js | 2 - .../SignDocuments/src/css/signature.css | 10 +- .../SignDocuments/src/utils/Utils.js | 11 - 22 files changed, 122 insertions(+), 1227 deletions(-) delete mode 100644 microfrontends/SignDocuments/src/Component/recipientSignPdf.js diff --git a/microfrontends/SignDocuments/package-lock.json b/microfrontends/SignDocuments/package-lock.json index aeedb863c..98359a78d 100644 --- a/microfrontends/SignDocuments/package-lock.json +++ b/microfrontends/SignDocuments/package-lock.json @@ -38,7 +38,6 @@ "react-select": "^5.8.0", "react-signature-canvas": "^1.0.6", "reactour": "^1.19.1", - "select-dom": "^9.0.0", "web-vitals": "^2.1.4" } }, @@ -18883,20 +18882,6 @@ "resolved": "https://registry.npmjs.org/scrollparent/-/scrollparent-2.0.1.tgz", "integrity": "sha512-HSdN78VMvFCSGCkh0oYX/tY4R3P1DW61f8+TeZZ4j2VLgfwvw0bpRSOv4PCVKisktIwbzHCfZsx+rLbbDBqIBA==" }, - "node_modules/select-dom": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/select-dom/-/select-dom-9.0.0.tgz", - "integrity": "sha512-AD1NfASSwJQc1Sy713R1vT9CMmUSUo2tg0j1FtkRGIxllTphDrkuH2pYYvhRlGaoq3pS6tcKkKS/diEZLy+7BQ==", - "dependencies": { - "typed-query-selector": "^2.11.0" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/fregante" - } - }, "node_modules/select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", @@ -20403,11 +20388,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/typed-query-selector": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.11.0.tgz", - "integrity": "sha512-qBs4sfmnLlPOyo2oSdvHbIFHe2CPgU54/1UGfSNceb7LARpIEVxUaeRX0Doje6oKpuySS2stqy90R3YrynR8Kg==" - }, "node_modules/typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", diff --git a/microfrontends/SignDocuments/package.json b/microfrontends/SignDocuments/package.json index c0e70c06d..1eae68515 100644 --- a/microfrontends/SignDocuments/package.json +++ b/microfrontends/SignDocuments/package.json @@ -34,7 +34,6 @@ "react-select": "^5.8.0", "react-signature-canvas": "^1.0.6", "reactour": "^1.19.1", - "select-dom": "^9.0.0", "web-vitals": "^2.1.4" }, "scripts": { diff --git a/microfrontends/SignDocuments/src/Component/LegaDrive/FolderDrive/legaDriveComponent.js b/microfrontends/SignDocuments/src/Component/LegaDrive/FolderDrive/legaDriveComponent.js index a50857a01..5edf387e7 100644 --- a/microfrontends/SignDocuments/src/Component/LegaDrive/FolderDrive/legaDriveComponent.js +++ b/microfrontends/SignDocuments/src/Component/LegaDrive/FolderDrive/legaDriveComponent.js @@ -191,8 +191,10 @@ function PdfFileComponent({ ) .then((result) => { const res = result.data; - const updatedData = pdfData.filter((x) => x.objectId !== docId); - setPdfData(updatedData); + if (res) { + const updatedData = pdfData.filter((x) => x.objectId !== docId); + setPdfData(updatedData); + } }) .catch((err) => { setIsAlert({ @@ -250,10 +252,13 @@ function PdfFileComponent({ .then((Listdata) => { // console.log("Listdata ", Listdata); - const json = Listdata.data; - - const updatedData = pdfData.filter((x) => x.objectId !== updateDocId); - setPdfData(updatedData); + const res = Listdata.data; + if (res) { + const updatedData = pdfData.filter( + (x) => x.objectId !== updateDocId + ); + setPdfData(updatedData); + } }) .catch((err) => { console.log("err", err); @@ -283,13 +288,7 @@ function PdfFileComponent({ //component to handle type of document and render according to type const handleFolderData = (data, ind, listType) => { - let createddate, - status, - isDecline, - signerExist, - isComplete, - signUrl, - isPlaceholder; + let createddate, status, isDecline, signerExist, isComplete, isPlaceholder; if (data.Type !== "Folder") { const expireDate = data.ExpiryDate && data.ExpiryDate.iso; const createdDate = data.createdAt && data.createdAt; @@ -298,7 +297,7 @@ function PdfFileComponent({ isDecline = data.IsDeclined && data.IsDeclined; isPlaceholder = data.Placeholders && data.Placeholders; signerExist = data.Signers && data.Signers; - signUrl = data.SignedUrl && data.SignedUrl; + const expireUpdateDate = new Date(expireDate).getTime(); const currDate = new Date().getTime(); let isExpire = false; @@ -739,11 +738,8 @@ function PdfFileComponent({ onClick={() => { setIsDeleteDoc(false); }} - style={{ - color: "black" - }} type="button" - className="finishBtn" + className="finishBtn cancelBtn" > No diff --git a/microfrontends/SignDocuments/src/Component/LegaDrive/LegaDrive.css b/microfrontends/SignDocuments/src/Component/LegaDrive/LegaDrive.css index 2997553ce..a74ca1553 100644 --- a/microfrontends/SignDocuments/src/Component/LegaDrive/LegaDrive.css +++ b/microfrontends/SignDocuments/src/Component/LegaDrive/LegaDrive.css @@ -116,7 +116,9 @@ margin: 30px; height: 100%; } - +.inputStyle{ + border: 1.6px solid #ccc !important; +} .folderComponent::-webkit-scrollbar { display: none; /* for Chrome, Safari, and Opera */ diff --git a/microfrontends/SignDocuments/src/Component/LegaDrive/LegaDrive.js b/microfrontends/SignDocuments/src/Component/LegaDrive/LegaDrive.js index e68045b8e..15b3a425b 100644 --- a/microfrontends/SignDocuments/src/Component/LegaDrive/LegaDrive.js +++ b/microfrontends/SignDocuments/src/Component/LegaDrive/LegaDrive.js @@ -369,11 +369,8 @@ function PdfFile() { alertMessage: "" }) } - style={{ - color: "black" - }} type="button" - className="finishBtn" + className="finishBtn cancelBtn" > Close @@ -419,12 +416,13 @@ function PdfFile() { fontWeight: "400" }} > - Name* + Name + * handleFolderName(e)} @@ -455,11 +453,8 @@ function PdfFile() { Add @@ -806,11 +796,8 @@ function PdfRequestFiles() { alertMessage: "" }); }} - style={{ - color: "black" - }} type="button" - className="finishBtn" + className="finishBtn cancelBtn" > Close @@ -823,11 +810,8 @@ function PdfRequestFiles() { alertMessage: "" }); }} - style={{ - color: "black" - }} type="button" - className="finishBtn" + className="finishBtn cancelBtn" > Ok @@ -871,11 +855,8 @@ function PdfRequestFiles() { }} > @@ -926,13 +837,7 @@ function SignYourSelf() { }} > @@ -1179,6 +1176,7 @@ const TemplatePlaceholder = () => { handleDeleteUser={handleDeleteUser} handleRoleChange={handleRoleChange} handleOnBlur={handleOnBlur} + title={"Role"} /> ) : ( @@ -1197,6 +1195,7 @@ const TemplatePlaceholder = () => { handleDeleteUser={handleDeleteUser} handleRoleChange={handleRoleChange} handleOnBlur={handleOnBlur} + title={"Role"} />
{ isDragStamp={isDragStamp} isSignYourself={false} addPositionOfSignature={addPositionOfSignature} + title={"Role"} />
diff --git a/microfrontends/SignDocuments/src/Component/component/AddRoleModal.js b/microfrontends/SignDocuments/src/Component/component/AddRoleModal.js index ede404e54..8e6491376 100644 --- a/microfrontends/SignDocuments/src/Component/component/AddRoleModal.js +++ b/microfrontends/SignDocuments/src/Component/component/AddRoleModal.js @@ -8,9 +8,7 @@ const AddRoleModal = (props) => { isOpen={props.isModalRole} handleClose={props.handleCloseRoleModal} > -
+
{ diff --git a/microfrontends/SignDocuments/src/Component/component/CustomModal.js b/microfrontends/SignDocuments/src/Component/component/CustomModal.js index 5b91cf932..ba2eb720d 100644 --- a/microfrontends/SignDocuments/src/Component/component/CustomModal.js +++ b/microfrontends/SignDocuments/src/Component/component/CustomModal.js @@ -49,11 +49,8 @@ function CustomModal({ Yes