Skip to content

Commit 6161e97

Browse files
refactor: add help buttons for all sections
1 parent 593a849 commit 6161e97

File tree

16 files changed

+230
-206
lines changed

16 files changed

+230
-206
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Parse from "parse";
44
import getReplacedHashQuery from "../../constant/getReplacedHashQuery";
55
import "../../styles/loader.css";
66
import { useNavigate } from "react-router-dom";
7+
import Tooltip from "../../primitives/Tooltip";
78

89
const DashboardCard = (props) => {
910
const navigate = useNavigate();
@@ -335,7 +336,7 @@ const DashboardCard = (props) => {
335336
props.Data && props.Data.Redirect_type
336337
? "cursor-pointer"
337338
: "cursor-default"
338-
} w-full h-[140px] px-3 pt-4 pb-10 text-white rounded-md shadow overflow-hidden`}
339+
} w-full h-[140px] px-3 pt-4 pb-10 text-white rounded-md shadow overflow-hidden relative`}
339340
>
340341
<div className="flex items-center justify-start gap-5">
341342
<span className="rounded-full bg-black bg-opacity-20 w-[60px] h-[60px] self-start flex justify-center items-center">
@@ -352,6 +353,9 @@ const DashboardCard = (props) => {
352353
</div>
353354
</div>
354355
</div>
356+
<div className="text-xs absolute top-1 right-1">
357+
<Tooltip id={props.Label} iconColor={"white"} message={props?.Data?.tourMessage} />
358+
</div>
355359
</div>
356360
);
357361
};

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

Lines changed: 16 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -145,32 +145,15 @@ function DropdownWidgetOption(props) {
145145
};
146146

147147
return (
148-
//props.showDropdown
149-
<ModalUi
150-
// styleClass={"dropdownModal"}
151-
isOpen={props.showDropdown}
152-
title={props.title}
153-
showClose={false}
154-
>
155-
{props.type === "checkbox" && !props.isSignYourself && (
156-
<PremiumAlertHeader
157-
message={
158-
"Field validations are free in beta, this feature will incur a fee later."
159-
}
160-
/>
161-
)}
162-
<div
163-
className={`${
164-
props.type === "checkbox" && !props.isSignYourself ? "pt-0" : ""
165-
} h-full p-[20px]`}
166-
>
148+
<ModalUi isOpen={props.showDropdown} title={props.title} showClose={false}>
149+
<div className="h-full p-[15px]">
167150
<form
168151
onSubmit={(e) => {
169152
e.preventDefault();
170153
handleSaveOption();
171154
}}
172155
>
173-
<div className="dropdownContainer">
156+
<div>
174157
<label style={{ fontSize: "13px", fontWeight: "600" }}>
175158
Name<span style={{ color: "red", fontSize: 13 }}> *</span>
176159
</label>
@@ -395,17 +378,22 @@ function DropdownWidgetOption(props) {
395378
</div>
396379
)}
397380
</div>
381+
{props.type === "checkbox" && !props.isSignYourself && (
382+
<PremiumAlertHeader
383+
message={
384+
"Field validations are free in beta, this feature will incur a fee later."
385+
}
386+
/>
387+
)}
398388
<div
399-
style={{
400-
height: "1px",
401-
backgroundColor: "#9f9f9f",
402-
width: "100%",
403-
marginTop: "15px",
404-
marginBottom: "15px"
405-
}}
389+
className={`${
390+
props.type === "checkbox" && !props.isSignYourself
391+
? "mb-[15px]"
392+
: "my-[15px]"
393+
} w-full h-[1px] bg-[#9f9f9f]`}
406394
></div>
395+
407396
<button
408-
// onClick={() => handleSaveOption()}
409397
disabled={dropdownOptionList.length === 0 && true}
410398
style={{
411399
background: themeColor,

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

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const WidgetNameModal = (props) => {
1515
});
1616
const [isValid, setIsValid] = useState(true);
1717
const statusArr = ["Required", "Optional"];
18-
const inputOpt = ["email", "number"];
18+
const inputOpt = ["text", "email", "number"];
1919

2020
useEffect(() => {
2121
if (props.defaultdata) {
@@ -71,7 +71,7 @@ const WidgetNameModal = (props) => {
7171
return "/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$/";
7272
case "number":
7373
return "/^\\d+$/";
74-
case textInputWidget:
74+
case "text":
7575
return "/^[a-zA-Zs]+$/";
7676
default:
7777
return type;
@@ -187,25 +187,22 @@ const WidgetNameModal = (props) => {
187187
name="defaultValue"
188188
value={formdata.defaultValue}
189189
onChange={(e) => handledefaultChange(e)}
190-
onBlur={() =>
191-
isValid === false &&
192-
setFormdata({ ...formdata, defaultValue: "" })
193-
}
190+
autoComplete="off"
191+
onBlur={() => {
192+
if (isValid === false) {
193+
setFormdata({ ...formdata, defaultValue: "" });
194+
setIsValid(true);
195+
}
196+
}}
194197
/>
195-
{isValid === false ? (
196-
<p style={{ color: "Red", fontSize: 8 }}>
198+
{isValid === false && (
199+
<div className="warning defaultvalueWarning" style={{ fontSize: 12 }}>
200+
<i
201+
className="fas fa-exclamation-circle"
202+
style={{ color: "#fab005", fontSize: 15 }}
203+
></i>{" "}
197204
invalid default value
198-
</p>
199-
) : (
200-
<p
201-
style={{
202-
color: "transparent",
203-
fontSize: 10,
204-
margin: "3px 8px"
205-
}}
206-
>
207-
.
208-
</p>
205+
</div>
209206
)}
210207
</div>
211208
</>

apps/OpenSign/src/components/shared/fields/SignersInput.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Select from "react-select";
33
import AddSigner from "../../AddSigner";
44
import Modal from "react-modal";
55
import Parse from "parse";
6+
import Tooltip from "../../../primitives/Tooltip";
67
function arrayMove(array, from, to) {
78
array = array.slice();
89
array.splice(to < 0 ? array.length + to : to, 0, array.splice(from, 1)[0]);
@@ -107,6 +108,12 @@ const SignersInput = (props) => {
107108
<label className="block">
108109
Signers
109110
{props.required && <span className="text-red-500 text-[13px]">*</span>}
111+
<span className="ml-1 text-xs z-[999]">
112+
<Tooltip
113+
id={"signer-tooltip"}
114+
message={"This is a list of contacts/signers added by you"}
115+
/>
116+
</span>
110117
</label>
111118
<div style={{ display: "flex", gap: 5 }}>
112119
<div style={{ flexWrap: "wrap", width: "100%" }}>

apps/OpenSign/src/json/ReportJson.js

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ export default function reportJson(id) {
1818
btnIcon: "fa fa-plus",
1919
redirectUrl: "draftDocument"
2020
}
21-
]
21+
],
22+
helpMsg: "This are documents you have started but have not finalized for sending."
2223
};
2324
// Need your sign report
2425
case "4Hhwbp482K":
@@ -33,7 +34,9 @@ export default function reportJson(id) {
3334
btnIcon: "fa fa-eye",
3435
redirectUrl: "pdfRequestFiles"
3536
}
36-
]
37+
],
38+
helpMsg:
39+
"This is a list of documents that are waiting for your signature"
3740
};
3841
// In progess report
3942
case "1MwEuxLEkF":
@@ -48,7 +51,9 @@ export default function reportJson(id) {
4851
btnIcon: "fa fa-eye",
4952
redirectUrl: "pdfRequestFiles"
5053
}
51-
]
54+
],
55+
helpMsg:
56+
"This is a list of documents you've sent to other parties for signature."
5257
};
5358
// completed documents report
5459
case "kQUoW4hUXz":
@@ -63,7 +68,8 @@ export default function reportJson(id) {
6368
btnIcon: "fa fa-eye",
6469
redirectUrl: "draftDocument"
6570
}
66-
]
71+
],
72+
helpMsg: "This is a list of documents that have been signed by all parties."
6773
};
6874
// declined documents report
6975
case "UPr2Fm5WY3":
@@ -78,7 +84,8 @@ export default function reportJson(id) {
7884
btnIcon: "fa fa-eye",
7985
redirectUrl: "draftDocument"
8086
}
81-
]
87+
],
88+
helpMsg: "This is a list of documents that have been declined by one of the signers."
8289
};
8390
// Expired Documents report
8491
case "zNqBHXHsYH":
@@ -93,7 +100,8 @@ export default function reportJson(id) {
93100
btnIcon: "fa fa-eye",
94101
redirectUrl: "draftDocument"
95102
}
96-
]
103+
],
104+
helpMsg: "This is a list of documents that have reached their expiration date."
97105
};
98106
// Recently sent for signatures report show on dashboard
99107
case "d9k3UfYHBc":
@@ -153,7 +161,8 @@ export default function reportJson(id) {
153161
btnIcon: "fa-solid fa-trash"
154162
}
155163
],
156-
form: "ContactBook"
164+
form: "ContactBook",
165+
helpMsg: "This is a list of contacts/signers that have been added by you."
157166
};
158167
// template report
159168
case "6TeaPr321t":
@@ -175,7 +184,9 @@ export default function reportJson(id) {
175184
btnIcon: "fa fa-plus",
176185
redirectUrl: "template"
177186
}
178-
]
187+
],
188+
helpMsg:
189+
"This is a list of templates that are used to create documents"
179190
};
180191
default:
181192
return null;

apps/OpenSign/src/pages/Form.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const Forms = (props) => {
3535
const [formData, setFormData] = useState({
3636
Name: "",
3737
Description: "",
38-
Note: "Please review and sign this document",
38+
Note: "",
3939
TimeToCompleteDays: 15,
4040
SendinOrder: "false"
4141
});
@@ -51,6 +51,7 @@ const Forms = (props) => {
5151
};
5252
useEffect(() => {
5353
handleReset();
54+
// eslint-disable-next-line react-hooks/exhaustive-deps
5455
}, [props.title]);
5556
const handleFileInput = (e) => {
5657
setpercentage(0);
@@ -235,7 +236,10 @@ const Forms = (props) => {
235236
setFormData({
236237
Name: "",
237238
Description: "",
238-
Note: "Please review and sign this document",
239+
Note:
240+
props.title === "Sign Yourself"
241+
? "Note to myself"
242+
: "Please review and sign this document",
239243
TimeToCompleteDays: 15,
240244
SendinOrder: "true"
241245
});
@@ -326,7 +330,10 @@ const Forms = (props) => {
326330
</div>
327331
<div className="text-xs mt-2">
328332
<label className="block">
329-
Title<span className="text-red-500 text-[13px]">*</span>
333+
{props.title === "New Template"
334+
? "Template Title"
335+
: "Document Title"}
336+
<span className="text-red-500 text-[13px]">*</span>
330337
</label>
331338
<input
332339
name="Name"

apps/OpenSign/src/pages/GenerateToken.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import ModalUi from "../primitives/ModalUi";
66
import { rejectBtn, submitBtn } from "../constant/const";
77
import { openInNewTab } from "../constant/Utils";
88
import PremiumAlertHeader from "../primitives/PremiumAlertHeader";
9+
import Tooltip from "../primitives/Tooltip";
910

1011
function GenerateToken() {
1112
const [parseBaseUrl] = useState(localStorage.getItem("baseUrl"));
@@ -117,7 +118,12 @@ function GenerateToken() {
117118
) : (
118119
<div className="bg-white flex flex-col justify-center shadow rounded">
119120
<PremiumAlertHeader />
120-
<h1 className="ml-4 mt-3 mb-2 font-semibold">API Token</h1>
121+
<h1 className="ml-4 mt-3 mb-2 font-semibold">
122+
API Token{" "}
123+
<Tooltip
124+
url={"https://docs.opensignlabs.com/docs/API-docs/opensign-api-v-1"}
125+
/>
126+
</h1>
121127
<ul className="w-full flex flex-col p-2 text-sm">
122128
<li
123129
className={`flex justify-between items-center border-y-[1px] border-gray-300 break-all py-2`}

0 commit comments

Comments
 (0)