@os1-platform/dispatch-mobile 1.0.8 → 2.0.0

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 (778) hide show
  1. package/README.md +310 -74
  2. package/android/.gradle/7.0.2/fileChanges/last-build.bin +0 -0
  3. package/android/.gradle/7.0.2/fileHashes/fileHashes.lock +0 -0
  4. package/android/.gradle/7.0.2/gc.properties +0 -0
  5. package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +0 -0
  6. package/android/.gradle/7.2/dependencies-accessors/gc.properties +0 -0
  7. package/android/.gradle/7.2/executionHistory/executionHistory.bin +0 -0
  8. package/android/.gradle/7.2/executionHistory/executionHistory.lock +0 -0
  9. package/android/.gradle/7.2/fileChanges/last-build.bin +0 -0
  10. package/android/.gradle/7.2/fileHashes/fileHashes.bin +0 -0
  11. package/android/.gradle/7.2/fileHashes/fileHashes.lock +0 -0
  12. package/android/.gradle/7.2/fileHashes/resourceHashesCache.bin +0 -0
  13. package/android/.gradle/7.2/gc.properties +0 -0
  14. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  15. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  16. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  17. package/android/.gradle/checksums/checksums.lock +0 -0
  18. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  19. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  20. package/android/.gradle/vcs-1/gc.properties +0 -0
  21. package/android/.idea/compiler.xml +6 -0
  22. package/android/.idea/gradle.xml +18 -0
  23. package/android/.idea/jarRepositories.xml +35 -0
  24. package/android/.idea/kotlinc.xml +6 -0
  25. package/android/.idea/misc.xml +9 -0
  26. package/android/.idea/vcs.xml +6 -0
  27. package/android/gradle.properties +1 -1
  28. package/android/local.properties +8 -0
  29. package/android/src/main/AndroidManifest.xml +0 -1
  30. package/android/src/main/java/com/dispatchsdk/DispatchSdkPackage.kt +3 -1
  31. package/android/src/main/java/com/dispatchsdk/sharedPref/SharedPreferenceModule.kt +166 -0
  32. package/lib/commonjs/@types/assets/index.d.js +2 -0
  33. package/lib/commonjs/@types/assets/index.d.js.map +1 -0
  34. package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +50 -43
  35. package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
  36. package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js +10 -48
  37. package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
  38. package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +142 -23
  39. package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
  40. package/lib/commonjs/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
  41. package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +66 -18
  42. package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
  43. package/lib/commonjs/components/executiontasks/captureInput/utils.js +13 -0
  44. package/lib/commonjs/components/executiontasks/captureInput/utils.js.map +1 -0
  45. package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +6 -16
  46. package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
  47. package/lib/commonjs/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
  48. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +212 -95
  49. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  50. package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +16 -25
  51. package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
  52. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +65 -29
  53. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
  54. package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +5 -19
  55. package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
  56. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +74 -30
  57. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  58. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +139 -50
  59. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
  60. package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -26
  61. package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
  62. package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js +49 -0
  63. package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
  64. package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +2 -17
  65. package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
  66. package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -10
  67. package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
  68. package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js +5 -14
  69. package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
  70. package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +3 -15
  71. package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
  72. package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
  73. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +11 -36
  74. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  75. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +73 -48
  76. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  77. package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js +0 -4
  78. package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js.map +1 -1
  79. package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js +0 -2
  80. package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js.map +1 -1
  81. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +76 -29
  82. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
  83. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +63 -24
  84. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  85. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +71 -22
  86. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  87. package/lib/commonjs/components/executiontasks/pickup/PickupET.js +5 -15
  88. package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
  89. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +138 -32
  90. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  91. package/lib/commonjs/components/executiontasks/scan/ScanET.js +741 -0
  92. package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -0
  93. package/lib/commonjs/components/executiontasks/scan/ScanSchema.js +19 -0
  94. package/lib/commonjs/components/executiontasks/scan/ScanSchema.js.map +1 -0
  95. package/lib/commonjs/components/executiontasks/scan/constants.js +19 -0
  96. package/lib/commonjs/components/executiontasks/scan/constants.js.map +1 -0
  97. package/lib/commonjs/components/executiontasks/scan/interfaces.js +43 -0
  98. package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -0
  99. package/lib/commonjs/components/executiontasks/scan/modalConstant.js +104 -0
  100. package/lib/commonjs/components/executiontasks/scan/modalConstant.js.map +1 -0
  101. package/lib/commonjs/components/executiontasks/{scanner → scan/sub_components}/CScanner.js +9 -29
  102. package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
  103. package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +109 -0
  104. package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
  105. package/lib/commonjs/components/executiontasks/{scanner/returns/ReasonDropDown.js → scan/sub_components/ERDropDown.js} +72 -55
  106. package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
  107. package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +1099 -0
  108. package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -0
  109. package/lib/commonjs/components/executiontasks/scan/utils.js +762 -0
  110. package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -0
  111. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +333 -0
  112. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
  113. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js +14 -0
  114. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
  115. package/lib/commonjs/components/executiontasks/validateOTP/constants.js +37 -0
  116. package/lib/commonjs/components/executiontasks/validateOTP/constants.js.map +1 -0
  117. package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +63 -0
  118. package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
  119. package/lib/commonjs/components/executiontasks/validateOTP/utils.js +147 -0
  120. package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -0
  121. package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -13
  122. package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
  123. package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -17
  124. package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
  125. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +3 -18
  126. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
  127. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
  128. package/lib/commonjs/components/utils/index.js +14 -0
  129. package/lib/commonjs/components/utils/index.js.map +1 -0
  130. package/lib/commonjs/components/widgets/AlertDisplay.js +0 -5
  131. package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
  132. package/lib/commonjs/components/widgets/CancelOrderDialog.js +0 -12
  133. package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
  134. package/lib/commonjs/components/widgets/Card.js +88 -0
  135. package/lib/commonjs/components/widgets/Card.js.map +1 -0
  136. package/lib/commonjs/components/widgets/GoBackModal.js +48 -0
  137. package/lib/commonjs/components/widgets/GoBackModal.js.map +1 -0
  138. package/lib/commonjs/components/widgets/IconButton.js +34 -0
  139. package/lib/commonjs/components/widgets/IconButton.js.map +1 -0
  140. package/lib/commonjs/components/widgets/ModalWidget.js +99 -0
  141. package/lib/commonjs/components/widgets/ModalWidget.js.map +1 -0
  142. package/lib/commonjs/components/widgets/ProgressDialog.js +0 -7
  143. package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -1
  144. package/lib/commonjs/components/widgets/SearchBar.js +74 -0
  145. package/lib/commonjs/components/widgets/SearchBar.js.map +1 -0
  146. package/lib/commonjs/components/widgets/SnackBarCustom.js +48 -40
  147. package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
  148. package/lib/commonjs/components/widgets/SplitTextInput.js +93 -0
  149. package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -0
  150. package/lib/commonjs/components/widgets/TabsComponent.js +64 -0
  151. package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -0
  152. package/lib/commonjs/components/widgets/Toaster.js +0 -2
  153. package/lib/commonjs/components/widgets/Toaster.js.map +1 -1
  154. package/lib/commonjs/config/DispatchSDKConfig.js +4 -5
  155. package/lib/commonjs/config/DispatchSDKConfig.js.map +1 -1
  156. package/lib/commonjs/constants/apiConstants.js +17 -0
  157. package/lib/commonjs/constants/apiConstants.js.map +1 -0
  158. package/lib/commonjs/constants/constants.js +7 -3
  159. package/lib/commonjs/constants/constants.js.map +1 -1
  160. package/lib/commonjs/constants/statuscode.js +3 -5
  161. package/lib/commonjs/constants/statuscode.js.map +1 -1
  162. package/lib/commonjs/errors/BaseError.js +3 -8
  163. package/lib/commonjs/errors/BaseError.js.map +1 -1
  164. package/lib/commonjs/errors/ErrorCodes.js +7 -6
  165. package/lib/commonjs/errors/ErrorCodes.js.map +1 -1
  166. package/lib/commonjs/events/EventDispatcher.js +23 -0
  167. package/lib/commonjs/events/EventDispatcher.js.map +1 -0
  168. package/lib/commonjs/events/EventListener.js +20 -0
  169. package/lib/commonjs/events/EventListener.js.map +1 -0
  170. package/lib/commonjs/events/constants.js +15 -0
  171. package/lib/commonjs/events/constants.js.map +1 -0
  172. package/lib/commonjs/events/index.js +11 -0
  173. package/lib/commonjs/events/index.js.map +1 -0
  174. package/lib/commonjs/events/interface.js +2 -0
  175. package/lib/commonjs/events/interface.js.map +1 -0
  176. package/lib/commonjs/index.js +40 -35
  177. package/lib/commonjs/index.js.map +1 -1
  178. package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +328 -272
  179. package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
  180. package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js +55 -4
  181. package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
  182. package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js +70 -0
  183. package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
  184. package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js +3 -29
  185. package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
  186. package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js +6 -20
  187. package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
  188. package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js +23 -0
  189. package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js.map +1 -0
  190. package/lib/commonjs/manager/location/LocationManager.js +3 -20
  191. package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
  192. package/lib/commonjs/manager/sdk/DispatchSDKManager.js +23 -37
  193. package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
  194. package/lib/commonjs/manager/sdk/DispatchSdkCache.js +6 -17
  195. package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
  196. package/lib/commonjs/manager/sdk/callbacksHandler.js +26 -0
  197. package/lib/commonjs/manager/sdk/callbacksHandler.js.map +1 -0
  198. package/lib/commonjs/manager/syncmanager/AppSyncManager.js +26 -46
  199. package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
  200. package/lib/commonjs/manager/syncmanager/DBConfig.js +48 -9
  201. package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
  202. package/lib/commonjs/manager/syncmanager/NativeSyncManager.js +0 -2
  203. package/lib/commonjs/manager/syncmanager/NativeSyncManager.js.map +1 -1
  204. package/lib/commonjs/manager/syncmanager/constants.js +17 -0
  205. package/lib/commonjs/manager/syncmanager/constants.js.map +1 -0
  206. package/lib/commonjs/manager/syncmanager/database.js +28 -12
  207. package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
  208. package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +11 -36
  209. package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
  210. package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +8 -26
  211. package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
  212. package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +19 -58
  213. package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
  214. package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +414 -29
  215. package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
  216. package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +208 -103
  217. package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
  218. package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +157 -36
  219. package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
  220. package/lib/commonjs/models/DispatchModels.js +4 -5
  221. package/lib/commonjs/models/DispatchModels.js.map +1 -1
  222. package/lib/commonjs/models/ReasonCodes.js.map +1 -1
  223. package/lib/commonjs/models/execTasks/ETBaseModels.js +4 -0
  224. package/lib/commonjs/models/execTasks/ETBaseModels.js.map +1 -1
  225. package/lib/commonjs/models/execTasks/ETConfig.js +28 -35
  226. package/lib/commonjs/models/execTasks/ETConfig.js.map +1 -1
  227. package/lib/commonjs/models/sdk.js +4 -5
  228. package/lib/commonjs/models/sdk.js.map +1 -1
  229. package/lib/commonjs/native/signature/SignatureCapture.js +3 -24
  230. package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
  231. package/lib/commonjs/network/GraphQLClient.js +7 -35
  232. package/lib/commonjs/network/GraphQLClient.js.map +1 -1
  233. package/lib/commonjs/network/NetworkClient.js +2 -13
  234. package/lib/commonjs/network/NetworkClient.js.map +1 -1
  235. package/lib/commonjs/network/NetworkUtils.js +10 -8
  236. package/lib/commonjs/network/NetworkUtils.js.map +1 -1
  237. package/lib/commonjs/network/Queries.js +0 -2
  238. package/lib/commonjs/network/Queries.js.map +1 -1
  239. package/lib/commonjs/network/client.js +6 -21
  240. package/lib/commonjs/network/client.js.map +1 -1
  241. package/lib/commonjs/res/strings.js.map +1 -1
  242. package/lib/commonjs/resources/Login.js +4 -15
  243. package/lib/commonjs/resources/Login.js.map +1 -1
  244. package/lib/commonjs/resources/network.js +3 -8
  245. package/lib/commonjs/resources/network.js.map +1 -1
  246. package/lib/commonjs/styles/SdkColors.js +10 -8
  247. package/lib/commonjs/styles/SdkColors.js.map +1 -1
  248. package/lib/commonjs/styles/executionTasks/CommonStyles.js +58 -25
  249. package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
  250. package/lib/commonjs/ui/screens/CancellationScreen.js +67 -27
  251. package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
  252. package/lib/commonjs/ui/screens/CaptureInputScreen.js +15 -16
  253. package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
  254. package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +11 -23
  255. package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
  256. package/lib/commonjs/ui/screens/DeliverScreen.js +30 -17
  257. package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
  258. package/lib/commonjs/ui/screens/DisplayScreen.js +17 -13
  259. package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
  260. package/lib/commonjs/ui/screens/DoodleScreen.js +17 -20
  261. package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
  262. package/lib/commonjs/ui/screens/DropCashScreen.js +43 -31
  263. package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
  264. package/lib/commonjs/ui/screens/ETScreensIndex.js +10 -19
  265. package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -1
  266. package/lib/commonjs/ui/screens/FormsScreen.js +105 -17
  267. package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
  268. package/lib/commonjs/ui/screens/GeofenceScreen.js +16 -14
  269. package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
  270. package/lib/commonjs/ui/screens/HttpRequestScreen.js +14 -11
  271. package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
  272. package/lib/commonjs/ui/screens/ImageCaptureScreen.js +38 -17
  273. package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
  274. package/lib/commonjs/ui/screens/PaymentScreen.js +28 -29
  275. package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
  276. package/lib/commonjs/ui/screens/PickupScreen.js +41 -19
  277. package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
  278. package/lib/commonjs/ui/screens/ScanScreen.js +121 -0
  279. package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -0
  280. package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +64 -38
  281. package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
  282. package/lib/commonjs/ui/screens/ValidateOTPScreen.js +55 -0
  283. package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -0
  284. package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js +0 -10
  285. package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
  286. package/lib/commonjs/ui/uiConfig/RouteParams.js +24 -1
  287. package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
  288. package/lib/commonjs/utils/ApiUtils.js +129 -0
  289. package/lib/commonjs/utils/ApiUtils.js.map +1 -0
  290. package/lib/commonjs/utils/ExecTaskUtils.js +111 -41
  291. package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
  292. package/lib/commonjs/utils/Logger.js +10 -29
  293. package/lib/commonjs/utils/Logger.js.map +1 -1
  294. package/lib/commonjs/utils/NetworkUtil.js +3 -19
  295. package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
  296. package/lib/commonjs/utils/SdkUtils.js +2 -31
  297. package/lib/commonjs/utils/SdkUtils.js.map +1 -1
  298. package/lib/commonjs/utils/SyncManagerUtils.js +61 -43
  299. package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
  300. package/lib/commonjs/utils/fcm/FCM.js +59 -11
  301. package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
  302. package/lib/commonjs/utils/fcm/FcmUtils.js +82 -21
  303. package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
  304. package/lib/commonjs/utils/helper.js +0 -5
  305. package/lib/commonjs/utils/helper.js.map +1 -1
  306. package/lib/commonjs/utils/hooks/useModal.js +53 -0
  307. package/lib/commonjs/utils/hooks/useModal.js.map +1 -0
  308. package/lib/commonjs/utils/hooks/useTimer.js +44 -0
  309. package/lib/commonjs/utils/hooks/useTimer.js.map +1 -0
  310. package/lib/commonjs/utils/loginHelper.js +6 -18
  311. package/lib/commonjs/utils/loginHelper.js.map +1 -1
  312. package/lib/commonjs/utils/storage.js +87 -31
  313. package/lib/commonjs/utils/storage.js.map +1 -1
  314. package/lib/commonjs/utils/utils.js +8 -11
  315. package/lib/commonjs/utils/utils.js.map +1 -1
  316. package/lib/module/@types/assets/index.d.js +2 -0
  317. package/lib/module/@types/assets/index.d.js.map +1 -0
  318. package/lib/module/components/dispatch/DispatchExecNavigator.js +50 -32
  319. package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
  320. package/lib/module/components/executiontasks/ExecutionTasksIndex.js +3 -5
  321. package/lib/module/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
  322. package/lib/module/components/executiontasks/cancellation/CancelET.js +145 -19
  323. package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
  324. package/lib/module/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
  325. package/lib/module/components/executiontasks/captureInput/CaptureText.js +68 -10
  326. package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
  327. package/lib/module/components/executiontasks/captureInput/utils.js +7 -0
  328. package/lib/module/components/executiontasks/captureInput/utils.js.map +1 -0
  329. package/lib/module/components/executiontasks/deliver/DeliverET.js +6 -7
  330. package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
  331. package/lib/module/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
  332. package/lib/module/components/executiontasks/deliver/SLDeliverET.js +214 -86
  333. package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  334. package/lib/module/components/executiontasks/display/DisplayModalET.js +16 -15
  335. package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
  336. package/lib/module/components/executiontasks/doodle/SignatureET.js +68 -15
  337. package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
  338. package/lib/module/components/executiontasks/dropCash/DropCashET.js +5 -6
  339. package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
  340. package/lib/module/components/executiontasks/dropCash/SLDropCash.js +75 -20
  341. package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  342. package/lib/module/components/executiontasks/forms/FormGenerator.js +142 -37
  343. package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
  344. package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -15
  345. package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
  346. package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js +39 -0
  347. package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
  348. package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +2 -6
  349. package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
  350. package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -3
  351. package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
  352. package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js +6 -4
  353. package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
  354. package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js +3 -6
  355. package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
  356. package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
  357. package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +11 -11
  358. package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  359. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +75 -35
  360. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  361. package/lib/module/components/executiontasks/payments/PaymentStyles.js.map +1 -1
  362. package/lib/module/components/executiontasks/payments/PaymentUtils.js.map +1 -1
  363. package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +77 -18
  364. package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
  365. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +64 -11
  366. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  367. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +72 -11
  368. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  369. package/lib/module/components/executiontasks/pickup/PickupET.js +5 -6
  370. package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
  371. package/lib/module/components/executiontasks/pickup/SLPickupET.js +141 -25
  372. package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  373. package/lib/module/components/executiontasks/scan/ScanET.js +732 -0
  374. package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -0
  375. package/lib/module/components/executiontasks/scan/ScanSchema.js +17 -0
  376. package/lib/module/components/executiontasks/scan/ScanSchema.js.map +1 -0
  377. package/lib/module/components/executiontasks/scan/constants.js +7 -0
  378. package/lib/module/components/executiontasks/scan/constants.js.map +1 -0
  379. package/lib/module/components/executiontasks/scan/interfaces.js +33 -0
  380. package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -0
  381. package/lib/module/components/executiontasks/scan/modalConstant.js +94 -0
  382. package/lib/module/components/executiontasks/scan/modalConstant.js.map +1 -0
  383. package/lib/module/components/executiontasks/{scanner → scan/sub_components}/CScanner.js +9 -16
  384. package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
  385. package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +101 -0
  386. package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
  387. package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +107 -0
  388. package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
  389. package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +1092 -0
  390. package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -0
  391. package/lib/module/components/executiontasks/scan/utils.js +726 -0
  392. package/lib/module/components/executiontasks/scan/utils.js.map +1 -0
  393. package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +324 -0
  394. package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
  395. package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js +8 -0
  396. package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
  397. package/lib/module/components/executiontasks/validateOTP/constants.js +25 -0
  398. package/lib/module/components/executiontasks/validateOTP/constants.js.map +1 -0
  399. package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js +53 -0
  400. package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
  401. package/lib/module/components/executiontasks/validateOTP/utils.js +133 -0
  402. package/lib/module/components/executiontasks/validateOTP/utils.js.map +1 -0
  403. package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -6
  404. package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
  405. package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -3
  406. package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
  407. package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js +5 -9
  408. package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
  409. package/lib/module/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
  410. package/lib/module/components/utils/index.js +8 -0
  411. package/lib/module/components/utils/index.js.map +1 -0
  412. package/lib/module/components/widgets/AlertDisplay.js.map +1 -1
  413. package/lib/module/components/widgets/CancelOrderDialog.js +0 -2
  414. package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
  415. package/lib/module/components/widgets/Card.js +80 -0
  416. package/lib/module/components/widgets/Card.js.map +1 -0
  417. package/lib/module/components/widgets/GoBackModal.js +40 -0
  418. package/lib/module/components/widgets/GoBackModal.js.map +1 -0
  419. package/lib/module/components/widgets/IconButton.js +26 -0
  420. package/lib/module/components/widgets/IconButton.js.map +1 -0
  421. package/lib/module/components/widgets/ModalWidget.js +92 -0
  422. package/lib/module/components/widgets/ModalWidget.js.map +1 -0
  423. package/lib/module/components/widgets/ProgressDialog.js +0 -2
  424. package/lib/module/components/widgets/ProgressDialog.js.map +1 -1
  425. package/lib/module/components/widgets/SearchBar.js +66 -0
  426. package/lib/module/components/widgets/SearchBar.js.map +1 -0
  427. package/lib/module/components/widgets/SnackBarCustom.js +46 -20
  428. package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
  429. package/lib/module/components/widgets/SplitTextInput.js +84 -0
  430. package/lib/module/components/widgets/SplitTextInput.js.map +1 -0
  431. package/lib/module/components/widgets/TabsComponent.js +55 -0
  432. package/lib/module/components/widgets/TabsComponent.js.map +1 -0
  433. package/lib/module/components/widgets/Toaster.js.map +1 -1
  434. package/lib/module/config/DispatchSDKConfig.js +3 -4
  435. package/lib/module/config/DispatchSDKConfig.js.map +1 -1
  436. package/lib/module/constants/apiConstants.js +9 -0
  437. package/lib/module/constants/apiConstants.js.map +1 -0
  438. package/lib/module/constants/constants.js +4 -2
  439. package/lib/module/constants/constants.js.map +1 -1
  440. package/lib/module/constants/statuscode.js +3 -5
  441. package/lib/module/constants/statuscode.js.map +1 -1
  442. package/lib/module/errors/BaseError.js +3 -6
  443. package/lib/module/errors/BaseError.js.map +1 -1
  444. package/lib/module/errors/ErrorCodes.js +5 -5
  445. package/lib/module/errors/ErrorCodes.js.map +1 -1
  446. package/lib/module/events/EventDispatcher.js +16 -0
  447. package/lib/module/events/EventDispatcher.js.map +1 -0
  448. package/lib/module/events/EventListener.js +13 -0
  449. package/lib/module/events/EventListener.js.map +1 -0
  450. package/lib/module/events/constants.js +8 -0
  451. package/lib/module/events/constants.js.map +1 -0
  452. package/lib/module/events/index.js +3 -0
  453. package/lib/module/events/index.js.map +1 -0
  454. package/lib/module/events/interface.js +2 -0
  455. package/lib/module/events/interface.js.map +1 -0
  456. package/lib/module/index.js +9 -5
  457. package/lib/module/index.js.map +1 -1
  458. package/lib/module/manager/dispatch/DispatchStateContainer.js +334 -247
  459. package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
  460. package/lib/module/manager/dispatchCodes/EventCodeContainer.js +52 -2
  461. package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
  462. package/lib/module/manager/dispatchCodes/EventCodeRepo.js +61 -0
  463. package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
  464. package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js +3 -16
  465. package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
  466. package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js +6 -14
  467. package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
  468. package/lib/module/manager/jobRemoval/JobRemovalManager.js +22 -0
  469. package/lib/module/manager/jobRemoval/JobRemovalManager.js.map +1 -0
  470. package/lib/module/manager/location/LocationManager.js +3 -14
  471. package/lib/module/manager/location/LocationManager.js.map +1 -1
  472. package/lib/module/manager/sdk/DispatchSDKManager.js +23 -15
  473. package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
  474. package/lib/module/manager/sdk/DispatchSdkCache.js +6 -13
  475. package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
  476. package/lib/module/manager/sdk/callbacksHandler.js +19 -0
  477. package/lib/module/manager/sdk/callbacksHandler.js.map +1 -0
  478. package/lib/module/manager/syncmanager/AppSyncManager.js +26 -26
  479. package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
  480. package/lib/module/manager/syncmanager/DBConfig.js +41 -7
  481. package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
  482. package/lib/module/manager/syncmanager/NativeSyncManager.js.map +1 -1
  483. package/lib/module/manager/syncmanager/constants.js +6 -0
  484. package/lib/module/manager/syncmanager/constants.js.map +1 -0
  485. package/lib/module/manager/syncmanager/database.js +27 -3
  486. package/lib/module/manager/syncmanager/database.js.map +1 -1
  487. package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +11 -24
  488. package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
  489. package/lib/module/manager/syncmanager/document/DocumentManager.js +8 -20
  490. package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
  491. package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +19 -41
  492. package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
  493. package/lib/module/manager/syncmanager/events/ETEventsManager.js +415 -22
  494. package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
  495. package/lib/module/manager/syncmanager/events/EventsSyncManager.js +209 -82
  496. package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
  497. package/lib/module/manager/syncmanager/events/SyncHttpClient.js +152 -24
  498. package/lib/module/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
  499. package/lib/module/models/DispatchModels.js +3 -4
  500. package/lib/module/models/DispatchModels.js.map +1 -1
  501. package/lib/module/models/ReasonCodes.js.map +1 -1
  502. package/lib/module/models/execTasks/ETBaseModels.js +1 -1
  503. package/lib/module/models/execTasks/ETBaseModels.js.map +1 -1
  504. package/lib/module/models/execTasks/ETConfig.js +22 -29
  505. package/lib/module/models/execTasks/ETConfig.js.map +1 -1
  506. package/lib/module/models/sdk.js +3 -4
  507. package/lib/module/models/sdk.js.map +1 -1
  508. package/lib/module/native/signature/SignatureCapture.js +3 -18
  509. package/lib/module/native/signature/SignatureCapture.js.map +1 -1
  510. package/lib/module/network/GraphQLClient.js +6 -26
  511. package/lib/module/network/GraphQLClient.js.map +1 -1
  512. package/lib/module/network/NetworkClient.js +2 -6
  513. package/lib/module/network/NetworkClient.js.map +1 -1
  514. package/lib/module/network/NetworkUtils.js +10 -3
  515. package/lib/module/network/NetworkUtils.js.map +1 -1
  516. package/lib/module/network/Queries.js.map +1 -1
  517. package/lib/module/network/client.js +7 -17
  518. package/lib/module/network/client.js.map +1 -1
  519. package/lib/module/res/strings.js.map +1 -1
  520. package/lib/module/resources/Login.js +4 -13
  521. package/lib/module/resources/Login.js.map +1 -1
  522. package/lib/module/resources/network.js +3 -6
  523. package/lib/module/resources/network.js.map +1 -1
  524. package/lib/module/styles/SdkColors.js +9 -7
  525. package/lib/module/styles/SdkColors.js.map +1 -1
  526. package/lib/module/styles/executionTasks/CommonStyles.js +57 -14
  527. package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
  528. package/lib/module/ui/screens/CancellationScreen.js +68 -15
  529. package/lib/module/ui/screens/CancellationScreen.js.map +1 -1
  530. package/lib/module/ui/screens/CaptureInputScreen.js +17 -6
  531. package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
  532. package/lib/module/ui/screens/CompleteObjectiveScreen.js +12 -8
  533. package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -1
  534. package/lib/module/ui/screens/DeliverScreen.js +32 -7
  535. package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
  536. package/lib/module/ui/screens/DisplayScreen.js +16 -6
  537. package/lib/module/ui/screens/DisplayScreen.js.map +1 -1
  538. package/lib/module/ui/screens/DoodleScreen.js +19 -9
  539. package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
  540. package/lib/module/ui/screens/DropCashScreen.js +45 -19
  541. package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
  542. package/lib/module/ui/screens/ETScreensIndex.js +3 -2
  543. package/lib/module/ui/screens/ETScreensIndex.js.map +1 -1
  544. package/lib/module/ui/screens/FormsScreen.js +104 -9
  545. package/lib/module/ui/screens/FormsScreen.js.map +1 -1
  546. package/lib/module/ui/screens/GeofenceScreen.js +15 -6
  547. package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
  548. package/lib/module/ui/screens/HttpRequestScreen.js +15 -5
  549. package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -1
  550. package/lib/module/ui/screens/ImageCaptureScreen.js +37 -9
  551. package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
  552. package/lib/module/ui/screens/PaymentScreen.js +30 -17
  553. package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
  554. package/lib/module/ui/screens/PickupScreen.js +40 -12
  555. package/lib/module/ui/screens/PickupScreen.js.map +1 -1
  556. package/lib/module/ui/screens/ScanScreen.js +111 -0
  557. package/lib/module/ui/screens/ScanScreen.js.map +1 -0
  558. package/lib/module/ui/screens/StartWorkFlowScreen.js +64 -16
  559. package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
  560. package/lib/module/ui/screens/ValidateOTPScreen.js +45 -0
  561. package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -0
  562. package/lib/module/ui/screens/WithBaseDispatchScreen.js +0 -3
  563. package/lib/module/ui/screens/WithBaseDispatchScreen.js.map +1 -1
  564. package/lib/module/ui/uiConfig/RouteParams.js +23 -1
  565. package/lib/module/ui/uiConfig/RouteParams.js.map +1 -1
  566. package/lib/module/utils/ApiUtils.js +116 -0
  567. package/lib/module/utils/ApiUtils.js.map +1 -0
  568. package/lib/module/utils/ExecTaskUtils.js +110 -31
  569. package/lib/module/utils/ExecTaskUtils.js.map +1 -1
  570. package/lib/module/utils/Logger.js +9 -21
  571. package/lib/module/utils/Logger.js.map +1 -1
  572. package/lib/module/utils/NetworkUtil.js +3 -15
  573. package/lib/module/utils/NetworkUtil.js.map +1 -1
  574. package/lib/module/utils/SdkUtils.js +2 -15
  575. package/lib/module/utils/SdkUtils.js.map +1 -1
  576. package/lib/module/utils/SyncManagerUtils.js +62 -14
  577. package/lib/module/utils/SyncManagerUtils.js.map +1 -1
  578. package/lib/module/utils/fcm/FCM.js +63 -3
  579. package/lib/module/utils/fcm/FCM.js.map +1 -1
  580. package/lib/module/utils/fcm/FcmUtils.js +86 -7
  581. package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
  582. package/lib/module/utils/helper.js +0 -3
  583. package/lib/module/utils/helper.js.map +1 -1
  584. package/lib/module/utils/hooks/useModal.js +43 -0
  585. package/lib/module/utils/hooks/useModal.js.map +1 -0
  586. package/lib/module/utils/hooks/useTimer.js +37 -0
  587. package/lib/module/utils/hooks/useTimer.js.map +1 -0
  588. package/lib/module/utils/loginHelper.js +6 -16
  589. package/lib/module/utils/loginHelper.js.map +1 -1
  590. package/lib/module/utils/storage.js +86 -29
  591. package/lib/module/utils/storage.js.map +1 -1
  592. package/lib/module/utils/utils.js +8 -6
  593. package/lib/module/utils/utils.js.map +1 -1
  594. package/lib/typescript/components/dispatch/DispatchExecNavigator.d.ts +2 -2
  595. package/lib/typescript/components/executiontasks/CompletedWFSchema.d.ts +2 -2
  596. package/lib/typescript/components/executiontasks/ExecutionTasksIndex.d.ts +6 -7
  597. package/lib/typescript/components/executiontasks/cancellation/CancelET.d.ts +2 -2
  598. package/lib/typescript/components/executiontasks/cancellation/CancellationSchema.d.ts +10 -5
  599. package/lib/typescript/components/executiontasks/captureInput/CaptureInputSchema.d.ts +7 -7
  600. package/lib/typescript/components/executiontasks/captureInput/CaptureText.d.ts +2 -2
  601. package/lib/typescript/components/executiontasks/captureInput/utils.d.ts +1 -0
  602. package/lib/typescript/components/executiontasks/deliver/DeliverET.d.ts +2 -2
  603. package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +8 -7
  604. package/lib/typescript/components/executiontasks/deliver/SLDeliverET.d.ts +3 -3
  605. package/lib/typescript/components/executiontasks/display/DisplayModalET.d.ts +2 -2
  606. package/lib/typescript/components/executiontasks/display/DisplaySchema.d.ts +5 -5
  607. package/lib/typescript/components/executiontasks/doodle/SignatureET.d.ts +2 -2
  608. package/lib/typescript/components/executiontasks/doodle/SignatureSchema.d.ts +7 -7
  609. package/lib/typescript/components/executiontasks/dropCash/DropCashET.d.ts +2 -2
  610. package/lib/typescript/components/executiontasks/dropCash/DropCashSchema.d.ts +2 -2
  611. package/lib/typescript/components/executiontasks/dropCash/SLDropCash.d.ts +2 -2
  612. package/lib/typescript/components/executiontasks/forms/FormGenerator.d.ts +2 -2
  613. package/lib/typescript/components/executiontasks/forms/FormSchema.d.ts +2 -2
  614. package/lib/typescript/components/executiontasks/forms/widgets/DateTimeWidget.d.ts +3 -3
  615. package/lib/typescript/components/executiontasks/forms/widgets/DropdownWidget.d.ts +9 -0
  616. package/lib/typescript/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.d.ts +2 -2
  617. package/lib/typescript/components/executiontasks/forms/widgets/TimeRangeSelector.d.ts +2 -2
  618. package/lib/typescript/components/executiontasks/httpRequest/HttpEtUtils.d.ts +1 -1
  619. package/lib/typescript/components/executiontasks/httpRequest/HttpRequestET.d.ts +2 -2
  620. package/lib/typescript/components/executiontasks/httpRequest/HttpRequestETSchema.d.ts +6 -6
  621. package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +17 -11
  622. package/lib/typescript/components/executiontasks/imageCapture/ImageCapture.d.ts +2 -2
  623. package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentET.d.ts +2 -2
  624. package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentSchema.d.ts +2 -2
  625. package/lib/typescript/components/executiontasks/payments/init/InitPaymentET.d.ts +2 -2
  626. package/lib/typescript/components/executiontasks/payments/init/InitPaymentSchema.d.ts +3 -3
  627. package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentET.d.ts +2 -2
  628. package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentSchema.d.ts +2 -2
  629. package/lib/typescript/components/executiontasks/pickup/PickpSchema.d.ts +3 -3
  630. package/lib/typescript/components/executiontasks/pickup/PickupET.d.ts +2 -2
  631. package/lib/typescript/components/executiontasks/pickup/SLPickupET.d.ts +3 -3
  632. package/lib/typescript/components/executiontasks/scan/ScanET.d.ts +16 -0
  633. package/lib/typescript/components/executiontasks/scan/ScanSchema.d.ts +86 -0
  634. package/lib/typescript/components/executiontasks/scan/constants.d.ts +6 -0
  635. package/lib/typescript/components/executiontasks/scan/interfaces.d.ts +94 -0
  636. package/lib/typescript/components/executiontasks/scan/modalConstant.d.ts +37 -0
  637. package/lib/typescript/components/executiontasks/{scanner → scan/sub_components}/CScanner.d.ts +1 -1
  638. package/lib/typescript/components/executiontasks/scan/sub_components/DropDownUtils.d.ts +7 -0
  639. package/lib/typescript/components/executiontasks/scan/sub_components/ERDropDown.d.ts +17 -0
  640. package/lib/typescript/components/executiontasks/scan/sub_components/SummaryPage.d.ts +21 -0
  641. package/lib/typescript/components/executiontasks/scan/utils.d.ts +37 -0
  642. package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPET.d.ts +4 -0
  643. package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPSchema.d.ts +54 -0
  644. package/lib/typescript/components/executiontasks/validateOTP/constants.d.ts +10 -0
  645. package/lib/typescript/components/executiontasks/validateOTP/sub-components/OTPInput.d.ts +12 -0
  646. package/lib/typescript/components/executiontasks/validateOTP/utils.d.ts +7 -0
  647. package/lib/typescript/components/executiontasks/verifyInput/VerifyInputSchema.d.ts +8 -8
  648. package/lib/typescript/components/executiontasks/verifyLocation/VerifyLocSchema.d.ts +9 -9
  649. package/lib/typescript/components/executiontasks/verifyLocation/VerifyLocationET.d.ts +2 -2
  650. package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpET.d.ts +2 -2
  651. package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpSchema.d.ts +6 -6
  652. package/lib/typescript/components/utils/index.d.ts +2 -0
  653. package/lib/typescript/components/widgets/CancelOrderDialog.d.ts +2 -2
  654. package/lib/typescript/components/widgets/Card.d.ts +17 -0
  655. package/lib/typescript/components/widgets/GoBackModal.d.ts +9 -0
  656. package/lib/typescript/components/widgets/IconButton.d.ts +9 -0
  657. package/lib/typescript/components/widgets/ModalWidget.d.ts +30 -0
  658. package/lib/typescript/components/widgets/ProgressDialog.d.ts +2 -2
  659. package/lib/typescript/components/widgets/SearchBar.d.ts +10 -0
  660. package/lib/typescript/components/widgets/SnackBarCustom.d.ts +10 -5
  661. package/lib/typescript/components/widgets/SplitTextInput.d.ts +12 -0
  662. package/lib/typescript/components/widgets/TabsComponent.d.ts +15 -0
  663. package/lib/typescript/constants/apiConstants.d.ts +7 -0
  664. package/lib/typescript/constants/constants.d.ts +4 -2
  665. package/lib/typescript/errors/ErrorCodes.d.ts +3 -1
  666. package/lib/typescript/events/EventDispatcher.d.ts +3 -0
  667. package/lib/typescript/events/EventListener.d.ts +5 -0
  668. package/lib/typescript/events/constants.d.ts +7 -0
  669. package/lib/typescript/events/index.d.ts +2 -0
  670. package/lib/typescript/events/interface.d.ts +1 -0
  671. package/lib/typescript/index.d.ts +12 -9
  672. package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +38 -17
  673. package/lib/typescript/manager/dispatchCodes/EventCodeContainer.d.ts +12 -1
  674. package/lib/typescript/manager/dispatchCodes/EventCodeRepo.d.ts +13 -0
  675. package/lib/typescript/manager/jobRemoval/JobRemovalManager.d.ts +0 -0
  676. package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +1 -0
  677. package/lib/typescript/manager/sdk/callbacksHandler.d.ts +13 -0
  678. package/lib/typescript/manager/syncmanager/AppSyncManager.d.ts +3 -1
  679. package/lib/typescript/manager/syncmanager/DBConfig.d.ts +80 -4
  680. package/lib/typescript/manager/syncmanager/constants.d.ts +5 -0
  681. package/lib/typescript/manager/syncmanager/database.d.ts +5 -0
  682. package/lib/typescript/manager/syncmanager/document/DocumentManager.d.ts +1 -1
  683. package/lib/typescript/manager/syncmanager/document/DocumentSyncManager.d.ts +1 -1
  684. package/lib/typescript/manager/syncmanager/document/models.d.ts +1 -1
  685. package/lib/typescript/manager/syncmanager/events/ETEventsManager.d.ts +15 -2
  686. package/lib/typescript/manager/syncmanager/events/EventsSyncManager.d.ts +4 -2
  687. package/lib/typescript/manager/syncmanager/events/SyncHttpClient.d.ts +6 -3
  688. package/lib/typescript/models/DispatchModels.d.ts +59 -5
  689. package/lib/typescript/models/ReasonCodes.d.ts +5 -0
  690. package/lib/typescript/models/auth.d.ts +1 -1
  691. package/lib/typescript/models/execTasks/ETBaseModels.d.ts +44 -20
  692. package/lib/typescript/models/execTasks/ETConfig.d.ts +8 -4
  693. package/lib/typescript/models/sdk.d.ts +12 -0
  694. package/lib/typescript/native/signature/SignatureCapture.d.ts +2 -2
  695. package/lib/typescript/network/NetworkUtils.d.ts +1 -5
  696. package/lib/typescript/styles/SdkColors.d.ts +2 -0
  697. package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +50 -5
  698. package/lib/typescript/ui/screens/CancellationScreen.d.ts +2 -2
  699. package/lib/typescript/ui/screens/CaptureInputScreen.d.ts +2 -2
  700. package/lib/typescript/ui/screens/CompleteObjectiveScreen.d.ts +2 -2
  701. package/lib/typescript/ui/screens/DeliverScreen.d.ts +2 -2
  702. package/lib/typescript/ui/screens/DisplayScreen.d.ts +2 -2
  703. package/lib/typescript/ui/screens/DoodleScreen.d.ts +2 -2
  704. package/lib/typescript/ui/screens/DropCashScreen.d.ts +2 -2
  705. package/lib/typescript/ui/screens/ETScreensIndex.d.ts +3 -2
  706. package/lib/typescript/ui/screens/FormsScreen.d.ts +2 -2
  707. package/lib/typescript/ui/screens/GeofenceScreen.d.ts +2 -2
  708. package/lib/typescript/ui/screens/HttpRequestScreen.d.ts +1 -1
  709. package/lib/typescript/ui/screens/ImageCaptureScreen.d.ts +2 -2
  710. package/lib/typescript/ui/screens/PaymentScreen.d.ts +2 -2
  711. package/lib/typescript/ui/screens/PickupScreen.d.ts +2 -2
  712. package/lib/typescript/ui/screens/ScanScreen.d.ts +3 -0
  713. package/lib/typescript/ui/screens/StartWorkFlowScreen.d.ts +2 -2
  714. package/lib/typescript/ui/screens/ValidateOTPScreen.d.ts +3 -0
  715. package/lib/typescript/ui/screens/WithBaseDispatchScreen.d.ts +2 -2
  716. package/lib/typescript/ui/uiConfig/RouteParams.d.ts +14 -0
  717. package/lib/typescript/utils/ApiUtils.d.ts +61 -0
  718. package/lib/typescript/utils/ExecTaskUtils.d.ts +10 -4
  719. package/lib/typescript/utils/NetworkUtil.d.ts +1 -1
  720. package/lib/typescript/utils/SyncManagerUtils.d.ts +4 -3
  721. package/lib/typescript/utils/hooks/useModal.d.ts +6 -0
  722. package/lib/typescript/utils/hooks/useTimer.d.ts +5 -0
  723. package/lib/typescript/utils/storage.d.ts +32 -0
  724. package/package.json +26 -26
  725. package/tsconfig.json +9 -9
  726. package/file_unzip.js +0 -5
  727. package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js +0 -28
  728. package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js.map +0 -1
  729. package/lib/commonjs/components/executiontasks/scanner/CScanner.js.map +0 -1
  730. package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js +0 -32
  731. package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js.map +0 -1
  732. package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js +0 -193
  733. package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js.map +0 -1
  734. package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js +0 -20
  735. package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js.map +0 -1
  736. package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js +0 -49
  737. package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js.map +0 -1
  738. package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -107
  739. package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js.map +0 -1
  740. package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js +0 -317
  741. package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js.map +0 -1
  742. package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js.map +0 -1
  743. package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js +0 -276
  744. package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js.map +0 -1
  745. package/lib/commonjs/ui/screens/RTScanScreen.js +0 -118
  746. package/lib/commonjs/ui/screens/RTScanScreen.js.map +0 -1
  747. package/lib/module/components/executiontasks/doodle/DoodleUtils.js +0 -19
  748. package/lib/module/components/executiontasks/doodle/DoodleUtils.js.map +0 -1
  749. package/lib/module/components/executiontasks/scanner/CScanner.js.map +0 -1
  750. package/lib/module/components/executiontasks/scanner/ScannerSchema.js +0 -24
  751. package/lib/module/components/executiontasks/scanner/ScannerSchema.js.map +0 -1
  752. package/lib/module/components/executiontasks/scanner/ScannerUtils.js +0 -158
  753. package/lib/module/components/executiontasks/scanner/ScannerUtils.js.map +0 -1
  754. package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js +0 -9
  755. package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js.map +0 -1
  756. package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js +0 -38
  757. package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js.map +0 -1
  758. package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -86
  759. package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js.map +0 -1
  760. package/lib/module/components/executiontasks/scanner/returns/RTScan.js +0 -287
  761. package/lib/module/components/executiontasks/scanner/returns/RTScan.js.map +0 -1
  762. package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -80
  763. package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js.map +0 -1
  764. package/lib/module/components/executiontasks/scanner/returns/ScanList.js +0 -253
  765. package/lib/module/components/executiontasks/scanner/returns/ScanList.js.map +0 -1
  766. package/lib/module/ui/screens/RTScanScreen.js +0 -93
  767. package/lib/module/ui/screens/RTScanScreen.js.map +0 -1
  768. package/lib/typescript/components/executiontasks/doodle/DoodleUtils.d.ts +0 -3
  769. package/lib/typescript/components/executiontasks/scanner/ScannerSchema.d.ts +0 -75
  770. package/lib/typescript/components/executiontasks/scanner/ScannerUtils.d.ts +0 -15
  771. package/lib/typescript/components/executiontasks/scanner/returns/DropDownSelector.d.ts +0 -3
  772. package/lib/typescript/components/executiontasks/scanner/returns/DropDownUtils.d.ts +0 -3
  773. package/lib/typescript/components/executiontasks/scanner/returns/RTReasonSelection.d.ts +0 -7
  774. package/lib/typescript/components/executiontasks/scanner/returns/RTScan.d.ts +0 -4
  775. package/lib/typescript/components/executiontasks/scanner/returns/ReasonDropDown.d.ts +0 -14
  776. package/lib/typescript/components/executiontasks/scanner/returns/ScanList.d.ts +0 -17
  777. package/lib/typescript/ui/screens/RTScanScreen.d.ts +0 -3
  778. package/mobile-execution-lib-0.6.4.tgz +0 -0
@@ -1,6 +1,6 @@
1
- import React, { useRef, useState } from 'react';
2
- import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
3
- import { Button } from 'react-native-paper';
1
+ import React, { useRef, useState, useLayoutEffect } from 'react';
2
+ import { BackHandler, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
3
+ import { Button, Provider } from 'react-native-paper';
4
4
  import { getBaseETResponse } from '../../../utils/ExecTaskUtils';
5
5
  import { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';
6
6
  import { EntityCode, ExecutionTaskID } from '../../../models/execTasks/ETConfig';
@@ -10,30 +10,87 @@ import { CommonStyles, Fonts } from '../../../styles/executionTasks/CommonStyles
10
10
  import { insertDocumentInDB } from '../../../utils/SyncManagerUtils';
11
11
  import SignatureCapture from '../../../native/signature/SignatureCapture';
12
12
  import SdkColors, { ColorTheme } from '../../../styles/SdkColors';
13
- import { DEFAULT_SIGN_ET_MESSAGE } from '../../../constants/constants';
14
-
13
+ import { DEFAULT_SIGN_ET_MESSAGE, GO_BACK_EVENT_CODE } from '../../../constants/constants';
14
+ import Icon from 'react-native-vector-icons/MaterialIcons';
15
+ import { hasGoBackConnector } from '../../../components/utils';
16
+ import GoBackModal from '../../../components/widgets/GoBackModal';
17
+ import { useFocusEffect } from '@react-navigation/native';
15
18
  const SignatureET = props => {
16
19
  const signatureViewRef = useRef();
17
20
  const [dragged, setDragged] = useState(0);
21
+ const [showBackModal, setShowBackModal] = useState(false);
18
22
 
23
+ // Handle back-button click when scanList was being viewed
24
+ useFocusEffect(React.useCallback(() => {
25
+ const onBackPress = () => {
26
+ var _props$taskMeta;
27
+ if ((_props$taskMeta = props.taskMeta) !== null && _props$taskMeta !== void 0 && _props$taskMeta.enableGoBack && hasGoBackConnector(props.applicableReasons)) {
28
+ setShowBackModal(true);
29
+ return true;
30
+ } else {
31
+ props.navigation.goBack();
32
+ return true;
33
+ }
34
+ };
35
+ BackHandler.addEventListener('hardwareBackPress', onBackPress);
36
+ return () => BackHandler.removeEventListener('hardwareBackPress', onBackPress);
37
+ }, []));
38
+ useLayoutEffect(() => {
39
+ props.navigation.setOptions({
40
+ title: props.title,
41
+ headerLeft: () => {
42
+ return /*#__PURE__*/React.createElement(Icon, {
43
+ onPress: () => {
44
+ var _props$taskMeta2;
45
+ if ((_props$taskMeta2 = props.taskMeta) !== null && _props$taskMeta2 !== void 0 && _props$taskMeta2.enableGoBack && hasGoBackConnector(props.applicableReasons)) setShowBackModal(true);else props.navigation.goBack();
46
+ },
47
+ name: "arrow-back",
48
+ color: 'black',
49
+ size: 25,
50
+ style: {
51
+ paddingRight: 15,
52
+ paddingTop: 5
53
+ }
54
+ });
55
+ }
56
+ });
57
+ }, [props.navigation, props.title]);
58
+ const renderModal = () => {
59
+ return /*#__PURE__*/React.createElement(GoBackModal, {
60
+ showModal: showBackModal,
61
+ setShowModal: setShowBackModal,
62
+ onSuccess: async () => {
63
+ props.onSubmitET({
64
+ ...(await getBaseETResponse(EntityCode.DOODLE, false, GO_BACK_EVENT_CODE, '', props.mergedObjectiveId, ExecutionTaskID.DOODLE))
65
+ });
66
+ setShowBackModal(false);
67
+ },
68
+ onFailure: () => setShowBackModal(false)
69
+ });
70
+ };
19
71
  async function saveAndSubmit(cancel, image) {
20
72
  if (cancel) {
21
- props.onSubmitET({ ...(await getBaseETResponse(EntityCode.DOODLE, false, getEventCodeByET(ExecutionTaskID.DOODLE, false), ''))
73
+ var _props$applicableReas;
74
+ props.onSubmitET({
75
+ ...(await getBaseETResponse(EntityCode.DOODLE, false, getEventCodeByET(ExecutionTaskID.DOODLE, false, (_props$applicableReas = props.applicableReasons) === null || _props$applicableReas === void 0 ? void 0 : _props$applicableReas.failure), '', props.mergedObjectiveId, ExecutionTaskID.DOODLE))
22
76
  });
23
77
  } else {
24
78
  if (image != null) {
25
79
  const fileName = `SIG_${Date.now().toString()}.jpg`;
26
80
  const folderName = (await DispatchSdkCache.getInstance().getKeyFromCache(DispatchSdkCache.KEYS.FMS_FOLDER)) ?? 'NULL';
27
- let insertID = await insertDocumentInDB(fileName, folderName, JSON.stringify(props.jobIDs), JSON.stringify(props.objRefs), image, props.title ?? 'Signature', null);
28
-
81
+ let insertID = await insertDocumentInDB(fileName, folderName,
82
+ // JSON.stringify(props.jobIDs),
83
+ // JSON.stringify(props.objRefs),
84
+ image, props.title ?? 'Signature', null);
29
85
  if (insertID) {
86
+ var _props$applicableReas2;
30
87
  props.onSubmitET({
31
88
  url: '',
32
89
  file: {
33
90
  folder: folderName,
34
91
  name: fileName
35
92
  },
36
- ...(await getBaseETResponse(EntityCode.DOODLE, true, getEventCodeByET(ExecutionTaskID.DOODLE, true), ''))
93
+ ...(await getBaseETResponse(EntityCode.DOODLE, true, getEventCodeByET(ExecutionTaskID.DOODLE, true, (_props$applicableReas2 = props.applicableReasons) === null || _props$applicableReas2 === void 0 ? void 0 : _props$applicableReas2.success), '', props.mergedObjectiveId, ExecutionTaskID.DOODLE))
37
94
  });
38
95
  } else {
39
96
  showToast('Failed to save signature');
@@ -43,8 +100,7 @@ const SignatureET = props => {
43
100
  }
44
101
  }
45
102
  }
46
-
47
- return /*#__PURE__*/React.createElement(View, {
103
+ return /*#__PURE__*/React.createElement(Provider, null, renderModal(), /*#__PURE__*/React.createElement(View, {
48
104
  style: styles.mainContainer
49
105
  }, /*#__PURE__*/React.createElement(View, {
50
106
  style: styles.doodleView
@@ -55,7 +111,6 @@ const SignatureET = props => {
55
111
  }), /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(TouchableOpacity, {
56
112
  onPress: () => {
57
113
  var _signatureViewRef$cur;
58
-
59
114
  setDragged(0);
60
115
  (_signatureViewRef$cur = signatureViewRef.current) === null || _signatureViewRef$cur === void 0 ? void 0 : _signatureViewRef$cur.resetImage();
61
116
  }
@@ -109,12 +164,10 @@ const SignatureET = props => {
109
164
  mode: 'contained',
110
165
  onPress: async () => {
111
166
  var _signatureViewRef$cur2;
112
-
113
167
  return (_signatureViewRef$cur2 = signatureViewRef.current) === null || _signatureViewRef$cur2 === void 0 ? void 0 : _signatureViewRef$cur2.saveImage();
114
168
  }
115
- }, "Proceed")));
169
+ }, "Proceed"))));
116
170
  };
117
-
118
171
  const styles = StyleSheet.create({
119
172
  horizontalLine: {
120
173
  backgroundColor: '#DDDDDD',
@@ -1 +1 @@
1
- {"version":3,"names":["React","useRef","useState","StyleSheet","Text","TouchableOpacity","View","Button","getBaseETResponse","getEventCodeByET","EntityCode","ExecutionTaskID","showToast","DispatchSdkCache","CommonStyles","Fonts","insertDocumentInDB","SignatureCapture","SdkColors","ColorTheme","DEFAULT_SIGN_ET_MESSAGE","SignatureET","props","signatureViewRef","dragged","setDragged","saveAndSubmit","cancel","image","onSubmitET","DOODLE","fileName","Date","now","toString","folderName","getInstance","getKeyFromCache","KEYS","FMS_FOLDER","insertID","JSON","stringify","jobIDs","objRefs","title","url","file","folder","name","styles","mainContainer","doodleView","messageText","message","horizontalLine","current","resetImage","clearBtn","flex","Math","max","resolution","length","breadth","penColor","result","encoded","drag","prevState","bottomButtons","cancelButton","marginEnd","cancelButtonLabel","nextButtonLabel","nextButton","marginStart","saveImage","create","backgroundColor","width","height","marginTop","marginBottom","padding","justifyContent","flexDirection","color","LIGHT","primaryButton","fontFamily","IBMPlexSans_600SemiBold","fontSize","textAlign","lineHeight","IBMPlexSans_400Regular","messageText2"],"sources":["SignatureET.tsx"],"sourcesContent":["import React, { useRef, useState } from 'react';\nimport { StyleSheet, Text, TouchableOpacity, View } from 'react-native';\nimport type { SignatureInput } from './SignatureSchema';\nimport { Button } from 'react-native-paper';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\nimport { showToast } from '../../widgets/Toaster';\nimport DispatchSdkCache from '../../../manager/sdk/DispatchSdkCache';\nimport {\n CommonStyles,\n Fonts,\n} from '../../../styles/executionTasks/CommonStyles';\nimport { insertDocumentInDB } from '../../../utils/SyncManagerUtils';\nimport SignatureCapture from '../../../native/signature/SignatureCapture';\nimport SdkColors, { ColorTheme } from '../../../styles/SdkColors';\nimport { DEFAULT_SIGN_ET_MESSAGE } from '../../../constants/constants';\n\nconst SignatureET = (props: SignatureInput) => {\n const signatureViewRef = useRef<any>();\n const [dragged, setDragged] = useState(0);\n\n async function saveAndSubmit(cancel: boolean, image: string) {\n if (cancel) {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.DOODLE,\n false,\n getEventCodeByET(ExecutionTaskID.DOODLE, false),\n ''\n )),\n });\n } else {\n if (image != null) {\n const fileName = `SIG_${Date.now().toString()}.jpg`;\n const folderName =\n (await DispatchSdkCache.getInstance().getKeyFromCache(\n DispatchSdkCache.KEYS.FMS_FOLDER\n )) ?? 'NULL';\n let insertID = await insertDocumentInDB(\n fileName,\n folderName,\n JSON.stringify(props.jobIDs),\n JSON.stringify(props.objRefs),\n image,\n props.title ?? 'Signature',\n null\n );\n if (insertID) {\n props.onSubmitET({\n url: '',\n file: {\n folder: folderName,\n name: fileName,\n },\n ...(await getBaseETResponse(\n EntityCode.DOODLE,\n true,\n getEventCodeByET(ExecutionTaskID.DOODLE, true),\n ''\n )),\n });\n } else {\n showToast('Failed to save signature');\n }\n } else {\n showToast('Please enter signature!');\n }\n }\n }\n\n return (\n <View style={styles.mainContainer}>\n <View style={styles.doodleView}>\n <Text style={styles.messageText}>\n {props.message || DEFAULT_SIGN_ET_MESSAGE}\n </Text>\n <View style={styles.horizontalLine} />\n <View>\n {/* <Text style={styles.messageText2}>{'Received by'}</Text> */}\n <TouchableOpacity\n onPress={() => {\n setDragged(0);\n signatureViewRef.current?.resetImage();\n }}\n >\n <Text style={styles.clearBtn}>{'Clear'}</Text>\n </TouchableOpacity>\n </View>\n <View style={{ flex: 1 }}>\n <SignatureCapture\n ref={signatureViewRef}\n rotateClockwise={false}\n square={false}\n viewMode={'PORTRAIT'}\n showBorder={false}\n showNativeButtons={false}\n showTitleLabel={false}\n maxSize={Math.max(\n props.resolution.length,\n props.resolution.breadth\n )}\n minStrokeWidth={8}\n maxStrokeWidth={6}\n strokeColor={props.penColor ?? 'black'}\n backgroundColor={'white'}\n onSaveEvent={async (result) => {\n if (dragged > 0) {\n await saveAndSubmit(false, result.encoded);\n } else {\n showToast('Please enter signature');\n }\n }}\n onDragEvent={(drag) => {\n if (drag.dragged) setDragged((prevState) => prevState + 1);\n }}\n />\n </View>\n </View>\n <View style={styles.bottomButtons}>\n <Button\n style={[CommonStyles.cancelButton, { flex: 1, marginEnd: 5 }]}\n labelStyle={CommonStyles.cancelButtonLabel}\n mode={'outlined'}\n onPress={async () => {\n await saveAndSubmit(true, '');\n }}\n >\n Skip\n </Button>\n <Button\n labelStyle={CommonStyles.nextButtonLabel}\n style={[CommonStyles.nextButton, { flex: 1, marginStart: 5 }]}\n mode={'contained'}\n onPress={async () => signatureViewRef.current?.saveImage()}\n >\n Proceed\n </Button>\n </View>\n </View>\n );\n};\nconst styles = StyleSheet.create({\n horizontalLine: {\n backgroundColor: '#DDDDDD',\n width: '100%',\n height: 1,\n marginTop: 13,\n marginBottom: 15,\n },\n doodleView: {\n flex: 1,\n padding: 20,\n },\n mainContainer: {\n flex: 1,\n backgroundColor: '#ffffff',\n },\n bottomButtons: {\n justifyContent: 'flex-end',\n marginBottom: 10,\n flexDirection: 'row',\n marginStart: 10,\n marginEnd: 10,\n },\n clearBtn: {\n color: SdkColors[ColorTheme.LIGHT].primaryButton,\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n fontSize: 15,\n justifyContent: 'flex-end',\n textAlign: 'right',\n },\n messageText: {\n fontSize: 16,\n lineHeight: 20,\n color: '#474A57',\n fontFamily: Fonts.IBMPlexSans_400Regular,\n },\n messageText2: {\n flex: 1,\n fontSize: 16,\n lineHeight: 20,\n color: '#999999',\n fontFamily: Fonts.IBMPlexSans_400Regular,\n },\n});\nexport default SignatureET;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,MAAhB,EAAwBC,QAAxB,QAAwC,OAAxC;AACA,SAASC,UAAT,EAAqBC,IAArB,EAA2BC,gBAA3B,EAA6CC,IAA7C,QAAyD,cAAzD;AAEA,SAASC,MAAT,QAAuB,oBAAvB;AACA,SAASC,iBAAT,QAAkC,8BAAlC;AACA,SAASC,gBAAT,QAAiC,mDAAjC;AACA,SACEC,UADF,EAEEC,eAFF,QAGO,oCAHP;AAIA,SAASC,SAAT,QAA0B,uBAA1B;AACA,OAAOC,gBAAP,MAA6B,uCAA7B;AACA,SACEC,YADF,EAEEC,KAFF,QAGO,6CAHP;AAIA,SAASC,kBAAT,QAAmC,iCAAnC;AACA,OAAOC,gBAAP,MAA6B,4CAA7B;AACA,OAAOC,SAAP,IAAoBC,UAApB,QAAsC,2BAAtC;AACA,SAASC,uBAAT,QAAwC,8BAAxC;;AAEA,MAAMC,WAAW,GAAIC,KAAD,IAA2B;EAC7C,MAAMC,gBAAgB,GAAGtB,MAAM,EAA/B;EACA,MAAM,CAACuB,OAAD,EAAUC,UAAV,IAAwBvB,QAAQ,CAAC,CAAD,CAAtC;;EAEA,eAAewB,aAAf,CAA6BC,MAA7B,EAA8CC,KAA9C,EAA6D;IAC3D,IAAID,MAAJ,EAAY;MACVL,KAAK,CAACO,UAAN,CAAiB,EACf,IAAI,MAAMrB,iBAAiB,CACzBE,UAAU,CAACoB,MADc,EAEzB,KAFyB,EAGzBrB,gBAAgB,CAACE,eAAe,CAACmB,MAAjB,EAAyB,KAAzB,CAHS,EAIzB,EAJyB,CAA3B;MADe,CAAjB;IAQD,CATD,MASO;MACL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,CAA4BC,aAD3B;IAERC,UAAU,EAAE3E,KAAK,CAAC4E,uBAFV;IAGRC,QAAQ,EAAE,EAHF;IAIRP,cAAc,EAAE,UAJR;IAKRQ,SAAS,EAAE;EALH,CAvBqB;EA8B/BxC,WAAW,EAAE;IACXuC,QAAQ,EAAE,EADC;IAEXE,UAAU,EAAE,EAFD;IAGXP,KAAK,EAAE,SAHI;IAIXG,UAAU,EAAE3E,KAAK,CAACgF;EAJP,CA9BkB;EAoC/BC,YAAY,EAAE;IACZrC,IAAI,EAAE,CADM;IAEZiC,QAAQ,EAAE,EAFE;IAGZE,UAAU,EAAE,EAHA;IAIZP,KAAK,EAAE,SAJK;IAKZG,UAAU,EAAE3E,KAAK,CAACgF;EALN;AApCiB,CAAlB,CAAf;AA4CA,eAAe1E,WAAf"}
1
+ {"version":3,"names":["React","useRef","useState","useLayoutEffect","BackHandler","StyleSheet","Text","TouchableOpacity","View","Button","Provider","getBaseETResponse","getEventCodeByET","EntityCode","ExecutionTaskID","showToast","DispatchSdkCache","CommonStyles","Fonts","insertDocumentInDB","SignatureCapture","SdkColors","ColorTheme","DEFAULT_SIGN_ET_MESSAGE","GO_BACK_EVENT_CODE","Icon","hasGoBackConnector","GoBackModal","useFocusEffect","SignatureET","props","signatureViewRef","dragged","setDragged","showBackModal","setShowBackModal","useCallback","onBackPress","_props$taskMeta","taskMeta","enableGoBack","applicableReasons","navigation","goBack","addEventListener","removeEventListener","setOptions","title","headerLeft","createElement","onPress","_props$taskMeta2","name","color","size","style","paddingRight","paddingTop","renderModal","showModal","setShowModal","onSuccess","onSubmitET","DOODLE","mergedObjectiveId","onFailure","saveAndSubmit","cancel","image","_props$applicableReas","failure","fileName","Date","now","toString","folderName","getInstance","getKeyFromCache","KEYS","FMS_FOLDER","insertID","_props$applicableReas2","url","file","folder","success","styles","mainContainer","doodleView","messageText","message","horizontalLine","_signatureViewRef$cur","current","resetImage","clearBtn","flex","ref","rotateClockwise","square","viewMode","showBorder","showNativeButtons","showTitleLabel","maxSize","Math","max","resolution","length","breadth","minStrokeWidth","maxStrokeWidth","strokeColor","penColor","backgroundColor","onSaveEvent","result","encoded","onDragEvent","drag","prevState","bottomButtons","cancelButton","marginEnd","labelStyle","cancelButtonLabel","mode","nextButtonLabel","nextButton","marginStart","_signatureViewRef$cur2","saveImage","create","width","height","marginTop","marginBottom","padding","justifyContent","flexDirection","LIGHT","primaryButton","fontFamily","IBMPlexSans_600SemiBold","fontSize","textAlign","lineHeight","IBMPlexSans_400Regular","messageText2"],"sources":["SignatureET.tsx"],"sourcesContent":["import React, { useRef, useState, useLayoutEffect } from 'react';\nimport {\n BackHandler,\n StyleSheet,\n Text,\n TouchableOpacity,\n View,\n} from 'react-native';\nimport type { SignatureInput } from './SignatureSchema';\nimport { Button, Modal, Portal, Provider } from 'react-native-paper';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\nimport { showToast } from '../../widgets/Toaster';\nimport DispatchSdkCache from '../../../manager/sdk/DispatchSdkCache';\nimport {\n CommonStyles,\n Fonts,\n} from '../../../styles/executionTasks/CommonStyles';\nimport { insertDocumentInDB } from '../../../utils/SyncManagerUtils';\nimport SignatureCapture from '../../../native/signature/SignatureCapture';\nimport SdkColors, { ColorTheme } from '../../../styles/SdkColors';\nimport {\n DEFAULT_SIGN_ET_MESSAGE,\n GO_BACK_EVENT_CODE,\n} from '../../../constants/constants';\nimport Icon from 'react-native-vector-icons/MaterialIcons';\nimport { hasGoBackConnector } from '../../../components/utils';\nimport GoBackModal from '../../../components/widgets/GoBackModal';\nimport { useFocusEffect } from '@react-navigation/native';\n\nconst SignatureET = (props: SignatureInput) => {\n const signatureViewRef = useRef<any>();\n const [dragged, setDragged] = useState(0);\n const [showBackModal, setShowBackModal] = useState(false);\n\n // Handle back-button click when scanList was being viewed\n useFocusEffect(\n React.useCallback(() => {\n const onBackPress = () => {\n if (\n props.taskMeta?.enableGoBack &&\n hasGoBackConnector(props.applicableReasons)\n ) {\n setShowBackModal(true);\n return true;\n } else {\n props.navigation.goBack();\n return true;\n }\n };\n BackHandler.addEventListener('hardwareBackPress', onBackPress);\n return () =>\n BackHandler.removeEventListener('hardwareBackPress', onBackPress);\n }, [])\n );\n\n useLayoutEffect(() => {\n props.navigation.setOptions({\n title: props.title,\n headerLeft: () => {\n return (\n <Icon\n onPress={() => {\n if (\n props.taskMeta?.enableGoBack &&\n hasGoBackConnector(props.applicableReasons)\n )\n setShowBackModal(true);\n else props.navigation.goBack();\n }}\n name=\"arrow-back\"\n color={'black'}\n size={25}\n style={{\n paddingRight: 15,\n paddingTop: 5,\n }}\n />\n );\n },\n });\n }, [props.navigation, props.title]);\n\n const renderModal = () => {\n return (\n <GoBackModal\n showModal={showBackModal}\n setShowModal={setShowBackModal}\n onSuccess={async () => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.DOODLE,\n false,\n GO_BACK_EVENT_CODE,\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.DOODLE\n )),\n });\n setShowBackModal(false);\n }}\n onFailure={() => setShowBackModal(false)}\n />\n );\n };\n\n async function saveAndSubmit(cancel: boolean, image: string) {\n if (cancel) {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.DOODLE,\n false,\n getEventCodeByET(\n ExecutionTaskID.DOODLE,\n false,\n props.applicableReasons?.failure\n ),\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.DOODLE\n )),\n });\n } else {\n if (image != null) {\n const fileName = `SIG_${Date.now().toString()}.jpg`;\n const folderName =\n (await DispatchSdkCache.getInstance().getKeyFromCache(\n DispatchSdkCache.KEYS.FMS_FOLDER\n )) ?? 'NULL';\n let insertID = await insertDocumentInDB(\n fileName,\n folderName,\n // JSON.stringify(props.jobIDs),\n // JSON.stringify(props.objRefs),\n image,\n props.title ?? 'Signature',\n null\n );\n if (insertID) {\n props.onSubmitET({\n url: '',\n file: {\n folder: folderName,\n name: fileName,\n },\n ...(await getBaseETResponse(\n EntityCode.DOODLE,\n true,\n getEventCodeByET(\n ExecutionTaskID.DOODLE,\n true,\n props.applicableReasons?.success\n ),\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.DOODLE\n )),\n });\n } else {\n showToast('Failed to save signature');\n }\n } else {\n showToast('Please enter signature!');\n }\n }\n }\n\n return (\n <Provider>\n {renderModal()}\n <View style={styles.mainContainer}>\n <View style={styles.doodleView}>\n <Text style={styles.messageText}>\n {props.message || DEFAULT_SIGN_ET_MESSAGE}\n </Text>\n <View style={styles.horizontalLine} />\n <View>\n {/* <Text style={styles.messageText2}>{'Received by'}</Text> */}\n <TouchableOpacity\n onPress={() => {\n setDragged(0);\n signatureViewRef.current?.resetImage();\n }}\n >\n <Text style={styles.clearBtn}>{'Clear'}</Text>\n </TouchableOpacity>\n </View>\n <View style={{ flex: 1 }}>\n <SignatureCapture\n ref={signatureViewRef}\n rotateClockwise={false}\n square={false}\n viewMode={'PORTRAIT'}\n showBorder={false}\n showNativeButtons={false}\n showTitleLabel={false}\n maxSize={Math.max(\n props.resolution.length,\n props.resolution.breadth\n )}\n minStrokeWidth={8}\n maxStrokeWidth={6}\n strokeColor={props.penColor ?? 'black'}\n backgroundColor={'white'}\n onSaveEvent={async (result) => {\n if (dragged > 0) {\n await saveAndSubmit(false, result.encoded);\n } else {\n showToast('Please enter signature');\n }\n }}\n onDragEvent={(drag) => {\n if (drag.dragged) setDragged((prevState) => prevState + 1);\n }}\n />\n </View>\n </View>\n <View style={styles.bottomButtons}>\n <Button\n style={[CommonStyles.cancelButton, { flex: 1, marginEnd: 5 }]}\n labelStyle={CommonStyles.cancelButtonLabel}\n mode={'outlined'}\n onPress={async () => {\n await saveAndSubmit(true, '');\n }}\n >\n Skip\n </Button>\n <Button\n labelStyle={CommonStyles.nextButtonLabel}\n style={[CommonStyles.nextButton, { flex: 1, marginStart: 5 }]}\n mode={'contained'}\n onPress={async () => signatureViewRef.current?.saveImage()}\n >\n Proceed\n </Button>\n </View>\n </View>\n </Provider>\n );\n};\nconst styles = StyleSheet.create({\n horizontalLine: {\n backgroundColor: '#DDDDDD',\n width: '100%',\n height: 1,\n marginTop: 13,\n marginBottom: 15,\n },\n doodleView: {\n flex: 1,\n padding: 20,\n },\n mainContainer: {\n flex: 1,\n backgroundColor: '#ffffff',\n },\n bottomButtons: {\n justifyContent: 'flex-end',\n marginBottom: 10,\n flexDirection: 'row',\n marginStart: 10,\n marginEnd: 10,\n },\n clearBtn: {\n color: SdkColors[ColorTheme.LIGHT].primaryButton,\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n fontSize: 15,\n justifyContent: 'flex-end',\n textAlign: 'right',\n },\n messageText: {\n fontSize: 16,\n lineHeight: 20,\n color: '#474A57',\n fontFamily: Fonts.IBMPlexSans_400Regular,\n },\n messageText2: {\n flex: 1,\n fontSize: 16,\n lineHeight: 20,\n color: '#999999',\n fontFamily: Fonts.IBMPlexSans_400Regular,\n },\n});\nexport default SignatureET;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,QAAQ,EAAEC,eAAe,QAAQ,OAAO;AAChE,SACEC,WAAW,EACXC,UAAU,EACVC,IAAI,EACJC,gBAAgB,EAChBC,IAAI,QACC,cAAc;AAErB,SAASC,MAAM,EAAiBC,QAAQ,QAAQ,oBAAoB;AACpE,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,SAASC,gBAAgB,QAAQ,mDAAmD;AACpF,SACEC,UAAU,EACVC,eAAe,QACV,oCAAoC;AAC3C,SAASC,SAAS,QAAQ,uBAAuB;AACjD,OAAOC,gBAAgB,MAAM,uCAAuC;AACpE,SACEC,YAAY,EACZC,KAAK,QACA,6CAA6C;AACpD,SAASC,kBAAkB,QAAQ,iCAAiC;AACpE,OAAOC,gBAAgB,MAAM,4CAA4C;AACzE,OAAOC,SAAS,IAAIC,UAAU,QAAQ,2BAA2B;AACjE,SACEC,uBA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IAAI,EAAE,CAAC;IACPgD,QAAQ,EAAE,EAAE;IACZE,UAAU,EAAE,EAAE;IACd7F,KAAK,EAAE,SAAS;IAChByF,UAAU,EAAE5H,KAAK,CAACiI;EACpB;AACF,CAAC,CAAC;AACF,eAAetH,WAAW"}
@@ -9,7 +9,6 @@ import { isEmptyOrBlank } from '../../../utils/utils';
9
9
  import { CommonStyles } from '../../../styles/executionTasks/CommonStyles';
10
10
  import { getPaymentValue } from '../payments/PaymentUtils';
11
11
  const styles = PaymentStyles;
12
-
13
12
  const DropCashET = props => {
14
13
  const [amountCollected, setAmountCollected] = useState('');
15
14
  const [inputError, setInputError] = useState('');
@@ -70,7 +69,9 @@ const DropCashET = props => {
70
69
  labelStyle: CommonStyles.cancelButtonLabel,
71
70
  mode: 'outlined',
72
71
  onPress: async () => {
73
- props.onSubmitET({ ...(await getBaseETResponse(EntityCode.DELIVER_CASH, false, getEventCodeByET(ExecutionTaskID.DELIVER_CASH, false), ''))
72
+ var _props$applicableReas;
73
+ props.onSubmitET({
74
+ ...(await getBaseETResponse(EntityCode.DELIVER_CASH, false, getEventCodeByET(ExecutionTaskID.DELIVER_CASH, false, (_props$applicableReas = props.applicableReasons) === null || _props$applicableReas === void 0 ? void 0 : _props$applicableReas.failure), '', props.mergedObjectiveId, ExecutionTaskID.DELIVER_CASH))
74
75
  });
75
76
  }
76
77
  }, "Cancel"), /*#__PURE__*/React.createElement(Button, {
@@ -83,13 +84,12 @@ const DropCashET = props => {
83
84
  mode: 'contained',
84
85
  onPress: async () => {
85
86
  if (!isEmptyOrBlank(amountCollected) && !Number.isNaN(+amountCollected)) {
87
+ var _props$applicableReas2;
86
88
  const calculatedValue = getPaymentValue(props.expectedAmount.value, props.expectedAmount.minorUnit);
87
-
88
89
  if (+amountCollected !== calculatedValue) {
89
90
  setInputError(`Amount should be equal to ${calculatedValue}`);
90
91
  return;
91
92
  }
92
-
93
93
  setDisableNext(true);
94
94
  props.onSubmitET({
95
95
  amount: {
@@ -97,12 +97,11 @@ const DropCashET = props => {
97
97
  currencyCode: props.expectedAmount.currencyCode,
98
98
  minorUnit: props.expectedAmount.minorUnit
99
99
  },
100
- ...(await getBaseETResponse(EntityCode.DELIVER_CASH, true, getEventCodeByET(ExecutionTaskID.DELIVER_CASH, true), ''))
100
+ ...(await getBaseETResponse(EntityCode.DELIVER_CASH, true, getEventCodeByET(ExecutionTaskID.DELIVER_CASH, true, (_props$applicableReas2 = props.applicableReasons) === null || _props$applicableReas2 === void 0 ? void 0 : _props$applicableReas2.success), '', props.mergedObjectiveId, ExecutionTaskID.DELIVER_CASH))
101
101
  });
102
102
  } else setInputError('Please enter valid amount.');
103
103
  }
104
104
  }, "Drop Cash"))));
105
105
  };
106
-
107
106
  export default DropCashET;
108
107
  //# sourceMappingURL=DropCashET.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["KeyboardAvoidingView","ScrollView","Text","View","React","useState","Button","TextInput","PaymentStyles","getBaseETResponse","getEventCodeByET","EntityCode","ExecutionTaskID","isEmptyOrBlank","CommonStyles","getPaymentValue","styles","DropCashET","props","amountCollected","setAmountCollected","inputError","setInputError","disableNext","setDisableNext","mainContainer","textStyle1","amountStyle","expectedAmount","currencyCode","value","minorUnit","marginTop","paddingTop","paddingStart","paddingEnd","backgroundColor","paddingBottom","text","color","message","messageStyle","margin","flexDirection","cancelButton","flex","marginEnd","cancelButtonLabel","onSubmitET","DELIVER_CASH","nextButton","marginStart","nextButtonLabel","Number","isNaN","calculatedValue","amount"],"sources":["DropCashET.tsx"],"sourcesContent":["import { KeyboardAvoidingView, ScrollView, Text, View } from 'react-native';\nimport React, { useState } from 'react';\nimport { Button, TextInput } from 'react-native-paper';\nimport type { DropCashInput } from './DropCashSchema';\nimport { PaymentStyles } from '../payments/PaymentStyles';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\nimport { isEmptyOrBlank } from '../../../utils/utils';\nimport { CommonStyles } from '../../../styles/executionTasks/CommonStyles';\nimport { getPaymentValue } from '../payments/PaymentUtils';\n\nconst styles = PaymentStyles;\n\nconst DropCashET = (props: DropCashInput) => {\n const [amountCollected, setAmountCollected] = useState('');\n const [inputError, setInputError] = useState('');\n const [disableNext, setDisableNext] = useState(false);\n\n return (\n <KeyboardAvoidingView style={CommonStyles.mainContainer}>\n <ScrollView style={CommonStyles.mainContainer}>\n <View style={CommonStyles.mainContainer}>\n <Text style={styles.textStyle1}>AMOUNT TO DEPOSIT</Text>\n <Text style={styles.amountStyle}>\n {props.expectedAmount.currencyCode +\n ' ' +\n getPaymentValue(\n props.expectedAmount.value,\n props.expectedAmount.minorUnit\n )}\n </Text>\n <View\n style={{\n marginTop: 20,\n paddingTop: 10,\n paddingStart: 20,\n paddingEnd: 20,\n backgroundColor: 'white',\n paddingBottom: 40,\n }}\n >\n <TextInput\n multiline={false}\n autoComplete={'off'}\n label=\"Enter amount\"\n value={amountCollected}\n mode={'outlined'}\n error={!isEmptyOrBlank(inputError)}\n selectionColor={'#6200EE'}\n keyboardType={'numeric'}\n onChangeText={(text) => {\n setInputError('');\n setAmountCollected(text);\n }}\n />\n {!isEmptyOrBlank(inputError) && (\n <Text style={{ color: '#B00020' }}>{inputError}</Text>\n )}\n </View>\n {props.message && (\n <View>\n <Text style={styles.textStyle1}>MESSAGE</Text>\n <Text style={styles.messageStyle}>{props.message}</Text>\n </View>\n )}\n </View>\n </ScrollView>\n <View style={{ margin: 10 }}>\n <View style={{ flexDirection: 'row' }}>\n <Button\n style={[CommonStyles.cancelButton, { flex: 1, marginEnd: 5 }]}\n labelStyle={CommonStyles.cancelButtonLabel}\n mode={'outlined'}\n onPress={async () => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.DELIVER_CASH,\n false,\n getEventCodeByET(ExecutionTaskID.DELIVER_CASH, false),\n ''\n )),\n });\n }}\n >\n Cancel\n </Button>\n <Button\n disabled={disableNext}\n style={[CommonStyles.nextButton, { flex: 1, marginStart: 5 }]}\n labelStyle={CommonStyles.nextButtonLabel}\n mode={'contained'}\n onPress={async () => {\n if (\n !isEmptyOrBlank(amountCollected) &&\n !Number.isNaN(+amountCollected)\n ) {\n const calculatedValue = getPaymentValue(\n props.expectedAmount.value,\n props.expectedAmount.minorUnit\n );\n if (+amountCollected !== calculatedValue) {\n setInputError(`Amount should be equal to ${calculatedValue}`);\n return;\n }\n setDisableNext(true);\n props.onSubmitET({\n amount: {\n value: props.expectedAmount.value,\n currencyCode: props.expectedAmount.currencyCode,\n minorUnit: props.expectedAmount.minorUnit,\n },\n ...(await getBaseETResponse(\n EntityCode.DELIVER_CASH,\n true,\n getEventCodeByET(ExecutionTaskID.DELIVER_CASH, true),\n ''\n )),\n });\n } else setInputError('Please enter valid amount.');\n }}\n >\n Drop Cash\n </Button>\n </View>\n </View>\n </KeyboardAvoidingView>\n );\n};\nexport default DropCashET;\n"],"mappings":"AAAA,SAASA,oBAAT,EAA+BC,UAA/B,EAA2CC,IAA3C,EAAiDC,IAAjD,QAA6D,cAA7D;AACA,OAAOC,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,SAASC,MAAT,EAAiBC,SAAjB,QAAkC,oBAAlC;AAEA,SAASC,aAAT,QAA8B,2BAA9B;AACA,SAASC,iBAAT,QAAkC,8BAAlC;AACA,SAASC,gBAAT,QAAiC,mDAAjC;AACA,SACEC,UADF,EAEEC,eAFF,QAGO,oCAHP;AAIA,SAASC,cAAT,QAA+B,sBAA/B;AACA,SAASC,YAAT,QAA6B,6CAA7B;AACA,SAASC,eAAT,QAAgC,0BAAhC;AAEA,MAAMC,MAAM,GAAGR,aAAf;;AAEA,MAAMS,UAAU,GAAIC,KAAD,IAA0B;EAC3C,MAAM,CAACC,eAAD,EAAkBC,kBAAlB,IAAwCf,QAAQ,CAAC,EAAD,CAAtD;EACA,MAAM,CAACgB,UAAD,EAAaC,aAAb,IAA8BjB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CZ,KAAK,CAACU,cAAN,CAAqBG,SAFgB,CAAvC;;QAIA,IAAI,CAACZ,eAAD,KAAqBoC,eAAzB,EAA0C;UACxCjC,aAAa,CAAE,6BAA4BiC,eAAgB,EAA9C,CAAb;UACA;QACD;;QACD/B,cAAc,CAAC,IAAD,CAAd;QACAN,KAAK,CAAC8B,UAAN,CAAiB;UACfQ,MAAM,EAAE;YACN1B,KAAK,EAAEZ,KAAK,CAACU,cAAN,CAAqBE,KADtB;YAEND,YAAY,EAAEX,KAAK,CAACU,cAAN,CAAqBC,YAF7B;YAGNE,SAAS,EAAEb,KAAK,CAACU,cAAN,CAAqBG;UAH1B,CADO;UAMf,IAAI,MAAMtB,iBAAiB,CACzBE,UAAU,CAACsC,YADc,EAEzB,IAFyB,EAGzBvC,gBAAgB,CAACE,eAAe,CAACqC,YAAjB,EAA+B,IAA/B,CAHS,EAIzB,EAJyB,CAA3B;QANe,CAAjB;MAaD,CA1BD,MA0BO3B,aAAa,CAAC,4BAAD,CAAb;IACR;EAjCH,eAlBF,CADF,CAhDF,CADF;AA6GD,CAlHD;;AAmHA,eAAeL,UAAf"}
1
+ {"version":3,"names":["KeyboardAvoidingView","ScrollView","Text","View","React","useState","Button","TextInput","PaymentStyles","getBaseETResponse","getEventCodeByET","EntityCode","ExecutionTaskID","isEmptyOrBlank","CommonStyles","getPaymentValue","styles","DropCashET","props","amountCollected","setAmountCollected","inputError","setInputError","disableNext","setDisableNext","createElement","style","mainContainer","textStyle1","amountStyle","expectedAmount","currencyCode","value","minorUnit","marginTop","paddingTop","paddingStart","paddingEnd","backgroundColor","paddingBottom","multiline","autoComplete","label","mode","error","selectionColor","keyboardType","onChangeText","text","color","message","messageStyle","margin","flexDirection","cancelButton","flex","marginEnd","labelStyle","cancelButtonLabel","onPress","_props$applicableReas","onSubmitET","DELIVER_CASH","applicableReasons","failure","mergedObjectiveId","disabled","nextButton","marginStart","nextButtonLabel","Number","isNaN","_props$applicableReas2","calculatedValue","amount","success"],"sources":["DropCashET.tsx"],"sourcesContent":["import { KeyboardAvoidingView, ScrollView, Text, View } from 'react-native';\nimport React, { useState } from 'react';\nimport { Button, TextInput } from 'react-native-paper';\nimport type { DropCashInput } from './DropCashSchema';\nimport { PaymentStyles } from '../payments/PaymentStyles';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\nimport { isEmptyOrBlank } from '../../../utils/utils';\nimport { CommonStyles } from '../../../styles/executionTasks/CommonStyles';\nimport { getPaymentValue } from '../payments/PaymentUtils';\n\nconst styles = PaymentStyles;\n\nconst DropCashET = (props: DropCashInput) => {\n const [amountCollected, setAmountCollected] = useState('');\n const [inputError, setInputError] = useState('');\n const [disableNext, setDisableNext] = useState(false);\n\n return (\n <KeyboardAvoidingView style={CommonStyles.mainContainer}>\n <ScrollView style={CommonStyles.mainContainer}>\n <View style={CommonStyles.mainContainer}>\n <Text style={styles.textStyle1}>AMOUNT TO DEPOSIT</Text>\n <Text style={styles.amountStyle}>\n {props.expectedAmount.currencyCode +\n ' ' +\n getPaymentValue(\n props.expectedAmount.value,\n props.expectedAmount.minorUnit\n )}\n </Text>\n <View\n style={{\n marginTop: 20,\n paddingTop: 10,\n paddingStart: 20,\n paddingEnd: 20,\n backgroundColor: 'white',\n paddingBottom: 40,\n }}\n >\n <TextInput\n multiline={false}\n autoComplete={'off'}\n label=\"Enter amount\"\n value={amountCollected}\n mode={'outlined'}\n error={!isEmptyOrBlank(inputError)}\n selectionColor={'#6200EE'}\n keyboardType={'numeric'}\n onChangeText={(text) => {\n setInputError('');\n setAmountCollected(text);\n }}\n />\n {!isEmptyOrBlank(inputError) && (\n <Text style={{ color: '#B00020' }}>{inputError}</Text>\n )}\n </View>\n {props.message && (\n <View>\n <Text style={styles.textStyle1}>MESSAGE</Text>\n <Text style={styles.messageStyle}>{props.message}</Text>\n </View>\n )}\n </View>\n </ScrollView>\n <View style={{ margin: 10 }}>\n <View style={{ flexDirection: 'row' }}>\n <Button\n style={[CommonStyles.cancelButton, { flex: 1, marginEnd: 5 }]}\n labelStyle={CommonStyles.cancelButtonLabel}\n mode={'outlined'}\n onPress={async () => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.DELIVER_CASH,\n false,\n getEventCodeByET(\n ExecutionTaskID.DELIVER_CASH,\n false,\n props.applicableReasons?.failure\n ),\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.DELIVER_CASH\n )),\n });\n }}\n >\n Cancel\n </Button>\n <Button\n disabled={disableNext}\n style={[CommonStyles.nextButton, { flex: 1, marginStart: 5 }]}\n labelStyle={CommonStyles.nextButtonLabel}\n mode={'contained'}\n onPress={async () => {\n if (\n !isEmptyOrBlank(amountCollected) &&\n !Number.isNaN(+amountCollected)\n ) {\n const calculatedValue = getPaymentValue(\n props.expectedAmount.value,\n props.expectedAmount.minorUnit\n );\n if (+amountCollected !== calculatedValue) {\n setInputError(`Amount should be equal to ${calculatedValue}`);\n return;\n }\n setDisableNext(true);\n props.onSubmitET({\n amount: {\n value: props.expectedAmount.value,\n currencyCode: props.expectedAmount.currencyCode,\n minorUnit: props.expectedAmount.minorUnit,\n },\n ...(await getBaseETResponse(\n EntityCode.DELIVER_CASH,\n true,\n getEventCodeByET(\n ExecutionTaskID.DELIVER_CASH,\n true,\n props.applicableReasons?.success\n ),\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.DELIVER_CASH\n )),\n });\n } else setInputError('Please enter valid amount.');\n }}\n >\n Drop Cash\n </Button>\n </View>\n </View>\n </KeyboardAvoidingView>\n );\n};\nexport default DropCashET;\n"],"mappings":"AAAA,SAASA,oBAAoB,EAAEC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC3E,OAAOC,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,MAAM,EAAEC,SAAS,QAAQ,oBAAoB;AAEtD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,eAAgB,EAAC,CAAC;UAC7D;QACF;QACAjD,cAAc,CAAC,IAAI,CAAC;QACpBN,KAAK,CAAC2C,UAAU,CAAC;UACfa,MAAM,EAAE;YACN1C,KAAK,EAAEd,KAAK,CAACY,cAAc,CAACE,KAAK;YACjCD,YAAY,EAAEb,KAAK,CAACY,cAAc,CAACC,YAAY;YAC/CE,SAAS,EAAEf,KAAK,CAACY,cAAc,CAACG;UAClC,CAAC;UACD,IAAI,MAAMxB,iBAAiB,CACzBE,UAAU,CAACmD,YAAY,EACvB,IAAI,EACJpD,gBAAgB,CACdE,eAAe,CAACkD,YAAY,EAC5B,IAAI,GAAAU,sBAAA,GACJtD,KAAK,CAAC6C,iBAAiB,cAAAS,sBAAA,uBAAvBA,sBAAA,CAAyBG,OAC3B,CAAC,EACD,EAAE,EACFzD,KAAK,CAAC+C,iBAAiB,EACvBrD,eAAe,CAACkD,YAClB,CAAC;QACH,CAAC,CAAC;MACJ,CAAC,MAAMxC,aAAa,CAAC,4BAA4B,CAAC;IACpD;EAAE,GACH,WAEO,CACJ,CACF,CACc,CAAC;AAE3B,CAAC;AACD,eAAeL,UAAU"}
@@ -4,15 +4,70 @@ import { CommonStyles, DeliverPickupStyles, Fonts } from '../../../styles/execut
4
4
  import { getBaseETResponse } from '../../../utils/ExecTaskUtils';
5
5
  import { EntityCode, ExecutionTaskID } from '../../../models/execTasks/ETConfig';
6
6
  import { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';
7
- import React, { useState } from 'react';
7
+ import React, { useState, useLayoutEffect } from 'react';
8
8
  import { isEmptyOrBlank } from '../../../utils/utils';
9
9
  import { getPaymentValue } from '../payments/PaymentUtils';
10
-
11
- const SLDropCash = etProps => {
12
- const [amountCollected, setAmountCollected] = useState(etProps.confirmAmount ? '' : `${getPaymentValue(etProps.expectedAmount.value, etProps.expectedAmount.minorUnit)}`);
10
+ import { GO_BACK_EVENT_CODE } from '../../../constants/constants';
11
+ import Icon from 'react-native-vector-icons/MaterialIcons';
12
+ import GoBackModal from '../../../components/widgets/GoBackModal';
13
+ import { hasGoBackConnector } from '../../../components/utils';
14
+ import { useFocusEffect } from '@react-navigation/native';
15
+ import { BackHandler } from 'react-native';
16
+ const SLDropCash = props => {
17
+ const [amountCollected, setAmountCollected] = useState(props.confirmAmount ? '' : `${getPaymentValue(props.expectedAmount.value, props.expectedAmount.minorUnit)}`);
13
18
  const [inputError, setInputError] = useState('');
14
19
  const [disableNext, setDisableNext] = useState(false);
15
- return /*#__PURE__*/React.createElement(Provider, null, /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(View, {
20
+ const [showBackModal, setShowBackModal] = useState(false);
21
+
22
+ // Handle back-button click when scanList was being viewed
23
+ useFocusEffect(React.useCallback(() => {
24
+ const onBackPress = () => {
25
+ var _props$taskMeta;
26
+ if ((_props$taskMeta = props.taskMeta) !== null && _props$taskMeta !== void 0 && _props$taskMeta.enableGoBack && hasGoBackConnector(props.applicableReasons)) {
27
+ setShowBackModal(true);
28
+ return true;
29
+ } else {
30
+ props.navigation.goBack();
31
+ return true;
32
+ }
33
+ };
34
+ BackHandler.addEventListener('hardwareBackPress', onBackPress);
35
+ return () => BackHandler.removeEventListener('hardwareBackPress', onBackPress);
36
+ }, []));
37
+ useLayoutEffect(() => {
38
+ props.navigation.setOptions({
39
+ title: props.title,
40
+ headerLeft: () => {
41
+ return /*#__PURE__*/React.createElement(Icon, {
42
+ onPress: () => {
43
+ var _props$taskMeta2;
44
+ if ((_props$taskMeta2 = props.taskMeta) !== null && _props$taskMeta2 !== void 0 && _props$taskMeta2.enableGoBack && hasGoBackConnector(props.applicableReasons)) setShowBackModal(true);else props.navigation.goBack();
45
+ },
46
+ name: "arrow-back",
47
+ color: 'black',
48
+ size: 25,
49
+ style: {
50
+ paddingRight: 15,
51
+ paddingTop: 5
52
+ }
53
+ });
54
+ }
55
+ });
56
+ }, [props.navigation, props.title]);
57
+ const renderModal = () => {
58
+ return /*#__PURE__*/React.createElement(GoBackModal, {
59
+ showModal: showBackModal,
60
+ setShowModal: setShowBackModal,
61
+ onSuccess: async () => {
62
+ props.onSubmitET({
63
+ ...(await getBaseETResponse(EntityCode.DELIVER_CASH, false, GO_BACK_EVENT_CODE, '', props.mergedObjectiveId, ExecutionTaskID.DELIVER_CASH))
64
+ });
65
+ setShowBackModal(false);
66
+ },
67
+ onFailure: () => setShowBackModal(false)
68
+ });
69
+ };
70
+ return /*#__PURE__*/React.createElement(Provider, null, renderModal(), /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(View, {
16
71
  style: DeliverPickupStyles.mainContainer
17
72
  }, /*#__PURE__*/React.createElement(Modal, {
18
73
  visible: true,
@@ -22,7 +77,7 @@ const SLDropCash = etProps => {
22
77
  style: DeliverPickupStyles.modalView
23
78
  }, /*#__PURE__*/React.createElement(Text, {
24
79
  style: DeliverPickupStyles.titleText
25
- }, etProps.title), /*#__PURE__*/React.createElement(View, {
80
+ }, props.title), /*#__PURE__*/React.createElement(View, {
26
81
  style: {
27
82
  marginTop: 15,
28
83
  marginBottom: 15,
@@ -39,7 +94,7 @@ const SLDropCash = etProps => {
39
94
  lineHeight: 28,
40
95
  color: '#111111'
41
96
  }
42
- }, etProps.confirmCustodyExchange ? 'Expected Cash' : 'Return Amount'), /*#__PURE__*/React.createElement(Text, {
97
+ }, props.confirmCustodyExchange ? 'Expected Cash' : 'Return Amount'), /*#__PURE__*/React.createElement(Text, {
43
98
  style: {
44
99
  flex: 1,
45
100
  textAlign: 'right',
@@ -49,7 +104,7 @@ const SLDropCash = etProps => {
49
104
  color: '#111111',
50
105
  fontFamily: Fonts.IBMPlexSans_600SemiBold
51
106
  }
52
- }, etProps.expectedAmount.currencyCode + ' ' + getPaymentValue(etProps.expectedAmount.value, etProps.expectedAmount.minorUnit))), etProps.confirmAmount && /*#__PURE__*/React.createElement(TextInput, {
107
+ }, props.expectedAmount.currencyCode + ' ' + getPaymentValue(props.expectedAmount.value, props.expectedAmount.minorUnit))), props.confirmAmount && /*#__PURE__*/React.createElement(TextInput, {
53
108
  style: {
54
109
  fontSize: 14,
55
110
  lineHeight: 24,
@@ -57,7 +112,7 @@ const SLDropCash = etProps => {
57
112
  },
58
113
  multiline: false,
59
114
  autoComplete: 'off',
60
- label: `Enter Amount(in ${etProps.expectedAmount.currencyCode})`,
115
+ label: `Enter Amount(in ${props.expectedAmount.currencyCode})`,
61
116
  value: amountCollected,
62
117
  mode: 'outlined',
63
118
  error: !isEmptyOrBlank(inputError),
@@ -81,25 +136,24 @@ const SLDropCash = etProps => {
81
136
  mode: 'contained',
82
137
  onPress: async () => {
83
138
  if (!isEmptyOrBlank(amountCollected) && !Number.isNaN(+amountCollected)) {
84
- const calculatedValue = getPaymentValue(etProps.expectedAmount.value, etProps.expectedAmount.minorUnit);
85
-
139
+ var _props$applicableReas;
140
+ const calculatedValue = getPaymentValue(props.expectedAmount.value, props.expectedAmount.minorUnit);
86
141
  if (+amountCollected !== calculatedValue) {
87
142
  setInputError(`Amount should be equal to ${calculatedValue}`);
88
143
  return;
89
144
  }
90
-
91
145
  setDisableNext(true);
92
- etProps.onSubmitET({
146
+ props.onSubmitET({
93
147
  amount: {
94
- value: etProps.expectedAmount.value,
95
- currencyCode: etProps.expectedAmount.currencyCode,
96
- minorUnit: etProps.expectedAmount.minorUnit
148
+ value: props.expectedAmount.value,
149
+ currencyCode: props.expectedAmount.currencyCode,
150
+ minorUnit: props.expectedAmount.minorUnit
97
151
  },
98
- ...(await getBaseETResponse(EntityCode.DELIVER_CASH, true, getEventCodeByET(ExecutionTaskID.DELIVER_CASH, true), ''))
152
+ ...(await getBaseETResponse(EntityCode.DELIVER_CASH, true, getEventCodeByET(ExecutionTaskID.DELIVER_CASH, true, (_props$applicableReas = props.applicableReasons) === null || _props$applicableReas === void 0 ? void 0 : _props$applicableReas.success), '', props.mergedObjectiveId, ExecutionTaskID.DELIVER_CASH))
99
153
  });
100
154
  } else setInputError('Please enter valid amount.');
101
155
  }
102
- }, "Confirm"), !etProps.confirmCustodyExchange && /*#__PURE__*/React.createElement(Button, {
156
+ }, "Confirm"), !props.confirmCustodyExchange && /*#__PURE__*/React.createElement(Button, {
103
157
  labelStyle: CommonStyles.cancelButtonLabel,
104
158
  style: [CommonStyles.cancelButton, {
105
159
  marginTop: 10
@@ -107,11 +161,12 @@ const SLDropCash = etProps => {
107
161
  mode: 'outlined',
108
162
  uppercase: false,
109
163
  onPress: async () => {
110
- etProps.onSubmitET({ ...(await getBaseETResponse(EntityCode.DELIVER_CASH, false, getEventCodeByET(ExecutionTaskID.DELIVER_CASH, false), ''))
164
+ var _props$applicableReas2;
165
+ props.onSubmitET({
166
+ ...(await getBaseETResponse(EntityCode.DELIVER_CASH, false, getEventCodeByET(ExecutionTaskID.DELIVER_CASH, false, (_props$applicableReas2 = props.applicableReasons) === null || _props$applicableReas2 === void 0 ? void 0 : _props$applicableReas2.failure), '', props.mergedObjectiveId, ExecutionTaskID.DELIVER_CASH))
111
167
  });
112
168
  }
113
169
  }, "Cancel"))))));
114
170
  };
115
-
116
171
  export default SLDropCash;
117
172
  //# sourceMappingURL=SLDropCash.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Button","Modal","Portal","Provider","TextInput","Text","View","CommonStyles","DeliverPickupStyles","Fonts","getBaseETResponse","EntityCode","ExecutionTaskID","getEventCodeByET","React","useState","isEmptyOrBlank","getPaymentValue","SLDropCash","etProps","amountCollected","setAmountCollected","confirmAmount","expectedAmount","value","minorUnit","inputError","setInputError","disableNext","setDisableNext","mainContainer","modalContent","modalView","titleText","title","marginTop","marginBottom","flexDirection","fontFamily","IBMPlexSans_400Regular","fontStyle","fontWeight","fontSize","flex","textAlign","lineHeight","color","confirmCustodyExchange","IBMPlexSans_600SemiBold","currencyCode","text","nextButton","nextButtonLabel","Number","isNaN","calculatedValue","onSubmitET","amount","DELIVER_CASH","cancelButtonLabel","cancelButton"],"sources":["SLDropCash.tsx"],"sourcesContent":["import { Button, Modal, Portal, Provider, TextInput } from 'react-native-paper';\nimport { Text, View } from 'react-native';\nimport {\n CommonStyles,\n DeliverPickupStyles,\n Fonts,\n} from '../../../styles/executionTasks/CommonStyles';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\nimport { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';\nimport React, { useState } from 'react';\nimport { isEmptyOrBlank } from '../../../utils/utils';\nimport type { DropCashInput } from './DropCashSchema';\nimport { getPaymentValue } from '../payments/PaymentUtils';\n\nconst SLDropCash = (etProps: DropCashInput) => {\n const [amountCollected, setAmountCollected] = useState(\n etProps.confirmAmount\n ? ''\n : `${getPaymentValue(\n etProps.expectedAmount.value,\n etProps.expectedAmount.minorUnit\n )}`\n );\n const [inputError, setInputError] = useState('');\n\n const [disableNext, setDisableNext] = useState(false);\n\n return (\n <Provider>\n <Portal>\n <View style={DeliverPickupStyles.mainContainer}>\n <Modal\n visible={true}\n dismissable={false}\n contentContainerStyle={DeliverPickupStyles.modalContent}\n >\n <View style={DeliverPickupStyles.modalView}>\n <Text style={DeliverPickupStyles.titleText}>{etProps.title}</Text>\n <View\n style={{\n marginTop: 15,\n marginBottom: 15,\n flexDirection: 'row',\n }}\n >\n <Text\n style={{\n fontFamily: Fonts.IBMPlexSans_400Regular,\n fontStyle: 'normal',\n fontWeight: '400',\n fontSize: 14,\n flex: 1,\n textAlign: 'left',\n lineHeight: 28,\n color: '#111111',\n }}\n >\n {etProps.confirmCustodyExchange\n ? 'Expected Cash'\n : 'Return Amount'}\n </Text>\n <Text\n style={{\n flex: 1,\n textAlign: 'right',\n fontSize: 14,\n lineHeight: 28,\n fontStyle: 'normal',\n color: '#111111',\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n }}\n >\n {etProps.expectedAmount.currencyCode +\n ' ' +\n getPaymentValue(\n etProps.expectedAmount.value,\n etProps.expectedAmount.minorUnit\n )}\n </Text>\n </View>\n {etProps.confirmAmount && (\n <TextInput\n style={{\n fontSize: 14,\n lineHeight: 24,\n fontFamily: Fonts.IBMPlexSans_400Regular,\n }}\n multiline={false}\n autoComplete={'off'}\n label={`Enter Amount(in ${etProps.expectedAmount.currencyCode})`}\n value={amountCollected}\n mode={'outlined'}\n error={!isEmptyOrBlank(inputError)}\n selectionColor={'#6200EE'}\n keyboardType={'numeric'}\n onChangeText={(text) => {\n setInputError('');\n setAmountCollected(text);\n }}\n />\n )}\n {!isEmptyOrBlank(inputError) && (\n <Text style={{ color: '#B00020' }}>{inputError}</Text>\n )}\n <Button\n disabled={disableNext}\n style={[CommonStyles.nextButton, { marginTop: 20 }]}\n labelStyle={CommonStyles.nextButtonLabel}\n uppercase={false}\n mode={'contained'}\n onPress={async () => {\n if (\n !isEmptyOrBlank(amountCollected) &&\n !Number.isNaN(+amountCollected)\n ) {\n const calculatedValue = getPaymentValue(\n etProps.expectedAmount.value,\n etProps.expectedAmount.minorUnit\n );\n if (+amountCollected !== calculatedValue) {\n setInputError(\n `Amount should be equal to ${calculatedValue}`\n );\n return;\n }\n setDisableNext(true);\n etProps.onSubmitET({\n amount: {\n value: etProps.expectedAmount.value,\n currencyCode: etProps.expectedAmount.currencyCode,\n minorUnit: etProps.expectedAmount.minorUnit,\n },\n ...(await getBaseETResponse(\n EntityCode.DELIVER_CASH,\n true,\n getEventCodeByET(ExecutionTaskID.DELIVER_CASH, true),\n ''\n )),\n });\n } else setInputError('Please enter valid amount.');\n }}\n >\n Confirm\n </Button>\n {!etProps.confirmCustodyExchange && (\n <Button\n labelStyle={CommonStyles.cancelButtonLabel}\n style={[CommonStyles.cancelButton, { marginTop: 10 }]}\n mode={'outlined'}\n uppercase={false}\n onPress={async () => {\n etProps.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.DELIVER_CASH,\n false,\n getEventCodeByET(ExecutionTaskID.DELIVER_CASH, false),\n ''\n )),\n });\n }}\n >\n Cancel\n </Button>\n )}\n </View>\n </Modal>\n </View>\n </Portal>\n </Provider>\n );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,EAIzB,EAJyB,CAA3B;QANiB,CAAnB;MAaD,CA5BD,MA4BO/B,aAAa,CAAC,4BAAD,CAAb;IACR;EApCH,aApEF,EA4GG,CAACR,OAAO,CAAC4B,sBAAT,iBACC,oBAAC,MAAD;IACE,UAAU,EAAExC,YAAY,CAACoD,iBAD3B;IAEE,KAAK,EAAE,CAACpD,YAAY,CAACqD,YAAd,EAA4B;MAAEzB,SAAS,EAAE;IAAb,CAA5B,CAFT;IAGE,IAAI,EAAE,UAHR;IAIE,SAAS,EAAE,KAJb;IAKE,OAAO,EAAE,YAAY;MACnBhB,OAAO,CAACqC,UAAR,CAAmB,EACjB,IAAI,MAAM9C,iBAAiB,CACzBC,UAAU,CAAC+C,YADc,EAEzB,KAFyB,EAGzB7C,gBAAgB,CAACD,eAAe,CAAC8C,YAAjB,EAA+B,KAA/B,CAHS,EAIzB,EAJyB,CAA3B;MADiB,CAAnB;IAQD;EAdH,YA7GJ,CALF,CADF,CADF,CADF,CADF;AA+ID,CA5JD;;AA6JA,eAAexC,UAAf"}
1
+ {"version":3,"names":["Button","Modal","Portal","Provider","TextInput","Text","View","CommonStyles","DeliverPickupStyles","Fonts","getBaseETResponse","EntityCode","ExecutionTaskID","getEventCodeByET","React","useState","useLayoutEffect","isEmptyOrBlank","getPaymentValue","GO_BACK_EVENT_CODE","Icon","GoBackModal","hasGoBackConnector","useFocusEffect","BackHandler","SLDropCash","props","amountCollected","setAmountCollected","confirmAmount","expectedAmount","value","minorUnit","inputError","setInputError","disableNext","setDisableNext","showBackModal","setShowBackModal","useCallback","onBackPress","_props$taskMeta","taskMeta","enableGoBack","applicableReasons","navigation","goBack","addEventListener","removeEventListener","setOptions","title","headerLeft","createElement","onPress","_props$taskMeta2","name","color","size","style","paddingRight","paddingTop","renderModal","showModal","setShowModal","onSuccess","onSubmitET","DELIVER_CASH","mergedObjectiveId","onFailure","mainContainer","visible","dismissable","contentContainerStyle","modalContent","modalView","titleText","marginTop","marginBottom","flexDirection","fontFamily","IBMPlexSans_400Regular","fontStyle","fontWeight","fontSize","flex","textAlign","lineHeight","confirmCustodyExchange","IBMPlexSans_600SemiBold","currencyCode","multiline","autoComplete","label","mode","error","selectionColor","keyboardType","onChangeText","text","disabled","nextButton","labelStyle","nextButtonLabel","uppercase","Number","isNaN","_props$applicableReas","calculatedValue","amount","success","cancelButtonLabel","cancelButton","_props$applicableReas2","failure"],"sources":["SLDropCash.tsx"],"sourcesContent":["import { Button, Modal, Portal, Provider, TextInput } from 'react-native-paper';\nimport { Text, View } from 'react-native';\nimport {\n CommonStyles,\n DeliverPickupStyles,\n Fonts,\n} from '../../../styles/executionTasks/CommonStyles';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\nimport { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';\nimport React, { useState, useLayoutEffect } from 'react';\nimport { isEmptyOrBlank } from '../../../utils/utils';\nimport type { DropCashInput } from './DropCashSchema';\nimport { getPaymentValue } from '../payments/PaymentUtils';\nimport { GO_BACK_EVENT_CODE } from '../../../constants/constants';\nimport Icon from 'react-native-vector-icons/MaterialIcons';\nimport GoBackModal from '../../../components/widgets/GoBackModal';\nimport { hasGoBackConnector } from '../../../components/utils';\nimport { useFocusEffect } from '@react-navigation/native';\nimport { BackHandler } from 'react-native';\n\nconst SLDropCash = (props: DropCashInput) => {\n const [amountCollected, setAmountCollected] = useState(\n props.confirmAmount\n ? ''\n : `${getPaymentValue(\n props.expectedAmount.value,\n props.expectedAmount.minorUnit\n )}`\n );\n const [inputError, setInputError] = useState('');\n\n const [disableNext, setDisableNext] = useState(false);\n const [showBackModal, setShowBackModal] = useState(false);\n\n // Handle back-button click when scanList was being viewed\n useFocusEffect(\n React.useCallback(() => {\n const onBackPress = () => {\n if (\n props.taskMeta?.enableGoBack &&\n hasGoBackConnector(props.applicableReasons)\n ) {\n setShowBackModal(true);\n return true;\n } else {\n props.navigation.goBack();\n return true;\n }\n };\n BackHandler.addEventListener('hardwareBackPress', onBackPress);\n return () =>\n BackHandler.removeEventListener('hardwareBackPress', onBackPress);\n }, [])\n );\n\n useLayoutEffect(() => {\n props.navigation.setOptions({\n title: props.title,\n headerLeft: () => {\n return (\n <Icon\n onPress={() => {\n if (\n props.taskMeta?.enableGoBack &&\n hasGoBackConnector(props.applicableReasons)\n )\n setShowBackModal(true);\n else props.navigation.goBack();\n }}\n name=\"arrow-back\"\n color={'black'}\n size={25}\n style={{\n paddingRight: 15,\n paddingTop: 5,\n }}\n />\n );\n },\n });\n }, [props.navigation, props.title]);\n\n const renderModal = () => {\n return (\n <GoBackModal\n showModal={showBackModal}\n setShowModal={setShowBackModal}\n onSuccess={async () => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.DELIVER_CASH,\n false,\n GO_BACK_EVENT_CODE,\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.DELIVER_CASH\n )),\n });\n setShowBackModal(false);\n }}\n onFailure={() => setShowBackModal(false)}\n />\n );\n };\n\n return (\n <Provider>\n {renderModal()}\n <Portal>\n <View style={DeliverPickupStyles.mainContainer}>\n <Modal\n visible={true}\n dismissable={false}\n contentContainerStyle={DeliverPickupStyles.modalContent}\n >\n <View style={DeliverPickupStyles.modalView}>\n <Text style={DeliverPickupStyles.titleText}>{props.title}</Text>\n <View\n style={{\n marginTop: 15,\n marginBottom: 15,\n flexDirection: 'row',\n }}\n >\n <Text\n style={{\n fontFamily: Fonts.IBMPlexSans_400Regular,\n fontStyle: 'normal',\n fontWeight: '400',\n fontSize: 14,\n flex: 1,\n textAlign: 'left',\n lineHeight: 28,\n color: '#111111',\n }}\n >\n {props.confirmCustodyExchange\n ? 'Expected Cash'\n : 'Return Amount'}\n </Text>\n <Text\n style={{\n flex: 1,\n textAlign: 'right',\n fontSize: 14,\n lineHeight: 28,\n fontStyle: 'normal',\n color: '#111111',\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n }}\n >\n {props.expectedAmount.currencyCode +\n ' ' +\n getPaymentValue(\n props.expectedAmount.value,\n props.expectedAmount.minorUnit\n )}\n </Text>\n </View>\n {props.confirmAmount && (\n <TextInput\n style={{\n fontSize: 14,\n lineHeight: 24,\n fontFamily: Fonts.IBMPlexSans_400Regular,\n }}\n multiline={false}\n autoComplete={'off'}\n label={`Enter Amount(in ${props.expectedAmount.currencyCode})`}\n value={amountCollected}\n mode={'outlined'}\n error={!isEmptyOrBlank(inputError)}\n selectionColor={'#6200EE'}\n keyboardType={'numeric'}\n onChangeText={(text) => {\n setInputError('');\n setAmountCollected(text);\n }}\n />\n )}\n {!isEmptyOrBlank(inputError) && (\n <Text style={{ color: '#B00020' }}>{inputError}</Text>\n )}\n <Button\n disabled={disableNext}\n style={[CommonStyles.nextButton, { marginTop: 20 }]}\n labelStyle={CommonStyles.nextButtonLabel}\n uppercase={false}\n mode={'contained'}\n onPress={async () => {\n if (\n !isEmptyOrBlank(amountCollected) &&\n !Number.isNaN(+amountCollected)\n ) {\n const calculatedValue = getPaymentValue(\n props.expectedAmount.value,\n props.expectedAmount.minorUnit\n );\n if (+amountCollected !== calculatedValue) {\n setInputError(\n `Amount should be equal to ${calculatedValue}`\n );\n return;\n }\n setDisableNext(true);\n props.onSubmitET({\n amount: {\n value: props.expectedAmount.value,\n currencyCode: props.expectedAmount.currencyCode,\n minorUnit: props.expectedAmount.minorUnit,\n },\n ...(await getBaseETResponse(\n EntityCode.DELIVER_CASH,\n true,\n getEventCodeByET(\n ExecutionTaskID.DELIVER_CASH,\n true,\n props.applicableReasons?.success\n ),\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.DELIVER_CASH\n )),\n });\n } else setInputError('Please enter valid amount.');\n }}\n >\n Confirm\n </Button>\n {!props.confirmCustodyExchange && (\n <Button\n labelStyle={CommonStyles.cancelButtonLabel}\n style={[CommonStyles.cancelButton, { marginTop: 10 }]}\n mode={'outlined'}\n uppercase={false}\n onPress={async () => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.DELIVER_CASH,\n false,\n getEventCodeByET(\n ExecutionTaskID.DELIVER_CASH,\n false,\n props.applicableReasons?.failure\n ),\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.DELIVER_CASH\n )),\n });\n }}\n >\n Cancel\n </Button>\n )}\n </View>\n </Modal>\n </View>\n </Portal>\n </Provider>\n );\n};\nexport default SLDropCash;\n"],"mappings":"AAAA,SAASA,MAAM,EAAEC,KAAK,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;AAC/E,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SACEC,YAAY,EACZC,mBAAmB,EACnBC,KAAK,QACA,6CAA6C;AACpD,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,SACEC,UAAU,EACVC,eAAe,QACV,oCAAoC;AAC3C,SAASC,gBAAgB,QAAQ,mDAAmD;AACpF,OAAOC,KAAK,IAAIC,QAAQ,EAAEC,eAAe,QAAQ,OAAO;AACxD,SAASC,cAAc,QAAQ,sBAAsB;AAErD,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,kBAAkB,QAAQ,8BAA8B;AACjE,OAAOC,IAAI,MAAM,yCAAyC;AAC1D,OAAOC,WAAW,MAAM,yCAAyC;AACjE,SAASC,kBAAkB,QAAQ,2BAA2B;AAC9D,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,WAAW,QAAQ,cAAc;AAE1C,MAAMC,UAAU,GAAIC,KAAoB,IAAK;EAC3C,MAAM,CAACC,eAAe,EAAEC,kBAAkB,CAAC,GAAGb,QAAQ,CACpDW,KAAK,CAACG,aAAa,GACf,EAAE,GACD,GAAEX,eAAe,CAChBQ,KAAK,CAACI,cAAc,CAACC,KAAK,EAC1BL,KAAK,CAACI,cAAc,CAACE,SACvB,CAAE,EACR,CAAC;EACD,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAGnB,QAAQ,CAAC,EAAE,CAAC;EAEhD,MAAM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