@tap-payments/auth-jsconnect 2.0.44 → 2.0.45

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 (545) hide show
  1. package/README.md +34 -34
  2. package/build/@types/app.d.ts +70 -7
  3. package/build/@types/app.js +13 -0
  4. package/build/@types/form.d.ts +63 -34
  5. package/build/@types/theme.d.ts +1 -1
  6. package/build/api/account.d.ts +6 -1
  7. package/build/api/account.js +9 -1
  8. package/build/api/auth.d.ts +24 -18
  9. package/build/api/auth.js +25 -5
  10. package/build/api/availabilityServices.d.ts +3 -3
  11. package/build/api/axios.js +3 -3
  12. package/build/api/board.d.ts +4 -3
  13. package/build/api/board.js +8 -1
  14. package/build/api/brand.d.ts +1 -0
  15. package/build/api/brand.js +9 -1
  16. package/build/api/data.d.ts +16 -8
  17. package/build/api/data.js +16 -0
  18. package/build/api/entity.d.ts +46 -16
  19. package/build/api/entity.js +26 -16
  20. package/build/api/file.d.ts +13 -0
  21. package/build/api/file.js +24 -0
  22. package/build/api/index.d.ts +30 -8
  23. package/build/api/index.js +5 -3
  24. package/build/api/individual.d.ts +10 -4
  25. package/build/api/lead.d.ts +16 -10
  26. package/build/api/lead.js +17 -1
  27. package/build/api/location.d.ts +5 -0
  28. package/build/api/location.js +19 -0
  29. package/build/api/operator.d.ts +1 -1
  30. package/build/api/operator.js +1 -1
  31. package/build/api/user.d.ts +1 -1
  32. package/build/app/rootReducer.d.ts +2 -1
  33. package/build/app/rootReducer.js +4 -2
  34. package/build/app/settings.d.ts +17 -6
  35. package/build/app/settings.js +23 -19
  36. package/build/app/store.d.ts +8 -6
  37. package/build/assets/locales/ar.json +40 -1
  38. package/build/assets/locales/en.json +42 -1
  39. package/build/components/Button/Button.js +1 -5
  40. package/build/components/FileInput/DragAndDrop.d.ts +3 -2
  41. package/build/components/FileInput/DragAndDrop.js +5 -7
  42. package/build/components/Lottie/Lottie.d.ts +3536 -210
  43. package/build/components/Lottie/Lottie.js +11 -3
  44. package/build/components/Lottie/files/account_creating.json +732 -0
  45. package/build/components/Lottie/files/error.json +692 -0
  46. package/build/components/Lottie/files/start_loading.json +1140 -0
  47. package/build/components/Lottie/files/still_loading.json +1140 -0
  48. package/build/components/ProgressBar/CircularProgressBar.d.ts +3 -1
  49. package/build/components/ProgressBar/CircularProgressBar.js +2 -2
  50. package/build/components/Radio/Radio.js +1 -1
  51. package/build/components/RadioLabel/RadioLabel.d.ts +4 -2
  52. package/build/components/RadioLabel/RadioLabel.js +2 -2
  53. package/build/components/SimpleList/SimpleList.d.ts +2 -1
  54. package/build/components/SimpleList/SimpleList.js +22 -10
  55. package/build/components/Slide/Slide.d.ts +1 -1
  56. package/build/components/Tooltip/Tooltip.d.ts +1 -1
  57. package/build/components/Tooltip/Tooltip.js +12 -3
  58. package/build/constants/api.d.ts +8 -0
  59. package/build/constants/api.js +17 -1
  60. package/build/constants/app.d.ts +24 -2
  61. package/build/constants/app.js +182 -16
  62. package/build/constants/assets.d.ts +3 -0
  63. package/build/constants/assets.js +3 -0
  64. package/build/constants/validation.d.ts +3 -0
  65. package/build/constants/validation.js +3 -0
  66. package/build/features/app/bank/bankStore.d.ts +79 -23
  67. package/build/features/app/bank/bankStore.js +85 -111
  68. package/build/features/app/brand/brandStore.d.ts +191 -0
  69. package/build/features/app/brand/brandStore.js +654 -0
  70. package/build/features/app/business/businessStore.d.ts +185 -24
  71. package/build/features/app/business/businessStore.js +219 -217
  72. package/build/features/app/connect/connectStore.d.ts +124 -19
  73. package/build/features/app/connect/connectStore.js +228 -264
  74. package/build/features/app/connectExpress/connectExpressStore.d.ts +282 -0
  75. package/build/features/app/connectExpress/connectExpressStore.js +1013 -0
  76. package/build/features/app/entity/entityStore.d.ts +101 -24
  77. package/build/features/app/entity/entityStore.js +345 -341
  78. package/build/features/app/individual/individualStore.d.ts +83 -20
  79. package/build/features/app/individual/individualStore.js +166 -135
  80. package/build/features/app/password/passwordStore.d.ts +106 -17
  81. package/build/features/app/password/passwordStore.js +34 -29
  82. package/build/features/app/signIn/signInStore.d.ts +61 -7
  83. package/build/features/app/signIn/signInStore.js +24 -47
  84. package/build/features/app/tax/taxStore.d.ts +69 -9
  85. package/build/features/app/tax/taxStore.js +105 -94
  86. package/build/features/bank/Bank.d.ts +5 -3
  87. package/build/features/bank/Bank.js +39 -36
  88. package/build/features/bank/screens/BankDetails/BankDetails.js +26 -22
  89. package/build/features/bank/screens/BankDetails/BankStatement.d.ts +4 -1
  90. package/build/features/bank/screens/BankDetails/BankStatement.js +11 -44
  91. package/build/features/bank/screens/BankDetails/IBAN.js +5 -2
  92. package/build/features/bank/screens/BankDetails/validation.d.ts +22 -6
  93. package/build/features/bank/screens/BankDetails/validation.js +11 -24
  94. package/build/features/bank/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  95. package/build/features/bank/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  96. package/build/features/bank/screens/PrepareDataLoading/index.d.ts +2 -0
  97. package/build/features/bank/screens/PrepareDataLoading/index.js +2 -0
  98. package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -2
  99. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -97
  100. package/build/features/brand/Brand.d.ts +9 -0
  101. package/build/features/brand/Brand.js +72 -0
  102. package/build/features/brand/index.d.ts +1 -0
  103. package/build/features/brand/index.js +1 -0
  104. package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +91 -0
  105. package/build/features/{entity/screens/EntityInfoConfirm → brand/screens/BrandActivities}/ActivitiesList.js +54 -41
  106. package/build/features/brand/screens/BrandActivities/BrandActivities.d.ts +5 -0
  107. package/build/features/brand/screens/BrandActivities/BrandActivities.js +72 -0
  108. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +82 -0
  109. package/build/features/{entity/screens/Customers/CustomerLocations.js → brand/screens/BrandActivities/CustomerBase.js} +9 -37
  110. package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/ExpectedCustomers.d.ts +0 -0
  111. package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/ExpectedCustomers.js +7 -8
  112. package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/ExpectedSalesRange.d.ts +0 -0
  113. package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/ExpectedSalesRange.js +14 -11
  114. package/build/features/brand/screens/BrandActivities/OperationStartDate.d.ts +20 -0
  115. package/build/features/brand/screens/BrandActivities/OperationStartDate.js +45 -0
  116. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +36 -0
  117. package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/RefundPolicy.js +1 -3
  118. package/build/features/brand/screens/BrandActivities/TAC.d.ts +6 -0
  119. package/build/features/{auth/screens/NID → brand/screens/BrandActivities}/TAC.js +8 -11
  120. package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/TransactionPolicy.d.ts +0 -0
  121. package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/TransactionPolicy.js +1 -3
  122. package/build/features/brand/screens/BrandActivities/index.d.ts +2 -0
  123. package/build/features/brand/screens/BrandActivities/index.js +2 -0
  124. package/build/features/brand/screens/BrandActivities/validation.d.ts +71 -0
  125. package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/validation.js +9 -1
  126. package/build/features/brand/screens/BrandInfo/BrandInfo.d.ts +5 -0
  127. package/build/features/brand/screens/BrandInfo/BrandInfo.js +72 -0
  128. package/build/features/brand/screens/BrandInfo/BrandName.d.ts +8 -0
  129. package/build/features/brand/screens/BrandInfo/BrandName.js +142 -0
  130. package/build/features/brand/screens/BrandInfo/SalesChannels.d.ts +5 -0
  131. package/build/features/brand/screens/BrandInfo/SalesChannels.js +30 -0
  132. package/build/features/brand/screens/BrandInfo/Segments.d.ts +8 -0
  133. package/build/features/brand/screens/BrandInfo/Segments.js +74 -0
  134. package/build/features/brand/screens/BrandInfo/TeamSize.d.ts +8 -0
  135. package/build/features/brand/screens/BrandInfo/TeamSize.js +74 -0
  136. package/build/features/brand/screens/BrandInfo/index.d.ts +2 -0
  137. package/build/features/brand/screens/BrandInfo/index.js +2 -0
  138. package/build/features/brand/screens/BrandInfo/validation.d.ts +41 -0
  139. package/build/features/brand/screens/BrandInfo/validation.js +106 -0
  140. package/build/features/brand/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  141. package/build/features/brand/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  142. package/build/features/brand/screens/PrepareDataLoading/index.d.ts +2 -0
  143. package/build/features/brand/screens/PrepareDataLoading/index.js +2 -0
  144. package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
  145. package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +16 -0
  146. package/build/features/brand/screens/ResetPasswordSuccess/index.d.ts +3 -0
  147. package/build/features/brand/screens/ResetPasswordSuccess/index.js +2 -0
  148. package/build/features/brand/screens/Success/Success.d.ts +5 -0
  149. package/build/features/brand/screens/Success/Success.js +20 -0
  150. package/build/features/brand/screens/Success/index.d.ts +3 -0
  151. package/build/features/brand/screens/Success/index.js +2 -0
  152. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  153. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +22 -0
  154. package/build/features/brand/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  155. package/build/features/brand/screens/SuccessWithFlowButtons/index.js +2 -0
  156. package/build/features/brand/screens/Verify/OTPInput.d.ts +7 -0
  157. package/build/features/brand/screens/Verify/OTPInput.js +47 -0
  158. package/build/features/{auth/screens/OTP/OTPInput.d.ts → brand/screens/Verify/Verify.d.ts} +0 -0
  159. package/build/features/brand/screens/Verify/Verify.js +91 -0
  160. package/build/features/brand/screens/Verify/index.d.ts +2 -0
  161. package/build/features/brand/screens/Verify/index.js +2 -0
  162. package/build/features/{auth/screens/OTP → brand/screens/Verify}/validation.d.ts +0 -0
  163. package/build/features/{auth/screens/OTP → brand/screens/Verify}/validation.js +0 -0
  164. package/build/features/business/Business.d.ts +4 -3
  165. package/build/features/business/Business.js +9 -14
  166. package/build/features/business/screens/Activities/Activities.js +6 -14
  167. package/build/features/business/screens/Activities/ActivitiesList.d.ts +13 -13
  168. package/build/features/business/screens/Activities/ActivitiesList.js +11 -17
  169. package/build/features/business/screens/Activities/OperationStartDate.d.ts +2 -2
  170. package/build/features/business/screens/Activities/validation.js +4 -1
  171. package/build/features/business/screens/BusinessType/Article.d.ts +6 -0
  172. package/build/features/business/screens/BusinessType/Article.js +87 -0
  173. package/build/features/business/screens/BusinessType/BusinessType.js +13 -12
  174. package/build/features/business/screens/BusinessType/EntityName.js +1 -1
  175. package/build/features/business/screens/BusinessType/LicenseCertificate.js +12 -46
  176. package/build/features/business/screens/BusinessType/LicenseList.js +3 -2
  177. package/build/features/business/screens/BusinessType/LicenseType.d.ts +30 -2
  178. package/build/features/business/screens/BusinessType/LicenseType.js +31 -6
  179. package/build/features/business/screens/BusinessType/validation.d.ts +9 -6
  180. package/build/features/business/screens/BusinessType/validation.js +21 -13
  181. package/build/features/business/screens/Customers/CustomerLocations.d.ts +11 -11
  182. package/build/features/business/screens/Customers/CustomerLocations.js +2 -3
  183. package/build/features/business/screens/Customers/ExpectedCustomers.js +2 -3
  184. package/build/features/business/screens/Customers/ExpectedSalesRange.js +8 -5
  185. package/build/features/business/screens/Customers/RefundPolicy.d.ts +5 -5
  186. package/build/features/business/screens/Customers/RefundPolicy.js +1 -3
  187. package/build/features/business/screens/Customers/TransactionPolicy.js +1 -3
  188. package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -2
  189. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -96
  190. package/build/features/business/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
  191. package/build/features/business/screens/VerifyPACI/VerifyPACI.js +9 -134
  192. package/build/features/connect/Connect.d.ts +4 -4
  193. package/build/features/connect/Connect.js +14 -31
  194. package/build/features/connect/screens/CivilID/CivilID.js +1 -1
  195. package/build/features/connect/screens/Individual/Email.js +1 -1
  196. package/build/features/connect/screens/Individual/Individual.js +5 -8
  197. package/build/features/connect/screens/Individual/validation.js +2 -8
  198. package/build/features/connect/screens/Merchant/BrandList.js +15 -2
  199. package/build/features/connect/screens/Merchant/BrandName.js +1 -1
  200. package/build/features/connect/screens/Merchant/Merchant.js +32 -36
  201. package/build/features/connect/screens/Merchant/SalesChannels.d.ts +1 -3
  202. package/build/features/connect/screens/Merchant/SalesChannels.js +28 -103
  203. package/build/features/connect/screens/Merchant/Segments.d.ts +8 -0
  204. package/build/features/connect/screens/Merchant/Segments.js +74 -0
  205. package/build/features/connect/screens/Merchant/TAC.js +1 -3
  206. package/build/features/connect/screens/Merchant/TeamSize.d.ts +8 -0
  207. package/build/features/connect/screens/Merchant/TeamSize.js +74 -0
  208. package/build/features/connect/screens/Merchant/validation.d.ts +6 -0
  209. package/build/features/connect/screens/Merchant/validation.js +12 -10
  210. package/build/features/connect/screens/ThankYou/ThankYou.js +9 -2
  211. package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
  212. package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +9 -73
  213. package/build/features/connectExpress/ConnectExpress.d.ts +11 -0
  214. package/build/features/connectExpress/ConnectExpress.js +84 -0
  215. package/build/features/connectExpress/index.d.ts +1 -0
  216. package/build/features/connectExpress/index.js +1 -0
  217. package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.d.ts +5 -0
  218. package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.js +15 -0
  219. package/build/features/connectExpress/screens/AccountAlreadyCreated/index.d.ts +3 -0
  220. package/build/features/connectExpress/screens/AccountAlreadyCreated/index.js +2 -0
  221. package/build/features/connectExpress/screens/Brand/Brand.d.ts +5 -0
  222. package/build/features/connectExpress/screens/Brand/Brand.js +71 -0
  223. package/build/features/connectExpress/screens/Brand/index.d.ts +2 -0
  224. package/build/features/connectExpress/screens/Brand/index.js +2 -0
  225. package/build/features/connectExpress/screens/CivilID/CivilID.d.ts +5 -0
  226. package/build/features/connectExpress/screens/CivilID/CivilID.js +84 -0
  227. package/build/features/connectExpress/screens/CivilID/IDNumber.d.ts +7 -0
  228. package/build/features/connectExpress/screens/CivilID/IDNumber.js +55 -0
  229. package/build/features/connectExpress/screens/CivilID/index.d.ts +3 -0
  230. package/build/features/connectExpress/screens/CivilID/index.js +2 -0
  231. package/build/features/connectExpress/screens/CivilID/validation.d.ts +8 -0
  232. package/build/features/connectExpress/screens/CivilID/validation.js +4 -0
  233. package/build/features/connectExpress/screens/CivilIDMissed/CivilID.d.ts +5 -0
  234. package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +53 -0
  235. package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.d.ts +7 -0
  236. package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.js +55 -0
  237. package/build/features/connectExpress/screens/CivilIDMissed/index.d.ts +3 -0
  238. package/build/features/connectExpress/screens/CivilIDMissed/index.js +2 -0
  239. package/build/features/connectExpress/screens/CivilIDMissed/validation.d.ts +8 -0
  240. package/build/features/connectExpress/screens/CivilIDMissed/validation.js +4 -0
  241. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.d.ts +8 -0
  242. package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +142 -0
  243. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.d.ts +5 -0
  244. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +80 -0
  245. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.d.ts +8 -0
  246. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +144 -0
  247. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.d.ts +7 -0
  248. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +52 -0
  249. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +34 -0
  250. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.js +94 -0
  251. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +6 -0
  252. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +83 -0
  253. package/build/features/connectExpress/screens/CollectBusinessInfo/index.d.ts +3 -0
  254. package/build/features/connectExpress/screens/CollectBusinessInfo/index.js +2 -0
  255. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +27 -0
  256. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +155 -0
  257. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.d.ts +5 -0
  258. package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +89 -0
  259. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.d.ts +8 -0
  260. package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +113 -0
  261. package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.d.ts +10 -0
  262. package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +149 -0
  263. package/build/features/connectExpress/screens/CollectIndividualInfo/Name.d.ts +6 -0
  264. package/build/features/connectExpress/screens/CollectIndividualInfo/Name.js +45 -0
  265. package/build/features/connectExpress/screens/CollectIndividualInfo/index.d.ts +3 -0
  266. package/build/features/connectExpress/screens/CollectIndividualInfo/index.js +2 -0
  267. package/build/features/connectExpress/screens/CollectIndividualInfo/validation.d.ts +14 -0
  268. package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +31 -0
  269. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.d.ts +5 -0
  270. package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +14 -0
  271. package/build/features/connectExpress/screens/CreateAccountLoader/index.d.ts +2 -0
  272. package/build/features/connectExpress/screens/CreateAccountLoader/index.js +2 -0
  273. package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTP.d.ts +0 -0
  274. package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTP.js +23 -12
  275. package/build/features/connectExpress/screens/IdentityOTP/OTPInput.d.ts +5 -0
  276. package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTPInput.js +9 -8
  277. package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/index.d.ts +0 -0
  278. package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/index.js +0 -0
  279. package/build/features/connectExpress/screens/IdentityOTP/validation.d.ts +8 -0
  280. package/build/features/connectExpress/screens/IdentityOTP/validation.js +4 -0
  281. package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.d.ts +5 -0
  282. package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.js +34 -0
  283. package/build/features/connectExpress/screens/IdentityVerifyPACI/index.d.ts +3 -0
  284. package/build/features/connectExpress/screens/IdentityVerifyPACI/index.js +2 -0
  285. package/build/features/connectExpress/screens/Mobile/Mobile.d.ts +5 -0
  286. package/build/features/connectExpress/screens/Mobile/Mobile.js +110 -0
  287. package/build/features/connectExpress/screens/Mobile/MobileNumber.d.ts +12 -0
  288. package/build/features/connectExpress/screens/Mobile/MobileNumber.js +151 -0
  289. package/build/features/connectExpress/screens/Mobile/TAC.d.ts +6 -0
  290. package/build/features/connectExpress/screens/Mobile/TAC.js +83 -0
  291. package/build/features/connectExpress/screens/Mobile/Title.d.ts +8 -0
  292. package/build/features/connectExpress/screens/Mobile/Title.js +29 -0
  293. package/build/features/connectExpress/screens/Mobile/index.d.ts +3 -0
  294. package/build/features/connectExpress/screens/Mobile/index.js +2 -0
  295. package/build/features/connectExpress/screens/Mobile/validation.d.ts +8 -0
  296. package/build/features/connectExpress/screens/Mobile/validation.js +60 -0
  297. package/build/features/{auth → connectExpress}/screens/NID/DOB.d.ts +1 -2
  298. package/build/features/{auth → connectExpress}/screens/NID/DOB.js +9 -9
  299. package/build/features/{auth → connectExpress}/screens/NID/IDNumber.d.ts +4 -1
  300. package/build/features/{auth → connectExpress}/screens/NID/IDNumber.js +14 -17
  301. package/build/features/{auth → connectExpress}/screens/NID/NID.d.ts +0 -0
  302. package/build/features/connectExpress/screens/NID/NID.js +92 -0
  303. package/build/features/connectExpress/screens/NID/TAC.d.ts +6 -0
  304. package/build/features/connectExpress/screens/NID/TAC.js +83 -0
  305. package/build/features/{auth → connectExpress}/screens/NID/index.d.ts +0 -0
  306. package/build/features/{auth → connectExpress}/screens/NID/index.js +0 -0
  307. package/build/features/connectExpress/screens/NID/validation.d.ts +11 -0
  308. package/build/features/connectExpress/screens/NID/validation.js +22 -0
  309. package/build/features/connectExpress/screens/NIDMissed/DOB.d.ts +6 -0
  310. package/build/features/connectExpress/screens/NIDMissed/DOB.js +47 -0
  311. package/build/features/connectExpress/screens/NIDMissed/IDNumber.d.ts +6 -0
  312. package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +56 -0
  313. package/build/features/connectExpress/screens/NIDMissed/NID.d.ts +5 -0
  314. package/build/features/{auth/screens/NID → connectExpress/screens/NIDMissed}/NID.js +14 -23
  315. package/build/features/connectExpress/screens/NIDMissed/index.d.ts +3 -0
  316. package/build/features/connectExpress/screens/NIDMissed/index.js +2 -0
  317. package/build/features/connectExpress/screens/NIDMissed/validation.d.ts +11 -0
  318. package/build/features/connectExpress/screens/NIDMissed/validation.js +9 -0
  319. package/build/features/{auth/screens/NID/TAC.d.ts → connectExpress/screens/OTP/OTP.d.ts} +2 -0
  320. package/build/features/connectExpress/screens/OTP/OTP.js +88 -0
  321. package/build/features/connectExpress/screens/OTP/OTPInput.d.ts +5 -0
  322. package/build/features/connectExpress/screens/OTP/OTPInput.js +55 -0
  323. package/build/features/connectExpress/screens/OTP/index.d.ts +3 -0
  324. package/build/features/connectExpress/screens/OTP/index.js +2 -0
  325. package/build/features/connectExpress/screens/OTP/validation.d.ts +8 -0
  326. package/build/features/connectExpress/screens/OTP/validation.js +4 -0
  327. package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  328. package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +32 -0
  329. package/build/features/connectExpress/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  330. package/build/features/connectExpress/screens/SuccessWithFlowButtons/index.js +2 -0
  331. package/build/features/connectExpress/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  332. package/build/features/connectExpress/screens/VerifyPACI/VerifyPACI.js +34 -0
  333. package/build/features/connectExpress/screens/VerifyPACI/index.d.ts +3 -0
  334. package/build/features/connectExpress/screens/VerifyPACI/index.js +2 -0
  335. package/build/features/entity/Entity.d.ts +5 -3
  336. package/build/features/entity/Entity.js +39 -37
  337. package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +90 -0
  338. package/build/features/entity/screens/EntityCapital/ActivityList.js +175 -0
  339. package/build/features/entity/screens/EntityCapital/CapitalPaid.d.ts +5 -0
  340. package/build/features/entity/screens/EntityCapital/CapitalPaid.js +47 -0
  341. package/build/features/entity/screens/EntityCapital/CapitalShareCount.d.ts +5 -0
  342. package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +42 -0
  343. package/build/features/entity/screens/EntityCapital/CapitalShareValue.d.ts +5 -0
  344. package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +47 -0
  345. package/build/features/entity/screens/EntityCapital/EntityCapital.d.ts +5 -0
  346. package/build/features/entity/screens/EntityCapital/EntityCapital.js +75 -0
  347. package/build/features/entity/screens/EntityCapital/index.d.ts +2 -0
  348. package/build/features/entity/screens/EntityCapital/index.js +2 -0
  349. package/build/features/entity/screens/EntityCapital/validation.d.ts +62 -0
  350. package/build/features/entity/screens/EntityCapital/validation.js +21 -0
  351. package/build/features/entity/screens/EntityName/Article.d.ts +6 -0
  352. package/build/features/entity/screens/EntityName/Article.js +87 -0
  353. package/build/features/entity/screens/EntityName/EntityName.d.ts +5 -0
  354. package/build/features/entity/screens/EntityName/EntityName.js +93 -0
  355. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +90 -0
  356. package/build/features/entity/screens/EntityName/EntityTypeList.js +151 -0
  357. package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +19 -0
  358. package/build/features/entity/screens/EntityName/ExpiryDate.js +46 -0
  359. package/build/features/entity/screens/EntityName/IssuingDate.d.ts +19 -0
  360. package/build/features/entity/screens/EntityName/IssuingDate.js +46 -0
  361. package/build/features/entity/screens/EntityName/LegalName.d.ts +5 -0
  362. package/build/features/entity/screens/EntityName/LegalName.js +48 -0
  363. package/build/features/entity/screens/EntityName/LicenseCertificate.d.ts +6 -0
  364. package/build/features/entity/screens/EntityName/LicenseCertificate.js +42 -0
  365. package/build/features/entity/screens/{EntityInfoConfirm → EntityName}/LicenseNumber.d.ts +0 -0
  366. package/build/features/entity/screens/{EntityInfoConfirm → EntityName}/LicenseNumber.js +12 -18
  367. package/build/features/entity/screens/EntityName/UnifiedNumber.d.ts +6 -0
  368. package/build/features/entity/screens/EntityName/UnifiedNumber.js +43 -0
  369. package/build/features/entity/screens/EntityName/index.d.ts +2 -0
  370. package/build/features/entity/screens/EntityName/index.js +2 -0
  371. package/build/features/entity/screens/EntityName/validation.d.ts +60 -0
  372. package/build/features/entity/screens/EntityName/validation.js +116 -0
  373. package/build/features/entity/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  374. package/build/features/entity/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  375. package/build/features/entity/screens/PrepareDataLoading/index.d.ts +2 -0
  376. package/build/features/entity/screens/PrepareDataLoading/index.js +2 -0
  377. package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -2
  378. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -94
  379. package/build/features/featuresScreens.d.ts +2 -1
  380. package/build/features/featuresScreens.js +128 -14
  381. package/build/features/individual/Individual.d.ts +5 -3
  382. package/build/features/individual/Individual.js +39 -37
  383. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +20 -18
  384. package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.d.ts +3 -0
  385. package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +30 -0
  386. package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +5 -1
  387. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +7 -1
  388. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +3 -3
  389. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +28 -0
  390. package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +24 -1
  391. package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.d.ts +6 -0
  392. package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.js +42 -0
  393. package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +6 -0
  394. package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +2 -0
  395. package/build/features/individual/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  396. package/build/features/individual/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  397. package/build/features/individual/screens/PrepareDataLoading/index.d.ts +2 -0
  398. package/build/features/individual/screens/PrepareDataLoading/index.js +2 -0
  399. package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -2
  400. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -97
  401. package/build/features/password/Password.d.ts +5 -3
  402. package/build/features/password/Password.js +9 -14
  403. package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -2
  404. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -97
  405. package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +1 -1
  406. package/build/features/shared/Address/Address.d.ts +11 -0
  407. package/build/features/shared/Address/Address.js +63 -0
  408. package/build/features/shared/Address/CountryList.d.ts +72 -0
  409. package/build/features/shared/Address/CountryList.js +89 -0
  410. package/build/features/shared/Address/InputSelect.d.ts +71 -0
  411. package/build/features/shared/Address/InputSelect.js +172 -0
  412. package/build/features/shared/Address/InputText.d.ts +11 -0
  413. package/build/features/shared/Address/InputText.js +12 -0
  414. package/build/features/shared/Address/index.d.ts +2 -0
  415. package/build/features/shared/Address/index.js +2 -0
  416. package/build/features/shared/Background/Background.js +1 -5
  417. package/build/features/shared/Button/Button.js +2 -3
  418. package/build/features/shared/Button/EmailProvidersButtons.d.ts +1 -1
  419. package/build/features/shared/Button/FlowsButtons.d.ts +3 -1
  420. package/build/features/shared/Button/FlowsButtons.js +39 -7
  421. package/build/features/shared/Containers/FeatureContainer.d.ts +1 -1
  422. package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
  423. package/build/features/shared/CreateAccountLoading/CreateAccountLoading.d.ts +6 -0
  424. package/build/features/shared/CreateAccountLoading/CreateAccountLoading.js +58 -0
  425. package/build/features/shared/CreateAccountLoading/index.d.ts +2 -0
  426. package/build/features/shared/CreateAccountLoading/index.js +2 -0
  427. package/build/features/shared/DataLoading/DataLoading.d.ts +6 -0
  428. package/build/features/shared/DataLoading/DataLoading.js +58 -0
  429. package/build/features/shared/DataLoading/index.d.ts +2 -0
  430. package/build/features/shared/DataLoading/index.js +2 -0
  431. package/build/features/shared/Footer/Footer.js +1 -1
  432. package/build/features/shared/GenericError/GenericError.d.ts +7 -0
  433. package/build/features/shared/GenericError/GenericError.js +55 -0
  434. package/build/features/shared/GenericError/index.d.ts +2 -0
  435. package/build/features/shared/GenericError/index.js +2 -0
  436. package/build/features/shared/Input/Input.d.ts +9 -7
  437. package/build/features/shared/Input/Input.js +2 -2
  438. package/build/features/shared/PaciVerification/PaciVerification.d.ts +12 -0
  439. package/build/features/shared/PaciVerification/PaciVerification.js +91 -0
  440. package/build/features/{connect/screens/VerifyPACI → shared/PaciVerification}/VerifyPACILoading.d.ts +1 -0
  441. package/build/features/shared/PaciVerification/VerifyPACILoading.js +27 -0
  442. package/build/features/{business/screens/VerifyPACI → shared/PaciVerification}/VerifyPACISuccess.d.ts +0 -0
  443. package/build/features/{business/screens/VerifyPACI → shared/PaciVerification}/VerifyPACISuccess.js +1 -1
  444. package/build/features/shared/PaciVerification/index.d.ts +2 -0
  445. package/build/features/shared/PaciVerification/index.js +2 -0
  446. package/build/features/shared/SalesChannels/SaleChannelIconsInput.d.ts +11 -0
  447. package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +100 -0
  448. package/build/features/shared/SalesChannels/SalesChannel.d.ts +11 -0
  449. package/build/features/shared/SalesChannels/SalesChannel.js +149 -0
  450. package/build/features/shared/SalesChannels/index.d.ts +2 -0
  451. package/build/features/shared/SalesChannels/index.js +2 -0
  452. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +16 -0
  453. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +113 -0
  454. package/build/features/shared/SuccessFlowButtons/index.d.ts +2 -0
  455. package/build/features/shared/SuccessFlowButtons/index.js +2 -0
  456. package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +1 -1
  457. package/build/features/shared/UploadFile/UploadFile.d.ts +5 -4
  458. package/build/features/shared/UploadFile/UploadFile.js +13 -13
  459. package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +38 -0
  460. package/build/features/shared/UploadMultipleFile/UploadFile.js +184 -0
  461. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +27 -0
  462. package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +149 -0
  463. package/build/features/shared/UploadMultipleFile/index.d.ts +2 -0
  464. package/build/features/shared/UploadMultipleFile/index.js +2 -0
  465. package/build/features/signIn/SignIn.d.ts +4 -3
  466. package/build/features/signIn/SignIn.js +9 -15
  467. package/build/features/tax/Tax.d.ts +5 -3
  468. package/build/features/tax/Tax.js +39 -38
  469. package/build/features/tax/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
  470. package/build/features/tax/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
  471. package/build/features/tax/screens/PrepareDataLoading/index.d.ts +2 -0
  472. package/build/features/tax/screens/PrepareDataLoading/index.js +2 -0
  473. package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -2
  474. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -97
  475. package/build/features/tax/screens/TaxDetails/TaxDetails.js +21 -23
  476. package/build/features/tax/screens/TaxDetails/TaxDocument.d.ts +6 -0
  477. package/build/features/tax/screens/TaxDetails/TaxDocument.js +42 -0
  478. package/build/features/tax/screens/TaxDetails/VATId.js +7 -2
  479. package/build/features/tax/screens/TaxDetails/validation.d.ts +3 -0
  480. package/build/features/tax/screens/TaxDetails/validation.js +2 -1
  481. package/build/hooks/index.d.ts +3 -0
  482. package/build/hooks/index.js +3 -0
  483. package/build/hooks/useAppConfig.d.ts +3 -1
  484. package/build/hooks/useAppConfig.js +6 -4
  485. package/build/hooks/useAppDispatch.d.ts +2 -1
  486. package/build/hooks/useCountUp.d.ts +9 -0
  487. package/build/hooks/useCountUp.js +17 -0
  488. package/build/hooks/useCountry.d.ts +4 -0
  489. package/build/hooks/useCountry.js +7 -0
  490. package/build/hooks/useSetFromDefaultValues.js +4 -2
  491. package/build/hooks/useVerifyToken.d.ts +15 -0
  492. package/build/hooks/useVerifyToken.js +25 -0
  493. package/build/index.d.ts +12 -11
  494. package/build/index.js +13 -21
  495. package/build/theme/typography.js +1 -1
  496. package/build/utils/array.d.ts +4 -1
  497. package/build/utils/array.js +24 -3
  498. package/build/utils/common.d.ts +1 -1
  499. package/build/utils/common.js +1 -0
  500. package/build/utils/date.d.ts +1 -0
  501. package/build/utils/date.js +5 -0
  502. package/build/utils/html.d.ts +0 -1
  503. package/build/utils/html.js +2 -10
  504. package/build/utils/index.d.ts +1 -0
  505. package/build/utils/index.js +1 -0
  506. package/build/utils/string.d.ts +2 -0
  507. package/build/utils/string.js +23 -2
  508. package/package.json +1 -1
  509. package/build/api/ip.d.ts +0 -4
  510. package/build/api/ip.js +0 -12
  511. package/build/features/app/auth/authStore.d.ts +0 -46
  512. package/build/features/app/auth/authStore.js +0 -261
  513. package/build/features/auth/Auth.d.ts +0 -10
  514. package/build/features/auth/Auth.js +0 -87
  515. package/build/features/auth/index.d.ts +0 -1
  516. package/build/features/auth/index.js +0 -1
  517. package/build/features/auth/screens/NID/validation.d.ts +0 -27
  518. package/build/features/auth/screens/NID/validation.js +0 -19
  519. package/build/features/business/screens/VerifyPACI/VerifyPACILoading.d.ts +0 -6
  520. package/build/features/business/screens/VerifyPACI/VerifyPACILoading.js +0 -23
  521. package/build/features/connect/screens/Merchant/SocialMedia.d.ts +0 -6
  522. package/build/features/connect/screens/Merchant/SocialMedia.js +0 -182
  523. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.js +0 -23
  524. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.d.ts +0 -5
  525. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.js +0 -8
  526. package/build/features/entity/screens/Customers/CustomerLocations.d.ts +0 -118
  527. package/build/features/entity/screens/Customers/Customers.d.ts +0 -5
  528. package/build/features/entity/screens/Customers/Customers.js +0 -90
  529. package/build/features/entity/screens/Customers/RefundPolicy.d.ts +0 -36
  530. package/build/features/entity/screens/Customers/index.d.ts +0 -3
  531. package/build/features/entity/screens/Customers/index.js +0 -2
  532. package/build/features/entity/screens/Customers/validation.d.ts +0 -20
  533. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.d.ts +0 -55
  534. package/build/features/entity/screens/EntityInfoConfirm/Article.d.ts +0 -3
  535. package/build/features/entity/screens/EntityInfoConfirm/Article.js +0 -73
  536. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.d.ts +0 -5
  537. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +0 -84
  538. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.d.ts +0 -5
  539. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +0 -32
  540. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.d.ts +0 -6
  541. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +0 -33
  542. package/build/features/entity/screens/EntityInfoConfirm/index.d.ts +0 -2
  543. package/build/features/entity/screens/EntityInfoConfirm/index.js +0 -2
  544. package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +0 -141
  545. package/build/features/entity/screens/EntityInfoConfirm/validation.js +0 -83
@@ -24,7 +24,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
24
24
  function verb(n) { return function (v) { return step([n, v]); }; }
25
25
  function step(op) {
26
26
  if (f) throw new TypeError("Generator is already executing.");
27
- while (_) try {
27
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
28
28
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
29
  if (y = 0, t) op = [op[0] & 2, t.value];
30
30
  switch (op[0]) {
@@ -56,17 +56,16 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
56
56
  };
57
57
  var _a;
58
58
  import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
59
- import moment from 'moment';
60
59
  import API from '../../../api';
61
60
  import { BusinessType, FlowsTypes } from '../../../@types';
62
- import { BUSINESS_FLOW_SUCCESS, BUSINESS_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_FL_LICENSE } from '../../../constants';
63
- import { convertNumbers2English, getEighteenYearsAgo, hasKey, sleep, isKW, isSA } from '../../../utils';
61
+ import { BUSINESS_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_FL_LICENSE } from '../../../constants';
62
+ import { convertNumbers2English, getEighteenYearsAgo, hasKey, sleep, isKW, isSA, dateFormat } from '../../../utils';
64
63
  import { handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
65
64
  export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
66
- var payload, data, leadResponse, brandInfo, boardResponse, countryIso2, steps, brandID, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted, entity_activities, data_1, board_id, board_info_id;
67
- var _a, _b, _c, _d, _e, _f, _g;
68
- return __generator(this, function (_h) {
69
- switch (_h.label) {
65
+ var payload, data, countryIso2, boardData, brandData, leadData, entity_activities, steps, brand, board_id, brandID, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted, activityList;
66
+ var _a;
67
+ return __generator(this, function (_b) {
68
+ switch (_b.label) {
70
69
  case 0:
71
70
  payload = {
72
71
  service_name: 'tap_email',
@@ -74,58 +73,53 @@ export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', functio
74
73
  };
75
74
  return [4, API.leadService.verifyLeadToken(payload)];
76
75
  case 1:
77
- data = (_h.sent()).data;
78
- leadResponse = undefined;
79
- brandInfo = undefined;
80
- boardResponse = undefined;
81
- countryIso2 = undefined;
82
- if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 18];
83
- if (data === null || data === void 0 ? void 0 : data.country_code) {
84
- countryIso2 = data === null || data === void 0 ? void 0 : data.country_code;
76
+ data = (_b.sent()).data;
77
+ if ((_a = data.errors) === null || _a === void 0 ? void 0 : _a.length)
78
+ throw new Error(data.errors[0].description);
79
+ if (data.mw_error)
80
+ throw new Error(data.mw_error);
81
+ countryIso2 = data === null || data === void 0 ? void 0 : data.country_code;
82
+ if (countryIso2)
85
83
  thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
86
- }
87
- if (!(data.step_name !== BUSINESS_STEP_NAMES.PHONE_AUTH)) return [3, 18];
84
+ if (!(data.step_name !== BUSINESS_STEP_NAMES.PHONE_AUTH)) return [3, 19];
85
+ boardData = undefined;
86
+ brandData = undefined;
88
87
  return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
89
88
  case 2:
90
- leadResponse = _h.sent();
91
- if (!countryIso2) {
92
- countryIso2 = (_a = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _a === void 0 ? void 0 : _a.country_code;
93
- if (countryIso2)
94
- thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
95
- }
89
+ leadData = (_b.sent()).data;
90
+ countryIso2 = leadData === null || leadData === void 0 ? void 0 : leadData.country_code;
91
+ if (!countryIso2)
92
+ thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
96
93
  if (data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH && isKW(countryIso2)) {
97
94
  thunkApi.dispatch(handleNextScreenStep('BUSINESS_CIVIL_ID_STEP'));
98
95
  }
99
96
  if (data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH && !isKW(countryIso2)) {
100
97
  thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
101
98
  }
102
- if (!(data.step_name === 'business_info')) return [3, 18];
103
- steps = (_b = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _b === void 0 ? void 0 : _b.steps;
104
- brandID = (_d = (_c = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _c === void 0 ? void 0 : _c.brand) === null || _d === void 0 ? void 0 : _d.id;
99
+ if (!(data.step_name === BUSINESS_STEP_NAMES.BUSINESS_INFO)) return [3, 18];
100
+ entity_activities = leadData.entity_activities, steps = leadData.steps, brand = leadData.brand, board_id = leadData.board_id;
101
+ brandID = brand === null || brand === void 0 ? void 0 : brand.id;
105
102
  hasBusinessCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_SUCCESS);
106
- hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO) &&
107
- hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM);
103
+ hasBusinessCRInfoCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_INFO) && hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM);
108
104
  hasBusinessCRActivitiesCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CR_ACTIVITIES);
109
105
  hasBusinessCustomersCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS);
110
- entity_activities = leadResponse.data.entity_activities;
111
- if (!(!entity_activities && hasBusinessCRInfoCompleted)) return [3, 4];
106
+ if (!(!entity_activities && hasBusinessCRInfoCompleted && !hasBusinessCompleted)) return [3, 4];
112
107
  return [4, API.dataService.getActivities()];
113
108
  case 3:
114
- data_1 = _h.sent();
115
- leadResponse.data = __assign(__assign({}, leadResponse.data), { entity_activities: data_1.list });
116
- _h.label = 4;
109
+ activityList = (_b.sent()).list;
110
+ leadData = __assign(__assign({}, leadData), { entity_activities: activityList });
111
+ _b.label = 4;
117
112
  case 4:
118
113
  if (!hasBusinessCompleted) return [3, 8];
119
- board_id = (_e = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _e === void 0 ? void 0 : _e.board_id;
120
- board_info_id = (_f = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _f === void 0 ? void 0 : _f.board_info_id;
121
- if (!(!!board_id && !!board_info_id)) return [3, 6];
122
- return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
114
+ if (!board_id) return [3, 7];
115
+ return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
123
116
  case 5:
124
- boardResponse = _h.sent();
125
- _h.label = 6;
126
- case 6: return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
117
+ boardData = _b.sent();
118
+ return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
119
+ case 6:
120
+ _b.sent();
121
+ _b.label = 7;
127
122
  case 7:
128
- _h.sent();
129
123
  thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
130
124
  return [3, 18];
131
125
  case 8:
@@ -140,35 +134,36 @@ export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', functio
140
134
  if (!hasBusinessCRActivitiesCompleted) return [3, 13];
141
135
  return [4, thunkApi.dispatch(retrieveDataList())];
142
136
  case 11:
143
- _h.sent();
137
+ _b.sent();
144
138
  thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP'));
145
139
  return [4, API.brandService.retrieveBrand(brandID)];
146
140
  case 12:
147
- brandInfo = _h.sent();
141
+ brandData = _b.sent();
148
142
  return [3, 18];
149
143
  case 13:
150
144
  if (!hasBusinessCRInfoCompleted) return [3, 15];
151
145
  return [4, API.brandService.retrieveBrand(brandID)];
152
146
  case 14:
153
- brandInfo = _h.sent();
147
+ brandData = _b.sent();
154
148
  thunkApi.dispatch(handleNextScreenStep('BUSINESS_ACTIVITIES_STEP'));
155
149
  return [3, 18];
156
150
  case 15:
157
151
  if (!isSA(countryIso2)) return [3, 17];
158
152
  return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id }))];
159
153
  case 16:
160
- _h.sent();
161
- _h.label = 17;
154
+ _b.sent();
155
+ _b.label = 17;
162
156
  case 17:
163
157
  thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
164
- _h.label = 18;
158
+ _b.label = 18;
165
159
  case 18: return [2, {
166
160
  data: data,
167
- leadData: __assign(__assign({}, leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data), { flows: BUSINESS_FLOW_SUCCESS.concat((boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.info) || []) }),
161
+ leadData: __assign(__assign({}, leadData), { flows: (boardData === null || boardData === void 0 ? void 0 : boardData.info) || [] }),
168
162
  token: token,
169
- brandInfo: brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.brand,
170
- boardId: (_g = leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) === null || _g === void 0 ? void 0 : _g.board_id
163
+ brandData: brandData,
164
+ boardId: leadData === null || leadData === void 0 ? void 0 : leadData.board_id
171
165
  }];
166
+ case 19: return [2, { data: data, isRequireOTP: true }];
172
167
  }
173
168
  });
174
169
  }); });
@@ -190,8 +185,8 @@ export var resendOTP = createAsyncThunk('resendOTPBusiness', function (params, t
190
185
  });
191
186
  }); });
192
187
  export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
193
- var _a, business, settings, isNID, responseBody, stepName, payload, data, brandInfo, leadResponse, _b, brand, country_code, steps, board_id, board_info_id, brandID, countryIso2, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted, isIdentityAuthStep, entity_activities, data_2, boardResponse;
194
- var _c, _d, _e, _f, _g, _h;
188
+ var _a, business, settings, isNID, responseBody, stepName, payload, data, brandData, leadData, brand, country_code, steps, board_id, brandID, countryIso2, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted, isIdentityAuthStep, entity_activities, activityList, boardResponse;
189
+ var _b, _c, _d, _e, _f, _g, _h;
195
190
  return __generator(this, function (_j) {
196
191
  switch (_j.label) {
197
192
  case 0:
@@ -201,22 +196,22 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
201
196
  stepName = isNID ? BUSINESS_STEP_NAMES.IDENTITY_VERIFY_AUTH : BUSINESS_STEP_NAMES.PHONE_AUTH;
202
197
  payload = {
203
198
  data: params.otp,
204
- service_name: ((_d = (_c = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_token) === null || _c === void 0 ? void 0 : _c.verification_by) === null || _d === void 0 ? void 0 : _d.service_name) || ((_e = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _e === void 0 ? void 0 : _e.service_name),
205
- verify_token: ((_f = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_token) === null || _f === void 0 ? void 0 : _f.verify_token) || (responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token),
199
+ service_name: ((_c = (_b = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_token) === null || _b === void 0 ? void 0 : _b.verification_by) === null || _c === void 0 ? void 0 : _c.service_name) || ((_d = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _d === void 0 ? void 0 : _d.service_name),
200
+ verify_token: ((_e = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_token) === null || _e === void 0 ? void 0 : _e.verify_token) || (responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token),
206
201
  step_name: stepName,
207
202
  encryption_contract: ['data']
208
203
  };
209
204
  return [4, API.leadService.verifyLeadOTP(payload)];
210
205
  case 1:
211
206
  data = (_j.sent()).data;
212
- brandInfo = undefined;
213
- leadResponse = undefined;
214
- if (!!data.errors) return [3, 20];
207
+ if ((_f = data.errors) === null || _f === void 0 ? void 0 : _f.length)
208
+ throw new Error(data.errors[0].description);
209
+ brandData = undefined;
215
210
  return [4, API.leadService.retrieveLead(data === null || data === void 0 ? void 0 : data.id)];
216
211
  case 2:
217
- leadResponse = _j.sent();
212
+ leadData = (_j.sent()).data;
218
213
  thunkApi.dispatch(updateStepName(stepName));
219
- _b = (leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) || {}, brand = _b.brand, country_code = _b.country_code, steps = _b.steps, board_id = _b.board_id, board_info_id = _b.board_info_id;
214
+ brand = leadData.brand, country_code = leadData.country_code, steps = leadData.steps, board_id = leadData.board_id;
220
215
  brandID = brand === null || brand === void 0 ? void 0 : brand.id;
221
216
  countryIso2 = country_code;
222
217
  if (countryIso2)
@@ -233,12 +228,12 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
233
228
  _j.sent();
234
229
  _j.label = 4;
235
230
  case 4:
236
- entity_activities = ((leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data) || {}).entity_activities;
237
- if (!(!entity_activities && hasBusinessCRInfoCompleted)) return [3, 6];
231
+ entity_activities = leadData.entity_activities;
232
+ if (!(!entity_activities && hasBusinessCRInfoCompleted && !hasBusinessCompleted)) return [3, 6];
238
233
  return [4, API.dataService.getActivities()];
239
234
  case 5:
240
- data_2 = _j.sent();
241
- leadResponse.data = __assign(__assign({}, leadResponse.data), { entity_activities: data_2.list });
235
+ activityList = (_j.sent()).list;
236
+ leadData = __assign(__assign({}, leadData), { entity_activities: activityList });
242
237
  _j.label = 6;
243
238
  case 6:
244
239
  if (!isNID) return [3, 7];
@@ -250,15 +245,16 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
250
245
  return [3, 20];
251
246
  case 8:
252
247
  if (!hasBusinessCompleted) return [3, 12];
253
- if (!(!!board_id && !!board_info_id)) return [3, 10];
254
- return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
248
+ if (!board_id) return [3, 11];
249
+ return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
255
250
  case 9:
256
251
  boardResponse = _j.sent();
257
- leadResponse.data = __assign(__assign({}, leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data), { flows: BUSINESS_FLOW_SUCCESS.concat((boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.info) || []) });
258
- _j.label = 10;
259
- case 10: return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
260
- case 11:
252
+ leadData = __assign(__assign({}, leadData), { flows: (boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.info) || [] });
253
+ return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
254
+ case 10:
261
255
  _j.sent();
256
+ _j.label = 11;
257
+ case 11:
262
258
  thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
263
259
  return [3, 20];
264
260
  case 12:
@@ -277,19 +273,19 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
277
273
  thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP'));
278
274
  return [4, API.brandService.retrieveBrand(brandID)];
279
275
  case 16:
280
- brandInfo = _j.sent();
276
+ brandData = _j.sent();
281
277
  return [3, 20];
282
278
  case 17:
283
279
  if (!hasBusinessCRInfoCompleted) return [3, 19];
284
280
  return [4, API.brandService.retrieveBrand(brandID)];
285
281
  case 18:
286
- brandInfo = _j.sent();
282
+ brandData = _j.sent();
287
283
  thunkApi.dispatch(handleNextScreenStep('BUSINESS_ACTIVITIES_STEP'));
288
284
  return [3, 20];
289
285
  case 19:
290
286
  thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
291
287
  _j.label = 20;
292
- case 20: return [2, { data: data, formData: __assign(__assign({}, params), { isNID: isNID }), brandInfo: brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.brand, leadData: leadResponse === null || leadResponse === void 0 ? void 0 : leadResponse.data }];
288
+ case 20: return [2, { data: data, formData: __assign(__assign({}, params), { isNID: isNID }), brand: brandData === null || brandData === void 0 ? void 0 : brandData.brand, leadData: leadData }];
293
289
  }
294
290
  });
295
291
  }); });
@@ -317,7 +313,8 @@ export var verifyPACI = createAsyncThunk('businessVerifyPACI', function (params,
317
313
  isSuccess = ((_b = data.status) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'success';
318
314
  if (!isSuccess) return [3, 4];
319
315
  (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, {});
320
- return [4, ((_e = params === null || params === void 0 ? void 0 : params.onSuccess) === null || _e === void 0 ? void 0 : _e.call(params))];
316
+ (_e = params === null || params === void 0 ? void 0 : params.onSuccess) === null || _e === void 0 ? void 0 : _e.call(params);
317
+ return [4, sleep(3000)];
321
318
  case 3:
322
319
  _f.sent();
323
320
  thunkApi.dispatch(handleNextScreenStep());
@@ -380,12 +377,7 @@ export var updateLeadIdentity = createAsyncThunk('updateLeadIdentity', function
380
377
  },
381
378
  date_of_birth: params.dob,
382
379
  step_name: stepName,
383
- encryption_contract: [
384
- 'identification.issued_country_code',
385
- 'identification.id',
386
- 'identification.type',
387
- 'date_of_birth'
388
- ]
380
+ encryption_contract: ['identification.issued_country_code', 'identification.id', 'identification.type', 'date_of_birth']
389
381
  };
390
382
  return [4, API.leadService.updateLead(requestBody)];
391
383
  case 1:
@@ -414,12 +406,7 @@ export var resendOTPLeadIdentity = createAsyncThunk('resendOTPLeadIdentity', fun
414
406
  },
415
407
  date_of_birth: dob,
416
408
  step_name: stepName,
417
- encryption_contract: [
418
- 'identification.issued_country_code',
419
- 'identification.id',
420
- 'identification.type',
421
- 'date_of_birth'
422
- ]
409
+ encryption_contract: ['identification.issued_country_code', 'identification.id', 'identification.type', 'date_of_birth']
423
410
  };
424
411
  return [4, API.leadService.updateLead(requestBody)];
425
412
  case 1:
@@ -454,19 +441,21 @@ export var retrieveBoardDetails = createAsyncThunk('retrieveBoardDetails', funct
454
441
  });
455
442
  }); });
456
443
  export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
457
- var _a, settings, business, payload, data, entity_activities, list, accountBody, accountData, documentData, documentBody;
444
+ var _a, settings, business, isNonSA, isFL, payload, data, entity_activities, list, accountBody, accountData, documentData, entityData, entityId, articleId, documentBody, payload_1;
458
445
  var _b, _c, _d, _e, _f, _g;
459
446
  return __generator(this, function (_h) {
460
447
  switch (_h.label) {
461
448
  case 0:
462
449
  _a = thunkApi.getState(), settings = _a.settings, business = _a.business;
450
+ isNonSA = !isSA(settings.data.businessCountry.iso2);
451
+ isFL = ((_b = params.selectedLicense) === null || _b === void 0 ? void 0 : _b.type) === BusinessType.FL;
463
452
  payload = {
464
- id: ((_b = business.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.lead_id) || '',
465
- license_number: params.licenseNumber,
466
- license_type: ((_c = params.selectedLicense) === null || _c === void 0 ? void 0 : _c.type) === BusinessType.FL ? 'freelance' : 'commercial_registration',
453
+ id: ((_c = business.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.lead_id) || '',
454
+ license_number: isNonSA && isFL ? '' : params.licenseNumber,
455
+ license_type: isFL ? 'freelance' : 'commercial_registration',
467
456
  business_type: (_d = params.selectedLicense) === null || _d === void 0 ? void 0 : _d.type,
468
457
  step_name: BUSINESS_STEP_NAMES.BUSINESS_CR_INFO,
469
- business: { ar: params.entityLegalName, en: params.entityLegalName },
458
+ business: isNonSA && isFL ? undefined : { ar: params.entityLegalName, en: params.entityLegalName },
470
459
  encryption_contract: ['license_number', 'business_type', 'license_type']
471
460
  };
472
461
  return [4, API.leadService.updateLead(payload)];
@@ -493,13 +482,15 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
493
482
  return [4, API.accountService.createAccount(accountBody)];
494
483
  case 4:
495
484
  accountData = _h.sent();
496
- documentData = undefined;
497
- if (!!!business.data.businessTypeData.certificateId) return [3, 6];
485
+ entityData = undefined;
486
+ entityId = accountData === null || accountData === void 0 ? void 0 : accountData.entity_id;
487
+ articleId = business.data.businessTypeData.articleId;
488
+ if (!((params.certificateId || []).length > 0)) return [3, 6];
498
489
  documentBody = {
499
- entity_id: (accountData === null || accountData === void 0 ? void 0 : accountData.entity_id) || '',
490
+ entity_id: entityId || '',
500
491
  documents: [
501
492
  {
502
- images: [business.data.businessTypeData.certificateId]
493
+ images: params.certificateId
503
494
  }
504
495
  ]
505
496
  };
@@ -508,32 +499,46 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
508
499
  documentData = _h.sent();
509
500
  _h.label = 6;
510
501
  case 6:
502
+ if (!(articleId && entityId)) return [3, 8];
503
+ payload_1 = {
504
+ id: (accountData === null || accountData === void 0 ? void 0 : accountData.entity_id) || '',
505
+ AOA_file_id: articleId
506
+ };
507
+ return [4, API.entityService.updateEntity(payload_1)];
508
+ case 7:
509
+ entityData = _h.sent();
510
+ _h.label = 8;
511
+ case 8:
511
512
  thunkApi.dispatch(handleNextScreenStep());
512
513
  (_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, params);
513
- return [2, { data: data, formData: params, accountData: accountData, documentData: documentData }];
514
+ return [2, { data: data, formData: params, accountData: accountData, documentData: documentData, entityData: entityData }];
514
515
  }
515
516
  });
516
517
  }); });
517
- export var uploadLicenseCertificate = createAsyncThunk('uploadLicenseCertificate', function (_a) {
518
+ export var uploadArticle = createAsyncThunk('businessUploadArticle', function (_a) {
518
519
  var file = _a.file, onProgress = _a.onProgress;
519
520
  return __awaiter(void 0, void 0, void 0, function () {
520
- var uploadPayload, onUploadProgress, data;
521
- return __generator(this, function (_b) {
522
- switch (_b.label) {
521
+ var typeArray, type, uploadPayload, onUploadProgress, data;
522
+ var _b;
523
+ return __generator(this, function (_c) {
524
+ switch (_c.label) {
523
525
  case 0:
526
+ typeArray = ((_b = file === null || file === void 0 ? void 0 : file.type) === null || _b === void 0 ? void 0 : _b.split('/')) || [];
527
+ type = typeArray[1] || '';
524
528
  uploadPayload = {
525
529
  file_link_create: true,
526
530
  title: file === null || file === void 0 ? void 0 : file.name,
527
- purpose: 'identity_document',
531
+ purpose: 'article_of_association',
532
+ type: type,
528
533
  file: file
529
534
  };
530
535
  onUploadProgress = function (progressEvent) {
531
536
  var progress = ((progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.loaded) / (progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.total)) * 100;
532
537
  onProgress === null || onProgress === void 0 ? void 0 : onProgress(Math.floor(progress));
533
538
  };
534
- return [4, API.entityService.uploadFileInfo(uploadPayload, { onUploadProgress: onUploadProgress })];
539
+ return [4, API.fileService.uploadFileInfo(uploadPayload, { onUploadProgress: onUploadProgress })];
535
540
  case 1:
536
- data = _b.sent();
541
+ data = _c.sent();
537
542
  return [2, { data: data }];
538
543
  }
539
544
  });
@@ -573,17 +578,18 @@ export var updateActivitiesInfo = createAsyncThunk('updateActivitiesInfo', funct
573
578
  });
574
579
  }); });
575
580
  export var retrieveDataList = createAsyncThunk('businessRetrieveDataList', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
576
- var settings, dataBody, salesDataBody, _a, customerBases, expectedSales, expectedCustomerSales;
581
+ var settings, countryISO2, dataBody, salesDataBody, _a, customerBases, expectedSales, expectedCustomerSales;
577
582
  return __generator(this, function (_b) {
578
583
  switch (_b.label) {
579
584
  case 0:
580
585
  settings = thunkApi.getState().settings;
586
+ countryISO2 = settings.data.businessCountry.iso2;
581
587
  dataBody = {
582
588
  page: 0
583
589
  };
584
590
  salesDataBody = {
585
591
  page: 0,
586
- country_code: [settings.data.businessCountry.iso2]
592
+ country_code: [countryISO2]
587
593
  };
588
594
  return [4, Promise.all([
589
595
  API.dataService.getCustomerBases(dataBody),
@@ -591,11 +597,12 @@ export var retrieveDataList = createAsyncThunk('businessRetrieveDataList', funct
591
597
  API.dataService.getExpectedCustomerSales(dataBody)
592
598
  ])];
593
599
  case 1:
594
- _a = _b.sent(), customerBases = _a[0], expectedSales = _a[1], expectedCustomerSales = _a[2];
600
+ _a = _b.sent(), customerBases = _a[0].list, expectedSales = _a[1].list, expectedCustomerSales = _a[2].list;
595
601
  return [2, {
596
602
  customerBases: customerBases,
597
603
  expectedSales: expectedSales,
598
- expectedCustomerSales: expectedCustomerSales
604
+ expectedCustomerSales: expectedCustomerSales,
605
+ countryISO2: countryISO2
599
606
  }];
600
607
  }
601
608
  });
@@ -635,7 +642,7 @@ export var updateCustomersInfo = createAsyncThunk('updateCustomersInfo', functio
635
642
  });
636
643
  }); });
637
644
  export var updateLeadSuccess = createAsyncThunk('businessUpdateLeadSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
638
- var _a, settings, business, _b, steps, lead_id, flowCompleted, boardResponse, payload, data, board_id, board_info_id;
645
+ var _a, settings, business, _b, steps, lead_id, flowCompleted, boardResponse, payload, data, board_id;
639
646
  var _c, _d, _e, _f;
640
647
  return __generator(this, function (_g) {
641
648
  switch (_g.label) {
@@ -656,20 +663,20 @@ export var updateLeadSuccess = createAsyncThunk('businessUpdateLeadSuccess', fun
656
663
  case 1:
657
664
  data = _g.sent();
658
665
  board_id = data === null || data === void 0 ? void 0 : data.board_id;
659
- board_info_id = data === null || data === void 0 ? void 0 : data.board_info_id;
660
- if (!(!!board_id && !!board_info_id)) return [3, 3];
661
- return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
666
+ if (!board_id) return [3, 4];
667
+ return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
662
668
  case 2:
663
669
  boardResponse = _g.sent();
664
- _g.label = 3;
665
- case 3: return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
666
- case 4:
670
+ return [4, thunkApi.dispatch(retrieveBoardDetails(board_id))];
671
+ case 3:
667
672
  _g.sent();
668
- (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
673
+ _g.label = 4;
674
+ case 4:
675
+ (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, {});
669
676
  (_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
670
677
  thunkApi.dispatch(handleNextScreenStep());
671
678
  return [2, {
672
- response: __assign(__assign({}, data), { flows: BUSINESS_FLOW_SUCCESS.concat(boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.info) }),
679
+ response: __assign(__assign({}, data), { flows: (boardResponse === null || boardResponse === void 0 ? void 0 : boardResponse.info) || [] }),
673
680
  formData: params
674
681
  }];
675
682
  }
@@ -699,6 +706,8 @@ var initialState = {
699
706
  loading: false,
700
707
  customLoading: false,
701
708
  uploading: false,
709
+ uploadingArticle: false,
710
+ uploadingArticleError: null,
702
711
  data: {
703
712
  flowName: FlowsTypes.BUSINESS,
704
713
  verify: {
@@ -718,12 +727,11 @@ var initialState = {
718
727
  },
719
728
  businessTypeData: {
720
729
  licenseNumber: '',
721
- entityLegalName: '',
722
- uploading: false
730
+ entityLegalName: ''
723
731
  },
724
732
  activitiesData: {
725
733
  activities: [],
726
- operationStartDate: new Date().toString()
734
+ operationStartDate: ''
727
735
  },
728
736
  customersData: {
729
737
  customerLocations: [],
@@ -746,6 +754,12 @@ export var businessSlice = createSlice({
746
754
  },
747
755
  resetOTPScreen: function (state) {
748
756
  state.data.otpData.otp = '';
757
+ },
758
+ clearArticleId: function (state) {
759
+ state.data.businessTypeData.articleId = '';
760
+ },
761
+ uploadingStatus: function (state, action) {
762
+ state.uploading = action.payload;
749
763
  }
750
764
  },
751
765
  extraReducers: function (builder) {
@@ -755,49 +769,47 @@ export var businessSlice = createSlice({
755
769
  state.customLoading = true;
756
770
  })
757
771
  .addCase(verifyLeadToken.fulfilled, function (state, action) {
758
- var _a, _b, _c, _d;
772
+ var _a, _b;
759
773
  state.error = null;
760
774
  state.customLoading = false;
761
- var _e = action.payload, data = _e.data, token = _e.token, leadData = _e.leadData, brandInfo = _e.brandInfo, boardId = _e.boardId;
762
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
763
- if (description) {
764
- state.error = description;
765
- return;
766
- }
767
- state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), leadData), state.data.verify.responseBody), { board_id: boardId, lead_id: data === null || data === void 0 ? void 0 : data.id });
768
- state.data.verify.token = token;
775
+ var _c = action.payload, data = _c.data, boardId = _c.boardId, brandData = _c.brandData, leadData = _c.leadData, token = _c.token, isRequireOTP = _c.isRequireOTP;
776
+ var responseBody = state.data.verify.responseBody;
777
+ state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), leadData), responseBody), { board_id: boardId, lead_id: data === null || data === void 0 ? void 0 : data.id });
778
+ if (token)
779
+ state.data.verify.token = token;
769
780
  state.data.otpData.isNID = false;
770
- var _f = state.data.verify.responseBody || {}, entity = _f.entity, entity_activities = _f.entity_activities, business_type = _f.business_type, business_name = _f.business_name;
771
- var issuingDate = (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.business_operation_start_at)
772
- ? brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.business_operation_start_at
773
- : (_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.issuing_date;
774
- if (!!issuingDate) {
775
- var formattedDate = moment(issuingDate).format('YYYY-MM-DD');
776
- state.data.activitiesData.operationStartDate = convertNumbers2English(formattedDate);
777
- }
781
+ if (isRequireOTP)
782
+ return;
783
+ var _d = state.data.verify.responseBody || {}, entity = _d.entity, entity_activities = _d.entity_activities, business_type = _d.business_type;
784
+ var issuingDate = (brandData === null || brandData === void 0 ? void 0 : brandData.business_operation_start_at) || ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.issuing_date) || new Date().getTime();
785
+ if (issuingDate)
786
+ state.data.activitiesData.operationStartDate = convertNumbers2English(dateFormat(issuingDate));
778
787
  var activities = entity_activities || [];
779
788
  var selectedActivity = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
780
- var _a;
781
- return (_a = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.activities) === null || _a === void 0 ? void 0 : _a.find(function (value) { return activity.id === value.id; });
789
+ var activities = (brandData || {}).activities;
790
+ return activities === null || activities === void 0 ? void 0 : activities.find(function (value) { return activity.id === value.id; });
782
791
  });
783
- var defaultActivities = (activities === null || activities === void 0 ? void 0 : activities.length) ? [activities[0]] : [];
784
- state.data.activitiesData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : defaultActivities;
792
+ state.data.activitiesData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [];
785
793
  state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activities: activities });
786
- state.data.businessTypeData.entityLegalName = (business_name === null || business_name === void 0 ? void 0 : business_name.en) || '';
787
- if (!!(entity === null || entity === void 0 ? void 0 : entity.license)) {
788
- var licenseNumber_1 = (_c = entity === null || entity === void 0 ? void 0 : entity.license) === null || _c === void 0 ? void 0 : _c.number;
789
- var _g = state.data.businessTypeData || {}, responseBody = _g.responseBody, selectedLicense = _g.selectedLicense;
790
- var licenseList = (responseBody || {}).licenseList;
794
+ var license = (entity || {}).license;
795
+ if (license) {
796
+ var number_1 = license.number;
797
+ var _e = state.data.businessTypeData || {}, busResData = _e.responseBody, selectedLicense = _e.selectedLicense;
798
+ var licenseList = (busResData || {}).licenseList;
791
799
  var selectedLicenseData = selectedLicense;
792
- if (!!licenseNumber_1) {
793
- selectedLicenseData =
794
- ((_d = licenseList === null || licenseList === void 0 ? void 0 : licenseList.find) === null || _d === void 0 ? void 0 : _d.call(licenseList, function (_a) {
795
- var license = _a.license;
796
- return (license === null || license === void 0 ? void 0 : license.number) === licenseNumber_1;
797
- })) ||
798
- business_type === BusinessType.FL
799
- ? __assign(__assign({}, OTHER_FL_LICENSE), { license: { number: licenseNumber_1 } }) : __assign(__assign({}, OTHER_CR_LICENSE), { license: { number: licenseNumber_1 } });
800
- state.data.businessTypeData.licenseNumber = licenseNumber_1 || '';
800
+ if (number_1) {
801
+ var findLicense = (_b = licenseList === null || licenseList === void 0 ? void 0 : licenseList.find) === null || _b === void 0 ? void 0 : _b.call(licenseList, function (_a) {
802
+ var license = _a.license;
803
+ return (license === null || license === void 0 ? void 0 : license.number) === number_1;
804
+ });
805
+ if (findLicense)
806
+ selectedLicenseData = findLicense;
807
+ else if (!findLicense && business_type === BusinessType.FL) {
808
+ selectedLicenseData = __assign(__assign({}, OTHER_FL_LICENSE), { license: { number: number_1 } });
809
+ }
810
+ else
811
+ selectedLicenseData = __assign(__assign({}, OTHER_CR_LICENSE), { license: { number: number_1 } });
812
+ state.data.businessTypeData.licenseNumber = number_1;
801
813
  }
802
814
  state.data.businessTypeData.selectedLicense = __assign(__assign({}, selectedLicenseData), { type: business_type });
803
815
  }
@@ -828,49 +840,43 @@ export var businessSlice = createSlice({
828
840
  state.error = null;
829
841
  })
830
842
  .addCase(verifyLeadOTP.fulfilled, function (state, action) {
831
- var _a, _b, _c, _d;
843
+ var _a, _b;
832
844
  state.loading = false;
833
845
  state.error = null;
834
- var _e = action.payload, data = _e.data, formData = _e.formData, brandInfo = _e.brandInfo, leadData = _e.leadData;
835
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
836
- if (description) {
837
- state.error = description;
838
- return;
839
- }
846
+ var _c = action.payload, data = _c.data, formData = _c.formData, brand = _c.brand, leadData = _c.leadData;
840
847
  state.data.otpData = formData;
841
848
  state.data.otpData.responseBody = data;
842
- state.data.verify.responseBody = __assign(__assign(__assign({}, leadData), state.data.verify.responseBody), { flows: leadData === null || leadData === void 0 ? void 0 : leadData.flows });
843
- var _f = leadData || {}, entity = _f.entity, entity_activities = _f.entity_activities, business_type = _f.business_type, business_name = _f.business_name;
844
- var issuingDate = (brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.business_operation_start_at)
845
- ? brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.business_operation_start_at
846
- : (_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.issuing_date;
847
- if (!!issuingDate) {
848
- var formattedDate = moment(issuingDate).format('YYYY-MM-DD');
849
- state.data.activitiesData.operationStartDate = convertNumbers2English(formattedDate);
850
- }
849
+ state.data.verify.responseBody = __assign(__assign(__assign({}, leadData), state.data.verify.responseBody), { flows: (leadData === null || leadData === void 0 ? void 0 : leadData.flows) || [] });
850
+ var _d = leadData || {}, entity = _d.entity, entity_activities = _d.entity_activities, business_type = _d.business_type;
851
+ var issuingDate = (brand === null || brand === void 0 ? void 0 : brand.business_operation_start_at) || ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.issuing_date) || new Date().getTime();
852
+ if (issuingDate)
853
+ state.data.activitiesData.operationStartDate = convertNumbers2English(dateFormat(issuingDate));
851
854
  var activities = entity_activities || [];
852
855
  var selectedActivity = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
853
- var _a;
854
- return (_a = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.activities) === null || _a === void 0 ? void 0 : _a.find(function (value) { return value.id === activity.id; });
856
+ var activities = (brand || {}).activities;
857
+ return activities === null || activities === void 0 ? void 0 : activities.find(function (value) { return value.id === activity.id; });
855
858
  });
856
- var defaultActivities = (activities === null || activities === void 0 ? void 0 : activities[0]) ? [activities === null || activities === void 0 ? void 0 : activities[0]] : [];
857
- state.data.activitiesData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : defaultActivities;
859
+ state.data.activitiesData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [];
858
860
  state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activities: activities });
859
- state.data.businessTypeData.entityLegalName = (business_name === null || business_name === void 0 ? void 0 : business_name.en) || '';
860
- if (!!(entity === null || entity === void 0 ? void 0 : entity.license)) {
861
- var licenseNumber_2 = (_c = entity === null || entity === void 0 ? void 0 : entity.license) === null || _c === void 0 ? void 0 : _c.number;
862
- var _g = state.data.businessTypeData || {}, responseBody = _g.responseBody, selectedLicense = _g.selectedLicense;
863
- var licenseList = (responseBody || {}).licenseList;
861
+ var license = (entity || {}).license;
862
+ if (license) {
863
+ var number_2 = license.number;
864
+ var _e = state.data.businessTypeData || {}, busResData = _e.responseBody, selectedLicense = _e.selectedLicense;
865
+ var licenseList = (busResData || {}).licenseList;
864
866
  var selectedLicenseData = selectedLicense;
865
- if (!!licenseNumber_2) {
866
- selectedLicenseData =
867
- ((_d = licenseList === null || licenseList === void 0 ? void 0 : licenseList.find) === null || _d === void 0 ? void 0 : _d.call(licenseList, function (_a) {
868
- var license = _a.license;
869
- return (license === null || license === void 0 ? void 0 : license.number) === licenseNumber_2;
870
- })) ||
871
- business_type === BusinessType.FL
872
- ? __assign(__assign({}, OTHER_FL_LICENSE), { license: { number: licenseNumber_2 } }) : __assign(__assign({}, OTHER_CR_LICENSE), { license: { number: licenseNumber_2 } });
873
- state.data.businessTypeData.licenseNumber = licenseNumber_2 || '';
867
+ if (number_2) {
868
+ var findLicense = (_b = licenseList === null || licenseList === void 0 ? void 0 : licenseList.find) === null || _b === void 0 ? void 0 : _b.call(licenseList, function (_a) {
869
+ var license = _a.license;
870
+ return (license === null || license === void 0 ? void 0 : license.number) === number_2;
871
+ });
872
+ if (findLicense)
873
+ selectedLicenseData = findLicense;
874
+ else if (!findLicense && business_type === BusinessType.FL) {
875
+ selectedLicenseData = __assign(__assign({}, OTHER_FL_LICENSE), { license: { number: number_2 } });
876
+ }
877
+ else
878
+ selectedLicenseData = __assign(__assign({}, OTHER_CR_LICENSE), { license: { number: number_2 } });
879
+ state.data.businessTypeData.licenseNumber = number_2;
874
880
  }
875
881
  state.data.businessTypeData.selectedLicense = __assign(__assign({}, selectedLicenseData), { type: business_type });
876
882
  }
@@ -879,7 +885,7 @@ export var businessSlice = createSlice({
879
885
  state.loading = false;
880
886
  state.error = action.error.message;
881
887
  })
882
- .addCase(createCivilIdAuth.pending, function (state, action) {
888
+ .addCase(createCivilIdAuth.pending, function (state) {
883
889
  state.loading = true;
884
890
  state.error = null;
885
891
  })
@@ -1019,19 +1025,15 @@ export var businessSlice = createSlice({
1019
1025
  var _b = action.payload, data = _b.data, formData = _b.formData, accountData = _b.accountData, documentData = _b.documentData;
1020
1026
  state.data.businessTypeData = __assign(__assign({}, state.data.businessTypeData), formData);
1021
1027
  var entity = data.entity, entity_activities = data.entity_activities;
1022
- var issuingDate = (_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.issuing_date;
1028
+ var issuingDate = ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.issuing_date) || new Date().getTime();
1023
1029
  if ((accountData === null || accountData === void 0 ? void 0 : accountData.status) === 'ALREADY_TAKEN') {
1024
1030
  state.error = 'signup_user_exists_error';
1025
1031
  return;
1026
1032
  }
1027
- if (!!issuingDate) {
1028
- var formattedDate = moment(issuingDate).format('YYYY-MM-DD');
1029
- state.data.activitiesData.operationStartDate = convertNumbers2English(formattedDate);
1033
+ if (issuingDate) {
1034
+ state.data.activitiesData.operationStartDate = convertNumbers2English(dateFormat(issuingDate));
1030
1035
  }
1031
1036
  var activities = entity_activities || [];
1032
- var selectedActivity = activities[0];
1033
- if (!!selectedActivity)
1034
- state.data.activitiesData.activities = [selectedActivity];
1035
1037
  state.data.businessTypeData.responseBody = __assign(__assign(__assign(__assign(__assign({}, data), state.data.businessTypeData.responseBody), { activities: activities }), accountData), documentData);
1036
1038
  state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { entity: entity });
1037
1039
  })
@@ -1039,19 +1041,19 @@ export var businessSlice = createSlice({
1039
1041
  state.loading = false;
1040
1042
  state.error = action.error.message;
1041
1043
  })
1042
- .addCase(uploadLicenseCertificate.pending, function (state) {
1043
- state.error = null;
1044
- state.uploading = true;
1044
+ .addCase(uploadArticle.pending, function (state) {
1045
+ state.uploadingArticleError = null;
1046
+ state.uploadingArticle = true;
1045
1047
  })
1046
- .addCase(uploadLicenseCertificate.fulfilled, function (state, action) {
1047
- state.error = null;
1048
- state.uploading = false;
1048
+ .addCase(uploadArticle.fulfilled, function (state, action) {
1049
+ state.uploadingArticleError = null;
1050
+ state.uploadingArticle = false;
1049
1051
  var data = action.payload.data;
1050
- state.data.businessTypeData.certificateId = data === null || data === void 0 ? void 0 : data.id;
1052
+ state.data.businessTypeData.articleId = data === null || data === void 0 ? void 0 : data.id;
1051
1053
  })
1052
- .addCase(uploadLicenseCertificate.rejected, function (state) {
1053
- state.uploading = false;
1054
- state.error = 'file_upload_error';
1054
+ .addCase(uploadArticle.rejected, function (state) {
1055
+ state.uploadingArticle = false;
1056
+ state.uploadingArticleError = 'file_upload_article_error';
1055
1057
  })
1056
1058
  .addCase(updateActivitiesInfo.pending, function (state) {
1057
1059
  state.loading = true;
@@ -1073,19 +1075,19 @@ export var businessSlice = createSlice({
1073
1075
  state.error = null;
1074
1076
  })
1075
1077
  .addCase(retrieveDataList.fulfilled, function (state, action) {
1076
- var _a, _b, _c, _d, _e;
1078
+ var _a, _b;
1077
1079
  state.loading = false;
1078
1080
  state.error = null;
1079
- var payload = action.payload;
1080
- var customerBases = ((_a = payload.customerBases) === null || _a === void 0 ? void 0 : _a.list) || [];
1081
- var customerBase = customerBases === null || customerBases === void 0 ? void 0 : customerBases[1];
1082
- var expectedSales = ((_b = payload.expectedSales) === null || _b === void 0 ? void 0 : _b.list) || [];
1083
- var expectedSale = (_d = (_c = expectedSales === null || expectedSales === void 0 ? void 0 : expectedSales[0]) === null || _c === void 0 ? void 0 : _c.sub) === null || _d === void 0 ? void 0 : _d[4];
1084
- var expectedCustomerSales = ((_e = payload.expectedCustomerSales) === null || _e === void 0 ? void 0 : _e.list) || [];
1085
- var expectedCustomerSale = expectedCustomerSales === null || expectedCustomerSales === void 0 ? void 0 : expectedCustomerSales[3];
1081
+ var _c = action.payload, customerBases = _c.customerBases, expectedSales = _c.expectedSales, expectedCustomerSales = _c.expectedCustomerSales, countryISO2 = _c.countryISO2;
1082
+ var regional = customerBases.at(1);
1083
+ var local = customerBases.at(0);
1084
+ var expectedSale = (_b = (_a = expectedSales.at(0)) === null || _a === void 0 ? void 0 : _a.sub) === null || _b === void 0 ? void 0 : _b.at(4);
1085
+ var expectedCustomerSale = expectedCustomerSales.at(3);
1086
1086
  state.data.activitiesData.responseBody = __assign(__assign({}, state.data.activitiesData.responseBody), { customerBases: customerBases, expectedSales: expectedSales, expectedCustomerSales: expectedCustomerSales });
1087
- if (!!customerBase)
1088
- state.data.customersData.customerLocations = [customerBase, customerBases[0]];
1087
+ if (local && isKW(countryISO2))
1088
+ state.data.customersData.customerLocations = [local];
1089
+ if (regional && local && isSA(countryISO2))
1090
+ state.data.customersData.customerLocations = [regional, local];
1089
1091
  if (!!expectedSale)
1090
1092
  state.data.customersData.expectedSale = expectedSale;
1091
1093
  if (!!expectedCustomerSale)
@@ -1135,6 +1137,6 @@ export var businessSlice = createSlice({
1135
1137
  });
1136
1138
  }
1137
1139
  });
1138
- export var clearError = (_a = businessSlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen;
1140
+ export var clearError = (_a = businessSlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen, clearArticleId = _a.clearArticleId, uploadingStatus = _a.uploadingStatus;
1139
1141
  export default businessSlice.reducer;
1140
1142
  export var businessSelector = function (state) { return state.business; };