Skip to content

Commit 0715ca9

Browse files
fix: on-drag placeholder user-details popup open issue,close button design, remove unnecessary code & npm package
1 parent 1ec10fb commit 0715ca9

22 files changed

+122
-1227
lines changed

microfrontends/SignDocuments/package-lock.json

Lines changed: 0 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

microfrontends/SignDocuments/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
"react-select": "^5.8.0",
3535
"react-signature-canvas": "^1.0.6",
3636
"reactour": "^1.19.1",
37-
"select-dom": "^9.0.0",
3837
"web-vitals": "^2.1.4"
3938
},
4039
"scripts": {

microfrontends/SignDocuments/src/Component/LegaDrive/FolderDrive/legaDriveComponent.js

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,10 @@ function PdfFileComponent({
191191
)
192192
.then((result) => {
193193
const res = result.data;
194-
const updatedData = pdfData.filter((x) => x.objectId !== docId);
195-
setPdfData(updatedData);
194+
if (res) {
195+
const updatedData = pdfData.filter((x) => x.objectId !== docId);
196+
setPdfData(updatedData);
197+
}
196198
})
197199
.catch((err) => {
198200
setIsAlert({
@@ -250,10 +252,13 @@ function PdfFileComponent({
250252

251253
.then((Listdata) => {
252254
// console.log("Listdata ", Listdata);
253-
const json = Listdata.data;
254-
255-
const updatedData = pdfData.filter((x) => x.objectId !== updateDocId);
256-
setPdfData(updatedData);
255+
const res = Listdata.data;
256+
if (res) {
257+
const updatedData = pdfData.filter(
258+
(x) => x.objectId !== updateDocId
259+
);
260+
setPdfData(updatedData);
261+
}
257262
})
258263
.catch((err) => {
259264
console.log("err", err);
@@ -283,13 +288,7 @@ function PdfFileComponent({
283288

284289
//component to handle type of document and render according to type
285290
const handleFolderData = (data, ind, listType) => {
286-
let createddate,
287-
status,
288-
isDecline,
289-
signerExist,
290-
isComplete,
291-
signUrl,
292-
isPlaceholder;
291+
let createddate, status, isDecline, signerExist, isComplete, isPlaceholder;
293292
if (data.Type !== "Folder") {
294293
const expireDate = data.ExpiryDate && data.ExpiryDate.iso;
295294
const createdDate = data.createdAt && data.createdAt;
@@ -298,7 +297,7 @@ function PdfFileComponent({
298297
isDecline = data.IsDeclined && data.IsDeclined;
299298
isPlaceholder = data.Placeholders && data.Placeholders;
300299
signerExist = data.Signers && data.Signers;
301-
signUrl = data.SignedUrl && data.SignedUrl;
300+
302301
const expireUpdateDate = new Date(expireDate).getTime();
303302
const currDate = new Date().getTime();
304303
let isExpire = false;
@@ -739,11 +738,8 @@ function PdfFileComponent({
739738
onClick={() => {
740739
setIsDeleteDoc(false);
741740
}}
742-
style={{
743-
color: "black"
744-
}}
745741
type="button"
746-
className="finishBtn"
742+
className="finishBtn cancelBtn"
747743
>
748744
No
749745
</button>

microfrontends/SignDocuments/src/Component/LegaDrive/LegaDrive.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@
116116
margin: 30px;
117117
height: 100%;
118118
}
119-
119+
.inputStyle{
120+
border: 1.6px solid #ccc !important;
121+
}
120122
.folderComponent::-webkit-scrollbar {
121123
display: none;
122124
/* for Chrome, Safari, and Opera */

microfrontends/SignDocuments/src/Component/LegaDrive/LegaDrive.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -369,11 +369,8 @@ function PdfFile() {
369369
alertMessage: ""
370370
})
371371
}
372-
style={{
373-
color: "black"
374-
}}
375372
type="button"
376-
className="finishBtn"
373+
className="finishBtn cancelBtn"
377374
>
378375
Close
379376
</button>
@@ -419,12 +416,13 @@ function PdfFile() {
419416
fontWeight: "400"
420417
}}
421418
>
422-
Name*
419+
Name
420+
<span style={{ color: "red" }}>*</span>
423421
</label>
424422

425423
<input
426424
required
427-
className="form-control"
425+
className="form-control inputStyle"
428426
type="text"
429427
value={newFolderName}
430428
onChange={(e) => handleFolderName(e)}
@@ -455,11 +453,8 @@ function PdfFile() {
455453
Add
456454
</button>
457455
<button
458-
style={{
459-
color: "black"
460-
}}
461456
type="button"
462-
className="finishBtn"
457+
className="finishBtn cancelBtn"
463458
onClick={oncloseFolder}
464459
>
465460
Close

microfrontends/SignDocuments/src/Component/PdfRequestFiles.js

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,14 @@ import { themeColor } from "../utils/ThemeColor/backColor";
33
import { PDFDocument } from "pdf-lib";
44
import "../css/signature.css";
55
import axios from "axios";
6-
import ModalHeader from "react-bootstrap/esm/ModalHeader";
7-
import Modal from "react-bootstrap/Modal";
86
import loader from "../assests/loader2.gif";
97
import { DndProvider } from "react-dnd";
108
import { HTML5Backend } from "react-dnd-html5-backend";
119
import { useParams } from "react-router-dom";
1210
import SignPad from "./component/signPad";
1311
import RenderAllPdfPage from "./component/renderAllPdfPage";
1412
import {
15-
convertPNGtoJPEG,
1613
contractDocument,
17-
getBase64FromIMG,
18-
getBase64FromUrl,
19-
urlValidator,
2014
multiSignEmbed,
2115
embedDocId,
2216
pdfNewWidthFun,
@@ -32,7 +26,6 @@ import Nodata from "./component/Nodata";
3226
import Header from "./component/header";
3327
import RenderPdf from "./component/renderPdf";
3428
import CustomModal from "./component/CustomModal";
35-
import AlertComponent from "./component/alertComponent";
3629
import Title from "./component/Title";
3730
import DefaultSignature from "./component/defaultSignature";
3831
import ModalUi from "../premitives/ModalUi";
@@ -722,11 +715,8 @@ function PdfRequestFiles() {
722715
alertMessage: ""
723716
});
724717
}}
725-
style={{
726-
color: "black"
727-
}}
728718
type="button"
729-
className="finishBtn"
719+
className="finishBtn cancelBtn"
730720
>
731721
Ok
732722
</button>
@@ -806,11 +796,8 @@ function PdfRequestFiles() {
806796
alertMessage: ""
807797
});
808798
}}
809-
style={{
810-
color: "black"
811-
}}
812799
type="button"
813-
className="finishBtn"
800+
className="finishBtn cancelBtn"
814801
>
815802
Close
816803
</button>
@@ -823,11 +810,8 @@ function PdfRequestFiles() {
823810
alertMessage: ""
824811
});
825812
}}
826-
style={{
827-
color: "black"
828-
}}
829813
type="button"
830-
className="finishBtn"
814+
className="finishBtn cancelBtn"
831815
>
832816
Ok
833817
</button>
@@ -871,11 +855,8 @@ function PdfRequestFiles() {
871855
}}
872856
></div>
873857
<button
874-
style={{
875-
color: "black"
876-
}}
877858
type="button"
878-
className="finishBtn"
859+
className="finishBtn cancelBtn"
879860
onClick={() =>
880861
setIsCompleted({ isModal: false, isCertificate: true })
881862
}

0 commit comments

Comments
 (0)