Skip to content

Commit 6fb714d

Browse files
Merge pull request #879 from OpenSignLabs/raktima-opensignlabs-patch-10
fix: tour messages display issue in all flow
2 parents 1e857b6 + f6170e0 commit 6fb714d

File tree

8 files changed

+38
-38
lines changed

8 files changed

+38
-38
lines changed

apps/OpenSign/src/components/pdf/PdfHeader.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ function Header({
2929
isShowHeader,
3030
decline,
3131
currentSigner,
32-
dataTut4,
3332
alreadySign,
3433
isSignYourself,
3534
setIsEmail,
@@ -180,7 +179,7 @@ function Header({
180179
className={`${
181180
isMailSend ? "" : "op-link-primary"
182181
} op-link no-underline font-[650] text-[14px]`}
183-
data-tut={dataTut4}
182+
data-tut="headerArea"
184183
>
185184
{completeBtnTitle ? completeBtnTitle : "Send"}
186185
</div>
@@ -284,7 +283,7 @@ function Header({
284283
</button>
285284
<button
286285
disabled={isMailSend && true}
287-
data-tut="reactourFour"
286+
data-tut="headerArea"
288287
className="op-btn op-btn-primary op-btn-sm mr-[3px]"
289288
onClick={() => alertSendEmail()}
290289
>

apps/OpenSign/src/components/pdf/RecipientList.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const RecipientList = (props) => {
8989
onDrop={(e) =>
9090
props.sendInOrder && !isMobile && handleChangeSequence(e, ind)
9191
}
92-
data-tut="reactourFirst"
92+
data-tut="recipientArea"
9393
onMouseEnter={() => setIsHover(ind)}
9494
onMouseLeave={() => setIsHover(null)}
9595
className={`${

apps/OpenSign/src/components/pdf/SignerListPlace.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function SignerListPlace(props) {
7272
) : (
7373
<div
7474
role="button"
75-
data-tut="reactourAddbtn"
75+
data-tut="addRecipient"
7676
className="op-btn op-btn-accent op-btn-outline w-full mt-[14px]"
7777
disabled={props?.isMailSend ? true : false}
7878
onClick={() => props.setIsAddSigner(true)}

apps/OpenSign/src/components/pdf/WidgetComponent.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,15 +250,14 @@ function WidgetComponent({
250250
{isMobile ? (
251251
!isMailSend && (
252252
<div
253-
data-tut={dataTut}
254253
id="navbar"
255254
className="fixed z-[99] bottom-0 right-0"
256255
style={{ width: window.innerWidth + "px" }}
257256
>
258257
<div className="mx-1">
259258
{isSigners && (
260259
<div
261-
data-tut={dataTut}
260+
data-tut="recipientArea"
262261
className="py-[10px] flex justify-center items-center op-card"
263262
style={{
264263
background: blockColor
@@ -316,7 +315,7 @@ function WidgetComponent({
316315
) : (
317316
setIsAddSigner && (
318317
<div
319-
data-tut="reactourAddbtn"
318+
data-tut="addRecipient"
320319
className="op-btn op-btn-accent w-full my-[2px]"
321320
onClick={() => setIsAddSigner(true)}
322321
>
@@ -327,6 +326,7 @@ function WidgetComponent({
327326
)}
328327
</div>
329328
<div
329+
data-tut="addWidgets"
330330
ref={scrollContainerRef}
331331
className="bg-base-100 border-[2px] border-t-primary"
332332
>

apps/OpenSign/src/pages/PdfRequestFiles.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ function PdfRequestFiles() {
182182
const localuser = localStorage.getItem(
183183
`Parse/${appInfo.appId}/currentUser`
184184
);
185-
const currentUser = JSON.parse(JSON.stringify(localuser));
185+
const currentUser = JSON.parse(localuser);
186186
await handleSendOTP(currentUser?.email);
187187
setOtpLoader(false);
188188
alert("OTP sent on you email");
@@ -194,7 +194,7 @@ function PdfRequestFiles() {
194194
const localuser = localStorage.getItem(
195195
`Parse/${appInfo.appId}/currentUser`
196196
);
197-
const currentUser = JSON.parse(JSON.stringify(localuser));
197+
const currentUser = JSON.parse(localuser);
198198
try {
199199
const resEmail = await Parse.Cloud.run("verifyemail", {
200200
otp: otp,
@@ -221,7 +221,7 @@ function PdfRequestFiles() {
221221
const localuser = localStorage.getItem(
222222
`Parse/${appInfo.appId}/currentUser`
223223
);
224-
const currentUser = JSON.parse(JSON.stringify(localuser));
224+
const currentUser = JSON.parse(localuser);
225225
await handleSendOTP(currentUser?.email);
226226
};
227227
async function checkIsSubscribed(extUserId, contactId) {
@@ -500,7 +500,7 @@ function PdfRequestFiles() {
500500
const localuser = localStorage.getItem(
501501
`Parse/${appInfo.appId}/currentUser`
502502
);
503-
const currentUser = JSON.parse(JSON.stringify(localuser));
503+
const currentUser = JSON.parse(localuser);
504504
const currentUserEmail = currentUser.email;
505505
const res = await contractUsers(currentUserEmail);
506506
if (res === "Error: Something went wrong!") {
@@ -1288,7 +1288,7 @@ function PdfRequestFiles() {
12881288
style: { fontSize: "13px" }
12891289
},
12901290
{
1291-
selector: '[data-tut="reactourForth"]',
1291+
selector: '[data-tut="pdfArea"]',
12921292
content: () => (
12931293
<TourContentWithBtn
12941294
message={`Click any of the placeholders appearing on the document to sign. You will then see options to draw your signature, type it, or upload an image .`}
@@ -1706,11 +1706,7 @@ function PdfRequestFiles() {
17061706
zoomPercent={zoomPercent}
17071707
/>
17081708

1709-
<div
1710-
ref={divRef}
1711-
data-tut="reactourSecond"
1712-
className="h-[95%]"
1713-
>
1709+
<div ref={divRef} data-tut="pdfArea" className="h-[95%]">
17141710
{containerWH && (
17151711
<RenderPdf
17161712
pageNumber={pageNumber}
@@ -1776,7 +1772,10 @@ function PdfRequestFiles() {
17761772

17771773
{unsignedSigners.length > 0 && (
17781774
<>
1779-
<div className="mx-2 pr-2 pt-2 pb-1 text-[15px] text-base-content font-semibold border-b-[1px] border-base-300">
1775+
<div
1776+
data-tut="reactourFirst"
1777+
className="mx-2 pr-2 pt-2 pb-1 text-[15px] text-base-content font-semibold border-b-[1px] border-base-300"
1778+
>
17801779
<span>Yet to sign</span>
17811780
</div>
17821781
<div className="mt-[5px]">

apps/OpenSign/src/pages/PlaceHolderSign.js

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,7 +1278,7 @@ function PlaceHolderSign() {
12781278

12791279
const tourConfig = [
12801280
{
1281-
selector: '[data-tut="reactourFirst"]',
1281+
selector: '[data-tut="recipientArea"]',
12821282
content: () => (
12831283
<TourContentWithBtn
12841284
message={`Select a recipient from this list to add a place-holder where he is supposed to sign.The placeholder will appear in the same colour as the recipient name once you drop it on the document.`}
@@ -1289,7 +1289,18 @@ function PlaceHolderSign() {
12891289
style: { fontSize: "13px" }
12901290
},
12911291
{
1292-
selector: '[data-tut="reactourSecond"]',
1292+
selector: '[data-tut="addRecipient"]',
1293+
content: () => (
1294+
<TourContentWithBtn
1295+
message={`Clicking "Add recipients" button will allow you to add more signer.`}
1296+
isChecked={handleDontShow}
1297+
/>
1298+
),
1299+
position: "top",
1300+
style: { fontSize: "13px" }
1301+
},
1302+
{
1303+
selector: '[data-tut="addWidgets"]',
12931304
content: () => (
12941305
<TourContentWithBtn
12951306
message={`Drag or click on a field to add it to the document.`}
@@ -1300,7 +1311,7 @@ function PlaceHolderSign() {
13001311
style: { fontSize: "13px" }
13011312
},
13021313
{
1303-
selector: '[data-tut="reactourThird"]',
1314+
selector: '[data-tut="pdfArea"]',
13041315
content: () => (
13051316
<TourContentWithBtn
13061317
message={`The PDF content area already displays the template's existing placeholders. For your convenience, these placeholders will match the color of the recipient's name, making them easily identifiable.`}
@@ -1312,7 +1323,7 @@ function PlaceHolderSign() {
13121323
},
13131324

13141325
{
1315-
selector: '[data-tut="reactourFour"]',
1326+
selector: '[data-tut="headerArea"]',
13161327
content: () => (
13171328
<TourContentWithBtn
13181329
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.`}
@@ -2048,14 +2059,9 @@ function PlaceHolderSign() {
20482059
alertSendEmail={alertSendEmail}
20492060
isShowHeader={true}
20502061
currentSigner={true}
2051-
dataTut4="reactourFour"
20522062
/>
20532063

2054-
<div
2055-
ref={divRef}
2056-
data-tut="reactourSecond"
2057-
className="h-[95%]"
2058-
>
2064+
<div ref={divRef} data-tut="pdfArea" className="h-[95%]">
20592065
{containerWH && (
20602066
<RenderPdf
20612067
pageNumber={pageNumber}
@@ -2109,8 +2115,6 @@ function PlaceHolderSign() {
21092115
{isMobile ? (
21102116
<div>
21112117
<WidgetComponent
2112-
dataTut="reactourFirst"
2113-
dataTut2="reactourSecond"
21142118
pdfUrl={isMailSend}
21152119
dragSignature={dragSignature}
21162120
signRef={signRef}
@@ -2169,7 +2173,7 @@ function PlaceHolderSign() {
21692173
roleName={roleName}
21702174
// handleAddSigner={handleAddSigner}
21712175
/>
2172-
<div data-tut="reactourSecond">
2176+
<div data-tut="addWidgets">
21732177
<WidgetComponent
21742178
isMailSend={isMailSend}
21752179
dragSignature={dragSignature}

apps/OpenSign/src/pages/SignyourselfPdf.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ function SignYourSelf() {
986986
};
987987
const tourConfig = [
988988
{
989-
selector: '[data-tut="reactourFirst"]',
989+
selector: '[data-tut="addWidgets"]',
990990
content: () => (
991991
<TourContentWithBtn
992992
message={`Select and drag your preferred widgets onto the PDF to customize your document before signing. Choose the perfect spots for each modification to tailor the document to your needs.`}
@@ -1382,7 +1382,6 @@ function SignYourSelf() {
13821382
{!isCompleted ? (
13831383
<div>
13841384
<WidgetComponent
1385-
dataTut="reactourFirst"
13861385
pdfUrl={pdfUrl}
13871386
dragSignature={dragSignature}
13881387
signRef={signRef}

apps/OpenSign/src/pages/TemplatePlaceholder.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ const TemplatePlaceholder = () => {
813813
action: () => handleCloseRoleModal()
814814
},
815815
{
816-
selector: '[data-tut="reactourSecond"]',
816+
selector: '[data-tut="addWidgets"]',
817817
content: () => (
818818
<TourContentWithBtn
819819
message={`Drag or click on a field to add it to the document.`}
@@ -835,7 +835,7 @@ const TemplatePlaceholder = () => {
835835
style: { fontSize: "13px" }
836836
},
837837
{
838-
selector: '[data-tut="reactourFour"]',
838+
selector: '[data-tut="headerArea"]',
839839
content: () => (
840840
<TourContentWithBtn
841841
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.`}
@@ -1545,7 +1545,6 @@ const TemplatePlaceholder = () => {
15451545
{isMobile ? (
15461546
<div>
15471547
<WidgetComponent
1548-
dataTut="reactourFirst"
15491548
dataTut2="reactourSecond"
15501549
pdfUrl={isMailSend}
15511550
dragSignature={dragSignature}
@@ -1609,7 +1608,7 @@ const TemplatePlaceholder = () => {
16091608
blockColor={blockColor}
16101609
setBlockColor={setBlockColor}
16111610
/>
1612-
<div data-tut="reactourSecond">
1611+
<div data-tut="addWidgets">
16131612
<WidgetComponent
16141613
isMailSend={isMailSend}
16151614
dragSignature={dragSignature}

0 commit comments

Comments
 (0)