tabexseriescomponents 0.0.64 → 0.0.66

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