@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
|
@@ -24,23 +24,32 @@ const PaymentScreen = _ref => {
|
|
|
24
24
|
route,
|
|
25
25
|
baseETProps
|
|
26
26
|
} = _ref;
|
|
27
|
+
const nextState = route.params[_RouteParams.RouteParams.NEXT_STATES];
|
|
28
|
+
const {
|
|
29
|
+
taskMeta,
|
|
30
|
+
mergedObjectiveId,
|
|
31
|
+
input,
|
|
32
|
+
wfMeta
|
|
33
|
+
} = (0, _RouteParams.getDataFromNextState)(nextState);
|
|
27
34
|
(0, _react.useEffect)(() => {
|
|
28
|
-
(0, _ExecTaskUtils.onTaskStart)(route.params[_RouteParams.RouteParams.NEXT_STATES]);
|
|
35
|
+
(0, _ExecTaskUtils.onTaskStart)(route.params[_RouteParams.RouteParams.NEXT_STATES], route.params[_RouteParams.RouteParams.ROOT_META_DATA].customEventsData);
|
|
29
36
|
}, []);
|
|
30
|
-
let currentState = route.params[_RouteParams.RouteParams.NEXT_STATES]
|
|
37
|
+
let currentState = route.params[_RouteParams.RouteParams.NEXT_STATES];
|
|
31
38
|
const [showAlert, setShowAlert] = (0, _react.useState)(false);
|
|
32
39
|
const [sResponse, setResponse] = (0, _react.useState)();
|
|
40
|
+
const taskId = currentState.taskId;
|
|
33
41
|
const submitOutput = (0, _react.useCallback)(async etOutput => {
|
|
34
|
-
await _DispatchStateContainer.default.getInstance().navigateToNextTask(navigation, route, etOutput, etOutput.success, (0, _ExecTaskUtils.getEntityCodeByET)(currentState.taskId),
|
|
42
|
+
await _DispatchStateContainer.default.getInstance().navigateToNextTask(navigation, route, etOutput, etOutput.success, (0, _ExecTaskUtils.getEntityCodeByET)(currentState.taskId), taskId, baseETProps, false);
|
|
35
43
|
}, [baseETProps, currentState.taskId, navigation, route]);
|
|
36
44
|
if (currentState.taskId === _ETConfig.ExecutionTaskID.INIT_PAYMENT) {
|
|
37
45
|
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
38
46
|
style: {
|
|
39
47
|
flex: 1
|
|
40
48
|
}
|
|
41
|
-
}, /*#__PURE__*/_react.default.createElement(_ExecutionTasksIndex.InitPaymentET, _extends({},
|
|
49
|
+
}, /*#__PURE__*/_react.default.createElement(_ExecutionTasksIndex.InitPaymentET, _extends({}, input, {
|
|
42
50
|
navigation: navigation,
|
|
43
|
-
taskMeta:
|
|
51
|
+
taskMeta: taskMeta,
|
|
52
|
+
mergedObjectiveId: mergedObjectiveId,
|
|
44
53
|
onSubmitET: async etOutput => {
|
|
45
54
|
if (etOutput.success) {
|
|
46
55
|
await submitOutput(etOutput);
|
|
@@ -64,14 +73,14 @@ const PaymentScreen = _ref => {
|
|
|
64
73
|
}));
|
|
65
74
|
} else if (currentState.taskId === _ETConfig.ExecutionTaskID.PROCESS_PAYMENT) {
|
|
66
75
|
var _input2;
|
|
67
|
-
let _input =
|
|
76
|
+
let _input = input;
|
|
68
77
|
if (((_input2 = _input) === null || _input2 === void 0 ? void 0 : _input2.paymentMode) === 'CASH') {
|
|
69
78
|
(0, _react.useEffect)(() => {
|
|
70
79
|
let isMounted = true;
|
|
71
80
|
(async () => {
|
|
72
81
|
if (isMounted) {
|
|
73
82
|
var _input$applicableReas;
|
|
74
|
-
const baseData = await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.PROCESS_PAYMENT, true, (0, _EventCodeContainer.getEventCodeByET)(_ETConfig.ExecutionTaskID.PROCESS_PAYMENT, true, (_input$applicableReas = _input.applicableReasons) === null || _input$applicableReas === void 0 ? void 0 : _input$applicableReas.success), '');
|
|
83
|
+
const baseData = await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.PROCESS_PAYMENT, true, (0, _EventCodeContainer.getEventCodeByET)(_ETConfig.ExecutionTaskID.PROCESS_PAYMENT, true, (_input$applicableReas = _input.applicableReasons) === null || _input$applicableReas === void 0 ? void 0 : _input$applicableReas.success), '', mergedObjectiveId, _ETConfig.ExecutionTaskID.PROCESS_PAYMENT);
|
|
75
84
|
_input = {
|
|
76
85
|
paymentMode: _input.paymentMode,
|
|
77
86
|
collectedAmount: _input.amount,
|
|
@@ -91,9 +100,10 @@ const PaymentScreen = _ref => {
|
|
|
91
100
|
style: {
|
|
92
101
|
flex: 1
|
|
93
102
|
}
|
|
94
|
-
}, /*#__PURE__*/_react.default.createElement(_ExecutionTasksIndex.ProcessPaymentET, _extends({},
|
|
103
|
+
}, /*#__PURE__*/_react.default.createElement(_ExecutionTasksIndex.ProcessPaymentET, _extends({}, input, {
|
|
95
104
|
navigation: navigation,
|
|
96
|
-
|
|
105
|
+
mergedObjectiveId: mergedObjectiveId,
|
|
106
|
+
taskMeta: taskMeta,
|
|
97
107
|
onSubmitET: async etOutput => {
|
|
98
108
|
if (etOutput.success) {
|
|
99
109
|
await submitOutput(etOutput);
|
|
@@ -116,9 +126,10 @@ const PaymentScreen = _ref => {
|
|
|
116
126
|
}
|
|
117
127
|
}));
|
|
118
128
|
} else {
|
|
119
|
-
return /*#__PURE__*/_react.default.createElement(_ExecutionTasksIndex.CompletePaymentET, _extends({},
|
|
129
|
+
return /*#__PURE__*/_react.default.createElement(_ExecutionTasksIndex.CompletePaymentET, _extends({}, input, {
|
|
120
130
|
navigation: navigation,
|
|
121
|
-
taskMeta:
|
|
131
|
+
taskMeta: taskMeta,
|
|
132
|
+
mergedObjectiveId: mergedObjectiveId,
|
|
122
133
|
onSubmitET: async etOut => {
|
|
123
134
|
await _DispatchStateContainer.default.getInstance().navigateToNextTask(navigation, route, etOut, etOut.success, _ETConfig.EntityCode.COMPLETE_PAYMENT, _ETConfig.ExecutionTaskID.COMPLETE_PAYMENT, baseETProps, false);
|
|
124
135
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_WithBaseDispatchScreen","_interopRequireDefault","_ETConfig","_ExecutionTasksIndex","_DispatchStateContainer","_RouteParams","_reactNative","_ExecTaskUtils","_CancelOrderDialog","_EventCodeContainer","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","PaymentScreen","_ref","navigation","route","baseETProps","useEffect","onTaskStart","params","RouteParams","NEXT_STATES","currentState","nextState","showAlert","setShowAlert","useState","sResponse","setResponse","submitOutput","useCallback","etOutput","DispatchStateContainer","getInstance","navigateToNextTask","success","getEntityCodeByET","taskId","ExecutionTaskID","INIT_PAYMENT","createElement","View","style","flex","InitPaymentET","data","input","taskMeta","JSON","parse","onSubmitET","_prevState","visible","onSubmit","value","PROCESS_PAYMENT","_input2","_input","paymentMode","isMounted","_input$applicableReas","baseData","getBaseETResponse","EntityCode","getEventCodeByET","applicableReasons","collectedAmount","amount","transactionId","tenantTransactionId","Fragment","ProcessPaymentET","CompletePaymentET","etOut","COMPLETE_PAYMENT","_default","withBaseDispatchScreen","exports"],"sources":["PaymentScreen.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport withBaseDispatchScreen from './WithBaseDispatchScreen';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport type { state } from '@os1-platform/mobile-execution-lib';\nimport { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';\nimport {\n CompletePaymentET,\n InitPaymentET,\n ProcessPaymentET,\n} from '../../components/executiontasks/ExecutionTasksIndex';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\nimport { RouteParams } from '../uiConfig/RouteParams';\nimport { View } from 'react-native';\nimport {\n getBaseETResponse,\n getEntityCodeByET,\n onTaskStart,\n} from '../../utils/ExecTaskUtils';\nimport CancelOrderDialog from '../../components/widgets/CancelOrderDialog';\nimport { getEventCodeByET } from '../../manager/dispatchCodes/EventCodeContainer';\nimport { useEffect } from 'react';\n\nconst PaymentScreen = ({\n navigation,\n route,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n useEffect(() => {\n onTaskStart(route.params[RouteParams.NEXT_STATES]);\n }, []);\n let currentState: state = route.params[RouteParams.NEXT_STATES][0]\n .nextState as state;\n const [showAlert, setShowAlert] = useState(false);\n const [sResponse, setResponse] = useState<any>();\n\n const submitOutput = useCallback(\n async (etOutput: any) => {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n etOutput,\n etOutput.success,\n getEntityCodeByET(currentState.taskId),\n currentState.taskId,\n baseETProps,\n false\n );\n },\n [baseETProps, currentState.taskId, navigation, route]\n );\n\n if (currentState.taskId === ExecutionTaskID.INIT_PAYMENT) {\n return (\n <View style={{ flex: 1 }}>\n <InitPaymentET\n {...route.params[RouteParams.NEXT_STATES][0].nextState.data.input}\n navigation={navigation}\n taskMeta={JSON.parse(\n route.params[RouteParams.NEXT_STATES][0].nextState.data.taskMeta ||\n '{}'\n )}\n onSubmitET={async (etOutput) => {\n if (etOutput.success) {\n await submitOutput(etOutput);\n } else {\n setResponse((_prevState: any) => {\n setShowAlert(true);\n return etOutput;\n });\n }\n }}\n />\n <CancelOrderDialog\n visible={showAlert}\n onSubmit={async (value) => {\n if (value) {\n setShowAlert(false);\n await submitOutput(sResponse);\n } else {\n setShowAlert(false);\n }\n }}\n />\n </View>\n );\n } else if (currentState.taskId === ExecutionTaskID.PROCESS_PAYMENT) {\n let _input = route.params[RouteParams.NEXT_STATES][0].nextState.data.input;\n if (_input?.paymentMode === 'CASH') {\n useEffect(() => {\n let isMounted = true;\n (async () => {\n if (isMounted) {\n const baseData = await getBaseETResponse(\n EntityCode.PROCESS_PAYMENT,\n true,\n getEventCodeByET(\n ExecutionTaskID.PROCESS_PAYMENT,\n true,\n _input.applicableReasons?.success\n ),\n ''\n );\n _input = {\n paymentMode: _input.paymentMode,\n collectedAmount: _input.amount,\n transactionId: _input.transactionId,\n tenantTransactionId: _input.transactionId,\n ...baseData,\n };\n await submitOutput(_input);\n }\n })();\n return () => {\n isMounted = false;\n };\n }, []);\n return <></>;\n } else\n return (\n <View style={{ flex: 1 }}>\n <ProcessPaymentET\n {...route.params[RouteParams.NEXT_STATES][0].nextState.data.input}\n navigation={navigation}\n taskMeta={JSON.parse(\n route.params[RouteParams.NEXT_STATES][0].nextState.data\n .taskMeta || '{}'\n )}\n onSubmitET={async (etOutput) => {\n if (etOutput.success) {\n await submitOutput(etOutput);\n } else {\n setResponse((_prevState: any) => {\n setShowAlert(true);\n return etOutput;\n });\n }\n }}\n />\n <CancelOrderDialog\n visible={showAlert}\n onSubmit={async (value) => {\n if (value) {\n setShowAlert(false);\n await submitOutput(sResponse);\n } else {\n setShowAlert(false);\n }\n }}\n />\n </View>\n );\n } else {\n return (\n <CompletePaymentET\n {...route.params[RouteParams.NEXT_STATES][0].nextState.data.input}\n navigation={navigation}\n taskMeta={JSON.parse(\n route.params[RouteParams.NEXT_STATES][0].nextState.data.taskMeta ||\n '{}'\n )}\n onSubmitET={async (etOut) => {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n etOut,\n etOut.success,\n EntityCode.COMPLETE_PAYMENT,\n ExecutionTaskID.COMPLETE_PAYMENT,\n baseETProps,\n false\n );\n }}\n />\n );\n }\n};\n\nexport default withBaseDispatchScreen(PaymentScreen);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAGA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAJ,OAAA;AAKA,IAAAK,uBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,cAAA,GAAAR,OAAA;AAKA,IAAAS,kBAAA,GAAAP,sBAAA,CA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W,CAACC,WAAW,CAAC,CAAC,CAAC,CAAC,CAACE,SAAS,CAACsB,IAAI,CAACC,KAAK;MACjEhC,UAAU,EAAEA,UAAW;MACvBiC,QAAQ,EAAEC,IAAI,CAACC,KAAK,CAClBlC,KAAK,CAACI,MAAM,CAACC,wBAAW,CAACC,WAAW,CAAC,CAAC,CAAC,CAAC,CAACE,SAAS,CAACsB,IAAI,CAACE,QAAQ,IAC9D,IAAI,CACN;MACFG,UAAU,EAAE,MAAOuB,KAAK,IAAK;QAC3B,MAAMzC,+BAAsB,CAACC,WAAW,EAAE,CAACC,kBAAkB,CAC3DpB,UAAU,EACVC,KAAK,EACL0D,KAAK,EACLA,KAAK,CAACtC,OAAO,EACb4B,oBAAU,CAACW,gBAAgB,EAC3BpC,yBAAe,CAACoC,gBAAgB,EAChC1D,WAAW,EACX,KAAK,CACN;MACH;IAAE,GACF;EAEN;AACF,CAAC;AAAC,IAAA2D,QAAA,GAEa,IAAAC,+BAAsB,EAAChE,aAAa,CAAC;AAAAiE,OAAA,CAAA9F,OAAA,GAAA4F,QAAA"}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_WithBaseDispatchScreen","_interopRequireDefault","_ETConfig","_ExecutionTasksIndex","_DispatchStateContainer","_RouteParams","_reactNative","_ExecTaskUtils","_CancelOrderDialog","_EventCodeContainer","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","PaymentScreen","_ref","navigation","route","baseETProps","nextState","params","RouteParams","NEXT_STATES","taskMeta","mergedObjectiveId","input","wfMeta","getDataFromNextState","useEffect","onTaskStart","ROOT_META_DATA","customEventsData","currentState","showAlert","setShowAlert","useState","sResponse","setResponse","taskId","submitOutput","useCallback","etOutput","DispatchStateContainer","getInstance","navigateToNextTask","success","getEntityCodeByET","ExecutionTaskID","INIT_PAYMENT","createElement","View","style","flex","InitPaymentET","onSubmitET","_prevState","visible","onSubmit","value","PROCESS_PAYMENT","_input2","_input","paymentMode","isMounted","_input$applicableReas","baseData","getBaseETResponse","EntityCode","getEventCodeByET","applicableReasons","collectedAmount","amount","transactionId","tenantTransactionId","Fragment","ProcessPaymentET","CompletePaymentET","etOut","COMPLETE_PAYMENT","_default","withBaseDispatchScreen","exports"],"sources":["PaymentScreen.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport withBaseDispatchScreen from './WithBaseDispatchScreen';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';\nimport {\n CompletePaymentET,\n InitPaymentET,\n ProcessPaymentET,\n} from '../../components/executiontasks/ExecutionTasksIndex';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\nimport { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';\nimport { View } from 'react-native';\nimport {\n getBaseETResponse,\n getEntityCodeByET,\n onTaskStart,\n} from '../../utils/ExecTaskUtils';\nimport CancelOrderDialog from '../../components/widgets/CancelOrderDialog';\nimport { getEventCodeByET } from '../../manager/dispatchCodes/EventCodeContainer';\nimport { useEffect } from 'react';\nimport { IDispatch } from '@os1-platform/platform-coreos-execution-engine-sdk';\n\nconst PaymentScreen = ({\n navigation,\n route,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n const nextState = route.params[RouteParams.NEXT_STATES];\n const { taskMeta, mergedObjectiveId, input, wfMeta } =\n getDataFromNextState(nextState);\n\n useEffect(() => {\n onTaskStart(\n route.params[RouteParams.NEXT_STATES],\n route.params[RouteParams.ROOT_META_DATA].customEventsData\n );\n }, []);\n let currentState = route.params[\n RouteParams.NEXT_STATES\n ] as IDispatch.IExecutionTaskQueryResponse;\n const [showAlert, setShowAlert] = useState(false);\n const [sResponse, setResponse] = useState<any>();\n\n const taskId = currentState.taskId as ExecutionTaskID;\n\n const submitOutput = useCallback(\n async (etOutput: any) => {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n etOutput,\n etOutput.success,\n getEntityCodeByET(currentState.taskId),\n taskId,\n baseETProps,\n false\n );\n },\n [baseETProps, currentState.taskId, navigation, route]\n );\n\n if (currentState.taskId === ExecutionTaskID.INIT_PAYMENT) {\n return (\n <View style={{ flex: 1 }}>\n <InitPaymentET\n {...input}\n navigation={navigation}\n taskMeta={taskMeta}\n mergedObjectiveId={mergedObjectiveId}\n onSubmitET={async (etOutput) => {\n if (etOutput.success) {\n await submitOutput(etOutput);\n } else {\n setResponse((_prevState: any) => {\n setShowAlert(true);\n return etOutput;\n });\n }\n }}\n />\n <CancelOrderDialog\n visible={showAlert}\n onSubmit={async (value) => {\n if (value) {\n setShowAlert(false);\n await submitOutput(sResponse);\n } else {\n setShowAlert(false);\n }\n }}\n />\n </View>\n );\n } else if (currentState.taskId === ExecutionTaskID.PROCESS_PAYMENT) {\n let _input = input;\n if (_input?.paymentMode === 'CASH') {\n useEffect(() => {\n let isMounted = true;\n (async () => {\n if (isMounted) {\n const baseData = await getBaseETResponse(\n EntityCode.PROCESS_PAYMENT,\n true,\n getEventCodeByET(\n ExecutionTaskID.PROCESS_PAYMENT,\n true,\n _input.applicableReasons?.success\n ),\n '',\n mergedObjectiveId,\n ExecutionTaskID.PROCESS_PAYMENT\n );\n _input = {\n paymentMode: _input.paymentMode,\n collectedAmount: _input.amount,\n transactionId: _input.transactionId,\n tenantTransactionId: _input.transactionId,\n ...baseData,\n };\n await submitOutput(_input);\n }\n })();\n return () => {\n isMounted = false;\n };\n }, []);\n return <></>;\n } else\n return (\n <View style={{ flex: 1 }}>\n <ProcessPaymentET\n {...input}\n navigation={navigation}\n mergedObjectiveId={mergedObjectiveId}\n taskMeta={taskMeta}\n onSubmitET={async (etOutput) => {\n if (etOutput.success) {\n await submitOutput(etOutput);\n } else {\n setResponse((_prevState: any) => {\n setShowAlert(true);\n return etOutput;\n });\n }\n }}\n />\n <CancelOrderDialog\n visible={showAlert}\n onSubmit={async (value) => {\n if (value) {\n setShowAlert(false);\n await submitOutput(sResponse);\n } else {\n setShowAlert(false);\n }\n }}\n />\n </View>\n );\n } else {\n return (\n <CompletePaymentET\n {...input}\n navigation={navigation}\n taskMeta={taskMeta}\n mergedObjectiveId={mergedObjectiveId}\n onSubmitET={async (etOut) => {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n etOut,\n etOut.success,\n EntityCode.COMPLETE_PAYMENT,\n ExecutionTaskID.COMPLETE_PAYMENT,\n baseETProps,\n false\n );\n }}\n />\n );\n }\n};\n\nexport default withBaseDispatchScreen(PaymentScreen);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAJ,OAAA;AAKA,IAAAK,uBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,cAAA,GAAAR,OAAA;AAKA,IAAAS,kBAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,mBAAA,GAAAV,OAAA;AAAkF,SAAAE,uBAAAS,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAhB,wBAAAY,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IAAAA,GA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YAAY,CAACE,QAAQ,CAAC;QAC9B,CAAC,MAAM;UACLJ,WAAW,CAAEkB,UAAe,IAAK;YAC/BrB,YAAY,CAAC,IAAI,CAAC;YAClB,OAAOO,QAAQ;UACjB,CAAC,CAAC;QACJ;MACF;IAAE,EACH,CAAC,eACFvE,MAAA,CAAAe,OAAA,CAAAgE,aAAA,CAACpE,kBAAA,CAAAI,OAAiB;MAChBuE,OAAO,EAAEvB,SAAU;MACnBwB,QAAQ,EAAE,MAAOC,KAAK,IAAK;QACzB,IAAIA,KAAK,EAAE;UACTxB,YAAY,CAAC,KAAK,CAAC;UACnB,MAAMK,YAAY,CAACH,SAAS,CAAC;QAC/B,CAAC,MAAM;UACLF,YAAY,CAAC,KAAK,CAAC;QACrB;MACF;IAAE,CACH,CACG,CAAC;EAEb,CAAC,MAAM;IACL,oBACEhE,MAAA,CAAAe,OAAA,CAAAgE,aAAA,CAACzE,oBAAA,CAAAoG,iBAAiB,EAAAvE,QAAA,KACZoB,KAAK;MACTT,UAAU,EAAEA,UAAW;MACvBO,QAAQ,EAAEA,QAAS;MACnBC,iBAAiB,EAAEA,iBAAkB;MACrC8B,UAAU,EAAE,MAAOuB,KAAK,IAAK;QAC3B,MAAMnC,+BAAsB,CAACC,WAAW,CAAC,CAAC,CAACC,kBAAkB,CAC3D5B,UAAU,EACVC,KAAK,EACL4D,KAAK,EACLA,KAAK,CAAChC,OAAO,EACbsB,oBAAU,CAACW,gBAAgB,EAC3B/B,yBAAe,CAAC+B,gBAAgB,EAChC5D,WAAW,EACX,KACF,CAAC;MACH;IAAE,EACH,CAAC;EAEN;AACF,CAAC;AAAC,IAAA6D,QAAA,GAEa,IAAAC,+BAAsB,EAAClE,aAAa,CAAC;AAAAmE,OAAA,CAAAhG,OAAA,GAAA8F,QAAA"}
|
|
@@ -11,29 +11,55 @@ var _DispatchStateContainer = _interopRequireDefault(require("../../manager/disp
|
|
|
11
11
|
var _SLPickupET = _interopRequireDefault(require("../../components/executiontasks/pickup/SLPickupET"));
|
|
12
12
|
var _RouteParams = require("../uiConfig/RouteParams");
|
|
13
13
|
var _ExecTaskUtils = require("../../utils/ExecTaskUtils");
|
|
14
|
+
var _platformCoreosExecutionEngineSdk = require("@os1-platform/platform-coreos-execution-engine-sdk");
|
|
14
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
16
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
17
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
18
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
18
19
|
const PickupScreen = _ref => {
|
|
19
|
-
var _route$params$RoutePa, _route$params$RoutePa2;
|
|
20
20
|
let {
|
|
21
21
|
route,
|
|
22
22
|
navigation,
|
|
23
23
|
baseETProps
|
|
24
24
|
} = _ref;
|
|
25
|
+
const nextState = route.params[_RouteParams.RouteParams.NEXT_STATES];
|
|
26
|
+
const {
|
|
27
|
+
taskMeta,
|
|
28
|
+
mergedObjectiveId,
|
|
29
|
+
input,
|
|
30
|
+
wfMeta
|
|
31
|
+
} = (0, _RouteParams.getDataFromNextState)(nextState);
|
|
32
|
+
const [pickupCount, setPickupCount] = (0, _react.useState)(0);
|
|
33
|
+
const [items, setItems] = (0, _react.useState)([]);
|
|
34
|
+
const getMergedPickCount = async () => {
|
|
35
|
+
const count = await _platformCoreosExecutionEngineSdk.DispatchExecutor.getScannedShipmentsCount(mergedObjectiveId);
|
|
36
|
+
setPickupCount(count.totalCount);
|
|
37
|
+
};
|
|
25
38
|
(0, _react.useEffect)(() => {
|
|
26
|
-
(0, _ExecTaskUtils.onTaskStart)(route.params[_RouteParams.RouteParams.
|
|
39
|
+
(0, _ExecTaskUtils.onTaskStart)(nextState, route.params[_RouteParams.RouteParams.ROOT_META_DATA].customEventsData);
|
|
40
|
+
getMergedPickCount();
|
|
27
41
|
}, []);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
42
|
+
(0, _react.useEffect)(() => {
|
|
43
|
+
if (pickupCount === 1) {
|
|
44
|
+
setItems(input.items);
|
|
45
|
+
}
|
|
46
|
+
}, [pickupCount]);
|
|
47
|
+
const message = input === null || input === void 0 ? void 0 : input.message;
|
|
48
|
+
|
|
49
|
+
// OLD CODE
|
|
50
|
+
// const length = route.params[RouteParams.NEXT_STATES].length;
|
|
51
|
+
// const items =
|
|
52
|
+
// length === 1
|
|
53
|
+
// ? route.params[RouteParams.NEXT_STATES][0].nextState.data.input.items
|
|
54
|
+
// : [];
|
|
55
|
+
|
|
56
|
+
return /*#__PURE__*/_react.default.createElement(_SLPickupET.default, _extends({}, input, {
|
|
57
|
+
mergedObjectiveId: mergedObjectiveId,
|
|
32
58
|
message: message,
|
|
33
59
|
items: items,
|
|
34
|
-
pickupCount:
|
|
60
|
+
pickupCount: pickupCount,
|
|
35
61
|
navigation: navigation,
|
|
36
|
-
taskMeta:
|
|
62
|
+
taskMeta: taskMeta,
|
|
37
63
|
onSubmitET: async pickupOutput => {
|
|
38
64
|
await _DispatchStateContainer.default.getInstance().navigateToNextTask(navigation, route, pickupOutput, pickupOutput.success, _ETConfig.EntityCode.PICKUP, _ETConfig.ExecutionTaskID.PICKUP, baseETProps, false);
|
|
39
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_WithBaseDispatchScreen","_interopRequireDefault","_ETConfig","_DispatchStateContainer","_SLPickupET","_RouteParams","_ExecTaskUtils","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","PickupScreen","_ref","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_WithBaseDispatchScreen","_interopRequireDefault","_ETConfig","_DispatchStateContainer","_SLPickupET","_RouteParams","_ExecTaskUtils","_platformCoreosExecutionEngineSdk","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","PickupScreen","_ref","route","navigation","baseETProps","nextState","params","RouteParams","NEXT_STATES","taskMeta","mergedObjectiveId","input","wfMeta","getDataFromNextState","pickupCount","setPickupCount","useState","items","setItems","getMergedPickCount","count","DispatchExecutor","getScannedShipmentsCount","totalCount","useEffect","onTaskStart","ROOT_META_DATA","customEventsData","message","createElement","onSubmitET","pickupOutput","DispatchStateContainer","getInstance","navigateToNextTask","success","EntityCode","PICKUP","ExecutionTaskID","_default","withBaseDispatchScreen","exports"],"sources":["PickupScreen.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport withBaseDispatchScreen from './WithBaseDispatchScreen';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\nimport SLPickupET from '../../components/executiontasks/pickup/SLPickupET';\nimport { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';\nimport { onTaskStart } from '../../utils/ExecTaskUtils';\n\nimport { DispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';\n\nconst PickupScreen = ({\n route,\n navigation,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n const nextState = route.params[RouteParams.NEXT_STATES];\n const { taskMeta, mergedObjectiveId, input, wfMeta } =\n getDataFromNextState(nextState);\n\n const [pickupCount, setPickupCount] = useState(0);\n const [items, setItems] = useState([]);\n\n const getMergedPickCount = async () => {\n const count = await DispatchExecutor.getScannedShipmentsCount(\n mergedObjectiveId\n );\n setPickupCount(count.totalCount);\n };\n useEffect(() => {\n onTaskStart(\n nextState,\n route.params[RouteParams.ROOT_META_DATA].customEventsData\n );\n getMergedPickCount();\n }, []);\n\n useEffect(() => {\n if (pickupCount === 1) {\n setItems(input.items);\n }\n }, [pickupCount]);\n\n const message = input?.message;\n\n // OLD CODE\n // const length = route.params[RouteParams.NEXT_STATES].length;\n // const items =\n // length === 1\n // ? route.params[RouteParams.NEXT_STATES][0].nextState.data.input.items\n // : [];\n\n return (\n <SLPickupET\n {...input}\n mergedObjectiveId={mergedObjectiveId}\n message={message}\n items={items}\n pickupCount={pickupCount}\n navigation={navigation}\n taskMeta={taskMeta}\n onSubmitET={async (pickupOutput) => {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n pickupOutput,\n pickupOutput.success,\n EntityCode.PICKUP,\n ExecutionTaskID.PICKUP,\n baseETProps,\n false\n );\n }}\n />\n );\n};\nexport default withBaseDispatchScreen(PickupScreen);\n"],"mappings":";;;;;;AAAA,IA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AAAoE,QAAA"}
|
|
@@ -10,256 +10,109 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _DispatchStateContainer = _interopRequireDefault(require("../../manager/dispatch/DispatchStateContainer"));
|
|
11
11
|
var _ETConfig = require("../../models/execTasks/ETConfig");
|
|
12
12
|
var _ScanET = _interopRequireDefault(require("../../components/executiontasks/scan/ScanET"));
|
|
13
|
-
var _interfaces = require("../../components/executiontasks/scan/interfaces");
|
|
14
13
|
var _ExecTaskUtils = require("../../utils/ExecTaskUtils");
|
|
15
|
-
var
|
|
16
|
-
var
|
|
14
|
+
var _platformCoreosExecutionEngineSdk = require("@os1-platform/platform-coreos-execution-engine-sdk");
|
|
15
|
+
var _storage = _interopRequireDefault(require("../../utils/storage"));
|
|
16
|
+
var _constants = require("../../manager/syncmanager/constants");
|
|
17
17
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
20
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
|
-
/**
|
|
22
|
-
* wfMeta?.enableMultiObjectiveFlow:
|
|
23
|
-
* if true: then use scan additionalMultiConfig: ALL_OR_NONE or SUBSET_OF_LIST, and based on this:
|
|
24
|
-
* if ALL_OR_NONE: Put validation to allow user to move to next ET(proceed btn enable) only if all the shipments are scanned
|
|
25
|
-
* if SUBSET_OF_LIST: Enable user to move to next even if one shipment is scanned.
|
|
26
|
-
* if false: then only one objective will be available and basic scan validation will be implemented
|
|
27
|
-
* if this key is undefined: then the implementation with obj merge w/o additionalMultiConfig and scan based validation can be implemented
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
21
|
const ScanScreen = _ref => {
|
|
31
22
|
let {
|
|
32
23
|
route,
|
|
33
24
|
navigation,
|
|
34
25
|
baseETProps
|
|
35
26
|
} = _ref;
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
27
|
+
const nextState = route.params[_RouteParams.RouteParams.NEXT_STATES];
|
|
28
|
+
const {
|
|
29
|
+
taskMeta,
|
|
30
|
+
mergedObjectiveId,
|
|
31
|
+
input,
|
|
32
|
+
wfMeta,
|
|
33
|
+
taskName
|
|
34
|
+
} = (0, _RouteParams.getDataFromNextState)(nextState);
|
|
42
35
|
let _route = JSON.parse(JSON.stringify(route));
|
|
43
|
-
const firstInput =
|
|
44
|
-
const wfMeta = JSON.parse(route.params[_RouteParams.RouteParams.NEXT_STATES][0].nextState.data.wfMeta); //contains enableMultiObjectiveFlow
|
|
36
|
+
const firstInput = input;
|
|
45
37
|
const [inputs, setInputs] = (0, _react.useState)({
|
|
46
38
|
...firstInput,
|
|
47
|
-
wfMeta
|
|
39
|
+
wfMeta,
|
|
40
|
+
mergedObjectiveId
|
|
48
41
|
});
|
|
49
|
-
/**
|
|
50
|
-
* Usage of keys corresponding to meta:
|
|
51
|
-
* Link for merge implementation: https://docs.google.com/document/d/18l-aAJgn0GLqyTQTI2wKm9YsJ4wyOUy_erDjcXDmS24/edit#heading=h.crtibhxlagpl
|
|
52
|
-
* singleModeCount: Used in case of mode=Single, will contain the count of objectives(merged or single), length of scanned shipments should be equivalent to singleModeCount.
|
|
53
|
-
* mergedData: Contains data as per the output format of scan ET in addition with jobId. jobId here is benefical in case where objectives are merged and the output is to be sent as per each jobId.
|
|
54
|
-
* blindData: Contains data for handling the blind pickup cases and its validation, with and w/o maxScanCount.
|
|
55
|
-
* {key:jobId for blind data and shipmentId for mergedData}
|
|
56
|
-
*/
|
|
57
42
|
(0, _react.useEffect)(() => {
|
|
58
43
|
(async () => {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
let
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
* For scanMode SINGLE, validation will be based on count of no. of objectives(whether merged or not)
|
|
68
|
-
*/
|
|
69
|
-
if ((firstInput === null || firstInput === void 0 ? void 0 : firstInput.scanMode) === 'SINGLE' || wfMeta !== null && wfMeta !== void 0 && wfMeta.enableMultiObjectiveFlow) {
|
|
70
|
-
_meta.singleModeCount = route.params[_RouteParams.RouteParams.NEXT_STATES].length;
|
|
71
|
-
}
|
|
72
|
-
let _previousDataExists = false;
|
|
73
|
-
let _taskOutput = [];
|
|
74
|
-
for (let nextStateData of route.params[_RouteParams.RouteParams.NEXT_STATES]) {
|
|
75
|
-
const _jobId = nextStateData.jobId;
|
|
76
|
-
const _input = nextStateData.nextState.data.input;
|
|
77
|
-
/**
|
|
78
|
-
* Combining all the required data, incase the objectives are merged
|
|
79
|
-
*/
|
|
80
|
-
if (_input.scanCountLimit) {
|
|
81
|
-
_scanCountLimit += _input.scanCountLimit;
|
|
82
|
-
}
|
|
83
|
-
if (_input.validation.selectedIndex == 0 && _input.validation.logic) {
|
|
84
|
-
_logic.push(..._input.validation.logic);
|
|
85
|
-
for (let _id of _input.validation.logic) {
|
|
86
|
-
_meta.mergedData.set(_id, {
|
|
87
|
-
value: _id,
|
|
88
|
-
jobId: _jobId
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
if (_input.scanMode == 'SINGLE' || wfMeta !== null && wfMeta !== void 0 && wfMeta.enableMultiObjectiveFlow || _input.validation.selectedIndex !== 0) {
|
|
93
|
-
_meta.blindData.set(_jobId, {
|
|
94
|
-
maxCount: _input.scanCountLimit || 0,
|
|
95
|
-
scannedCount: 0
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
//NEW CODE
|
|
100
|
-
_taskOutput.push({
|
|
101
|
-
taskName: nextStateData.nextState.name,
|
|
102
|
-
jobId: nextStateData.jobId,
|
|
103
|
-
objectiveRef: nextStateData.objRef
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
//OLD CODE
|
|
107
|
-
/* if (_persistData) {
|
|
108
|
-
const previousOutput =
|
|
109
|
-
await executionInstance.getTaskOutputByInstanceId(
|
|
110
|
-
nextStateData.nextState.name,
|
|
111
|
-
nextStateData.nextState.workflowInstanceId
|
|
112
|
-
);
|
|
113
|
-
if (Object.keys(previousOutput).length) {
|
|
114
|
-
_previousDataExists = true;
|
|
115
|
-
if (previousOutput.scans?.length === 1) {
|
|
116
|
-
const _scanValue = previousOutput.scans[0].value;
|
|
117
|
-
_meta.mergedData.set(_scanValue, {
|
|
118
|
-
value: _scanValue,
|
|
119
|
-
jobId: _jobId,
|
|
120
|
-
validated: previousOutput.scans[0].validated,
|
|
121
|
-
timestamp: previousOutput.scans[0].timestamp,
|
|
122
|
-
eventCode: previousOutput.eventCode,
|
|
123
|
-
reasonCode: previousOutput.reasonCode,
|
|
124
|
-
success: previousOutput.success,
|
|
125
|
-
scanStatus: previousOutput.scans[0].validated
|
|
126
|
-
? SCAN_STATUS.SCANNED
|
|
127
|
-
: SCAN_STATUS.FAILED,
|
|
128
|
-
});
|
|
129
|
-
} else {
|
|
130
|
-
for (let _scan of previousOutput.scans) {
|
|
131
|
-
_meta.mergedData.set(_scan.value, {
|
|
132
|
-
value: _scan.value,
|
|
133
|
-
jobId: _jobId,
|
|
134
|
-
validated: _scan.validated,
|
|
135
|
-
timestamp: _scan.timestamp,
|
|
136
|
-
eventCode: previousOutput.eventCode,
|
|
137
|
-
reasonCode: previousOutput.reasonCode,
|
|
138
|
-
success: previousOutput.success,
|
|
139
|
-
scanStatus: _scan.validated
|
|
140
|
-
? SCAN_STATUS.SCANNED
|
|
141
|
-
: SCAN_STATUS.FAILED,
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
} */
|
|
147
|
-
}
|
|
44
|
+
// Setup mergedIds in Shared Prefs
|
|
45
|
+
const prefixedMergedObjectiveId = route.params[_RouteParams.RouteParams.ROOT_META_DATA].prefixedMergedObjectiveId;
|
|
46
|
+
let storage = _storage.default.getInstance();
|
|
47
|
+
const _mergedIdsOut = await storage.getSharedItem(_constants.SCAN_MERGED_OBJ_ID_OUTPUT);
|
|
48
|
+
const mergedIdsOutput = JSON.parse(_mergedIdsOut || '{}');
|
|
49
|
+
if (_mergedIdsOut) {
|
|
50
|
+
const mergedIds = mergedIdsOutput[prefixedMergedObjectiveId];
|
|
51
|
+
const runningMergedIds = mergedObjectiveId;
|
|
148
52
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
var _previousOutput$scans;
|
|
158
|
-
if (((_previousOutput$scans = previousOutput.scans) === null || _previousOutput$scans === void 0 ? void 0 : _previousOutput$scans.length) === 1) {
|
|
159
|
-
const _scanValue = previousOutput.scans[0].value;
|
|
160
|
-
_meta.mergedData.set(_scanValue, {
|
|
161
|
-
value: _scanValue,
|
|
162
|
-
jobId: _state.jobId,
|
|
163
|
-
validated: previousOutput.scans[0].validated,
|
|
164
|
-
timestamp: previousOutput.scans[0].timestamp,
|
|
165
|
-
eventCode: previousOutput.eventCode,
|
|
166
|
-
reasonCode: previousOutput.reasonCode,
|
|
167
|
-
success: previousOutput.success,
|
|
168
|
-
scanStatus: previousOutput.scans[0].validated ? _interfaces.SCAN_STATUS.SCANNED : _interfaces.SCAN_STATUS.FAILED
|
|
169
|
-
});
|
|
170
|
-
} else {
|
|
171
|
-
for (let _scan of previousOutput.scans) {
|
|
172
|
-
_meta.mergedData.set(_scan.value, {
|
|
173
|
-
value: _scan.value,
|
|
174
|
-
jobId: _state.jobId,
|
|
175
|
-
validated: _scan.validated,
|
|
176
|
-
timestamp: _scan.timestamp,
|
|
177
|
-
eventCode: previousOutput.eventCode,
|
|
178
|
-
reasonCode: previousOutput.reasonCode,
|
|
179
|
-
success: previousOutput.success,
|
|
180
|
-
scanStatus: _scan.validated ? _interfaces.SCAN_STATUS.SCANNED : _interfaces.SCAN_STATUS.FAILED
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
}
|
|
53
|
+
// CHECK IF PREFIXED ID IS PRESENT IN SUCCESS | FAILURE;
|
|
54
|
+
if (mergedIds) {
|
|
55
|
+
mergedObjectiveId.forEach(ids => {
|
|
56
|
+
const isDelivered = mergedIds.success.indexOf(ids) !== -1;
|
|
57
|
+
const isUnDelivered = mergedIds.failure.indexOf(ids) !== -1;
|
|
58
|
+
const isAlreadyPending = mergedIds.pending.indexOf(ids) !== -1;
|
|
59
|
+
if (!isDelivered && !isUnDelivered && !isAlreadyPending) {
|
|
60
|
+
mergedIds.pending.push(ids);
|
|
184
61
|
}
|
|
185
62
|
});
|
|
63
|
+
await storage.setSharedItem(_constants.SCAN_MERGED_OBJ_ID_OUTPUT, JSON.stringify({
|
|
64
|
+
...mergedIdsOutput,
|
|
65
|
+
[prefixedMergedObjectiveId]: mergedIds
|
|
66
|
+
}));
|
|
67
|
+
} else {
|
|
68
|
+
const mergedIds = {
|
|
69
|
+
success: [],
|
|
70
|
+
failure: [],
|
|
71
|
+
pending: []
|
|
72
|
+
};
|
|
73
|
+
mergedObjectiveId.forEach(ids => {
|
|
74
|
+
mergedIds.pending.push(ids);
|
|
75
|
+
});
|
|
76
|
+
await storage.setSharedItem(_constants.SCAN_MERGED_OBJ_ID_OUTPUT, JSON.stringify({
|
|
77
|
+
...mergedIdsOutput,
|
|
78
|
+
[prefixedMergedObjectiveId]: mergedIds
|
|
79
|
+
}));
|
|
186
80
|
}
|
|
81
|
+
} else {
|
|
82
|
+
const mergedIds = {
|
|
83
|
+
success: [],
|
|
84
|
+
failure: [],
|
|
85
|
+
pending: []
|
|
86
|
+
};
|
|
87
|
+
mergedObjectiveId.forEach(ids => {
|
|
88
|
+
mergedIds.pending.push(ids);
|
|
89
|
+
});
|
|
90
|
+
await storage.setSharedItem(_constants.SCAN_MERGED_OBJ_ID_OUTPUT, JSON.stringify({
|
|
91
|
+
...mergedIdsOutput,
|
|
92
|
+
[prefixedMergedObjectiveId]: mergedIds
|
|
93
|
+
}));
|
|
187
94
|
}
|
|
188
|
-
(0, _ExecTaskUtils.onTaskStart)(route.params[_RouteParams.RouteParams.NEXT_STATES],
|
|
189
|
-
|
|
95
|
+
(0, _ExecTaskUtils.onTaskStart)(route.params[_RouteParams.RouteParams.NEXT_STATES], route.params[_RouteParams.RouteParams.ROOT_META_DATA].customEventsData);
|
|
96
|
+
const result = await _platformCoreosExecutionEngineSdk.DispatchExecutor.getScannedShipmentsCount(mergedObjectiveId // need to define and pass to props
|
|
97
|
+
);
|
|
98
|
+
|
|
190
99
|
setInputs(prev => ({
|
|
191
100
|
...prev,
|
|
192
|
-
scanCountLimit:
|
|
193
|
-
validation: {
|
|
194
|
-
...prev.validation,
|
|
195
|
-
logic: firstInput.validation.selectedIndex == 0 ? _logic : prev.validation.logic
|
|
196
|
-
},
|
|
197
|
-
meta: _meta
|
|
101
|
+
scanCountLimit: result ? result.totalCount : 0
|
|
198
102
|
}));
|
|
199
103
|
})();
|
|
200
104
|
}, []);
|
|
201
105
|
return /*#__PURE__*/_react.default.createElement(_ScanET.default, _extends({}, inputs, {
|
|
202
|
-
|
|
106
|
+
scanToMerge: inputs.scanToMerge || false,
|
|
107
|
+
mergedObjectiveId: mergedObjectiveId,
|
|
108
|
+
taskMeta: taskMeta,
|
|
203
109
|
navigation: navigation,
|
|
110
|
+
route: route,
|
|
111
|
+
taskName: taskName,
|
|
112
|
+
showProgress: baseETProps.showProgress,
|
|
204
113
|
onSubmitET: async etOutput => {
|
|
205
|
-
var _route$params$RoutePa2;
|
|
206
114
|
let scanETOutput = etOutput;
|
|
207
|
-
|
|
208
|
-
if (wfMeta !== null && wfMeta !== void 0 && wfMeta.enableMultiObjectiveFlow) {
|
|
209
|
-
const routeArr = route.params[_RouteParams.RouteParams.NEXT_STATES];
|
|
210
|
-
if (successObjective.length && scanETOutput.baseResponse.success) {
|
|
211
|
-
for (let index = 0; index < routeArr.length; index++) {
|
|
212
|
-
if (!successObjective.includes(routeArr[index].jobId)) {
|
|
213
|
-
delete _route.params[_RouteParams.RouteParams.NEXT_STATES][index];
|
|
214
|
-
if (_route.params[_RouteParams.RouteParams.PENDING_STATES]) _route.params[_RouteParams.RouteParams.PENDING_STATES].push(routeArr[index]);else {
|
|
215
|
-
_route.params[_RouteParams.RouteParams.PENDING_STATES] = [routeArr[index]];
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
} else {
|
|
220
|
-
/**
|
|
221
|
-
* If all the objectives are failure but scanned, move pendingETData to etData
|
|
222
|
-
*/
|
|
223
|
-
if (scanETOutput.baseResponse.success && scanETOutput.pendingEtData) {
|
|
224
|
-
scanETOutput.etData = scanETOutput.pendingEtData;
|
|
225
|
-
delete scanETOutput.pendingEtData;
|
|
226
|
-
} else
|
|
227
|
-
/**
|
|
228
|
-
* If cancel or back is pressed and wf is to be marked as failed, mark all the objectives with
|
|
229
|
-
* default ERC in case of multi
|
|
230
|
-
*/
|
|
231
|
-
for (let index = 0; index < routeArr.length; index++) {
|
|
232
|
-
const _jobId = routeArr[index].jobId;
|
|
233
|
-
if (!scanETOutput.etData || !scanETOutput.etData[_jobId] || !scanETOutput.etData[_jobId].baseResponse) {
|
|
234
|
-
if (scanETOutput.pendingEtData) {
|
|
235
|
-
scanETOutput.etData = {
|
|
236
|
-
...scanETOutput.etData,
|
|
237
|
-
...scanETOutput.pendingEtData
|
|
238
|
-
};
|
|
239
|
-
delete scanETOutput.pendingEtData;
|
|
240
|
-
}
|
|
241
|
-
if (!scanETOutput.etData[_jobId]) {
|
|
242
|
-
scanETOutput.etData[_jobId] = {
|
|
243
|
-
baseResponse: {}
|
|
244
|
-
};
|
|
245
|
-
} else if (!scanETOutput.etData[_jobId].baseResponse) {
|
|
246
|
-
scanETOutput.etData[_jobId]['baseResponse'] = {};
|
|
247
|
-
}
|
|
248
|
-
scanETOutput.etData[_jobId]['baseResponse'] = {
|
|
249
|
-
...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.SCAN, false, firstInput.defaultERC.eventCode, firstInput.defaultERC.reasonCode))
|
|
250
|
-
};
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
_route.params[_RouteParams.RouteParams.NEXT_STATES] = _route.params[_RouteParams.RouteParams.NEXT_STATES].filter(val => val);
|
|
255
|
-
}
|
|
256
|
-
if ((_route$params$RoutePa2 = _route.params[_RouteParams.RouteParams.PENDING_STATES]) !== null && _route$params$RoutePa2 !== void 0 && _route$params$RoutePa2.length) {
|
|
257
|
-
const _scanETPendingOutput = JSON.parse(JSON.stringify(scanETOutput));
|
|
258
|
-
delete _scanETPendingOutput.etData;
|
|
259
|
-
_route.params[_RouteParams.RouteParams.PENDING_STATES_OUTPUT] = _scanETPendingOutput;
|
|
260
|
-
await _DispatchStateContainer.default.getInstance().sendPendingETOutput(_scanETPendingOutput, _route.params, true);
|
|
261
|
-
}
|
|
262
|
-
await _DispatchStateContainer.default.getInstance().navigateToNextTask(navigation, _route, scanETOutput, scanETOutput.baseResponse.success, _ETConfig.EntityCode.SCAN, _ETConfig.ExecutionTaskID.SCAN, baseETProps, false, true);
|
|
115
|
+
await _DispatchStateContainer.default.getInstance().navigateToNextTask(navigation, _route, scanETOutput, true, _ETConfig.EntityCode.SCAN, _ETConfig.ExecutionTaskID.SCAN, baseETProps, false, true);
|
|
263
116
|
}
|
|
264
117
|
}));
|
|
265
118
|
};
|