From 06bcae64befcf6618fc32f20dd1b2c80311fe5f5 Mon Sep 17 00:00:00 2001 From: RaktimaNXG Date: Thu, 18 Apr 2024 14:39:32 +0530 Subject: [PATCH] feat: add tour message on add role button when user try to add widget without add any role --- .../OpenSign/src/pages/TemplatePlaceholder.js | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/apps/OpenSign/src/pages/TemplatePlaceholder.js b/apps/OpenSign/src/pages/TemplatePlaceholder.js index 10237ec96..23ea05acb 100644 --- a/apps/OpenSign/src/pages/TemplatePlaceholder.js +++ b/apps/OpenSign/src/pages/TemplatePlaceholder.js @@ -145,6 +145,7 @@ const TemplatePlaceholder = () => { const [currWidgetsDetails, setCurrWidgetsDetails] = useState([]); const [isCheckbox, setIsCheckbox] = useState(false); const [widgetName, setWidgetName] = useState(false); + const [isAddRole, setIsAddRole] = useState(false); const senderUser = localStorage.getItem( `Parse/${localStorage.getItem("parseAppId")}/currentUser` @@ -481,9 +482,20 @@ const TemplatePlaceholder = () => { } else { setIsReceipent(false); } + } else { + setIsAddRole(true); } }; + const tourAddRole = [ + { + selector: '[data-tut="reactourAddbtn"]', + content: "You need to add a role before you can add fields for it. ", + position: "top", + style: { fontSize: "13px" } + } + ]; + //function for get pdf page details const pageDetails = async (pdf) => { const load = { @@ -1218,6 +1230,15 @@ const TemplatePlaceholder = () => { closeWithMask={false} /> )} + {isAddRole && ( + setIsAddRole(false)} + steps={tourAddRole} + isOpen={isAddRole} + rounded={5} + closeWithMask={false} + /> + )} {/* this component used to render all pdf pages in left side */}