@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]) {
@@ -45,94 +45,101 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
45
45
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
46
  }
47
47
  };
48
+ var __rest = (this && this.__rest) || function (s, e) {
49
+ var t = {};
50
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
51
+ t[p] = s[p];
52
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
53
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
54
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
55
+ t[p[i]] = s[p[i]];
56
+ }
57
+ return t;
58
+ };
48
59
  var _a;
49
60
  import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
50
61
  import API from '../../../api';
51
- import { BusinessType, FlowsTypes } from '../../../@types';
62
+ import { BusinessType, FieldType, FlowsTypes } from '../../../@types';
52
63
  import { handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
53
64
  import { ENTITY_STEP_NAMES } from '../../../constants';
54
65
  import moment from 'moment';
55
66
  import { convertNumbers2English } from '../../../utils';
56
- export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
57
- var payload, data, boardData, entityData, boardInfoData, countryIso2, board_id, board_info_id, entityId, activities, data_1, info, hasEntityCompleted;
58
- var _a, _b, _c, _d;
59
- return __generator(this, function (_e) {
60
- switch (_e.label) {
61
- case 0:
62
- payload = {
63
- service_name: 'tap_email',
64
- verify_token: token
65
- };
66
- return [4, API.leadService.verifyLeadToken(payload)];
67
- case 1:
68
- data = (_e.sent()).data;
69
- countryIso2 = undefined;
70
- if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 9];
71
- if (data === null || data === void 0 ? void 0 : data.country_code) {
72
- countryIso2 = data === null || data === void 0 ? void 0 : data.country_code;
73
- if (countryIso2)
74
- thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
75
- }
76
- if (!(data.step_name !== ENTITY_STEP_NAMES.PHONE_AUTH)) return [3, 9];
77
- board_id = data === null || data === void 0 ? void 0 : data.id;
78
- board_info_id = data === null || data === void 0 ? void 0 : data.board_info_id;
79
- if (!(board_id && board_info_id)) return [3, 3];
80
- return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
81
- case 2:
82
- boardInfoData = _e.sent();
83
- _e.label = 3;
84
- case 3:
85
- if (!board_id) return [3, 5];
86
- return [4, API.boardService.retrieveBoardDetails(board_id)];
87
- case 4:
88
- boardData = _e.sent();
89
- _e.label = 5;
90
- case 5:
91
- entityId = (_a = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _a === void 0 ? void 0 : _a.id;
92
- if (!entityId) return [3, 8];
93
- return [4, API.entityService.retrieveEntity(entityId)];
94
- case 6:
95
- entityData = _e.sent();
96
- activities = (entityData || {}).activities;
97
- if (!!activities) return [3, 8];
98
- return [4, API.dataService.getActivities()];
99
- case 7:
100
- data_1 = _e.sent();
101
- entityData = __assign(__assign({}, entityData), { entity_activities: data_1.list });
102
- _e.label = 8;
103
- case 8:
104
- if (!countryIso2) {
105
- countryIso2 = entityData.country;
106
- if (countryIso2)
107
- thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
108
- }
109
- info = (boardInfoData || {}).info;
110
- hasEntityCompleted = ((_b = info === null || info === void 0 ? void 0 : info.find(function (flow) { return flow.name === 'entity'; })) === null || _b === void 0 ? void 0 : _b.status) === 'completed';
111
- if (hasEntityCompleted) {
67
+ export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function (_a, thunkApi) {
68
+ var token = _a.token, isInternally = _a.isInternally;
69
+ return __awaiter(void 0, void 0, void 0, function () {
70
+ var payload, data, boardData, entityData, boardInfoData, entityTypes, countryIso2, board_id, entityId, info, hasEntityCompleted;
71
+ var _b, _c, _d, _e;
72
+ return __generator(this, function (_f) {
73
+ switch (_f.label) {
74
+ case 0:
75
+ payload = {
76
+ service_name: 'tap_email',
77
+ verify_token: token
78
+ };
79
+ return [4, API.leadService.verifyLeadToken(payload)];
80
+ case 1:
81
+ data = (_f.sent()).data;
82
+ countryIso2 = undefined;
83
+ if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 9];
84
+ if (isInternally)
85
+ data.step_name = ENTITY_STEP_NAMES.ENTITY_INFO;
86
+ if (data === null || data === void 0 ? void 0 : data.country_code) {
87
+ countryIso2 = data === null || data === void 0 ? void 0 : data.country_code;
88
+ if (countryIso2)
89
+ thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
90
+ }
91
+ if (!(data.step_name !== ENTITY_STEP_NAMES.PHONE_AUTH)) return [3, 9];
92
+ board_id = data === null || data === void 0 ? void 0 : data.id;
93
+ if (!board_id) return [3, 4];
94
+ return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
95
+ case 2:
96
+ boardInfoData = _f.sent();
97
+ return [4, API.boardService.retrieveBoardDetails(board_id)];
98
+ case 3:
99
+ boardData = _f.sent();
100
+ _f.label = 4;
101
+ case 4:
102
+ entityId = (_b = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _b === void 0 ? void 0 : _b.id;
103
+ if (!entityId) return [3, 6];
104
+ return [4, API.entityService.retrieveEntity(entityId)];
105
+ case 5:
106
+ entityData = _f.sent();
107
+ _f.label = 6;
108
+ case 6:
109
+ if (!countryIso2) {
110
+ countryIso2 = entityData.country;
111
+ if (countryIso2)
112
+ thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
113
+ }
114
+ info = (boardInfoData || {}).info;
115
+ hasEntityCompleted = ((_c = info === null || info === void 0 ? void 0 : info.find(function (flow) { return flow.name === 'entity'; })) === null || _c === void 0 ? void 0 : _c.status) === 'completed';
116
+ if (!hasEntityCompleted) return [3, 7];
112
117
  thunkApi.dispatch(handleNextScreenStep('ENTITY_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
113
- }
114
- else {
115
- thunkApi.dispatch(handleNextScreenStep('ENTITY_INFO_STEP'));
116
- }
117
- _e.label = 9;
118
- case 9: return [2, {
119
- data: data,
120
- boardResponse: {
121
- user: boardData === null || boardData === void 0 ? void 0 : boardData.user,
122
- brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand,
123
- bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
124
- entity: entityData === null || entityData === void 0 ? void 0 : entityData.entity,
125
- merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
126
- name: (_c = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _c === void 0 ? void 0 : _c.names,
127
- contact: (_d = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _d === void 0 ? void 0 : _d.contact,
128
- flows: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info,
129
- entity_activities: entityData === null || entityData === void 0 ? void 0 : entityData.entity_activities
130
- },
131
- token: token
132
- }];
133
- }
118
+ return [3, 9];
119
+ case 7: return [4, API.entityService.retrieveEntityType()];
120
+ case 8:
121
+ entityTypes = _f.sent();
122
+ thunkApi.dispatch(handleNextScreenStep('ENTITY_NAME_STEP'));
123
+ _f.label = 9;
124
+ case 9: return [2, {
125
+ data: data,
126
+ boardResponse: {
127
+ user: boardData === null || boardData === void 0 ? void 0 : boardData.user,
128
+ brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand,
129
+ bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
130
+ entity: entityData === null || entityData === void 0 ? void 0 : entityData.entity,
131
+ merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
132
+ name: (_d = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _d === void 0 ? void 0 : _d.names,
133
+ contact: (_e = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _e === void 0 ? void 0 : _e.contact,
134
+ flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [],
135
+ entityTypes: entityTypes
136
+ },
137
+ token: token
138
+ }];
139
+ }
140
+ });
134
141
  });
135
- }); });
142
+ });
136
143
  export var resendOTP = createAsyncThunk('entityResendOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
137
144
  var entity, payload, data;
138
145
  return __generator(this, function (_a) {
@@ -151,7 +158,7 @@ export var resendOTP = createAsyncThunk('entityResendOTP', function (params, thu
151
158
  });
152
159
  }); });
153
160
  export var verifyEntityLeadOTP = createAsyncThunk('verifyEntityLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
154
- var _a, entity, settings, responseBody, payload, data, boardData, entityData, boardInfoData, board_id, board_info_id, entityId, activities, data_2, info, hasEntityCompleted;
161
+ var _a, entity, settings, responseBody, payload, data, boardData, entityData, entityTypes, boardInfoData, board_id, entityId, info, hasEntityCompleted;
155
162
  var _b, _c, _d, _e, _f, _g, _h;
156
163
  return __generator(this, function (_j) {
157
164
  switch (_j.label) {
@@ -171,41 +178,32 @@ export var verifyEntityLeadOTP = createAsyncThunk('verifyEntityLeadOTP', functio
171
178
  boardInfoData = undefined;
172
179
  if (!!data.errors) return [3, 9];
173
180
  board_id = responseBody === null || responseBody === void 0 ? void 0 : responseBody.id;
174
- board_info_id = responseBody === null || responseBody === void 0 ? void 0 : responseBody.board_info_id;
175
- if (!(board_id && board_info_id)) return [3, 3];
176
- return [4, API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id })];
181
+ if (!board_id) return [3, 4];
182
+ return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
177
183
  case 2:
178
184
  boardInfoData = _j.sent();
179
- _j.label = 3;
180
- case 3:
181
- if (!board_id) return [3, 5];
182
185
  return [4, API.boardService.retrieveBoardDetails(board_id)];
183
- case 4:
186
+ case 3:
184
187
  boardData = _j.sent();
185
- _j.label = 5;
186
- case 5:
188
+ _j.label = 4;
189
+ case 4:
187
190
  entityId = (_c = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _c === void 0 ? void 0 : _c.id;
188
- if (!entityId) return [3, 8];
191
+ if (!entityId) return [3, 6];
189
192
  return [4, API.entityService.retrieveEntity(entityId)];
190
- case 6:
193
+ case 5:
191
194
  entityData = _j.sent();
192
- activities = (entityData || {}).activities;
193
- if (!!activities) return [3, 8];
194
- return [4, API.dataService.getActivities()];
195
- case 7:
196
- data_2 = _j.sent();
197
- entityData = __assign(__assign({}, entityData), { entity_activities: data_2.list });
198
- _j.label = 8;
199
- case 8:
195
+ _j.label = 6;
196
+ case 6:
200
197
  (_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, { otp: params.otp });
201
198
  info = (boardInfoData || {}).info;
202
199
  hasEntityCompleted = ((_f = info === null || info === void 0 ? void 0 : info.find(function (flow) { return flow.name === 'entity'; })) === null || _f === void 0 ? void 0 : _f.status) === 'completed';
203
- if (hasEntityCompleted) {
204
- thunkApi.dispatch(handleNextScreenStep('ENTITY_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
205
- }
206
- else {
207
- thunkApi.dispatch(handleNextScreenStep('ENTITY_INFO_STEP'));
208
- }
200
+ if (!hasEntityCompleted) return [3, 7];
201
+ thunkApi.dispatch(handleNextScreenStep('ENTITY_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
202
+ return [3, 9];
203
+ case 7: return [4, API.entityService.retrieveEntityType()];
204
+ case 8:
205
+ entityTypes = _j.sent();
206
+ thunkApi.dispatch(handleNextScreenStep('ENTITY_NAME_STEP'));
209
207
  _j.label = 9;
210
208
  case 9: return [2, {
211
209
  data: data,
@@ -217,8 +215,8 @@ export var verifyEntityLeadOTP = createAsyncThunk('verifyEntityLeadOTP', functio
217
215
  merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
218
216
  name: (_g = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _g === void 0 ? void 0 : _g.names,
219
217
  contact: (_h = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _h === void 0 ? void 0 : _h.contact,
220
- flows: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info,
221
- entity_activities: entityData === null || entityData === void 0 ? void 0 : entityData.entity_activities
218
+ flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [],
219
+ entityTypes: entityTypes
222
220
  },
223
221
  formData: params
224
222
  }];
@@ -239,50 +237,82 @@ export var retrieveBoardDetails = createAsyncThunk('entityRetrieveEntityInfo', f
239
237
  }
240
238
  });
241
239
  }); });
242
- export var updateEntity = createAsyncThunk('entityUpdateEntity', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
243
- var _a, settings, entity, id, brandId, articleId, requestBody, brandData, payload, data;
244
- var _b, _c, _d, _e, _f, _g, _h;
245
- return __generator(this, function (_j) {
246
- switch (_j.label) {
240
+ export var updateEntityName = createAsyncThunk('entityUpdateEntityName', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
241
+ var _a, settings, entity, entityData, _b, id, data_status, articleId, issuingDate, expiryDate, isFL, isLegalNameEditable, isLicenseTypeEditable, isEntityTypeEditable, isLicenseNumberEditable, isUnifiedNumberEditable, isIssuingDateEditable, isExpiryDateEditable, payload, data, documentBody, _c, list;
242
+ var _d, _e, _f, _g, _h, _j, _k;
243
+ return __generator(this, function (_l) {
244
+ switch (_l.label) {
247
245
  case 0:
248
246
  _a = thunkApi.getState(), settings = _a.settings, entity = _a.entity;
249
- id = (_c = (_b = entity.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.entity) === null || _c === void 0 ? void 0 : _c.id;
250
- brandId = (_e = (_d = entity.data.verify.responseBody) === null || _d === void 0 ? void 0 : _d.brand) === null || _e === void 0 ? void 0 : _e.id;
251
- articleId = entity.data.entityData.articleId;
252
- requestBody = {
253
- id: brandId,
254
- activities: (_f = (params.activities || [])) === null || _f === void 0 ? void 0 : _f.map(function (_a) {
255
- var id = _a.id;
256
- return ({ id: id });
257
- }),
258
- operations: {
259
- start_date: params.operationStartDate
260
- },
261
- encryption_contract: ['operations.start_date']
262
- };
263
- return [4, API.brandService.updateBrandInfo(requestBody)];
264
- case 1:
265
- brandData = (_j.sent()).data;
247
+ entityData = (entity.data.verify.responseBody || {}).entity;
248
+ _b = entityData || {}, id = _b.id, data_status = _b.data_status;
249
+ articleId = entity.data.entityNameData.articleId;
250
+ issuingDate = new Date(params.issuingDate).getTime();
251
+ expiryDate = new Date(params.expiryDate).getTime();
252
+ isFL = params.licenseType === BusinessType.FL;
253
+ isLegalNameEditable = (data_status === null || data_status === void 0 ? void 0 : data_status.legal_name) === FieldType.EDITABLE;
254
+ isLicenseTypeEditable = ((_d = data_status === null || data_status === void 0 ? void 0 : data_status.license) === null || _d === void 0 ? void 0 : _d.type) === FieldType.EDITABLE;
255
+ isEntityTypeEditable = (data_status === null || data_status === void 0 ? void 0 : data_status.type) === FieldType.EDITABLE;
256
+ isLicenseNumberEditable = ((_e = data_status === null || data_status === void 0 ? void 0 : data_status.license) === null || _e === void 0 ? void 0 : _e.number) === FieldType.EDITABLE;
257
+ isUnifiedNumberEditable = ((_f = data_status === null || data_status === void 0 ? void 0 : data_status.license) === null || _f === void 0 ? void 0 : _f.additional_info) === FieldType.EDITABLE;
258
+ isIssuingDateEditable = ((_g = data_status === null || data_status === void 0 ? void 0 : data_status.license) === null || _g === void 0 ? void 0 : _g.issuing_date) === FieldType.EDITABLE;
259
+ isExpiryDateEditable = ((_h = data_status === null || data_status === void 0 ? void 0 : data_status.license) === null || _h === void 0 ? void 0 : _h.expiry_date) === FieldType.EDITABLE;
266
260
  payload = {
267
261
  id: id,
262
+ AOA_file_id: articleId,
268
263
  license: {
269
- number: params.licenseNumber && params.licenseNumber,
270
- type: params.licenseType
264
+ number: isLicenseNumberEditable && params.licenseNumber ? params.licenseNumber : undefined,
265
+ type: isLicenseTypeEditable ? (isFL ? 'freelance' : 'commercial_registration') : undefined,
266
+ issuing_date: isIssuingDateEditable ? issuingDate === null || issuingDate === void 0 ? void 0 : issuingDate.toString() : undefined,
267
+ expiry_date: isExpiryDateEditable ? expiryDate === null || expiryDate === void 0 ? void 0 : expiryDate.toString() : undefined,
268
+ additional_info: isUnifiedNumberEditable && params.unifiedNumber
269
+ ? {
270
+ unified_number: params.unifiedNumber
271
+ }
272
+ : undefined
271
273
  },
272
- legal_name: {
273
- ar: params.licenseName,
274
- en: params.licenseName
275
- },
276
- AOA_file_id: articleId,
277
- encryption_contract: ['license.number', 'legal_name.ar', 'legal_name.en', 'license.type']
274
+ type: isEntityTypeEditable && params.entityType ? params.entityType : undefined,
275
+ legal_name: isLegalNameEditable && params.legalName
276
+ ? {
277
+ ar: params.legalName,
278
+ en: params.legalName
279
+ }
280
+ : undefined,
281
+ encryption_contract: [
282
+ 'license.number',
283
+ 'legal_name.ar',
284
+ 'legal_name.en',
285
+ 'license.type',
286
+ 'license.issuing_date',
287
+ 'license.expiry_date',
288
+ 'license.additional_info.unified_number',
289
+ 'type'
290
+ ]
278
291
  };
279
292
  return [4, API.entityService.updateEntity(payload)];
293
+ case 1:
294
+ data = _l.sent();
295
+ if (!((params.certificateId || []).length > 0)) return [3, 3];
296
+ documentBody = {
297
+ entity_id: id || '',
298
+ documents: [
299
+ {
300
+ images: params.certificateId
301
+ }
302
+ ]
303
+ };
304
+ _c = data;
305
+ return [4, API.entityService.updateDocumentInfo(documentBody)];
280
306
  case 2:
281
- data = _j.sent();
282
- thunkApi.dispatch(retrieveDataList());
307
+ _c.documentData = _l.sent();
308
+ _l.label = 3;
309
+ case 3: return [4, API.dataService.getActivities()];
310
+ case 4:
311
+ list = (_l.sent()).list;
312
+ data.activityList = list;
283
313
  thunkApi.dispatch(handleNextScreenStep());
284
- (_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, id);
285
- return [2, { data: __assign(__assign({}, data), brandData), formData: params }];
314
+ (_k = (_j = settings.data.appConfig).onStepCompleted) === null || _k === void 0 ? void 0 : _k.call(_j, settings.data.activeScreen.name, id);
315
+ return [2, { data: data, formData: params }];
286
316
  }
287
317
  });
288
318
  }); });
@@ -299,7 +329,7 @@ export var uploadArticle = createAsyncThunk('entityUploadArticle', function (_a)
299
329
  uploadPayload = {
300
330
  file_link_create: true,
301
331
  title: file === null || file === void 0 ? void 0 : file.name,
302
- purpose: 'identity_document',
332
+ purpose: 'article_of_association',
303
333
  type: type,
304
334
  file: file
305
335
  };
@@ -307,7 +337,7 @@ export var uploadArticle = createAsyncThunk('entityUploadArticle', function (_a)
307
337
  var progress = ((progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.loaded) / (progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.total)) * 100;
308
338
  onProgress === null || onProgress === void 0 ? void 0 : onProgress(Math.floor(progress));
309
339
  };
310
- return [4, API.entityService.uploadFileInfo(uploadPayload, { onUploadProgress: onUploadProgress })];
340
+ return [4, API.fileService.uploadFileInfo(uploadPayload, { onUploadProgress: onUploadProgress })];
311
341
  case 1:
312
342
  data = _c.sent();
313
343
  return [2, { data: data }];
@@ -315,68 +345,45 @@ export var uploadArticle = createAsyncThunk('entityUploadArticle', function (_a)
315
345
  });
316
346
  });
317
347
  });
318
- export var updateCustomersInfo = createAsyncThunk('entityUpdateCustomersInfo', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
319
- var _a, settings, entity, id, customerLocation, customerBase, sales, requestBody, data;
320
- var _b, _c, _d, _e, _f, _g;
348
+ export var updateEntityCapital = createAsyncThunk('entityUpdateEntityCapital', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
349
+ var _a, settings, entity, entityData, _b, id, data_status, isCapitalPaidEditable, isCapitalShareEditable, activities, payload, data;
350
+ var _c, _d, _e, _f, _g;
321
351
  return __generator(this, function (_h) {
322
352
  switch (_h.label) {
323
353
  case 0:
324
354
  _a = thunkApi.getState(), settings = _a.settings, entity = _a.entity;
325
- id = (_c = (_b = entity.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.brand) === null || _c === void 0 ? void 0 : _c.id;
326
- customerLocation = params.customerLocations.map(function (location) { return ({
327
- id: location === null || location === void 0 ? void 0 : location.id
328
- }); });
329
- customerBase = { id: ((_d = params.expectedCustomer) === null || _d === void 0 ? void 0 : _d.id) || '', period: 'monthly', locations: customerLocation };
330
- sales = { id: ((_e = params.expectedSale) === null || _e === void 0 ? void 0 : _e.id) || '', period: 'monthly' };
331
- requestBody = {
332
- operations: {
333
- customer_base: customerBase,
334
- sales: sales,
335
- start_date: entity.data.entityData.operationStartDate
336
- },
337
- term: ['refund', 'chargeback'],
355
+ entityData = (entity.data.verify.responseBody || {}).entity;
356
+ _b = entityData || {}, id = _b.id, data_status = _b.data_status;
357
+ isCapitalPaidEditable = ((_c = data_status === null || data_status === void 0 ? void 0 : data_status.capital) === null || _c === void 0 ? void 0 : _c.paid) === FieldType.EDITABLE;
358
+ isCapitalShareEditable = ((_d = data_status === null || data_status === void 0 ? void 0 : data_status.capital) === null || _d === void 0 ? void 0 : _d.shares) === FieldType.EDITABLE;
359
+ activities = (_e = (params.activities || [])) === null || _e === void 0 ? void 0 : _e.map(function (_a) {
360
+ var id = _a.id;
361
+ return ({ id: id, action: 'add' });
362
+ });
363
+ payload = {
338
364
  id: id,
339
- encryption_contract: []
365
+ activities: (activities === null || activities === void 0 ? void 0 : activities.length) > 0 ? activities : undefined,
366
+ capital: {
367
+ paid: isCapitalPaidEditable ? params.capitalPaid : undefined,
368
+ shares: isCapitalShareEditable
369
+ ? {
370
+ count: params.capitalShareCount,
371
+ value: params.capitalShareValue
372
+ }
373
+ : undefined
374
+ }
340
375
  };
341
- return [4, API.brandService.updateBrandInfo(requestBody)];
376
+ return [4, API.entityService.updateEntity(payload)];
342
377
  case 1:
343
378
  data = _h.sent();
344
379
  thunkApi.dispatch(handleNextScreenStep());
345
- (_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, requestBody);
346
- return [2, { data: data === null || data === void 0 ? void 0 : data.brand, formData: params }];
347
- }
348
- });
349
- }); });
350
- export var retrieveDataList = createAsyncThunk('entityRetrieveDataList', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
351
- var settings, dataBody, salesDataBody, _a, customerBases, expectedSales, expectedCustomerSales;
352
- return __generator(this, function (_b) {
353
- switch (_b.label) {
354
- case 0:
355
- settings = thunkApi.getState().settings;
356
- dataBody = {
357
- page: 0
358
- };
359
- salesDataBody = {
360
- page: 0,
361
- country_code: [settings.data.businessCountry.iso2]
362
- };
363
- return [4, Promise.all([
364
- API.dataService.getCustomerBases(dataBody),
365
- API.dataService.getExpectedSales(salesDataBody),
366
- API.dataService.getExpectedCustomerSales(dataBody)
367
- ])];
368
- case 1:
369
- _a = _b.sent(), customerBases = _a[0], expectedSales = _a[1], expectedCustomerSales = _a[2];
370
- return [2, {
371
- customerBases: customerBases,
372
- expectedSales: expectedSales,
373
- expectedCustomerSales: expectedCustomerSales
374
- }];
380
+ (_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, id);
381
+ return [2, { data: data, formData: params }];
375
382
  }
376
383
  });
377
384
  }); });
378
385
  export var updateBoardSuccess = createAsyncThunk('updateBoardEntitySuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
379
- var _a, settings, entity, _b, id, infoId, payload, data;
386
+ var _a, settings, entity, _b, id, infoId, payload, data, boardInfoData;
380
387
  var _c, _d, _e, _f;
381
388
  return __generator(this, function (_g) {
382
389
  switch (_g.label) {
@@ -393,13 +400,16 @@ export var updateBoardSuccess = createAsyncThunk('updateBoardEntitySuccess', fun
393
400
  return [4, API.boardService.updateBoardInfo(__assign({ id: id, infoId: infoId }, payload))];
394
401
  case 1:
395
402
  data = _g.sent();
396
- return [4, thunkApi.dispatch(retrieveBoardDetails(id))];
403
+ return [4, API.boardService.retrieveBoardInfoStatus(id)];
397
404
  case 2:
405
+ boardInfoData = _g.sent();
406
+ return [4, thunkApi.dispatch(retrieveBoardDetails(id))];
407
+ case 3:
398
408
  _g.sent();
399
- (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, params);
409
+ (_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, {});
400
410
  (_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
401
411
  thunkApi.dispatch(handleNextScreenStep());
402
- return [2, { response: __assign(__assign({}, data), { flows: data === null || data === void 0 ? void 0 : data.info }), formData: params }];
412
+ return [2, { response: __assign(__assign({}, data), { flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [] }), formData: params }];
403
413
  }
404
414
  });
405
415
  }); });
@@ -408,6 +418,8 @@ var initialState = {
408
418
  loading: false,
409
419
  customLoading: false,
410
420
  uploading: false,
421
+ uploadingArticle: false,
422
+ uploadingArticleError: null,
411
423
  data: {
412
424
  flowName: FlowsTypes.ENTITY,
413
425
  verify: {
@@ -416,20 +428,20 @@ var initialState = {
416
428
  otpData: {
417
429
  otp: ''
418
430
  },
419
- entityData: {
420
- licenseName: '',
431
+ entityNameData: {
432
+ legalName: '',
421
433
  licenseNumber: '',
422
- licenseType: BusinessType.CR,
423
- activities: [],
424
- operationStartDate: '',
425
- uploading: false
434
+ licenseType: '',
435
+ entityType: '',
436
+ issuingDate: '',
437
+ expiryDate: '',
438
+ unifiedNumber: ''
426
439
  },
427
- customersData: {
428
- customerLocations: [],
429
- expectedCustomer: undefined,
430
- expectedSale: undefined,
431
- refundPolicy: false,
432
- transactionPolicy: false
440
+ entityCapitalData: {
441
+ activities: [],
442
+ capitalPaid: '',
443
+ capitalShareCount: '',
444
+ capitalShareValue: ''
433
445
  }
434
446
  }
435
447
  };
@@ -445,6 +457,12 @@ export var entitySlice = createSlice({
445
457
  },
446
458
  resetOTPScreen: function (state) {
447
459
  state.data.otpData.otp = '';
460
+ },
461
+ uploadingStatus: function (state, action) {
462
+ state.uploading = action.payload;
463
+ },
464
+ clearArticleId: function (state) {
465
+ state.data.entityNameData.articleId = '';
448
466
  }
449
467
  },
450
468
  extraReducers: function (builder) {
@@ -454,10 +472,10 @@ export var entitySlice = createSlice({
454
472
  state.customLoading = true;
455
473
  })
456
474
  .addCase(verifyLeadToken.fulfilled, function (state, action) {
457
- var _a, _b, _c, _d, _e;
475
+ var _a, _b, _c, _d;
458
476
  state.error = null;
459
477
  state.customLoading = false;
460
- var _f = action.payload, data = _f.data, token = _f.token, boardResponse = _f.boardResponse;
478
+ var _e = action.payload, data = _e.data, token = _e.token, boardResponse = _e.boardResponse;
461
479
  var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
462
480
  if (description) {
463
481
  state.error = description;
@@ -465,29 +483,49 @@ export var entitySlice = createSlice({
465
483
  }
466
484
  state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.verify.responseBody), boardResponse), { board_id: data.id });
467
485
  state.data.verify.token = token;
468
- var _g = boardResponse || {}, brand = _g.brand, entity = _g.entity, entity_activities = _g.entity_activities;
469
- var licenseNumber = (_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.number;
470
- var licenseType = (_c = entity === null || entity === void 0 ? void 0 : entity.type) === null || _c === void 0 ? void 0 : _c.toLowerCase();
471
- var entityDate = (_d = entity === null || entity === void 0 ? void 0 : entity.license) === null || _d === void 0 ? void 0 : _d.issuing_date;
472
- var startDate = (_e = brand === null || brand === void 0 ? void 0 : brand.operations) === null || _e === void 0 ? void 0 : _e.start_date;
473
- var issuingDate = undefined;
474
- if (entityDate) {
475
- var date = new Date(entityDate);
476
- var formattedDate = moment(date).format('YYYY-MM-DD');
477
- issuingDate = convertNumbers2English(formattedDate);
486
+ var _f = boardResponse || {}, entity = _f.entity, entityTypes = _f.entityTypes;
487
+ if (entity) {
488
+ var _g = entity || {}, license = _g.license, type = _g.type, capital = _g.capital, activities = _g.activities, legal_name = _g.legal_name;
489
+ var legalName = legal_name;
490
+ var licenseNumber = license === null || license === void 0 ? void 0 : license.number;
491
+ var unifiedNumber = (_b = license === null || license === void 0 ? void 0 : license.additional_info) === null || _b === void 0 ? void 0 : _b.unified_number;
492
+ var licenseType = (license === null || license === void 0 ? void 0 : license.type) === 'freelance' ? BusinessType.FL : BusinessType.CR;
493
+ var entityType = type || (entityTypes === null || entityTypes === void 0 ? void 0 : entityTypes[0]);
494
+ var _h = capital || {}, paid = _h.paid, shares = _h.shares;
495
+ var entityIssueDate = (_c = entity === null || entity === void 0 ? void 0 : entity.license) === null || _c === void 0 ? void 0 : _c.issuing_date;
496
+ var entityExpiredDate = (_d = entity === null || entity === void 0 ? void 0 : entity.license) === null || _d === void 0 ? void 0 : _d.expiry_date;
497
+ var issuingDate = void 0, expiryDate = undefined;
498
+ if (entityIssueDate) {
499
+ var date = new Date(entityIssueDate);
500
+ var formattedDate = moment(date).format('YYYY-MM-DD');
501
+ issuingDate = convertNumbers2English(formattedDate);
502
+ }
503
+ if (entityExpiredDate) {
504
+ var date = new Date(entityExpiredDate);
505
+ var formattedDate = moment(date).format('YYYY-MM-DD');
506
+ expiryDate = convertNumbers2English(formattedDate);
507
+ }
508
+ if ((legalName === null || legalName === void 0 ? void 0 : legalName.en) || (legalName === null || legalName === void 0 ? void 0 : legalName.ar))
509
+ state.data.entityNameData.legalName = (legalName === null || legalName === void 0 ? void 0 : legalName.en) || (legalName === null || legalName === void 0 ? void 0 : legalName.ar);
510
+ if (licenseNumber)
511
+ state.data.entityNameData.licenseNumber = licenseNumber;
512
+ if (unifiedNumber)
513
+ state.data.entityNameData.unifiedNumber = unifiedNumber;
514
+ state.data.entityNameData.licenseType = licenseType;
515
+ if (entityType)
516
+ state.data.entityNameData.entityType = entityType;
517
+ state.data.entityNameData.issuingDate = issuingDate || moment(new Date()).format('YYYY-MM-DD');
518
+ state.data.entityNameData.expiryDate = expiryDate || moment(new Date()).format('YYYY-MM-DD');
519
+ if (activities)
520
+ state.data.entityCapitalData.activities = activities;
521
+ if (paid)
522
+ state.data.entityCapitalData.capitalPaid = paid;
523
+ if (shares === null || shares === void 0 ? void 0 : shares.count)
524
+ state.data.entityCapitalData.capitalShareCount = shares === null || shares === void 0 ? void 0 : shares.count;
525
+ if (shares === null || shares === void 0 ? void 0 : shares.value)
526
+ state.data.entityCapitalData.capitalShareValue = shares === null || shares === void 0 ? void 0 : shares.value;
527
+ state.data.entityNameData.responseBody = __assign(__assign({}, state.data.entityNameData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id });
478
528
  }
479
- if (licenseNumber)
480
- state.data.entityData.licenseNumber = licenseNumber;
481
- if (licenseType)
482
- state.data.entityData.licenseType = licenseType;
483
- var activities = (entity === null || entity === void 0 ? void 0 : entity.activities) || entity_activities || [];
484
- var selectedActivity = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
485
- var _a;
486
- return (_a = brand === null || brand === void 0 ? void 0 : brand.activities) === null || _a === void 0 ? void 0 : _a.find(function (value) { return value.id === activity.id; });
487
- });
488
- var defaultActivities = (activities === null || activities === void 0 ? void 0 : activities.length) ? [activities[0]] : [];
489
- state.data.entityData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : defaultActivities;
490
- state.data.entityData.responseBody = __assign(__assign({}, state.data.entityData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activities: activities, operationStartDate: startDate || issuingDate, selectedActivities: (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : defaultActivities });
491
529
  })
492
530
  .addCase(verifyLeadToken.rejected, function (state, action) {
493
531
  state.error = action.error.message;
@@ -515,10 +553,10 @@ export var entitySlice = createSlice({
515
553
  state.error = null;
516
554
  })
517
555
  .addCase(verifyEntityLeadOTP.fulfilled, function (state, action) {
518
- var _a, _b, _c, _d, _e;
556
+ var _a, _b, _c, _d;
519
557
  state.loading = false;
520
558
  state.error = null;
521
- var _f = action.payload, data = _f.data, boardResponse = _f.boardResponse, formData = _f.formData;
559
+ var _e = action.payload, data = _e.data, boardResponse = _e.boardResponse, formData = _e.formData;
522
560
  var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
523
561
  if (description) {
524
562
  state.error = description;
@@ -527,133 +565,113 @@ export var entitySlice = createSlice({
527
565
  state.data.otpData = formData;
528
566
  state.data.otpData.responseBody = data;
529
567
  state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), boardResponse);
530
- var _g = boardResponse || {}, brand = _g.brand, entity = _g.entity, entity_activities = _g.entity_activities;
531
- var licenseNumber = (_b = entity === null || entity === void 0 ? void 0 : entity.license) === null || _b === void 0 ? void 0 : _b.number;
532
- var licenseType = (_c = entity === null || entity === void 0 ? void 0 : entity.type) === null || _c === void 0 ? void 0 : _c.toLowerCase();
533
- var entityDate = (_d = entity === null || entity === void 0 ? void 0 : entity.license) === null || _d === void 0 ? void 0 : _d.issuing_date;
534
- var startDate = (_e = brand === null || brand === void 0 ? void 0 : brand.operations) === null || _e === void 0 ? void 0 : _e.start_date;
535
- var issuingDate = undefined;
536
- if (entityDate) {
537
- var date = new Date(entityDate);
568
+ var _f = boardResponse || {}, entity = _f.entity, entityTypes = _f.entityTypes;
569
+ var _g = entity || {}, license = _g.license, type = _g.type, capital = _g.capital, activities = _g.activities, legal_name = _g.legal_name;
570
+ var legalName = legal_name;
571
+ var licenseNumber = license === null || license === void 0 ? void 0 : license.number;
572
+ var unifiedNumber = (_b = license === null || license === void 0 ? void 0 : license.additional_info) === null || _b === void 0 ? void 0 : _b.unified_number;
573
+ var licenseType = (license === null || license === void 0 ? void 0 : license.type) === 'freelance' ? BusinessType.FL : BusinessType.CR;
574
+ var entityType = type || (entityTypes === null || entityTypes === void 0 ? void 0 : entityTypes[0]);
575
+ var _h = capital || {}, paid = _h.paid, shares = _h.shares;
576
+ var entityIssueDate = (_c = entity === null || entity === void 0 ? void 0 : entity.license) === null || _c === void 0 ? void 0 : _c.issuing_date;
577
+ var entityExpiredDate = (_d = entity === null || entity === void 0 ? void 0 : entity.license) === null || _d === void 0 ? void 0 : _d.expiry_date;
578
+ var issuingDate, expiryDate = undefined;
579
+ if (entityIssueDate) {
580
+ var date = new Date(entityIssueDate);
538
581
  var formattedDate = moment(date).format('YYYY-MM-DD');
539
582
  issuingDate = convertNumbers2English(formattedDate);
540
583
  }
584
+ if (entityExpiredDate) {
585
+ var date = new Date(entityExpiredDate);
586
+ var formattedDate = moment(date).format('YYYY-MM-DD');
587
+ expiryDate = convertNumbers2English(formattedDate);
588
+ }
589
+ if ((legalName === null || legalName === void 0 ? void 0 : legalName.en) || (legalName === null || legalName === void 0 ? void 0 : legalName.ar))
590
+ state.data.entityNameData.legalName = (legalName === null || legalName === void 0 ? void 0 : legalName.en) || (legalName === null || legalName === void 0 ? void 0 : legalName.ar);
541
591
  if (licenseNumber)
542
- state.data.entityData.licenseNumber = licenseNumber;
543
- if (licenseType)
544
- state.data.entityData.licenseType = licenseType;
545
- var activities = (entity === null || entity === void 0 ? void 0 : entity.activities) || entity_activities || [];
546
- var selectedActivity = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
547
- var _a;
548
- return (_a = brand === null || brand === void 0 ? void 0 : brand.activities) === null || _a === void 0 ? void 0 : _a.find(function (value) { return value.id === activity.id; });
549
- });
550
- var defaultActivities = (activities === null || activities === void 0 ? void 0 : activities.length) ? [activities[0]] : [];
551
- state.data.entityData.responseBody = __assign(__assign({}, state.data.entityData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activities: activities, selectedActivities: (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : defaultActivities, operationStartDate: startDate || issuingDate });
592
+ state.data.entityNameData.licenseNumber = licenseNumber;
593
+ if (unifiedNumber)
594
+ state.data.entityNameData.unifiedNumber = unifiedNumber;
595
+ state.data.entityNameData.licenseType = licenseType;
596
+ if (entityType)
597
+ state.data.entityNameData.entityType = entityType;
598
+ state.data.entityNameData.issuingDate = issuingDate || moment(new Date()).format('YYYY-MM-DD');
599
+ state.data.entityNameData.expiryDate = expiryDate || moment(new Date()).format('YYYY-MM-DD');
600
+ if (activities)
601
+ state.data.entityCapitalData.activities = activities;
602
+ if (paid)
603
+ state.data.entityCapitalData.capitalPaid = paid;
604
+ if (shares === null || shares === void 0 ? void 0 : shares.count)
605
+ state.data.entityCapitalData.capitalShareCount = shares === null || shares === void 0 ? void 0 : shares.count;
606
+ if (shares === null || shares === void 0 ? void 0 : shares.value)
607
+ state.data.entityCapitalData.capitalShareValue = shares === null || shares === void 0 ? void 0 : shares.value;
608
+ state.data.entityNameData = __assign(__assign({}, state.data.entityNameData), { responseBody: __assign(__assign({}, state.data.entityNameData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id }) });
552
609
  })
553
610
  .addCase(verifyEntityLeadOTP.rejected, function (state, action) {
554
611
  state.loading = false;
555
612
  state.error = action.error.message;
556
613
  })
557
- .addCase(updateEntity.pending, function (state) {
614
+ .addCase(updateEntityName.pending, function (state) {
558
615
  state.loading = true;
559
616
  state.error = null;
560
617
  })
561
- .addCase(updateEntity.fulfilled, function (state, action) {
562
- var _a;
618
+ .addCase(updateEntityName.fulfilled, function (state, action) {
563
619
  state.loading = false;
564
620
  state.error = null;
565
- var _b = action.payload, data = _b.data, formData = _b.formData;
566
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
567
- if (description) {
568
- state.error = description;
569
- return;
570
- }
571
- state.data.entityData = formData;
572
- state.data.entityData.responseBody = __assign(__assign({}, state.data.entityData.responseBody), { data: data });
621
+ var _a = action.payload, data = _a.data, formData = _a.formData;
622
+ var _b = data || {}, activityList = _b.activityList, rest = __rest(_b, ["activityList"]);
623
+ state.data.entityNameData = formData;
624
+ state.data.entityNameData.responseBody = __assign(__assign({}, state.data.entityNameData.responseBody), { rest: rest });
625
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { activityList: activityList });
626
+ if (rest === null || rest === void 0 ? void 0 : rest.activities)
627
+ state.data.entityCapitalData = __assign(__assign({}, state.data.entityCapitalData), { activities: rest === null || rest === void 0 ? void 0 : rest.activities });
573
628
  })
574
- .addCase(updateEntity.rejected, function (state, action) {
629
+ .addCase(updateEntityName.rejected, function (state, action) {
575
630
  state.loading = false;
576
631
  state.error = action.error.message;
577
632
  })
578
- .addCase(retrieveBoardDetails.pending, function (state) {
579
- state.error = null;
580
- state.loading = true;
633
+ .addCase(uploadArticle.pending, function (state) {
634
+ state.uploadingArticleError = null;
635
+ state.uploadingArticle = true;
581
636
  })
582
- .addCase(retrieveBoardDetails.fulfilled, function (state, action) {
583
- state.error = null;
584
- state.loading = false;
585
- var data = (action.payload || {}).data;
586
- state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
637
+ .addCase(uploadArticle.fulfilled, function (state, action) {
638
+ state.uploadingArticleError = null;
639
+ state.uploadingArticle = false;
640
+ var data = action.payload.data;
641
+ state.data.entityNameData.articleId = data === null || data === void 0 ? void 0 : data.id;
587
642
  })
588
- .addCase(retrieveBoardDetails.rejected, function (state, action) {
589
- state.error = action.error.message;
590
- state.loading = false;
643
+ .addCase(uploadArticle.rejected, function (state) {
644
+ state.uploadingArticle = false;
645
+ state.uploadingArticleError = 'file_upload_article_error';
591
646
  })
592
- .addCase(retrieveDataList.pending, function (state) {
647
+ .addCase(updateEntityCapital.pending, function (state) {
593
648
  state.loading = true;
594
649
  state.error = null;
595
650
  })
596
- .addCase(retrieveDataList.fulfilled, function (state, action) {
597
- var _a, _b, _c, _d, _e, _f;
651
+ .addCase(updateEntityCapital.fulfilled, function (state, action) {
598
652
  state.loading = false;
599
653
  state.error = null;
600
- var payload = action.payload;
601
- state.data.customersData.responseBody = payload;
602
- var brand = (state.data.verify.responseBody || {}).brand;
603
- var _g = (brand === null || brand === void 0 ? void 0 : brand.operations) || {}, customer_base = _g.customer_base, sales = _g.sales;
604
- var customerBases = ((_a = payload.customerBases) === null || _a === void 0 ? void 0 : _a.list) || [];
605
- var customerBase = undefined;
606
- if ((customerBases === null || customerBases === void 0 ? void 0 : customerBases.length) > 1)
607
- customerBase = [customerBases === null || customerBases === void 0 ? void 0 : customerBases[1], customerBases[0]];
608
- else if ((customerBases === null || customerBases === void 0 ? void 0 : customerBases.length) === 1)
609
- customerBase = [customerBases[0]];
610
- if (((_b = customer_base === null || customer_base === void 0 ? void 0 : customer_base.locations) === null || _b === void 0 ? void 0 : _b.length) > 0) {
611
- customerBase = customerBases === null || customerBases === void 0 ? void 0 : customerBases.filter(function (base) {
612
- var _a;
613
- return (_a = customer_base === null || customer_base === void 0 ? void 0 : customer_base.locations) === null || _a === void 0 ? void 0 : _a.find(function (value) { return value.id === base.id; });
614
- });
615
- }
616
- var expectedSales = ((_c = payload.expectedSales) === null || _c === void 0 ? void 0 : _c.list) || [];
617
- var expectedSale = (_e = (_d = expectedSales === null || expectedSales === void 0 ? void 0 : expectedSales[0]) === null || _d === void 0 ? void 0 : _d.sub) === null || _e === void 0 ? void 0 : _e[4];
618
- if ((sales === null || sales === void 0 ? void 0 : sales.length) > 0) {
619
- expectedSale = expectedSales === null || expectedSales === void 0 ? void 0 : expectedSales.find(function (sale) {
620
- var _a;
621
- return (_a = sales === null || sales === void 0 ? void 0 : sales.sub) === null || _a === void 0 ? void 0 : _a.find(function (s) { return s.id === sale.id; });
622
- });
623
- }
624
- var expectedCustomerSales = ((_f = payload.expectedCustomerSales) === null || _f === void 0 ? void 0 : _f.list) || [];
625
- var expectedCustomerSale = expectedCustomerSales === null || expectedCustomerSales === void 0 ? void 0 : expectedCustomerSales[3];
626
- if ((customer_base === null || customer_base === void 0 ? void 0 : customer_base.length) > 0) {
627
- expectedCustomerSale = expectedCustomerSales === null || expectedCustomerSales === void 0 ? void 0 : expectedCustomerSales.find(function (base) {
628
- return customer_base.id === base.id;
629
- });
630
- }
631
- state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { customerBases: customerBases, expectedSales: expectedSales, expectedCustomerSales: expectedCustomerSales });
632
- if (!!customerBase)
633
- state.data.customersData.customerLocations = customerBase;
634
- if (!!expectedSale)
635
- state.data.customersData.expectedSale = expectedSale;
636
- if (!!expectedCustomerSale)
637
- state.data.customersData.expectedCustomer = expectedCustomerSale;
654
+ var _a = action.payload, data = _a.data, formData = _a.formData;
655
+ state.data.entityCapitalData = formData;
656
+ state.data.entityCapitalData.responseBody = __assign(__assign({}, state.data.entityCapitalData.responseBody), { data: data });
638
657
  })
639
- .addCase(retrieveDataList.rejected, function (state, action) {
658
+ .addCase(updateEntityCapital.rejected, function (state, action) {
640
659
  state.loading = false;
641
660
  state.error = action.error.message;
642
661
  })
643
- .addCase(updateCustomersInfo.pending, function (state) {
644
- state.loading = true;
662
+ .addCase(retrieveBoardDetails.pending, function (state) {
645
663
  state.error = null;
664
+ state.loading = true;
646
665
  })
647
- .addCase(updateCustomersInfo.fulfilled, function (state, action) {
648
- state.loading = false;
666
+ .addCase(retrieveBoardDetails.fulfilled, function (state, action) {
649
667
  state.error = null;
650
- var _a = action.payload, data = _a.data, formData = _a.formData;
651
- state.data.customersData = formData;
652
- state.data.customersData.responseBody = data;
653
- })
654
- .addCase(updateCustomersInfo.rejected, function (state, action) {
655
668
  state.loading = false;
669
+ var data = (action.payload || {}).data;
670
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
671
+ })
672
+ .addCase(retrieveBoardDetails.rejected, function (state, action) {
656
673
  state.error = action.error.message;
674
+ state.loading = false;
657
675
  })
658
676
  .addCase(updateBoardSuccess.fulfilled, function (state, action) {
659
677
  var _a;
@@ -675,23 +693,9 @@ export var entitySlice = createSlice({
675
693
  .addCase(updateBoardSuccess.rejected, function (state, action) {
676
694
  state.loading = false;
677
695
  state.error = action.error.message;
678
- })
679
- .addCase(uploadArticle.pending, function (state) {
680
- state.error = null;
681
- state.uploading = true;
682
- })
683
- .addCase(uploadArticle.fulfilled, function (state, action) {
684
- state.error = null;
685
- state.uploading = false;
686
- var data = action.payload.data;
687
- state.data.entityData.articleId = data === null || data === void 0 ? void 0 : data.id;
688
- })
689
- .addCase(uploadArticle.rejected, function (state) {
690
- state.uploading = false;
691
- state.error = 'file_upload_error';
692
696
  });
693
697
  }
694
698
  });
695
- export var clearError = (_a = entitySlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen;
699
+ export var clearError = (_a = entitySlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen, uploadingStatus = _a.uploadingStatus, clearArticleId = _a.clearArticleId;
696
700
  export default entitySlice.reducer;
697
701
  export var entitySelector = function (state) { return state.entity; };