@os1-platform/dispatch-mobile 1.3.11 → 2.0.1
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.
- package/README.md +198 -30
- package/android/.gradle/7.0.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.2/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/7.2/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.2/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.2/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/7.2/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/.idea/compiler.xml +6 -0
- package/android/.idea/gradle.xml +6 -1
- package/android/.idea/jarRepositories.xml +35 -0
- package/android/.idea/kotlinc.xml +6 -0
- package/android/.idea/misc.xml +6 -1
- package/android/local.properties +1 -1
- package/android/src/main/java/com/dispatchsdk/DispatchSdkPackage.kt +3 -1
- package/android/src/main/java/com/dispatchsdk/sharedPref/SharedPreferenceModule.kt +166 -0
- package/lib/commonjs/@types/assets/index.d.js +2 -0
- package/lib/commonjs/@types/assets/index.d.js.map +1 -0
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +4 -4
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js +0 -28
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +35 -35
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/utils.js +13 -0
- package/lib/commonjs/components/executiontasks/captureInput/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +3 -7
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +181 -112
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +16 -16
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +37 -34
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +2 -2
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +52 -52
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +71 -66
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js +2 -2
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +3 -3
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +6 -3
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +34 -34
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +54 -54
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +33 -33
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +33 -33
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js +3 -7
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +106 -47
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js +326 -428
- package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js +13 -0
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/interfaces.js +15 -1
- package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/modalConstant.js +104 -0
- package/lib/commonjs/components/executiontasks/scan/modalConstant.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +72 -37
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js +9 -7
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +1096 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js +548 -159
- package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +52 -53
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +4 -0
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
- package/lib/commonjs/components/utils/index.js +14 -0
- package/lib/commonjs/components/utils/index.js.map +1 -0
- package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/Card.js +88 -0
- package/lib/commonjs/components/widgets/Card.js.map +1 -0
- package/lib/commonjs/components/widgets/GoBackModal.js +48 -0
- package/lib/commonjs/components/widgets/GoBackModal.js.map +1 -0
- package/lib/commonjs/components/widgets/IconButton.js.map +1 -1
- package/lib/commonjs/components/widgets/ModalWidget.js +99 -0
- package/lib/commonjs/components/widgets/ModalWidget.js.map +1 -0
- package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/SearchBar.js +74 -0
- package/lib/commonjs/components/widgets/SearchBar.js.map +1 -0
- package/lib/commonjs/components/widgets/SnackBarCustom.js +12 -4
- package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -1
- package/lib/commonjs/components/widgets/TabsComponent.js +64 -0
- package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -0
- package/lib/commonjs/constants/apiConstants.js +3 -1
- package/lib/commonjs/constants/apiConstants.js.map +1 -1
- package/lib/commonjs/constants/constants.js +2 -2
- package/lib/commonjs/constants/constants.js.map +1 -1
- package/lib/commonjs/events/EventDispatcher.js +1 -5
- package/lib/commonjs/events/EventDispatcher.js.map +1 -1
- package/lib/commonjs/events/constants.js +3 -1
- package/lib/commonjs/events/constants.js.map +1 -1
- package/lib/commonjs/events/interface.js.map +1 -1
- package/lib/commonjs/icons/file.js +24 -0
- package/lib/commonjs/icons/file.js.map +1 -0
- package/lib/commonjs/icons/interface.js +2 -0
- package/lib/commonjs/icons/interface.js.map +1 -0
- package/lib/commonjs/index.js +32 -13
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +315 -609
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js +21 -25
- package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js.map +1 -1
- package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js +15 -1
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js +2 -2
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/commonjs/manager/sdk/callbacksHandler.js +26 -0
- package/lib/commonjs/manager/sdk/callbacksHandler.js.map +1 -0
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js +15 -1
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js +36 -3
- package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/constants.js +17 -0
- package/lib/commonjs/manager/syncmanager/constants.js.map +1 -0
- package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +11 -17
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +5 -6
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +16 -6
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +377 -26
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +183 -65
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +150 -37
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/commonjs/models/DispatchModels.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETBaseModels.js +4 -0
- package/lib/commonjs/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/commonjs/models/sdk.js.map +1 -1
- package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
- package/lib/commonjs/network/GraphQLClient.js.map +1 -1
- package/lib/commonjs/network/NetworkClient.js.map +1 -1
- package/lib/commonjs/network/NetworkUtils.js.map +1 -1
- package/lib/commonjs/network/client.js.map +1 -1
- package/lib/commonjs/resources/Login.js.map +1 -1
- package/lib/commonjs/resources/network.js.map +1 -1
- package/lib/commonjs/styles/SdkColors.js +4 -2
- package/lib/commonjs/styles/SdkColors.js.map +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +19 -10
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/commonjs/ui/screens/CancellationScreen.js +38 -7
- package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CaptureInputScreen.js +11 -3
- package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +11 -4
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +26 -4
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DisplayScreen.js +11 -2
- package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js +13 -6
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js +39 -15
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ETScreensIndex.js +0 -7
- package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/commonjs/ui/screens/FormsScreen.js +95 -28
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/GeofenceScreen.js +10 -2
- package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HttpRequestScreen.js +10 -2
- package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +26 -18
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentScreen.js +22 -11
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +34 -8
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ScanScreen.js +72 -219
- package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +51 -16
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js +13 -7
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js +20 -5
- package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/commonjs/utils/ApiUtils.js +16 -2
- package/lib/commonjs/utils/ApiUtils.js.map +1 -1
- package/lib/commonjs/utils/ExecTaskUtils.js +33 -25
- package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
- package/lib/commonjs/utils/Logger.js.map +1 -1
- package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
- package/lib/commonjs/utils/SdkUtils.js.map +1 -1
- package/lib/commonjs/utils/SyncManagerUtils.js +37 -4
- package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
- package/lib/commonjs/utils/fcm/FCM.js +64 -35
- package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
- package/lib/commonjs/utils/fcm/FcmUtils.js +82 -46
- package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/commonjs/utils/helper.js.map +1 -1
- package/lib/commonjs/utils/hooks/useModal.js +53 -0
- package/lib/commonjs/utils/hooks/useModal.js.map +1 -0
- package/lib/commonjs/utils/loginHelper.js.map +1 -1
- package/lib/commonjs/utils/storage.js +37 -2
- package/lib/commonjs/utils/storage.js.map +1 -1
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/module/@types/assets/index.d.js +2 -0
- package/lib/module/@types/assets/index.d.js.map +1 -0
- package/lib/module/components/dispatch/DispatchExecNavigator.js +4 -4
- package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js +1 -5
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/module/components/executiontasks/captureInput/CaptureText.js +38 -37
- package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/module/components/executiontasks/captureInput/utils.js +7 -0
- package/lib/module/components/executiontasks/captureInput/utils.js.map +1 -0
- package/lib/module/components/executiontasks/deliver/DeliverET.js +4 -8
- package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js +183 -114
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/display/DisplayModalET.js +16 -16
- package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js +39 -36
- package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/DropCashET.js +2 -2
- package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js +53 -52
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormGenerator.js +73 -68
- package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +1 -1
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js +3 -3
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js +3 -3
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +6 -3
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +36 -36
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +55 -54
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +35 -34
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +35 -35
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/PickupET.js +4 -8
- package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/SLPickupET.js +108 -49
- package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanET.js +332 -433
- package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanSchema.js +16 -1
- package/lib/module/components/executiontasks/scan/ScanSchema.js.map +1 -1
- package/lib/module/components/executiontasks/scan/interfaces.js +12 -0
- package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -1
- package/lib/module/components/executiontasks/scan/modalConstant.js +94 -0
- package/lib/module/components/executiontasks/scan/modalConstant.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +72 -37
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +9 -7
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +1089 -0
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -0
- package/lib/module/components/executiontasks/scan/utils.js +528 -160
- package/lib/module/components/executiontasks/scan/utils.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +54 -55
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js +4 -0
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/utils.js.map +1 -1
- package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js +1 -1
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js +2 -2
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpSchema.js.map +1 -1
- package/lib/module/components/utils/index.js +8 -0
- package/lib/module/components/utils/index.js.map +1 -0
- package/lib/module/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/module/components/widgets/Card.js +80 -0
- package/lib/module/components/widgets/Card.js.map +1 -0
- package/lib/module/components/widgets/GoBackModal.js +40 -0
- package/lib/module/components/widgets/GoBackModal.js.map +1 -0
- package/lib/module/components/widgets/IconButton.js.map +1 -1
- package/lib/module/components/widgets/ModalWidget.js +92 -0
- package/lib/module/components/widgets/ModalWidget.js.map +1 -0
- package/lib/module/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/module/components/widgets/SearchBar.js +66 -0
- package/lib/module/components/widgets/SearchBar.js.map +1 -0
- package/lib/module/components/widgets/SnackBarCustom.js +12 -4
- package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/module/components/widgets/SplitTextInput.js.map +1 -1
- package/lib/module/components/widgets/TabsComponent.js +55 -0
- package/lib/module/components/widgets/TabsComponent.js.map +1 -0
- package/lib/module/constants/apiConstants.js +3 -1
- package/lib/module/constants/apiConstants.js.map +1 -1
- package/lib/module/constants/constants.js +2 -2
- package/lib/module/constants/constants.js.map +1 -1
- package/lib/module/events/EventDispatcher.js +0 -3
- package/lib/module/events/EventDispatcher.js.map +1 -1
- package/lib/module/events/constants.js +3 -1
- package/lib/module/events/constants.js.map +1 -1
- package/lib/module/events/interface.js.map +1 -1
- package/lib/module/icons/file.js +16 -0
- package/lib/module/icons/file.js.map +1 -0
- package/lib/module/icons/interface.js +2 -0
- package/lib/module/icons/interface.js.map +1 -0
- package/lib/module/index.js +6 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/manager/dispatch/DispatchStateContainer.js +319 -610
- package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/module/manager/jobRemoval/JobRemovalManager.js +21 -19
- package/lib/module/manager/jobRemoval/JobRemovalManager.js.map +1 -1
- package/lib/module/manager/location/LocationManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSDKManager.js +15 -1
- package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSdkCache.js +2 -2
- package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/module/manager/sdk/callbacksHandler.js +19 -0
- package/lib/module/manager/sdk/callbacksHandler.js.map +1 -0
- package/lib/module/manager/syncmanager/AppSyncManager.js +15 -1
- package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js +32 -2
- package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/module/manager/syncmanager/constants.js +6 -0
- package/lib/module/manager/syncmanager/constants.js.map +1 -0
- package/lib/module/manager/syncmanager/database.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +11 -17
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentManager.js +5 -6
- package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +16 -6
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/ETEventsManager.js +377 -25
- package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js +183 -65
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js +147 -34
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/module/models/DispatchModels.js.map +1 -1
- package/lib/module/models/execTasks/ETBaseModels.js +1 -1
- package/lib/module/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/module/models/sdk.js.map +1 -1
- package/lib/module/native/signature/SignatureCapture.js.map +1 -1
- package/lib/module/network/GraphQLClient.js.map +1 -1
- package/lib/module/network/NetworkClient.js.map +1 -1
- package/lib/module/network/NetworkUtils.js.map +1 -1
- package/lib/module/network/client.js.map +1 -1
- package/lib/module/resources/Login.js.map +1 -1
- package/lib/module/resources/network.js.map +1 -1
- package/lib/module/styles/SdkColors.js +4 -2
- package/lib/module/styles/SdkColors.js.map +1 -1
- package/lib/module/styles/executionTasks/CommonStyles.js +19 -10
- package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/module/ui/screens/CancellationScreen.js +39 -8
- package/lib/module/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/module/ui/screens/CaptureInputScreen.js +12 -4
- package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/module/ui/screens/CompleteObjectiveScreen.js +12 -5
- package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/module/ui/screens/DeliverScreen.js +27 -5
- package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/module/ui/screens/DisplayScreen.js +12 -3
- package/lib/module/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/module/ui/screens/DoodleScreen.js +14 -7
- package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/module/ui/screens/DropCashScreen.js +42 -16
- package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/module/ui/screens/ETScreensIndex.js +1 -2
- package/lib/module/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/module/ui/screens/FormsScreen.js +96 -29
- package/lib/module/ui/screens/FormsScreen.js.map +1 -1
- package/lib/module/ui/screens/GeofenceScreen.js +11 -3
- package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/module/ui/screens/HttpRequestScreen.js +11 -3
- package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/module/ui/screens/ImageCaptureScreen.js +27 -19
- package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentScreen.js +23 -12
- package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/module/ui/screens/PickupScreen.js +36 -10
- package/lib/module/ui/screens/PickupScreen.js.map +1 -1
- package/lib/module/ui/screens/ScanScreen.js +74 -222
- package/lib/module/ui/screens/ScanScreen.js.map +1 -1
- package/lib/module/ui/screens/StartWorkFlowScreen.js +51 -16
- package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/module/ui/screens/ValidateOTPScreen.js +14 -8
- package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -1
- package/lib/module/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/module/ui/uiConfig/RouteParams.js +19 -5
- package/lib/module/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/module/utils/ApiUtils.js +17 -2
- package/lib/module/utils/ApiUtils.js.map +1 -1
- package/lib/module/utils/ExecTaskUtils.js +33 -25
- package/lib/module/utils/ExecTaskUtils.js.map +1 -1
- package/lib/module/utils/Logger.js.map +1 -1
- package/lib/module/utils/NetworkUtil.js.map +1 -1
- package/lib/module/utils/SdkUtils.js.map +1 -1
- package/lib/module/utils/SyncManagerUtils.js +37 -4
- package/lib/module/utils/SyncManagerUtils.js.map +1 -1
- package/lib/module/utils/fcm/FCM.js +64 -35
- package/lib/module/utils/fcm/FCM.js.map +1 -1
- package/lib/module/utils/fcm/FcmUtils.js +82 -46
- package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/module/utils/helper.js.map +1 -1
- package/lib/module/utils/hooks/useModal.js +43 -0
- package/lib/module/utils/hooks/useModal.js.map +1 -0
- package/lib/module/utils/loginHelper.js.map +1 -1
- package/lib/module/utils/storage.js +37 -2
- package/lib/module/utils/storage.js.map +1 -1
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/typescript/components/dispatch/DispatchExecNavigator.d.ts +2 -2
- package/lib/typescript/components/executiontasks/ExecutionTasksIndex.d.ts +3 -8
- package/lib/typescript/components/executiontasks/cancellation/CancelET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/captureInput/CaptureText.d.ts +2 -2
- package/lib/typescript/components/executiontasks/captureInput/utils.d.ts +1 -0
- package/lib/typescript/components/executiontasks/deliver/DeliverET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +1 -0
- package/lib/typescript/components/executiontasks/deliver/SLDeliverET.d.ts +3 -3
- package/lib/typescript/components/executiontasks/display/DisplayModalET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/doodle/SignatureET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/dropCash/DropCashET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/dropCash/SLDropCash.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/FormGenerator.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/widgets/DateTimeWidget.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/widgets/DropdownWidget.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/widgets/TimeRangeSelector.d.ts +2 -2
- package/lib/typescript/components/executiontasks/httpRequest/HttpEtUtils.d.ts +1 -1
- package/lib/typescript/components/executiontasks/httpRequest/HttpRequestET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +1 -0
- package/lib/typescript/components/executiontasks/imageCapture/ImageCapture.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/init/InitPaymentET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/pickup/PickupET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/pickup/SLPickupET.d.ts +3 -3
- package/lib/typescript/components/executiontasks/scan/ScanET.d.ts +3 -3
- package/lib/typescript/components/executiontasks/scan/ScanSchema.d.ts +25 -9
- package/lib/typescript/components/executiontasks/scan/interfaces.d.ts +54 -1
- package/lib/typescript/components/executiontasks/scan/modalConstant.d.ts +37 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/CScanner.d.ts +1 -1
- package/lib/typescript/components/executiontasks/scan/sub_components/DropDownUtils.d.ts +1 -1
- package/lib/typescript/components/executiontasks/scan/sub_components/ERDropDown.d.ts +1 -1
- package/lib/typescript/components/executiontasks/scan/sub_components/SummaryPage.d.ts +21 -0
- package/lib/typescript/components/executiontasks/scan/utils.d.ts +29 -13
- package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/validateOTP/sub-components/OTPInput.d.ts +2 -2
- package/lib/typescript/components/executiontasks/verifyLocation/VerifyLocationET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpET.d.ts +2 -2
- package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpSchema.d.ts +3 -3
- package/lib/typescript/components/utils/index.d.ts +2 -0
- package/lib/typescript/components/widgets/CancelOrderDialog.d.ts +2 -2
- package/lib/typescript/components/widgets/Card.d.ts +17 -0
- package/lib/typescript/components/widgets/GoBackModal.d.ts +9 -0
- package/lib/typescript/components/widgets/IconButton.d.ts +2 -2
- package/lib/typescript/components/widgets/ModalWidget.d.ts +30 -0
- package/lib/typescript/components/widgets/ProgressDialog.d.ts +2 -2
- package/lib/typescript/components/widgets/SearchBar.d.ts +10 -0
- package/lib/typescript/components/widgets/SnackBarCustom.d.ts +3 -2
- package/lib/typescript/components/widgets/SplitTextInput.d.ts +2 -2
- package/lib/typescript/components/widgets/TabsComponent.d.ts +15 -0
- package/lib/typescript/constants/apiConstants.d.ts +1 -0
- package/lib/typescript/constants/constants.d.ts +2 -2
- package/lib/typescript/events/EventDispatcher.d.ts +0 -2
- package/lib/typescript/events/constants.d.ts +2 -0
- package/lib/typescript/events/interface.d.ts +1 -1
- package/lib/typescript/icons/file.d.ts +4 -0
- package/lib/typescript/icons/interface.d.ts +5 -0
- package/lib/typescript/index.d.ts +8 -6
- package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +27 -19
- package/lib/typescript/manager/jobRemoval/JobRemovalManager.d.ts +0 -6
- package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +0 -1
- package/lib/typescript/manager/sdk/callbacksHandler.d.ts +13 -0
- package/lib/typescript/manager/syncmanager/AppSyncManager.d.ts +2 -1
- package/lib/typescript/manager/syncmanager/DBConfig.d.ts +63 -7
- package/lib/typescript/manager/syncmanager/constants.d.ts +5 -0
- package/lib/typescript/manager/syncmanager/document/DocumentManager.d.ts +1 -1
- package/lib/typescript/manager/syncmanager/document/DocumentSyncManager.d.ts +1 -1
- package/lib/typescript/manager/syncmanager/events/ETEventsManager.d.ts +11 -2
- package/lib/typescript/manager/syncmanager/events/EventsSyncManager.d.ts +3 -5
- package/lib/typescript/manager/syncmanager/events/SyncHttpClient.d.ts +4 -3
- package/lib/typescript/models/DispatchModels.d.ts +40 -41
- package/lib/typescript/models/execTasks/ETBaseModels.d.ts +21 -16
- package/lib/typescript/models/sdk.d.ts +7 -0
- package/lib/typescript/native/signature/SignatureCapture.d.ts +1 -1
- package/lib/typescript/styles/SdkColors.d.ts +1 -0
- package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +16 -7
- package/lib/typescript/ui/screens/CancellationScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/CaptureInputScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/CompleteObjectiveScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DeliverScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DisplayScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DoodleScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/DropCashScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/ETScreensIndex.d.ts +1 -2
- package/lib/typescript/ui/screens/FormsScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/GeofenceScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/HttpRequestScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/ImageCaptureScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/PaymentScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/PickupScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/ScanScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/StartWorkFlowScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/ValidateOTPScreen.d.ts +2 -2
- package/lib/typescript/ui/screens/WithBaseDispatchScreen.d.ts +2 -2
- package/lib/typescript/ui/uiConfig/RouteParams.d.ts +10 -4
- package/lib/typescript/utils/ExecTaskUtils.d.ts +5 -4
- package/lib/typescript/utils/SyncManagerUtils.d.ts +4 -5
- package/lib/typescript/utils/hooks/useModal.d.ts +6 -0
- package/lib/typescript/utils/storage.d.ts +15 -0
- package/package.json +5 -4
- package/tsconfig.json +0 -1
- package/android/.gradle/6.8/fileHashes/fileHashes.lock +0 -0
- package/android/.idea/workspace.xml +0 -131
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js +0 -26
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/ScanList.js +0 -134
- package/lib/commonjs/components/executiontasks/scan/sub_components/ScanList.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/CScanner.js +0 -105
- package/lib/commonjs/components/executiontasks/scanner/CScanner.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js +0 -27
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js +0 -164
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js +0 -15
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js +0 -40
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -93
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js +0 -278
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -83
- package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js.map +0 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js +0 -248
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js.map +0 -1
- package/lib/commonjs/ui/screens/RTScanScreen.js +0 -99
- package/lib/commonjs/ui/screens/RTScanScreen.js.map +0 -1
- package/lib/module/components/executiontasks/doodle/DoodleUtils.js +0 -19
- package/lib/module/components/executiontasks/doodle/DoodleUtils.js.map +0 -1
- package/lib/module/components/executiontasks/scan/sub_components/ScanList.js +0 -124
- package/lib/module/components/executiontasks/scan/sub_components/ScanList.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/CScanner.js +0 -96
- package/lib/module/components/executiontasks/scanner/CScanner.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js +0 -24
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js +0 -146
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js +0 -7
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js +0 -33
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -83
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js +0 -269
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -73
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js.map +0 -1
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js +0 -238
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js.map +0 -1
- package/lib/module/ui/screens/RTScanScreen.js +0 -89
- package/lib/module/ui/screens/RTScanScreen.js.map +0 -1
- package/lib/typescript/components/executiontasks/doodle/DoodleUtils.d.ts +0 -3
- package/lib/typescript/components/executiontasks/scan/sub_components/ScanList.d.ts +0 -8
- package/lib/typescript/components/executiontasks/scanner/CScanner.d.ts +0 -7
- package/lib/typescript/components/executiontasks/scanner/ScannerSchema.d.ts +0 -75
- package/lib/typescript/components/executiontasks/scanner/ScannerUtils.d.ts +0 -15
- package/lib/typescript/components/executiontasks/scanner/returns/DropDownSelector.d.ts +0 -3
- package/lib/typescript/components/executiontasks/scanner/returns/DropDownUtils.d.ts +0 -2
- package/lib/typescript/components/executiontasks/scanner/returns/RTReasonSelection.d.ts +0 -7
- package/lib/typescript/components/executiontasks/scanner/returns/RTScan.d.ts +0 -4
- package/lib/typescript/components/executiontasks/scanner/returns/ReasonDropDown.d.ts +0 -14
- package/lib/typescript/components/executiontasks/scanner/returns/ScanList.d.ts +0 -17
- package/lib/typescript/ui/screens/RTScanScreen.d.ts +0 -3
- /package/android/.gradle/{6.8 → 7.0.2}/fileChanges/last-build.bin +0 -0
- /package/android/.gradle/{6.8 → 7.0.2}/gc.properties +0 -0
- /package/android/.gradle/{configuration-cache → 7.2/dependencies-accessors}/gc.properties +0 -0
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import { BarCodeScanner } from 'expo-barcode-scanner';
|
|
2
|
-
import { ExpoBarcodeTypes, SCAN_STATUS } from './interfaces';
|
|
2
|
+
import { ExpoBarcodeTypes, SCAN_STATUS, SummaryPageTabs } from './interfaces';
|
|
3
|
+
import { DeliverState } from './ScanSchema';
|
|
3
4
|
import * as jsonLogic from 'json-logic-js';
|
|
4
5
|
import { getBaseETResponse } from '../../../utils/ExecTaskUtils';
|
|
5
6
|
import { EntityCode, ExecutionTaskID } from '../../../models/execTasks/ETConfig';
|
|
6
|
-
import { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';
|
|
7
7
|
import { getApiResponse, parseBody, parseKeyValue } from '../../../utils/ApiUtils';
|
|
8
8
|
import Logger, { LOG_TYPE } from '../../../utils/Logger';
|
|
9
|
+
import { REASON_NOT_USED } from '../../../constants/constants';
|
|
10
|
+
import Storage from '../../../utils/storage';
|
|
11
|
+
import { SCAN_MERGED_OBJ_ID_OUTPUT, SHARED_PREFERENCE_SCAN_OUTPUT } from '../../../manager/syncmanager/constants';
|
|
12
|
+
import { RouteParams } from '../../../ui/uiConfig/RouteParams';
|
|
13
|
+
import dispatchEvent from '../../../events/EventDispatcher';
|
|
14
|
+
import { DispatchExecutor, WIErrorCodes, ErrorCodeMessages } from '@os1-platform/platform-coreos-execution-engine-sdk';
|
|
15
|
+
import { isEmptyOrBlank } from '../../../utils/utils';
|
|
16
|
+
import { EMPTY_AWB, ER_MISSING, INVALID_SHIPMENT } from './constants';
|
|
17
|
+
import { getDefaultERCLabel } from './sub_components/DropDownUtils';
|
|
18
|
+
import { SnackBarType } from '../../../components/widgets/SnackBarCustom';
|
|
9
19
|
export function getBarCodeTypes(input) {
|
|
10
20
|
const barCodeType = [];
|
|
11
21
|
const {
|
|
@@ -60,10 +70,7 @@ export function getBarCodeTypes(input) {
|
|
|
60
70
|
export async function checkForValidation(scannedInput, validation) {
|
|
61
71
|
// Scans Array
|
|
62
72
|
if (validation.selectedIndex === 0) {
|
|
63
|
-
|
|
64
|
-
const scans = validation.logic;
|
|
65
|
-
const found = scans.find(s => s === scannedInput);
|
|
66
|
-
return found !== undefined;
|
|
73
|
+
return true;
|
|
67
74
|
}
|
|
68
75
|
// Validation Regex
|
|
69
76
|
else if (validation.selectedIndex === 1 && typeof validation.logic === 'string') {
|
|
@@ -140,169 +147,94 @@ export function getScannedItemCount(scansMap) {
|
|
|
140
147
|
}
|
|
141
148
|
return scannedShipments;
|
|
142
149
|
}
|
|
150
|
+
export function getMappingCount(scanOutput, wiMappingUpdate) {
|
|
151
|
+
const {
|
|
152
|
+
mwId: mergedObjectiveId
|
|
153
|
+
} = wiMappingUpdate.data;
|
|
154
|
+
if (scanOutput[mergedObjectiveId]) {
|
|
155
|
+
return scanOutput[mergedObjectiveId].count + 1;
|
|
156
|
+
} else {
|
|
157
|
+
return 1;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
export async function getUpdatedScanETOutput(scanOutput, wiMappingUpdate, success, eventCode, reasonCode, route, scannedData) {
|
|
161
|
+
const prefixedMergedObjectiveId = route.params[RouteParams.ROOT_META_DATA].prefixedMergedObjectiveId;
|
|
162
|
+
const {
|
|
163
|
+
mwId: mergedObjectiveId,
|
|
164
|
+
previousMWID: previousMergedObjectiveId
|
|
165
|
+
} = wiMappingUpdate.data;
|
|
166
|
+
const output = await getBaseETResponse(EntityCode.SCAN, success, eventCode, reasonCode, [mergedObjectiveId], ExecutionTaskID.SCAN);
|
|
167
|
+
const _scannedData = [{
|
|
168
|
+
groupId: scannedData.displayInfo.groupId,
|
|
169
|
+
jobId: scannedData.jobId,
|
|
170
|
+
shipmentFlow: scannedData.displayInfo.shipmentFlow,
|
|
171
|
+
scanValue: scannedData.scanId
|
|
172
|
+
}];
|
|
173
|
+
scannedData !== null && scannedData !== void 0 && scannedData.isScan ? triggerScanEvent('ON_SCAN', route, _scannedData, output) : null;
|
|
174
|
+
if (scanOutput[previousMergedObjectiveId]) {
|
|
175
|
+
scanOutput[previousMergedObjectiveId].count -= 1;
|
|
176
|
+
if (scanOutput[previousMergedObjectiveId].count === 0) {
|
|
177
|
+
delete scanOutput[previousMergedObjectiveId];
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
const count = getMappingCount(scanOutput, wiMappingUpdate);
|
|
181
|
+
if (!scanOutput[mergedObjectiveId]) {
|
|
182
|
+
scanOutput[mergedObjectiveId] = {
|
|
183
|
+
output,
|
|
184
|
+
count
|
|
185
|
+
};
|
|
186
|
+
} else {
|
|
187
|
+
scanOutput[mergedObjectiveId].count = count;
|
|
188
|
+
}
|
|
143
189
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
if (scansMap.size) for (let [, _scannedValue] of scansMap.entries()) {
|
|
163
|
-
const _isScannedSuccess = _scannedValue !== null && _scannedValue !== void 0 && _scannedValue.success ? true : false;
|
|
164
|
-
const _appRC = _isScannedSuccess ? applicableCodes === null || applicableCodes === void 0 ? void 0 : applicableCodes.success : applicableCodes === null || applicableCodes === void 0 ? void 0 : applicableCodes.failure;
|
|
165
|
-
if (scanMode === 'SINGLE' || isMultiObjectiveEnable) {
|
|
166
|
-
for (let [_jobId, blindValue] of blindData.entries()) {
|
|
167
|
-
if (_scannedValue.jobId === _jobId) {
|
|
168
|
-
if (blindValue.scannedCount === 1) continue;else {
|
|
169
|
-
if (_scannedValue.scanStatus === SCAN_STATUS.SCANNED) {
|
|
170
|
-
if (!isCancelled && isMultiObjectiveEnable && isErcSelector && !_scannedValue.success) {
|
|
171
|
-
scanOutput.pendingEtData[_jobId] = {
|
|
172
|
-
scans: [{
|
|
173
|
-
value: _scannedValue.value,
|
|
174
|
-
validated: _scannedValue.validated || false,
|
|
175
|
-
timestamp: _scannedValue.timestamp || Date.now()
|
|
176
|
-
}]
|
|
177
|
-
};
|
|
178
|
-
if (isErcSelector) {
|
|
179
|
-
scanOutput.pendingEtData[_jobId]['baseResponse'] = {
|
|
180
|
-
...(await getBaseETResponse(EntityCode.SCAN, _isScannedSuccess, (_scannedValue === null || _scannedValue === void 0 ? void 0 : _scannedValue.eventCode) || getEventCodeByET(ExecutionTaskID.SCAN, _isScannedSuccess, _appRC), (_scannedValue === null || _scannedValue === void 0 ? void 0 : _scannedValue.reasonCode) || ''))
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
} else {
|
|
184
|
-
scanOutput.etData[_jobId] = {
|
|
185
|
-
scans: getScannedItems(_scannedValue)
|
|
186
|
-
};
|
|
187
|
-
if (isErcSelector && !isCancelled) {
|
|
188
|
-
scanOutput.etData[_jobId]['baseResponse'] = {
|
|
189
|
-
...(await getBaseETResponse(EntityCode.SCAN, _isScannedSuccess, (_scannedValue === null || _scannedValue === void 0 ? void 0 : _scannedValue.eventCode) || getEventCodeByET(ExecutionTaskID.SCAN, _isScannedSuccess, _appRC), (_scannedValue === null || _scannedValue === void 0 ? void 0 : _scannedValue.reasonCode) || ''))
|
|
190
|
-
};
|
|
191
|
-
} else if (isCancelled) {
|
|
192
|
-
scanOutput.etData[_jobId]['baseResponse'] = {
|
|
193
|
-
...(await getBaseETResponse(EntityCode.SCAN, false, defaultERC === null || defaultERC === void 0 ? void 0 : defaultERC.eventCode, (defaultERC === null || defaultERC === void 0 ? void 0 : defaultERC.reasonCode) || ''))
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
blindData.set(_jobId, {
|
|
198
|
-
...blindValue,
|
|
199
|
-
scannedCount: blindValue.scannedCount + 1
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
break;
|
|
190
|
+
// SAVE IN SHARED PREFERENCE
|
|
191
|
+
let allScansOutput = (await getScanMappedOutput()) || {};
|
|
192
|
+
let storage = Storage.getInstance();
|
|
193
|
+
await storage.setSharedItem(SHARED_PREFERENCE_SCAN_OUTPUT, JSON.stringify({
|
|
194
|
+
...allScansOutput,
|
|
195
|
+
[prefixedMergedObjectiveId]: scanOutput
|
|
196
|
+
}));
|
|
197
|
+
return scanOutput;
|
|
198
|
+
}
|
|
199
|
+
export async function getScanETOutput(mergeScannedOutput, mergedObjectiveId, ercItems, defaultERC, deliverState, isPartial, count) {
|
|
200
|
+
switch (deliverState) {
|
|
201
|
+
case DeliverState.CANCELLED:
|
|
202
|
+
{
|
|
203
|
+
const output = await getBaseETResponse(EntityCode.SCAN, false, defaultERC.eventCode, defaultERC.reasonCode || '', mergedObjectiveId, ExecutionTaskID.SCAN);
|
|
204
|
+
return {
|
|
205
|
+
[mergedObjectiveId[0]]: {
|
|
206
|
+
output,
|
|
207
|
+
count
|
|
203
208
|
}
|
|
204
|
-
}
|
|
209
|
+
};
|
|
205
210
|
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
scanOutput.etData[_scannedValue.jobId] = {
|
|
213
|
-
scans: (_scanOutput$etData$_s = scanOutput.etData[_scannedValue.jobId]) !== null && _scanOutput$etData$_s !== void 0 && _scanOutput$etData$_s.scans ? scanOutput.etData[_scannedValue.jobId].scans.concat(getScannedItems(_scannedValue)) : getScannedItems(_scannedValue)
|
|
211
|
+
case DeliverState.DELIVERE_LATER:
|
|
212
|
+
{
|
|
213
|
+
const output = await getBaseETResponse(EntityCode.SCAN, false, REASON_NOT_USED, '', mergedObjectiveId, ExecutionTaskID.SCAN);
|
|
214
|
+
mergeScannedOutput['default'] = {
|
|
215
|
+
output,
|
|
216
|
+
count
|
|
214
217
|
};
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
218
|
+
return mergeScannedOutput;
|
|
219
|
+
}
|
|
220
|
+
case DeliverState.DELIVER_NOW:
|
|
221
|
+
{
|
|
222
|
+
if (isPartial) {
|
|
223
|
+
const output = await getBaseETResponse(EntityCode.SCAN, getEventType(ercItems, defaultERC.eventCode), defaultERC.eventCode, defaultERC.reasonCode || '', mergedObjectiveId, ExecutionTaskID.SCAN);
|
|
224
|
+
mergeScannedOutput['default'] = {
|
|
225
|
+
output,
|
|
226
|
+
count
|
|
222
227
|
};
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* Blind scan without any maxCount limit
|
|
228
|
-
*/
|
|
229
|
-
if (!scanCountLimit) {
|
|
230
|
-
var _scanOutput$etData$_j;
|
|
231
|
-
scanOutput.etData[_jobId] = {
|
|
232
|
-
scans: (_scanOutput$etData$_j = scanOutput.etData[_jobId]) !== null && _scanOutput$etData$_j !== void 0 && _scanOutput$etData$_j.scans ? scanOutput.etData[_jobId].scans.concat(getScannedItems(_scannedValue)) : getScannedItems(_scannedValue)
|
|
233
|
-
};
|
|
234
|
-
if (isErcSelector && !isCancelled) {
|
|
235
|
-
scanOutput.etData[_jobId]['baseResponse'] = {
|
|
236
|
-
...(await getBaseETResponse(EntityCode.SCAN, _isScannedSuccess, (_scannedValue === null || _scannedValue === void 0 ? void 0 : _scannedValue.eventCode) || getEventCodeByET(ExecutionTaskID.SCAN, _isScannedSuccess, _appRC), (_scannedValue === null || _scannedValue === void 0 ? void 0 : _scannedValue.reasonCode) || ''))
|
|
237
|
-
};
|
|
238
|
-
} else if (isCancelled) {
|
|
239
|
-
scanOutput.etData[_jobId]['baseResponse'] = {
|
|
240
|
-
...(await getBaseETResponse(EntityCode.SCAN, false, defaultERC === null || defaultERC === void 0 ? void 0 : defaultERC.eventCode, (defaultERC === null || defaultERC === void 0 ? void 0 : defaultERC.reasonCode) || ''))
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
break;
|
|
244
|
-
} else {
|
|
245
|
-
if (blindValue.maxCount === blindValue.scannedCount) continue;else {
|
|
246
|
-
var _scanOutput$etData$_j2;
|
|
247
|
-
scanOutput.etData[_jobId] = {
|
|
248
|
-
scans: (_scanOutput$etData$_j2 = scanOutput.etData[_jobId]) !== null && _scanOutput$etData$_j2 !== void 0 && _scanOutput$etData$_j2.scans ? scanOutput.etData[_jobId].scans.concat(getScannedItems(_scannedValue)) : getScannedItems(_scannedValue)
|
|
249
|
-
};
|
|
250
|
-
if (isErcSelector && !isCancelled) {
|
|
251
|
-
scanOutput.etData[_jobId]['baseResponse'] = {
|
|
252
|
-
...(await getBaseETResponse(EntityCode.SCAN, _isScannedSuccess, (_scannedValue === null || _scannedValue === void 0 ? void 0 : _scannedValue.eventCode) || getEventCodeByET(ExecutionTaskID.SCAN, _isScannedSuccess, _appRC), (_scannedValue === null || _scannedValue === void 0 ? void 0 : _scannedValue.reasonCode) || ''))
|
|
253
|
-
};
|
|
254
|
-
} else if (isCancelled) {
|
|
255
|
-
scanOutput.etData[_jobId]['baseResponse'] = {
|
|
256
|
-
...(await getBaseETResponse(EntityCode.SCAN, false, defaultERC === null || defaultERC === void 0 ? void 0 : defaultERC.eventCode, (defaultERC === null || defaultERC === void 0 ? void 0 : defaultERC.reasonCode) || ''))
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
blindData.set(_jobId, {
|
|
260
|
-
...blindValue,
|
|
261
|
-
scannedCount: blindValue.scannedCount + 1
|
|
262
|
-
});
|
|
263
|
-
break;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
228
|
+
return mergeScannedOutput;
|
|
229
|
+
} else {
|
|
230
|
+
return mergeScannedOutput;
|
|
266
231
|
}
|
|
267
232
|
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* Add unscanned objectives to pending_states
|
|
273
|
-
*/
|
|
274
|
-
if (isMultiObjectiveEnable) {
|
|
275
|
-
if (scansMap.size) {
|
|
276
|
-
for (let [, _scannedValue] of scansMap.entries()) {
|
|
277
|
-
const _isScannedSuccess = _scannedValue !== null && _scannedValue !== void 0 && _scannedValue.success ? true : false;
|
|
278
|
-
for (let [_jobId, blindValue] of blindData.entries()) {
|
|
279
|
-
if (_scannedValue.jobId === _jobId) {
|
|
280
|
-
if (blindValue.scannedCount === 1) continue;else {
|
|
281
|
-
if (!_scannedValue.scanStatus || _scannedValue.scanStatus === SCAN_STATUS.FAILED) {
|
|
282
|
-
if (!scanOutput.pendingEtData) scanOutput.pendingEtData = {};
|
|
283
|
-
scanOutput.pendingEtData[_jobId] = {
|
|
284
|
-
scans: [{
|
|
285
|
-
value: _scannedValue.value,
|
|
286
|
-
validated: _scannedValue.validated || false,
|
|
287
|
-
timestamp: _scannedValue.timestamp || Date.now()
|
|
288
|
-
}]
|
|
289
|
-
};
|
|
290
|
-
scanOutput.pendingEtData[_jobId]['baseResponse'] = {
|
|
291
|
-
...(await getBaseETResponse(EntityCode.SCAN, _isScannedSuccess, defaultERC === null || defaultERC === void 0 ? void 0 : defaultERC.eventCode, (defaultERC === null || defaultERC === void 0 ? void 0 : defaultERC.reasonCode) || ''))
|
|
292
|
-
};
|
|
293
|
-
blindData.set(_jobId, {
|
|
294
|
-
...blindValue,
|
|
295
|
-
scannedCount: blindValue.scannedCount + 1
|
|
296
|
-
});
|
|
297
|
-
}
|
|
298
|
-
break;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
}
|
|
233
|
+
default:
|
|
234
|
+
{
|
|
235
|
+
return mergeScannedOutput;
|
|
302
236
|
}
|
|
303
|
-
}
|
|
304
237
|
}
|
|
305
|
-
return scanOutput;
|
|
306
238
|
}
|
|
307
239
|
export function getScannedItems(scanValue) {
|
|
308
240
|
const items = [];
|
|
@@ -355,4 +287,440 @@ export function isReplacement(scan, scansMap, selectedEventCode, selectedReason)
|
|
|
355
287
|
}
|
|
356
288
|
return false;
|
|
357
289
|
}
|
|
290
|
+
export function getEventType(eventList, eventCode) {
|
|
291
|
+
const result = eventList.find(code => code.code === eventCode);
|
|
292
|
+
if (result) {
|
|
293
|
+
return Boolean(result.success);
|
|
294
|
+
} else {
|
|
295
|
+
return false;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
export async function getScanMappedOutput() {
|
|
299
|
+
let storage = Storage.getInstance();
|
|
300
|
+
const mergedScanOutput = await storage.getSharedItem(SHARED_PREFERENCE_SCAN_OUTPUT);
|
|
301
|
+
if (mergedScanOutput) {
|
|
302
|
+
return JSON.parse(mergedScanOutput);
|
|
303
|
+
} else {
|
|
304
|
+
return {};
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
export function triggerScanEvent(type, route, scannedData, etOutput) {
|
|
308
|
+
switch (type) {
|
|
309
|
+
case 'ON_SCAN':
|
|
310
|
+
{
|
|
311
|
+
const nextStates = route.params[RouteParams.NEXT_STATES];
|
|
312
|
+
const eventOutputData = {
|
|
313
|
+
meta: (etOutput === null || etOutput === void 0 ? void 0 : etOutput.meta) || {},
|
|
314
|
+
etData: {
|
|
315
|
+
eventCode: (etOutput === null || etOutput === void 0 ? void 0 : etOutput.eventCode) || '',
|
|
316
|
+
reasonCode: (etOutput === null || etOutput === void 0 ? void 0 : etOutput.reasonCode) || '',
|
|
317
|
+
success: (etOutput === null || etOutput === void 0 ? void 0 : etOutput.success) || false,
|
|
318
|
+
endTime: Date.now(),
|
|
319
|
+
scannedData
|
|
320
|
+
},
|
|
321
|
+
taskId: nextStates.taskId,
|
|
322
|
+
timestamp: Date.now(),
|
|
323
|
+
customData: route.params[RouteParams.ROOT_META_DATA].customEventsData
|
|
324
|
+
};
|
|
325
|
+
dispatchEvent('ON_SCAN', nextStates.taskName, eventOutputData);
|
|
326
|
+
break;
|
|
327
|
+
}
|
|
328
|
+
case 'ON_SCAN_REMOVE':
|
|
329
|
+
{
|
|
330
|
+
const nextStates = route.params[RouteParams.NEXT_STATES];
|
|
331
|
+
const eventOutputData = {
|
|
332
|
+
etData: {
|
|
333
|
+
scannedData
|
|
334
|
+
},
|
|
335
|
+
taskId: nextStates.taskId,
|
|
336
|
+
timestamp: Date.now(),
|
|
337
|
+
customData: route.params[RouteParams.ROOT_META_DATA].customEventsData
|
|
338
|
+
};
|
|
339
|
+
dispatchEvent('ON_SCAN_REMOVE', nextStates.taskName, eventOutputData);
|
|
340
|
+
break;
|
|
341
|
+
}
|
|
342
|
+
default:
|
|
343
|
+
break;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
const fetchMergedObjectiveIdBasedOnStatus = async (activeTab, scanProps) => {
|
|
347
|
+
let prefixedMergedObjectiveId = scanProps.route.params[RouteParams.ROOT_META_DATA].prefixedMergedObjectiveId;
|
|
348
|
+
let mergedObjectiveIds;
|
|
349
|
+
let filterIds = await getScanMergedObjectID();
|
|
350
|
+
if (filterIds) {
|
|
351
|
+
mergedObjectiveIds = filterIds[prefixedMergedObjectiveId] || [];
|
|
352
|
+
} else {
|
|
353
|
+
return [];
|
|
354
|
+
}
|
|
355
|
+
switch (activeTab) {
|
|
356
|
+
case SummaryPageTabs.ALL:
|
|
357
|
+
return [...mergedObjectiveIds['pending'], ...mergedObjectiveIds['success'], ...mergedObjectiveIds['failure']];
|
|
358
|
+
case SummaryPageTabs.PENDING:
|
|
359
|
+
return mergedObjectiveIds['pending'];
|
|
360
|
+
case SummaryPageTabs.DELIVERED:
|
|
361
|
+
return mergedObjectiveIds['success'];
|
|
362
|
+
case SummaryPageTabs.UNDELIVERED:
|
|
363
|
+
return mergedObjectiveIds['failure'];
|
|
364
|
+
default:
|
|
365
|
+
return [];
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
const fetchLabel = async (eventCode, reasonCode) => {
|
|
369
|
+
return await getDefaultERCLabel({
|
|
370
|
+
eventCode,
|
|
371
|
+
reasonCode
|
|
372
|
+
});
|
|
373
|
+
};
|
|
374
|
+
const modifyDisplayScanData = async response => {
|
|
375
|
+
const {
|
|
376
|
+
data: scans
|
|
377
|
+
} = response;
|
|
378
|
+
const updatedScanData = await Promise.all(scans.map(async scan => {
|
|
379
|
+
var _scan$displayInfo, _scan$displayInfo2;
|
|
380
|
+
const {
|
|
381
|
+
eventCode,
|
|
382
|
+
reasonCode
|
|
383
|
+
} = await fetchLabel(scan.eventCode, scan.reasonCode);
|
|
384
|
+
return {
|
|
385
|
+
scanId: scan.scannableId,
|
|
386
|
+
clientName: ((_scan$displayInfo = scan.displayInfo) === null || _scan$displayInfo === void 0 ? void 0 : _scan$displayInfo.clientName) || '--',
|
|
387
|
+
orderId: ((_scan$displayInfo2 = scan.displayInfo) === null || _scan$displayInfo2 === void 0 ? void 0 : _scan$displayInfo2.orderId) || '--',
|
|
388
|
+
eventCode: eventCode || '--',
|
|
389
|
+
reasonCode: reasonCode || '--',
|
|
390
|
+
prefixedMergedObjectiveId: scan.originalMergedObjId,
|
|
391
|
+
lastStatus: scan.lastStatus
|
|
392
|
+
};
|
|
393
|
+
}));
|
|
394
|
+
return {
|
|
395
|
+
data: updatedScanData,
|
|
396
|
+
totalCount: response.totalCount
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
export async function getScanData(activeTab, scanProps, limit, offset, scan) {
|
|
400
|
+
const taskName = scanProps.taskName || '';
|
|
401
|
+
const mergedObjectiveId = scanProps.mergedObjectiveId;
|
|
402
|
+
const mergedObjectiveIds = await fetchMergedObjectiveIdBasedOnStatus(activeTab, scanProps);
|
|
403
|
+
if (!mergedObjectiveIds || mergedObjectiveIds.length === 0) {
|
|
404
|
+
return {
|
|
405
|
+
data: [],
|
|
406
|
+
totalCount: 0
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
if (scan) {
|
|
410
|
+
const scans = await DispatchExecutor.filterWFIData(taskName, mergedObjectiveIds, limit, offset, scan);
|
|
411
|
+
return await modifyDisplayScanData(scans);
|
|
412
|
+
} else {
|
|
413
|
+
const scans = await DispatchExecutor.filterWFIData(taskName, mergedObjectiveIds, limit, offset);
|
|
414
|
+
return await modifyDisplayScanData(scans);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
export async function addScans(scan, scanProps, scanOutput, ercItems, eventCode, reasonCode) {
|
|
418
|
+
const prefixedMergedObjectiveId = scanProps.route.params[RouteParams.ROOT_META_DATA].prefixedMergedObjectiveId;
|
|
419
|
+
const isErcSelector = scanProps.ercSelector ? true : false;
|
|
420
|
+
if (isEmptyOrBlank(scan)) {
|
|
421
|
+
return {
|
|
422
|
+
status: false,
|
|
423
|
+
message: EMPTY_AWB,
|
|
424
|
+
type: SnackBarType.FAILURE
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
if (isErcSelector && (!eventCode || !eventCode.code)) {
|
|
428
|
+
return {
|
|
429
|
+
status: false,
|
|
430
|
+
type: SnackBarType.FAILURE,
|
|
431
|
+
message: ER_MISSING.replace('<shipment_id>', scan)
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
let isValidated = await checkForValidation(scan, scanProps.validation);
|
|
435
|
+
if (isValidated) {
|
|
436
|
+
// NEW CODE
|
|
437
|
+
try {
|
|
438
|
+
const eventType = getEventType(ercItems || [], (eventCode === null || eventCode === void 0 ? void 0 : eventCode.code) || '');
|
|
439
|
+
const result = await DispatchExecutor.updateWIMapping(prefixedMergedObjectiveId, scan, {
|
|
440
|
+
ec: (eventCode === null || eventCode === void 0 ? void 0 : eventCode.code) || '',
|
|
441
|
+
rc: (reasonCode === null || reasonCode === void 0 ? void 0 : reasonCode.code) || ''
|
|
442
|
+
}, scanProps.scanToMerge || false);
|
|
443
|
+
if ('data' in result) {
|
|
444
|
+
const data = result.data;
|
|
445
|
+
const {
|
|
446
|
+
message: {
|
|
447
|
+
title,
|
|
448
|
+
subTitle
|
|
449
|
+
}
|
|
450
|
+
} = data;
|
|
451
|
+
|
|
452
|
+
// UPDATE SHARED PREFERENCE
|
|
453
|
+
updateSharedPreference(eventType, data.mwId, prefixedMergedObjectiveId);
|
|
454
|
+
const _scanOutput = await getUpdatedScanETOutput(scanOutput, result, eventType, (eventCode === null || eventCode === void 0 ? void 0 : eventCode.code) || '', (reasonCode === null || reasonCode === void 0 ? void 0 : reasonCode.code) || '', scanProps.route, {
|
|
455
|
+
jobId: data.jobId,
|
|
456
|
+
displayInfo: data.displayInfo,
|
|
457
|
+
isScan: true,
|
|
458
|
+
scanId: scan
|
|
459
|
+
});
|
|
460
|
+
return {
|
|
461
|
+
status: true,
|
|
462
|
+
type: subTitle ? SnackBarType.WARNING : SnackBarType.SUCCESS,
|
|
463
|
+
message: subTitle ? `#${scan}\n${title}\n${subTitle}` : `#${scan}\nShipment updated successfully!`,
|
|
464
|
+
data: {
|
|
465
|
+
output: _scanOutput,
|
|
466
|
+
shipmentCount: {
|
|
467
|
+
scannedCount: data.scanned,
|
|
468
|
+
totalCount: data.total
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
};
|
|
472
|
+
} else {
|
|
473
|
+
return {
|
|
474
|
+
status: false,
|
|
475
|
+
type: SnackBarType.FAILURE,
|
|
476
|
+
message: 'Error occurred while scanning'
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
} catch (error) {
|
|
480
|
+
if (scanProps.exitOnError) {
|
|
481
|
+
return {
|
|
482
|
+
status: false,
|
|
483
|
+
type: SnackBarType.FAILURE,
|
|
484
|
+
exit: true,
|
|
485
|
+
message: 'Error occurred while scanning'
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
// props.onSubmitET({
|
|
489
|
+
// ...(await getScanETOutput(
|
|
490
|
+
// mergedScanETOutput,
|
|
491
|
+
// props.mergedObjectiveId,
|
|
492
|
+
// eventCodeItems || [],
|
|
493
|
+
// props.defaultERC,
|
|
494
|
+
// false,
|
|
495
|
+
// true
|
|
496
|
+
// )),
|
|
497
|
+
// });
|
|
498
|
+
} else {
|
|
499
|
+
return {
|
|
500
|
+
status: false,
|
|
501
|
+
...getErrorMessage(scan, error)
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
} else {
|
|
506
|
+
if (scanProps.exitOnError) {
|
|
507
|
+
return {
|
|
508
|
+
status: false,
|
|
509
|
+
type: SnackBarType.FAILURE,
|
|
510
|
+
exit: true,
|
|
511
|
+
message: 'Error occurred while scanning'
|
|
512
|
+
};
|
|
513
|
+
} else {
|
|
514
|
+
return {
|
|
515
|
+
status: false,
|
|
516
|
+
message: INVALID_SHIPMENT,
|
|
517
|
+
type: SnackBarType.FAILURE
|
|
518
|
+
};
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
export async function removeScan(taskName, scans, route, scanOutput) {
|
|
523
|
+
const prefixedMergedObjectiveId = route.params[RouteParams.ROOT_META_DATA].prefixedMergedObjectiveId;
|
|
524
|
+
const result = await DispatchExecutor.removeShipment(prefixedMergedObjectiveId, scans);
|
|
525
|
+
|
|
526
|
+
// Decrease count on remove
|
|
527
|
+
Object.keys(result).forEach(mergedObjectiveId => {
|
|
528
|
+
scanOutput[mergedObjectiveId].count -= result[mergedObjectiveId];
|
|
529
|
+
if (scanOutput[mergedObjectiveId].count === 0) {
|
|
530
|
+
delete scanOutput[mergedObjectiveId];
|
|
531
|
+
}
|
|
532
|
+
});
|
|
533
|
+
const allScansOutput = (await getScanMergedOutput()) || {};
|
|
534
|
+
|
|
535
|
+
// SAVE IN SHARED PREFERENCE
|
|
536
|
+
let storage = Storage.getInstance();
|
|
537
|
+
const mergedIdOutput = await getScanMergedObjectID();
|
|
538
|
+
if (mergedIdOutput) {
|
|
539
|
+
const _mergedIds = mergedIdOutput[prefixedMergedObjectiveId];
|
|
540
|
+
_mergedIds.pending.push(prefixedMergedObjectiveId);
|
|
541
|
+
await storage.setSharedItem(SCAN_MERGED_OBJ_ID_OUTPUT, JSON.stringify({
|
|
542
|
+
...mergedIdOutput,
|
|
543
|
+
[prefixedMergedObjectiveId]: _mergedIds
|
|
544
|
+
}));
|
|
545
|
+
}
|
|
546
|
+
let outputAtPrefixedId = allScansOutput[prefixedMergedObjectiveId] || {};
|
|
547
|
+
await storage.setSharedItem(SHARED_PREFERENCE_SCAN_OUTPUT, JSON.stringify({
|
|
548
|
+
...allScansOutput,
|
|
549
|
+
[prefixedMergedObjectiveId]: {
|
|
550
|
+
...outputAtPrefixedId,
|
|
551
|
+
scanOutput
|
|
552
|
+
}
|
|
553
|
+
}));
|
|
554
|
+
|
|
555
|
+
// TRIGGER REMOVE SCAN EVENT
|
|
556
|
+
const scannedData = scans.map(scan => ({
|
|
557
|
+
scanValue: scan
|
|
558
|
+
}));
|
|
559
|
+
triggerScanEvent('ON_SCAN_REMOVE', route, scannedData);
|
|
560
|
+
}
|
|
561
|
+
export async function updateSharedPreference(eventType, mergedObjectiveId, prefixedMergedObjectiveId) {
|
|
562
|
+
let storage = Storage.getInstance();
|
|
563
|
+
const mergedIdOutput = await getScanMergedObjectID();
|
|
564
|
+
if (mergedIdOutput) {
|
|
565
|
+
const _mergedIds = mergedIdOutput[prefixedMergedObjectiveId];
|
|
566
|
+
if (eventType) {
|
|
567
|
+
_mergedIds.success.push(mergedObjectiveId);
|
|
568
|
+
} else {
|
|
569
|
+
_mergedIds.failure.push(mergedObjectiveId);
|
|
570
|
+
}
|
|
571
|
+
await storage.setSharedItem(SCAN_MERGED_OBJ_ID_OUTPUT, JSON.stringify({
|
|
572
|
+
...mergedIdOutput,
|
|
573
|
+
[prefixedMergedObjectiveId]: _mergedIds
|
|
574
|
+
}));
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
export async function updatePendingSharedPreference(eventType, prefixedMergedObjectiveId) {
|
|
578
|
+
let storage = Storage.getInstance();
|
|
579
|
+
const mergedIdOutput = await getScanMergedObjectID();
|
|
580
|
+
if (mergedIdOutput) {
|
|
581
|
+
const _mergedIds = mergedIdOutput[prefixedMergedObjectiveId];
|
|
582
|
+
if (_mergedIds) {
|
|
583
|
+
if (eventType) {
|
|
584
|
+
_mergedIds.success.push(prefixedMergedObjectiveId);
|
|
585
|
+
_mergedIds.pending = [];
|
|
586
|
+
} else {
|
|
587
|
+
_mergedIds.failure.push(prefixedMergedObjectiveId);
|
|
588
|
+
_mergedIds.pending = [];
|
|
589
|
+
}
|
|
590
|
+
await storage.setSharedItem(SCAN_MERGED_OBJ_ID_OUTPUT, JSON.stringify({
|
|
591
|
+
...mergedIdOutput,
|
|
592
|
+
[prefixedMergedObjectiveId]: _mergedIds
|
|
593
|
+
}));
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
export const getTabCount = async scanProps => {
|
|
598
|
+
let prefixedMergedObjectiveId = scanProps.route.params[RouteParams.ROOT_META_DATA].prefixedMergedObjectiveId;
|
|
599
|
+
const mergedIdOutput = await getScanMergedObjectID();
|
|
600
|
+
const defaultResult = {
|
|
601
|
+
[SummaryPageTabs.ALL]: 0,
|
|
602
|
+
[SummaryPageTabs.PENDING]: 0,
|
|
603
|
+
[SummaryPageTabs.DELIVERED]: 0,
|
|
604
|
+
[SummaryPageTabs.UNDELIVERED]: 0
|
|
605
|
+
};
|
|
606
|
+
const input = {};
|
|
607
|
+
if (mergedIdOutput) {
|
|
608
|
+
const _mergedIds = mergedIdOutput[prefixedMergedObjectiveId];
|
|
609
|
+
if (_mergedIds) {
|
|
610
|
+
const success = _mergedIds.success;
|
|
611
|
+
const failure = _mergedIds.failure;
|
|
612
|
+
const pending = _mergedIds.pending;
|
|
613
|
+
input[SummaryPageTabs.ALL] = [...success, ...failure, ...pending];
|
|
614
|
+
if (pending.length > 0) input[SummaryPageTabs.PENDING] = pending;
|
|
615
|
+
if (success.length > 0) input[SummaryPageTabs.DELIVERED] = success;
|
|
616
|
+
if (failure.length > 0) input[SummaryPageTabs.UNDELIVERED] = failure;
|
|
617
|
+
const result = await DispatchExecutor.getWFICountByMWIIds(input);
|
|
618
|
+
return {
|
|
619
|
+
...defaultResult,
|
|
620
|
+
...result
|
|
621
|
+
};
|
|
622
|
+
} else {
|
|
623
|
+
return defaultResult;
|
|
624
|
+
}
|
|
625
|
+
} else {
|
|
626
|
+
return defaultResult;
|
|
627
|
+
}
|
|
628
|
+
};
|
|
629
|
+
export const clearScanOutput = async prefixedMergedObjectiveId => {
|
|
630
|
+
let storage = Storage.getInstance();
|
|
631
|
+
const promises = [];
|
|
632
|
+
|
|
633
|
+
// Clear Scan Record
|
|
634
|
+
const scanRecord = (await getScanMergedObjectID()) || {};
|
|
635
|
+
if (scanRecord) {
|
|
636
|
+
delete scanRecord[prefixedMergedObjectiveId];
|
|
637
|
+
promises.push(storage.setSharedItem(SCAN_MERGED_OBJ_ID_OUTPUT, JSON.stringify(scanRecord)));
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
// Clear Scan Output
|
|
641
|
+
const scanOutputs = (await getScanMappedOutput()) || {};
|
|
642
|
+
if (scanOutputs) {
|
|
643
|
+
delete scanOutputs[prefixedMergedObjectiveId];
|
|
644
|
+
promises.push(storage.setSharedItem(SHARED_PREFERENCE_SCAN_OUTPUT, JSON.stringify(scanOutputs)));
|
|
645
|
+
}
|
|
646
|
+
return Promise.all(promises);
|
|
647
|
+
};
|
|
648
|
+
export async function getScanMergedObjectID() {
|
|
649
|
+
let storage = Storage.getInstance();
|
|
650
|
+
const mergedIdOutput = await storage.getSharedItem(SCAN_MERGED_OBJ_ID_OUTPUT);
|
|
651
|
+
if (mergedIdOutput) {
|
|
652
|
+
return JSON.parse(mergedIdOutput);
|
|
653
|
+
} else {
|
|
654
|
+
return null;
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
export async function getScanMergedOutput() {
|
|
658
|
+
let storage = Storage.getInstance();
|
|
659
|
+
const mergedIdOutput = await storage.getSharedItem(SHARED_PREFERENCE_SCAN_OUTPUT);
|
|
660
|
+
if (mergedIdOutput) {
|
|
661
|
+
return JSON.parse(mergedIdOutput);
|
|
662
|
+
} else {
|
|
663
|
+
return null;
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
export const getErrorMessage = (scan, error) => {
|
|
667
|
+
switch (error.errorCode) {
|
|
668
|
+
case WIErrorCodes.ScannableIdAlreadyCompleted:
|
|
669
|
+
return {
|
|
670
|
+
type: SnackBarType.FAILURE,
|
|
671
|
+
message: `#${scan}\n${ErrorCodeMessages[WIErrorCodes.ScannableIdAlreadyCompleted]}`
|
|
672
|
+
};
|
|
673
|
+
case WIErrorCodes.ScannableIdNotInDispatch:
|
|
674
|
+
return {
|
|
675
|
+
type: SnackBarType.FAILURE,
|
|
676
|
+
message: `#${scan}\n${ErrorCodeMessages[WIErrorCodes.ScannableIdNotInDispatch]}`
|
|
677
|
+
};
|
|
678
|
+
case WIErrorCodes.ScannableIdNotReady:
|
|
679
|
+
return {
|
|
680
|
+
type: SnackBarType.FAILURE,
|
|
681
|
+
message: `#${scan}\n${ErrorCodeMessages[WIErrorCodes.ScannableIdNotReady]}`
|
|
682
|
+
};
|
|
683
|
+
case WIErrorCodes.DifferentGroupUpdateNotAllowed:
|
|
684
|
+
return {
|
|
685
|
+
type: SnackBarType.FAILURE,
|
|
686
|
+
message: `#${scan}\n${ErrorCodeMessages[WIErrorCodes.DifferentGroupUpdateNotAllowed]}`
|
|
687
|
+
};
|
|
688
|
+
case WIErrorCodes.ObjectiveAndJobWFMismatch:
|
|
689
|
+
return {
|
|
690
|
+
type: SnackBarType.FAILURE,
|
|
691
|
+
message: `#${scan}\n${ErrorCodeMessages[WIErrorCodes.ObjectiveAndJobWFMismatch]}`
|
|
692
|
+
};
|
|
693
|
+
case WIErrorCodes.ScannableIdAlreadyUpdated:
|
|
694
|
+
return {
|
|
695
|
+
type: SnackBarType.WARNING,
|
|
696
|
+
message: `#${scan}\n${ErrorCodeMessages[WIErrorCodes.ScannableIdAlreadyUpdated]}`
|
|
697
|
+
};
|
|
698
|
+
case WIErrorCodes.JobAlreadyCompleted:
|
|
699
|
+
return {
|
|
700
|
+
type: SnackBarType.WARNING,
|
|
701
|
+
message: `#${scan}\n${ErrorCodeMessages[WIErrorCodes.JobAlreadyCompleted]}`
|
|
702
|
+
};
|
|
703
|
+
case WIErrorCodes.ScannableIdPartOfAnotherMO:
|
|
704
|
+
return {
|
|
705
|
+
type: SnackBarType.WARNING,
|
|
706
|
+
message: `#${scan}\n${ErrorCodeMessages[WIErrorCodes.ScannableIdPartOfAnotherMO]}`
|
|
707
|
+
};
|
|
708
|
+
default:
|
|
709
|
+
return {
|
|
710
|
+
type: SnackBarType.FAILURE,
|
|
711
|
+
message: 'Error occurred while scanning'
|
|
712
|
+
};
|
|
713
|
+
}
|
|
714
|
+
};
|
|
715
|
+
export const getSplitIds = scanOutput => {
|
|
716
|
+
const splitMergedObjectiveIds = Object.keys(scanOutput).filter(mergedObjectiveID => {
|
|
717
|
+
const scan = scanOutput[mergedObjectiveID];
|
|
718
|
+
if (scan.count > 0) return true;
|
|
719
|
+
return false;
|
|
720
|
+
}).map(mergedObjectiveIds => mergedObjectiveIds);
|
|
721
|
+
return splitMergedObjectiveIds;
|
|
722
|
+
};
|
|
723
|
+
export function filterERCItems(eventCodeItems, type) {
|
|
724
|
+
return eventCodeItems.filter(erc => Boolean(erc.success) === (type === 'SUCCESS' ? true : false));
|
|
725
|
+
}
|
|
358
726
|
//# sourceMappingURL=utils.js.map
|