From 05fe68d45849716ecb0b28e9212429dc8005c652 Mon Sep 17 00:00:00 2001 From: RaktimaNXG Date: Wed, 10 Apr 2024 15:57:05 +0530 Subject: [PATCH 1/3] feat : add tour message on template report and opensign-drive --- .../src/components/opensigndrive/DriveBody.js | 2 + apps/OpenSign/src/json/ReportJson.js | 24 +- apps/OpenSign/src/pages/Login.js | 12 +- apps/OpenSign/src/pages/Opensigndrive.js | 242 ++++++++++++++++-- apps/OpenSign/src/pages/Report.js | 39 +++ apps/OpenSign/src/pages/Signup.js | 4 +- .../src/primitives/GetReportDisplay.js | 92 ++++++- 7 files changed, 378 insertions(+), 37 deletions(-) diff --git a/apps/OpenSign/src/components/opensigndrive/DriveBody.js b/apps/OpenSign/src/components/opensigndrive/DriveBody.js index 213d3eac4..1a40f878b 100644 --- a/apps/OpenSign/src/components/opensigndrive/DriveBody.js +++ b/apps/OpenSign/src/components/opensigndrive/DriveBody.js @@ -385,6 +385,7 @@ function DriveBody(props) { flexDirection: "column", cursor: "pointer" }} + data-tut={props.dataTutSeventh} > no img checkPdfStatus(data)} + data-tut={props.dataTutSixth} /> {rename === data.objectId ? (
- The image displays the OpenSign logo with a stylized blue square with an open corner, accompanied by the tagline Seal the Deal, Openly. + {image && ( + The image displays the OpenSign logo with a stylized blue square with an open corner, accompanied by the tagline Seal the Deal, Openly. + )}
diff --git a/apps/OpenSign/src/pages/Opensigndrive.js b/apps/OpenSign/src/pages/Opensigndrive.js index 8c248f6cf..8a2db7ae8 100644 --- a/apps/OpenSign/src/pages/Opensigndrive.js +++ b/apps/OpenSign/src/pages/Opensigndrive.js @@ -7,6 +7,10 @@ import { useNavigate } from "react-router-dom"; import Title from "../components/Title"; import Parse from "parse"; import ModalUi from "../primitives/ModalUi"; +import TourContentWithBtn from "../primitives/TourContentWithBtn"; +import Tour from "reactour"; +import axios from "axios"; + const DriveBody = React.lazy( () => import("../components/opensigndrive/DriveBody") ); @@ -42,6 +46,8 @@ function Opensigndrive() { const [error, setError] = useState(); const [folderLoader, setIsFolderLoader] = useState(false); const [isShowSort, setIsShowSort] = useState(false); + const [isTour, setIsTour] = useState(false); + const [tourStatusArr, setTourStatusArr] = useState([]); const [isLoading, setIsLoading] = useState({ isLoad: true, message: "This might take some time" @@ -56,6 +62,8 @@ function Opensigndrive() { const [loading, setLoading] = useState(false); const sortOrder = ["Ascending", "Descending"]; const sortingValue = ["Name", "Date"]; + const [isDontShow, setIsDontShow] = useState(false); + const [tourData, setTourData] = useState(); const orderName = { Ascending: "Ascending", Descending: "Descending", @@ -73,12 +81,98 @@ function Opensigndrive() { useEffect(() => { getPdfDocumentList(); + // eslint-disable-next-line }, [docId]); + const tourConfigs = [ + { + selector: '[data-tut="reactourFirst"]', + content: () => ( + + ), + position: "top", + style: { fontSize: "13px" } + }, + { + selector: '[data-tut="reactourSecond"]', + content: () => ( + + ), + position: "top", + style: { fontSize: "13px" } + }, + { + selector: '[data-tut="reactourThird"]', + content: () => ( + + ), + position: "top", + style: { fontSize: "13px" } + }, + { + selector: '[data-tut="reactourForth"]', + content: () => ( + + ), + position: "top", + style: { fontSize: "13px" } + }, + + { + selector: '[data-tut="reactourFifth"]', + content: () => ( + + ), + position: "bottom", + style: { fontSize: "13px" } + }, + { + selector: '[data-tut="reactourSixth"]', + content: () => ( + + ), + position: "bottom", + style: { fontSize: "13px" } + }, + { + selector: '[data-tut="reactourSeventh"]', + content: () => ( + + ), + position: "bottom", + style: { fontSize: "13px" } + } + ]; //function for get all pdf document list const getPdfDocumentList = async (disbaleLoading) => { setLoading(true); + checkTourStatus(); if (!disbaleLoading) { setIsLoading({ isLoad: true, message: "This might take some time" }); } @@ -87,6 +181,22 @@ function Opensigndrive() { if (driveDetails && driveDetails === "Error: Something went wrong!") { setHandleError("Error: Something went wrong!"); } else if (driveDetails && driveDetails.length > 0) { + let newTour = tourConfigs; + const isFolderExist = driveDetails.some( + (data) => data.Type === "Folder" + ); + if (!isFolderExist) { + newTour = newTour.filter( + (data) => data.selector !== '[data-tut="reactourSeventh"]' + ); + } + const isDocumentExist = driveDetails.some((data) => data.URL); + if (!isDocumentExist) { + newTour = newTour.filter( + (data) => data.selector !== '[data-tut="reactourSixth"]' + ); + } + setTourData(newTour); setSkip((prevSkip) => prevSkip + limit); sortingData(null, null, driveDetails, true); } @@ -358,9 +468,78 @@ function Opensigndrive() { setNewFolderName(""); setError(""); }; + + const handleDontShow = (isChecked) => { + setIsDontShow(isChecked); + }; + + const closeTour = async () => { + setIsTour(false); + if (isDontShow) { + const serverUrl = localStorage.getItem("baseUrl"); + const appId = localStorage.getItem("parseAppId"); + const extUserClass = localStorage.getItem("extended_class"); + const json = JSON.parse(localStorage.getItem("Extand_Class")); + const extUserId = json && json.length > 0 && json[0].objectId; + let updatedTourStatus = []; + if (tourStatusArr.length > 0) { + updatedTourStatus = [...tourStatusArr]; + const opensignTourIndex = tourStatusArr.findIndex( + (obj) => obj["opensignTour"] === false || obj["opensignTour"] === true + ); + if (opensignTourIndex !== -1) { + updatedTourStatus[opensignTourIndex] = { opensignTour: true }; + } else { + updatedTourStatus.push({ opensignTour: true }); + } + } else { + updatedTourStatus = [{ opensignTour: true }]; + } + await axios.put( + serverUrl + "classes/" + extUserClass + "/" + extUserId, + { + TourStatus: updatedTourStatus + }, + { + headers: { + "X-Parse-Application-Id": appId + } + } + ); + } + }; + //function to use check tour status of open sign drive + async function checkTourStatus() { + const currentUser = Parse.User.current(); + const cloudRes = await Parse.Cloud.run("getUserDetails", { + email: currentUser.get("email") + }); + const res = { data: cloudRes.toJSON() }; + if (res.data && res.data.TourStatus && res.data.TourStatus.length > 0) { + const tourStatus = res.data.TourStatus; + setTourStatusArr(tourStatus); + const filteredtourStatus = tourStatus.filter( + (obj) => obj["opensignTour"] + ); + if (filteredtourStatus.length > 0) { + const opensignTour = filteredtourStatus[0]["opensignTour"]; + // console.log("loginTour", loginTour); + if (opensignTour) { + setIsTour(false); + } else { + setIsTour(true); + } + } else { + setIsTour(true); + } + } else { + setIsTour(true); + } + } return (
+ <div> <ModalUi headerColor={"#dc3545"} @@ -523,7 +702,16 @@ function Opensigndrive() { ) : ( <> <div className="folderContainer"> + <Tour + onRequestClose={closeTour} + steps={tourData} + isOpen={isTour} + closeWithMask={false} + scrollOffset={-100} + rounded={5} + /> <div + data-tut="reactourFirst" onMouseEnter={(e) => handleMouseEnter(e)} ref={scrollRef} style={{ @@ -541,7 +729,7 @@ function Opensigndrive() { } onClick={() => setIsNewFol(!isNewFol)} > - <div className="sort"> + <div className="sort" data-tut="reactourSecond"> <i className="fa fa-plus-square" aria-hidden="true" @@ -602,7 +790,11 @@ function Opensigndrive() { className={isShowSort ? "dropdown show" : "dropdown"} onClick={() => setIsShowSort(!isShowSort)} > - <div className=" sort " data-toggle="dropdown"> + <div + data-tut="reactourThird" + className=" sort " + data-toggle="dropdown" + > <i className="fa fa-sort-amount-asc" aria-hidden="true" @@ -692,7 +884,11 @@ function Opensigndrive() { ></i> </div> ) : ( - <div className="sort" onClick={() => setIsList(!isList)}> + <div + data-tut="reactourForth" + className="sort" + onClick={() => setIsList(!isList)} + > <i className="fa fa-list" aria-hidden="true" @@ -717,24 +913,28 @@ function Opensigndrive() { <span style={{ fontWeight: "bold" }}>No Data Found!</span> </div> ) : ( - <React.Suspense fallback={<Loader />}> - <DriveBody - pdfData={pdfData} - setFolderName={setFolderName} - setIsLoading={setIsLoading} - setDocId={setDocId} - getPdfDocumentList={getPdfDocumentList} - isDocId={docId} - setPdfData={setPdfData} - isList={isList} - setIsAlert={setIsAlert} - setSkip={setSkip} - sortingData={sortingData} - /> - {loading && ( - <div style={{ textAlign: "center" }}>Loading...</div> - )} - </React.Suspense> + <div data-tut="reactourFifth"> + <React.Suspense fallback={<Loader />}> + <DriveBody + dataTutSixth="reactourSixth" + dataTutSeventh="reactourSeventh" + pdfData={pdfData} + setFolderName={setFolderName} + setIsLoading={setIsLoading} + setDocId={setDocId} + getPdfDocumentList={getPdfDocumentList} + isDocId={docId} + setPdfData={setPdfData} + isList={isList} + setIsAlert={setIsAlert} + setSkip={setSkip} + sortingData={sortingData} + /> + {loading && ( + <div style={{ textAlign: "center" }}>Loading...</div> + )} + </React.Suspense> + </div> )} </> )} diff --git a/apps/OpenSign/src/pages/Report.js b/apps/OpenSign/src/pages/Report.js index 674591359..6ac3135e0 100644 --- a/apps/OpenSign/src/pages/Report.js +++ b/apps/OpenSign/src/pages/Report.js @@ -6,6 +6,7 @@ import reportJson from "../json/ReportJson"; import { useParams } from "react-router-dom"; import Title from "../components/Title"; import PageNotFound from "./PageNotFound"; +import TourContentWithBtn from "../primitives/TourContentWithBtn"; const Report = () => { const { id } = useParams(); @@ -18,6 +19,8 @@ const Report = () => { const [isNextRecord, setIsNextRecord] = useState(false); const [isMoreDocs, setIsMoreDocs] = useState(true); const [form, setForm] = useState(""); + const [tourData, setTourData] = useState([]); + const [isDontShow, setIsDontShow] = useState(false); const abortController = new AbortController(); const docPerPage = 10; @@ -46,10 +49,44 @@ const Report = () => { // eslint-disable-next-line }, [isNextRecord]); + const handleDontShow = (isChecked) => { + setIsDontShow(isChecked); + }; const getReportData = async (skipUserRecord = 0, limit = 200) => { // setIsLoader(true); const json = reportJson(id); if (json) { + if (id === "6TeaPr321t") { + const tourConfig = [ + { + selector: "[data-tut=reactourFirst]", + content: () => ( + <TourContentWithBtn + message={`onclick add button you can create new template.`} + isChecked={handleDontShow} + /> + ), + position: "top", + style: { fontSize: "13px" } + } + ]; + json.actions.map((data) => { + const newConfig = { + selector: `[data-tut="${data?.selector}"]`, + content: () => ( + <TourContentWithBtn + message={data?.message} + isChecked={handleDontShow} + /> + ), + position: "top", + style: { fontSize: "13px" } + }; + tourConfig.push(newConfig); + }); + setTourData(tourConfig); + } + setActions(json.actions); setHeading(json.heading); setReportName(json.reportName); @@ -161,6 +198,8 @@ const Report = () => { docPerPage={docPerPage} form={form} report_help={reporthelp} + tourData={tourData} + isDontShow={isDontShow} /> ) : ( <PageNotFound prefix={"Report"} /> diff --git a/apps/OpenSign/src/pages/Signup.js b/apps/OpenSign/src/pages/Signup.js index 5443f6ecf..ec8f8461a 100644 --- a/apps/OpenSign/src/pages/Signup.js +++ b/apps/OpenSign/src/pages/Signup.js @@ -533,7 +533,9 @@ const Signup = () => { <div> <div className="md:m-10 lg:m-16 md:p-4 lg:p-10 p-5 bg-[#ffffff] md:border-[1px] md:border-gray-400 "> <div className="w-[250px] h-[66px] inline-block overflow-hidden"> - <img src={image} className="object-contain h-full" alt="logo" /> + {image && ( + <img src={image} className="object-contain h-full" alt="logo" /> + )} </div> <div className="grid grid-cols-1 md:grid-cols-2 gap-x-2"> <div className=""> diff --git a/apps/OpenSign/src/primitives/GetReportDisplay.js b/apps/OpenSign/src/primitives/GetReportDisplay.js index 69aee4102..0ea1b96c5 100644 --- a/apps/OpenSign/src/primitives/GetReportDisplay.js +++ b/apps/OpenSign/src/primitives/GetReportDisplay.js @@ -3,10 +3,12 @@ import pad from "../assets/images/pad.svg"; import { useNavigate } from "react-router-dom"; import axios from "axios"; import ModalUi from "./ModalUi"; +import Tour from "reactour"; import AddSigner from "../components/AddSigner"; import { modalSubmitBtnColor, modalCancelBtnColor } from "../constant/const"; import Alert from "./Alert"; import Tooltip from "./Tooltip"; +import Parse from "parse"; const ReportTable = ({ ReportName, List, @@ -17,7 +19,9 @@ const ReportTable = ({ isMoreDocs, docPerPage, form, - report_help + report_help, + tourData, + isDontShow }) => { const navigate = useNavigate(); const [currentPage, setCurrentPage] = useState(1); @@ -27,6 +31,8 @@ const ReportTable = ({ const [isDocErr, setIsDocErr] = useState(false); const [isContactform, setIsContactform] = useState(false); const [isDeleteModal, setIsDeleteModal] = useState({}); + const [isTour, setIsTour] = useState(false); + const [tourStatusArr, setTourStatusArr] = useState([]); const startIndex = (currentPage - 1) * docPerPage; // For loop is used to calculate page numbers visible below table @@ -40,6 +46,7 @@ const ReportTable = ({ }, [List, docPerPage]); // below useEffect reset currenpage to 1 if user change route useEffect(() => { + checkTourStatus(); return () => setCurrentPage(1); }, []); @@ -146,8 +153,6 @@ const ReportTable = ({ } } ); - - // console.log("Res ", res.data); if (res.data && res.data.objectId) { setActLoader({}); setIsAlert(true); @@ -247,6 +252,74 @@ const ReportTable = ({ }; const handleCloseDeleteModal = () => setIsDeleteModal({}); + async function checkTourStatus() { + const currentUser = Parse.User.current(); + const cloudRes = await Parse.Cloud.run("getUserDetails", { + email: currentUser.get("email") + }); + const res = { data: cloudRes.toJSON() }; + if (res.data && res.data.TourStatus && res.data.TourStatus.length > 0) { + const tourStatus = res.data.TourStatus; + // console.log("res ", res.data.TourStatus); + setTourStatusArr(tourStatus); + const filteredtourStatus = tourStatus.filter( + (obj) => obj["templateTour"] + ); + if (filteredtourStatus.length > 0) { + const templateTour = filteredtourStatus[0]["templateTour"]; + + if (templateTour) { + setIsTour(false); + } else { + setIsTour(true); + } + } else { + setIsTour(true); + } + } else { + setIsTour(true); + } + } + + const closeTour = async () => { + // console.log("closeTour"); + setIsTour(false); + if (isDontShow) { + const serverUrl = localStorage.getItem("baseUrl"); + const appId = localStorage.getItem("parseAppId"); + const extUserClass = localStorage.getItem("extended_class"); + const json = JSON.parse(localStorage.getItem("Extand_Class")); + const extUserId = json && json.length > 0 && json[0].objectId; + // console.log("extUserId ", extUserId) + + let updatedTourStatus = []; + if (tourStatusArr.length > 0) { + updatedTourStatus = [...tourStatusArr]; + const templateTourIndex = tourStatusArr.findIndex( + (obj) => obj["templateTour"] === false || obj["templateTour"] === true + ); + if (templateTourIndex !== -1) { + updatedTourStatus[templateTourIndex] = { templateTour: true }; + } else { + updatedTourStatus.push({ templateTour: true }); + } + } else { + updatedTourStatus = [{ templateTour: true }]; + } + + await axios.put( + serverUrl + "classes/" + extUserClass + "/" + extUserId, + { + TourStatus: updatedTourStatus + }, + { + headers: { + "X-Parse-Application-Id": appId + } + } + ); + } + }; return ( <div className="p-2 overflow-x-scroll w-full bg-white rounded-md"> {isAlert && ( @@ -256,6 +329,16 @@ const ReportTable = ({ : "Record deleted successfully!"} </Alert> )} + {tourData && ReportName === "Templates" && ( + <Tour + onRequestClose={closeTour} + steps={tourData} + isOpen={isTour} + // rounded={5} + closeWithMask={false} + /> + )} + <div className="flex flex-row items-center justify-between my-2 mx-3 text-[20px] md:text-[23px]"> <div className="font-light"> {ReportName}{" "} @@ -267,6 +350,7 @@ const ReportTable = ({ </div> {ReportName === "Templates" && ( <i + data-tut="reactourFirst" onClick={() => navigate("/form/template")} className="fa-solid fa-square-plus text-sky-400 text-[25px]" ></i> @@ -280,6 +364,7 @@ const ReportTable = ({ </div> )} </div> + <table className="table-auto w-full border-collapse"> <thead className="text-[14px]"> <tr className="border-y-[1px]"> @@ -410,6 +495,7 @@ const ReportTable = ({ {actions?.length > 0 && actions.map((act, index) => ( <button + data-tut={act?.selector} key={index} onClick={() => act?.redirectUrl From f5f18f16304b02a003c520ecdaf5e7e4f98d0497 Mon Sep 17 00:00:00 2001 From: RaktimaNXG <raktima.c@nxglabs.com> Date: Wed, 10 Apr 2024 18:47:08 +0530 Subject: [PATCH 2/3] fix: change tour message --- .../src/components/pdf/Placeholder.js | 2 +- apps/OpenSign/src/json/ReportJson.js | 6 ++- apps/OpenSign/src/pages/Opensigndrive.js | 18 ++++----- apps/OpenSign/src/pages/PlaceHolderSign.js | 40 +++++++++++-------- apps/OpenSign/src/pages/Report.js | 4 +- .../OpenSign/src/pages/TemplatePlaceholder.js | 4 +- .../cloud/parsefunction/getInvoices.js | 1 + 7 files changed, 41 insertions(+), 34 deletions(-) diff --git a/apps/OpenSign/src/components/pdf/Placeholder.js b/apps/OpenSign/src/components/pdf/Placeholder.js index 0ecc29a5f..b11e514e6 100644 --- a/apps/OpenSign/src/components/pdf/Placeholder.js +++ b/apps/OpenSign/src/components/pdf/Placeholder.js @@ -416,7 +416,7 @@ function Placeholder(props) { {props.pos.type !== textWidget && !props.isSignYourself && ( <i - data-tut="reactourLinkUser" + data-tut="assignSigner" className="fa-regular fa-user signUserIcon" onClick={(e) => { e.stopPropagation(); diff --git a/apps/OpenSign/src/json/ReportJson.js b/apps/OpenSign/src/json/ReportJson.js index d9acde381..6e92edce5 100644 --- a/apps/OpenSign/src/json/ReportJson.js +++ b/apps/OpenSign/src/json/ReportJson.js @@ -182,7 +182,8 @@ export default function reportJson(id) { btnIcon: "fa fa-plus", redirectUrl: "placeHolderSign", selector: "reactourSecond", - message: "onclick use button to create document from template." + message: + "Click the ‘Use’ button to create a new document from an existing template." }, { btnLabel: "Edit", @@ -191,7 +192,8 @@ export default function reportJson(id) { btnIcon: "fa fa-plus", redirectUrl: "template", selector: "reactourThird", - message: "onclick edit button you can edit template." + message: + "Use the ‘Edit’ button to add signer roles, modify fields, and update your template. Changes will apply to all future documents created from this template but won’t affect existing documents." } ], diff --git a/apps/OpenSign/src/pages/Opensigndrive.js b/apps/OpenSign/src/pages/Opensigndrive.js index 8a2db7ae8..c405358e1 100644 --- a/apps/OpenSign/src/pages/Opensigndrive.js +++ b/apps/OpenSign/src/pages/Opensigndrive.js @@ -90,7 +90,7 @@ function Opensigndrive() { selector: '[data-tut="reactourFirst"]', content: () => ( <TourContentWithBtn - message={`click on folder path you can re-redirect to see of that folder list of document.`} + message={`Click on the breadcrumb links to easily navigate through the folder hierarchy and view the documents within each folder.`} isChecked={handleDontShow} /> ), @@ -101,7 +101,7 @@ function Opensigndrive() { selector: '[data-tut="reactourSecond"]', content: () => ( <TourContentWithBtn - message={`click on add button you can see option of to create new folder and create new document.`} + message={`Click the add button to create a new folder or document.`} isChecked={handleDontShow} /> ), @@ -112,7 +112,7 @@ function Opensigndrive() { selector: '[data-tut="reactourThird"]', content: () => ( <TourContentWithBtn - message={`you can sort your document list using Date or Name.`} + message={`Sort your documents by Date or Name using this menu.`} isChecked={handleDontShow} /> ), @@ -123,7 +123,7 @@ function Opensigndrive() { selector: '[data-tut="reactourForth"]', content: () => ( <TourContentWithBtn - message={`click on this menu you can change document list in table format.`} + message={`Click on this menu to display the documents in list view.`} isChecked={handleDontShow} /> ), @@ -135,7 +135,7 @@ function Opensigndrive() { selector: '[data-tut="reactourFifth"]', content: () => ( <TourContentWithBtn - message={`this document list is render according to selected sort and icon show document status.`} + message={`The document list is displayed according to the selected sorting option. Icons next to each document indicate its current status.`} isChecked={handleDontShow} /> ), @@ -146,9 +146,7 @@ function Opensigndrive() { selector: '[data-tut="reactourSixth"]', content: () => ( <TourContentWithBtn - message={`on right click on document you can see four option (Download,Rename,Move,Delete) and onclick on document - you can navigate next page to see status of document - .`} + message={`Right-click on a document to see options such as Download, Rename, Move, and Delete. Click on the document to open it.`} isChecked={handleDontShow} /> ), @@ -159,9 +157,7 @@ function Opensigndrive() { selector: '[data-tut="reactourSeventh"]', content: () => ( <TourContentWithBtn - message={`on right click on folder you can see option (Rename) and onclick on folder - you can navigate next page to see document list exist in that folder - .`} + message={`Right-click on any folder to see options. Choose ‘Rename’ to change the folder’s name or click on the folder to navigate through its contents.`} isChecked={handleDontShow} /> ), diff --git a/apps/OpenSign/src/pages/PlaceHolderSign.js b/apps/OpenSign/src/pages/PlaceHolderSign.js index cac8d35cd..59cae9f50 100644 --- a/apps/OpenSign/src/pages/PlaceHolderSign.js +++ b/apps/OpenSign/src/pages/PlaceHolderSign.js @@ -853,9 +853,10 @@ function PlaceHolderSign() { }; setIsSendAlert(alert); } else if (filterPrefill.length === signersdata.length) { - const IsSignerNotExist = filterPrefill?.some((x) => !x.signerObjId); - if (IsSignerNotExist) { + const IsSignerNotExist = filterPrefill?.filter((x) => !x.signerObjId); + if (IsSignerNotExist && IsSignerNotExist?.length > 0) { setSignerExistModal(true); + setSelectWidgetId(IsSignerNotExist[0]?.placeHolder?.[0]?.pos?.[0]?.key); } else { saveDocumentDetails(); } @@ -997,7 +998,6 @@ function PlaceHolderSign() { </span> <RWebShare data={{ - // text: "Like humans, flamingos make friends for life", url: data.url, title: "Sign url" }} @@ -1220,22 +1220,12 @@ function PlaceHolderSign() { position: "top", style: { fontSize: "13px" } }, - { - selector: '[data-tut="reactourLinkUser"]', - content: () => ( - <TourContentWithBtn - message={`Use this icon to assign a new signer or change the existing one for the placeholder.`} - isChecked={handleDontShow} - /> - ), - position: "top", - style: { fontSize: "13px" } - }, + { selector: '[data-tut="reactourFour"]', content: () => ( <TourContentWithBtn - message={`Clicking "Send" button will share the document with all the recipients.It will also send out emails to everyone on the recipients list.`} + message={`Clicking "Send" will save the document. In the next step you can customize the emails to be sent out to the recipients or copy the signing links and share those with the recipients yourself.`} isChecked={handleDontShow} /> ), @@ -1549,6 +1539,15 @@ function PlaceHolderSign() { } }; + const signerAssignTour = [ + { + selector: '[data-tut="assignSigner"]', + content: + " Please assign a new signer to use this icon for the placeholder. ", + position: "top", + style: { fontSize: "13px" } + } + ]; return ( <> <Title title={state?.title ? state.title : "New Document"} /> @@ -1598,6 +1597,13 @@ function PlaceHolderSign() { closeWithMask={false} /> )} + <Tour + onRequestClose={() => setSignerExistModal(false)} + steps={signerAssignTour} + isOpen={signerExistModal} + rounded={5} + closeWithMask={false} + /> {/* this component used to render all pdf pages in left side */} <RenderAllPdfPage signPdfUrl={pdfDetails[0].URL} @@ -2029,7 +2035,7 @@ function PlaceHolderSign() { )} </DndProvider> <div> - <ModalUi + {/* <ModalUi headerColor={"#dc3545"} isOpen={signerExistModal} title={"Users required"} @@ -2057,7 +2063,7 @@ function PlaceHolderSign() { Close </button> </div> - </ModalUi> + </ModalUi> */} <ModalUi headerColor={"#dc3545"} isOpen={isAlreadyPlace.status} diff --git a/apps/OpenSign/src/pages/Report.js b/apps/OpenSign/src/pages/Report.js index 6ac3135e0..7d2d0fac1 100644 --- a/apps/OpenSign/src/pages/Report.js +++ b/apps/OpenSign/src/pages/Report.js @@ -62,7 +62,9 @@ const Report = () => { selector: "[data-tut=reactourFirst]", content: () => ( <TourContentWithBtn - message={`onclick add button you can create new template.`} + message={ + "Click the ‘Add’ button to create a new template. Templates are reusable documents designed to quickly generate new documents with the same structure and varying signers. For example, an HR template for onboarding could have predefined roles like ‘HR Manager’ and ‘New Employee’. Each time you use the template, you can assign the ‘New Employee’ role to different incoming staff members, while the ‘HR Manager’ role remains constant, facilitating a seamless onboarding process for each recruit." + } isChecked={handleDontShow} /> ), diff --git a/apps/OpenSign/src/pages/TemplatePlaceholder.js b/apps/OpenSign/src/pages/TemplatePlaceholder.js index 67118f40f..2b54f2aab 100644 --- a/apps/OpenSign/src/pages/TemplatePlaceholder.js +++ b/apps/OpenSign/src/pages/TemplatePlaceholder.js @@ -765,7 +765,7 @@ const TemplatePlaceholder = () => { selector: '[data-tut="reactourSecond"]', content: () => ( <TourContentWithBtn - message={`Drag a widget placeholder onto the PDF to choose your desired signing location.`} + message={`Drag or click on a field to add it to the document.`} isChecked={handleDontShow} /> ), @@ -787,7 +787,7 @@ const TemplatePlaceholder = () => { selector: '[data-tut="reactourFour"]', content: () => ( <TourContentWithBtn - message={`Clicking "Save" button will save the template and will ask you if you want to create a new document using this template.`} + message={`Clicking ‘Save’ will store the current template. After saving, you’ll be prompted to create a new document from this template if you wish.`} isChecked={handleDontShow} /> ), diff --git a/apps/OpenSignServer/cloud/parsefunction/getInvoices.js b/apps/OpenSignServer/cloud/parsefunction/getInvoices.js index 258595756..3b99d72de 100644 --- a/apps/OpenSignServer/cloud/parsefunction/getInvoices.js +++ b/apps/OpenSignServer/cloud/parsefunction/getInvoices.js @@ -24,6 +24,7 @@ export default async function getInvoices(request) { invoiceCls.skip(skip); invoiceCls.descending('createdAt'); const invoices = await invoiceCls.find({ useMasterKey: true }); + console.log('invoices', invoices); if (invoices?.length > 0) { const _invoices = JSON.parse(JSON.stringify(invoices)); return { status: 'success', result: _invoices }; From 7e70a5e1118a3976db62c38c862ee2c3778fb9c6 Mon Sep 17 00:00:00 2001 From: RaktimaNXG <raktima.c@nxglabs.com> Date: Wed, 10 Apr 2024 18:48:58 +0530 Subject: [PATCH 3/3] remove console --- apps/OpenSignServer/cloud/parsefunction/getInvoices.js | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/OpenSignServer/cloud/parsefunction/getInvoices.js b/apps/OpenSignServer/cloud/parsefunction/getInvoices.js index 3b99d72de..258595756 100644 --- a/apps/OpenSignServer/cloud/parsefunction/getInvoices.js +++ b/apps/OpenSignServer/cloud/parsefunction/getInvoices.js @@ -24,7 +24,6 @@ export default async function getInvoices(request) { invoiceCls.skip(skip); invoiceCls.descending('createdAt'); const invoices = await invoiceCls.find({ useMasterKey: true }); - console.log('invoices', invoices); if (invoices?.length > 0) { const _invoices = JSON.parse(JSON.stringify(invoices)); return { status: 'success', result: _invoices };