Skip to content

Commit 9890d56

Browse files
Merge pull request #619 from OpenSignLabs/fix_issue
feat: add tour message on add role button when user try to add widget without add any role
2 parents fb017c4 + 06bcae6 commit 9890d56

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

apps/OpenSign/src/pages/TemplatePlaceholder.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ const TemplatePlaceholder = () => {
145145
const [currWidgetsDetails, setCurrWidgetsDetails] = useState([]);
146146
const [isCheckbox, setIsCheckbox] = useState(false);
147147
const [widgetName, setWidgetName] = useState(false);
148+
const [isAddRole, setIsAddRole] = useState(false);
148149
const senderUser =
149150
localStorage.getItem(
150151
`Parse/${localStorage.getItem("parseAppId")}/currentUser`
@@ -481,9 +482,20 @@ const TemplatePlaceholder = () => {
481482
} else {
482483
setIsReceipent(false);
483484
}
485+
} else {
486+
setIsAddRole(true);
484487
}
485488
};
486489

490+
const tourAddRole = [
491+
{
492+
selector: '[data-tut="reactourAddbtn"]',
493+
content: "You need to add a role before you can add fields for it. ",
494+
position: "top",
495+
style: { fontSize: "13px" }
496+
}
497+
];
498+
487499
//function for get pdf page details
488500
const pageDetails = async (pdf) => {
489501
const load = {
@@ -1218,6 +1230,15 @@ const TemplatePlaceholder = () => {
12181230
closeWithMask={false}
12191231
/>
12201232
)}
1233+
{isAddRole && (
1234+
<Tour
1235+
onRequestClose={() => setIsAddRole(false)}
1236+
steps={tourAddRole}
1237+
isOpen={isAddRole}
1238+
rounded={5}
1239+
closeWithMask={false}
1240+
/>
1241+
)}
12211242
{/* this component used to render all pdf pages in left side */}
12221243
<RenderAllPdfPage
12231244
signPdfUrl={pdfDetails[0].URL}

0 commit comments

Comments
 (0)