Skip to content

Commit d5853e6

Browse files
fix: placeholder block issue for select multisigners
1 parent 765c3c1 commit d5853e6

File tree

4 files changed

+36
-16
lines changed

4 files changed

+36
-16
lines changed

microfrontends/SignDocuments/public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"
4848
/>
4949

50-
<title>OpenSign App</title>
50+
<title>OpenSign</title>
5151
</head>
5252
<body>
5353
<noscript>You need to enable JavaScript to run this app.</noscript>

microfrontends/SignDocuments/src/Component/component/emailComponent.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function EmailComponent({
3939
"X-Parse-Application-Id": localStorage.getItem("parseAppId"),
4040
sessionToken: localStorage.getItem("accesstoken")
4141
};
42-
42+
const openSignUrl = "https://www.opensignlabs.com/";
4343
const themeBGcolor = themeColor();
4444
let params = {
4545
pdfName: pdfName,
@@ -54,9 +54,11 @@ function EmailComponent({
5454
themeBGcolor +
5555
";'> <p style='font-size:20px;font-weight:400;color:white;padding-left:20px',> Document Copy</p></div><div><p style='padding:20px;font-family:system-ui;font-size:14px'>A copy of the document " +
5656
pdfName +
57-
" Standard is attached to this email. Kindly download the document from the attachment.</p></div> </div><div><p>This is an automated email from Open Sign. For any queries regarding this email, please contact the sender " +
57+
" Standard is attached to this email. Kindly download the document from the attachment.</p></div> </div><div><p>This is an automated email from OpenSign. For any queries regarding this email, please contact the sender " +
5858
sender.email +
59-
" directly. If you think this email is inappropriate or spam, you may file a complaint with Open Sign here.</p></div></div></body></html>"
59+
" directly. If you think this email is inappropriate or spam, you may file a complaint with OpenSign <a href= " +
60+
openSignUrl +
61+
" target=_blank>here</a> </p></div></div></body></html>"
6062
};
6163
sendMail = await axios.post(url, params, { headers: headers });
6264
} catch (error) {

microfrontends/SignDocuments/src/Component/component/renderPdf.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,8 @@ function RenderPdf({
453453
className="placeholderBlock"
454454
onDrag={() =>
455455
handleTabDrag(
456-
pos.key,
457-
data.signerObjId
456+
pos.key
457+
// data.signerObjId
458458
)
459459
}
460460
size={{
@@ -872,8 +872,8 @@ function RenderPdf({
872872
className="placeholderBlock"
873873
onDrag={() =>
874874
handleTabDrag(
875-
pos.key,
876-
data.signerObjId
875+
pos.key
876+
// data.signerObjId
877877
)
878878
}
879879
size={{

microfrontends/SignDocuments/src/Component/placeHolderSign.js

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ function PlaceHolderSign() {
274274
let xyPos = {};
275275
if (item === "onclick") {
276276
const dropObj = {
277+
//onclick put placeholder center on pdf
277278
xPosition: window.innerWidth / 2 - 100,
278279
yPosition: window.innerHeight / 2 - 60,
279280
isStamp: monitor,
@@ -321,7 +322,6 @@ function PlaceHolderSign() {
321322

322323
xyPosArr.push(xyPos);
323324
}
324-
325325
//add signers objId first inseretion
326326
if (filterSignerPos.length > 0) {
327327
const colorIndex = signerPos
@@ -355,8 +355,15 @@ function PlaceHolderSign() {
355355
objectId: signerObjId
356356
}
357357
};
358-
359-
signerPos.splice(colorIndex, 1, placeHolderPos);
358+
// signerPos.splice(colorIndex, 1, placeHolderPos);
359+
const newArry = [placeHolderPos];
360+
const newArray = [
361+
...signerPos.slice(0, colorIndex),
362+
...newArry,
363+
...signerPos.slice(colorIndex + 1)
364+
];
365+
366+
setSignerPos(newArray);
360367
} else {
361368
const newSignPoss = getPlaceHolder.concat(xyPosArr[0]);
362369

@@ -371,7 +378,15 @@ function PlaceHolderSign() {
371378
}
372379
};
373380

374-
signerPos.splice(colorIndex, 1, placeHolderPos);
381+
// signerPos.splice(colorIndex, 1, placeHolderPos);
382+
const newArry = [placeHolderPos];
383+
const newArray = [
384+
...signerPos.slice(0, colorIndex),
385+
...newArry,
386+
...signerPos.slice(colorIndex + 1)
387+
];
388+
389+
setSignerPos(newArray);
375390
}
376391
} else {
377392
let placeHolderPos = {
@@ -400,10 +415,11 @@ function PlaceHolderSign() {
400415
setPdfOriginalWidth(pageWidth);
401416
});
402417
};
418+
403419
//function for save x and y position and show signature tab on that position
404420
const handleTabDrag = (key, signerId) => {
405421
setDragKey(key);
406-
setSignerObjId(signerId);
422+
// setSignerObjId(signerId);
407423
};
408424

409425
//function for set and update x and y postion after drag and drop signature tab
@@ -610,7 +626,7 @@ function PlaceHolderSign() {
610626

611627
const hostUrl = window.location.origin + "/loadmf/signmicroapp";
612628
let signPdf = `${hostUrl}/login/${signersdata.objectId}/${signerMail[i].Email}/${objectId}/${serverParams}`;
613-
629+
const openSignUrl = "https://www.opensignlabs.com/";
614630
const themeBGcolor = themeColor();
615631
let params = {
616632
recipient: signerMail[i].Email,
@@ -632,9 +648,11 @@ function PlaceHolderSign() {
632648
localExpireDate +
633649
"</td></tr><tr> <td></td> <td> <div style='display: flex; justify-content: center;margin-top: 50px;'><a href=" +
634650
signPdf +
635-
"> <button style='padding: 12px 20px 12px 20px;background-color: #d46b0f;color: white; border: 0px;box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px,rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;font-weight:bold'>Sign here</button></a> </div> </td><td> </td></tr></table> </div><div style='display: flex; justify-content: center;margin-top: 10px;'> </div></div></div><div><p> This is an automated email from Open Sign. For any queries regarding this email, please contact the sender " +
651+
"> <button style='padding: 12px 20px 12px 20px;background-color: #d46b0f;color: white; border: 0px;box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px,rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;font-weight:bold'>Sign here</button></a> </div> </td><td> </td></tr></table> </div><div style='display: flex; justify-content: center;margin-top: 10px;'> </div></div></div><div><p> This is an automated email from OpenSign. For any queries regarding this email, please contact the sender " +
636652
sender +
637-
" directly.If you think this email is inappropriate or spam, you may file a complaint with Open Sign here.</p> </div></div></body> </html>"
653+
" directly.If you think this email is inappropriate or spam, you may file a complaint with OpenSign <a href= " +
654+
openSignUrl +
655+
" target=_blank>here</a>.</p> </div></div></body> </html>"
638656
};
639657
sendMail = await axios.post(url, params, { headers: headers });
640658
} catch (error) {

0 commit comments

Comments
 (0)