tabexseriescomponents 0.0.79 → 0.0.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/dist/index.cjs.js +1819 -658
  2. package/dist/index.esm.js +1819 -658
  3. package/dist/index.umd.js +1819 -658
  4. package/package.json +1 -1
  5. package/srcOLD/Contexts/LanguageContext.jsx +0 -347
  6. package/srcOLD/Contexts/ProductsCardsSectionContext.jsx +0 -28
  7. package/srcOLD/StylesJS/Customstyles.js +0 -235
  8. package/srcOLD/TabexComponents/Cards/CategoryCardwithhoveraction/CategoryCardwithhoveraction.jsx +0 -214
  9. package/srcOLD/TabexComponents/Cards/Categorycard_fullimage/Categorycard_fullimage.jsx +0 -258
  10. package/srcOLD/TabexComponents/Cards/Categorycard_slidebgscaled/Categorycard_slidebgscaled.jsx +0 -206
  11. package/srcOLD/TabexComponents/Cards/Categorycard_with_trianglebg/Categorycard_with_trianglebg.jsx +0 -176
  12. package/srcOLD/TabexComponents/Cards/Categorycard_with_twolinestransition/Categorycard_with_twolinestransition.jsx +0 -207
  13. package/srcOLD/TabexComponents/Cards/Categorycard_withshapes/Categorycard_withshapes.jsx +0 -162
  14. package/srcOLD/TabexComponents/Cards/Categorycard_withtext/Categorycard_withtext.jsx +0 -193
  15. package/srcOLD/TabexComponents/Cards/Classiccategorycard/Classiccategorycard.jsx +0 -158
  16. package/srcOLD/TabexComponents/Cards/Horizontalcard/Horizontalcard.jsx +0 -286
  17. package/srcOLD/TabexComponents/Cards/MenuCard/MenuCard.jsx +0 -558
  18. package/srcOLD/TabexComponents/Cards/ModernProductCard/ModernProductCard.jsx +0 -486
  19. package/srcOLD/TabexComponents/Cards/Productcard6/Productcard6.jsx +0 -300
  20. package/srcOLD/TabexComponents/Cards/Productcard7/Productcard7.jsx +0 -288
  21. package/srcOLD/TabexComponents/Cards/Productcard_animatedbuttons/Productcard_animatedbuttons.jsx +0 -307
  22. package/srcOLD/TabexComponents/Cards/Productcard_with_circularbg/Productcard_with_circularbg.jsx +0 -295
  23. package/srcOLD/TabexComponents/Cards/Productcard_with_circularhover/Productcard_with_circularhover.jsx +0 -325
  24. package/srcOLD/TabexComponents/Cards/Productcard_with_slideanimation/Productcard_with_slideanimation.jsx +0 -290
  25. package/srcOLD/TabexComponents/Cards/Productcard_with_variants/Productcard_with_variants.jsx +0 -303
  26. package/srcOLD/TabexComponents/Cards/Productcard_with_zoominonhover/Productcard_with_zoominonhover.jsx +0 -466
  27. package/srcOLD/TabexComponents/Cards/Productcarddefault/Productcarddefault.jsx +0 -282
  28. package/srcOLD/TabexComponents/Cards/Productccard_with_imageontopleft/Productccard_with_imageontopleft.jsx +0 -298
  29. package/srcOLD/TabexComponents/Cards/Prouductcard_with_zoomhover/Prouductcard_with_zoomhover.jsx +0 -139
  30. package/srcOLD/TabexComponents/Cards/Simplecategorycardwithtextbelow/Simplecategorycardwithtextbelow.jsx +0 -135
  31. package/srcOLD/TabexComponents/Cards/Simpleproductcard/Simpleproductcard.jsx +0 -304
  32. package/srcOLD/TabexComponents/Cards/StylishProductCard/StylishProductCard.jsx +0 -291
  33. package/srcOLD/TabexComponents/Footer/Footer1/Footer1.jsx +0 -418
  34. package/srcOLD/TabexComponents/Footer/Footer2/Footer2.jsx +0 -382
  35. package/srcOLD/TabexComponents/Footer/Footer3/Footer3.jsx +0 -308
  36. package/srcOLD/TabexComponents/Footer/Footer4/Footer4.jsx +0 -438
  37. package/srcOLD/TabexComponents/Footer/Footer5/Footer5.jsx +0 -495
  38. package/srcOLD/TabexComponents/Footer/Footer6/Footer6.jsx +0 -295
  39. package/srcOLD/TabexComponents/Footer/Footer7/Footer7.jsx +0 -373
  40. package/srcOLD/TabexComponents/Footer/Simplefooter/Simplefooter.jsx +0 -238
  41. package/srcOLD/TabexComponents/Generalfiles/images/egyptflag.png +0 -0
  42. package/srcOLD/TabexComponents/Generalfiles/images/noimage.png +0 -0
  43. package/srcOLD/TabexComponents/Generalfiles/images/payment/cod.png +0 -0
  44. package/srcOLD/TabexComponents/Generalfiles/images/payment/fawry.png +0 -0
  45. package/srcOLD/TabexComponents/Generalfiles/images/payment/payment.png +0 -0
  46. package/srcOLD/TabexComponents/Generalfiles/images/payment/paymob.png +0 -0
  47. package/srcOLD/TabexComponents/Generalfiles/images/payment/paypal.png +0 -0
  48. package/srcOLD/TabexComponents/Generalfiles/images/payment/visa.png +0 -0
  49. package/srcOLD/TabexComponents/Generalfiles/images/shoppingcart.png +0 -0
  50. package/srcOLD/TabexComponents/Generalfiles/images/tabexlogo.png +0 -0
  51. package/srcOLD/TabexComponents/Generalfiles/images/unknownmaleuser.png +0 -0
  52. package/srcOLD/TabexComponents/Generalfiles/images/usflag.png +0 -0
  53. package/srcOLD/TabexComponents/Generalfiles/images/whatsapp.png +0 -0
  54. package/srcOLD/TabexComponents/Headers/AllinoneHeader/AllinoneHeader.jsx +0 -724
  55. package/srcOLD/TabexComponents/Headers/ClassicHeader/ClassicHeader.jsx +0 -687
  56. package/srcOLD/TabexComponents/Headers/Header4/Header4.jsx +0 -632
  57. package/srcOLD/TabexComponents/Headers/Header6/Header6.jsx +0 -669
  58. package/srcOLD/TabexComponents/Headers/Header8/Header8.jsx +0 -882
  59. package/srcOLD/TabexComponents/Headers/HeaderRestaurant/HeaderRestaurant.jsx +0 -754
  60. package/srcOLD/TabexComponents/Headers/Header_threesectionslogocentered/Header_threesectionslogocentered.jsx +0 -798
  61. package/srcOLD/TabexComponents/Headers/Headerresponsive/Headerresponsive.jsx +0 -686
  62. package/srcOLD/TabexComponents/Headers/HeaderwithContactinfo/HeaderwithContactinfo.jsx +0 -938
  63. package/srcOLD/TabexComponents/Headers/Modernheader/Modernheader.jsx +0 -706
  64. package/srcOLD/TabexComponents/Headers/StylishHeader/StylishHeader.jsx +0 -821
  65. package/srcOLD/TabexComponents/Headers/Subheader/Subheader copy.jsx +0 -228
  66. package/srcOLD/TabexComponents/Headers/Subheader/Subheader.jsx +0 -251
  67. package/srcOLD/TabexComponents/Sections/BackgroundImages/Backgroundimage1/Backgroundimage1.jsx +0 -312
  68. package/srcOLD/TabexComponents/Sections/BackgroundImages/Backgroundimage_with_toppill/Backgroundimage_with_toppill.jsx +0 -278
  69. package/srcOLD/TabexComponents/Sections/BackgroundImages/BackgroundimageandTextsection/BackgroundimageandTextsection.jsx +0 -138
  70. package/srcOLD/TabexComponents/Sections/BackgroundImages/Section_with_rightbgcont/Section_with_rightbgcont.jsx +0 -160
  71. package/srcOLD/TabexComponents/Sections/BackgroundImages/Threebgimages/Threebgimages.jsx +0 -295
  72. package/srcOLD/TabexComponents/Sections/BackgroundImages/Twobgimages/Twobgimages.jsx +0 -784
  73. package/srcOLD/TabexComponents/Sections/Cards/CardsSection/CardsSection.jsx +0 -861
  74. package/srcOLD/TabexComponents/Sections/Cards/CardsSection2/CardsSection2.js +0 -496
  75. package/srcOLD/TabexComponents/Sections/Cards/CardsSection7/CardsSection7.js +0 -888
  76. package/srcOLD/TabexComponents/Sections/Cards/CardsSection8/CardsSection8.js +0 -419
  77. package/srcOLD/TabexComponents/Sections/Cards/Sixverticalcardssection/Sixverticalcardssection.js +0 -552
  78. package/srcOLD/TabexComponents/Sections/Slideshow/AboutSection/AboutSection.jsx +0 -281
  79. package/srcOLD/TabexComponents/Sections/Slideshow/Backgroundimage_with_topcircle/Backgroundimage_with_topcircle.jsx +0 -166
  80. package/srcOLD/TabexComponents/Sections/Slideshow/Freetextsection/Freetextsection.jsx +0 -152
  81. package/srcOLD/TabexComponents/Sections/Slideshow/Image_with_leftwords/Image_with_leftwords.jsx +0 -284
  82. package/srcOLD/TabexComponents/Sections/Slideshow/Image_with_rightwords/Image_with_rightwords.jsx +0 -146
  83. package/srcOLD/TabexComponents/Sections/Slideshow/Servicesection/Servicesection.jsx +0 -209
  84. package/srcOLD/TabexComponents/Sections/Slideshow/ServicesectionCenteredcards/ServicesectionCenteredcards.jsx +0 -145
  85. package/srcOLD/TabexComponents/Sections/Slideshow/Slideshow_with_rotatedsquare/Slideshow_with_rotatedsquare.jsx +0 -252
  86. package/srcOLD/TabexComponents/Sections/Slideshow/Slideshow_with_squarebg/Slideshow_with_squarebg.jsx +0 -175
  87. package/srcOLD/TabexComponents/Sections/Slideshow/Slideshowdifferentanimations/Slideshowdifferentanimations.jsx +0 -154
  88. package/srcOLD/TabexComponents/Sections/Slideshow/Slideshowfade/Slideshowfade.jsx +0 -201
  89. package/srcOLD/TabexComponents/Sections/Slideshow/Slideshowslide/Slideshowslide.jsx +0 -414
  90. package/srcOLD/TabexComponents/Sections/Slideshow/Slideshowzoom/Slideshowzoom.jsx +0 -270
  91. package/srcOLD/TabexComponents/StaticPages/Aboutus/Aboutus.js +0 -175
  92. package/srcOLD/TabexComponents/StaticPages/AccountInformation/AccountInformation.jsx +0 -275
  93. package/srcOLD/TabexComponents/StaticPages/CartSlider/CartSlider.jsx +0 -459
  94. package/srcOLD/TabexComponents/StaticPages/Categoriesdropdown/Categoriesdropdown.js +0 -146
  95. package/srcOLD/TabexComponents/StaticPages/Checkout/Checkout.jsx +0 -1220
  96. package/srcOLD/TabexComponents/StaticPages/Filter/Filter.jsx +0 -542
  97. package/srcOLD/TabexComponents/StaticPages/Login/FacebookLoginButton.jsx +0 -51
  98. package/srcOLD/TabexComponents/StaticPages/Login/GoogleLoginButton.jsx +0 -35
  99. package/srcOLD/TabexComponents/StaticPages/Login/Login.jsx +0 -299
  100. package/srcOLD/TabexComponents/StaticPages/OrderSuccess/OrderSuccess.js +0 -192
  101. package/srcOLD/TabexComponents/StaticPages/Ordershistory/Ordershistory.jsx +0 -1285
  102. package/srcOLD/TabexComponents/StaticPages/Policies/Policies.jsx +0 -358
  103. package/srcOLD/TabexComponents/StaticPages/Productinfo/Productinfo.jsx +0 -1506
  104. package/srcOLD/TabexComponents/StaticPages/Searchlist/Searchlist.jsx +0 -225
  105. package/srcOLD/TabexComponents/StaticPages/Signup/CustomerInformationForm.jsx +0 -788
  106. package/srcOLD/TabexComponents/StaticPages/Signup/Signup.jsx +0 -157
  107. package/srcOLD/TabexComponents/StaticPages/Staticpagesrouter/Staticpagesrouter.jsx +0 -295
  108. package/srcOLD/TabexComponents/StaticPages/Viewcart/Viewcart.js +0 -1090
  109. package/srcOLD/TabexComponents/StaticPages/Wishlist/Wishlist.jsx +0 -629
  110. package/srcOLD/assets/images/cod.png +0 -0
  111. package/srcOLD/assets/images/egyptflag.png +0 -0
  112. package/srcOLD/assets/images/fawry.png +0 -0
  113. package/srcOLD/assets/images/payment.png +0 -0
  114. package/srcOLD/assets/images/paymob.png +0 -0
  115. package/srcOLD/assets/images/paypal.png +0 -0
  116. package/srcOLD/assets/images/shoppingcart.png +0 -0
  117. package/srcOLD/assets/images/usflag.png +0 -0
  118. package/srcOLD/assets/images/visa.png +0 -0
  119. package/srcOLD/assets/images/whatsapp.png +0 -0
  120. package/srcOLD/button.jsx +0 -40
  121. package/srcOLD/index.jsx +0 -175
  122. package/srcOLD/styles/Home.module.css +0 -129
  123. package/srcOLD/styles/cards/Categorcycard_fullimage.module.css +0 -10
  124. package/srcOLD/styles/cards/Categorycard_slidebgscaled.module.css +0 -73
  125. package/srcOLD/styles/cards/Categorycard_withshapes.module.css +0 -189
  126. package/srcOLD/styles/cards/Productcard6.module.css +0 -9
  127. package/srcOLD/styles/cards/Productcard_with_circularbg.module.css +0 -137
  128. package/srcOLD/styles/cards/Productccard_with_zoominonhover.module.css +0 -51
  129. package/srcOLD/styles/cards/Prouductcard_with_zoomhover.module.css +0 -61
  130. package/srcOLD/styles/cards/categorycard.module.css +0 -102
  131. package/srcOLD/styles/cards/categorycard3.module.css +0 -51
  132. package/srcOLD/styles/cards/categorycardwithtext.module.css +0 -40
  133. package/srcOLD/styles/cards/productcard_animatedbuttons.module.css +0 -104
  134. package/srcOLD/styles/cards/productcard_with_textonhover.module.css +0 -12
  135. package/srcOLD/styles/cards/productccard_with_imageontopleft.module.css +0 -85
  136. package/srcOLD/styles/general/bootstrap.css +0 -4420
  137. package/srcOLD/styles/general/dropdown.css +0 -199
  138. package/srcOLD/styles/general/editorbardropdown.module.css +0 -94
  139. package/srcOLD/styles/general/filter.module.css +0 -108
  140. package/srcOLD/styles/general/form.module.css +0 -273
  141. package/srcOLD/styles/general/general.module.css +0 -709
  142. package/srcOLD/styles/general/image-gallery.css +0 -481
  143. package/srcOLD/styles/general/react-accessible-accordion.module.css +0 -52
  144. package/srcOLD/styles/general/react-phone-input-2.module.css +0 -927
  145. package/srcOLD/styles/general/scrollbtn.module.css +0 -22
  146. package/srcOLD/styles/general/slick.module.css +0 -166
  147. package/srcOLD/styles/general/tabs.module.css +0 -110
  148. package/srcOLD/styles/general/workplaceeditor.module.css +0 -328
  149. package/srcOLD/styles/globals.css +0 -26
  150. package/srcOLD/styles/headers/Allinoneheader.module.css +0 -91
  151. package/srcOLD/styles/headers/Header7.module.css +0 -50
  152. package/srcOLD/styles/headers/Header_threesectionslogocentered.module.css +0 -97
  153. package/srcOLD/styles/headers/Sideheader.module.css +0 -108
  154. package/srcOLD/styles/headers/classicheaderstyles.module.css +0 -16
  155. package/srcOLD/styles/headers/dropdown.css +0 -0
  156. package/srcOLD/styles/headers/header4.module.css +0 -175
  157. package/srcOLD/styles/headers/header5.module.css +0 -30
  158. package/srcOLD/styles/headers/header6.module.css +0 -117
  159. package/srcOLD/styles/headers/header_contactinfo.module.css +0 -78
  160. package/srcOLD/styles/headers/headerresturant.module.css +0 -89
  161. package/srcOLD/styles/headers/headerstyles.module.css +0 -24
  162. package/srcOLD/styles/headers/modernheader.module.css +0 -78
  163. package/srcOLD/styles/headers/subheader.module.css +0 -114
  164. package/srcOLD/styles/sections/Backgroundimage1.module.css +0 -17
  165. package/srcOLD/styles/sections/Backgroundimage_with_topcircle.module.css +0 -28
  166. package/srcOLD/styles/sections/Section_with_rightbgcont.module.css +0 -49
  167. package/srcOLD/styles/sections/Slideshow_with_rotatedsquare.module.css +0 -35
  168. package/srcOLD/styles/sections/Slideshow_with_squarebg.module.css +0 -39
  169. package/srcOLD/styles/staticpages/accordion.module.css +0 -9
  170. package/srcOLD/styles/staticpages/cart.module.css +0 -108
  171. package/srcOLD/styles/staticpages/dropdown.css +0 -196
  172. package/srcOLD/styles/staticpages/filter.module.css +0 -139
  173. package/srcOLD/styles/staticpages/login.module.css +0 -146
  174. package/srcOLD/styles/staticpages/productinfo.module.css +0 -54
  175. package/srcOLD/styles/staticpages/shop.module.css +0 -191
  176. package/srcOLD/styles/staticpages/signup.module.css +0 -206
  177. package/srcOLD/styles/staticpages/staticroutersidenav.module.css +0 -129
  178. package/srcOLD/styles/staticpages/viewcart.module.css +0 -129
  179. package/srcOLD/styles/staticpages/wishlist.module.css +0 -29
@@ -1,788 +0,0 @@
1
- import React, { useEffect, useState, useContext } from 'react';
2
- import loginstyles from '../../../styles/staticpages/signup.module.css';
3
- // import Pagepreloader from '../Pagepreloader/Pagepreloader';
4
- // import { LanguageContext } from '../../../../../../../Contexts/LanguageContext';
5
- // import { FetchingContext } from '../../../../../../../Contexts/FetchingContext';
6
- // import { WebsiteDesignWorkPlaceContext } from '../../../../../../../Contexts/WebsiteDesignWorkPlaceContext';
7
- // import { TemplateRoutingContext } from '../../../../../../../Contexts/TemplateRoutingContext';
8
-
9
- // import { instapikey } from '../../../../../../../Env_Variables';
10
- // import { useMutation, useQueryClient } from 'react-query';
11
- // import { CustomerSignUp_API } from '../../../../../../../components/API/API.js';
12
- import { CircularProgress } from 'react-cssfx-loading';
13
- // import { NotificationManager } from 'react-notifications';
14
- import TextareaAutosize from 'react-textarea-autosize';
15
- import { css } from 'glamor';
16
-
17
- import { defaultstyles, defaultstylestranslated } from '../../../StylesJS/Customstyles';
18
-
19
- import GoogleLogin from '../Login/GoogleLoginButton.jsx';
20
- import FacebookLoginButton from '../Login/FacebookLoginButton.jsx';
21
- const Select = React.lazy(() => import('react-select'));
22
- const CustomerInformationForm = (props) => {
23
- const lang = props.actions.lang;
24
- const langdetect = props.actions.langdetect;
25
- const routingcountext = props.actions.routingcountext;
26
- const FetchQueriesEngineContext = props.actions.FetchQueriesEngineContext;
27
- const setFetchQueriesEngineContext = props.actions.setFetchQueriesEngineContext;
28
- const fetchinstitutecustomerinfosignupQueryContext = props.actions.fetchinstitutecustomerinfosignupQueryContext;
29
- const fetchTabexCountriesQueryContext = props.actions.fetchTabexCountriesQueryContext;
30
- const fetchTabexStatesQueryContext = props.actions.fetchTabexStatesQueryContext;
31
- const fetchTabexCitiesQueryContext = props.actions.fetchTabexCitiesQueryContext;
32
- const FetchTabexStatesPayloadobjContext = props.actions.FetchTabexStatesPayloadobjContext;
33
- const setFetchTabexStatesPayloadobjContext = props.actions.setFetchTabexStatesPayloadobjContext;
34
- const CustomerSignUpMutationContext = props.actions.CustomerSignUpMutationContext;
35
- const authdetailsContext = props.actions.authdetailsContext;
36
- const instapikey = props.actions.instapikey;
37
- const templatepropcontext = props.actions.templatepropcontext;
38
- const actions = props.actions;
39
- const [sectionproperties, setsectionproperties] = useState('');
40
- const [dataloaded, setdataloaded] = useState(false);
41
- const [payloadobj, setpayloadobj] = useState({
42
- instapikey: instapikey,
43
- name: '',
44
- email: '',
45
- mobile: '',
46
- password: '',
47
- password2: '',
48
- shippingaddress: '',
49
- addedsourcetype: 'Webapp',
50
- instsignupformvalues: [],
51
- countryid: '',
52
- stateid: '',
53
- cityid: '',
54
- });
55
-
56
- useEffect(() => {
57
- var tempFetchQueriesEngineContext = { ...FetchQueriesEngineContext };
58
- tempFetchQueriesEngineContext.institutecustomerinfosignup = true;
59
- tempFetchQueriesEngineContext.fetchtabexcountries = true;
60
- setFetchQueriesEngineContext({ ...tempFetchQueriesEngineContext });
61
-
62
- var tempFetchQueriesEngineContext = { ...FetchQueriesEngineContext };
63
- }, []);
64
- useEffect(() => {
65
- if (props.sectionpropertiesprops != undefined && props.sectionpropertiesprops.length != 0) {
66
- setsectionproperties({ ...props.sectionpropertiesprops });
67
- }
68
- }, [props.sectionpropertiesprops]);
69
-
70
- useEffect(() => {
71
- if (fetchinstitutecustomerinfosignupQueryContext.isSuccess) {
72
- if (authdetailsContext.loggedin == true) {
73
- var tempcustomerinfoobj = { ...fetchinstitutecustomerinfosignupQueryContext.data.data.customerinfo };
74
- setpayloadobj({ ...tempcustomerinfoobj });
75
- var tempFetchTabexStatesPayloadobjContext = { ...FetchTabexStatesPayloadobjContext };
76
- if (tempcustomerinfoobj.countryid != null) {
77
- tempFetchTabexStatesPayloadobjContext.country_id = tempcustomerinfoobj.countryid;
78
- }
79
- if (tempcustomerinfoobj.stateid != null) {
80
- tempFetchTabexStatesPayloadobjContext.state_id = tempcustomerinfoobj.stateid;
81
- }
82
- setFetchTabexStatesPayloadobjContext({ ...tempFetchTabexStatesPayloadobjContext });
83
- setdataloaded(true);
84
- } else {
85
- var tempcustomerinfoobj = { ...payloadobj };
86
- if (Array.isArray(fetchinstitutecustomerinfosignupQueryContext?.data?.data?.instsignupformvalues)) {
87
- tempcustomerinfoobj.instsignupformvalues = [...fetchinstitutecustomerinfosignupQueryContext.data.data.instsignupformvalues];
88
- }
89
- setpayloadobj({ ...tempcustomerinfoobj });
90
- setdataloaded(true);
91
- }
92
- }
93
- }, [fetchinstitutecustomerinfosignupQueryContext.isSuccess, fetchinstitutecustomerinfosignupQueryContext.data, authdetailsContext]);
94
- const payloadobjchange = (key, value) => {
95
- var temppayloadobj = { ...payloadobj };
96
- temppayloadobj[key] = value;
97
- setpayloadobj({ ...temppayloadobj });
98
- };
99
-
100
- const formstyles = {
101
- loginbtn: css({
102
- background: templatepropcontext.primarycolor,
103
- color: sectionproperties.generalbtn_textColor,
104
- borderRadius: sectionproperties.generalbtn_borderradius + 'px',
105
- fontSize: sectionproperties.generalbtn_fontsize + 'px',
106
- lineHeight: sectionproperties.generalbtn_fontsize + 'px',
107
- textTransform: sectionproperties.generalbtn_texttransform,
108
- width: sectionproperties.generalbtn_width + 'px',
109
- height: sectionproperties.generalbtn_height + 'px',
110
- ':hover': {
111
- background: templatepropcontext.secondarycolor,
112
- },
113
- }),
114
- btnstyles: css({
115
- width: sectionproperties.generalbtn_width + 'px',
116
- height: sectionproperties.generalbtn_height + 'px',
117
- textTransform: sectionproperties.generalbtn_texttransform,
118
- fontSize: sectionproperties.generalbtn_fontsize + 'px',
119
- color: sectionproperties.generalbtn_textColor,
120
- background: sectionproperties.generalbtn_bgColor,
121
- borderTopLeftRadius: sectionproperties.generalbtn_bordertopleftradius + 'px',
122
- borderTopRightRadius: sectionproperties.generalbtn_bordertoprightradius + 'px',
123
- borderBottomLeftRadius: sectionproperties.generalbtn_borderbottomleftradius + 'px',
124
- borderBottomRightRadius: sectionproperties.generalbtn_borderbottomrightradius + 'px',
125
- fontWeight: sectionproperties.generalbtn_fontweight,
126
- transition: '.3s',
127
- ':hover': {
128
- background: sectionproperties.generalbtn_bgColoronhover,
129
- color: sectionproperties.generalbtn_textColoronhover,
130
- },
131
- }),
132
- signupbtn: css({
133
- width: sectionproperties.signup_btn_width + 'px',
134
- height: sectionproperties.signup_btn_height + 'px',
135
- borderRadius: sectionproperties.signup_btn_borderBottomLeftRadius + 'px',
136
- textTransform: sectionproperties.signup_btn_texttransform,
137
- fontSize: sectionproperties.signup_btn_fontSize + 'px',
138
- color: sectionproperties.signup_btn_color,
139
- fontWeight: sectionproperties.signup_btn_fontweight,
140
- background: sectionproperties.signup_btnbgcolor_transparent == 'Transparent' ? 'transparent' : sectionproperties.signup_btnbgcolor,
141
- border: sectionproperties.signup_btn_borderwidth + 'px solid ' + sectionproperties.signupbtn_bordercolor,
142
- transition: '.3s',
143
- ':hover': {
144
- background: sectionproperties.signup_btnbgcoloroonhovertransparent == 'Transparent' ? 'transparent' : sectionproperties.signup_btnbgcoloroonhover,
145
- color: sectionproperties.signup_btn_coloronhover,
146
- },
147
- }),
148
- input_label_name: css({
149
- color: sectionproperties.form_labelcolor,
150
- textTransform: sectionproperties.form_labeltexttransform,
151
- fontWeight: sectionproperties.form_labelfontweight,
152
- fontSize: sectionproperties.form_labelfontsize + 'px',
153
- }),
154
- form_control: css({
155
- color: sectionproperties.inputfieldcolor,
156
- fontSize: sectionproperties.inputfieldfontsize + 'px',
157
- }),
158
- checkbox: css({
159
- color: sectionproperties.checkbox_color,
160
- textTransform: sectionproperties.form_labeltexttransform,
161
- fontWeight: sectionproperties.form_labelfontweight,
162
- fontSize: sectionproperties.form_labelfontsize + 'px',
163
- transition: '.3s',
164
- ':hover': {
165
- color: sectionproperties.checkbox_texthovercolor,
166
- },
167
- 'input:checked': {
168
- color: sectionproperties.checkbox_checkedcolor,
169
- },
170
- }),
171
- checkboxinputstyles: css({
172
- ':hover:not(:checked)': {
173
- boxShadow: 'inset 0 0 0 2px ' + sectionproperties.checkbox_texthovercolor,
174
- },
175
- ':checked': {
176
- boxShadow: 'inset 0 0 0 2px ' + sectionproperties.checkbox_checkedcolor,
177
- },
178
- }),
179
- svgstyles: css({
180
- stroke: 'var(--stroke, ' + sectionproperties.checkbox_checkedcolor + ')',
181
- }),
182
- };
183
-
184
- const PersonalInformation = () => {
185
- return (
186
- <div className="row m-0 w-100">
187
- <div className={'col-lg-4 col-md-12 col-sm-12 mb-4 p-sm-0'}>
188
- <label className={`${formstyles.input_label_name}` + ' m-0 text-transform-none d-flex align-items-start '}>{lang.name}</label>
189
- <input
190
- type="text"
191
- className={`${loginstyles.form_control} ${formstyles.form_control}`}
192
- value={payloadobj.name}
193
- onChange={(event) => {
194
- payloadobjchange('name', event.target.value);
195
- }}
196
- />
197
- </div>
198
- <div className={'col-lg-4 col-md-12 col-sm-12 mb-4 p-sm-0'}>
199
- <label className={`${formstyles.input_label_name}` + ' m-0 text-transform-none d-flex align-items-start '}>{lang.email}</label>
200
- <input
201
- className={`${loginstyles.form_control} ${formstyles.form_control}`}
202
- type="text"
203
- textplaceholder=""
204
- value={payloadobj.email}
205
- onChange={(event) => {
206
- payloadobjchange('email', event.target.value);
207
- }}
208
- />
209
- </div>
210
- <div className={'col-lg-4 col-md-12 col-sm-12 mb-4 p-sm-0'}>
211
- <label className={formstyles.input_label_name + ' m-0 d-flex justify-content-start '}>{lang.phonenumber}</label>
212
- <input
213
- className={`${loginstyles.form_control} ${formstyles.form_control}`}
214
- type="text"
215
- textplaceholder=""
216
- value={payloadobj.mobile}
217
- onChange={(event) => {
218
- payloadobjchange('mobile', event.target.value);
219
- }}
220
- />
221
- </div>
222
- </div>
223
- );
224
- };
225
- const Address = () => {
226
- return (
227
- <div className="row m-0 w-100">
228
- <div className={'col-lg-4 col-md-12 col-sm-12 mb-4 p-sm-0'}>
229
- <label className={formstyles.input_label_name + ' d-flex justify-content-start '}>{lang.country}</label>
230
- {fetchTabexCountriesQueryContext.isFetching && (
231
- <div className="col-lg-4 col-md-12 col-sm-12 mb-3 p-sm-0 d-flex justify-content-center align-items-center">
232
- <CircularProgress color="black" width="20px" height="20px" duration="1s" />
233
- </div>
234
- )}
235
- {!fetchTabexCountriesQueryContext.isFetching && fetchTabexCountriesQueryContext.isSuccess && (
236
- <Select
237
- options={fetchTabexCountriesQueryContext.data.data.countries}
238
- getOptionLabel={(option) => option.name}
239
- getOptionValue={(option) => option.id}
240
- autocomplete="new-password"
241
- value={fetchTabexCountriesQueryContext.data.data.countries.filter((option) => option.id == payloadobj.countryid)}
242
- onChange={(option) => {
243
- var tempFetchTabexStatesPayloadobjContext = { ...FetchTabexStatesPayloadobjContext };
244
- tempFetchTabexStatesPayloadobjContext.functype = 'states';
245
- tempFetchTabexStatesPayloadobjContext.country_id = option.id;
246
- setFetchTabexStatesPayloadobjContext({ ...tempFetchTabexStatesPayloadobjContext });
247
- payloadobjchange('countryid', option.id);
248
- }}
249
- styles={langdetect == 'en' ? defaultstyles : defaultstylestranslated}
250
- placeholder={langdetect == 'en' ? 'Choose Country' : 'إختر البلد'}
251
- isSearchable={true}
252
- />
253
- )}
254
- </div>
255
- <div className={'col-lg-4 col-md-12 col-sm-12 mb-4 p-sm-0'}>
256
- <label className={formstyles.input_label_name + ' d-flex justify-content-start '}>{lang.choosestategov}</label>
257
- {fetchTabexStatesQueryContext.isFetching && (
258
- <div className="col-lg-12 col-md-12 col-sm-12 mb-3 p-sm-0 d-flex justify-content-center align-items-center">
259
- <CircularProgress color="black" width="20px" height="20px" duration="1s" />
260
- </div>
261
- )}
262
- {FetchTabexStatesPayloadobjContext.country_id == '' && (
263
- <Select styles={langdetect == 'en' ? defaultstyles : defaultstylestranslated} placeholder={lang.choosestategov} isSearchable={true} />
264
- )}
265
- {!fetchTabexStatesQueryContext.isFetching && fetchTabexStatesQueryContext.isSuccess && (
266
- <Select
267
- options={fetchTabexStatesQueryContext.data.data.states}
268
- getOptionLabel={(option) => option.name}
269
- getOptionValue={(option) => option.id}
270
- autocomplete="new-password"
271
- value={fetchTabexStatesQueryContext.data.data.states.filter((option) => option.id == payloadobj.stateid)}
272
- onChange={(option) => {
273
- var tempFetchTabexStatesPayloadobjContext = { ...FetchTabexStatesPayloadobjContext };
274
- tempFetchTabexStatesPayloadobjContext.functype = 'cities';
275
- tempFetchTabexStatesPayloadobjContext.state_id = option.id;
276
- setFetchTabexStatesPayloadobjContext({ ...tempFetchTabexStatesPayloadobjContext });
277
- payloadobjchange('stateid', option.id);
278
- }}
279
- styles={langdetect == 'en' ? defaultstyles : defaultstylestranslated}
280
- placeholder={lang.choosestategov}
281
- isSearchable={true}
282
- />
283
- )}
284
- </div>
285
- <div className={'col-lg-4 col-md-12 col-sm-12 mb-4 p-sm-0'}>
286
- <label className={formstyles.input_label_name + ' d-flex justify-content-start '}>{lang.city}</label>
287
- {fetchTabexCitiesQueryContext.isFetching && (
288
- <div className="col-lg-12 col-md-12 col-sm-12 mb-3 p-sm-0 d-flex justify-content-center align-items-center">
289
- <CircularProgress color="black" width="20px" height="20px" duration="1s" />
290
- </div>
291
- )}
292
- {FetchTabexStatesPayloadobjContext.country_id == '' && (
293
- <Select placeholder={lang.choosecity} styles={langdetect == 'en' ? defaultstyles : defaultstylestranslated} isSearchable={true} />
294
- )}
295
- {!fetchTabexCitiesQueryContext.isFetching && fetchTabexCitiesQueryContext.isSuccess && (
296
- <Select
297
- options={fetchTabexCitiesQueryContext.data.data.cities}
298
- getOptionLabel={(option) => option.name}
299
- getOptionValue={(option) => option.id}
300
- autocomplete="new-password"
301
- value={fetchTabexCitiesQueryContext.data.data.cities.filter((option) => option.id == payloadobj.cityid)}
302
- onChange={(option) => {
303
- payloadobjchange('cityid', option.id);
304
- }}
305
- styles={langdetect == 'en' ? defaultstyles : defaultstylestranslated}
306
- placeholder={lang.choosecity}
307
- isSearchable={true}
308
- />
309
- )}
310
- </div>
311
- <div className="col-lg-12 col-md-12 col-sm-12 mb-4 p-sm-0">
312
- <label className={`${formstyles.input_label_name}` + ' text-transform-none d-flex align-items-start '}>{lang.address}</label>
313
- <div className={loginstyles.wrap_input100}>
314
- <TextareaAutosize
315
- type="text"
316
- className={`${loginstyles.form_control} ${loginstyles.form_controltextarea} ${formstyles.form_control}`}
317
- value={payloadobj.shippingaddress}
318
- textplaceholder=""
319
- onChange={(event) => {
320
- payloadobjchange('shippingaddress', event.target.value);
321
- }}
322
- style={{ resize: 'none' }}
323
- />
324
- <span className={loginstyles.login_input_focus}></span>
325
- </div>
326
- </div>
327
- </div>
328
- );
329
- };
330
- const Password = () => {
331
- return (
332
- <div className="row m-0 w-100">
333
- <div className="col-lg-6 col-md-12 col-sm-12 mb-4 p-sm-0">
334
- <label className={`${formstyles.input_label_name}` + ' m-0 text-transform-none d-flex align-items-start '}>{lang.password}</label>
335
- <input
336
- className={`${loginstyles.form_control} ${formstyles.form_control}`}
337
- type="password"
338
- autocomplete="new-password"
339
- textplaceholder=""
340
- value={payloadobj.password}
341
- onChange={(event) => {
342
- payloadobjchange('password', event.target.value);
343
- }}
344
- />
345
- </div>
346
- <div className="col-lg-6 col-md-12 col-sm-12 mb-4 p-sm-0">
347
- <label className={`${formstyles.input_label_name}` + ' m-0 text-transform-none d-flex align-items-start '}>{lang.confirmpassword}</label>
348
- <input
349
- className={`${loginstyles.form_control} ${formstyles.form_control}`}
350
- type="password"
351
- autocomplete="new-password"
352
- textplaceholder=""
353
- value={payloadobj.password2}
354
- onChange={(event) => {
355
- payloadobjchange('password2', event.target.value);
356
- }}
357
- />
358
- </div>
359
- </div>
360
- );
361
- };
362
- const Otherinformation = () => {
363
- return (
364
- <div className="row m-0 w-100">
365
- {payloadobj.instsignupformvalues.length != 0 && (
366
- <>
367
- {payloadobj.instsignupformvalues.map((item, index) => {
368
- return (
369
- <div className="col-lg-6 col-md-12 col-sm-12 mb-4 p-sm-0">
370
- {item.inputtype != 'checkbox' && (
371
- <label className={formstyles.input_label_name}>
372
- {langdetect == 'en' ? item.inputname_en : item.inputname_ar} {item.optional == 1 ? '' : '*'}
373
- </label>
374
- )}
375
- <div className={loginstyles.wrap_input100}>
376
- {item.inputtype == 'input' && (
377
- <input
378
- className={loginstyles.logininput}
379
- type="text"
380
- value={item.customersignupvalue}
381
- textplaceholder=""
382
- onChange={(event) => {
383
- var temppayloadobj = { ...payloadobj };
384
- temppayloadobj.instsignupformvalues[index].customersignupvalue = event.target.value;
385
- setpayloadobj({ ...temppayloadobj });
386
- }}
387
- />
388
- )}
389
- {item.inputtype == 'checkbox' && (
390
- <label
391
- className={
392
- langdetect == 'en'
393
- ? `${loginstyles.checkbox} ${formstyles.checkbox} ` + ' d-flex mb-0 '
394
- : `${loginstyles.checkbox} ${loginstyles.checkboxtranslated}` + ' d-flex mb-0 '
395
- }
396
- for="codcheckbox"
397
- >
398
- <input
399
- id={'codcheckbox'}
400
- type="checkbox"
401
- className={formstyles.checkboxinputstyles + ' mt-auto mb-auto '}
402
- checked={item.customersignupvalue == 1 ? true : false}
403
- onChange={() => {
404
- var temppayloadobj = { ...payloadobj };
405
- if (temppayloadobj.instsignupformvalues[index].customersignupvalue == 1) {
406
- temppayloadobj.instsignupformvalues[index].customersignupvalue = 0;
407
- } else {
408
- temppayloadobj.instsignupformvalues[index].customersignupvalue = 1;
409
- }
410
- setpayloadobj({ ...temppayloadobj });
411
- }}
412
- />
413
- <svg viewBox="0 0 21 21" className={formstyles.svgstyles + ' h-100 '}>
414
- <path d="M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"></path>
415
- </svg>
416
- <p className={formstyles.input_label_name + ' ml-2 mb-0 cursor-pointer wordbreak mr-2'} style={{}}>
417
- {langdetect == 'en' ? item.inputname_en : item.inputname_ar} {item.optional == 1 ? '' : '*'}
418
- </p>
419
- </label>
420
- )}
421
- {item.inputtype == 'selectbox' && (
422
- <select
423
- className={loginstyles.wrap_input100}
424
- value={item.customersignupvalue}
425
- textplaceholder=""
426
- onChange={(event) => {
427
- var temppayloadobj = { ...payloadobj };
428
- temppayloadobj.instsignupformvalues[index].customersignupvalue = event.target.value;
429
- setpayloadobj({ ...temppayloadobj });
430
- }}
431
- >
432
- <option value={''} disabled>
433
- {langdetect == 'en' ? 'Choose' : 'إختر'}
434
- </option>
435
- {JSON.parse(item.selectboxvalues).map((selectboxitem, selectboxindex) => {
436
- return <option value={selectboxitem.optionname_en}>{selectboxitem.optionname_en}</option>;
437
- })}
438
- </select>
439
- )}
440
- {item.inputtype == 'textarea' && (
441
- <TextareaAutosize
442
- type="text"
443
- className={loginstyles.logininput}
444
- value={item.customersignupvalue}
445
- textplaceholder=""
446
- onChange={(event) => {
447
- var temppayloadobj = { ...payloadobj };
448
- temppayloadobj.instsignupformvalues[index].customersignupvalue = event.target.value;
449
- setpayloadobj({ ...temppayloadobj });
450
- }}
451
- />
452
- )}
453
- <span className={loginstyles.login_input_focus}></span>
454
- </div>
455
- </div>
456
- );
457
- })}
458
- </>
459
- )}
460
- </div>
461
- );
462
- };
463
- return (
464
- <div className="row m-0 w-100 d-flex justify-content-center">
465
- {!dataloaded && <CircularProgress color="black" width="20px" height="20px" duration="1s" />}
466
- {dataloaded && props.srcfromprops == 'signup' && (
467
- <div
468
- className="row ml-0 mr-0"
469
- style={{
470
- background: 'white',
471
- }}
472
- >
473
- {PersonalInformation()}
474
- {Address()}
475
- {Password()}
476
- </div>
477
- )}
478
- {dataloaded && props.srcfromprops == 'accountinfo' && (
479
- <div className="col-lg-12 p-0">
480
- <div className="row ml-0 mr-0 w-100">
481
- <div className="col-lg-12 mb-3 p-0">
482
- <div
483
- style={{
484
- background: sectionproperties.backgroundColor,
485
- borderTopLeftRadius: sectionproperties.borderTopLeftRadius + 'px',
486
- borderTopRightRadius: sectionproperties.borderTopRightRadius + 'px',
487
- borderBottomLeftRadius: sectionproperties.borderBottomLeftRadius + 'px',
488
- borderBottomRightRadius: sectionproperties.borderBottomRightRadius + 'px',
489
- }}
490
- className="p-2"
491
- >
492
- <div className="row ml-0 mr-0">
493
- <div className="col-lg-12 col-md-12 col-sm-12 p-0 d-flex justify-content-center">
494
- <p
495
- className="m-0 p-0"
496
- style={{
497
- fontSize: sectionproperties.sectionTitleFontSize + 'px',
498
- color: sectionproperties.sectionTitleColor,
499
- fontWeight: sectionproperties.sectionTitleFontWeight,
500
- }}
501
- >
502
- {lang.personalinformation}
503
- </p>
504
- </div>
505
- <div className="col-lg-12 p-0">
506
- <hr className="mt-2 mb-3" />
507
- </div>
508
- </div>
509
- {PersonalInformation()}
510
- </div>
511
- </div>
512
- <div className="col-lg-12 mb-3 p-0">
513
- <div
514
- className={'p-2'}
515
- style={{
516
- background: sectionproperties.backgroundColor,
517
- borderTopLeftRadius: sectionproperties.borderTopLeftRadius + 'px',
518
- borderTopRightRadius: sectionproperties.borderTopRightRadius + 'px',
519
- borderBottomLeftRadius: sectionproperties.borderBottomLeftRadius + 'px',
520
- borderBottomRightRadius: sectionproperties.borderBottomRightRadius + 'px',
521
- }}
522
- >
523
- <div className="row ml-0 mr-0">
524
- <div className="col-lg-12 col-md-12 col-sm-12 p-0 d-flex justify-content-center">
525
- <p
526
- className="m-0 p-0"
527
- style={{
528
- fontSize: sectionproperties.sectionTitleFontSize + 'px',
529
- color: sectionproperties.sectionTitleColor,
530
- fontWeight: sectionproperties.sectionTitleFontWeight,
531
- }}
532
- >
533
- {lang.address}
534
- </p>
535
- </div>
536
- <div className="col-lg-12 p-0">
537
- <hr className="mt-2 mb-3" />
538
- </div>
539
- </div>
540
- {Address()}
541
- </div>
542
- </div>
543
- <div className="col-lg-12 mb-3 p-0">
544
- <div
545
- className={'p-2'}
546
- style={{
547
- background: sectionproperties.backgroundColor,
548
- borderTopLeftRadius: sectionproperties.borderTopLeftRadius + 'px',
549
- borderTopRightRadius: sectionproperties.borderTopRightRadius + 'px',
550
- borderBottomLeftRadius: sectionproperties.borderBottomLeftRadius + 'px',
551
- borderBottomRightRadius: sectionproperties.borderBottomRightRadius + 'px',
552
- }}
553
- >
554
- <div className="row ml-0 mr-0">
555
- <div className="col-lg-12 col-md-12 col-sm-12 p-0 d-flex justify-content-center">
556
- <p
557
- className="m-0 p-0"
558
- style={{
559
- fontSize: sectionproperties.sectionTitleFontSize + 'px',
560
- color: sectionproperties.sectionTitleColor,
561
- fontWeight: sectionproperties.sectionTitleFontWeight,
562
- }}
563
- >
564
- {lang.security}
565
- </p>
566
- </div>
567
- <div className="col-lg-12 p-0">
568
- <hr className="mt-2 mb-3" />
569
- </div>
570
- </div>
571
- <div className="row ml-0 mr-0">{Password()}</div>
572
- </div>
573
- </div>
574
- {payloadobj.instsignupformvalues.length != 0 && (
575
- <div className="col-lg-12 mb-3 p-0">
576
- <div
577
- style={{
578
- background: sectionproperties.backgroundColor,
579
- borderTopLeftRadius: sectionproperties.borderTopLeftRadius + 'px',
580
- borderTopRightRadius: sectionproperties.borderTopRightRadius + 'px',
581
- borderBottomLeftRadius: sectionproperties.borderBottomLeftRadius + 'px',
582
- borderBottomRightRadius: sectionproperties.borderBottomRightRadius + 'px',
583
- }}
584
- className="p-2"
585
- >
586
- <div className="row ml-0 mr-0">
587
- <div className="col-lg-12 col-md-12 col-sm-12 p-0 d-flex justify-content-center">
588
- <p
589
- className="m-0 p-0"
590
- style={{
591
- fontSize: sectionproperties.sectionTitleFontSize + 'px',
592
- color: sectionproperties.sectionTitleColor,
593
- fontWeight: sectionproperties.sectionTitleFontWeight,
594
- }}
595
- >
596
- {lang.otherinformation}
597
- </p>
598
- </div>
599
- <div className="col-lg-12 p-0">
600
- <hr className="mt-2 mb-3" />
601
- </div>
602
- </div>
603
- <div className="row ml-0 mr-0">{Otherinformation()}</div>
604
- </div>
605
- </div>
606
- )}
607
- {/* <div className="col-lg-12 col-md-12 col-sm-12 d-flex align-items-center justify-content-center">
608
- <button
609
- className={`${formstyles.signupbtn}` + ' pl-4 pr-4 '}
610
- disabled={CustomerSignUpMutationContext.isLoading ? true : false}
611
- onClick={() => {
612
- var passwordvalidation = false;
613
- if (authdetailsContext.loggedin == false) {
614
- if (payloadobj?.password?.length != 0) {
615
- if (payloadobj?.password == payloadobj?.password2) {
616
- passwordvalidation = true;
617
- }
618
- }
619
- } else if (authdetailsContext.loggedin == true) {
620
- if (payloadobj?.password != undefined && payloadobj?.password != null && payloadobj?.password?.length != 0) {
621
- if (payloadobj?.password == payloadobj?.password2) {
622
- passwordvalidation = true;
623
- }
624
- } else {
625
- passwordvalidation = true;
626
- }
627
- }
628
-
629
- if (passwordvalidation == false) {
630
- NotificationManager.warning('', lang.passwordsdontmatch);
631
- }
632
-
633
- if (
634
- payloadobj?.email?.length != 0 &&
635
- payloadobj?.name?.length != 0 &&
636
- payloadobj?.mobile?.length != 0 &&
637
- passwordvalidation == true &&
638
- payloadobj?.mobile != null &&
639
- payloadobj?.stateid != null &&
640
- payloadobj?.cityid != null &&
641
- payloadobj?.name != null &&
642
- payloadobj?.email != null &&
643
- payloadobj?.countryid != null &&
644
- payloadobj?.countryid?.length != 0 &&
645
- payloadobj?.stateid?.length != 0 &&
646
- payloadobj?.cityid?.length != 0
647
- ) {
648
- var signupformismissing = true;
649
- payloadobj.instsignupformvalues.forEach(function (arrayItem) {
650
- if (arrayItem.optional == 0) {
651
- if (arrayItem.customersignupvalue == undefined || arrayItem.customersignupvalue.length == 0) {
652
- signupformismissing = false;
653
- }
654
- }
655
- });
656
- if (signupformismissing) {
657
- var temppayloadobj = { ...payloadobj };
658
- if (authdetailsContext.loggedin == true) {
659
- temppayloadobj.functype = 'edit';
660
- } else {
661
- temppayloadobj.functype = 'add';
662
- }
663
-
664
- temppayloadobj.addedsourcetype = 'Webapp';
665
- temppayloadobj.instapikey = instapikey();
666
- CustomerSignUpMutationContext.mutate(temppayloadobj);
667
- } else {
668
- NotificationManager.warning('', 'Please Fill All The Mandatory Fields');
669
- }
670
- } else {
671
- NotificationManager.warning('', lang.fillthemissingfields);
672
- }
673
- }}
674
- >
675
- {CustomerSignUpMutationContext.isLoading && <CircularProgress color="#fff" width="20px" height="20px" duration="1s" />}
676
-
677
- {!CustomerSignUpMutationContext.isLoading && (
678
- <>
679
- {authdetailsContext.loggedin != true && (
680
- <span style={{ letterSpacing: langdetect == 'en' ? '1px' : '' }}>{langdetect == 'en' ? 'Signup' : 'إنشاء الحساب'}</span>
681
- )}
682
- {authdetailsContext.loggedin == true && (
683
- <span style={{ letterSpacing: langdetect == 'en' ? '1px' : '' }}>{langdetect == 'en' ? 'Update' : 'تحديث'}</span>
684
- )}
685
- </>
686
- )}
687
- </button>
688
- </div> */}
689
- </div>
690
- </div>
691
- )}
692
- <div className="col-lg-12 col-md-12 col-sm-12 d-flex align-items-center justify-content-center mb-3 mt-3">
693
- <button
694
- className={`${formstyles.signupbtn}` + ' d-flex align-items-center justify-content-center '}
695
- disabled={CustomerSignUpMutationContext.isLoading ? true : false}
696
- onClick={() => {
697
- var passwordvalidation = false;
698
- if (authdetailsContext.loggedin == false) {
699
- if (payloadobj.password.length != 0) {
700
- if (payloadobj.password == payloadobj.password2) {
701
- passwordvalidation = true;
702
- }
703
- }
704
- } else if (authdetailsContext.loggedin == true) {
705
- if (payloadobj.password.length != 0) {
706
- if (payloadobj.password == payloadobj.password2) {
707
- passwordvalidation = true;
708
- }
709
- } else {
710
- passwordvalidation = true;
711
- }
712
- }
713
-
714
- if (passwordvalidation == false) {
715
- NotificationManager.warning('', lang.passwordsdontmatch);
716
- }
717
- if (
718
- payloadobj.email.length != 0 &&
719
- payloadobj.name.length != 0 &&
720
- payloadobj.mobile.length != 0 &&
721
- passwordvalidation == true &&
722
- payloadobj.countryid.length != 0 &&
723
- payloadobj.stateid.length != 0 &&
724
- payloadobj.cityid.length != 0
725
- ) {
726
- var signupformismissing = true;
727
- payloadobj.instsignupformvalues.forEach(function (arrayItem) {
728
- if (arrayItem.optional == 0) {
729
- if (arrayItem.customersignupvalue == undefined || arrayItem.customersignupvalue.length == 0) {
730
- signupformismissing = false;
731
- }
732
- }
733
- });
734
- if (signupformismissing) {
735
- var temppayloadobj = { ...payloadobj };
736
- if (authdetailsContext.loggedin == true) {
737
- temppayloadobj.functype = 'edit';
738
- } else {
739
- temppayloadobj.functype = 'add';
740
- }
741
-
742
- temppayloadobj.addedsourcetype = 'Webapp';
743
- temppayloadobj.instapikey = instapikey();
744
- CustomerSignUpMutationContext.mutate(temppayloadobj);
745
- } else {
746
- NotificationManager.warning('', lang.completerequiredfields);
747
- }
748
- } else {
749
- NotificationManager.warning('', lang.fillthemissingfields);
750
- }
751
- }}
752
- >
753
- {CustomerSignUpMutationContext.isLoading && <CircularProgress color="#fff" width="20px" height="20px" duration="1s" />}
754
-
755
- {!CustomerSignUpMutationContext.isLoading && (
756
- <>
757
- {authdetailsContext.loggedin != true && <span style={{ letterSpacing: langdetect == 'en' ? '1px' : '' }}>{lang.signup}</span>}
758
- {authdetailsContext.loggedin == true && <span style={{ letterSpacing: langdetect == 'en' ? '1px' : '' }}>{lang.update}</span>}
759
- </>
760
- )}
761
- </button>
762
- </div>
763
- {props.srcfromprops == 'signup' && (
764
- <div className="row m-0 w-100">
765
- <div className="col-lg-12 col-md-12 col-sm-12 d-flex d-md-none align-items-center justify-content-center mb-2">
766
- <div className="ml-1 mr-1">
767
- <FacebookLoginButton actions={actions} />
768
- </div>
769
- <div className="ml-1 mr-1">
770
- <GoogleLogin actions={actions} />
771
- </div>
772
- </div>
773
- <div className="col-lg-12 col-md-12 col-sm-12 d-none d-md-flex align-items-center justify-content-center mb-2">
774
- <div className="ml-1 mr-1">
775
- <FacebookLoginButton actions={actions} />
776
- </div>
777
- </div>
778
- <div className="col-lg-12 col-md-12 col-sm-12 d-none d-md-flex align-items-center justify-content-center mb-2">
779
- <div className="ml-1 mr-1">
780
- <GoogleLogin actions={actions} />
781
- </div>
782
- </div>
783
- </div>
784
- )}
785
- </div>
786
- );
787
- };
788
- export default CustomerInformationForm;