@@ -39,6 +39,8 @@ import { contractUsers, contactBook, urlValidator } from "../utils/Utils";
39
39
import { modalAlign } from "../utils/Utils" ;
40
40
import AlertComponent from "./component/alertComponent" ;
41
41
import PlaceholderCopy from "./component/PlaceholderCopy" ;
42
+ import TourContentWithBtn from "../premitives/TourContentWithBtn" ;
43
+ import Title from "./component/Title" ;
42
44
43
45
//For signYourself inProgress section signer can add sign and complete doc sign.
44
46
function SignYourSelf ( ) {
@@ -91,6 +93,7 @@ function SignYourSelf() {
91
93
type : "load"
92
94
} ) ;
93
95
const [ isAlert , setIsAlert ] = useState ( { isShow : false , alertMessage : "" } ) ;
96
+ const [ isDontShow , setIsDontShow ] = useState ( false ) ;
94
97
const divRef = useRef ( null ) ;
95
98
const nodeRef = useRef ( null ) ;
96
99
const [ { isOver } , drop ] = useDrop ( {
@@ -747,16 +750,31 @@ function SignYourSelf() {
747
750
setXyPostion ( getXyData ) ;
748
751
setShowAlreadySignDoc ( { status : false } ) ;
749
752
} ;
753
+
754
+ const handleDontShow = ( isChecked ) => {
755
+ setIsDontShow ( isChecked ) ;
756
+ } ;
757
+
750
758
const tourConfig = [
751
759
{
752
760
selector : '[data-tut="reactourFirst"]' ,
753
- content : `Drag the signature or stamp placeholder onto the PDF to choose your desired signing location.` ,
761
+ content : ( ) => (
762
+ < TourContentWithBtn
763
+ message = { `Drag the signature or stamp placeholder onto the PDF to choose your desired signing location.` }
764
+ isChecked = { handleDontShow }
765
+ />
766
+ ) ,
754
767
position : "top" ,
755
768
style : { fontSize : "13px" }
756
769
} ,
757
770
{
758
771
selector : '[data-tut="reactourSecond"]' ,
759
- content : `Drag and drop anywhere in this area. You can resize and move it later.` ,
772
+ content : ( ) => (
773
+ < TourContentWithBtn
774
+ message = { `Drag and drop anywhere in this area. You can resize and move it later.` }
775
+ isChecked = { handleDontShow }
776
+ />
777
+ ) ,
760
778
position : "top" ,
761
779
style : { fontSize : "13px" }
762
780
}
@@ -765,47 +783,49 @@ function SignYourSelf() {
765
783
//function for update TourStatus
766
784
const closeTour = async ( ) => {
767
785
setSignTour ( false ) ;
768
-
769
- let updatedTourStatus = [ ] ;
770
- if ( tourStatus . length > 0 ) {
771
- updatedTourStatus = [ ...tourStatus ] ;
772
- const signyourselfIndex = tourStatus . findIndex (
773
- ( obj ) => obj [ "signyourself" ] === false || obj [ "signyourself" ] === true
774
- ) ;
775
- if ( signyourselfIndex !== - 1 ) {
776
- updatedTourStatus [ signyourselfIndex ] = { signyourself : true } ;
786
+ if ( isDontShow ) {
787
+ let updatedTourStatus = [ ] ;
788
+ if ( tourStatus . length > 0 ) {
789
+ updatedTourStatus = [ ...tourStatus ] ;
790
+ const signyourselfIndex = tourStatus . findIndex (
791
+ ( obj ) => obj [ "signyourself" ] === false || obj [ "signyourself" ] === true
792
+ ) ;
793
+ if ( signyourselfIndex !== - 1 ) {
794
+ updatedTourStatus [ signyourselfIndex ] = { signyourself : true } ;
795
+ } else {
796
+ updatedTourStatus . push ( { signyourself : true } ) ;
797
+ }
777
798
} else {
778
- updatedTourStatus . push ( { signyourself : true } ) ;
799
+ updatedTourStatus = [ { signyourself : true } ] ;
779
800
}
780
- } else {
781
- updatedTourStatus = [ { signyourself : true } ] ;
782
- }
783
- await axios
784
- . put (
785
- `${ localStorage . getItem ( "baseUrl" ) } classes/${ localStorage . getItem (
786
- "_appName"
787
- ) } ${ contractName } /${ signerUserId } `,
788
- {
789
- TourStatus : updatedTourStatus
790
- } ,
791
- {
792
- headers : {
793
- "Content-Type" : "application/json" ,
794
- "X-Parse-Application-Id" : localStorage . getItem ( "parseAppId" ) ,
795
- sessionToken : localStorage . getItem ( "accesstoken" )
801
+ await axios
802
+ . put (
803
+ `${ localStorage . getItem ( "baseUrl" ) } classes/${ localStorage . getItem (
804
+ "_appName"
805
+ ) } ${ contractName } /${ signerUserId } `,
806
+ {
807
+ TourStatus : updatedTourStatus
808
+ } ,
809
+ {
810
+ headers : {
811
+ "Content-Type" : "application/json" ,
812
+ "X-Parse-Application-Id" : localStorage . getItem ( "parseAppId" ) ,
813
+ sessionToken : localStorage . getItem ( "accesstoken" )
814
+ }
796
815
}
797
- }
798
- )
799
- . then ( ( Listdata ) => {
800
- // const json = Listdata.data;
801
- } )
802
- . catch ( ( err ) => {
803
- console . log ( "axois err " , err ) ;
804
- } ) ;
816
+ )
817
+ . then ( ( Listdata ) => {
818
+ // const json = Listdata.data;
819
+ } )
820
+ . catch ( ( err ) => {
821
+ console . log ( "axois err " , err ) ;
822
+ } ) ;
823
+ }
805
824
} ;
806
825
807
826
return (
808
827
< DndProvider backend = { HTML5Backend } >
828
+ < Title title = { "Self Sign" } />
809
829
{ isLoading . isLoad ? (
810
830
< Loader isLoading = { isLoading } />
811
831
) : handleError ? (
0 commit comments