Skip to content

Commit 94d3865

Browse files
authored
Merge pull request #876 from OpenSignLabs/raktima-opensignlabs-patch-10
2 parents ae5d527 + d85d76c commit 94d3865

29 files changed

+474
-514
lines changed
-233 KB
Binary file not shown.

apps/OpenSign/src/components/dashboard/DashboardCard.js

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -261,21 +261,14 @@ const DashboardCard = (props) => {
261261
}
262262
}
263263
body = str;
264-
await axios
265-
.post(url, body, { headers: headers })
266-
.then((response) => {
267-
try {
268-
if (response.data.result.length > 0) {
269-
setresponse(response.data.result[0][props.FilterData.key]);
270-
setLoading(false);
271-
} else {
272-
setresponse("0");
273-
setLoading(false);
274-
}
275-
} catch (error) {
276-
setLoading(false);
277-
}
278-
});
264+
const response = await axios.post(url, body, { headers: headers });
265+
if (response.data.result.length > 0) {
266+
setresponse(response.data.result[0][props.FilterData.key]);
267+
setLoading(false);
268+
} else {
269+
setresponse("0");
270+
setLoading(false);
271+
}
279272
} catch (error) {
280273
setLoading(false);
281274
}
@@ -338,7 +331,7 @@ const DashboardCard = (props) => {
338331
}`}
339332
>
340333
<div className="flex items-center justify-start gap-5 text-white">
341-
<span className="rounded-full bg-black bg-opacity-20 w-[60px] h-[60px] self-start flex justify-center items-center">
334+
<span className="rounded-full bg-base-300 bg-opacity-20 w-[60px] h-[60px] self-start flex justify-center items-center">
342335
<i
343336
className={`${
344337
props.Icon ? props.Icon : "fa-light fa-info"

apps/OpenSign/src/components/opensigndrive/DriveBody.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ function DriveBody(props) {
321321
return listType === "table" ? (
322322
data.Type === "Folder" ? (
323323
<tr onClick={() => handleOnclikFolder(data)}>
324-
<td className="cursor-pointer flex items-center">
324+
<td className="cursor-pointer flex items-center gap-2">
325325
<svg
326326
xmlns="http://www.w3.org/2000/svg"
327327
viewBox="0 0 512 512"
@@ -338,7 +338,7 @@ function DriveBody(props) {
338338
</tr>
339339
) : (
340340
<tr onClick={() => checkPdfStatus(data)}>
341-
<td className="cursor-pointer flex items-center">
341+
<td className="cursor-pointer flex items-center gap-2">
342342
<svg
343343
xmlns="http://www.w3.org/2000/svg"
344344
viewBox="0 0 384 512"

apps/OpenSign/src/components/pdf/BorderResize.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@ import React from "react";
33
function BorderResize({ right, top }) {
44
return (
55
<div
6-
className="borderResize"
7-
style={{
8-
right: right ? right + "px" : "-1px",
9-
bottom: top ? top + "px" : "-1px",
10-
borderRight: "3px solid #188ae2",
11-
borderBottom: "3px solid #188ae2"
12-
}}
6+
className={`${right ? `-right-[12px]` : "-right-[1px]"} ${
7+
top ? `-bottom-[11px]` : "-bottom-[1px]"
8+
} absolute inline-block w-[14px] h-[14px] hover:cursor-sw-resize border-r-[3px] border-b-[3px] border-[#188ae2]`}
139
></div>
1410
);
1511
}

apps/OpenSign/src/components/pdf/EmailComponent.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React, { useState } from "react";
22
import { saveAs } from "file-saver";
3-
import celebration from "../../assets/images/newCeleb.gif";
43
import axios from "axios";
54
import { getBase64FromUrl } from "../../constant/Utils";
65
import { themeColor } from "../../constant/const";
@@ -22,7 +21,6 @@ function EmailComponent({
2221
const [emailList, setEmailList] = useState([]);
2322
const [emailValue, setEmailValue] = useState();
2423
const [isLoading, setIsLoading] = useState(false);
25-
const [isEmailCelebration, setIsEmailCelebration] = useState(false);
2624
//function for send email
2725
const sendEmail = async () => {
2826
setIsLoading(true);
@@ -63,10 +61,6 @@ function EmailComponent({
6361
" target=_blank>here</a> </p></div></div></body></html>"
6462
};
6563
sendMail = await axios.post(url, params, { headers: headers });
66-
setIsEmailCelebration(true);
67-
setTimeout(() => {
68-
setIsEmailCelebration(false);
69-
}, 3000);
7064
} catch (error) {
7165
console.log("error", error);
7266
setIsLoading(false);
@@ -205,11 +199,6 @@ function EmailComponent({
205199
</div>
206200
</div>
207201
<div className="h-full p-[20px]">
208-
{isEmailCelebration && (
209-
<div className="absolute w-[100%] flex justify-center items-center">
210-
<img alt="celeb" width={300} height={250} src={celebration} />
211-
</div>
212-
)}
213202
<p className="font-medium text-[15px] mb-[5px] text-base-content align-baseline">
214203
Recipients added here will get a copy of the signed document.
215204
</p>
@@ -293,7 +282,7 @@ function EmailComponent({
293282
<hr className="w-full my-[15px] bg-base-content" />
294283
<button
295284
type="button"
296-
className="op-btn op-btn-primary"
285+
className="op-btn op-btn-secondary"
297286
onClick={() => emailList.length > 0 && sendEmail()}
298287
>
299288
Send

apps/OpenSign/src/components/pdf/Placeholder.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,7 @@ function Placeholder(props) {
776776
{isTabAndMobile ? (
777777
<div
778778
// className="sm:inline-block md:inline-block lg:hidden "
779+
className="flex items-stretch"
779780
style={{
780781
left: xPos(props.pos, props.isSignYourself),
781782
top: yPos(props.pos, props.isSignYourself),

apps/OpenSign/src/components/pdf/PlaceholderBorder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function PlaceholderBorder(props) {
4747
onTouchEnd={() =>
4848
props.pos.type === textWidget && props?.setDraggingEnabled(true)
4949
}
50-
className="borderResize"
50+
className="absolute inline-block w-[14px] h-[14px] hover:cursor-sw-resize"
5151
style={{
5252
borderColor: themeColor,
5353
borderStyle: "dashed",

apps/OpenSign/src/components/pdf/PlaceholderType.js

Lines changed: 47 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import "react-datepicker/dist/react-datepicker.css";
1414
import "../../styles/signature.css";
1515
import RegexParser from "regex-parser";
1616
const textWidgetCls =
17-
"w-full h-full md:min-w-full md:min-h-full z-[999] text-[12px] rounded-[2px] border-[1px] border-[#007bff] overflow-hidden resize-none outline-none text-base-content bg-base-100 whitespace-pre-wrap";
17+
"w-full h-full md:min-w-full md:min-h-full z-[999] text-[12px] rounded-[2px] border-[1px] border-[#007bff] overflow-hidden resize-none outline-none text-base-content item-center bg-base-100 whitespace-pre-wrap";
1818
const selectWidgetCls =
1919
"w-full h-full absolute left-0 top-0 border-[1px] border-[#007bff] rounded-[2px] focus:outline-none bg-base-100 text-base-content";
2020
function PlaceholderType(props) {
@@ -309,10 +309,10 @@ function PlaceholderType(props) {
309309
alt="signature"
310310
draggable="false"
311311
src={props.pos.SignUrl}
312-
className="w-full h-full object-contain"
312+
className="w-full h-full "
313313
/>
314314
) : (
315-
<div className="text-[11px] text-black justify-center">
315+
<div className="text-[11px] w-full h-full text-black flex flex-col justify-center items-center">
316316
{props?.handleUserName &&
317317
props?.handleUserName(
318318
props?.data?.Id,
@@ -327,10 +327,10 @@ function PlaceholderType(props) {
327327
alt="stamp"
328328
draggable="false"
329329
src={props.pos.SignUrl}
330-
className="w-full h-full object-contain"
330+
className="w-full h-full"
331331
/>
332332
) : (
333-
<div className="text-[11px] text-black justify-center">
333+
<div className="text-[11px] w-full h-full text-black flex flex-col justify-center items-center">
334334
{props?.handleUserName &&
335335
props?.handleUserName(
336336
props?.data?.Id,
@@ -412,6 +412,12 @@ function PlaceholderType(props) {
412412
);
413413
}}
414414
className={textWidgetCls}
415+
style={{
416+
fontSize: props.pos.options?.fontSize
417+
? props.pos.options?.fontSize + "px"
418+
: "12px",
419+
color: props.pos.options?.fontColor || "black"
420+
}}
415421
cols="50"
416422
/>
417423
) : (
@@ -470,10 +476,10 @@ function PlaceholderType(props) {
470476
alt="initials"
471477
draggable="false"
472478
src={props.pos.SignUrl}
473-
className="w-full h-full object-contain"
479+
className="w-full h-full"
474480
/>
475481
) : (
476-
<div className="text-[11px] text-black justify-center">
482+
<div className="text-[11px] w-full h-full text-black flex flex-col justify-center items-center">
477483
{props?.handleUserName &&
478484
props?.handleUserName(
479485
props?.data?.Id,
@@ -505,6 +511,12 @@ function PlaceholderType(props) {
505511
);
506512
}}
507513
className={textWidgetCls}
514+
style={{
515+
fontSize: props.pos.options?.fontSize
516+
? props.pos.options?.fontSize + "px"
517+
: "12px",
518+
color: props.pos.options?.fontColor || "black"
519+
}}
508520
cols="50"
509521
/>
510522
) : (
@@ -539,6 +551,12 @@ function PlaceholderType(props) {
539551
);
540552
}}
541553
className={textWidgetCls}
554+
style={{
555+
fontSize: props.pos.options?.fontSize
556+
? props.pos.options?.fontSize + "px"
557+
: "12px",
558+
color: props.pos.options?.fontColor || "black"
559+
}}
542560
cols="50"
543561
/>
544562
) : (
@@ -573,6 +591,12 @@ function PlaceholderType(props) {
573591
);
574592
}}
575593
className={textWidgetCls}
594+
style={{
595+
fontSize: props.pos.options?.fontSize
596+
? props.pos.options?.fontSize + "px"
597+
: "12px",
598+
color: props.pos.options?.fontColor || "black"
599+
}}
576600
cols="50"
577601
/>
578602
) : (
@@ -650,10 +674,10 @@ function PlaceholderType(props) {
650674
alt="image"
651675
draggable="false"
652676
src={props.pos.SignUrl}
653-
className="w-full h-full object-contain"
677+
className="w-full h-full"
654678
/>
655679
) : (
656-
<div className="text-[11px] text-black justify-center">
680+
<div className="text-[11px] w-full h-full text-black flex flex-coljustify-center items-center">
657681
{props?.handleUserName &&
658682
props?.handleUserName(
659683
props?.data?.Id,
@@ -685,6 +709,12 @@ function PlaceholderType(props) {
685709
);
686710
}}
687711
className={textWidgetCls}
712+
style={{
713+
fontSize: props.pos.options?.fontSize
714+
? props.pos.options?.fontSize + "px"
715+
: "12px",
716+
color: props.pos.options?.fontColor || "black"
717+
}}
688718
cols="50"
689719
/>
690720
) : (
@@ -749,6 +779,12 @@ function PlaceholderType(props) {
749779
);
750780
}}
751781
className={textWidgetCls}
782+
style={{
783+
fontSize: props.pos.options?.fontSize
784+
? props.pos.options?.fontSize + "px"
785+
: "12px",
786+
color: props.pos.options?.fontColor || "black"
787+
}}
752788
cols="50"
753789
/>
754790
);
@@ -759,17 +795,11 @@ function PlaceholderType(props) {
759795
alt="image"
760796
draggable="false"
761797
src={props.pos.SignUrl}
762-
className="w-full h-full object-contain"
798+
className="w-full h-full"
763799
/>
764800
</div>
765801
) : (
766-
<div
767-
style={{
768-
fontSize: "10px",
769-
color: "black",
770-
justifyContent: "center"
771-
}}
772-
>
802+
<div className="text-[11px] w-full h-full text-black flex flex-col justify-center items-center">
773803
{props.pos.isStamp ? <div>stamp</div> : <div>signature</div>}
774804
{props?.handleUserName &&
775805
props?.handleUserName(props?.data?.Id, props?.data?.Role)}

apps/OpenSign/src/components/pdf/RecipientList.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ const RecipientList = (props) => {
209209
</div>
210210
</div>
211211
{isMobile && props.sendInOrder && (
212-
<div className="flex flex-row items-center gap-[5px]">
212+
<div className="flex flex-row items-center gap-[5px] mr-2">
213213
<div
214214
onClick={(e) => {
215215
if (ind !== 0) {

apps/OpenSign/src/components/pdf/RenderAllPdfPage.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,7 @@ function RenderAllPdfPage({
6565
};
6666

6767
return (
68-
<div
69-
ref={pageContainer}
70-
className="hidden min-h-screen w-[20%] bg-base-100 h-full md:block"
71-
>
68+
<div ref={pageContainer} className="hidden w-[20%] bg-base-100 md:block">
7269
<div className="mx-2 pr-2 pt-2 pb-1 text-[15px] text-base-content font-semibold border-b-[1px] border-base-300">
7370
Pages
7471
</div>

0 commit comments

Comments
 (0)