mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-20 06:35:54 +02:00
feat: add tour message on add role button when user try to add widget without add any role
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user