feat: add tour message on add role button when user try to add widget without add any role

This commit is contained in:
RaktimaNXG
2024-04-18 14:39:32 +05:30
parent fb017c4bcd
commit 06bcae64be
@@ -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 && (
<Tour
onRequestClose={() => setIsAddRole(false)}
steps={tourAddRole}
isOpen={isAddRole}
rounded={5}
closeWithMask={false}
/>
)}
{/* this component used to render all pdf pages in left side */}
<RenderAllPdfPage
signPdfUrl={pdfDetails[0].URL}