@os1-platform/dispatch-mobile 2.1.1 → 2.1.2
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/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/android/gradlew +185 -0
- package/android/gradlew.bat +89 -0
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +4 -3
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +8 -13
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +4 -3
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +4 -3
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +25 -105
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +8 -7
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +13 -36
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +4 -3
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +7 -6
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +6 -5
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +5 -4
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js +4 -3
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +4 -3
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js +4 -3
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +4 -3
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +22 -136
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +8 -8
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js +7 -6
- package/lib/commonjs/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +6 -5
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +4 -3
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +4 -3
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickpSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js +4 -3
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +16 -88
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js +15 -14
- package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js +2 -1
- package/lib/commonjs/components/executiontasks/scan/ScanSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/constants.js +12 -6
- package/lib/commonjs/components/executiontasks/scan/constants.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/interfaces.js +8 -4
- package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js +5 -4
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js +6 -5
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +9 -8
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/utils.js +2 -2
- package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +9 -8
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js +2 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js +12 -6
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +6 -5
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js +2 -2
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js +2 -2
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +4 -3
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +4 -3
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/commonjs/components/widgets/AlertDisplay.js +9 -14
- package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/commonjs/components/widgets/CancelOrderDialog.js +6 -5
- package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/Card.js +3 -2
- package/lib/commonjs/components/widgets/Card.js.map +1 -1
- package/lib/commonjs/components/widgets/GoBackModal.js +2 -1
- package/lib/commonjs/components/widgets/GoBackModal.js.map +1 -1
- package/lib/commonjs/components/widgets/IconButton.js +2 -1
- package/lib/commonjs/components/widgets/IconButton.js.map +1 -1
- package/lib/commonjs/components/widgets/ModalWidget.js +4 -3
- package/lib/commonjs/components/widgets/ModalWidget.js.map +1 -1
- package/lib/commonjs/components/widgets/ProgressDialog.js +3 -2
- package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/SearchBar.js +2 -1
- package/lib/commonjs/components/widgets/SearchBar.js.map +1 -1
- package/lib/commonjs/components/widgets/SnackBarCustom.js +5 -3
- package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/commonjs/components/widgets/SplitTextInput.js +4 -3
- package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -1
- package/lib/commonjs/components/widgets/TabsComponent.js +4 -3
- package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -1
- package/lib/commonjs/config/DispatchSDKConfig.js +2 -1
- package/lib/commonjs/config/DispatchSDKConfig.js.map +1 -1
- package/lib/commonjs/constants/apiConstants.js +4 -2
- package/lib/commonjs/constants/apiConstants.js.map +1 -1
- package/lib/commonjs/constants/constants.js +22 -11
- package/lib/commonjs/constants/constants.js.map +1 -1
- package/lib/commonjs/constants/statuscode.js +2 -1
- package/lib/commonjs/constants/statuscode.js.map +1 -1
- package/lib/commonjs/errors/ErrorCodes.js +14 -7
- package/lib/commonjs/errors/ErrorCodes.js.map +1 -1
- package/lib/commonjs/events/EventDispatcher.js +3 -5
- package/lib/commonjs/events/EventDispatcher.js.map +1 -1
- package/lib/commonjs/events/EventListener.js +2 -1
- package/lib/commonjs/events/EventListener.js.map +1 -1
- package/lib/commonjs/events/constants.js +2 -1
- package/lib/commonjs/events/constants.js.map +1 -1
- package/lib/commonjs/events/index.js +2 -1
- package/lib/commonjs/events/index.js.map +1 -1
- package/lib/commonjs/icons/ScanIcon.js +2 -1
- package/lib/commonjs/icons/ScanIcon.js.map +1 -1
- package/lib/commonjs/icons/file.js +2 -1
- package/lib/commonjs/icons/file.js.map +1 -1
- package/lib/commonjs/index.js +2 -8
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +3 -5
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js +0 -2
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js +2 -4
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js +2 -4
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js +2 -4
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/location/LocationManager.js +4 -7
- package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js +2 -4
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js +0 -2
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/commonjs/manager/sdk/callbacksHandler.js +2 -1
- package/lib/commonjs/manager/sdk/callbacksHandler.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js +2 -4
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js +26 -15
- package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js +2 -1
- package/lib/commonjs/manager/syncmanager/NativeSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/constants.js +10 -5
- package/lib/commonjs/manager/syncmanager/constants.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/database.js +2 -2
- package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +4 -5
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +2 -4
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +2 -4
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +3 -15
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +2 -4
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/commonjs/models/DispatchModels.js +2 -1
- package/lib/commonjs/models/DispatchModels.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETConfig.js +12 -6
- package/lib/commonjs/models/execTasks/ETConfig.js.map +1 -1
- package/lib/commonjs/models/fcm.js.map +1 -1
- package/lib/commonjs/models/sdk.js +2 -1
- package/lib/commonjs/models/sdk.js.map +1 -1
- package/lib/commonjs/native/signature/SignatureCapture.js +2 -1
- package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
- package/lib/commonjs/network/GraphQLClient.js +4 -48
- package/lib/commonjs/network/GraphQLClient.js.map +1 -1
- package/lib/commonjs/network/Queries.js +10 -5
- package/lib/commonjs/network/Queries.js.map +1 -1
- package/lib/commonjs/res/strings.js +2 -1
- package/lib/commonjs/res/strings.js.map +1 -1
- package/lib/commonjs/resources/Login.js +2 -1
- package/lib/commonjs/resources/Login.js.map +1 -1
- package/lib/commonjs/resources/network.js +2 -1
- package/lib/commonjs/resources/network.js.map +1 -1
- package/lib/commonjs/styles/SdkColors.js +4 -2
- package/lib/commonjs/styles/SdkColors.js.map +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +10 -6
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/commonjs/ui/screens/CancellationScreen.js +4 -3
- package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CaptureInputScreen.js +5 -5
- package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +4 -3
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +5 -12
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DisplayScreen.js +4 -3
- package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js +5 -5
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js +5 -5
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FormsScreen.js +4 -3
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/GeofenceScreen.js +4 -3
- package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HttpRequestScreen.js +2 -1
- package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +4 -3
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentScreen.js +6 -6
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +5 -7
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ScanScreen.js +4 -3
- package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +7 -8
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js +4 -3
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js +4 -4
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js +2 -1
- package/lib/commonjs/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/commonjs/utils/ApiUtils.js +4 -2
- package/lib/commonjs/utils/ApiUtils.js.map +1 -1
- package/lib/commonjs/utils/Logger.js +9 -10
- package/lib/commonjs/utils/Logger.js.map +1 -1
- package/lib/commonjs/utils/NetworkUtil.js +2 -1
- package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
- package/lib/commonjs/utils/SdkUtils.js +8 -12
- package/lib/commonjs/utils/SdkUtils.js.map +1 -1
- package/lib/commonjs/utils/SyncManagerUtils.js +2 -2
- package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
- package/lib/commonjs/utils/fcm/FCM.js +4 -3
- package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
- package/lib/commonjs/utils/fcm/FcmUtils.js +2 -14
- package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/commonjs/utils/helper.js +2 -1
- package/lib/commonjs/utils/helper.js.map +1 -1
- package/lib/commonjs/utils/hooks/useModal.js +4 -3
- package/lib/commonjs/utils/hooks/useModal.js.map +1 -1
- package/lib/commonjs/utils/hooks/useTimer.js +2 -1
- package/lib/commonjs/utils/hooks/useTimer.js.map +1 -1
- package/lib/commonjs/utils/loginHelper.js +2 -1
- package/lib/commonjs/utils/loginHelper.js.map +1 -1
- package/lib/commonjs/utils/storage.js +13 -71
- package/lib/commonjs/utils/storage.js.map +1 -1
- package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancelET.js +5 -11
- package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js +23 -105
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/display/DisplayModalET.js +5 -5
- package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js +10 -34
- package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js +4 -4
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormGenerator.js +3 -3
- package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +18 -131
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +3 -3
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentStyles.js +6 -6
- package/lib/module/components/executiontasks/payments/PaymentStyles.js.map +1 -1
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +3 -3
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/PickpSchema.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/SLPickupET.js +15 -88
- package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanET.js +12 -12
- package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js +2 -2
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +3 -3
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +6 -6
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
- package/lib/module/components/executiontasks/scan/utils.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +6 -6
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js +3 -3
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
- package/lib/module/components/widgets/AlertDisplay.js +7 -12
- package/lib/module/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/module/components/widgets/CancelOrderDialog.js +3 -3
- package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/module/components/widgets/Card.js +1 -1
- package/lib/module/components/widgets/Card.js.map +1 -1
- package/lib/module/components/widgets/ModalWidget.js +3 -3
- package/lib/module/components/widgets/ModalWidget.js.map +1 -1
- package/lib/module/components/widgets/ProgressDialog.js +2 -2
- package/lib/module/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/module/components/widgets/SnackBarCustom.js +2 -2
- package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/module/events/EventDispatcher.js +2 -5
- package/lib/module/events/EventDispatcher.js.map +1 -1
- package/lib/module/index.js +2 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/manager/dispatch/DispatchStateContainer.js +1 -3
- package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js +0 -2
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js +0 -2
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js +0 -2
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js +0 -2
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/module/manager/location/LocationManager.js +0 -2
- package/lib/module/manager/location/LocationManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSDKManager.js +0 -2
- package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSdkCache.js +0 -2
- package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/module/manager/syncmanager/AppSyncManager.js +0 -2
- package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js +1 -2
- package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentManager.js +0 -2
- package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +0 -2
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/ETEventsManager.js +1 -13
- package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js +0 -2
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/module/models/fcm.js.map +1 -1
- package/lib/module/network/GraphQLClient.js +3 -48
- package/lib/module/network/GraphQLClient.js.map +1 -1
- package/lib/module/ui/screens/CaptureInputScreen.js +1 -2
- package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/module/ui/screens/DeliverScreen.js +1 -9
- package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/module/ui/screens/DoodleScreen.js +1 -2
- package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/module/ui/screens/DropCashScreen.js +2 -2
- package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentScreen.js +2 -3
- package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/module/ui/screens/PickupScreen.js +1 -4
- package/lib/module/ui/screens/PickupScreen.js.map +1 -1
- package/lib/module/ui/screens/StartWorkFlowScreen.js +4 -6
- package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/module/ui/screens/WithBaseDispatchScreen.js +0 -1
- package/lib/module/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/module/utils/Logger.js +0 -2
- package/lib/module/utils/Logger.js.map +1 -1
- package/lib/module/utils/SdkUtils.js +7 -11
- package/lib/module/utils/SdkUtils.js.map +1 -1
- package/lib/module/utils/fcm/FcmUtils.js +0 -11
- package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/module/utils/storage.js +10 -69
- package/lib/module/utils/storage.js.map +1 -1
- package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +0 -4
- package/lib/typescript/components/executiontasks/payments/PaymentStyles.d.ts +5 -4
- package/lib/typescript/components/executiontasks/pickup/PickpSchema.d.ts +0 -1
- package/lib/typescript/components/widgets/SnackBarCustom.d.ts +1 -1
- package/lib/typescript/index.d.ts +2 -2
- package/lib/typescript/manager/syncmanager/DBConfig.d.ts +2 -3
- package/lib/typescript/models/fcm.d.ts +0 -3
- package/lib/typescript/utils/fcm/FcmUtils.d.ts +1 -2
- package/lib/typescript/utils/storage.d.ts +2 -3
- package/package.json +7 -23
- package/dispatch-mobile.podspec +0 -35
- package/ios/DispatchSdk-Bridging-Header.h +0 -3
- package/ios/DispatchSdk.m +0 -9
- package/ios/DispatchSdk.swift +0 -8
- package/ios/DispatchSdk.xcodeproj/project.pbxproj +0 -317
- package/ios/EventEmitter.swift +0 -21
- package/ios/EventsConstant.swift +0 -13
- package/ios/RNEventEmitter.m +0 -15
- package/ios/RNEventEmitter.swift +0 -24
- package/lib/commonjs/icons/circleMark.svg +0 -3
- package/lib/commonjs/locale/Str.js +0 -19
- package/lib/commonjs/locale/Str.js.map +0 -1
- package/lib/commonjs/locale/en.json +0 -6
- package/lib/commonjs/locale/i18n.js +0 -28
- package/lib/commonjs/locale/i18n.js.map +0 -1
- package/lib/commonjs/locale/util.js +0 -27
- package/lib/commonjs/locale/util.js.map +0 -1
- package/lib/module/icons/circleMark.svg +0 -3
- package/lib/module/locale/Str.js +0 -13
- package/lib/module/locale/Str.js.map +0 -1
- package/lib/module/locale/en.json +0 -6
- package/lib/module/locale/i18n.js +0 -21
- package/lib/module/locale/i18n.js.map +0 -1
- package/lib/module/locale/util.js +0 -18
- package/lib/module/locale/util.js.map +0 -1
- package/lib/typescript/locale/Str.d.ts +0 -11
- package/lib/typescript/locale/i18n.d.ts +0 -3
- package/lib/typescript/locale/util.d.ts +0 -2
- package/src/@types/assets/index.d.ts +0 -6
- package/src/components/dispatch/DispatchExecNavigator.tsx +0 -273
- package/src/components/executiontasks/CompletedWFSchema.ts +0 -24
- package/src/components/executiontasks/ExecutionTasksIndex.ts +0 -137
- package/src/components/executiontasks/cancellation/CancelET.tsx +0 -281
- package/src/components/executiontasks/cancellation/CancellationSchema.ts +0 -30
- package/src/components/executiontasks/captureInput/CaptureInputSchema.ts +0 -52
- package/src/components/executiontasks/captureInput/CaptureText.tsx +0 -172
- package/src/components/executiontasks/captureInput/utils.ts +0 -9
- package/src/components/executiontasks/deliver/DeliverET.tsx +0 -124
- package/src/components/executiontasks/deliver/DeliverETInput.ts +0 -51
- package/src/components/executiontasks/deliver/SLDeliverET.tsx +0 -515
- package/src/components/executiontasks/display/DisplayModalET.tsx +0 -174
- package/src/components/executiontasks/display/DisplaySchema.ts +0 -29
- package/src/components/executiontasks/doodle/SignatureET.tsx +0 -320
- package/src/components/executiontasks/doodle/SignatureSchema.ts +0 -51
- package/src/components/executiontasks/dropCash/DropCashET.tsx +0 -145
- package/src/components/executiontasks/dropCash/DropCashSchema.ts +0 -22
- package/src/components/executiontasks/dropCash/SLDropCash.tsx +0 -286
- package/src/components/executiontasks/forms/FormGenerator.tsx +0 -282
- package/src/components/executiontasks/forms/FormSchema.ts +0 -29
- package/src/components/executiontasks/forms/widgets/DateTimeWidget.tsx +0 -144
- package/src/components/executiontasks/forms/widgets/DropdownWidget.tsx +0 -52
- package/src/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.tsx +0 -158
- package/src/components/executiontasks/forms/widgets/TimeRangeSelector.tsx +0 -38
- package/src/components/executiontasks/httpRequest/HttpEtUtils.ts +0 -49
- package/src/components/executiontasks/httpRequest/HttpRequestET.tsx +0 -59
- package/src/components/executiontasks/httpRequest/HttpRequestETSchema.ts +0 -42
- package/src/components/executiontasks/imageCapture/CaptureSchema.ts +0 -93
- package/src/components/executiontasks/imageCapture/CaptureUtils.ts +0 -326
- package/src/components/executiontasks/imageCapture/ImageCapture.tsx +0 -363
- package/src/components/executiontasks/payments/PaymentStyles.ts +0 -93
- package/src/components/executiontasks/payments/PaymentUtils.ts +0 -7
- package/src/components/executiontasks/payments/completePayment/CompletePaymentET.tsx +0 -237
- package/src/components/executiontasks/payments/completePayment/CompletePaymentSchema.ts +0 -23
- package/src/components/executiontasks/payments/init/InitPaymentET.tsx +0 -247
- package/src/components/executiontasks/payments/init/InitPaymentSchema.ts +0 -37
- package/src/components/executiontasks/payments/processPayment/ProcessPaymentET.tsx +0 -272
- package/src/components/executiontasks/payments/processPayment/ProcessPaymentSchema.ts +0 -38
- package/src/components/executiontasks/pickup/PickpSchema.ts +0 -29
- package/src/components/executiontasks/pickup/PickupET.tsx +0 -126
- package/src/components/executiontasks/pickup/SLPickupET.tsx +0 -370
- package/src/components/executiontasks/scan/ScanET.tsx +0 -1059
- package/src/components/executiontasks/scan/ScanSchema.ts +0 -121
- package/src/components/executiontasks/scan/constants.ts +0 -6
- package/src/components/executiontasks/scan/interfaces.ts +0 -109
- package/src/components/executiontasks/scan/modalConstant.ts +0 -120
- package/src/components/executiontasks/scan/sub_components/CScanner.tsx +0 -107
- package/src/components/executiontasks/scan/sub_components/DropDownUtils.ts +0 -119
- package/src/components/executiontasks/scan/sub_components/ERDropDown.tsx +0 -134
- package/src/components/executiontasks/scan/sub_components/SummaryPage.tsx +0 -1296
- package/src/components/executiontasks/scan/utils.ts +0 -1108
- package/src/components/executiontasks/validateOTP/ValidateOTPET.tsx +0 -436
- package/src/components/executiontasks/validateOTP/ValidateOTPSchema.ts +0 -68
- package/src/components/executiontasks/validateOTP/constants.ts +0 -24
- package/src/components/executiontasks/validateOTP/sub-components/OTPInput.tsx +0 -83
- package/src/components/executiontasks/validateOTP/utils.ts +0 -180
- package/src/components/executiontasks/verifyInput/VerifyInputSchema.ts +0 -49
- package/src/components/executiontasks/verifyLocation/GeofenceUtils.ts +0 -55
- package/src/components/executiontasks/verifyLocation/VerifyLocSchema.ts +0 -56
- package/src/components/executiontasks/verifyLocation/VerifyLocationET.tsx +0 -69
- package/src/components/executiontasks/verifyOtp/VerifyOtpET.tsx +0 -96
- package/src/components/executiontasks/verifyOtp/VerifyOtpSchema.ts +0 -27
- package/src/components/utils/index.ts +0 -18
- package/src/components/widgets/AlertDisplay.tsx +0 -38
- package/src/components/widgets/CancelOrderDialog.tsx +0 -112
- package/src/components/widgets/Card.tsx +0 -99
- package/src/components/widgets/GoBackModal.tsx +0 -49
- package/src/components/widgets/IconButton.tsx +0 -32
- package/src/components/widgets/ModalWidget.tsx +0 -157
- package/src/components/widgets/ProgressDialog.tsx +0 -54
- package/src/components/widgets/SearchBar.tsx +0 -71
- package/src/components/widgets/SnackBarCustom.tsx +0 -212
- package/src/components/widgets/SplitTextInput.tsx +0 -116
- package/src/components/widgets/TabsComponent.tsx +0 -84
- package/src/components/widgets/Toaster.ts +0 -8
- package/src/config/DispatchSDKConfig.ts +0 -4
- package/src/constants/apiConstants.ts +0 -11
- package/src/constants/constants.ts +0 -12
- package/src/constants/statuscode.ts +0 -8
- package/src/errors/BaseError.ts +0 -16
- package/src/errors/ErrorCodes.ts +0 -38
- package/src/events/EventDispatcher.ts +0 -22
- package/src/events/EventListener.ts +0 -14
- package/src/events/constants.ts +0 -7
- package/src/events/index.ts +0 -3
- package/src/events/interface.ts +0 -1
- package/src/icons/ScanIcon.tsx +0 -24
- package/src/icons/circleMark.svg +0 -3
- package/src/icons/file.tsx +0 -24
- package/src/icons/interface.ts +0 -5
- package/src/index.tsx +0 -80
- package/src/locale/Str.ts +0 -13
- package/src/locale/en.json +0 -6
- package/src/locale/i18n.ts +0 -22
- package/src/locale/util.ts +0 -20
- package/src/manager/dispatch/DispatchStateContainer.tsx +0 -842
- package/src/manager/dispatchCodes/EventCodeContainer.ts +0 -75
- package/src/manager/dispatchCodes/EventCodeRepo.ts +0 -82
- package/src/manager/dispatchCodes/ReasonCodeContainer.ts +0 -121
- package/src/manager/dispatchCodes/ReasonCodeRepo.ts +0 -90
- package/src/manager/dispatchCodes/reasonCodes.json +0 -137
- package/src/manager/jobRemoval/JobRemovalManager.ts +0 -21
- package/src/manager/location/LocationManager.ts +0 -77
- package/src/manager/sdk/DispatchSDKManager.ts +0 -99
- package/src/manager/sdk/DispatchSdkCache.ts +0 -47
- package/src/manager/sdk/callbacksHandler.ts +0 -25
- package/src/manager/syncmanager/AppSyncManager.ts +0 -187
- package/src/manager/syncmanager/DBConfig.ts +0 -181
- package/src/manager/syncmanager/NativeSyncManager.ts +0 -14
- package/src/manager/syncmanager/constants.ts +0 -5
- package/src/manager/syncmanager/database.ts +0 -93
- package/src/manager/syncmanager/document/DocumentHttpClient.ts +0 -111
- package/src/manager/syncmanager/document/DocumentManager.ts +0 -143
- package/src/manager/syncmanager/document/DocumentSyncManager.ts +0 -233
- package/src/manager/syncmanager/document/models.ts +0 -4
- package/src/manager/syncmanager/events/ETEventsManager.ts +0 -647
- package/src/manager/syncmanager/events/EventsGraphQLClient.ts +0 -0
- package/src/manager/syncmanager/events/EventsSyncManager.ts +0 -490
- package/src/manager/syncmanager/events/SyncHttpClient.ts +0 -202
- package/src/models/DispatchModels.ts +0 -97
- package/src/models/ReasonCodes.ts +0 -12
- package/src/models/auth.ts +0 -43
- package/src/models/execTasks/ETBaseModels.ts +0 -113
- package/src/models/execTasks/ETConfig.ts +0 -94
- package/src/models/execution.ts +0 -9
- package/src/models/fcm.ts +0 -6
- package/src/models/sdk.ts +0 -35
- package/src/native/signature/SignatureCapture.tsx +0 -110
- package/src/network/GraphQLClient.ts +0 -147
- package/src/network/NetworkClient.ts +0 -58
- package/src/network/NetworkUtils.ts +0 -41
- package/src/network/Queries.ts +0 -46
- package/src/network/client.ts +0 -61
- package/src/res/strings.ts +0 -1
- package/src/resources/Login.ts +0 -36
- package/src/resources/network.ts +0 -13
- package/src/styles/SdkColors.ts +0 -24
- package/src/styles/executionTasks/CommonStyles.ts +0 -188
- package/src/ui/screens/CancellationScreen.tsx +0 -144
- package/src/ui/screens/CaptureInputScreen.tsx +0 -79
- package/src/ui/screens/CompleteObjectiveScreen.tsx +0 -72
- package/src/ui/screens/DeliverScreen.tsx +0 -117
- package/src/ui/screens/DisplayScreen.tsx +0 -52
- package/src/ui/screens/DoodleScreen.tsx +0 -84
- package/src/ui/screens/DropCashScreen.tsx +0 -113
- package/src/ui/screens/ETScreensIndex.ts +0 -35
- package/src/ui/screens/FormsScreen.tsx +0 -164
- package/src/ui/screens/GeofenceScreen.tsx +0 -54
- package/src/ui/screens/HttpRequestScreen.tsx +0 -47
- package/src/ui/screens/ImageCaptureScreen.tsx +0 -77
- package/src/ui/screens/PaymentScreen.tsx +0 -191
- package/src/ui/screens/PickupScreen.tsx +0 -85
- package/src/ui/screens/ScanScreen.tsx +0 -159
- package/src/ui/screens/StartWorkFlowScreen.tsx +0 -233
- package/src/ui/screens/ValidateOTPScreen.tsx +0 -62
- package/src/ui/screens/WithBaseDispatchScreen.tsx +0 -33
- package/src/ui/uiConfig/RouteParams.ts +0 -28
- package/src/utils/ApiUtils.ts +0 -157
- package/src/utils/ExecTaskUtils.ts +0 -214
- package/src/utils/Logger.ts +0 -110
- package/src/utils/NetworkUtil.ts +0 -50
- package/src/utils/SdkUtils.ts +0 -155
- package/src/utils/SyncManagerUtils.ts +0 -223
- package/src/utils/fcm/FCM.ts +0 -118
- package/src/utils/fcm/FcmUtils.ts +0 -130
- package/src/utils/helper.ts +0 -24
- package/src/utils/hooks/useModal.tsx +0 -67
- package/src/utils/hooks/useTimer.ts +0 -44
- package/src/utils/loginHelper.ts +0 -51
- package/src/utils/storage.ts +0 -292
- package/src/utils/test.json +0 -17
- package/src/utils/utils.ts +0 -30
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BackHandler, Text, View, Modal, StyleSheet
|
|
1
|
+
import { BackHandler, Text, View, Modal, StyleSheet } from 'react-native';
|
|
2
2
|
import React, { useState, useLayoutEffect, useEffect } from 'react';
|
|
3
3
|
import { Button, Portal, Provider, TextInput } from 'react-native-paper';
|
|
4
4
|
import { CommonStyles, DeliverPickupStyles, Fonts } from '../../../styles/executionTasks/CommonStyles';
|
|
@@ -6,16 +6,11 @@ import { getBaseETResponse } from '../../../utils/ExecTaskUtils';
|
|
|
6
6
|
import { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';
|
|
7
7
|
import { EntityCode, ExecutionTaskID } from '../../../models/execTasks/ETConfig';
|
|
8
8
|
import { isEmptyOrBlank } from '../../../utils/utils';
|
|
9
|
-
import { DEFAULT_DELIVER_TITLE, GO_BACK_EVENT_CODE } from '../../../constants/constants';
|
|
9
|
+
import { DEFAULT_DELIVER_MESSAGE, DEFAULT_DELIVER_TITLE, GO_BACK_EVENT_CODE } from '../../../constants/constants';
|
|
10
10
|
import Icon from 'react-native-vector-icons/MaterialIcons';
|
|
11
11
|
import GoBackModal from '../../../components/widgets/GoBackModal';
|
|
12
12
|
import { hasGoBackConnector } from '../../../components/utils';
|
|
13
13
|
import { useFocusEffect } from '@react-navigation/native';
|
|
14
|
-
import { getStr, getStrVal } from '../../../locale/util';
|
|
15
|
-
import Str from '../../../locale/Str';
|
|
16
|
-
import CircleMark from '../../../icons/circleMark.svg';
|
|
17
|
-
import { TouchableOpacity } from 'react-native';
|
|
18
|
-
import ModalWidget from '../../../components/widgets/ModalWidget';
|
|
19
14
|
const ListItem = _ref => {
|
|
20
15
|
let {
|
|
21
16
|
lineItem
|
|
@@ -38,8 +33,8 @@ export const renderItem = _ref2 => {
|
|
|
38
33
|
};
|
|
39
34
|
const getMessage = (returnPackageCount, message) => {
|
|
40
35
|
try {
|
|
41
|
-
const msg = message ||
|
|
42
|
-
return msg;
|
|
36
|
+
const msg = message || DEFAULT_DELIVER_MESSAGE;
|
|
37
|
+
return returnPackageCount && returnPackageCount >= 1 ? msg.replace('$', (returnPackageCount === null || returnPackageCount === void 0 ? void 0 : returnPackageCount.toString()) || '') : msg.replace('$', '');
|
|
43
38
|
} catch (error) {
|
|
44
39
|
return message || '';
|
|
45
40
|
}
|
|
@@ -50,12 +45,9 @@ const DeliverET = props => {
|
|
|
50
45
|
const [disableYes, setDisableYes] = useState(false);
|
|
51
46
|
const [disableConfirm, setDisableConfirm] = useState(false);
|
|
52
47
|
const [showBackModal, setShowBackModal] = useState(false);
|
|
53
|
-
const [goBack, setGoBack] = useState(false);
|
|
54
48
|
useEffect(() => setPkgCount(`${props.returnPackageCount}`), [props.returnPackageCount]);
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
setShowDeliverModal
|
|
58
|
-
} = props;
|
|
49
|
+
const [showDeliverModal, setshowDeliverModal] = useState(true);
|
|
50
|
+
|
|
59
51
|
// Handle back-button click when scanList was being viewed
|
|
60
52
|
useFocusEffect(React.useCallback(() => {
|
|
61
53
|
const onBackPress = () => {
|
|
@@ -78,10 +70,7 @@ const DeliverET = props => {
|
|
|
78
70
|
return /*#__PURE__*/React.createElement(Icon, {
|
|
79
71
|
onPress: () => {
|
|
80
72
|
var _props$taskMeta2;
|
|
81
|
-
if ((_props$taskMeta2 = props.taskMeta) !== null && _props$taskMeta2 !== void 0 && _props$taskMeta2.enableGoBack && hasGoBackConnector(props.applicableReasons)) setShowBackModal(true);else
|
|
82
|
-
setShowDeliverModal(false);
|
|
83
|
-
props.navigation.goBack();
|
|
84
|
-
}
|
|
73
|
+
if ((_props$taskMeta2 = props.taskMeta) !== null && _props$taskMeta2 !== void 0 && _props$taskMeta2.enableGoBack && hasGoBackConnector(props.applicableReasons)) setShowBackModal(true);else props.navigation.goBack();
|
|
85
74
|
},
|
|
86
75
|
name: "arrow-back",
|
|
87
76
|
color: 'black',
|
|
@@ -107,58 +96,19 @@ const DeliverET = props => {
|
|
|
107
96
|
onFailure: () => setShowBackModal(false)
|
|
108
97
|
});
|
|
109
98
|
};
|
|
110
|
-
const renderGoBackModal = () => {
|
|
111
|
-
return /*#__PURE__*/React.createElement(ModalWidget, {
|
|
112
|
-
dismissable: true,
|
|
113
|
-
showModal: goBack,
|
|
114
|
-
title: {
|
|
115
|
-
label: `Are you sure you want to exit ${DEFAULT_DELIVER_TITLE}?`
|
|
116
|
-
},
|
|
117
|
-
subTitle: {
|
|
118
|
-
label: 'All progress will be lost',
|
|
119
|
-
styles: {
|
|
120
|
-
alignSelf: 'center'
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
primaryButton: {
|
|
124
|
-
label: 'Exit',
|
|
125
|
-
onPress: async () => {
|
|
126
|
-
var _props$taskMeta3;
|
|
127
|
-
if ((_props$taskMeta3 = props.taskMeta) !== null && _props$taskMeta3 !== void 0 && _props$taskMeta3.enableGoBack && hasGoBackConnector(props.applicableReasons)) {
|
|
128
|
-
props.onSubmitET({
|
|
129
|
-
...(await getBaseETResponse(EntityCode.DELIVER, false, GO_BACK_EVENT_CODE, '', props.mergedObjectiveId, ExecutionTaskID.DELIVER))
|
|
130
|
-
});
|
|
131
|
-
setShowBackModal(false);
|
|
132
|
-
} else {
|
|
133
|
-
props.navigation.goBack();
|
|
134
|
-
}
|
|
135
|
-
setShowBackModal(false);
|
|
136
|
-
},
|
|
137
|
-
styles: styles.primaryButtonStyles
|
|
138
|
-
},
|
|
139
|
-
secondaryButton: {
|
|
140
|
-
label: 'Cancel',
|
|
141
|
-
onPress: () => {
|
|
142
|
-
setGoBack(false);
|
|
143
|
-
setShowDeliverModal(true);
|
|
144
|
-
},
|
|
145
|
-
styles: styles.secondaryButtonStyles
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
};
|
|
149
99
|
if (props.confirmCustodyExchange) {
|
|
150
100
|
return /*#__PURE__*/React.createElement(Provider, null, /*#__PURE__*/React.createElement(Portal, null, renderModal()), /*#__PURE__*/React.createElement(View, {
|
|
151
101
|
style: styles.container
|
|
152
102
|
}, /*#__PURE__*/React.createElement(Modal, {
|
|
153
103
|
visible: showDeliverModal,
|
|
154
104
|
onRequestClose: () => {
|
|
155
|
-
var _props$
|
|
156
|
-
if ((_props$
|
|
157
|
-
|
|
105
|
+
var _props$taskMeta3;
|
|
106
|
+
if ((_props$taskMeta3 = props.taskMeta) !== null && _props$taskMeta3 !== void 0 && _props$taskMeta3.enableGoBack && hasGoBackConnector(props.applicableReasons)) {
|
|
107
|
+
setshowDeliverModal(false);
|
|
158
108
|
setShowBackModal(true);
|
|
159
109
|
return true;
|
|
160
110
|
} else {
|
|
161
|
-
|
|
111
|
+
setshowDeliverModal(false);
|
|
162
112
|
props.navigation.goBack();
|
|
163
113
|
return true;
|
|
164
114
|
}
|
|
@@ -181,7 +131,7 @@ const DeliverET = props => {
|
|
|
181
131
|
style: styles.returnView
|
|
182
132
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
183
133
|
style: styles.subTitle
|
|
184
|
-
},
|
|
134
|
+
}, 'Expected Shipments'), /*#__PURE__*/React.createElement(Text, {
|
|
185
135
|
style: styles.title
|
|
186
136
|
}, props.returnPackageCount)), props.confirmShipments ? /*#__PURE__*/React.createElement(View, {
|
|
187
137
|
style: {
|
|
@@ -192,11 +142,11 @@ const DeliverET = props => {
|
|
|
192
142
|
flex: 1,
|
|
193
143
|
fontSize: 14,
|
|
194
144
|
lineHeight: 24,
|
|
195
|
-
fontFamily:
|
|
145
|
+
fontFamily: Fonts.IBMPlexSans_400Regular
|
|
196
146
|
},
|
|
197
147
|
multiline: false,
|
|
198
148
|
autoComplete: 'off',
|
|
199
|
-
label:
|
|
149
|
+
label: `Shipment(s) handed over`,
|
|
200
150
|
value: pkgCount,
|
|
201
151
|
mode: 'outlined',
|
|
202
152
|
error: !isEmptyOrBlank(inputError),
|
|
@@ -236,18 +186,18 @@ const DeliverET = props => {
|
|
|
236
186
|
}
|
|
237
187
|
}, "Confirm")))))));
|
|
238
188
|
} else {
|
|
239
|
-
return /*#__PURE__*/React.createElement(Provider, null, /*#__PURE__*/React.createElement(Portal, null, renderModal()), /*#__PURE__*/React.createElement(
|
|
189
|
+
return /*#__PURE__*/React.createElement(Provider, null, /*#__PURE__*/React.createElement(Portal, null, renderModal()), /*#__PURE__*/React.createElement(View, {
|
|
240
190
|
style: styles.container
|
|
241
191
|
}, /*#__PURE__*/React.createElement(Modal, {
|
|
242
192
|
visible: showDeliverModal,
|
|
243
193
|
onRequestClose: () => {
|
|
244
|
-
var _props$
|
|
245
|
-
if ((_props$
|
|
246
|
-
|
|
194
|
+
var _props$taskMeta4;
|
|
195
|
+
if ((_props$taskMeta4 = props.taskMeta) !== null && _props$taskMeta4 !== void 0 && _props$taskMeta4.enableGoBack && hasGoBackConnector(props.applicableReasons)) {
|
|
196
|
+
setshowDeliverModal(false);
|
|
247
197
|
setShowBackModal(true);
|
|
248
198
|
return true;
|
|
249
199
|
} else {
|
|
250
|
-
|
|
200
|
+
setshowDeliverModal(false);
|
|
251
201
|
props.navigation.goBack();
|
|
252
202
|
return true;
|
|
253
203
|
}
|
|
@@ -256,27 +206,13 @@ const DeliverET = props => {
|
|
|
256
206
|
style: styles.modalView
|
|
257
207
|
}, /*#__PURE__*/React.createElement(View, {
|
|
258
208
|
style: styles.modalStyle
|
|
259
|
-
}, /*#__PURE__*/React.createElement(
|
|
260
|
-
onPress: () => {
|
|
261
|
-
setShowDeliverModal(false);
|
|
262
|
-
setGoBack(true);
|
|
263
|
-
},
|
|
264
|
-
style: styles.crossIcon,
|
|
265
|
-
hitSlop: {
|
|
266
|
-
bottom: 10,
|
|
267
|
-
top: 10,
|
|
268
|
-
right: 10,
|
|
269
|
-
left: 10
|
|
270
|
-
}
|
|
271
|
-
}, /*#__PURE__*/React.createElement(CircleMark, null)), /*#__PURE__*/React.createElement(View, {
|
|
209
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
272
210
|
style: styles.modalBody
|
|
273
211
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
274
212
|
style: DeliverPickupStyles.titleText
|
|
275
213
|
}, props.title || DEFAULT_DELIVER_TITLE), /*#__PURE__*/React.createElement(Text, {
|
|
276
214
|
style: DeliverPickupStyles.messageText
|
|
277
|
-
}, getMessage(props.returnPackageCount, props.message)), /*#__PURE__*/React.createElement(
|
|
278
|
-
style: DeliverPickupStyles.messageText
|
|
279
|
-
}, props !== null && props !== void 0 && props.shipCount ? getStrVal(Str.shipments, Str.count, props.shipCount) : '')), /*#__PURE__*/React.createElement(View, {
|
|
215
|
+
}, getMessage(props.returnPackageCount, props.message))), /*#__PURE__*/React.createElement(View, {
|
|
280
216
|
style: styles.bottomButtons
|
|
281
217
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
282
218
|
disabled: disableYes,
|
|
@@ -303,7 +239,6 @@ const DeliverET = props => {
|
|
|
303
239
|
uppercase: false,
|
|
304
240
|
onPress: async () => {
|
|
305
241
|
var _props$applicableReas3;
|
|
306
|
-
setShowDeliverModal(false);
|
|
307
242
|
props.onSubmitET({
|
|
308
243
|
...(await getBaseETResponse(EntityCode.DELIVER, false, getEventCodeByET(ExecutionTaskID.DELIVER, false, (_props$applicableReas3 = props.applicableReasons) === null || _props$applicableReas3 === void 0 ? void 0 : _props$applicableReas3.failure), '', props.mergedObjectiveId, ExecutionTaskID.DELIVER))
|
|
309
244
|
});
|
|
@@ -332,9 +267,6 @@ const styles = StyleSheet.create({
|
|
|
332
267
|
paddingHorizontal: 40,
|
|
333
268
|
alignItems: 'center'
|
|
334
269
|
},
|
|
335
|
-
crossIcon: {
|
|
336
|
-
alignSelf: 'flex-end'
|
|
337
|
-
},
|
|
338
270
|
bottomButtons: {
|
|
339
271
|
marginTop: 12
|
|
340
272
|
},
|
|
@@ -344,7 +276,7 @@ const styles = StyleSheet.create({
|
|
|
344
276
|
flexDirection: 'row'
|
|
345
277
|
},
|
|
346
278
|
subTitle: {
|
|
347
|
-
fontFamily:
|
|
279
|
+
fontFamily: Fonts.IBMPlexSans_400Regular,
|
|
348
280
|
fontStyle: 'normal',
|
|
349
281
|
fontWeight: '400',
|
|
350
282
|
fontSize: 14,
|
|
@@ -359,21 +291,7 @@ const styles = StyleSheet.create({
|
|
|
359
291
|
lineHeight: 28,
|
|
360
292
|
fontStyle: 'normal',
|
|
361
293
|
color: '#111111',
|
|
362
|
-
fontFamily:
|
|
363
|
-
},
|
|
364
|
-
primaryButtonStyles: {
|
|
365
|
-
marginTop: 16,
|
|
366
|
-
height: 40,
|
|
367
|
-
borderRadius: 6,
|
|
368
|
-
justifyContent: 'center',
|
|
369
|
-
alignItems: 'center'
|
|
370
|
-
},
|
|
371
|
-
secondaryButtonStyles: {
|
|
372
|
-
marginVertical: 16,
|
|
373
|
-
height: 40,
|
|
374
|
-
borderRadius: 6,
|
|
375
|
-
justifyContent: 'center',
|
|
376
|
-
alignItems: 'center'
|
|
294
|
+
fontFamily: Fonts.IBMPlexSans_600SemiBold
|
|
377
295
|
}
|
|
378
296
|
});
|
|
379
297
|
//# sourceMappingURL=SLDeliverET.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BackHandler","Text","View","Modal","StyleSheet","Platform","React","useState","useLayoutEffect","useEffect","Button","Portal","Provider","TextInput","CommonStyles","DeliverPickupStyles","Fonts","getBaseETResponse","getEventCodeByET","EntityCode","ExecutionTaskID","isEmptyOrBlank","DEFAULT_DELIVER_TITLE","GO_BACK_EVENT_CODE","Icon","GoBackModal","hasGoBackConnector","useFocusEffect","getStr","getStrVal","Str","CircleMark","TouchableOpacity","ModalWidget","ListItem","_ref","lineItem","createElement","style","justifyContent","itemTextStyle","skuId","renderItem","_ref2","item","getMessage","returnPackageCount","message","msg","DEFAULT_DELIVER_MESSAGE","count","error","DeliverET","props","pkgCount","setPkgCount","confirmShipments","inputError","setInputError","disableYes","setDisableYes","disableConfirm","setDisableConfirm","showBackModal","setShowBackModal","goBack","setGoBack","showDeliverModal","setShowDeliverModal","useCallback","onBackPress","_props$taskMeta","taskMeta","enableGoBack","applicableReasons","navigation","addEventListener","removeEventListener","setOptions","title","headerLeft","onPress","_props$taskMeta2","name","color","size","paddingRight","paddingTop","renderModal","showModal","setShowModal","onSuccess","onSubmitET","DELIVER","mergedObjectiveId","onFailure","renderGoBackModal","dismissable","label","subTitle","styles","alignSelf","primaryButton","_props$taskMeta3","primaryButtonStyles","secondaryButton","secondaryButtonStyles","confirmCustodyExchange","container","visible","onRequestClose","_props$taskMeta4","modalView","modalStyle","alignItems","paddingHorizontal","titleText","returnView","Expected_Shipments","Expected_Shipment","flexDirection","flex","fontSize","lineHeight","fontFamily","OS","IBMPlexSans_400Regular","multiline","autoComplete","Number","Shipments_handed_over","Shipment_handed_over","value","mode","selectionColor","keyboardType","onChangeText","text","bottomButtons","disabled","nextButton","marginTop","labelStyle","nextButtonLabel","uppercase","isNaN","_props$applicableReas","success","remark","_props$taskMeta5","crossIcon","hitSlop","bottom","top","right","left","modalBody","messageText","shipCount","shipments","_props$applicableReas2","restrictCancel","cancelButtonLabel","cancelButton","_props$applicableReas3","failure","create","backgroundColor","padding","borderRadius","elevation","marginBottom","fontStyle","fontWeight","textAlign","IBMPlexSans_600SemiBold","height","marginVertical"],"sources":["SLDeliverET.tsx"],"sourcesContent":["import type { DeliverETInput } from './DeliverETInput';\nimport {\n BackHandler,\n FlatList,\n Text,\n View,\n Modal,\n StyleSheet,\n Platform,\n} from 'react-native';\nimport React, { useState, useLayoutEffect, useEffect } from 'react';\nimport { Button, Portal, Provider, TextInput } from 'react-native-paper';\n\nimport {\n CommonStyles,\n DeliverPickupStyles,\n Fonts,\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';\nimport { isEmptyOrBlank } from '../../../utils/utils';\nimport type { LineItem } from '../deliver/DeliverETInput';\nimport {\n DEFAULT_DELIVER_TITLE,\n GO_BACK_EVENT_CODE,\n} from '../../../constants/constants';\nimport Icon from 'react-native-vector-icons/MaterialIcons';\nimport GoBackModal from '../../../components/widgets/GoBackModal';\nimport { hasGoBackConnector } from '../../../components/utils';\nimport { useFocusEffect } from '@react-navigation/native';\nimport { getStr, getStrVal } from '../../../locale/util';\nimport Str from '../../../locale/Str';\nimport CircleMark from '../../../icons/circleMark.svg';\nimport { TouchableOpacity } from 'react-native';\nimport ModalWidget from '../../../components/widgets/ModalWidget';\n\nconst ListItem = ({ lineItem }: { lineItem: LineItem }) => (\n <View style={{ justifyContent: 'center' }}>\n <Text style={DeliverPickupStyles.itemTextStyle}>\n {`Order ID: ${lineItem.skuId}`}\n </Text>\n </View>\n);\n\nexport const renderItem = ({ item }: { item: LineItem }) => (\n <ListItem lineItem={item} />\n);\n\nconst getMessage = (\n returnPackageCount: number | undefined,\n message: string | undefined\n) => {\n try {\n const msg = message || getStrVal(Str.DEFAULT_DELIVER_MESSAGE, Str.count, returnPackageCount && returnPackageCount >= 1 ? returnPackageCount : '');\n return msg;\n } catch (error: any) {\n return message || '';\n }\n};\n\nconst DeliverET = (props: DeliverETInput) => {\n const [pkgCount, setPkgCount] = useState(\n props.confirmShipments ? '' : `${props.returnPackageCount}`\n );\n const [inputError, setInputError] = useState('');\n const [disableYes, setDisableYes] = useState(false);\n const [disableConfirm, setDisableConfirm] = useState(false);\n\n const [showBackModal, setShowBackModal] = useState(false);\n const [goBack, setGoBack] = useState(false);\n useEffect(\n () => setPkgCount(`${props.returnPackageCount}`),\n [props.returnPackageCount]\n );\n\n const { showDeliverModal, setShowDeliverModal } = props;\n // Handle back-button click when scanList was being viewed\n useFocusEffect(\n React.useCallback(() => {\n const onBackPress = () => {\n if (\n props.taskMeta?.enableGoBack &&\n hasGoBackConnector(props.applicableReasons)\n ) {\n setShowBackModal(true);\n return true;\n } else {\n props.navigation.goBack();\n\n return true;\n }\n };\n BackHandler.addEventListener('hardwareBackPress', onBackPress);\n return () =>\n BackHandler.removeEventListener('hardwareBackPress', onBackPress);\n }, [])\n );\n\n useLayoutEffect(() => {\n props.navigation.setOptions({\n title: props.title,\n headerLeft: () => {\n return (\n <Icon\n onPress={() => {\n if (\n props.taskMeta?.enableGoBack &&\n hasGoBackConnector(props.applicableReasons)\n )\n setShowBackModal(true);\n else {\n setShowDeliverModal(false);\n props.navigation.goBack();\n }\n }}\n name=\"arrow-back\"\n color={'black'}\n size={25}\n style={{\n paddingRight: 15,\n paddingTop: 5,\n }}\n />\n );\n },\n });\n }, [props.navigation, props.title]);\n\n const renderModal = () => {\n return (\n <GoBackModal\n showModal={showBackModal}\n setShowModal={setShowBackModal}\n onSuccess={async () => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.DELIVER,\n false,\n GO_BACK_EVENT_CODE,\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.DELIVER\n )),\n });\n setShowBackModal(false);\n }}\n onFailure={() => setShowBackModal(false)}\n />\n );\n };\n\n const renderGoBackModal = () => {\n return (\n <ModalWidget\n dismissable={true}\n showModal={goBack}\n title={{\n label: `Are you sure you want to exit ${DEFAULT_DELIVER_TITLE}?`,\n }}\n subTitle={{\n label: 'All progress will be lost',\n styles: {\n alignSelf: 'center',\n },\n }}\n primaryButton={{\n label: 'Exit',\n onPress: async () => {\n if (\n props.taskMeta?.enableGoBack &&\n hasGoBackConnector(props.applicableReasons)\n ) {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.DELIVER,\n false,\n GO_BACK_EVENT_CODE,\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.DELIVER\n )),\n });\n setShowBackModal(false);\n } else {\n props.navigation.goBack();\n }\n setShowBackModal(false);\n },\n styles: styles.primaryButtonStyles,\n }}\n secondaryButton={{\n label: 'Cancel',\n onPress: () => {\n setGoBack(false);\n setShowDeliverModal(true);\n },\n styles: styles.secondaryButtonStyles,\n }}\n />\n );\n };\n\n if (props.confirmCustodyExchange) {\n return (\n <Provider>\n <Portal>{renderModal()}</Portal>\n <View style={styles.container}>\n <Modal\n visible={showDeliverModal}\n onRequestClose={() => {\n if (\n props.taskMeta?.enableGoBack &&\n hasGoBackConnector(props.applicableReasons)\n ) {\n setShowDeliverModal(false);\n setShowBackModal(true);\n return true;\n } else {\n setShowDeliverModal(false);\n props.navigation.goBack();\n return true;\n }\n }}\n >\n <View style={styles.modalView}>\n <View style={styles.modalStyle}>\n <View style={{ alignItems: 'center' }}>\n <View style={{ paddingHorizontal: 60 }}>\n <Text style={DeliverPickupStyles.titleText}>\n {props.title || DEFAULT_DELIVER_TITLE}\n </Text>\n </View>\n <View style={styles.returnView}>\n <Text style={styles.subTitle}>{getStr(props.returnPackageCount ? props.returnPackageCount > 1 ? Str.Expected_Shipments : Str.Expected_Shipment : Str.Expected_Shipments)}</Text>\n <Text style={styles.title}>{props.returnPackageCount}</Text>\n </View>\n {props.confirmShipments ? (\n <View\n style={{\n flexDirection: 'row',\n }}\n >\n <TextInput\n style={{\n flex: 1,\n fontSize: 14,\n lineHeight: 24,\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_400Regular\n : 'IBMPlexSans-Regular',\n }}\n multiline={false}\n autoComplete={'off'}\n label={getStr(Number(pkgCount) > 1 ? Str.Shipments_handed_over : Str.Shipment_handed_over)}\n value={pkgCount}\n mode={'outlined'}\n error={!isEmptyOrBlank(inputError)}\n selectionColor={'#6200EE'}\n keyboardType={'numeric'}\n onChangeText={(text) => {\n setInputError('');\n setPkgCount(text);\n }}\n />\n </View>\n ) : null}\n\n {!isEmptyOrBlank(inputError) && (\n <Text style={{ color: '#B00020' }}>{inputError}</Text>\n )}\n </View>\n\n <View style={styles.bottomButtons}>\n <Button\n disabled={disableConfirm}\n style={[CommonStyles.nextButton, { marginTop: 20 }]}\n labelStyle={CommonStyles.nextButtonLabel}\n uppercase={false}\n mode={'contained'}\n onPress={async () => {\n if (\n !isEmptyOrBlank(pkgCount) &&\n !Number.isNaN(+pkgCount)\n ) {\n if (+pkgCount !== props.returnPackageCount) {\n setInputError(\n `Package count should be equal to ${props.returnPackageCount}`\n );\n return;\n }\n setDisableConfirm(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 props.mergedObjectiveId,\n ExecutionTaskID.DELIVER\n )),\n remark: `${pkgCount} Packages returned`,\n });\n } else setInputError('Please enter valid count.');\n }}\n >\n Confirm\n </Button>\n </View>\n </View>\n </View>\n </Modal>\n </View>\n </Provider>\n );\n } else {\n return (\n <Provider>\n <Portal>{renderModal()}</Portal>\n <Portal>{renderGoBackModal()}</Portal>\n <View style={styles.container}>\n <Modal\n visible={showDeliverModal}\n onRequestClose={() => {\n if (\n props.taskMeta?.enableGoBack &&\n hasGoBackConnector(props.applicableReasons)\n ) {\n setShowDeliverModal(false);\n setShowBackModal(true);\n return true;\n } else {\n setShowDeliverModal(false);\n props.navigation.goBack();\n return true;\n }\n }}\n >\n <View style={styles.modalView}>\n <View style={styles.modalStyle}>\n <TouchableOpacity\n onPress={() => {\n setShowDeliverModal(false);\n setGoBack(true);\n }}\n style={styles.crossIcon}\n hitSlop={{ bottom: 10, top: 10, right: 10, left: 10 }}\n >\n <CircleMark />\n </TouchableOpacity>\n <View style={styles.modalBody}>\n <Text style={DeliverPickupStyles.titleText}>\n {props.title || DEFAULT_DELIVER_TITLE}\n </Text>\n <Text style={DeliverPickupStyles.messageText}>\n {getMessage(props.returnPackageCount, props.message)}\n </Text>\n <Text style={DeliverPickupStyles.messageText}>\n {props?.shipCount ? getStrVal(Str.shipments, Str.count, props.shipCount) : ''}\n </Text>\n\n {/* Removed showing the item when item.length === 1 */}\n {/* {props.returnPackageCount === 1 && props.items.length ? (\n <View style={{ justifyContent: 'center' }}>\n <Text\n style={DeliverPickupStyles.itemTextStyle}\n >{`Order ID: ${props.items[0].skuId}`}</Text>\n </View>\n ) : null} */}\n </View>\n <View style={styles.bottomButtons}>\n <Button\n disabled={disableYes}\n style={[CommonStyles.nextButton, { marginTop: 20 }]}\n labelStyle={CommonStyles.nextButtonLabel}\n uppercase={false}\n mode={'contained'}\n onPress={async () => {\n setDisableYes(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 props.mergedObjectiveId,\n ExecutionTaskID.DELIVER\n )),\n remark: '',\n });\n }}\n >\n Confirm\n </Button>\n {props.restrictCancel === true ? null : (\n <Button\n labelStyle={CommonStyles.cancelButtonLabel}\n style={[CommonStyles.cancelButton, { marginTop: 10 }]}\n mode={'outlined'}\n uppercase={false}\n onPress={async () => {\n setShowDeliverModal(false);\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 props.mergedObjectiveId,\n ExecutionTaskID.DELIVER\n )),\n });\n }}\n >\n Cancel\n </Button>\n )}\n </View>\n </View>\n </View>\n </Modal>\n </View>\n </Provider>\n );\n }\n};\n\nexport default DeliverET;\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n modalView: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n },\n modalStyle: {\n backgroundColor: 'white',\n padding: 20,\n borderRadius: 8,\n elevation: 5,\n },\n modalBody: {\n paddingHorizontal: 40,\n alignItems: 'center',\n },\n crossIcon: {\n alignSelf: 'flex-end',\n },\n bottomButtons: {\n marginTop: 12,\n },\n returnView: {\n marginTop: 15,\n marginBottom: 15,\n flexDirection: 'row',\n },\n subTitle: {\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_400Regular\n : 'IBMPlexSans-Regular',\n fontStyle: 'normal',\n fontWeight: '400',\n fontSize: 14,\n flex: 1,\n textAlign: 'left',\n lineHeight: 28,\n color: '#111111',\n },\n title: {\n textAlign: 'right',\n fontSize: 14,\n lineHeight: 28,\n fontStyle: 'normal',\n color: '#111111',\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_600SemiBold\n : 'IBMPlexSans-SemiBold',\n },\n primaryButtonStyles: {\n marginTop: 16,\n height: 40,\n borderRadius: 6,\n justifyContent: 'center',\n alignItems: 'center',\n },\n secondaryButtonStyles: {\n marginVertical: 16,\n height: 40,\n borderRadius: 6,\n justifyContent: 'center',\n alignItems: 'center',\n },\n});\n"],"mappings":"AACA,SACEA,WAAW,EAEXC,IAAI,EACJC,IAAI,EACJC,KAAK,EACLC,UAAU,EACVC,QAAQ,QACH,cAAc;AACrB,OAAOC,KAAK,IAAIC,QAAQ,EAAEC,eAAe,EAAEC,SAAS,QAAQ,OAAO;AACnE,SAASC,MAAM,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;AAExE,SACEC,YAAY,EACZC,mBAAmB,EACnBC,KAAK,QACA,6CAA6C;AACpD,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,SAASC,gBAAgB,QAAQ,mDAAmD;AACpF,SACEC,UAAU,EACVC,eAAe,QACV,oCAAoC;AAC3C,SAASC,cAAc,QAAQ,sBAAsB;AAErD,SACEC,qBAAqB,EACrBC,kBAAkB,QACb,8BAA8B;AACrC,OAAOC,IAAI,MAAM,yCAAyC;AAC1D,OAAOC,WAAW,MAAM,yCAAyC;AACjE,SAASC,kBAAkB,QAAQ,2BAA2B;AAC9D,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,MAAM,EAAEC,SAAS,QAAQ,sBAAsB;AACxD,OAAOC,GAAG,MAAM,qBAAqB;AACrC,OAAOC,UAAU,MAAM,+BAA+B;AACtD,SAASC,gBAAgB,QAAQ,cAAc;AAC/C,OAAOC,WAAW,MAAM,yCAAyC;AAEjE,MAAMC,QAAQ,GAAGC,IAAA;EAAA,IAAC;IAAEC;EAAiC,CAAC,GAAAD,IAAA;EAAA,oBACpD7B,KAAA,CAAA+B,aAAA,CAACnC,IAAI;IAACoC,KAAK,EAAE;MAAEC,cAAc,EAAE;IAAS;EAAE,gBACxCjC,KAAA,CAAA+B,aAAA,CAACpC,IAAI;IAACqC,KAAK,EAAEvB,mBAAmB,CAACyB;EAAc,GAC3C,aAAYJ,QAAQ,CA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;IACxB2E,UAAU,EAAE;EACd;AACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"names":["BackHandler","Text","View","Modal","StyleSheet","React","useState","useLayoutEffect","useEffect","Button","Portal","Provider","TextInput","CommonStyles","DeliverPickupStyles","Fonts","getBaseETResponse","getEventCodeByET","EntityCode","ExecutionTaskID","isEmptyOrBlank","DEFAULT_DELIVER_MESSAGE","DEFAULT_DELIVER_TITLE","GO_BACK_EVENT_CODE","Icon","GoBackModal","hasGoBackConnector","useFocusEffect","ListItem","_ref","lineItem","createElement","style","justifyContent","itemTextStyle","skuId","renderItem","_ref2","item","getMessage","returnPackageCount","message","msg","replace","toString","error","DeliverET","props","pkgCount","setPkgCount","confirmShipments","inputError","setInputError","disableYes","setDisableYes","disableConfirm","setDisableConfirm","showBackModal","setShowBackModal","showDeliverModal","setshowDeliverModal","useCallback","onBackPress","_props$taskMeta","taskMeta","enableGoBack","applicableReasons","navigation","goBack","addEventListener","removeEventListener","setOptions","title","headerLeft","onPress","_props$taskMeta2","name","color","size","paddingRight","paddingTop","renderModal","showModal","setShowModal","onSuccess","onSubmitET","DELIVER","mergedObjectiveId","onFailure","confirmCustodyExchange","styles","container","visible","onRequestClose","_props$taskMeta3","modalView","modalStyle","alignItems","paddingHorizontal","titleText","returnView","subTitle","flexDirection","flex","fontSize","lineHeight","fontFamily","IBMPlexSans_400Regular","multiline","autoComplete","label","value","mode","selectionColor","keyboardType","onChangeText","text","bottomButtons","disabled","nextButton","marginTop","labelStyle","nextButtonLabel","uppercase","Number","isNaN","_props$applicableReas","success","remark","_props$taskMeta4","modalBody","messageText","_props$applicableReas2","restrictCancel","cancelButtonLabel","cancelButton","_props$applicableReas3","failure","create","backgroundColor","padding","borderRadius","elevation","marginBottom","fontStyle","fontWeight","textAlign","IBMPlexSans_600SemiBold"],"sources":["SLDeliverET.tsx"],"sourcesContent":["import type { DeliverETInput } from './DeliverETInput';\nimport {\n BackHandler,\n FlatList,\n Text,\n View,\n Modal,\n StyleSheet,\n} from 'react-native';\nimport React, { useState, useLayoutEffect, useEffect } from 'react';\nimport { Button, Portal, Provider, TextInput } from 'react-native-paper';\n\nimport {\n CommonStyles,\n DeliverPickupStyles,\n Fonts,\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';\nimport { isEmptyOrBlank } from '../../../utils/utils';\nimport type { LineItem } from '../deliver/DeliverETInput';\nimport {\n DEFAULT_DELIVER_MESSAGE,\n DEFAULT_DELIVER_TITLE,\n GO_BACK_EVENT_CODE,\n} from '../../../constants/constants';\nimport Icon from 'react-native-vector-icons/MaterialIcons';\nimport GoBackModal from '../../../components/widgets/GoBackModal';\nimport { hasGoBackConnector } from '../../../components/utils';\nimport { useFocusEffect } from '@react-navigation/native';\n\nconst ListItem = ({ lineItem }: { lineItem: LineItem }) => (\n <View style={{ justifyContent: 'center' }}>\n <Text\n style={DeliverPickupStyles.itemTextStyle}\n >{`Order ID: ${lineItem.skuId}`}</Text>\n </View>\n);\n\nexport const renderItem = ({ item }: { item: LineItem }) => (\n <ListItem lineItem={item} />\n);\n\nconst getMessage = (\n returnPackageCount: number | undefined,\n message: string | undefined\n) => {\n try {\n const msg = message || DEFAULT_DELIVER_MESSAGE;\n return returnPackageCount && returnPackageCount >= 1\n ? msg.replace('$', returnPackageCount?.toString() || '')\n : msg.replace('$', '');\n } catch (error: any) {\n return message || '';\n }\n};\n\nconst DeliverET = (props: DeliverETInput) => {\n const [pkgCount, setPkgCount] = useState(\n props.confirmShipments ? '' : `${props.returnPackageCount}`\n );\n const [inputError, setInputError] = useState('');\n const [disableYes, setDisableYes] = useState(false);\n const [disableConfirm, setDisableConfirm] = useState(false);\n\n const [showBackModal, setShowBackModal] = useState(false);\n useEffect(\n () => setPkgCount(`${props.returnPackageCount}`),\n [props.returnPackageCount]\n );\n\n const [showDeliverModal, setshowDeliverModal] = useState(true);\n\n // Handle back-button click when scanList was being viewed\n useFocusEffect(\n React.useCallback(() => {\n const onBackPress = () => {\n if (\n props.taskMeta?.enableGoBack &&\n hasGoBackConnector(props.applicableReasons)\n ) {\n setShowBackModal(true);\n return true;\n } else {\n props.navigation.goBack();\n\n return true;\n }\n };\n BackHandler.addEventListener('hardwareBackPress', onBackPress);\n return () =>\n BackHandler.removeEventListener('hardwareBackPress', onBackPress);\n }, [])\n );\n\n useLayoutEffect(() => {\n props.navigation.setOptions({\n title: props.title,\n headerLeft: () => {\n return (\n <Icon\n onPress={() => {\n if (\n props.taskMeta?.enableGoBack &&\n hasGoBackConnector(props.applicableReasons)\n )\n setShowBackModal(true);\n else props.navigation.goBack();\n }}\n name=\"arrow-back\"\n color={'black'}\n size={25}\n style={{\n paddingRight: 15,\n paddingTop: 5,\n }}\n />\n );\n },\n });\n }, [props.navigation, props.title]);\n\n const renderModal = () => {\n return (\n <GoBackModal\n showModal={showBackModal}\n setShowModal={setShowBackModal}\n onSuccess={async () => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.DELIVER,\n false,\n GO_BACK_EVENT_CODE,\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.DELIVER\n )),\n });\n setShowBackModal(false);\n }}\n onFailure={() => setShowBackModal(false)}\n />\n );\n };\n\n if (props.confirmCustodyExchange) {\n return (\n <Provider>\n <Portal>{renderModal()}</Portal>\n <View style={styles.container}>\n <Modal\n visible={showDeliverModal}\n onRequestClose={() => {\n if (\n props.taskMeta?.enableGoBack &&\n hasGoBackConnector(props.applicableReasons)\n ) {\n setshowDeliverModal(false);\n setShowBackModal(true);\n return true;\n } else {\n setshowDeliverModal(false);\n props.navigation.goBack();\n return true;\n }\n }}\n >\n <View style={styles.modalView}>\n <View style={styles.modalStyle}>\n <View style={{ alignItems: 'center' }}>\n <View style={{ paddingHorizontal: 60 }}>\n <Text style={DeliverPickupStyles.titleText}>\n {props.title || DEFAULT_DELIVER_TITLE}\n </Text>\n </View>\n <View style={styles.returnView}>\n <Text style={styles.subTitle}>{'Expected Shipments'}</Text>\n <Text style={styles.title}>{props.returnPackageCount}</Text>\n </View>\n {props.confirmShipments ? (\n <View\n style={{\n flexDirection: 'row',\n }}\n >\n <TextInput\n style={{\n flex: 1,\n fontSize: 14,\n lineHeight: 24,\n fontFamily: Fonts.IBMPlexSans_400Regular,\n }}\n multiline={false}\n autoComplete={'off'}\n label={`Shipment(s) handed over`}\n value={pkgCount}\n mode={'outlined'}\n error={!isEmptyOrBlank(inputError)}\n selectionColor={'#6200EE'}\n keyboardType={'numeric'}\n onChangeText={(text) => {\n setInputError('');\n setPkgCount(text);\n }}\n />\n </View>\n ) : null}\n\n {!isEmptyOrBlank(inputError) && (\n <Text style={{ color: '#B00020' }}>{inputError}</Text>\n )}\n </View>\n\n <View style={styles.bottomButtons}>\n <Button\n disabled={disableConfirm}\n style={[CommonStyles.nextButton, { marginTop: 20 }]}\n labelStyle={CommonStyles.nextButtonLabel}\n uppercase={false}\n mode={'contained'}\n onPress={async () => {\n if (\n !isEmptyOrBlank(pkgCount) &&\n !Number.isNaN(+pkgCount)\n ) {\n if (+pkgCount !== props.returnPackageCount) {\n setInputError(\n `Package count should be equal to ${props.returnPackageCount}`\n );\n return;\n }\n setDisableConfirm(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 props.mergedObjectiveId,\n ExecutionTaskID.DELIVER\n )),\n remark: `${pkgCount} Packages returned`,\n });\n } else setInputError('Please enter valid count.');\n }}\n >\n Confirm\n </Button>\n </View>\n </View>\n </View>\n </Modal>\n </View>\n </Provider>\n );\n } else {\n return (\n <Provider>\n <Portal>{renderModal()}</Portal>\n <View style={styles.container}>\n <Modal\n visible={showDeliverModal}\n onRequestClose={() => {\n if (\n props.taskMeta?.enableGoBack &&\n hasGoBackConnector(props.applicableReasons)\n ) {\n setshowDeliverModal(false);\n setShowBackModal(true);\n return true;\n } else {\n setshowDeliverModal(false);\n props.navigation.goBack();\n return true;\n }\n }}\n >\n <View style={styles.modalView}>\n <View style={styles.modalStyle}>\n <View style={styles.modalBody}>\n <Text style={DeliverPickupStyles.titleText}>\n {props.title || DEFAULT_DELIVER_TITLE}\n </Text>\n <Text style={DeliverPickupStyles.messageText}>\n {getMessage(props.returnPackageCount, props.message)}\n </Text>\n\n {/* Removed showing the item when item.length === 1 */}\n {/* {props.returnPackageCount === 1 && props.items.length ? (\n <View style={{ justifyContent: 'center' }}>\n <Text\n style={DeliverPickupStyles.itemTextStyle}\n >{`Order ID: ${props.items[0].skuId}`}</Text>\n </View>\n ) : null} */}\n </View>\n <View style={styles.bottomButtons}>\n <Button\n disabled={disableYes}\n style={[CommonStyles.nextButton, { marginTop: 20 }]}\n labelStyle={CommonStyles.nextButtonLabel}\n uppercase={false}\n mode={'contained'}\n onPress={async () => {\n setDisableYes(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 props.mergedObjectiveId,\n ExecutionTaskID.DELIVER\n )),\n remark: '',\n });\n }}\n >\n Confirm\n </Button>\n {props.restrictCancel === true ? null : (\n <Button\n labelStyle={CommonStyles.cancelButtonLabel}\n style={[CommonStyles.cancelButton, { marginTop: 10 }]}\n mode={'outlined'}\n uppercase={false}\n onPress={async () => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.DELIVER,\n false,\n getEventCodeByET(\n ExecutionTaskID.DELIVER,\n false,\n props.applicableReasons?.failure\n ),\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.DELIVER\n )),\n });\n }}\n >\n Cancel\n </Button>\n )}\n </View>\n </View>\n </View>\n </Modal>\n </View>\n </Provider>\n );\n }\n};\n\nexport default DeliverET;\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n modalView: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n },\n modalStyle: {\n backgroundColor: 'white',\n padding: 20,\n borderRadius: 8,\n elevation: 5,\n },\n modalBody: {\n paddingHorizontal: 40,\n alignItems: 'center',\n },\n bottomButtons: {\n marginTop: 12,\n },\n returnView: {\n marginTop: 15,\n marginBottom: 15,\n flexDirection: 'row',\n },\n subTitle: {\n fontFamily: Fonts.IBMPlexSans_400Regular,\n fontStyle: 'normal',\n fontWeight: '400',\n fontSize: 14,\n flex: 1,\n textAlign: 'left',\n lineHeight: 28,\n color: '#111111',\n },\n title: {\n textAlign: 'right',\n fontSize: 14,\n lineHeight: 28,\n fontStyle: 'normal',\n color: '#111111',\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n },\n});\n"],"mappings":"AACA,SACEA,WAAW,EAEXC,IAAI,EACJC,IAAI,EACJC,KAAK,EACLC,UAAU,QACL,cAAc;AACrB,OAAOC,KAAK,IAAIC,QAAQ,EAAEC,eAAe,EAAEC,SAAS,QAAQ,OAAO;AACnE,SAASC,MAAM,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;AAExE,SACEC,YAAY,EACZC,mBAAmB,EACnBC,KAAK,QACA,6CAA6C;AACpD,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,SAASC,gBAAgB,QAAQ,mDAAmD;AACpF,SACEC,UAAU,EACVC,eAAe,QACV,oCAAoC;AAC3C,SAASC,cAAc,QAAQ,sBAAsB;AAErD,SACEC,uBAAuB,EACvBC,qBAAqB,EACrBC,kBAAkB,QACb,8BAA8B;AACrC,OAAOC,IAAI,MAAM,yCAAyC;AAC1D,OAAOC,WAAW,MAAM,yCAAyC;AACjE,SAASC,kBAAkB,QAAQ,2BAA2B;AAC9D,SAASC,cAAc,QAAQ,0BAA0B;AAEzD,MAAMC,QAAQ,GAAGC,IAAA;EAAA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AAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Image,
|
|
1
|
+
import { Image, StyleSheet, View } from 'react-native';
|
|
2
2
|
import React, { useCallback, useState } from 'react';
|
|
3
3
|
import { getBaseETResponse } from '../../../utils/ExecTaskUtils';
|
|
4
4
|
import { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';
|
|
@@ -70,28 +70,28 @@ const DisplayModalET = props => {
|
|
|
70
70
|
export default DisplayModalET;
|
|
71
71
|
const styles = StyleSheet.create({
|
|
72
72
|
warningTitle: {
|
|
73
|
-
fontFamily:
|
|
73
|
+
fontFamily: Fonts.IBMPlexSans_600SemiBold,
|
|
74
74
|
marginTop: 0,
|
|
75
75
|
marginBottom: 15,
|
|
76
76
|
textAlign: 'center',
|
|
77
77
|
color: '#856404'
|
|
78
78
|
},
|
|
79
79
|
messageTitle: {
|
|
80
|
-
fontFamily:
|
|
80
|
+
fontFamily: Fonts.IBMPlexSans_600SemiBold,
|
|
81
81
|
marginTop: 0,
|
|
82
82
|
marginBottom: 15,
|
|
83
83
|
textAlign: 'center',
|
|
84
84
|
color: '#000000'
|
|
85
85
|
},
|
|
86
86
|
alertTitle: {
|
|
87
|
-
fontFamily:
|
|
87
|
+
fontFamily: Fonts.IBMPlexSans_600SemiBold,
|
|
88
88
|
marginTop: 0,
|
|
89
89
|
marginBottom: 15,
|
|
90
90
|
textAlign: 'center',
|
|
91
91
|
color: 'red'
|
|
92
92
|
},
|
|
93
93
|
messageText: {
|
|
94
|
-
fontFamily:
|
|
94
|
+
fontFamily: Fonts.IBMPlexSans_400Regular,
|
|
95
95
|
marginTop: 20,
|
|
96
96
|
fontSize: 16,
|
|
97
97
|
textAlign: 'center',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Image","Platform","StyleSheet","View","React","useCallback","useState","getBaseETResponse","getEventCodeByET","EntityCode","ExecutionTaskID","Button","Modal","Paragraph","Portal","Provider","Text","Title","CommonStyles","DeliverPickupStyles","Fonts","DisplayModalET","props","modalVisible","setModalVisible","showDialog","sendEtOutput","success","_props$applicableReas","_props$applicableReas2","_appRC","applicableReasons","failure","onSubmit","DISPLAY","mergedObjectiveId","createElement","style","mainContainer","dismissable","visible","contentContainerStyle","modalContent","modalView","displayType","styles","warningTitle","title","alertTitle","messageTitle","text","messageText","message","image","imageView","source","width","height","uri","buttons","mode","uppercase","labelStyle","nextButtonLabel","nextButton","marginBottom","onPress","testID","positiveBtn","negativeBtn","cancelButtonLabel","cancelButton","marginTop","create","fontFamily","OS","IBMPlexSans_600SemiBold","textAlign","color","IBMPlexSans_400Regular","fontSize","flexDirection","padding"],"sources":["DisplayModalET.tsx"],"sourcesContent":["import type { DisplayETInput } from './DisplaySchema';\nimport { Image, Platform, StyleSheet, View } from 'react-native';\nimport React, { useCallback, 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 {\n Button,\n Modal,\n Paragraph,\n Portal,\n Provider,\n Text,\n Title,\n} from 'react-native-paper';\nimport {\n CommonStyles,\n DeliverPickupStyles,\n Fonts,\n} from '../../../styles/executionTasks/CommonStyles';\n\nconst DisplayModalET = (props: DisplayETInput) => {\n const [modalVisible, setModalVisible] = useState(props.showDialog);\n const sendEtOutput = useCallback(\n async (success: boolean) => {\n setModalVisible(false);\n const _appRC = success\n ? props.applicableReasons?.success\n : props.applicableReasons?.failure;\n props.onSubmit({\n ...(await getBaseETResponse(\n EntityCode.DISPLAY,\n success,\n getEventCodeByET(ExecutionTaskID.DISPLAY, success, _appRC),\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.DISPLAY\n )),\n });\n },\n [props]\n );\n\n return (\n <Provider>\n <Portal>\n <View style={DeliverPickupStyles.mainContainer}>\n <Modal\n dismissable={false}\n visible={modalVisible}\n contentContainerStyle={DeliverPickupStyles.modalContent}\n >\n <View style={DeliverPickupStyles.modalView}>\n {props.displayType === 'WARNING' && (\n <Title style={styles.warningTitle}>{props.title}!</Title>\n )}\n {props.displayType === 'ALERT' && (\n <Title style={styles.alertTitle}>{props.title}</Title>\n )}\n {props.displayType === 'MESSAGE' && (\n <Title style={styles.messageTitle}>{props.title}</Title>\n )}\n {props.text && (\n <Paragraph style={styles.messageText}>{props.text}</Paragraph>\n )}\n {props.message && (\n <Text style={[styles.messageText]}>{props.message}</Text>\n )}\n {props.image && (\n <View style={styles.imageView}>\n <Image\n source={{\n width: 200,\n height: 300,\n uri: props.image,\n }}\n />\n </View>\n )}\n <View style={styles.buttons}>\n <Button\n mode={'outlined'}\n uppercase={false}\n labelStyle={CommonStyles.nextButtonLabel}\n style={[\n CommonStyles.nextButton,\n {\n marginBottom: 5,\n },\n ]}\n onPress={async () => {\n await sendEtOutput(true);\n }}\n testID=\"primary\"\n >\n {props.positiveBtn}\n </Button>\n {props.negativeBtn && (\n <Button\n uppercase={false}\n mode={'outlined'}\n labelStyle={CommonStyles.cancelButtonLabel}\n style={[CommonStyles.cancelButton, { marginTop: 5 }]}\n onPress={async () => {\n await sendEtOutput(false);\n }}\n testID=\"secondary\"\n >\n {props.negativeBtn}\n </Button>\n )}\n </View>\n </View>\n </Modal>\n </View>\n </Portal>\n </Provider>\n );\n};\n\nexport default DisplayModalET;\n\nconst styles = StyleSheet.create({\n warningTitle: {\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_600SemiBold\n : 'IBMPlexSans-SemiBold',\n marginTop: 0,\n marginBottom: 15,\n textAlign: 'center',\n color: '#856404',\n },\n messageTitle: {\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_600SemiBold\n : 'IBMPlexSans-SemiBold',\n marginTop: 0,\n marginBottom: 15,\n textAlign: 'center',\n color: '#000000',\n },\n alertTitle: {\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_600SemiBold\n : 'IBMPlexSans-SemiBold',\n marginTop: 0,\n marginBottom: 15,\n textAlign: 'center',\n color: 'red',\n },\n messageText: {\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_400Regular\n : 'IBMPlexSans-Regular',\n marginTop: 20,\n fontSize: 16,\n textAlign: 'center',\n color: '#004085',\n },\n buttons: {\n marginTop: 25,\n flexDirection: 'column',\n },\n imageView: {\n padding: 10,\n },\n});\n"],"mappings":"AACA,SAASA,KAAK,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAChE,OAAOC,KAAK,IAAIC,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AACpD,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,SAASC,gBAAgB,QAAQ,mDAAmD;AACpF,SACEC,UAAU,EACVC,eAAe,QACV,oCAAoC;AAC3C,SACEC,MAAM,EACNC,KAAK,EACLC,SAAS,EACTC,MAAM,EACNC,QAAQ,EACRC,IAAI,EACJC,KAAK,QACA,oBAAoB;AAC3B,SACEC,YAAY,EACZC,mBAAmB,EACnBC,KAAK,QACA,6CAA6C;AAEpD,MAAMC,cAAc,GAAIC,KAAqB,IAAK;EAChD,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGlB,QAAQ,CAACgB,KAAK,CAACG,UAAU,CAAC;EAClE,MAAMC,YAAY,GAAGrB,WAAW,CAC9B,MAAOsB,OAAgB,IAAK;IAAA,IAAAC,qBAAA,EAAAC,sBAAA;IAC1BL,eAAe,CAAC,KAAK,CAAC;IACtB,MAAMM,MAAM,GAAGH,OAAO,IAAAC,qBAAA,GAClBN,KAAK,CAACS,iBAAiB,cAAAH,qBAAA,uBAAvBA,qBAAA,CAAyBD,OAAO,IAAAE,sBAAA,GAChCP,KAAK,CAACS,iBAAiB,cAAAF,sBAAA,uBAAvBA,sBAAA,CAAyBG,OAAO;IACpCV,KAAK,CAACW,QAAQ,CAAC;MACb,IAAI,MAAM1B,iBAAiB,CACzBE,UAAU,CAACyB,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;EACX;AACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"names":["Image","StyleSheet","View","React","useCallback","useState","getBaseETResponse","getEventCodeByET","EntityCode","ExecutionTaskID","Button","Modal","Paragraph","Portal","Provider","Text","Title","CommonStyles","DeliverPickupStyles","Fonts","DisplayModalET","props","modalVisible","setModalVisible","showDialog","sendEtOutput","success","_props$applicableReas","_props$applicableReas2","_appRC","applicableReasons","failure","onSubmit","DISPLAY","mergedObjectiveId","createElement","style","mainContainer","dismissable","visible","contentContainerStyle","modalContent","modalView","displayType","styles","warningTitle","title","alertTitle","messageTitle","text","messageText","message","image","imageView","source","width","height","uri","buttons","mode","uppercase","labelStyle","nextButtonLabel","nextButton","marginBottom","onPress","testID","positiveBtn","negativeBtn","cancelButtonLabel","cancelButton","marginTop","create","fontFamily","IBMPlexSans_600SemiBold","textAlign","color","IBMPlexSans_400Regular","fontSize","flexDirection","padding"],"sources":["DisplayModalET.tsx"],"sourcesContent":["import type { DisplayETInput } from './DisplaySchema';\nimport { Image, StyleSheet, View } from 'react-native';\nimport React, { useCallback, 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 {\n Button,\n Modal,\n Paragraph,\n Portal,\n Provider,\n Text,\n Title,\n} from 'react-native-paper';\nimport {\n CommonStyles,\n DeliverPickupStyles,\n Fonts,\n} from '../../../styles/executionTasks/CommonStyles';\n\nconst DisplayModalET = (props: DisplayETInput) => {\n const [modalVisible, setModalVisible] = useState(props.showDialog);\n const sendEtOutput = useCallback(\n async (success: boolean) => {\n setModalVisible(false);\n const _appRC = success\n ? props.applicableReasons?.success\n : props.applicableReasons?.failure;\n props.onSubmit({\n ...(await getBaseETResponse(\n EntityCode.DISPLAY,\n success,\n getEventCodeByET(ExecutionTaskID.DISPLAY, success, _appRC),\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.DISPLAY\n )),\n });\n },\n [props]\n );\n\n return (\n <Provider>\n <Portal>\n <View style={DeliverPickupStyles.mainContainer}>\n <Modal\n dismissable={false}\n visible={modalVisible}\n contentContainerStyle={DeliverPickupStyles.modalContent}\n >\n <View style={DeliverPickupStyles.modalView}>\n {props.displayType === 'WARNING' && (\n <Title style={styles.warningTitle}>{props.title}!</Title>\n )}\n {props.displayType === 'ALERT' && (\n <Title style={styles.alertTitle}>{props.title}</Title>\n )}\n {props.displayType === 'MESSAGE' && (\n <Title style={styles.messageTitle}>{props.title}</Title>\n )}\n {props.text && (\n <Paragraph style={styles.messageText}>{props.text}</Paragraph>\n )}\n {props.message && (\n <Text style={[styles.messageText]}>{props.message}</Text>\n )}\n {props.image && (\n <View style={styles.imageView}>\n <Image\n source={{\n width: 200,\n height: 300,\n uri: props.image,\n }}\n />\n </View>\n )}\n <View style={styles.buttons}>\n <Button\n mode={'outlined'}\n uppercase={false}\n labelStyle={CommonStyles.nextButtonLabel}\n style={[\n CommonStyles.nextButton,\n {\n marginBottom: 5,\n },\n ]}\n onPress={async () => {\n await sendEtOutput(true);\n }}\n testID=\"primary\"\n >\n {props.positiveBtn}\n </Button>\n {props.negativeBtn && (\n <Button\n uppercase={false}\n mode={'outlined'}\n labelStyle={CommonStyles.cancelButtonLabel}\n style={[CommonStyles.cancelButton, { marginTop: 5 }]}\n onPress={async () => {\n await sendEtOutput(false);\n }}\n testID=\"secondary\"\n >\n {props.negativeBtn}\n </Button>\n )}\n </View>\n </View>\n </Modal>\n </View>\n </Portal>\n </Provider>\n );\n};\n\nexport default DisplayModalET;\n\nconst styles = StyleSheet.create({\n warningTitle: {\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n marginTop: 0,\n marginBottom: 15,\n textAlign: 'center',\n color: '#856404',\n },\n messageTitle: {\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n marginTop: 0,\n marginBottom: 15,\n textAlign: 'center',\n color: '#000000',\n },\n alertTitle: {\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n marginTop: 0,\n marginBottom: 15,\n textAlign: 'center',\n color: 'red',\n },\n messageText: {\n fontFamily: Fonts.IBMPlexSans_400Regular,\n marginTop: 20,\n fontSize: 16,\n textAlign: 'center',\n color: '#004085',\n },\n buttons: {\n marginTop: 25,\n flexDirection: 'column',\n },\n imageView: {\n padding: 10,\n },\n});\n"],"mappings":"AACA,SAASA,KAAK,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AACtD,OAAOC,KAAK,IAAIC,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AACpD,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,SAASC,gBAAgB,QAAQ,mDAAmD;AACpF,SACEC,UAAU,EACVC,eAAe,QACV,oCAAoC;AAC3C,SACEC,MAAM,EACNC,KAAK,EACLC,SAAS,EACTC,MAAM,EACNC,QAAQ,EACRC,IAAI,EACJC,KAAK,QACA,oBAAoB;AAC3B,SACEC,YAAY,EACZC,mBAAmB,EACnBC,KAAK,QACA,6CAA6C;AAEpD,MAAMC,cAAc,GAAIC,KAAqB,IAAK;EAChD,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGlB,QAAQ,CAACgB,KAAK,CAACG,UAAU,CAAC;EAClE,MAAMC,YAAY,GAAGrB,WAAW,CAC9B,MAAOsB,OAAgB,IAAK;IAAA,IAAAC,qBAAA,EAAAC,sBAAA;IAC1BL,eAAe,CAAC,KAAK,CAAC;IACtB,MAAMM,MAAM,GAAGH,OAAO,IAAAC,qBAAA,GAClBN,KAAK,CAACS,iBAAiB,cAAAH,qBAAA,uBAAvBA,qBAAA,CAAyBD,OAAO,IAAAE,sBAAA,GAChCP,KAAK,CAACS,iBAAiB,cAAAF,sBAAA,uBAAvBA,sBAAA,CAAyBG,OAAO;IACpCV,KAAK,CAACW,QAAQ,CAAC;MACb,IAAI,MAAM1B,iBAAiB,CACzBE,UAAU,CAACyB,OAAO,EAClBP,OAAO,EACPnB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CAAE;IACFyC,MAAM,EAAC;EAAW,GAEjB7C,KAAK,CAAC+C,WACD,CAEN,CACF,CACD,CACH,CACA,CACA,CAAC;AAEf,CAAC;AAED,eAAehD,cAAc;AAE7B,MAAMwB,MAAM,GAAG3C,UAAU,CAACuE,MAAM,CAAC;EAC/B3B,YAAY,EAAE;IACZ4B,UAAU,EAAEtD,KAAK,CAACuD,uBAAuB;IACzCH,SAAS,EAAE,CAAC;IACZP,YAAY,EAAE,EAAE;IAChBW,SAAS,EAAE,QAAQ;IACnBC,KAAK,EAAE;EACT,CAAC;EACD5B,YAAY,EAAE;IACZyB,UAAU,EAAEtD,KAAK,CAACuD,uBAAuB;IACzCH,SAAS,EAAE,CAAC;IACZP,YAAY,EAAE,EAAE;IAChBW,SAAS,EAAE,QAAQ;IACnBC,KAAK,EAAE;EACT,CAAC;EACD7B,UAAU,EAAE;IACV0B,UAAU,EAAEtD,KAAK,CAACuD,uBAAuB;IACzCH,SAAS,EAAE,CAAC;IACZP,YAAY,EAAE,EAAE;IAChBW,SAAS,EAAE,QAAQ;IACnBC,KAAK,EAAE;EACT,CAAC;EACD1B,WAAW,EAAE;IACXuB,UAAU,EAAEtD,KAAK,CAAC0D,sBAAsB;IACxCN,SAAS,EAAE,EAAE;IACbO,QAAQ,EAAE,EAAE;IACZH,SAAS,EAAE,QAAQ;IACnBC,KAAK,EAAE;EACT,CAAC;EACDlB,OAAO,EAAE;IACPa,SAAS,EAAE,EAAE;IACbQ,aAAa,EAAE;EACjB,CAAC;EACD1B,SAAS,EAAE;IACT2B,OAAO,EAAE;EACX;AACF,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useRef, useState, useLayoutEffect } from 'react';
|
|
2
|
-
import { BackHandler,
|
|
2
|
+
import { BackHandler, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
|
3
3
|
import { Button, Provider } from 'react-native-paper';
|
|
4
4
|
import { getBaseETResponse } from '../../../utils/ExecTaskUtils';
|
|
5
5
|
import { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';
|
|
@@ -18,7 +18,6 @@ import { useFocusEffect } from '@react-navigation/native';
|
|
|
18
18
|
const SignatureET = props => {
|
|
19
19
|
const signatureViewRef = useRef();
|
|
20
20
|
const [dragged, setDragged] = useState(0);
|
|
21
|
-
const dragRef = useRef(0);
|
|
22
21
|
const [showBackModal, setShowBackModal] = useState(false);
|
|
23
22
|
|
|
24
23
|
// Handle back-button click when scanList was being viewed
|
|
@@ -112,12 +111,8 @@ const SignatureET = props => {
|
|
|
112
111
|
}), /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
113
112
|
onPress: () => {
|
|
114
113
|
var _signatureViewRef$cur;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
} else {
|
|
118
|
-
dragRef.current = 0;
|
|
119
|
-
}
|
|
120
|
-
(_signatureViewRef$cur = signatureViewRef.current) === null || _signatureViewRef$cur === void 0 || _signatureViewRef$cur.resetImage();
|
|
114
|
+
setDragged(0);
|
|
115
|
+
(_signatureViewRef$cur = signatureViewRef.current) === null || _signatureViewRef$cur === void 0 ? void 0 : _signatureViewRef$cur.resetImage();
|
|
121
116
|
}
|
|
122
117
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
123
118
|
style: styles.clearBtn
|
|
@@ -138,34 +133,15 @@ const SignatureET = props => {
|
|
|
138
133
|
maxStrokeWidth: 6,
|
|
139
134
|
strokeColor: props.penColor ?? 'black',
|
|
140
135
|
backgroundColor: 'white',
|
|
141
|
-
style: {
|
|
142
|
-
flex: 1,
|
|
143
|
-
borderColor: 'transparent',
|
|
144
|
-
borderWidth: 1
|
|
145
|
-
},
|
|
146
136
|
onSaveEvent: async result => {
|
|
147
|
-
if (
|
|
148
|
-
|
|
149
|
-
await saveAndSubmit(false, result.encoded);
|
|
150
|
-
} else {
|
|
151
|
-
showToast('Please enter signature');
|
|
152
|
-
}
|
|
137
|
+
if (dragged > 0) {
|
|
138
|
+
await saveAndSubmit(false, result.encoded);
|
|
153
139
|
} else {
|
|
154
|
-
|
|
155
|
-
await saveAndSubmit(false, result.encoded);
|
|
156
|
-
} else {
|
|
157
|
-
showToast('Please enter signature');
|
|
158
|
-
}
|
|
140
|
+
showToast('Please enter signature');
|
|
159
141
|
}
|
|
160
142
|
},
|
|
161
143
|
onDragEvent: drag => {
|
|
162
|
-
if (drag.dragged)
|
|
163
|
-
if (Platform.OS === 'android') {
|
|
164
|
-
setDragged(prevState => prevState + 1);
|
|
165
|
-
} else {
|
|
166
|
-
dragRef.current = dragRef.current + 1;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
144
|
+
if (drag.dragged) setDragged(prevState => prevState + 1);
|
|
169
145
|
}
|
|
170
146
|
}))), /*#__PURE__*/React.createElement(View, {
|
|
171
147
|
style: styles.bottomButtons
|
|
@@ -217,7 +193,7 @@ const styles = StyleSheet.create({
|
|
|
217
193
|
},
|
|
218
194
|
clearBtn: {
|
|
219
195
|
color: SdkColors[ColorTheme.LIGHT].primaryButton,
|
|
220
|
-
fontFamily:
|
|
196
|
+
fontFamily: Fonts.IBMPlexSans_600SemiBold,
|
|
221
197
|
fontSize: 15,
|
|
222
198
|
justifyContent: 'flex-end',
|
|
223
199
|
textAlign: 'right'
|
|
@@ -226,14 +202,14 @@ const styles = StyleSheet.create({
|
|
|
226
202
|
fontSize: 16,
|
|
227
203
|
lineHeight: 20,
|
|
228
204
|
color: '#474A57',
|
|
229
|
-
fontFamily:
|
|
205
|
+
fontFamily: Fonts.IBMPlexSans_400Regular
|
|
230
206
|
},
|
|
231
207
|
messageText2: {
|
|
232
208
|
flex: 1,
|
|
233
209
|
fontSize: 16,
|
|
234
210
|
lineHeight: 20,
|
|
235
211
|
color: '#999999',
|
|
236
|
-
fontFamily:
|
|
212
|
+
fontFamily: Fonts.IBMPlexSans_400Regular
|
|
237
213
|
}
|
|
238
214
|
});
|
|
239
215
|
export default SignatureET;
|