@os1-platform/dispatch-mobile 2.1.21 → 2.1.23

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 (614) hide show
  1. package/README.md +122 -11
  2. package/lib/commonjs/analytics/firebase/FirebaseLogging.js +1 -1
  3. package/lib/commonjs/analytics/firebase/FirebaseLogging.js.map +1 -1
  4. package/lib/commonjs/analytics/sentry/SentryAnalyticsSingleton.js +5 -5
  5. package/lib/commonjs/analytics/sentry/SentryAnalyticsSingleton.js.map +1 -1
  6. package/lib/commonjs/analytics/sentry/SentryAnalyticsUtils.js +9 -10
  7. package/lib/commonjs/analytics/sentry/SentryAnalyticsUtils.js.map +1 -1
  8. package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +16 -6
  9. package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
  10. package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js +8 -1
  11. package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
  12. package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +8 -10
  13. package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
  14. package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +2 -2
  15. package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
  16. package/lib/commonjs/components/executiontasks/collectPayment/CollectPayment.js +40 -0
  17. package/lib/commonjs/components/executiontasks/collectPayment/CollectPayment.js.map +1 -0
  18. package/lib/commonjs/components/executiontasks/collectPayment/CollectPaymentSchema.js +35 -0
  19. package/lib/commonjs/components/executiontasks/collectPayment/CollectPaymentSchema.js.map +1 -0
  20. package/lib/commonjs/components/executiontasks/collectPayment/PaymentStyles.js +102 -0
  21. package/lib/commonjs/components/executiontasks/collectPayment/PaymentStyles.js.map +1 -0
  22. package/lib/commonjs/components/executiontasks/collectPayment/PaymentUtils.js +151 -0
  23. package/lib/commonjs/components/executiontasks/collectPayment/PaymentUtils.js.map +1 -0
  24. package/lib/commonjs/components/executiontasks/collectPayment/components/CompletePayment.js +188 -0
  25. package/lib/commonjs/components/executiontasks/collectPayment/components/CompletePayment.js.map +1 -0
  26. package/lib/commonjs/components/executiontasks/collectPayment/components/CustomContactsModal.js +2 -0
  27. package/lib/commonjs/components/executiontasks/collectPayment/components/CustomContactsModal.js.map +1 -0
  28. package/lib/commonjs/components/executiontasks/collectPayment/components/InitPayment.js +442 -0
  29. package/lib/commonjs/components/executiontasks/collectPayment/components/InitPayment.js.map +1 -0
  30. package/lib/commonjs/components/executiontasks/collectPayment/components/PaymentContactDetails.js +538 -0
  31. package/lib/commonjs/components/executiontasks/collectPayment/components/PaymentContactDetails.js.map +1 -0
  32. package/lib/commonjs/components/executiontasks/collectPayment/components/ProcessPayment.js +887 -0
  33. package/lib/commonjs/components/executiontasks/collectPayment/components/ProcessPayment.js.map +1 -0
  34. package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +14 -20
  35. package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
  36. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +24 -27
  37. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  38. package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +1 -1
  39. package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
  40. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +2 -3
  41. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
  42. package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +1 -1
  43. package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
  44. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +9 -3
  45. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  46. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +2 -2
  47. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
  48. package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +13 -14
  49. package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
  50. package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js +2 -2
  51. package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -1
  52. package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +11 -12
  53. package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
  54. package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js +3 -3
  55. package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
  56. package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js +1 -1
  57. package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
  58. package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +2 -2
  59. package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
  60. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +2 -2
  61. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  62. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +11 -13
  63. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  64. package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js +11 -2
  65. package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js.map +1 -1
  66. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +2 -2
  67. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
  68. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +5 -6
  69. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  70. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +2 -2
  71. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  72. package/lib/commonjs/components/executiontasks/pickup/PickupET.js +14 -20
  73. package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
  74. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +18 -24
  75. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  76. package/lib/commonjs/components/executiontasks/scan/ScanET.js +4 -6
  77. package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -1
  78. package/lib/commonjs/components/executiontasks/scan/constants.js.map +1 -1
  79. package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -1
  80. package/lib/commonjs/components/executiontasks/scan/modalConstant.js.map +1 -1
  81. package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js +4 -5
  82. package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
  83. package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +1 -2
  84. package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -1
  85. package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js +2 -4
  86. package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
  87. package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +3 -6
  88. package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
  89. package/lib/commonjs/components/executiontasks/scan/utils.js +14 -8
  90. package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -1
  91. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +2 -2
  92. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
  93. package/lib/commonjs/components/executiontasks/validateOTP/constants.js.map +1 -1
  94. package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +2 -2
  95. package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
  96. package/lib/commonjs/components/executiontasks/validateOTP/utils.js +1 -1
  97. package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -1
  98. package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js +2 -2
  99. package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
  100. package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +2 -2
  101. package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
  102. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +2 -2
  103. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
  104. package/lib/commonjs/components/widgets/AlertDisplay.js +1 -1
  105. package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
  106. package/lib/commonjs/components/widgets/CancelOrderDialog.js +2 -2
  107. package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
  108. package/lib/commonjs/components/widgets/Card.js +1 -2
  109. package/lib/commonjs/components/widgets/Card.js.map +1 -1
  110. package/lib/commonjs/components/widgets/GoBackModal.js +1 -1
  111. package/lib/commonjs/components/widgets/GoBackModal.js.map +1 -1
  112. package/lib/commonjs/components/widgets/IconButton.js +20 -23
  113. package/lib/commonjs/components/widgets/IconButton.js.map +1 -1
  114. package/lib/commonjs/components/widgets/ModalWidget.js +3 -1
  115. package/lib/commonjs/components/widgets/ModalWidget.js.map +1 -1
  116. package/lib/commonjs/components/widgets/ProgressDialog.js +3 -3
  117. package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -1
  118. package/lib/commonjs/components/widgets/SearchBar.js +1 -1
  119. package/lib/commonjs/components/widgets/SearchBar.js.map +1 -1
  120. package/lib/commonjs/components/widgets/SnackBarCustom.js +22 -21
  121. package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
  122. package/lib/commonjs/components/widgets/SplitTextInput.js +10 -11
  123. package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -1
  124. package/lib/commonjs/components/widgets/TabsComponent.js +1 -1
  125. package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -1
  126. package/lib/commonjs/components/widgets/Timer.js +40 -0
  127. package/lib/commonjs/components/widgets/Timer.js.map +1 -0
  128. package/lib/commonjs/constants/apiConstants.js +4 -1
  129. package/lib/commonjs/constants/apiConstants.js.map +1 -1
  130. package/lib/commonjs/constants/constants.js +4 -1
  131. package/lib/commonjs/constants/constants.js.map +1 -1
  132. package/lib/commonjs/errors/BaseError.js +3 -3
  133. package/lib/commonjs/events/EventDispatcher.js +5 -1
  134. package/lib/commonjs/events/EventDispatcher.js.map +1 -1
  135. package/lib/commonjs/events/constants.js +2 -1
  136. package/lib/commonjs/events/constants.js.map +1 -1
  137. package/lib/commonjs/events/index.js +1 -1
  138. package/lib/commonjs/events/index.js.map +1 -1
  139. package/lib/commonjs/events/interface.js.map +1 -1
  140. package/lib/commonjs/icons/CircleMark.js +27 -0
  141. package/lib/commonjs/icons/CircleMark.js.map +1 -0
  142. package/lib/commonjs/icons/FailedIcon.js +69 -0
  143. package/lib/commonjs/icons/FailedIcon.js.map +1 -0
  144. package/lib/commonjs/icons/FailureCloseIcon.js +42 -0
  145. package/lib/commonjs/icons/FailureCloseIcon.js.map +1 -0
  146. package/lib/commonjs/icons/ScanIcon.js +1 -1
  147. package/lib/commonjs/icons/ScanIcon.js.map +1 -1
  148. package/lib/commonjs/icons/SuccessCompleteIcon.js +42 -0
  149. package/lib/commonjs/icons/SuccessCompleteIcon.js.map +1 -0
  150. package/lib/commonjs/icons/file.js +1 -1
  151. package/lib/commonjs/icons/file.js.map +1 -1
  152. package/lib/commonjs/index.js +2 -2
  153. package/lib/commonjs/index.js.map +1 -1
  154. package/lib/commonjs/locale/i18n.js +1 -1
  155. package/lib/commonjs/locale/i18n.js.map +1 -1
  156. package/lib/commonjs/locale/util.js +1 -1
  157. package/lib/commonjs/locale/util.js.map +1 -1
  158. package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +11 -9
  159. package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
  160. package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js +6 -6
  161. package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
  162. package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js +6 -6
  163. package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
  164. package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js +7 -7
  165. package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
  166. package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js +6 -6
  167. package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
  168. package/lib/commonjs/manager/location/LocationManager.js +6 -6
  169. package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
  170. package/lib/commonjs/manager/sdk/DispatchSDKManager.js +8 -8
  171. package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
  172. package/lib/commonjs/manager/sdk/DispatchSdkCache.js +6 -6
  173. package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
  174. package/lib/commonjs/manager/sdk/callbacksHandler.js +4 -4
  175. package/lib/commonjs/manager/sdk/callbacksHandler.js.map +1 -1
  176. package/lib/commonjs/manager/syncmanager/AppSyncManager.js +7 -7
  177. package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
  178. package/lib/commonjs/manager/syncmanager/database.js +2 -2
  179. package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
  180. package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +2 -2
  181. package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
  182. package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +6 -6
  183. package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
  184. package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +8 -16
  185. package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
  186. package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +6 -7
  187. package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
  188. package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +7 -8
  189. package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
  190. package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +5 -9
  191. package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
  192. package/lib/commonjs/models/DispatchModels.js.map +1 -1
  193. package/lib/commonjs/models/execTasks/ETConfig.js +3 -0
  194. package/lib/commonjs/models/execTasks/ETConfig.js.map +1 -1
  195. package/lib/commonjs/models/sdk.js.map +1 -1
  196. package/lib/commonjs/native/signature/SignatureCapture.js +5 -5
  197. package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
  198. package/lib/commonjs/network/GraphQLClient.js +15 -19
  199. package/lib/commonjs/network/GraphQLClient.js.map +1 -1
  200. package/lib/commonjs/network/NetworkClient.js +30 -3
  201. package/lib/commonjs/network/NetworkClient.js.map +1 -1
  202. package/lib/commonjs/network/NetworkUtils.js +2 -5
  203. package/lib/commonjs/network/NetworkUtils.js.map +1 -1
  204. package/lib/commonjs/network/Queries.js.map +1 -1
  205. package/lib/commonjs/network/client.js +5 -5
  206. package/lib/commonjs/network/client.js.map +1 -1
  207. package/lib/commonjs/resources/Login.js +4 -4
  208. package/lib/commonjs/resources/Login.js.map +1 -1
  209. package/lib/commonjs/resources/network.js +4 -4
  210. package/lib/commonjs/resources/network.js.map +1 -1
  211. package/lib/commonjs/styles/executionTasks/CommonStyles.js +13 -3
  212. package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
  213. package/lib/commonjs/ui/screens/CancellationScreen.js +7 -8
  214. package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
  215. package/lib/commonjs/ui/screens/CaptureInputScreen.js +8 -9
  216. package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
  217. package/lib/commonjs/ui/screens/CollectPaymentScreen.js +251 -0
  218. package/lib/commonjs/ui/screens/CollectPaymentScreen.js.map +1 -0
  219. package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +7 -8
  220. package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
  221. package/lib/commonjs/ui/screens/DeliverScreen.js +8 -9
  222. package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
  223. package/lib/commonjs/ui/screens/DisplayScreen.js +8 -9
  224. package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
  225. package/lib/commonjs/ui/screens/DoodleScreen.js +8 -9
  226. package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
  227. package/lib/commonjs/ui/screens/DropCashScreen.js +43 -11
  228. package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
  229. package/lib/commonjs/ui/screens/ETScreensIndex.js +8 -1
  230. package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -1
  231. package/lib/commonjs/ui/screens/FormsScreen.js +8 -9
  232. package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
  233. package/lib/commonjs/ui/screens/GeofenceScreen.js +8 -9
  234. package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
  235. package/lib/commonjs/ui/screens/HttpRequestScreen.js +7 -8
  236. package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
  237. package/lib/commonjs/ui/screens/ImageCaptureScreen.js +8 -9
  238. package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
  239. package/lib/commonjs/ui/screens/PaymentScreen.js +9 -9
  240. package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
  241. package/lib/commonjs/ui/screens/PickupScreen.js +8 -9
  242. package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
  243. package/lib/commonjs/ui/screens/ScanScreen.js +8 -10
  244. package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -1
  245. package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +13 -9
  246. package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
  247. package/lib/commonjs/ui/screens/ValidateOTPScreen.js +8 -9
  248. package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -1
  249. package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js +3 -3
  250. package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
  251. package/lib/commonjs/ui/uiConfig/RouteParams.js +2 -1
  252. package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
  253. package/lib/commonjs/utils/ApiUtils.js +3 -1
  254. package/lib/commonjs/utils/ApiUtils.js.map +1 -1
  255. package/lib/commonjs/utils/ExecTaskUtils.js +35 -5
  256. package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
  257. package/lib/commonjs/utils/Logger.js +6 -7
  258. package/lib/commonjs/utils/Logger.js.map +1 -1
  259. package/lib/commonjs/utils/NetworkUtil.js +4 -4
  260. package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
  261. package/lib/commonjs/utils/SdkUtils.js +2 -2
  262. package/lib/commonjs/utils/SdkUtils.js.map +1 -1
  263. package/lib/commonjs/utils/SyncManagerUtils.js +3 -3
  264. package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
  265. package/lib/commonjs/utils/context/paymentContext.js +9 -0
  266. package/lib/commonjs/utils/context/paymentContext.js.map +1 -0
  267. package/lib/commonjs/utils/fcm/FCM.js +22 -4
  268. package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
  269. package/lib/commonjs/utils/fcm/FcmUtils.js +12 -2
  270. package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
  271. package/lib/commonjs/utils/helper.js +6 -6
  272. package/lib/commonjs/utils/helper.js.map +1 -1
  273. package/lib/commonjs/utils/hooks/useModal.js +4 -3
  274. package/lib/commonjs/utils/hooks/useModal.js.map +1 -1
  275. package/lib/commonjs/utils/hooks/useTimer.js.map +1 -1
  276. package/lib/commonjs/utils/loginHelper.js +1 -1
  277. package/lib/commonjs/utils/loginHelper.js.map +1 -1
  278. package/lib/commonjs/utils/storage.js +11 -17
  279. package/lib/commonjs/utils/storage.js.map +1 -1
  280. package/lib/commonjs/utils/utils.js +2 -3
  281. package/lib/commonjs/utils/utils.js.map +1 -1
  282. package/lib/module/analytics/sentry/SentryAnalyticsSingleton.js +5 -5
  283. package/lib/module/analytics/sentry/SentryAnalyticsSingleton.js.map +1 -1
  284. package/lib/module/analytics/sentry/SentryAnalyticsUtils.js +7 -8
  285. package/lib/module/analytics/sentry/SentryAnalyticsUtils.js.map +1 -1
  286. package/lib/module/components/dispatch/DispatchExecNavigator.js +14 -4
  287. package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
  288. package/lib/module/components/executiontasks/ExecutionTasksIndex.js +2 -1
  289. package/lib/module/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
  290. package/lib/module/components/executiontasks/cancellation/CancelET.js +6 -8
  291. package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
  292. package/lib/module/components/executiontasks/collectPayment/CollectPayment.js +32 -0
  293. package/lib/module/components/executiontasks/collectPayment/CollectPayment.js.map +1 -0
  294. package/lib/module/components/executiontasks/collectPayment/CollectPaymentSchema.js +29 -0
  295. package/lib/module/components/executiontasks/collectPayment/CollectPaymentSchema.js.map +1 -0
  296. package/lib/module/components/executiontasks/collectPayment/PaymentStyles.js +96 -0
  297. package/lib/module/components/executiontasks/collectPayment/PaymentStyles.js.map +1 -0
  298. package/lib/module/components/executiontasks/collectPayment/PaymentUtils.js +132 -0
  299. package/lib/module/components/executiontasks/collectPayment/PaymentUtils.js.map +1 -0
  300. package/lib/module/components/executiontasks/collectPayment/components/CompletePayment.js +179 -0
  301. package/lib/module/components/executiontasks/collectPayment/components/CompletePayment.js.map +1 -0
  302. package/lib/module/components/executiontasks/collectPayment/components/CustomContactsModal.js +2 -0
  303. package/lib/module/components/executiontasks/collectPayment/components/CustomContactsModal.js.map +1 -0
  304. package/lib/module/components/executiontasks/collectPayment/components/InitPayment.js +433 -0
  305. package/lib/module/components/executiontasks/collectPayment/components/InitPayment.js.map +1 -0
  306. package/lib/module/components/executiontasks/collectPayment/components/PaymentContactDetails.js +531 -0
  307. package/lib/module/components/executiontasks/collectPayment/components/PaymentContactDetails.js.map +1 -0
  308. package/lib/module/components/executiontasks/collectPayment/components/ProcessPayment.js +880 -0
  309. package/lib/module/components/executiontasks/collectPayment/components/ProcessPayment.js.map +1 -0
  310. package/lib/module/components/executiontasks/deliver/DeliverET.js +13 -19
  311. package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
  312. package/lib/module/components/executiontasks/deliver/SLDeliverET.js +21 -24
  313. package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  314. package/lib/module/components/executiontasks/doodle/SignatureET.js +0 -1
  315. package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
  316. package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
  317. package/lib/module/components/executiontasks/dropCash/SLDropCash.js +6 -1
  318. package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  319. package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +11 -12
  320. package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
  321. package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +9 -10
  322. package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
  323. package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js +1 -1
  324. package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  325. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +9 -11
  326. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  327. package/lib/module/components/executiontasks/payments/PaymentUtils.js +11 -2
  328. package/lib/module/components/executiontasks/payments/PaymentUtils.js.map +1 -1
  329. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +3 -4
  330. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  331. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  332. package/lib/module/components/executiontasks/pickup/PickupET.js +13 -19
  333. package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
  334. package/lib/module/components/executiontasks/pickup/SLPickupET.js +15 -21
  335. package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  336. package/lib/module/components/executiontasks/scan/ScanET.js +2 -4
  337. package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -1
  338. package/lib/module/components/executiontasks/scan/constants.js.map +1 -1
  339. package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -1
  340. package/lib/module/components/executiontasks/scan/modalConstant.js.map +1 -1
  341. package/lib/module/components/executiontasks/scan/sub_components/CScanner.js +3 -4
  342. package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
  343. package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +0 -1
  344. package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -1
  345. package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +0 -2
  346. package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
  347. package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +1 -4
  348. package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
  349. package/lib/module/components/executiontasks/scan/utils.js +11 -6
  350. package/lib/module/components/executiontasks/scan/utils.js.map +1 -1
  351. package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
  352. package/lib/module/components/executiontasks/validateOTP/constants.js.map +1 -1
  353. package/lib/module/components/widgets/Card.js +0 -1
  354. package/lib/module/components/widgets/Card.js.map +1 -1
  355. package/lib/module/components/widgets/IconButton.js +19 -22
  356. package/lib/module/components/widgets/IconButton.js.map +1 -1
  357. package/lib/module/components/widgets/ModalWidget.js +1 -0
  358. package/lib/module/components/widgets/ModalWidget.js.map +1 -1
  359. package/lib/module/components/widgets/ProgressDialog.js +2 -2
  360. package/lib/module/components/widgets/ProgressDialog.js.map +1 -1
  361. package/lib/module/components/widgets/SnackBarCustom.js +21 -20
  362. package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
  363. package/lib/module/components/widgets/SplitTextInput.js +9 -10
  364. package/lib/module/components/widgets/SplitTextInput.js.map +1 -1
  365. package/lib/module/components/widgets/Timer.js +32 -0
  366. package/lib/module/components/widgets/Timer.js.map +1 -0
  367. package/lib/module/constants/apiConstants.js +4 -1
  368. package/lib/module/constants/apiConstants.js.map +1 -1
  369. package/lib/module/constants/constants.js +3 -0
  370. package/lib/module/constants/constants.js.map +1 -1
  371. package/lib/module/errors/BaseError.js +3 -3
  372. package/lib/module/events/EventDispatcher.js +3 -0
  373. package/lib/module/events/EventDispatcher.js.map +1 -1
  374. package/lib/module/events/constants.js +2 -1
  375. package/lib/module/events/constants.js.map +1 -1
  376. package/lib/module/events/interface.js.map +1 -1
  377. package/lib/module/icons/CircleMark.js +20 -0
  378. package/lib/module/icons/CircleMark.js.map +1 -0
  379. package/lib/module/icons/FailedIcon.js +62 -0
  380. package/lib/module/icons/FailedIcon.js.map +1 -0
  381. package/lib/module/icons/FailureCloseIcon.js +35 -0
  382. package/lib/module/icons/FailureCloseIcon.js.map +1 -0
  383. package/lib/module/icons/SuccessCompleteIcon.js +35 -0
  384. package/lib/module/icons/SuccessCompleteIcon.js.map +1 -0
  385. package/lib/module/manager/dispatch/DispatchStateContainer.js +10 -8
  386. package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
  387. package/lib/module/manager/dispatchCodes/EventCodeContainer.js +5 -5
  388. package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
  389. package/lib/module/manager/dispatchCodes/EventCodeRepo.js +5 -5
  390. package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
  391. package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js +5 -5
  392. package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
  393. package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js +5 -5
  394. package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
  395. package/lib/module/manager/location/LocationManager.js +5 -5
  396. package/lib/module/manager/location/LocationManager.js.map +1 -1
  397. package/lib/module/manager/sdk/DispatchSDKManager.js +6 -6
  398. package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
  399. package/lib/module/manager/sdk/DispatchSdkCache.js +5 -5
  400. package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
  401. package/lib/module/manager/sdk/callbacksHandler.js +3 -3
  402. package/lib/module/manager/syncmanager/AppSyncManager.js +5 -5
  403. package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
  404. package/lib/module/manager/syncmanager/DBConfig.js +1 -0
  405. package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
  406. package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
  407. package/lib/module/manager/syncmanager/document/DocumentManager.js +5 -5
  408. package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
  409. package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +6 -14
  410. package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
  411. package/lib/module/manager/syncmanager/events/ETEventsManager.js +5 -6
  412. package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
  413. package/lib/module/manager/syncmanager/events/EventsSyncManager.js +5 -6
  414. package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
  415. package/lib/module/manager/syncmanager/events/SyncHttpClient.js +3 -7
  416. package/lib/module/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
  417. package/lib/module/models/DispatchModels.js.map +1 -1
  418. package/lib/module/models/execTasks/ETConfig.js +3 -0
  419. package/lib/module/models/execTasks/ETConfig.js.map +1 -1
  420. package/lib/module/models/sdk.js.map +1 -1
  421. package/lib/module/native/signature/SignatureCapture.js +4 -4
  422. package/lib/module/network/GraphQLClient.js +14 -18
  423. package/lib/module/network/GraphQLClient.js.map +1 -1
  424. package/lib/module/network/NetworkClient.js +29 -2
  425. package/lib/module/network/NetworkClient.js.map +1 -1
  426. package/lib/module/network/NetworkUtils.js +1 -4
  427. package/lib/module/network/NetworkUtils.js.map +1 -1
  428. package/lib/module/network/Queries.js.map +1 -1
  429. package/lib/module/network/client.js +4 -4
  430. package/lib/module/network/client.js.map +1 -1
  431. package/lib/module/resources/Login.js +3 -3
  432. package/lib/module/resources/network.js +3 -3
  433. package/lib/module/styles/executionTasks/CommonStyles.js +12 -2
  434. package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
  435. package/lib/module/ui/screens/CancellationScreen.js +5 -6
  436. package/lib/module/ui/screens/CancellationScreen.js.map +1 -1
  437. package/lib/module/ui/screens/CaptureInputScreen.js +6 -7
  438. package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
  439. package/lib/module/ui/screens/CollectPaymentScreen.js +244 -0
  440. package/lib/module/ui/screens/CollectPaymentScreen.js.map +1 -0
  441. package/lib/module/ui/screens/CompleteObjectiveScreen.js +5 -6
  442. package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -1
  443. package/lib/module/ui/screens/DeliverScreen.js +6 -7
  444. package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
  445. package/lib/module/ui/screens/DisplayScreen.js +6 -7
  446. package/lib/module/ui/screens/DisplayScreen.js.map +1 -1
  447. package/lib/module/ui/screens/DoodleScreen.js +6 -7
  448. package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
  449. package/lib/module/ui/screens/DropCashScreen.js +41 -10
  450. package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
  451. package/lib/module/ui/screens/ETScreensIndex.js +2 -1
  452. package/lib/module/ui/screens/ETScreensIndex.js.map +1 -1
  453. package/lib/module/ui/screens/FormsScreen.js +6 -7
  454. package/lib/module/ui/screens/FormsScreen.js.map +1 -1
  455. package/lib/module/ui/screens/GeofenceScreen.js +6 -7
  456. package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
  457. package/lib/module/ui/screens/HttpRequestScreen.js +6 -7
  458. package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -1
  459. package/lib/module/ui/screens/ImageCaptureScreen.js +6 -7
  460. package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
  461. package/lib/module/ui/screens/PaymentScreen.js +7 -7
  462. package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
  463. package/lib/module/ui/screens/PickupScreen.js +6 -7
  464. package/lib/module/ui/screens/PickupScreen.js.map +1 -1
  465. package/lib/module/ui/screens/ScanScreen.js +6 -8
  466. package/lib/module/ui/screens/ScanScreen.js.map +1 -1
  467. package/lib/module/ui/screens/StartWorkFlowScreen.js +11 -7
  468. package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
  469. package/lib/module/ui/screens/ValidateOTPScreen.js +6 -7
  470. package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -1
  471. package/lib/module/ui/screens/WithBaseDispatchScreen.js +1 -1
  472. package/lib/module/ui/uiConfig/RouteParams.js +2 -1
  473. package/lib/module/ui/uiConfig/RouteParams.js.map +1 -1
  474. package/lib/module/utils/ApiUtils.js +2 -0
  475. package/lib/module/utils/ApiUtils.js.map +1 -1
  476. package/lib/module/utils/ExecTaskUtils.js +31 -4
  477. package/lib/module/utils/ExecTaskUtils.js.map +1 -1
  478. package/lib/module/utils/Logger.js +5 -6
  479. package/lib/module/utils/Logger.js.map +1 -1
  480. package/lib/module/utils/NetworkUtil.js +3 -3
  481. package/lib/module/utils/NetworkUtil.js.map +1 -1
  482. package/lib/module/utils/SdkUtils.js.map +1 -1
  483. package/lib/module/utils/SyncManagerUtils.js +1 -1
  484. package/lib/module/utils/SyncManagerUtils.js.map +1 -1
  485. package/lib/module/utils/context/paymentContext.js +3 -0
  486. package/lib/module/utils/context/paymentContext.js.map +1 -0
  487. package/lib/module/utils/fcm/FCM.js +20 -2
  488. package/lib/module/utils/fcm/FCM.js.map +1 -1
  489. package/lib/module/utils/fcm/FcmUtils.js +10 -0
  490. package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
  491. package/lib/module/utils/helper.js +5 -5
  492. package/lib/module/utils/helper.js.map +1 -1
  493. package/lib/module/utils/hooks/useModal.js +2 -1
  494. package/lib/module/utils/hooks/useModal.js.map +1 -1
  495. package/lib/module/utils/hooks/useTimer.js.map +1 -1
  496. package/lib/module/utils/storage.js +9 -15
  497. package/lib/module/utils/storage.js.map +1 -1
  498. package/lib/module/utils/utils.js +1 -2
  499. package/lib/module/utils/utils.js.map +1 -1
  500. package/lib/typescript/components/executiontasks/ExecutionTasksIndex.d.ts +4 -2
  501. package/lib/typescript/components/executiontasks/collectPayment/CollectPayment.d.ts +4 -0
  502. package/lib/typescript/components/executiontasks/collectPayment/CollectPaymentSchema.d.ts +155 -0
  503. package/lib/typescript/components/executiontasks/collectPayment/PaymentStyles.d.ts +92 -0
  504. package/lib/typescript/components/executiontasks/collectPayment/PaymentUtils.d.ts +16 -0
  505. package/lib/typescript/components/executiontasks/collectPayment/components/CompletePayment.d.ts +4 -0
  506. package/lib/typescript/components/executiontasks/collectPayment/components/InitPayment.d.ts +4 -0
  507. package/lib/typescript/components/executiontasks/collectPayment/components/PaymentContactDetails.d.ts +4 -0
  508. package/lib/typescript/components/executiontasks/collectPayment/components/ProcessPayment.d.ts +4 -0
  509. package/lib/typescript/components/executiontasks/scan/interfaces.d.ts +1 -1
  510. package/lib/typescript/components/executiontasks/scan/utils.d.ts +1 -0
  511. package/lib/typescript/components/widgets/ProgressDialog.d.ts +3 -0
  512. package/lib/typescript/components/widgets/SnackBarCustom.d.ts +3 -2
  513. package/lib/typescript/components/widgets/Timer.d.ts +7 -0
  514. package/lib/typescript/constants/apiConstants.d.ts +3 -0
  515. package/lib/typescript/constants/constants.d.ts +3 -0
  516. package/lib/typescript/events/EventDispatcher.d.ts +1 -0
  517. package/lib/typescript/events/constants.d.ts +1 -0
  518. package/lib/typescript/events/interface.d.ts +1 -1
  519. package/lib/typescript/icons/CircleMark.d.ts +3 -0
  520. package/lib/typescript/icons/FailedIcon.d.ts +4 -0
  521. package/lib/typescript/icons/FailureCloseIcon.d.ts +4 -0
  522. package/lib/typescript/icons/SuccessCompleteIcon.d.ts +4 -0
  523. package/lib/typescript/models/DispatchModels.d.ts +11 -0
  524. package/lib/typescript/models/execTasks/ETConfig.d.ts +6 -3
  525. package/lib/typescript/models/sdk.d.ts +12 -0
  526. package/lib/typescript/network/NetworkClient.d.ts +3 -1
  527. package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +10 -1
  528. package/lib/typescript/ui/screens/CollectPaymentScreen.d.ts +3 -0
  529. package/lib/typescript/ui/screens/ETScreensIndex.d.ts +2 -1
  530. package/lib/typescript/ui/uiConfig/RouteParams.d.ts +1 -0
  531. package/lib/typescript/utils/ExecTaskUtils.d.ts +2 -0
  532. package/lib/typescript/utils/context/paymentContext.d.ts +7 -0
  533. package/package.json +6 -5
  534. package/src/components/dispatch/DispatchExecNavigator.tsx +14 -0
  535. package/src/components/executiontasks/ExecutionTasksIndex.ts +8 -0
  536. package/src/components/executiontasks/collectPayment/CollectPayment.tsx +60 -0
  537. package/src/components/executiontasks/collectPayment/CollectPaymentSchema.ts +182 -0
  538. package/src/components/executiontasks/collectPayment/PaymentStyles.ts +102 -0
  539. package/src/components/executiontasks/collectPayment/PaymentUtils.ts +200 -0
  540. package/src/components/executiontasks/collectPayment/components/CompletePayment.tsx +273 -0
  541. package/src/components/executiontasks/collectPayment/components/InitPayment.tsx +658 -0
  542. package/src/components/executiontasks/collectPayment/components/PaymentContactDetails.tsx +790 -0
  543. package/src/components/executiontasks/collectPayment/components/ProcessPayment.tsx +1352 -0
  544. package/src/components/executiontasks/deliver/SLDeliverET.tsx +132 -60
  545. package/src/components/executiontasks/dropCash/SLDropCash.tsx +35 -12
  546. package/src/components/executiontasks/payments/PaymentUtils.ts +10 -2
  547. package/src/components/executiontasks/pickup/SLPickupET.tsx +6 -3
  548. package/src/components/executiontasks/scan/ScanET.tsx +1 -1
  549. package/src/components/executiontasks/scan/interfaces.ts +1 -1
  550. package/src/components/executiontasks/scan/utils.ts +16 -8
  551. package/src/components/widgets/ModalWidget.tsx +26 -8
  552. package/src/components/widgets/ProgressDialog.tsx +23 -3
  553. package/src/components/widgets/SnackBarCustom.tsx +8 -1
  554. package/src/components/widgets/SplitTextInput.tsx +1 -1
  555. package/src/components/widgets/Timer.tsx +53 -0
  556. package/src/constants/apiConstants.ts +3 -0
  557. package/src/constants/constants.ts +3 -0
  558. package/src/events/EventDispatcher.ts +4 -0
  559. package/src/events/constants.ts +1 -0
  560. package/src/events/interface.ts +7 -1
  561. package/src/icons/CircleMark.tsx +18 -0
  562. package/src/icons/FailedIcon.tsx +80 -0
  563. package/src/icons/FailureCloseIcon.tsx +35 -0
  564. package/src/icons/SuccessCompleteIcon.tsx +35 -0
  565. package/src/manager/dispatch/DispatchStateContainer.tsx +6 -4
  566. package/src/manager/sdk/DispatchSDKManager.ts +1 -0
  567. package/src/models/DispatchModels.ts +12 -0
  568. package/src/models/execTasks/ETConfig.ts +3 -0
  569. package/src/models/sdk.ts +13 -0
  570. package/src/network/NetworkClient.ts +34 -1
  571. package/src/network/client.ts +1 -0
  572. package/src/styles/executionTasks/CommonStyles.ts +32 -8
  573. package/src/ui/screens/CollectPaymentScreen.tsx +315 -0
  574. package/src/ui/screens/DropCashScreen.tsx +49 -2
  575. package/src/ui/screens/ETScreensIndex.ts +2 -0
  576. package/src/ui/screens/PaymentScreen.tsx +1 -0
  577. package/src/ui/screens/StartWorkFlowScreen.tsx +15 -0
  578. package/src/ui/uiConfig/RouteParams.ts +8 -1
  579. package/src/utils/ApiUtils.ts +1 -0
  580. package/src/utils/ExecTaskUtils.ts +44 -3
  581. package/src/utils/SyncManagerUtils.ts +1 -0
  582. package/src/utils/context/paymentContext.ts +8 -0
  583. package/src/utils/fcm/FCM.ts +30 -0
  584. package/src/utils/fcm/FcmUtils.ts +53 -29
  585. package/android/.gradle/6.8/fileChanges/last-build.bin +0 -0
  586. package/android/.gradle/6.8/fileHashes/fileHashes.lock +0 -0
  587. package/android/.gradle/7.5/checksums/checksums.lock +0 -0
  588. package/android/.gradle/7.5/checksums/md5-checksums.bin +0 -0
  589. package/android/.gradle/7.5/checksums/sha1-checksums.bin +0 -0
  590. package/android/.gradle/7.5/dependencies-accessors/dependencies-accessors.lock +0 -0
  591. package/android/.gradle/7.5/executionHistory/executionHistory.lock +0 -0
  592. package/android/.gradle/7.5/fileChanges/last-build.bin +0 -0
  593. package/android/.gradle/7.5/fileHashes/fileHashes.bin +0 -0
  594. package/android/.gradle/7.5/fileHashes/fileHashes.lock +0 -0
  595. package/android/.gradle/7.5/gc.properties +0 -0
  596. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  597. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  598. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  599. package/android/.gradle/checksums/checksums.lock +0 -0
  600. package/android/.gradle/config.properties +0 -2
  601. package/android/.gradle/configuration-cache/gc.properties +0 -0
  602. package/android/.gradle/vcs-1/gc.properties +0 -0
  603. package/android/.idea/compiler.xml +0 -6
  604. package/android/.idea/gradle.xml +0 -18
  605. package/android/.idea/kotlinc.xml +0 -6
  606. package/android/.idea/migrations.xml +0 -10
  607. package/android/.idea/misc.xml +0 -10
  608. package/android/.idea/other.xml +0 -263
  609. package/android/.idea/vcs.xml +0 -6
  610. package/lib/commonjs/icons/circleMark.svg +0 -3
  611. package/lib/module/icons/circleMark.svg +0 -3
  612. package/src/icons/circleMark.svg +0 -3
  613. /package/{android/.gradle/6.8/gc.properties → lib/typescript/components/executiontasks/collectPayment/components/CustomContactsModal.d.ts} +0 -0
  614. /package/{android/.gradle/7.5/dependencies-accessors/gc.properties → src/components/executiontasks/collectPayment/components/CustomContactsModal.tsx} +0 -0
@@ -2,6 +2,7 @@ import HttpClient from './client';
2
2
  import DispatchSdkCache from '../manager/sdk/DispatchSdkCache';
3
3
  import type { DispatchSDKConfig } from '../models/sdk';
4
4
  import type { Headers } from '../models/auth';
5
+ import { AxiosRequestConfig } from 'axios';
5
6
  import { isTokenExpired } from '../utils/utils';
6
7
  import callbackHandler from '../manager/sdk/callbacksHandler';
7
8
 
@@ -13,7 +14,38 @@ export default class NetworkClient extends HttpClient {
13
14
  super(baseURL);
14
15
  }
15
16
 
16
- public async requestGet() {}
17
+ public async requestGet(
18
+ endpoint: string,
19
+ headers: Headers,
20
+ queryParams?: { [key: string]: string | number | boolean }
21
+ ) {
22
+ let sdkConfig = (await cache.getObjectFromCache(
23
+ cacheKeys.SDK_CONFIG
24
+ )) as DispatchSDKConfig;
25
+
26
+ if(isTokenExpired(sdkConfig.accessToken)){
27
+ await callbackHandler.refresheAndUpdateToken();
28
+ sdkConfig = (await cache.getObjectFromCache(
29
+ cacheKeys.SDK_CONFIG
30
+ )) as DispatchSDKConfig;
31
+ }
32
+ let config: AxiosRequestConfig = {
33
+ headers: {
34
+ 'accept': 'application/json',
35
+ 'X-COREOS-REQUEST-ID':
36
+ 'DispatchSdk:' + ((headers && headers.requestId) || ''),
37
+ 'X-COREOS-ACCESS': sdkConfig.accessToken ?? '',
38
+ 'X-COREOS-TID': sdkConfig.tenantID ?? '',
39
+ 'Content-Type': 'application/json',
40
+ 'x-coreos-userinfo': JSON.stringify({ id: sdkConfig?.userID }),
41
+ },
42
+ };
43
+ if (queryParams) {
44
+ config.params = queryParams;
45
+ }
46
+
47
+ return this.instance.get(endpoint, config);
48
+ }
17
49
 
18
50
  public async requestPost(
19
51
  endpoint: string,
@@ -39,6 +71,7 @@ export default class NetworkClient extends HttpClient {
39
71
  'X-COREOS-ACCESS': sdkConfig.accessToken ?? '',
40
72
  'X-COREOS-TID': sdkConfig.tenantID ?? '',
41
73
  'Content-Type': 'application/json',
74
+ 'x-coreos-userinfo': JSON.stringify({ id: sdkConfig?.userID }),
42
75
  },
43
76
  });
44
77
  }
@@ -26,6 +26,7 @@ export default abstract class HttpClient {
26
26
  };
27
27
 
28
28
  protected _handleError = (error: any) => {
29
+ console.log('error.response: ', error);
29
30
  if (error.response) {
30
31
  // Request made and server responded
31
32
  const { status } = error.response;
@@ -1,4 +1,4 @@
1
- import { StyleSheet,Platform } from 'react-native';
1
+ import { StyleSheet, Platform } from 'react-native';
2
2
  import SdkColors, { ColorTheme } from '../SdkColors';
3
3
 
4
4
  export enum Fonts {
@@ -66,7 +66,10 @@ export const CommonStyles = StyleSheet.create({
66
66
  },
67
67
  nextButtonLabel: {
68
68
  color: '#ffffff',
69
- fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_500Medium : 'IBMPlexSans-Medium',
69
+ fontFamily:
70
+ Platform.OS === 'android'
71
+ ? Fonts.IBMPlexSans_500Medium
72
+ : 'IBMPlexSans-Medium',
70
73
  fontSize: 14,
71
74
  lineHeight: 20,
72
75
  textAlign: 'center',
@@ -79,20 +82,26 @@ export const CommonStyles = StyleSheet.create({
79
82
  },
80
83
  cancelButtonLabel: {
81
84
  color: SdkColors[ColorTheme.LIGHT].defaultColor,
82
- fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_500Medium : 'IBMPlexSans-Medium',
85
+ fontFamily:
86
+ Platform.OS === 'android'
87
+ ? Fonts.IBMPlexSans_500Medium
88
+ : 'IBMPlexSans-Medium',
83
89
  fontSize: 14,
84
90
  fontWeight: '500',
85
91
  lineHeight: 20,
86
92
  textAlign: 'center',
87
93
  fontStyle: 'normal',
88
- textTransform:'capitalize'
94
+ textTransform: 'capitalize',
89
95
  },
90
96
  mainExitButton: {
91
97
  backgroundColor: SdkColors[ColorTheme.LIGHT].exitButton,
92
98
  },
93
99
  mainExitButtonLabel: {
94
100
  color: '#ffffff',
95
- fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_500Medium : 'IBMPlexSans-Medium',
101
+ fontFamily:
102
+ Platform.OS === 'android'
103
+ ? Fonts.IBMPlexSans_500Medium
104
+ : 'IBMPlexSans-Medium',
96
105
  fontSize: 14,
97
106
  fontWeight: '500',
98
107
  lineHeight: 20,
@@ -105,7 +114,10 @@ export const CommonStyles = StyleSheet.create({
105
114
  },
106
115
  exitButtonLabel: {
107
116
  color: SdkColors[ColorTheme.LIGHT].exitButton,
108
- fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_500Medium : 'IBMPlexSans-Medium',
117
+ fontFamily:
118
+ Platform.OS === 'android'
119
+ ? Fonts.IBMPlexSans_500Medium
120
+ : 'IBMPlexSans-Medium',
109
121
  fontSize: 14,
110
122
  fontWeight: '500',
111
123
  lineHeight: 20,
@@ -132,13 +144,21 @@ export const CommonStyles = StyleSheet.create({
132
144
  justifyContent: 'center',
133
145
  fontFamily: 'IBMPlexSans_400Regular',
134
146
  fontStyle: 'normal',
147
+ fontWeight: '400',
135
148
  fontSize: 14,
136
149
  letterSpacing: 0.25,
137
150
  lineHeight: 20,
138
151
  textAlign: 'center',
139
- color: '#000000',
152
+ color: '#3D445C',
140
153
  marginBottom: 10,
141
154
  },
155
+ titleText: {
156
+ fontFamily: Fonts.IBMPlexSans_500Medium,
157
+ fontWeight: '500',
158
+ fontSize: 16,
159
+ lineHeight: 28,
160
+ color: '#3D445C',
161
+ },
142
162
  });
143
163
  export const DeliverPickupStyles = StyleSheet.create({
144
164
  itemTextStyle: {
@@ -164,11 +184,15 @@ export const DeliverPickupStyles = StyleSheet.create({
164
184
  modalView: {
165
185
  backgroundColor: 'white',
166
186
  padding: 15,
187
+ paddingVertical: 45,
188
+ // paddingVertical: 14,
167
189
  borderRadius: 9,
168
190
  },
169
191
  titleText: {
170
192
  justifyContent: 'center',
171
- fontFamily: Fonts.IBMPlexSans_600SemiBold,
193
+ fontFamily: Platform.OS === 'android'
194
+ ? Fonts.IBMPlexSans_600SemiBold
195
+ : 'IBMPlexSans-SemiBold',
172
196
  fontStyle: 'normal',
173
197
  fontSize: 14,
174
198
  lineHeight: 20,
@@ -0,0 +1,315 @@
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
+ import React, { useCallback, useState } from 'react';
3
+ import withBaseDispatchScreen from './WithBaseDispatchScreen';
4
+ import type { BaseETProps } from '../../models/DispatchModels';
5
+ import { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';
6
+ import { CollectPaymentET } from '../../components/executiontasks/ExecutionTasksIndex';
7
+ import DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';
8
+ import { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';
9
+ import { Alert } from 'react-native';
10
+ import { handleDynamicValues, onTaskStart } from '../../utils/ExecTaskUtils';
11
+ import { useEffect } from 'react';
12
+ import { DispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
13
+ import NetworkClient from '../../network/NetworkClient';
14
+ import DispatchSdkCache from '../../manager/sdk/DispatchSdkCache';
15
+ import { DispatchSDKConfig } from '../../models/sdk';
16
+ import { PaymentContext } from '../../utils/context/paymentContext';
17
+ import { isMandatoryKeysPresent } from '../../utils/utils';
18
+ import ErrorCodes from '../../errors/ErrorCodes';
19
+ import { ENDPOINTS } from '../../constants/apiConstants';
20
+ import { PaymentConfigResponse } from '../../components/executiontasks/collectPayment/CollectPaymentSchema';
21
+ import Logger, { LOG_TYPE } from '../../utils/Logger';
22
+ import ProgressDialog from '../../components/widgets/ProgressDialog';
23
+ import { GO_BACK_EVENT_CODE } from '../../constants/constants';
24
+ import CancelOrderDialog from '../../components/widgets/CancelOrderDialog';
25
+
26
+ const CollectPaymentScreen = ({
27
+ navigation,
28
+ route,
29
+ baseETProps,
30
+ }: {
31
+ route: any;
32
+ navigation: any;
33
+ baseETProps: BaseETProps;
34
+ }) => {
35
+ const nextState = route.params[RouteParams.NEXT_STATES];
36
+ const { taskMeta, mergedObjectiveId, input, taskId } =
37
+ getDataFromNextState(nextState);
38
+ const [expectedAmount, setExpectedAmount] = useState(0);
39
+ const [modifiedInput, setInputs] = useState({ ...input });
40
+ const [contextData, setContextData] = useState<any>();
41
+ const [showAlert, setShowAlert] = useState(false);
42
+ const [sResponse, setResponse] = useState<any>();
43
+ const [showScreen, setShowScreen] = useState<boolean>(false);
44
+ const paymentRefId =
45
+ route.params[RouteParams.ROOT_META_DATA].paymentConfig?.paymentRefId;
46
+
47
+ async function getSdkConfig() {
48
+ const cache = DispatchSdkCache.getInstance();
49
+ const _sdkConfig: DispatchSDKConfig = await cache.getObjectFromCache(
50
+ DispatchSdkCache.KEYS.SDK_CONFIG
51
+ );
52
+
53
+ const networkInstance = new NetworkClient(_sdkConfig.domain);
54
+ setContextData({ _sdkConfig, networkInstance });
55
+ return { _sdkConfig, networkInstance };
56
+ }
57
+
58
+ const showAlertMessage = useCallback(
59
+ (errorMessage: string, title: string) => {
60
+ Alert.alert(title, errorMessage);
61
+ navigation.goBack();
62
+ },
63
+ [navigation]
64
+ );
65
+
66
+ const navigateWithError = useCallback(
67
+ (errorCode: string, errorMessage: string) => {
68
+ if (route.params.initRoute) {
69
+ navigation.navigate({
70
+ name: route.params.initRoute,
71
+ params: { sdkError: { code: errorCode, message: errorMessage } },
72
+ merge: true,
73
+ });
74
+ } else {
75
+ showAlertMessage(errorMessage, 'Error');
76
+ }
77
+ },
78
+ [navigation, route.params.initRoute, showAlertMessage]
79
+ );
80
+
81
+ useEffect(() => {
82
+
83
+ if (
84
+ taskId === ExecutionTaskID.COLLECT_PAYMENT_ET &&
85
+ (!isMandatoryKeysPresent(route.params[RouteParams.ROOT_META_DATA], [
86
+ 'paymentConfig',
87
+ ]) ||
88
+ !isMandatoryKeysPresent(
89
+ route.params[RouteParams.ROOT_META_DATA].paymentConfig,
90
+ ['paymentRefId']
91
+ ))
92
+ ) {
93
+ navigateWithError(
94
+ ErrorCodes.InvalidArgumentError,
95
+ 'Missing or Invalid Route Params to execute Payment.'
96
+ );
97
+ return;
98
+ }
99
+ onTaskStart(
100
+ route.params[RouteParams.NEXT_STATES],
101
+ route.params[RouteParams.ROOT_META_DATA].customEventsData
102
+ );
103
+ (async () => {
104
+ let updatedInput = JSON.parse(JSON.stringify(modifiedInput));
105
+ if (route.params[RouteParams.ROOT_META_DATA]) {
106
+ updatedInput = handleDynamicValues(
107
+ route?.params[RouteParams.NEXT_STATES].input,
108
+ route.params[RouteParams.ROOT_META_DATA]
109
+ );
110
+ }
111
+ /**
112
+ * Get sum of merged objectives amount
113
+ * Get sdkConfig from cache and set in context
114
+ */
115
+ await getTotalExpected();
116
+ const { networkInstance } = await getSdkConfig();
117
+ /**
118
+ * Get list of selected payment modes from default PG for tenant
119
+ */
120
+ if (modifiedInput.allowedModes.includes('ONLINE')) {
121
+ try {
122
+ const modes = await getPaymentModes(networkInstance);
123
+ updatedInput.allowedModes = modes?.methods;
124
+ updatedInput.plModes = modes?.plModes || [];
125
+ const index = modifiedInput.allowedModes.indexOf('ONLINE');
126
+ if (index > -1) {
127
+ modifiedInput.allowedModes.splice(index, 1);
128
+ }
129
+ } catch (error: any) {
130
+ Logger.getInstance().logEvent(
131
+ '~ getTotalExpected triggered ',
132
+ JSON.stringify(error?.response?.data || error),
133
+ LOG_TYPE.SDK_ERROR
134
+ );
135
+ updatedInput.allowedModes = [];
136
+ updatedInput.plModes = [];
137
+ const index = modifiedInput.allowedModes.indexOf('ONLINE');
138
+ if (index > -1) {
139
+ modifiedInput.allowedModes.splice(index, 1);
140
+ }
141
+ }
142
+ } else {
143
+ updatedInput.allowedModes = [];
144
+ updatedInput.plModes = [];
145
+ }
146
+
147
+ if (modifiedInput.allowedModes?.length) {
148
+ updatedInput.allowedModes = [
149
+ ...modifiedInput.allowedModes,
150
+ ...updatedInput.allowedModes,
151
+ ];
152
+ }
153
+ if (!updatedInput.allowedModes?.length) {
154
+ navigateWithError(
155
+ ErrorCodes.InvalidArgumentError,
156
+ 'No payment modes available. Please contact your Admin.'
157
+ );
158
+ return;
159
+ }
160
+ setInputs(updatedInput);
161
+ })();
162
+ }, []);
163
+
164
+ const getPaymentModes = async (
165
+ networkInstance: NetworkClient
166
+ ): Promise<{ methods: string[]; plModes: string[] } | null> => {
167
+ try {
168
+ let response: { methods: string[]; plModes: string[] } = {
169
+ methods: [],
170
+ plModes: [],
171
+ };
172
+ const paymentResp: { data: PaymentConfigResponse } =
173
+ await networkInstance.requestGet(ENDPOINTS.PAYMENT_MODES, {
174
+ requestId: 'payment:' + paymentRefId,
175
+ });
176
+
177
+ // FOR TESTING
178
+ // const paymentResp = {
179
+ // data: {
180
+ // data: {
181
+ // configDetails: [
182
+ // {
183
+ // paymentMethods: {
184
+ // QR: true,
185
+ // paymentLink: true,
186
+ // },
187
+ // },
188
+ // ],
189
+ // },
190
+ // },
191
+ // };
192
+
193
+ const configData = paymentResp?.data?.data?.configDetails[0];
194
+ if (configData?.paymentMethods?.QR) {
195
+ response.methods.push('QR_CODE');
196
+ }
197
+ if (configData?.paymentMethods?.paymentLink) {
198
+ response.methods.push('PAYMENT_LINK');
199
+ }
200
+ if (configData?.modesMapping) {
201
+ response.plModes = Object.values(configData.modesMapping);
202
+ }
203
+
204
+ return response;
205
+ } catch (error: any) {
206
+ Logger.getInstance().logEvent(
207
+ '~ getPaymentModes triggered ',
208
+ JSON.stringify(error?.response?.data || error),
209
+ LOG_TYPE.SDK_ERROR
210
+ );
211
+ return null;
212
+ }
213
+ };
214
+
215
+ const getTotalExpected = async () => {
216
+ const totalAmount: number = await DispatchExecutor.getTotalPaymentAmountMWI(
217
+ mergedObjectiveId
218
+ );
219
+ setExpectedAmount(totalAmount);
220
+ // setExpectedAmount(1000); //FOR TESTING
221
+ return totalAmount;
222
+ };
223
+
224
+ const submitOutput = useCallback(
225
+ async (etOutput: any) => {
226
+ console.log('CollectPaymentScreen:SubmitOutput:', etOutput);
227
+ if (etOutput.paymentMode == 'QR_CODE') {
228
+ console.log(
229
+ 'CollectPaymentScreen:SubmitOutput:etOutput.paymentMode',
230
+ etOutput.paymentMode
231
+ );
232
+ let jobData = await DispatchExecutor.wQueryJobForMOId(
233
+ mergedObjectiveId[0]
234
+ );
235
+ console.log(
236
+ 'CollectPaymentScreen:SubmitOutput:etOutput.jobData',
237
+ jobData
238
+ );
239
+ let result = await DispatchExecutor.wUpdateAmountToZero(
240
+ jobData[0].jobId
241
+ );
242
+ console.log(
243
+ 'CollectPaymentScreen:SubmitOutput:etOutput.result',
244
+ result
245
+ );
246
+ }
247
+ await DispatchStateContainer.getInstance().navigateToNextTask(
248
+ navigation,
249
+ route,
250
+ etOutput,
251
+ etOutput.success,
252
+ EntityCode.COLLECT_PAYMENT_ET,
253
+ ExecutionTaskID.COLLECT_PAYMENT_ET,
254
+ baseETProps,
255
+ false
256
+ );
257
+ },
258
+ [baseETProps, navigation, route]
259
+ );
260
+
261
+ // console.log("collectpayment1:",contextData)
262
+ // console.log("collectpayment2:",modifiedInput.allowedModes.includes('ONLINE'))
263
+ // console.log("collectpayment3:",modifiedInput.allowedModes?.length)
264
+ useEffect(() => {
265
+ if (contextData && modifiedInput?.allowedModes?.length) {
266
+ setShowScreen(true);
267
+ } else {
268
+ setShowScreen(false);
269
+ }
270
+ }, [contextData, modifiedInput?.allowedModes]);
271
+
272
+ return showScreen ? (
273
+ <PaymentContext.Provider
274
+ value={{
275
+ sdkConfig: contextData?._sdkConfig,
276
+ networkInstance: contextData?.networkInstance,
277
+ }}
278
+ >
279
+ <CollectPaymentET
280
+ {...modifiedInput}
281
+ expectedAmount={expectedAmount}
282
+ navigation={navigation}
283
+ mergedObjectiveId={mergedObjectiveId}
284
+ taskMeta={taskMeta}
285
+ route={route}
286
+ onSubmitET={async (etOutput) => {
287
+ console.log('etOutput: ', JSON.stringify(etOutput));
288
+ if (etOutput.success || etOutput.eventCode == GO_BACK_EVENT_CODE) {
289
+ await submitOutput(etOutput);
290
+ } else {
291
+ setResponse((_prevState: any) => {
292
+ setShowAlert(true);
293
+ return etOutput;
294
+ });
295
+ }
296
+ }}
297
+ />
298
+ <CancelOrderDialog
299
+ visible={showAlert}
300
+ onSubmit={async (value) => {
301
+ if (value) {
302
+ setShowAlert(false);
303
+ await submitOutput(sResponse);
304
+ } else {
305
+ setShowAlert(false);
306
+ }
307
+ }}
308
+ />
309
+ </PaymentContext.Provider>
310
+ ) : (
311
+ <ProgressDialog visible={true} label="Loading..." />
312
+ );
313
+ };
314
+
315
+ export default withBaseDispatchScreen(CollectPaymentScreen);
@@ -8,7 +8,7 @@ import { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';
8
8
  import type { ETAmount } from '../../components/executiontasks/payments/init/InitPaymentSchema';
9
9
  import { View } from 'react-native';
10
10
  import CancelOrderDialog from '../../components/widgets/CancelOrderDialog';
11
- import { onTaskStart } from '../../utils/ExecTaskUtils';
11
+ import { getBaseETResponse, onTaskStart } from '../../utils/ExecTaskUtils';
12
12
 
13
13
  import { DispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
14
14
  import { GO_BACK_EVENT_CODE } from '../../constants/constants';
@@ -16,6 +16,8 @@ import Helper from '../../utils/helper';
16
16
  //{ fireEventWithScreenName } from 'src/analytics/sentry/SentryAnalyticsUtils';
17
17
  import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
18
18
  import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
19
+ import ProgressDialog from '../../components/widgets/ProgressDialog';
20
+ import { getEventCodeByET } from '../../manager/dispatchCodes/EventCodeContainer';
19
21
 
20
22
  // OLD CODE
21
23
  // function getTotalExpected(nextStates: any[]): ETAmount {
@@ -40,13 +42,15 @@ const DropCashScreen = ({
40
42
  navigation: any;
41
43
  baseETProps: BaseETProps;
42
44
  }) => {
45
+ const [loading, setLoading] = useState(false);
46
+
43
47
  const helperInstance = Helper.getInstance();
44
48
  const nextState = route.params[RouteParams.NEXT_STATES];
45
49
  const { taskMeta, mergedObjectiveId, input, wfMeta, taskName } =
46
50
  getDataFromNextState(nextState);
47
51
 
48
52
  const [expectedAmount, setExpectedAmount] = useState<ETAmount>({
49
- value: 0,
53
+ value: 1,
50
54
  minorUnit: input.expectedAmount.minorUnit,
51
55
  currencyCode: input.expectedAmount.currencyCode,
52
56
  });
@@ -66,6 +70,45 @@ const DropCashScreen = ({
66
70
  })();
67
71
  }, [])
68
72
 
73
+ useEffect(() => {
74
+ (async () => {
75
+ console.log("expectedAmount:",expectedAmount);
76
+ if(expectedAmount.value === 0){
77
+ // setLoading(true);
78
+ let dropCashETOutput = {
79
+ amount: {
80
+ value: expectedAmount.value,
81
+ currencyCode: expectedAmount.currencyCode,
82
+ minorUnit: expectedAmount.minorUnit,
83
+ },
84
+ ...(await getBaseETResponse(
85
+ EntityCode.DELIVER_CASH,
86
+ true,
87
+ getEventCodeByET(
88
+ ExecutionTaskID.DELIVER_CASH,
89
+ true,
90
+ input.applicableReasons?.success
91
+ ),
92
+ '',
93
+ mergedObjectiveId,
94
+ ExecutionTaskID.DELIVER_CASH
95
+ )),
96
+ }
97
+ if (dropCashETOutput.success || dropCashETOutput.eventCode == GO_BACK_EVENT_CODE) {
98
+ await submitOutput(dropCashETOutput);
99
+ } else {
100
+ setResponse((_prevState: any) => {
101
+ setShowAlert(true);
102
+ return dropCashETOutput;
103
+ });
104
+ }
105
+ // setLoading(false);
106
+ }
107
+ })();
108
+ }, [expectedAmount.value])
109
+
110
+
111
+
69
112
  const getTotalExpected = async () => {
70
113
  const totalAmount: number = await DispatchExecutor.getTotalAmountMWI(
71
114
  mergedObjectiveId
@@ -101,8 +144,10 @@ const DropCashScreen = ({
101
144
  },
102
145
  [baseETProps, navigation, route]
103
146
  );
147
+
104
148
  return (
105
149
  <View style={{ flex: 1 }}>
150
+ { expectedAmount.value === 0 ? <View><ProgressDialog visible={loading} label={'Please wait...'} /></View> :
106
151
  <SLDropCash
107
152
  {...input}
108
153
  expectedAmount={expectedAmount}
@@ -121,6 +166,8 @@ const DropCashScreen = ({
121
166
  }
122
167
  }}
123
168
  />
169
+ }
170
+
124
171
  <CancelOrderDialog
125
172
  visible={showAlert}
126
173
  onSubmit={async (value) => {
@@ -14,6 +14,7 @@ import DropCashScreen from './DropCashScreen';
14
14
  import ScanScreen from './ScanScreen';
15
15
  import HttpRequestScreen from './HttpRequestScreen';
16
16
  import ValidateOTPScreen from './ValidateOTPScreen';
17
+ import CollectPaymentScreen from './CollectPaymentScreen';
17
18
 
18
19
  export {
19
20
  CancellationScreen,
@@ -32,4 +33,5 @@ export {
32
33
  ScanScreen,
33
34
  HttpRequestScreen,
34
35
  ValidateOTPScreen,
36
+ CollectPaymentScreen,
35
37
  };
@@ -73,6 +73,7 @@ const PaymentScreen = ({
73
73
 
74
74
  const submitOutput = useCallback(
75
75
  async (etOutput: any) => {
76
+ console.log("submitOutput:",JSON.stringify(etOutput));
76
77
  await DispatchStateContainer.getInstance().navigateToNextTask(
77
78
  navigation,
78
79
  route,
@@ -112,6 +112,20 @@ const StartWorkFlowScreen = ({
112
112
  )
113
113
  )[0];
114
114
 
115
+ if (
116
+ nextStateData.taskId === ExecutionTaskID.COLLECT_PAYMENT_ET &&
117
+ (!isMandatoryKeysPresent(route.params, ['paymentConfig']) ||
118
+ !isMandatoryKeysPresent(route.params.paymentConfig, [
119
+ 'paymentRefId',
120
+ ]))
121
+ ) {
122
+ navigateWithError(
123
+ ErrorCodes.InvalidArgumentError,
124
+ 'Missing or Invalid Route Params'
125
+ );
126
+ return;
127
+ }
128
+
115
129
  let updatedStatusFilter: IDispatchExecutor.ExecutionStatus[] = [];
116
130
 
117
131
  if (
@@ -136,6 +150,7 @@ const StartWorkFlowScreen = ({
136
150
  customEventsData: route.params.mergedWI.customEventsData,
137
151
  statusFilter: updatedStatusFilter,
138
152
  prefixedMergedObjectiveId,
153
+ paymentConfig: route.params.paymentConfig,
139
154
  };
140
155
 
141
156
  // if (nextStateList != null && nextStateList.length > 0) {
@@ -24,5 +24,12 @@ export function getDataFromNextState(
24
24
  const mergedObjectiveId = nextState.mergedObjectiveIds;
25
25
  const wfMeta = JSON.parse(nextState.meta?.workflow || '{}'); //nextState.meta?.workflow || {}; //JSON.parse(nextState.meta?.workflow || '{}');
26
26
 
27
- return { input, taskMeta, mergedObjectiveId, wfMeta, taskName };
27
+ return {
28
+ input,
29
+ taskMeta,
30
+ mergedObjectiveId,
31
+ wfMeta,
32
+ taskName,
33
+ taskId: nextState.taskId,
34
+ };
28
35
  }
@@ -119,6 +119,7 @@ export async function getApiResponse(apiData: APIData) {
119
119
  if (apiData.requestBody) {
120
120
  axiosConfig.data = { ...apiData.requestBody };
121
121
  }
122
+ // console.log('axiosConfig: ', JSON.stringify(axiosConfig));
122
123
 
123
124
  return axios(axiosConfig);
124
125
  }