@os1-platform/dispatch-mobile 1.0.8 → 1.3.11
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 +116 -48
- package/android/.gradle/6.8/fileChanges/last-build.bin +0 -0
- package/android/.gradle/6.8/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/6.8/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/configuration-cache/gc.properties +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/gradle.xml +13 -0
- package/android/.idea/misc.xml +4 -0
- package/android/.idea/vcs.xml +6 -0
- package/android/.idea/workspace.xml +131 -0
- package/android/gradle.properties +1 -1
- package/android/local.properties +8 -0
- package/android/src/main/AndroidManifest.xml +0 -1
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +46 -39
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js +14 -24
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +142 -23
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +64 -16
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +6 -16
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +68 -26
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +4 -13
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js +0 -2
- package/lib/commonjs/components/executiontasks/doodle/DoodleUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +61 -28
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +5 -19
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +62 -18
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +112 -28
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -26
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js +49 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +1 -16
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -10
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js +4 -13
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +0 -12
- 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 +7 -35
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +74 -49
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js +0 -4
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js +0 -2
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +64 -17
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +63 -24
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +71 -22
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js +5 -15
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +60 -19
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js +843 -0
- package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js +6 -0
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/constants.js +19 -0
- package/lib/commonjs/components/executiontasks/scan/constants.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/interfaces.js +29 -0
- package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js +103 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +74 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js +115 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ScanList.js +134 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/ScanList.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js +373 -0
- package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/scanner/CScanner.js +3 -21
- package/lib/commonjs/components/executiontasks/scanner/CScanner.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js +4 -9
- package/lib/commonjs/components/executiontasks/scanner/ScannerSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js +7 -36
- package/lib/commonjs/components/executiontasks/scanner/ScannerUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js +0 -5
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js +0 -9
- package/lib/commonjs/components/executiontasks/scanner/returns/DropDownUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -14
- package/lib/commonjs/components/executiontasks/scanner/returns/RTReasonSelection.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js +1 -40
- package/lib/commonjs/components/executiontasks/scanner/returns/RTScan.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -17
- package/lib/commonjs/components/executiontasks/scanner/returns/ReasonDropDown.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js +0 -28
- package/lib/commonjs/components/executiontasks/scanner/returns/ScanList.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +334 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js +14 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js +37 -0
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +59 -0
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js +147 -0
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -13
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -17
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +3 -18
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/commonjs/components/widgets/AlertDisplay.js +0 -5
- package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/commonjs/components/widgets/CancelOrderDialog.js +0 -12
- package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/IconButton.js +34 -0
- package/lib/commonjs/components/widgets/IconButton.js.map +1 -0
- package/lib/commonjs/components/widgets/ProgressDialog.js +0 -7
- package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/SnackBarCustom.js +38 -38
- package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/commonjs/components/widgets/SplitTextInput.js +93 -0
- package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -0
- package/lib/commonjs/components/widgets/Toaster.js +0 -2
- package/lib/commonjs/components/widgets/Toaster.js.map +1 -1
- package/lib/commonjs/config/DispatchSDKConfig.js +4 -5
- package/lib/commonjs/config/DispatchSDKConfig.js.map +1 -1
- package/lib/commonjs/constants/apiConstants.js +15 -0
- package/lib/commonjs/constants/apiConstants.js.map +1 -0
- package/lib/commonjs/constants/constants.js +7 -3
- package/lib/commonjs/constants/constants.js.map +1 -1
- package/lib/commonjs/constants/statuscode.js +3 -5
- package/lib/commonjs/constants/statuscode.js.map +1 -1
- package/lib/commonjs/errors/BaseError.js +3 -8
- package/lib/commonjs/errors/BaseError.js.map +1 -1
- package/lib/commonjs/errors/ErrorCodes.js +7 -6
- package/lib/commonjs/errors/ErrorCodes.js.map +1 -1
- package/lib/commonjs/events/EventDispatcher.js +27 -0
- package/lib/commonjs/events/EventDispatcher.js.map +1 -0
- package/lib/commonjs/events/EventListener.js +20 -0
- package/lib/commonjs/events/EventListener.js.map +1 -0
- package/lib/commonjs/events/constants.js +13 -0
- package/lib/commonjs/events/constants.js.map +1 -0
- package/lib/commonjs/events/index.js +11 -0
- package/lib/commonjs/events/index.js.map +1 -0
- package/lib/commonjs/events/interface.js +2 -0
- package/lib/commonjs/events/interface.js.map +1 -0
- package/lib/commonjs/index.js +9 -23
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +527 -177
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js +55 -4
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js +70 -0
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js +3 -29
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js +6 -20
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js +27 -0
- package/lib/commonjs/manager/jobRemoval/JobRemovalManager.js.map +1 -0
- package/lib/commonjs/manager/location/LocationManager.js +3 -20
- package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js +8 -36
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js +6 -17
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js +12 -46
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js +13 -7
- package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js +0 -2
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/database.js +28 -12
- package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +0 -19
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +3 -20
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +3 -52
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +59 -25
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +77 -90
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +27 -19
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/commonjs/models/DispatchModels.js +4 -5
- package/lib/commonjs/models/DispatchModels.js.map +1 -1
- package/lib/commonjs/models/ReasonCodes.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETConfig.js +28 -35
- package/lib/commonjs/models/execTasks/ETConfig.js.map +1 -1
- package/lib/commonjs/models/sdk.js +4 -5
- package/lib/commonjs/models/sdk.js.map +1 -1
- package/lib/commonjs/native/signature/SignatureCapture.js +3 -24
- package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
- package/lib/commonjs/network/GraphQLClient.js +7 -35
- package/lib/commonjs/network/GraphQLClient.js.map +1 -1
- package/lib/commonjs/network/NetworkClient.js +2 -13
- package/lib/commonjs/network/NetworkClient.js.map +1 -1
- package/lib/commonjs/network/NetworkUtils.js +10 -8
- package/lib/commonjs/network/NetworkUtils.js.map +1 -1
- package/lib/commonjs/network/Queries.js +0 -2
- package/lib/commonjs/network/Queries.js.map +1 -1
- package/lib/commonjs/network/client.js +6 -21
- package/lib/commonjs/network/client.js.map +1 -1
- package/lib/commonjs/res/strings.js.map +1 -1
- package/lib/commonjs/resources/Login.js +4 -15
- package/lib/commonjs/resources/Login.js.map +1 -1
- package/lib/commonjs/resources/network.js +3 -8
- package/lib/commonjs/resources/network.js.map +1 -1
- package/lib/commonjs/styles/SdkColors.js +7 -7
- package/lib/commonjs/styles/SdkColors.js.map +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +42 -18
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/commonjs/ui/screens/CancellationScreen.js +36 -27
- package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CaptureInputScreen.js +6 -15
- package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +0 -19
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +6 -15
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DisplayScreen.js +7 -12
- package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js +6 -16
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js +6 -18
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ETScreensIndex.js +14 -16
- package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/commonjs/ui/screens/FormsScreen.js +36 -15
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/GeofenceScreen.js +7 -13
- package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HttpRequestScreen.js +5 -10
- package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +27 -14
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentScreen.js +11 -23
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +9 -13
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/RTScanScreen.js +8 -27
- package/lib/commonjs/ui/screens/RTScanScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ScanScreen.js +268 -0
- package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +21 -30
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js +49 -0
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js +0 -10
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js +9 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/commonjs/utils/ApiUtils.js +115 -0
- package/lib/commonjs/utils/ApiUtils.js.map +1 -0
- package/lib/commonjs/utils/ExecTaskUtils.js +93 -31
- package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
- package/lib/commonjs/utils/Logger.js +10 -29
- package/lib/commonjs/utils/Logger.js.map +1 -1
- package/lib/commonjs/utils/NetworkUtil.js +3 -19
- package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
- package/lib/commonjs/utils/SdkUtils.js +2 -31
- package/lib/commonjs/utils/SdkUtils.js.map +1 -1
- package/lib/commonjs/utils/SyncManagerUtils.js +25 -40
- package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
- package/lib/commonjs/utils/fcm/FCM.js +35 -16
- package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
- package/lib/commonjs/utils/fcm/FcmUtils.js +50 -25
- package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/commonjs/utils/helper.js +0 -5
- package/lib/commonjs/utils/helper.js.map +1 -1
- package/lib/commonjs/utils/hooks/useTimer.js +44 -0
- package/lib/commonjs/utils/hooks/useTimer.js.map +1 -0
- package/lib/commonjs/utils/loginHelper.js +6 -18
- package/lib/commonjs/utils/loginHelper.js.map +1 -1
- package/lib/commonjs/utils/storage.js +53 -32
- package/lib/commonjs/utils/storage.js.map +1 -1
- package/lib/commonjs/utils/utils.js +8 -11
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/module/components/dispatch/DispatchExecNavigator.js +46 -28
- package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js +3 -1
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancelET.js +145 -19
- package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancellationSchema.js.map +1 -1
- package/lib/module/components/executiontasks/captureInput/CaptureText.js +66 -9
- package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/DeliverET.js +6 -7
- package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js +69 -16
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/display/DisplayModalET.js +4 -3
- package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/DoodleUtils.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js +64 -14
- package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/DropCashET.js +5 -6
- package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js +62 -8
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormGenerator.js +114 -14
- package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +3 -15
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js +39 -0
- package/lib/module/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -0
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +1 -5
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js +0 -3
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js +4 -2
- package/lib/module/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/module/components/executiontasks/httpRequest/HttpRequestET.js +0 -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 +7 -10
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +75 -35
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +64 -6
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +63 -11
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +71 -10
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/PickupET.js +5 -6
- package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/SLPickupET.js +61 -10
- package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanET.js +833 -0
- package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -0
- package/lib/module/components/executiontasks/scan/ScanSchema.js +2 -0
- package/lib/module/components/executiontasks/scan/ScanSchema.js.map +1 -0
- package/lib/module/components/executiontasks/scan/constants.js +7 -0
- package/lib/module/components/executiontasks/scan/constants.js.map +1 -0
- package/lib/module/components/executiontasks/scan/interfaces.js +21 -0
- package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js +94 -0
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +66 -0
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +105 -0
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -0
- package/lib/module/components/executiontasks/scan/sub_components/ScanList.js +124 -0
- package/lib/module/components/executiontasks/scan/sub_components/ScanList.js.map +1 -0
- package/lib/module/components/executiontasks/scan/utils.js +358 -0
- package/lib/module/components/executiontasks/scan/utils.js.map +1 -0
- package/lib/module/components/executiontasks/scanner/CScanner.js +3 -8
- package/lib/module/components/executiontasks/scanner/CScanner.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js +3 -3
- package/lib/module/components/executiontasks/scanner/ScannerSchema.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js +6 -18
- package/lib/module/components/executiontasks/scanner/ScannerUtils.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js +0 -2
- package/lib/module/components/executiontasks/scanner/returns/DropDownSelector.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js +0 -5
- package/lib/module/components/executiontasks/scanner/returns/DropDownUtils.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js +0 -3
- package/lib/module/components/executiontasks/scanner/returns/RTReasonSelection.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js +1 -19
- package/lib/module/components/executiontasks/scanner/returns/RTScan.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js +0 -7
- package/lib/module/components/executiontasks/scanner/returns/ReasonDropDown.js.map +1 -1
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js +0 -15
- package/lib/module/components/executiontasks/scanner/returns/ScanList.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +325 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js +8 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/constants.js +25 -0
- package/lib/module/components/executiontasks/validateOTP/constants.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js +49 -0
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -0
- package/lib/module/components/executiontasks/validateOTP/utils.js +133 -0
- package/lib/module/components/executiontasks/validateOTP/utils.js.map +1 -0
- package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js +0 -6
- package/lib/module/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -3
- package/lib/module/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js +4 -8
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/module/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/module/components/widgets/CancelOrderDialog.js +0 -2
- package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/module/components/widgets/IconButton.js +26 -0
- package/lib/module/components/widgets/IconButton.js.map +1 -0
- package/lib/module/components/widgets/ProgressDialog.js +0 -2
- package/lib/module/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/module/components/widgets/SnackBarCustom.js +36 -18
- package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/module/components/widgets/SplitTextInput.js +84 -0
- package/lib/module/components/widgets/SplitTextInput.js.map +1 -0
- package/lib/module/components/widgets/Toaster.js.map +1 -1
- package/lib/module/config/DispatchSDKConfig.js +3 -4
- package/lib/module/config/DispatchSDKConfig.js.map +1 -1
- package/lib/module/constants/apiConstants.js +7 -0
- package/lib/module/constants/apiConstants.js.map +1 -0
- package/lib/module/constants/constants.js +4 -2
- package/lib/module/constants/constants.js.map +1 -1
- package/lib/module/constants/statuscode.js +3 -5
- package/lib/module/constants/statuscode.js.map +1 -1
- package/lib/module/errors/BaseError.js +3 -6
- package/lib/module/errors/BaseError.js.map +1 -1
- package/lib/module/errors/ErrorCodes.js +5 -5
- package/lib/module/errors/ErrorCodes.js.map +1 -1
- package/lib/module/events/EventDispatcher.js +19 -0
- package/lib/module/events/EventDispatcher.js.map +1 -0
- package/lib/module/events/EventListener.js +13 -0
- package/lib/module/events/EventListener.js.map +1 -0
- package/lib/module/events/constants.js +6 -0
- package/lib/module/events/constants.js.map +1 -0
- package/lib/module/events/index.js +3 -0
- package/lib/module/events/index.js.map +1 -0
- package/lib/module/events/interface.js +2 -0
- package/lib/module/events/interface.js.map +1 -0
- package/lib/module/index.js +4 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/manager/dispatch/DispatchStateContainer.js +529 -151
- package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js +52 -2
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js +61 -0
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -0
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js +3 -16
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js +6 -14
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/module/manager/jobRemoval/JobRemovalManager.js +20 -0
- package/lib/module/manager/jobRemoval/JobRemovalManager.js.map +1 -0
- package/lib/module/manager/location/LocationManager.js +3 -14
- package/lib/module/manager/location/LocationManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSDKManager.js +8 -14
- package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSdkCache.js +6 -13
- package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/module/manager/syncmanager/AppSyncManager.js +12 -26
- package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js +9 -5
- package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/module/manager/syncmanager/NativeSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/database.js +27 -3
- package/lib/module/manager/syncmanager/database.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +0 -7
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentManager.js +3 -14
- package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +3 -35
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/ETEventsManager.js +59 -18
- package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js +77 -68
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js +26 -11
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/module/models/DispatchModels.js +3 -4
- package/lib/module/models/DispatchModels.js.map +1 -1
- package/lib/module/models/ReasonCodes.js.map +1 -1
- package/lib/module/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/module/models/execTasks/ETConfig.js +22 -29
- package/lib/module/models/execTasks/ETConfig.js.map +1 -1
- package/lib/module/models/sdk.js +3 -4
- package/lib/module/models/sdk.js.map +1 -1
- package/lib/module/native/signature/SignatureCapture.js +3 -18
- package/lib/module/native/signature/SignatureCapture.js.map +1 -1
- package/lib/module/network/GraphQLClient.js +6 -26
- package/lib/module/network/GraphQLClient.js.map +1 -1
- package/lib/module/network/NetworkClient.js +2 -6
- package/lib/module/network/NetworkClient.js.map +1 -1
- package/lib/module/network/NetworkUtils.js +10 -3
- package/lib/module/network/NetworkUtils.js.map +1 -1
- package/lib/module/network/Queries.js.map +1 -1
- package/lib/module/network/client.js +7 -17
- package/lib/module/network/client.js.map +1 -1
- package/lib/module/res/strings.js.map +1 -1
- package/lib/module/resources/Login.js +4 -13
- package/lib/module/resources/Login.js.map +1 -1
- package/lib/module/resources/network.js +3 -6
- package/lib/module/resources/network.js.map +1 -1
- package/lib/module/styles/SdkColors.js +6 -6
- package/lib/module/styles/SdkColors.js.map +1 -1
- package/lib/module/styles/executionTasks/CommonStyles.js +41 -7
- package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/module/ui/screens/CancellationScreen.js +36 -14
- package/lib/module/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/module/ui/screens/CaptureInputScreen.js +7 -4
- package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/module/ui/screens/CompleteObjectiveScreen.js +0 -3
- package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/module/ui/screens/DeliverScreen.js +7 -4
- package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/module/ui/screens/DisplayScreen.js +5 -4
- package/lib/module/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/module/ui/screens/DoodleScreen.js +7 -4
- package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/module/ui/screens/DropCashScreen.js +7 -7
- package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/module/ui/screens/ETScreensIndex.js +3 -1
- package/lib/module/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/module/ui/screens/FormsScreen.js +34 -6
- package/lib/module/ui/screens/FormsScreen.js.map +1 -1
- package/lib/module/ui/screens/GeofenceScreen.js +5 -4
- package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/module/ui/screens/HttpRequestScreen.js +5 -3
- package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/module/ui/screens/ImageCaptureScreen.js +25 -5
- package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentScreen.js +12 -10
- package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/module/ui/screens/PickupScreen.js +7 -5
- package/lib/module/ui/screens/PickupScreen.js.map +1 -1
- package/lib/module/ui/screens/RTScanScreen.js +9 -13
- package/lib/module/ui/screens/RTScanScreen.js.map +1 -1
- package/lib/module/ui/screens/ScanScreen.js +259 -0
- package/lib/module/ui/screens/ScanScreen.js.map +1 -0
- package/lib/module/ui/screens/StartWorkFlowScreen.js +22 -9
- package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/module/ui/screens/ValidateOTPScreen.js +39 -0
- package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -0
- package/lib/module/ui/screens/WithBaseDispatchScreen.js +0 -3
- package/lib/module/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/module/ui/uiConfig/RouteParams.js +9 -1
- package/lib/module/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/module/utils/ApiUtils.js +101 -0
- package/lib/module/utils/ApiUtils.js.map +1 -0
- package/lib/module/utils/ExecTaskUtils.js +92 -21
- package/lib/module/utils/ExecTaskUtils.js.map +1 -1
- package/lib/module/utils/Logger.js +9 -21
- package/lib/module/utils/Logger.js.map +1 -1
- package/lib/module/utils/NetworkUtil.js +3 -15
- package/lib/module/utils/NetworkUtil.js.map +1 -1
- package/lib/module/utils/SdkUtils.js +2 -15
- package/lib/module/utils/SdkUtils.js.map +1 -1
- package/lib/module/utils/SyncManagerUtils.js +25 -10
- package/lib/module/utils/SyncManagerUtils.js.map +1 -1
- package/lib/module/utils/fcm/FCM.js +35 -4
- package/lib/module/utils/fcm/FCM.js.map +1 -1
- package/lib/module/utils/fcm/FcmUtils.js +50 -7
- package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/module/utils/helper.js +0 -3
- package/lib/module/utils/helper.js.map +1 -1
- package/lib/module/utils/hooks/useTimer.js +37 -0
- package/lib/module/utils/hooks/useTimer.js.map +1 -0
- package/lib/module/utils/loginHelper.js +6 -16
- package/lib/module/utils/loginHelper.js.map +1 -1
- package/lib/module/utils/storage.js +51 -29
- package/lib/module/utils/storage.js.map +1 -1
- package/lib/module/utils/utils.js +8 -6
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/typescript/components/executiontasks/CompletedWFSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/ExecutionTasksIndex.d.ts +6 -2
- package/lib/typescript/components/executiontasks/cancellation/CancellationSchema.d.ts +10 -5
- package/lib/typescript/components/executiontasks/captureInput/CaptureInputSchema.d.ts +7 -7
- package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +7 -7
- package/lib/typescript/components/executiontasks/display/DisplaySchema.d.ts +5 -5
- package/lib/typescript/components/executiontasks/doodle/SignatureSchema.d.ts +7 -7
- package/lib/typescript/components/executiontasks/dropCash/DropCashSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/FormSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/forms/widgets/DateTimeWidget.d.ts +1 -1
- package/lib/typescript/components/executiontasks/forms/widgets/DropdownWidget.d.ts +9 -0
- package/lib/typescript/components/executiontasks/httpRequest/HttpRequestETSchema.d.ts +6 -6
- package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +16 -11
- package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/payments/init/InitPaymentSchema.d.ts +3 -3
- package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentSchema.d.ts +2 -2
- package/lib/typescript/components/executiontasks/pickup/PickpSchema.d.ts +3 -3
- package/lib/typescript/components/executiontasks/scan/ScanET.d.ts +16 -0
- package/lib/typescript/components/executiontasks/scan/ScanSchema.d.ts +70 -0
- package/lib/typescript/components/executiontasks/scan/constants.d.ts +6 -0
- package/lib/typescript/components/executiontasks/scan/interfaces.d.ts +41 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/CScanner.d.ts +7 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/DropDownUtils.d.ts +7 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/ERDropDown.d.ts +17 -0
- package/lib/typescript/components/executiontasks/scan/sub_components/ScanList.d.ts +8 -0
- package/lib/typescript/components/executiontasks/scan/utils.d.ts +21 -0
- package/lib/typescript/components/executiontasks/scanner/ScannerSchema.d.ts +6 -6
- package/lib/typescript/components/executiontasks/scanner/returns/DropDownUtils.d.ts +1 -2
- package/lib/typescript/components/executiontasks/scanner/returns/RTReasonSelection.d.ts +1 -1
- package/lib/typescript/components/executiontasks/scanner/returns/ScanList.d.ts +1 -1
- package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPET.d.ts +4 -0
- package/lib/typescript/components/executiontasks/validateOTP/ValidateOTPSchema.d.ts +54 -0
- package/lib/typescript/components/executiontasks/validateOTP/constants.d.ts +10 -0
- package/lib/typescript/components/executiontasks/validateOTP/sub-components/OTPInput.d.ts +12 -0
- package/lib/typescript/components/executiontasks/validateOTP/utils.d.ts +7 -0
- package/lib/typescript/components/executiontasks/verifyInput/VerifyInputSchema.d.ts +8 -8
- package/lib/typescript/components/executiontasks/verifyLocation/VerifyLocSchema.d.ts +9 -9
- package/lib/typescript/components/executiontasks/verifyOtp/VerifyOtpSchema.d.ts +3 -3
- package/lib/typescript/components/widgets/IconButton.d.ts +9 -0
- package/lib/typescript/components/widgets/SnackBarCustom.d.ts +9 -5
- package/lib/typescript/components/widgets/SplitTextInput.d.ts +12 -0
- package/lib/typescript/constants/apiConstants.d.ts +6 -0
- package/lib/typescript/constants/constants.d.ts +4 -2
- package/lib/typescript/errors/ErrorCodes.d.ts +3 -1
- package/lib/typescript/events/EventDispatcher.d.ts +5 -0
- package/lib/typescript/events/EventListener.d.ts +5 -0
- package/lib/typescript/events/constants.d.ts +5 -0
- package/lib/typescript/events/index.d.ts +2 -0
- package/lib/typescript/events/interface.d.ts +1 -0
- package/lib/typescript/index.d.ts +5 -4
- package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +21 -8
- package/lib/typescript/manager/dispatchCodes/EventCodeContainer.d.ts +12 -1
- package/lib/typescript/manager/dispatchCodes/EventCodeRepo.d.ts +13 -0
- package/lib/typescript/manager/jobRemoval/JobRemovalManager.d.ts +6 -0
- package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +2 -0
- package/lib/typescript/manager/syncmanager/AppSyncManager.d.ts +1 -0
- package/lib/typescript/manager/syncmanager/DBConfig.d.ts +22 -2
- package/lib/typescript/manager/syncmanager/database.d.ts +5 -0
- package/lib/typescript/manager/syncmanager/document/models.d.ts +1 -1
- package/lib/typescript/manager/syncmanager/events/ETEventsManager.d.ts +5 -1
- package/lib/typescript/manager/syncmanager/events/EventsSyncManager.d.ts +5 -1
- package/lib/typescript/manager/syncmanager/events/SyncHttpClient.d.ts +3 -1
- package/lib/typescript/models/DispatchModels.d.ts +56 -1
- package/lib/typescript/models/ReasonCodes.d.ts +5 -0
- package/lib/typescript/models/auth.d.ts +1 -1
- package/lib/typescript/models/execTasks/ETBaseModels.d.ts +27 -8
- package/lib/typescript/models/execTasks/ETConfig.d.ts +8 -4
- package/lib/typescript/models/sdk.d.ts +5 -0
- package/lib/typescript/native/signature/SignatureCapture.d.ts +1 -1
- package/lib/typescript/network/NetworkUtils.d.ts +1 -5
- package/lib/typescript/styles/SdkColors.d.ts +1 -0
- package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +36 -0
- package/lib/typescript/ui/screens/ETScreensIndex.d.ts +3 -1
- package/lib/typescript/ui/screens/ScanScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/ValidateOTPScreen.d.ts +3 -0
- package/lib/typescript/ui/uiConfig/RouteParams.d.ts +8 -0
- package/lib/typescript/utils/ApiUtils.d.ts +61 -0
- package/lib/typescript/utils/ExecTaskUtils.d.ts +7 -2
- package/lib/typescript/utils/NetworkUtil.d.ts +1 -1
- package/lib/typescript/utils/SyncManagerUtils.d.ts +3 -1
- package/lib/typescript/utils/hooks/useTimer.d.ts +5 -0
- package/lib/typescript/utils/storage.d.ts +17 -0
- package/package.json +23 -24
- package/tsconfig.json +9 -8
- package/file_unzip.js +0 -5
- package/mobile-execution-lib-0.6.4.tgz +0 -0
|
@@ -4,27 +4,31 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _reactNative = require("react-native");
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _reactNativePaper = require("react-native-paper");
|
|
13
|
-
|
|
14
10
|
var _utils = require("../../../utils/utils");
|
|
15
|
-
|
|
16
11
|
var _CommonStyles = require("../../../styles/executionTasks/CommonStyles");
|
|
17
|
-
|
|
12
|
+
var _ReasonCodeContainer = _interopRequireDefault(require("../../../manager/dispatchCodes/ReasonCodeContainer"));
|
|
13
|
+
var _EventCodeContainer = _interopRequireDefault(require("../../../manager/dispatchCodes/EventCodeContainer"));
|
|
14
|
+
var _vectorIcons = require("@expo/vector-icons");
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
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); }
|
|
19
|
-
|
|
20
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; }
|
|
21
|
-
|
|
18
|
+
const ICON_SIZE = 12;
|
|
22
19
|
const CancelET = props => {
|
|
23
|
-
var _props$
|
|
24
|
-
|
|
20
|
+
var _props$cancellationEv, _props$cancellationEv2;
|
|
21
|
+
const reasonsContainer = _ReasonCodeContainer.default.getInstance();
|
|
22
|
+
const [reasonList, setReasonList] = (0, _react.useState)((props === null || props === void 0 ? void 0 : props.cancellationReasons) || []);
|
|
23
|
+
const [reasonsRow, setReasonsRow] = (0, _react.useState)([]);
|
|
24
|
+
const [cancelEvent, setCancelEvent] = (0, _react.useState)(props.cancelEvent);
|
|
25
|
+
const [cancelEventCode, setCancelEventCode] = (0, _react.useState)(props.cancelEvent);
|
|
25
26
|
const [cancelReason, setCancelReason] = (0, _react.useState)('');
|
|
26
27
|
const [btnDisabled, setBtnDisabled] = (0, _react.useState)(false);
|
|
27
|
-
|
|
28
|
+
const [showEventCode, setShowEventCode] = (0, _react.useState)(props !== null && props !== void 0 && (_props$cancellationEv = props.cancellationEvents) !== null && _props$cancellationEv !== void 0 && _props$cancellationEv.length ? true : false);
|
|
29
|
+
const [showReasonCode, setShowReasonCode] = (0, _react.useState)((reasonList === null || reasonList === void 0 ? void 0 : reasonList.length) > 0 ? true : false);
|
|
30
|
+
const eventCodeIconName = showEventCode ? 'up' : 'down';
|
|
31
|
+
const reasonCodeIconName = showReasonCode ? 'up' : 'down';
|
|
28
32
|
const renderItem = _ref => {
|
|
29
33
|
let {
|
|
30
34
|
item
|
|
@@ -34,7 +38,9 @@ const CancelET = props => {
|
|
|
34
38
|
backgroundColor: '#FFFFFF'
|
|
35
39
|
}
|
|
36
40
|
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
37
|
-
style: styles.reasonItemStyle
|
|
41
|
+
style: [styles.reasonItemStyle, {
|
|
42
|
+
paddingBottom: 0
|
|
43
|
+
}]
|
|
38
44
|
}, /*#__PURE__*/_react.default.createElement(_reactNativePaper.RadioButton, {
|
|
39
45
|
color: '#5B80F7',
|
|
40
46
|
value: item,
|
|
@@ -49,32 +55,146 @@ const CancelET = props => {
|
|
|
49
55
|
}
|
|
50
56
|
}, item)));
|
|
51
57
|
};
|
|
52
|
-
|
|
58
|
+
const renderEventsItem = _ref2 => {
|
|
59
|
+
let {
|
|
60
|
+
item
|
|
61
|
+
} = _ref2;
|
|
62
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
63
|
+
style: {
|
|
64
|
+
backgroundColor: '#FFFFFF'
|
|
65
|
+
}
|
|
66
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
67
|
+
style: styles.reasonItemStyle
|
|
68
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNativePaper.RadioButton, {
|
|
69
|
+
color: '#5B80F7',
|
|
70
|
+
value: item,
|
|
71
|
+
status: cancelEvent === item ? 'checked' : 'unchecked',
|
|
72
|
+
onPress: () => {
|
|
73
|
+
setCancelEvent(item);
|
|
74
|
+
}
|
|
75
|
+
}), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
76
|
+
style: styles.reasonTextStyle,
|
|
77
|
+
onPress: () => {
|
|
78
|
+
setCancelEvent(item);
|
|
79
|
+
}
|
|
80
|
+
}, item)));
|
|
81
|
+
};
|
|
82
|
+
(0, _react.useEffect)(() => {
|
|
83
|
+
(async () => {
|
|
84
|
+
if (props.eventRows) {
|
|
85
|
+
const eventCode = _EventCodeContainer.default.getEventCodeFromText(cancelEvent, props.eventRows);
|
|
86
|
+
setCancelEventCode(eventCode);
|
|
87
|
+
const reasonCodes = await reasonsContainer.getReasonCodes(props.applicableCodes || {}, eventCode);
|
|
88
|
+
setReasonsRow(reasonCodes);
|
|
89
|
+
if (reasonCodes) {
|
|
90
|
+
const values = [];
|
|
91
|
+
for (let reasonCode of reasonCodes) {
|
|
92
|
+
values.push(reasonCode.description);
|
|
93
|
+
}
|
|
94
|
+
setReasonList(values);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
})();
|
|
98
|
+
}, [cancelEvent]);
|
|
99
|
+
(0, _react.useEffect)(() => {
|
|
100
|
+
if (reasonList.length) {
|
|
101
|
+
setShowEventCode(false);
|
|
102
|
+
if (!showReasonCode) setShowReasonCode(true);
|
|
103
|
+
}
|
|
104
|
+
}, [reasonList]);
|
|
53
105
|
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
54
106
|
style: _CommonStyles.CommonStyles.mainContainer
|
|
55
|
-
},
|
|
56
|
-
|
|
107
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
108
|
+
style: {
|
|
109
|
+
flex: 1
|
|
110
|
+
}
|
|
111
|
+
}, props !== null && props !== void 0 && (_props$cancellationEv2 = props.cancellationEvents) !== null && _props$cancellationEv2 !== void 0 && _props$cancellationEv2.length ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
112
|
+
style: showEventCode ? {
|
|
113
|
+
flex: 1
|
|
114
|
+
} : {}
|
|
115
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
116
|
+
style: styles.codeHeaderStyle,
|
|
117
|
+
onPress: () => {
|
|
118
|
+
setShowEventCode(!showEventCode);
|
|
119
|
+
}
|
|
120
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
121
|
+
style: styles.codesHeaderTextStyle
|
|
122
|
+
}, `${'Select Event'.toUpperCase()}`), /*#__PURE__*/_react.default.createElement(_vectorIcons.AntDesign, {
|
|
123
|
+
style: {
|
|
124
|
+
marginEnd: 10
|
|
125
|
+
},
|
|
126
|
+
name: `${eventCodeIconName}`,
|
|
127
|
+
size: ICON_SIZE,
|
|
128
|
+
color: "#3D445C"
|
|
129
|
+
})), showEventCode ? /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, {
|
|
130
|
+
style: {
|
|
131
|
+
flexGrow: 0
|
|
132
|
+
},
|
|
133
|
+
data: props.cancellationEvents,
|
|
134
|
+
renderItem: renderEventsItem,
|
|
135
|
+
keyExtractor: item => item
|
|
136
|
+
}) : null) : null, (reasonList === null || reasonList === void 0 ? void 0 : reasonList.length) > 0 ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
137
|
+
style: showReasonCode ? {
|
|
138
|
+
flex: 1
|
|
139
|
+
} : {}
|
|
140
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
141
|
+
style: styles.codeHeaderStyle,
|
|
142
|
+
onPress: () => {
|
|
143
|
+
setShowReasonCode(!showReasonCode);
|
|
144
|
+
}
|
|
145
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
146
|
+
style: styles.codesHeaderTextStyle
|
|
147
|
+
}, `${'Select Reason'.toUpperCase()}`), /*#__PURE__*/_react.default.createElement(_vectorIcons.AntDesign, {
|
|
148
|
+
name: `${reasonCodeIconName}`,
|
|
149
|
+
size: ICON_SIZE,
|
|
150
|
+
color: "#3D445C",
|
|
151
|
+
style: {
|
|
152
|
+
marginEnd: 10
|
|
153
|
+
}
|
|
154
|
+
})), showReasonCode ? /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, {
|
|
155
|
+
style: {
|
|
156
|
+
flexGrow: 0
|
|
157
|
+
},
|
|
158
|
+
data: reasonList,
|
|
57
159
|
renderItem: renderItem,
|
|
58
160
|
keyExtractor: item => item
|
|
59
|
-
}) :
|
|
161
|
+
}) : null) : null), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
162
|
+
style: {
|
|
163
|
+
justifyContent: 'flex-end',
|
|
164
|
+
paddingBottom: 16
|
|
165
|
+
}
|
|
166
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNativePaper.Button, {
|
|
60
167
|
disabled: btnDisabled,
|
|
61
168
|
style: [_CommonStyles.CommonStyles.nextButton, {
|
|
62
169
|
marginStart: 10,
|
|
63
170
|
marginEnd: 10,
|
|
64
|
-
marginBottom: 10
|
|
171
|
+
marginBottom: 10,
|
|
172
|
+
marginTop: 10
|
|
65
173
|
}],
|
|
66
174
|
labelStyle: _CommonStyles.CommonStyles.nextButtonLabel,
|
|
67
175
|
mode: 'contained',
|
|
68
176
|
onPress: () => {
|
|
69
|
-
if (!(0, _utils.isEmptyOrBlank)(cancelReason)) {
|
|
177
|
+
if ((!props.cancellationEvents || props.cancellationEvents.length === 1 || !(0, _utils.isEmptyOrBlank)(cancelEvent)) && (!reasonList.length || !(0, _utils.isEmptyOrBlank)(cancelReason))) {
|
|
70
178
|
setBtnDisabled(true);
|
|
71
|
-
props.onSubmitET(cancelReason);
|
|
72
|
-
} else _reactNative.ToastAndroid.show('No reason selected', _reactNative.ToastAndroid.SHORT);
|
|
179
|
+
props.onSubmitET(cancelReason, cancelEventCode, reasonsRow);
|
|
180
|
+
} else _reactNative.ToastAndroid.show('No event or reason selected', _reactNative.ToastAndroid.SHORT);
|
|
73
181
|
}
|
|
74
|
-
}, "
|
|
182
|
+
}, "Proceed")));
|
|
75
183
|
};
|
|
76
|
-
|
|
77
184
|
const styles = _reactNative.StyleSheet.create({
|
|
185
|
+
codeHeaderStyle: {
|
|
186
|
+
flexDirection: 'row',
|
|
187
|
+
justifyContent: 'space-between',
|
|
188
|
+
alignItems: 'center',
|
|
189
|
+
padding: 8,
|
|
190
|
+
paddingVertical: 12
|
|
191
|
+
},
|
|
192
|
+
codesHeaderTextStyle: {
|
|
193
|
+
fontFamily: _CommonStyles.Fonts.IBMPlexSans_400Regular,
|
|
194
|
+
fontSize: 14,
|
|
195
|
+
color: '#9D9D9D',
|
|
196
|
+
marginStart: 10
|
|
197
|
+
},
|
|
78
198
|
reasonTextStyle: {
|
|
79
199
|
flex: 1,
|
|
80
200
|
flexWrap: 'wrap',
|
|
@@ -104,7 +224,6 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
104
224
|
color: '#9D9D9D'
|
|
105
225
|
}
|
|
106
226
|
});
|
|
107
|
-
|
|
108
227
|
var _default = CancelET;
|
|
109
228
|
exports.default = _default;
|
|
110
229
|
//# sourceMappingURL=CancelET.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CancelET","props","cancelReason","setCancelReason","useState","btnDisabled","setBtnDisabled","renderItem","item","backgroundColor","styles","reasonItemStyle","reasonTextStyle","CommonStyles","mainContainer","cancellationReasons","length","nextButton","marginStart","marginEnd","marginBottom","nextButtonLabel","isEmptyOrBlank","onSubmitET","ToastAndroid","show","SHORT","StyleSheet","create","flex","flexWrap","fontFamily","fontStyle","fontSize","lineHeight","letterSpacing","textAlign","color","flexDirection","paddingTop","paddingBottom","alignItems","heading","marginTop"],"sources":["CancelET.tsx"],"sourcesContent":["import { FlatList, StyleSheet, Text, ToastAndroid, View } from 'react-native';\nimport React, { useState } from 'react';\nimport { Button, Paragraph, RadioButton } from 'react-native-paper';\nimport type { CancellationInput } from './CancellationSchema';\nimport { isEmptyOrBlank } from '../../../utils/utils';\nimport { CommonStyles } from '../../../styles/executionTasks/CommonStyles';\n\nconst CancelET = (props: CancellationInput) => {\n const [cancelReason, setCancelReason] = useState('');\n const [btnDisabled, setBtnDisabled] = useState(false);\n const renderItem = ({ item }: { item: string }) => {\n return (\n <View style={{ backgroundColor: '#FFFFFF' }}>\n <View style={styles.reasonItemStyle}>\n <RadioButton\n color={'#5B80F7'}\n value={item}\n status={cancelReason === item ? 'checked' : 'unchecked'}\n onPress={() => {\n setCancelReason(item);\n }}\n />\n <Text\n style={styles.reasonTextStyle}\n onPress={() => {\n setCancelReason(item);\n }}\n >\n {item}\n </Text>\n </View>\n </View>\n );\n };\n\n return (\n <View style={CommonStyles.mainContainer}>\n {props?.cancellationReasons?.length > 0 ? (\n <FlatList\n data={props.cancellationReasons}\n renderItem={renderItem}\n keyExtractor={(item) => item}\n />\n ) : (\n <Paragraph>No Reason(s) found</Paragraph>\n )}\n <View>\n <Button\n disabled={btnDisabled}\n style={[\n CommonStyles.nextButton,\n { marginStart: 10, marginEnd: 10, marginBottom: 10 },\n ]}\n labelStyle={CommonStyles.nextButtonLabel}\n mode={'contained'}\n onPress={() => {\n if (!isEmptyOrBlank(cancelReason)) {\n setBtnDisabled(true);\n props.onSubmitET(cancelReason);\n } else ToastAndroid.show('No reason selected', ToastAndroid.SHORT);\n }}\n >\n Submit\n </Button>\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n reasonTextStyle: {\n flex: 1,\n flexWrap: 'wrap',\n fontFamily: 'IBMPlexSans_400Regular',\n fontStyle: 'normal',\n fontSize: 14,\n lineHeight: 21,\n letterSpacing: 0.25,\n textAlign: 'justify',\n color: '#111111',\n },\n reasonItemStyle: {\n flexDirection: 'row',\n marginStart: 12,\n marginEnd: 12,\n paddingTop: 8,\n paddingBottom: 8,\n alignItems: 'center',\n },\n heading: {\n marginTop: 30,\n marginStart: 25,\n fontSize: 14,\n lineHeight: 21,\n letterSpacing: 0.25,\n fontFamily: 'IBMPlexSans_400Regular',\n color: '#9D9D9D',\n },\n});\nexport default CancelET;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;;;;;AAEA,MAAMA,QAAQ,GAAIC,KAAD,IAA8B;EAAA;;EAC7C,MAA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,CAFK,CAFT;IAME,UAAU,EAAEP,0BAAA,CAAaQ,eAN3B;IAOE,IAAI,EAAE,WAPR;IAQE,OAAO,EAAE,MAAM;MACb,IAAI,CAAC,IAAAC,qBAAA,EAAepB,YAAf,CAAL,EAAmC;QACjCI,cAAc,CAAC,IAAD,CAAd;QACAL,KAAK,CAACsB,UAAN,CAAiBrB,YAAjB;MACD,CAHD,MAGOsB,yBAAA,CAAaC,IAAb,CAAkB,oBAAlB,EAAwCD,yBAAA,CAAaE,KAArD;IACR;EAbH,YADF,CAVF,CADF;AAgCD,CA5DD;;AA8DA,MAAMhB,MAAM,GAAGiB,uBAAA,CAAWC,MAAX,CAAkB;EAC/BhB,eAAe,EAAE;IACfiB,IAAI,EAAE,CADS;IAEfC,QAAQ,EAAE,MAFK;IAGfC,UAAU,EAAE,wBAHG;IAIfC,SAAS,EAAE,QAJI;IAKfC,QAAQ,EAAE,EALK;IAMfC,UAAU,EAAE,EANG;IAOfC,aAAa,EAAE,IAPA;IAQfC,SAAS,EAAE,SARI;IASfC,KAAK,EAAE;EATQ,CADc;EAY/B1B,eAAe,EAAE;IACf2B,aAAa,EAAE,KADA;IAEfpB,WAAW,EAAE,EAFE;IAGfC,SAAS,EAAE,EAHI;IAIfoB,UAAU,EAAE,CAJG;IAKfC,aAAa,EAAE,CALA;IAMfC,UAAU,EAAE;EANG,CAZc;EAoB/BC,OAAO,EAAE;IACPC,SAAS,EAAE,EADJ;IAEPzB,WAAW,EAAE,EAFN;IAGPe,QAAQ,EAAE,EAHH;IAIPC,UAAU,EAAE,EAJL;IAKPC,aAAa,EAAE,IALR;IAMPJ,UAAU,EAAE,wBANL;IAOPM,KAAK,EAAE;EAPA;AApBsB,CAAlB,CAAf;;eA8BerC,Q"}
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_react","_interopRequireWildcard","_reactNativePaper","_utils","_CommonStyles","_ReasonCodeContainer","_interopRequireDefault","_EventCodeContainer","_vectorIcons","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ICON_SIZE","CancelET","props","_props$cancellationEv","_props$cancellationEv2","reasonsContainer","ReasonCodeContainer","getInstance","reasonList","setReasonList","useState","cancellationReasons","reasonsRow","setReasonsRow","cancelEvent","setCancelEvent","cancelEventCode","setCancelEventCode","cancelReason","setCancelReason","btnDisabled","setBtnDisabled","showEventCode","setShowEventCode","cancellationEvents","length","showReasonCode","setShowReasonCode","eventCodeIconName","reasonCodeIconName","renderItem","_ref","item","createElement","View","style","backgroundColor","styles","reasonItemStyle","paddingBottom","RadioButton","color","value","status","onPress","Text","reasonTextStyle","renderEventsItem","_ref2","useEffect","eventRows","eventCode","EventCodeContainer","getEventCodeFromText","reasonCodes","getReasonCodes","applicableCodes","values","reasonCode","push","description","CommonStyles","mainContainer","flex","TouchableOpacity","codeHeaderStyle","codesHeaderTextStyle","toUpperCase","AntDesign","marginEnd","name","size","FlatList","flexGrow","data","keyExtractor","justifyContent","Button","disabled","nextButton","marginStart","marginBottom","marginTop","labelStyle","nextButtonLabel","mode","isEmptyOrBlank","onSubmitET","ToastAndroid","show","SHORT","StyleSheet","create","flexDirection","alignItems","padding","paddingVertical","fontFamily","Fonts","IBMPlexSans_400Regular","fontSize","flexWrap","fontStyle","lineHeight","letterSpacing","textAlign","paddingTop","heading","_default","exports"],"sources":["CancelET.tsx"],"sourcesContent":["import {\n FlatList,\n StyleSheet,\n Text,\n ToastAndroid,\n TouchableOpacity,\n View,\n} from 'react-native';\nimport React, { useEffect, useState } from 'react';\nimport { Button, Paragraph, RadioButton } from 'react-native-paper';\nimport type { CancellationInput } from './CancellationSchema';\nimport { isEmptyOrBlank } from '../../../utils/utils';\nimport {\n CommonStyles,\n DeliverPickupStyles,\n Fonts,\n} from '../../../styles/executionTasks/CommonStyles';\nimport ReasonCodeContainer from '../../../manager/dispatchCodes/ReasonCodeContainer';\nimport type { ReasonsRow } from '../../../manager/syncmanager/DBConfig';\nimport EventCodeContainer from '../../../manager/dispatchCodes/EventCodeContainer';\nimport IconButton from '../../widgets/IconButton';\nimport { AntDesign } from '@expo/vector-icons';\n\nconst ICON_SIZE = 12;\n\nconst CancelET = (props: CancellationInput) => {\n const reasonsContainer = ReasonCodeContainer.getInstance();\n const [reasonList, setReasonList] = useState(\n props?.cancellationReasons || []\n );\n const [reasonsRow, setReasonsRow] = useState<ReasonsRow[]>([]);\n const [cancelEvent, setCancelEvent] = useState(props.cancelEvent);\n const [cancelEventCode, setCancelEventCode] = useState(props.cancelEvent);\n const [cancelReason, setCancelReason] = useState('');\n const [btnDisabled, setBtnDisabled] = useState(false);\n\n const [showEventCode, setShowEventCode] = useState(\n props?.cancellationEvents?.length ? true : false\n );\n const [showReasonCode, setShowReasonCode] = useState(\n reasonList?.length > 0 ? true : false\n );\n\n const eventCodeIconName = showEventCode ? 'up' : 'down';\n const reasonCodeIconName = showReasonCode ? 'up' : 'down';\n\n const renderItem = ({ item }: { item: string }) => {\n return (\n <View style={{ backgroundColor: '#FFFFFF' }}>\n <View style={[styles.reasonItemStyle, { paddingBottom: 0 }]}>\n <RadioButton\n color={'#5B80F7'}\n value={item}\n status={cancelReason === item ? 'checked' : 'unchecked'}\n onPress={() => {\n setCancelReason(item);\n }}\n />\n <Text\n style={styles.reasonTextStyle}\n onPress={() => {\n setCancelReason(item);\n }}\n >\n {item}\n </Text>\n </View>\n </View>\n );\n };\n\n const renderEventsItem = ({ item }: { item: string }) => {\n return (\n <View style={{ backgroundColor: '#FFFFFF' }}>\n <View style={styles.reasonItemStyle}>\n <RadioButton\n color={'#5B80F7'}\n value={item}\n status={cancelEvent === item ? 'checked' : 'unchecked'}\n onPress={() => {\n setCancelEvent(item);\n }}\n />\n <Text\n style={styles.reasonTextStyle}\n onPress={() => {\n setCancelEvent(item);\n }}\n >\n {item}\n </Text>\n </View>\n </View>\n );\n };\n\n useEffect(() => {\n (async () => {\n if (props.eventRows) {\n const eventCode = EventCodeContainer.getEventCodeFromText(\n cancelEvent,\n props.eventRows\n );\n setCancelEventCode(eventCode);\n const reasonCodes = await reasonsContainer.getReasonCodes(\n props.applicableCodes || {},\n eventCode\n );\n setReasonsRow(reasonCodes);\n\n if (reasonCodes) {\n const values: string[] = [];\n for (let reasonCode of reasonCodes) {\n values.push(reasonCode.description);\n }\n setReasonList(values);\n }\n }\n })();\n }, [cancelEvent]);\n\n useEffect(() => {\n if (reasonList.length) {\n setShowEventCode(false);\n if (!showReasonCode) setShowReasonCode(true);\n }\n }, [reasonList]);\n\n return (\n <View style={CommonStyles.mainContainer}>\n <View style={{ flex: 1 }}>\n {props?.cancellationEvents?.length ? (\n <View style={showEventCode ? { flex: 1 } : {}}>\n <TouchableOpacity\n style={styles.codeHeaderStyle}\n onPress={() => {\n setShowEventCode(!showEventCode);\n }}\n >\n <Text style={styles.codesHeaderTextStyle}>\n {`${'Select Event'.toUpperCase()}`}\n </Text>\n <AntDesign\n style={{ marginEnd: 10 }}\n name={`${eventCodeIconName}`}\n size={ICON_SIZE}\n color=\"#3D445C\"\n />\n </TouchableOpacity>\n {showEventCode ? (\n <FlatList\n style={{\n flexGrow: 0,\n }}\n data={props.cancellationEvents}\n renderItem={renderEventsItem}\n keyExtractor={(item) => item}\n />\n ) : null}\n </View>\n ) : null}\n {reasonList?.length > 0 ? (\n <View style={showReasonCode ? { flex: 1 } : {}}>\n <TouchableOpacity\n style={styles.codeHeaderStyle}\n onPress={() => {\n setShowReasonCode(!showReasonCode);\n }}\n >\n <Text style={styles.codesHeaderTextStyle}>\n {`${'Select Reason'.toUpperCase()}`}\n </Text>\n <AntDesign\n name={`${reasonCodeIconName}`}\n size={ICON_SIZE}\n color=\"#3D445C\"\n style={{ marginEnd: 10 }}\n />\n </TouchableOpacity>\n {showReasonCode ? (\n <FlatList\n style={{\n flexGrow: 0,\n }}\n data={reasonList}\n renderItem={renderItem}\n keyExtractor={(item) => item}\n />\n ) : null}\n </View>\n ) : null}\n </View>\n <View style={{ justifyContent: 'flex-end', paddingBottom: 16 }}>\n <Button\n disabled={btnDisabled}\n style={[\n CommonStyles.nextButton,\n { marginStart: 10, marginEnd: 10, marginBottom: 10, marginTop: 10 },\n ]}\n labelStyle={CommonStyles.nextButtonLabel}\n mode={'contained'}\n onPress={() => {\n if (\n (!props.cancellationEvents ||\n props.cancellationEvents.length === 1 ||\n !isEmptyOrBlank(cancelEvent)) &&\n (!reasonList.length || !isEmptyOrBlank(cancelReason))\n ) {\n setBtnDisabled(true);\n props.onSubmitET(cancelReason, cancelEventCode, reasonsRow);\n } else\n ToastAndroid.show(\n 'No event or reason selected',\n ToastAndroid.SHORT\n );\n }}\n >\n Proceed\n </Button>\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n codeHeaderStyle: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: 8,\n paddingVertical: 12,\n },\n codesHeaderTextStyle: {\n fontFamily: Fonts.IBMPlexSans_400Regular,\n fontSize: 14,\n color: '#9D9D9D',\n marginStart: 10,\n },\n reasonTextStyle: {\n flex: 1,\n flexWrap: 'wrap',\n fontFamily: 'IBMPlexSans_400Regular',\n fontStyle: 'normal',\n fontSize: 14,\n lineHeight: 21,\n letterSpacing: 0.25,\n textAlign: 'justify',\n color: '#111111',\n },\n reasonItemStyle: {\n flexDirection: 'row',\n marginStart: 12,\n marginEnd: 12,\n paddingTop: 8,\n paddingBottom: 8,\n alignItems: 'center',\n },\n heading: {\n marginTop: 30,\n marginStart: 25,\n fontSize: 14,\n lineHeight: 21,\n letterSpacing: 0.25,\n fontFamily: 'IBMPlexSans_400Regular',\n color: '#9D9D9D',\n },\n});\nexport default CancelET;\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAQA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAEA,IAAAI,MAAA,GA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AEX,CAAC;AAED,MAAMrD,MAAM,GAAGsD,uBAAU,CAACC,MAAM,CAAC;EAC/B3B,eAAe,EAAE;IACf4B,aAAa,EAAE,KAAK;IACpBjB,cAAc,EAAE,eAAe;IAC/BkB,UAAU,EAAE,QAAQ;IACpBC,OAAO,EAAE,CAAC;IACVC,eAAe,EAAE;EACnB,CAAC;EACD9B,oBAAoB,EAAE;IACpB+B,UAAU,EAAEC,mBAAK,CAACC,sBAAsB;IACxCC,QAAQ,EAAE,EAAE;IACZ3D,KAAK,EAAE,SAAS;IAChBuC,WAAW,EAAE;EACf,CAAC;EACDlC,eAAe,EAAE;IACfiB,IAAI,EAAE,CAAC;IACPsC,QAAQ,EAAE,MAAM;IAChBJ,UAAU,EAAE,wBAAwB;IACpCK,SAAS,EAAE,QAAQ;IACnBF,QAAQ,EAAE,EAAE;IACZG,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,IAAI;IACnBC,SAAS,EAAE,SAAS;IACpBhE,KAAK,EAAE;EACT,CAAC;EACDH,eAAe,EAAE;IACfuD,aAAa,EAAE,KAAK;IACpBb,WAAW,EAAE,EAAE;IACfX,SAAS,EAAE,EAAE;IACbqC,UAAU,EAAE,CAAC;IACbnE,aAAa,EAAE,CAAC;IAChBuD,UAAU,EAAE;EACd,CAAC;EACDa,OAAO,EAAE;IACPzB,SAAS,EAAE,EAAE;IACbF,WAAW,EAAE,EAAE;IACfoB,QAAQ,EAAE,EAAE;IACZG,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,IAAI;IACnBP,UAAU,EAAE,wBAAwB;IACpCxD,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAAC,IAAAmE,QAAA,GACY3G,QAAQ;AAAA4G,OAAA,CAAAjI,OAAA,GAAAgI,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["CancellationSchema.ts"],"sourcesContent":["/**\n * List of reasons for cancellation\n */\nimport type { BaseETResponse
|
|
1
|
+
{"version":3,"names":[],"sources":["CancellationSchema.ts"],"sourcesContent":["/**\n * List of reasons for cancellation\n */\nimport type {\n EventsRow,\n ReasonsRow,\n} from '../../../manager/syncmanager/DBConfig';\nimport type {\n ApplicableReasons,\n BaseETResponse,\n} from '../../../models/execTasks/ETBaseModels';\n\nexport type CancellationReasons = string[];\n\nexport interface CancellationInput {\n cancelEvent: string;\n cancellationEvents?: CancellationReasons;\n cancellationReasons?: CancellationReasons;\n applicableCodes?: ApplicableReasons;\n eventRows?: EventsRow[];\n onSubmitET: (\n reason: string,\n event?: string,\n reasonsRow?: ReasonsRow[]\n ) => void;\n}\n\nexport type CancellationOutput = BaseETResponse & {\n remark: string;\n};\n"],"mappings":""}
|
|
@@ -4,31 +4,76 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _reactNative = require("react-native");
|
|
9
|
-
|
|
10
8
|
var _reactNativePaper = require("react-native-paper");
|
|
11
|
-
|
|
12
9
|
var _CommonStyles = require("../../../styles/executionTasks/CommonStyles");
|
|
13
|
-
|
|
14
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
|
|
16
11
|
var _ExecTaskUtils = require("../../../utils/ExecTaskUtils");
|
|
17
|
-
|
|
18
12
|
var _EventCodeContainer = require("../../../manager/dispatchCodes/EventCodeContainer");
|
|
19
|
-
|
|
20
13
|
var _ETConfig = require("../../../models/execTasks/ETConfig");
|
|
21
|
-
|
|
22
14
|
var _ScannerUtils = require("../scanner/ScannerUtils");
|
|
23
|
-
|
|
15
|
+
var _MaterialIcons = _interopRequireDefault(require("react-native-vector-icons/MaterialIcons"));
|
|
16
|
+
var _constants = require("../../../constants/constants");
|
|
17
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
18
|
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); }
|
|
25
|
-
|
|
26
19
|
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; }
|
|
27
|
-
|
|
28
20
|
const CaptureText = props => {
|
|
21
|
+
const [showBackModal, setShowBackModal] = (0, _react.useState)(false);
|
|
22
|
+
(0, _react.useLayoutEffect)(() => {
|
|
23
|
+
props.navigation.setOptions({
|
|
24
|
+
title: props.title,
|
|
25
|
+
headerLeft: () => {
|
|
26
|
+
var _props$taskMeta;
|
|
27
|
+
return (_props$taskMeta = props.taskMeta) !== null && _props$taskMeta !== void 0 && _props$taskMeta.enableGoBack ? /*#__PURE__*/_react.default.createElement(_MaterialIcons.default, {
|
|
28
|
+
onPress: async () => {
|
|
29
|
+
setShowBackModal(true);
|
|
30
|
+
},
|
|
31
|
+
name: "arrow-back",
|
|
32
|
+
color: 'black',
|
|
33
|
+
size: 25,
|
|
34
|
+
style: {
|
|
35
|
+
paddingRight: 15,
|
|
36
|
+
paddingTop: 5
|
|
37
|
+
}
|
|
38
|
+
}) : null;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}, [props.navigation, props.title]);
|
|
29
42
|
const [input, setInput] = (0, _react.useState)('');
|
|
30
43
|
const [disableNext, setDisableNext] = (0, _react.useState)(false);
|
|
31
|
-
|
|
44
|
+
const renderModal = () => {
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement(_reactNativePaper.Portal, null, /*#__PURE__*/_react.default.createElement(_reactNativePaper.Modal, {
|
|
46
|
+
visible: showBackModal,
|
|
47
|
+
dismissable: true,
|
|
48
|
+
contentContainerStyle: _CommonStyles.CommonStyles.modalContent
|
|
49
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
50
|
+
style: _CommonStyles.CommonStyles.modalView
|
|
51
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
52
|
+
style: _CommonStyles.CommonStyles.subText
|
|
53
|
+
}, 'Are you sure you want to go back?'), /*#__PURE__*/_react.default.createElement(_reactNativePaper.Button, {
|
|
54
|
+
labelStyle: _CommonStyles.CommonStyles.nextButtonLabel,
|
|
55
|
+
style: {
|
|
56
|
+
..._CommonStyles.CommonStyles.nextButton,
|
|
57
|
+
marginTop: 10
|
|
58
|
+
},
|
|
59
|
+
uppercase: false,
|
|
60
|
+
onPress: async () => {
|
|
61
|
+
props.onSubmitET({
|
|
62
|
+
...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.CAPTURE_INPUT, false, _constants.GO_BACK_EVENT_CODE, ''))
|
|
63
|
+
});
|
|
64
|
+
setShowBackModal(false);
|
|
65
|
+
}
|
|
66
|
+
}, "Yes"), /*#__PURE__*/_react.default.createElement(_reactNativePaper.Button, {
|
|
67
|
+
labelStyle: _CommonStyles.CommonStyles.cancelButtonLabel,
|
|
68
|
+
style: {
|
|
69
|
+
..._CommonStyles.CommonStyles.cancelButton,
|
|
70
|
+
marginTop: 10
|
|
71
|
+
},
|
|
72
|
+
uppercase: false,
|
|
73
|
+
onPress: () => setShowBackModal(false)
|
|
74
|
+
}, "No"))));
|
|
75
|
+
};
|
|
76
|
+
return /*#__PURE__*/_react.default.createElement(_reactNativePaper.Provider, null, renderModal(), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
32
77
|
style: _CommonStyles.CommonStyles.mainContainer
|
|
33
78
|
}, /*#__PURE__*/_react.default.createElement(_reactNativePaper.TextInput, {
|
|
34
79
|
multiline: false,
|
|
@@ -45,7 +90,9 @@ const CaptureText = props => {
|
|
|
45
90
|
style: _CommonStyles.CommonStyles.cancelButton,
|
|
46
91
|
mode: 'outlined',
|
|
47
92
|
onPress: async () => {
|
|
48
|
-
|
|
93
|
+
var _props$applicableReas;
|
|
94
|
+
props.onSubmitET({
|
|
95
|
+
...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.CAPTURE_INPUT, false, (0, _EventCodeContainer.getEventCodeByET)(_ETConfig.ExecutionTaskID.CAPTURE_INPUT, false, (_props$applicableReas = props.applicableReasons) === null || _props$applicableReas === void 0 ? void 0 : _props$applicableReas.failure), ''))
|
|
49
96
|
});
|
|
50
97
|
}
|
|
51
98
|
}, "Cancel"), /*#__PURE__*/_react.default.createElement(_reactNativePaper.Button, {
|
|
@@ -54,16 +101,17 @@ const CaptureText = props => {
|
|
|
54
101
|
labelStyle: _CommonStyles.CommonStyles.nextButtonLabel,
|
|
55
102
|
mode: 'contained',
|
|
56
103
|
onPress: async () => {
|
|
104
|
+
var _props$applicableReas2;
|
|
57
105
|
setDisableNext(true);
|
|
58
|
-
props.onSubmitET({
|
|
106
|
+
props.onSubmitET({
|
|
107
|
+
...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.CAPTURE_INPUT, true, (0, _EventCodeContainer.getEventCodeByET)(_ETConfig.ExecutionTaskID.CAPTURE_INPUT, true, (_props$applicableReas2 = props.applicableReasons) === null || _props$applicableReas2 === void 0 ? void 0 : _props$applicableReas2.success), '')),
|
|
59
108
|
value: input,
|
|
60
109
|
validated: (await (0, _ScannerUtils.checkForValidation)(input, props.validationRegex, undefined)) ?? false,
|
|
61
110
|
attemptCount: 0
|
|
62
111
|
});
|
|
63
112
|
}
|
|
64
|
-
}, "Next")));
|
|
113
|
+
}, "Next"))));
|
|
65
114
|
};
|
|
66
|
-
|
|
67
115
|
var _default = CaptureText;
|
|
68
116
|
exports.default = _default;
|
|
69
117
|
//# sourceMappingURL=CaptureText.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CaptureText","props","input","setInput","useState","disableNext","setDisableNext","CommonStyles","mainContainer","deliverETStyles","text","footerButtonStyles","cancelButtonLabel","cancelButton","onSubmitET","getBaseETResponse","EntityCode","CAPTURE_INPUT","getEventCodeByET","ExecutionTaskID","nextButton","nextButtonLabel","value","validated","checkForValidation","validationRegex","undefined","attemptCount"],"sources":["CaptureText.tsx"],"sourcesContent":["import type { CaptureTextInput } from './CaptureInputSchema';\nimport { View } from 'react-native';\nimport { Button, TextInput } from 'react-native-paper';\nimport {\n CommonStyles,\n deliverETStyles,\n} from '../../../styles/executionTasks/CommonStyles';\nimport React, { useState } from 'react';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\nimport { checkForValidation } from '../scanner/ScannerUtils';\n\nconst CaptureText = (props: CaptureTextInput) => {\n const [input, setInput] = useState('');\n const [disableNext, setDisableNext] = useState(false);\n\n return (\n <View style={CommonStyles.mainContainer}>\n <TextInput\n multiline={false}\n autoComplete={'off'}\n style={deliverETStyles.input}\n label=\"Enter input\"\n value={input}\n mode={'outlined'}\n onChangeText={(text) => setInput(text)}\n />\n <View style={deliverETStyles.footerButtonStyles}>\n <Button\n labelStyle={CommonStyles.cancelButtonLabel}\n style={CommonStyles.cancelButton}\n mode={'outlined'}\n onPress={async () => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.CAPTURE_INPUT,\n false,\n getEventCodeByET(ExecutionTaskID.CAPTURE_INPUT, false),\n ''\n )),\n });\n }}\n >\n Cancel\n </Button>\n <Button\n disabled={disableNext}\n style={CommonStyles.nextButton}\n labelStyle={CommonStyles.nextButtonLabel}\n mode={'contained'}\n onPress={async () => {\n setDisableNext(true);\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.CAPTURE_INPUT,\n true,\n getEventCodeByET(ExecutionTaskID.CAPTURE_INPUT, true),\n ''\n )),\n value: input,\n validated:\n (await checkForValidation(\n input,\n props.validationRegex,\n undefined\n )) ?? false,\n attemptCount: 0,\n });\n }}\n >\n Next\n </Button>\n </View>\n </View>\n );\n};\nexport default CaptureText;\n"],"mappings":";;;;;;;AACA;;AACA;;AACA;;AAIA;;AACA;;AACA;;AACA;;AAIA;;;;;;AAEA,MAAMA,WAAW,GAAIC,KAAD,IAA6B;EAC/C,MAAM,CAACC,KAAD,EAAQC,QAAR,IAAoB,IAAAC,eAAA,EAAS,EAAT,CAA1B;EACA,MAAM,CAACC,WAAD,EAAcC,cAAd,IAAgC,IAAAF,eAAA,EAAS,KAAT,CAAtC;EAEA,oBACE,6BAAC,iBAAD;IAAM,KAAK,EAAEG,0BAAA,CAAaC;EAA1B,gBACE,6BAAC,2BAAD;IACE,SAAS,EAAE,KADb;IAEE,YAAY,EAAE,KAFhB;IAGE,KAAK,EAAEC,6BAAA,CAAgBP,KAHzB;IAIE,KAAK,EAAC,aAJR;IAKE,KAAK,EAAEA,KALT;IAME,IAAI,EAAE,UANR;IAOE,YAAY,EAAGQ,IAAD,IAAUP,QAAQ,CAACO,IAAD;EAPlC,EADF,eAUE,6BAAC,iBAAD;IAAM,KAAK,EAAED,6BAAA,CAAgBE;EAA7B,gBACE,6BAAC,wBAAD;IACE,UAAU,EAAEJ,0BAAA,CAAaK,iBAD3B;IAEE,KAAK,EAAEL,0BAAA,CAAaM,YAFtB;IAGE,IAAI,EAAE,UAHR;IAIE,OAAO,EAAE,YAAY;MACnBZ,KAAK,CAACa,UAAN,CAAiB,EACf,IAAI,MAAM,IAAAC,gCAAA,EACRC,oBAAA,CAAWC,aADH,EAER,KAFQ,EAGR,IAAAC,oCAAA,EAAiBC,yBAAA,CAAgBF,aAAjC,EAAgD,KAAhD,CAHQ,EAIR,EAJQ,CAAV;MADe,CAAjB;IAQD;EAbH,YADF,eAkBE,6BAAC,wBAAD;IACE,QAAQ,EAAEZ,WADZ;IAEE,KAAK,EAAEE,0BAAA,CAAaa,UAFtB;IAGE,UAAU,EAAEb,0BAAA,CAAac,eAH3B;IAIE,IAAI,EAAE,WAJR;IAKE,OAAO,EAAE,YAAY;MACnBf,cAAc,CAAC,IAAD,CAAd;MACAL,KAAK,CAACa,UAAN,CAAiB,EACf,IAAI,MAAM,IAAAC,gCAAA,EACRC,oBAAA,CAAWC,aADH,EAER,IAFQ,EAGR,IAAAC,oCAAA,EAAiBC,yBAAA,CAAgBF,aAAjC,EAAgD,IAAhD,CAHQ,EAIR,EAJQ,CAAV,CADe;QAOfK,KAAK,EAAEpB,KAPQ;QAQfqB,SAAS,EACP,CAAC,MAAM,IAAAC,gCAAA,EACLtB,KADK,EAELD,KAAK,CAACwB,eAFD,EAGLC,SAHK,CAAP,KAIM,KAbO;QAcfC,YAAY,EAAE;MAdC,CAAjB;IAgBD;EAvBH,UAlBF,CAVF,CADF;AA2DD,CA/DD;;eAgEe3B,W"}
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_reactNativePaper","_CommonStyles","_react","_interopRequireWildcard","_ExecTaskUtils","_EventCodeContainer","_ETConfig","_ScannerUtils","_MaterialIcons","_interopRequireDefault","_constants","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","CaptureText","props","showBackModal","setShowBackModal","useState","useLayoutEffect","navigation","setOptions","title","headerLeft","_props$taskMeta","taskMeta","enableGoBack","createElement","onPress","name","color","size","style","paddingRight","paddingTop","input","setInput","disableNext","setDisableNext","renderModal","Portal","Modal","visible","dismissable","contentContainerStyle","CommonStyles","modalContent","View","modalView","Text","subText","Button","labelStyle","nextButtonLabel","nextButton","marginTop","uppercase","onSubmitET","getBaseETResponse","EntityCode","CAPTURE_INPUT","GO_BACK_EVENT_CODE","cancelButtonLabel","cancelButton","Provider","mainContainer","TextInput","multiline","autoComplete","deliverETStyles","label","value","mode","onChangeText","text","footerButtonStyles","_props$applicableReas","getEventCodeByET","ExecutionTaskID","applicableReasons","failure","disabled","_props$applicableReas2","success","validated","checkForValidation","validationRegex","undefined","attemptCount","_default","exports"],"sources":["CaptureText.tsx"],"sourcesContent":["import type { CaptureTextInput } from './CaptureInputSchema';\nimport { View, Text } from 'react-native';\nimport { Button, TextInput, Modal, Portal, Provider } from 'react-native-paper';\nimport {\n CommonStyles,\n deliverETStyles,\n} from '../../../styles/executionTasks/CommonStyles';\nimport React, { useState, useLayoutEffect } from 'react';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\nimport { checkForValidation } from '../scanner/ScannerUtils';\nimport Icon from 'react-native-vector-icons/MaterialIcons';\nimport { GO_BACK_EVENT_CODE } from '../../../constants/constants';\n\nconst CaptureText = (props: CaptureTextInput) => {\n const [showBackModal, setShowBackModal] = useState(false);\n useLayoutEffect(() => {\n props.navigation.setOptions({\n title: props.title,\n headerLeft: () =>\n props.taskMeta?.enableGoBack ? (\n <Icon\n onPress={async () => {\n setShowBackModal(true);\n }}\n name=\"arrow-back\"\n color={'black'}\n size={25}\n style={{\n paddingRight: 15,\n paddingTop: 5,\n }}\n />\n ) : null,\n });\n }, [props.navigation, props.title]);\n\n const [input, setInput] = useState('');\n const [disableNext, setDisableNext] = useState(false);\n\n const renderModal = () => {\n return (\n <Portal>\n <Modal\n visible={showBackModal}\n dismissable={true}\n contentContainerStyle={CommonStyles.modalContent}\n >\n <View style={CommonStyles.modalView}>\n <Text style={CommonStyles.subText}>\n {'Are you sure you want to go back?'}\n </Text>\n <Button\n labelStyle={CommonStyles.nextButtonLabel}\n style={{ ...CommonStyles.nextButton, marginTop: 10 }}\n uppercase={false}\n onPress={async () => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.CAPTURE_INPUT,\n false,\n GO_BACK_EVENT_CODE,\n ''\n )),\n });\n setShowBackModal(false);\n }}\n >\n Yes\n </Button>\n <Button\n labelStyle={CommonStyles.cancelButtonLabel}\n style={{ ...CommonStyles.cancelButton, marginTop: 10 }}\n uppercase={false}\n onPress={() => setShowBackModal(false)}\n >\n No\n </Button>\n </View>\n </Modal>\n </Portal>\n );\n };\n\n return (\n <Provider>\n {renderModal()}\n <View style={CommonStyles.mainContainer}>\n <TextInput\n multiline={false}\n autoComplete={'off'}\n style={deliverETStyles.input}\n label=\"Enter input\"\n value={input}\n mode={'outlined'}\n onChangeText={(text) => setInput(text)}\n />\n <View style={deliverETStyles.footerButtonStyles}>\n <Button\n labelStyle={CommonStyles.cancelButtonLabel}\n style={CommonStyles.cancelButton}\n mode={'outlined'}\n onPress={async () => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.CAPTURE_INPUT,\n false,\n getEventCodeByET(\n ExecutionTaskID.CAPTURE_INPUT,\n false,\n props.applicableReasons?.failure\n ),\n ''\n )),\n });\n }}\n >\n Cancel\n </Button>\n <Button\n disabled={disableNext}\n style={CommonStyles.nextButton}\n labelStyle={CommonStyles.nextButtonLabel}\n mode={'contained'}\n onPress={async () => {\n setDisableNext(true);\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.CAPTURE_INPUT,\n true,\n getEventCodeByET(\n ExecutionTaskID.CAPTURE_INPUT,\n true,\n props.applicableReasons?.success\n ),\n ''\n )),\n value: input,\n validated:\n (await checkForValidation(\n input,\n props.validationRegex,\n undefined\n )) ?? false,\n attemptCount: 0,\n });\n }}\n >\n Next\n </Button>\n </View>\n </View>\n </Provider>\n );\n};\nexport default CaptureText;\n"],"mappings":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ACL7D,KAAK,CAACgE,iBAAiB,cAAAH,qBAAA,uBAAvBA,qBAAA,CAAyBI,OAAO,CACjC,EACD,EAAE,CACH;MACH,CAAC,CAAC;IACJ;EAAE,GACH,QAED,CAAS,eACTjG,MAAA,CAAAW,OAAA,CAAAiC,aAAA,CAAC9C,iBAAA,CAAAsE,MAAM;IACL8B,QAAQ,EAAE5C,WAAY;IACtBL,KAAK,EAAEa,0BAAY,CAACS,UAAW;IAC/BF,UAAU,EAAEP,0BAAY,CAACQ,eAAgB;IACzCmB,IAAI,EAAE,WAAY;IAClB5C,OAAO,EAAE,MAAAA,CAAA,KAAY;MAAA,IAAAsD,sBAAA;MACnB5C,cAAc,CAAC,IAAI,CAAC;MACpBvB,KAAK,CAAC0C,UAAU,CAAC;QACf,IAAI,MAAM,IAAAC,gCAAiB,EACzBC,oBAAU,CAACC,aAAa,EACxB,IAAI,EACJ,IAAAiB,oCAAgB,EACdC,yBAAe,CAAClB,aAAa,EAC7B,IAAI,GAAAsB,sBAAA,GACJnE,KAAK,CAACgE,iBAAiB,cAAAG,sBAAA,uBAAvBA,sBAAA,CAAyBC,OAAO,CACjC,EACD,EAAE,CACH,CAAC;QACFZ,KAAK,EAAEpC,KAAK;QACZiD,SAAS,EACP,CAAC,MAAM,IAAAC,gCAAkB,EACvBlD,KAAK,EACLpB,KAAK,CAACuE,eAAe,EACrBC,SAAS,CACV,KAAK,KAAK;QACbC,YAAY,EAAE;MAChB,CAAC,CAAC;IACJ;EAAE,GACH,MAED,CAAS,CACJ,CACF,CACE;AAEf,CAAC;AAAC,IAAAC,QAAA,GACa3E,WAAW;AAAA4E,OAAA,CAAAhG,OAAA,GAAA+F,QAAA"}
|
|
@@ -4,25 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _reactNative = require("react-native");
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _reactNativePaper = require("react-native-paper");
|
|
13
|
-
|
|
14
10
|
var _CommonStyles = require("../../../styles/executionTasks/CommonStyles");
|
|
15
|
-
|
|
16
11
|
var _ExecTaskUtils = require("../../../utils/ExecTaskUtils");
|
|
17
|
-
|
|
18
12
|
var _EventCodeContainer = require("../../../manager/dispatchCodes/EventCodeContainer");
|
|
19
|
-
|
|
20
13
|
var _ETConfig = require("../../../models/execTasks/ETConfig");
|
|
21
|
-
|
|
22
14
|
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); }
|
|
23
|
-
|
|
24
15
|
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; }
|
|
25
|
-
|
|
26
16
|
const ListItem = _ref => {
|
|
27
17
|
let {
|
|
28
18
|
lineItem
|
|
@@ -34,7 +24,6 @@ const ListItem = _ref => {
|
|
|
34
24
|
subtitle: lineItem.count ? lineItem.count + ' Qty.' : ''
|
|
35
25
|
}), lineItem.productDescription && /*#__PURE__*/_react.default.createElement(_reactNativePaper.Card.Content, null, /*#__PURE__*/_react.default.createElement(_reactNativePaper.Paragraph, null, lineItem.productDescription)));
|
|
36
26
|
};
|
|
37
|
-
|
|
38
27
|
const renderItem = _ref2 => {
|
|
39
28
|
let {
|
|
40
29
|
item
|
|
@@ -43,11 +32,9 @@ const renderItem = _ref2 => {
|
|
|
43
32
|
lineItem: item
|
|
44
33
|
});
|
|
45
34
|
};
|
|
46
|
-
|
|
47
35
|
const DeliverET = props => {
|
|
48
36
|
const [remarks, setRemarks] = (0, _react.useState)('');
|
|
49
37
|
const [disableNext, setDisableNext] = (0, _react.useState)(false);
|
|
50
|
-
|
|
51
38
|
if (props && props.items && props.items.length > 0) {
|
|
52
39
|
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
53
40
|
style: [_CommonStyles.CommonStyles.mainContainer, {
|
|
@@ -75,7 +62,9 @@ const DeliverET = props => {
|
|
|
75
62
|
}],
|
|
76
63
|
mode: 'outlined',
|
|
77
64
|
onPress: async () => {
|
|
78
|
-
|
|
65
|
+
var _props$applicableReas;
|
|
66
|
+
props.onSubmitET({
|
|
67
|
+
...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.DELIVER, false, (0, _EventCodeContainer.getEventCodeByET)(_ETConfig.ExecutionTaskID.DELIVER, false, (_props$applicableReas = props.applicableReasons) === null || _props$applicableReas === void 0 ? void 0 : _props$applicableReas.failure), ''))
|
|
79
68
|
});
|
|
80
69
|
}
|
|
81
70
|
}, "Cancel"), /*#__PURE__*/_react.default.createElement(_reactNativePaper.Button, {
|
|
@@ -87,8 +76,10 @@ const DeliverET = props => {
|
|
|
87
76
|
labelStyle: _CommonStyles.CommonStyles.nextButtonLabel,
|
|
88
77
|
mode: 'contained',
|
|
89
78
|
onPress: async () => {
|
|
79
|
+
var _props$applicableReas2;
|
|
90
80
|
setDisableNext(true);
|
|
91
|
-
props.onSubmitET({
|
|
81
|
+
props.onSubmitET({
|
|
82
|
+
...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.DELIVER, true, (0, _EventCodeContainer.getEventCodeByET)(_ETConfig.ExecutionTaskID.DELIVER, true, (_props$applicableReas2 = props.applicableReasons) === null || _props$applicableReas2 === void 0 ? void 0 : _props$applicableReas2.success), '')),
|
|
92
83
|
remark: remarks
|
|
93
84
|
});
|
|
94
85
|
}
|
|
@@ -99,7 +90,6 @@ const DeliverET = props => {
|
|
|
99
90
|
}, "No Item(s) found for Delivery"));
|
|
100
91
|
}
|
|
101
92
|
};
|
|
102
|
-
|
|
103
93
|
var _default = DeliverET;
|
|
104
94
|
exports.default = _default;
|
|
105
95
|
//# sourceMappingURL=DeliverET.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ListItem","lineItem","deliverETStyles","item","skuId","count","productDescription","renderItem","DeliverET","props","remarks","setRemarks","useState","disableNext","setDisableNext","items","length","CommonStyles","mainContainer","padding","message","input","text","footerButtonStyles","cancelButtonLabel","cancelButton","marginEnd","flex","onSubmitET","getBaseETResponse","EntityCode","DELIVER","getEventCodeByET","ExecutionTaskID","nextButton","marginStart","nextButtonLabel","remark","errorText"],"sources":["DeliverET.tsx"],"sourcesContent":["import type { DeliverETInput, LineItem } from './DeliverETInput';\nimport { FlatList, View } from 'react-native';\nimport React, { useState } from 'react';\nimport { Button, Card, Paragraph, TextInput, Title } from 'react-native-paper';\nimport {\n CommonStyles,\n deliverETStyles,\n} from '../../../styles/executionTasks/CommonStyles';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\n\nconst ListItem = ({ lineItem }: { lineItem: LineItem }) => (\n <Card style={deliverETStyles.item}>\n <Card.Title\n title={lineItem.skuId}\n subtitle={lineItem.count ? lineItem.count + ' Qty.' : ''}\n />\n {lineItem.productDescription && (\n <Card.Content>\n <Paragraph>{lineItem.productDescription}</Paragraph>\n </Card.Content>\n )}\n </Card>\n);\n\nconst renderItem = ({ item }: { item: LineItem }) => (\n <ListItem lineItem={item} />\n);\nconst DeliverET = (props: DeliverETInput) => {\n const [remarks, setRemarks] = useState('');\n const [disableNext, setDisableNext] = useState(false);\n\n if (props && props.items && props.items.length > 0) {\n return (\n <View style={[CommonStyles.mainContainer, { padding: 10 }]}>\n <FlatList\n data={props.items}\n renderItem={renderItem}\n keyExtractor={(item) => item.skuId}\n />\n {props.message && props.message.length > 0 && (\n <Paragraph>{props.message}</Paragraph>\n )}\n <TextInput\n multiline={false}\n autoComplete={'off'}\n style={deliverETStyles.input}\n label=\"Enter Delivery remarks\"\n value={remarks}\n mode={'outlined'}\n onChangeText={(text) => setRemarks(text)}\n />\n <View>\n <View style={deliverETStyles.footerButtonStyles}>\n <Button\n labelStyle={CommonStyles.cancelButtonLabel}\n style={[CommonStyles.cancelButton, { marginEnd: 5, flex: 1 }]}\n mode={'outlined'}\n onPress={async () => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.DELIVER,\n false,\n getEventCodeByET(ExecutionTaskID.DELIVER
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_react","_interopRequireWildcard","_reactNativePaper","_CommonStyles","_ExecTaskUtils","_EventCodeContainer","_ETConfig","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ListItem","_ref","lineItem","createElement","Card","style","deliverETStyles","item","Title","title","skuId","subtitle","count","productDescription","Content","Paragraph","renderItem","_ref2","DeliverET","props","remarks","setRemarks","useState","disableNext","setDisableNext","items","length","View","CommonStyles","mainContainer","padding","FlatList","data","keyExtractor","message","TextInput","multiline","autoComplete","input","label","value","mode","onChangeText","text","footerButtonStyles","Button","labelStyle","cancelButtonLabel","cancelButton","marginEnd","flex","onPress","_props$applicableReas","onSubmitET","getBaseETResponse","EntityCode","DELIVER","getEventCodeByET","ExecutionTaskID","applicableReasons","failure","disabled","nextButton","marginStart","nextButtonLabel","_props$applicableReas2","success","remark","errorText","_default","exports"],"sources":["DeliverET.tsx"],"sourcesContent":["import type { DeliverETInput, LineItem } from './DeliverETInput';\nimport { FlatList, View } from 'react-native';\nimport React, { useState } from 'react';\nimport { Button, Card, Paragraph, TextInput, Title } from 'react-native-paper';\nimport {\n CommonStyles,\n deliverETStyles,\n} from '../../../styles/executionTasks/CommonStyles';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\n\nconst ListItem = ({ lineItem }: { lineItem: LineItem }) => (\n <Card style={deliverETStyles.item}>\n <Card.Title\n title={lineItem.skuId}\n subtitle={lineItem.count ? lineItem.count + ' Qty.' : ''}\n />\n {lineItem.productDescription && (\n <Card.Content>\n <Paragraph>{lineItem.productDescription}</Paragraph>\n </Card.Content>\n )}\n </Card>\n);\n\nconst renderItem = ({ item }: { item: LineItem }) => (\n <ListItem lineItem={item} />\n);\nconst DeliverET = (props: DeliverETInput) => {\n const [remarks, setRemarks] = useState('');\n const [disableNext, setDisableNext] = useState(false);\n\n if (props && props.items && props.items.length > 0) {\n return (\n <View style={[CommonStyles.mainContainer, { padding: 10 }]}>\n <FlatList\n data={props.items}\n renderItem={renderItem}\n keyExtractor={(item) => item.skuId}\n />\n {props.message && props.message.length > 0 && (\n <Paragraph>{props.message}</Paragraph>\n )}\n <TextInput\n multiline={false}\n autoComplete={'off'}\n style={deliverETStyles.input}\n label=\"Enter Delivery remarks\"\n value={remarks}\n mode={'outlined'}\n onChangeText={(text) => setRemarks(text)}\n />\n <View>\n <View style={deliverETStyles.footerButtonStyles}>\n <Button\n labelStyle={CommonStyles.cancelButtonLabel}\n style={[CommonStyles.cancelButton, { marginEnd: 5, flex: 1 }]}\n mode={'outlined'}\n onPress={async () => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.DELIVER,\n false,\n getEventCodeByET(\n ExecutionTaskID.DELIVER,\n false,\n props.applicableReasons?.failure\n ),\n ''\n )),\n });\n }}\n >\n Cancel\n </Button>\n <Button\n disabled={disableNext}\n style={[CommonStyles.nextButton, { marginStart: 5, flex: 1 }]}\n labelStyle={CommonStyles.nextButtonLabel}\n mode={'contained'}\n onPress={async () => {\n setDisableNext(true);\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.DELIVER,\n true,\n getEventCodeByET(\n ExecutionTaskID.DELIVER,\n true,\n props.applicableReasons?.success\n ),\n ''\n )),\n remark: remarks,\n });\n }}\n >\n Deliver\n </Button>\n </View>\n </View>\n </View>\n );\n } else {\n return (\n <View>\n <Title style={deliverETStyles.errorText}>\n No Item(s) found for Delivery\n </Title>\n </View>\n );\n }\n};\n\nexport default DeliverET;\n"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAIA,IAAAK,cAAA,GAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AAG4C,SAAAQ,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,SAAAP,wBAAAW,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAA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