From f5f18f16304b02a003c520ecdaf5e7e4f98d0497 Mon Sep 17 00:00:00 2001 From: RaktimaNXG Date: Wed, 10 Apr 2024 18:47:08 +0530 Subject: [PATCH] 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 && ( { 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: () => ( ), @@ -101,7 +101,7 @@ function Opensigndrive() { selector: '[data-tut="reactourSecond"]', content: () => ( ), @@ -112,7 +112,7 @@ function Opensigndrive() { selector: '[data-tut="reactourThird"]', content: () => ( ), @@ -123,7 +123,7 @@ function Opensigndrive() { selector: '[data-tut="reactourForth"]', content: () => ( ), @@ -135,7 +135,7 @@ function Opensigndrive() { selector: '[data-tut="reactourFifth"]', content: () => ( ), @@ -146,9 +146,7 @@ function Opensigndrive() { selector: '[data-tut="reactourSixth"]', content: () => ( ), @@ -159,9 +157,7 @@ function Opensigndrive() { selector: '[data-tut="reactourSeventh"]', content: () => ( ), 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() { ( - - ), - position: "top", - style: { fontSize: "13px" } - }, + { selector: '[data-tut="reactourFour"]', content: () => ( ), @@ -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 ( <> @@ -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 };