@os1-platform/dispatch-mobile 2.1.21 → 2.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +122 -11
- package/lib/commonjs/analytics/firebase/FirebaseLogging.js +1 -1
- package/lib/commonjs/analytics/firebase/FirebaseLogging.js.map +1 -1
- package/lib/commonjs/analytics/sentry/SentryAnalyticsSingleton.js +5 -5
- package/lib/commonjs/analytics/sentry/SentryAnalyticsSingleton.js.map +1 -1
- package/lib/commonjs/analytics/sentry/SentryAnalyticsUtils.js +9 -10
- package/lib/commonjs/analytics/sentry/SentryAnalyticsUtils.js.map +1 -1
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +16 -6
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js +8 -1
- package/lib/commonjs/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +8 -10
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +2 -2
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/commonjs/components/executiontasks/collectPayment/CollectPayment.js +40 -0
- package/lib/commonjs/components/executiontasks/collectPayment/CollectPayment.js.map +1 -0
- package/lib/commonjs/components/executiontasks/collectPayment/CollectPaymentSchema.js +35 -0
- package/lib/commonjs/components/executiontasks/collectPayment/CollectPaymentSchema.js.map +1 -0
- package/lib/commonjs/components/executiontasks/collectPayment/PaymentStyles.js +102 -0
- package/lib/commonjs/components/executiontasks/collectPayment/PaymentStyles.js.map +1 -0
- package/lib/commonjs/components/executiontasks/collectPayment/PaymentUtils.js +151 -0
- package/lib/commonjs/components/executiontasks/collectPayment/PaymentUtils.js.map +1 -0
- package/lib/commonjs/components/executiontasks/collectPayment/components/CompletePayment.js +188 -0
- package/lib/commonjs/components/executiontasks/collectPayment/components/CompletePayment.js.map +1 -0
- package/lib/commonjs/components/executiontasks/collectPayment/components/CustomContactsModal.js +2 -0
- package/lib/commonjs/components/executiontasks/collectPayment/components/CustomContactsModal.js.map +1 -0
- package/lib/commonjs/components/executiontasks/collectPayment/components/InitPayment.js +442 -0
- package/lib/commonjs/components/executiontasks/collectPayment/components/InitPayment.js.map +1 -0
- package/lib/commonjs/components/executiontasks/collectPayment/components/PaymentContactDetails.js +538 -0
- package/lib/commonjs/components/executiontasks/collectPayment/components/PaymentContactDetails.js.map +1 -0
- package/lib/commonjs/components/executiontasks/collectPayment/components/ProcessPayment.js +887 -0
- package/lib/commonjs/components/executiontasks/collectPayment/components/ProcessPayment.js.map +1 -0
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +14 -20
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +24 -27
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +2 -3
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +9 -3
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +2 -2
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +13 -14
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js +2 -2
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +11 -12
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js +3 -3
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpEtUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +2 -2
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +2 -2
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +11 -13
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js +11 -2
- package/lib/commonjs/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +2 -2
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +5 -6
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +2 -2
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js +14 -20
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +18 -24
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js +4 -6
- package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/constants.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/modalConstant.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js +4 -5
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js +1 -2
- package/lib/commonjs/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js +2 -4
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +3 -6
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/utils.js +14 -8
- package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +2 -2
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/constants.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +2 -2
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js +1 -1
- 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 +2 -2
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +2 -2
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/commonjs/components/widgets/AlertDisplay.js +1 -1
- package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/commonjs/components/widgets/CancelOrderDialog.js +2 -2
- package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/Card.js +1 -2
- package/lib/commonjs/components/widgets/Card.js.map +1 -1
- package/lib/commonjs/components/widgets/GoBackModal.js +1 -1
- package/lib/commonjs/components/widgets/GoBackModal.js.map +1 -1
- package/lib/commonjs/components/widgets/IconButton.js +20 -23
- package/lib/commonjs/components/widgets/IconButton.js.map +1 -1
- package/lib/commonjs/components/widgets/ModalWidget.js +3 -1
- package/lib/commonjs/components/widgets/ModalWidget.js.map +1 -1
- package/lib/commonjs/components/widgets/ProgressDialog.js +3 -3
- package/lib/commonjs/components/widgets/ProgressDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/SearchBar.js +1 -1
- package/lib/commonjs/components/widgets/SearchBar.js.map +1 -1
- package/lib/commonjs/components/widgets/SnackBarCustom.js +22 -21
- package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/commonjs/components/widgets/SplitTextInput.js +10 -11
- package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -1
- package/lib/commonjs/components/widgets/TabsComponent.js +1 -1
- package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -1
- package/lib/commonjs/components/widgets/Timer.js +40 -0
- package/lib/commonjs/components/widgets/Timer.js.map +1 -0
- package/lib/commonjs/constants/apiConstants.js +4 -1
- package/lib/commonjs/constants/apiConstants.js.map +1 -1
- package/lib/commonjs/constants/constants.js +4 -1
- package/lib/commonjs/constants/constants.js.map +1 -1
- package/lib/commonjs/errors/BaseError.js +3 -3
- package/lib/commonjs/events/EventDispatcher.js +5 -1
- package/lib/commonjs/events/EventDispatcher.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 +1 -1
- package/lib/commonjs/events/index.js.map +1 -1
- package/lib/commonjs/events/interface.js.map +1 -1
- package/lib/commonjs/icons/CircleMark.js +27 -0
- package/lib/commonjs/icons/CircleMark.js.map +1 -0
- package/lib/commonjs/icons/FailedIcon.js +69 -0
- package/lib/commonjs/icons/FailedIcon.js.map +1 -0
- package/lib/commonjs/icons/FailureCloseIcon.js +42 -0
- package/lib/commonjs/icons/FailureCloseIcon.js.map +1 -0
- package/lib/commonjs/icons/ScanIcon.js +1 -1
- package/lib/commonjs/icons/ScanIcon.js.map +1 -1
- package/lib/commonjs/icons/SuccessCompleteIcon.js +42 -0
- package/lib/commonjs/icons/SuccessCompleteIcon.js.map +1 -0
- package/lib/commonjs/icons/file.js +1 -1
- package/lib/commonjs/icons/file.js.map +1 -1
- package/lib/commonjs/index.js +2 -2
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/locale/i18n.js +1 -1
- package/lib/commonjs/locale/i18n.js.map +1 -1
- package/lib/commonjs/locale/util.js +1 -1
- package/lib/commonjs/locale/util.js.map +1 -1
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +11 -9
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js +6 -6
- package/lib/commonjs/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js +6 -6
- package/lib/commonjs/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js +7 -7
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js +6 -6
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/commonjs/manager/location/LocationManager.js +6 -6
- package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js +8 -8
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js +6 -6
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/commonjs/manager/sdk/callbacksHandler.js +4 -4
- package/lib/commonjs/manager/sdk/callbacksHandler.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js +7 -7
- package/lib/commonjs/manager/syncmanager/AppSyncManager.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 +2 -2
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +6 -6
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +8 -16
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +6 -7
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +7 -8
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +5 -9
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/commonjs/models/DispatchModels.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETConfig.js +3 -0
- package/lib/commonjs/models/execTasks/ETConfig.js.map +1 -1
- package/lib/commonjs/models/sdk.js.map +1 -1
- package/lib/commonjs/native/signature/SignatureCapture.js +5 -5
- package/lib/commonjs/native/signature/SignatureCapture.js.map +1 -1
- package/lib/commonjs/network/GraphQLClient.js +15 -19
- package/lib/commonjs/network/GraphQLClient.js.map +1 -1
- package/lib/commonjs/network/NetworkClient.js +30 -3
- package/lib/commonjs/network/NetworkClient.js.map +1 -1
- package/lib/commonjs/network/NetworkUtils.js +2 -5
- package/lib/commonjs/network/NetworkUtils.js.map +1 -1
- package/lib/commonjs/network/Queries.js.map +1 -1
- package/lib/commonjs/network/client.js +5 -5
- package/lib/commonjs/network/client.js.map +1 -1
- package/lib/commonjs/resources/Login.js +4 -4
- package/lib/commonjs/resources/Login.js.map +1 -1
- package/lib/commonjs/resources/network.js +4 -4
- package/lib/commonjs/resources/network.js.map +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +13 -3
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/commonjs/ui/screens/CancellationScreen.js +7 -8
- package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CaptureInputScreen.js +8 -9
- package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CollectPaymentScreen.js +251 -0
- package/lib/commonjs/ui/screens/CollectPaymentScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +7 -8
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +8 -9
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DisplayScreen.js +8 -9
- package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js +8 -9
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js +43 -11
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ETScreensIndex.js +8 -1
- package/lib/commonjs/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/commonjs/ui/screens/FormsScreen.js +8 -9
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/GeofenceScreen.js +8 -9
- package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HttpRequestScreen.js +7 -8
- package/lib/commonjs/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +8 -9
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentScreen.js +9 -9
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +8 -9
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ScanScreen.js +8 -10
- package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +13 -9
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js +8 -9
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js +3 -3
- 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 +3 -1
- package/lib/commonjs/utils/ApiUtils.js.map +1 -1
- package/lib/commonjs/utils/ExecTaskUtils.js +35 -5
- package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
- package/lib/commonjs/utils/Logger.js +6 -7
- package/lib/commonjs/utils/Logger.js.map +1 -1
- package/lib/commonjs/utils/NetworkUtil.js +4 -4
- package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
- package/lib/commonjs/utils/SdkUtils.js +2 -2
- package/lib/commonjs/utils/SdkUtils.js.map +1 -1
- package/lib/commonjs/utils/SyncManagerUtils.js +3 -3
- package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
- package/lib/commonjs/utils/context/paymentContext.js +9 -0
- package/lib/commonjs/utils/context/paymentContext.js.map +1 -0
- package/lib/commonjs/utils/fcm/FCM.js +22 -4
- package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
- package/lib/commonjs/utils/fcm/FcmUtils.js +12 -2
- package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/commonjs/utils/helper.js +6 -6
- 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.map +1 -1
- package/lib/commonjs/utils/loginHelper.js +1 -1
- package/lib/commonjs/utils/loginHelper.js.map +1 -1
- package/lib/commonjs/utils/storage.js +11 -17
- package/lib/commonjs/utils/storage.js.map +1 -1
- package/lib/commonjs/utils/utils.js +2 -3
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/module/analytics/sentry/SentryAnalyticsSingleton.js +5 -5
- package/lib/module/analytics/sentry/SentryAnalyticsSingleton.js.map +1 -1
- package/lib/module/analytics/sentry/SentryAnalyticsUtils.js +7 -8
- package/lib/module/analytics/sentry/SentryAnalyticsUtils.js.map +1 -1
- package/lib/module/components/dispatch/DispatchExecNavigator.js +14 -4
- package/lib/module/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js +2 -1
- package/lib/module/components/executiontasks/ExecutionTasksIndex.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancelET.js +6 -8
- package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/module/components/executiontasks/collectPayment/CollectPayment.js +32 -0
- package/lib/module/components/executiontasks/collectPayment/CollectPayment.js.map +1 -0
- package/lib/module/components/executiontasks/collectPayment/CollectPaymentSchema.js +29 -0
- package/lib/module/components/executiontasks/collectPayment/CollectPaymentSchema.js.map +1 -0
- package/lib/module/components/executiontasks/collectPayment/PaymentStyles.js +96 -0
- package/lib/module/components/executiontasks/collectPayment/PaymentStyles.js.map +1 -0
- package/lib/module/components/executiontasks/collectPayment/PaymentUtils.js +132 -0
- package/lib/module/components/executiontasks/collectPayment/PaymentUtils.js.map +1 -0
- package/lib/module/components/executiontasks/collectPayment/components/CompletePayment.js +179 -0
- package/lib/module/components/executiontasks/collectPayment/components/CompletePayment.js.map +1 -0
- package/lib/module/components/executiontasks/collectPayment/components/CustomContactsModal.js +2 -0
- package/lib/module/components/executiontasks/collectPayment/components/CustomContactsModal.js.map +1 -0
- package/lib/module/components/executiontasks/collectPayment/components/InitPayment.js +433 -0
- package/lib/module/components/executiontasks/collectPayment/components/InitPayment.js.map +1 -0
- package/lib/module/components/executiontasks/collectPayment/components/PaymentContactDetails.js +531 -0
- package/lib/module/components/executiontasks/collectPayment/components/PaymentContactDetails.js.map +1 -0
- package/lib/module/components/executiontasks/collectPayment/components/ProcessPayment.js +880 -0
- package/lib/module/components/executiontasks/collectPayment/components/ProcessPayment.js.map +1 -0
- package/lib/module/components/executiontasks/deliver/DeliverET.js +13 -19
- package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js +21 -24
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js +0 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js +6 -1
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +11 -12
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +9 -10
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/TimeRangeSelector.js +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +9 -11
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/module/components/executiontasks/payments/PaymentUtils.js +11 -2
- package/lib/module/components/executiontasks/payments/PaymentUtils.js.map +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +3 -4
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/PickupET.js +13 -19
- package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/SLPickupET.js +15 -21
- package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanET.js +2 -4
- package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/constants.js.map +1 -1
- package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -1
- package/lib/module/components/executiontasks/scan/modalConstant.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js +3 -4
- package/lib/module/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js +0 -1
- package/lib/module/components/executiontasks/scan/sub_components/DropDownUtils.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js +0 -2
- package/lib/module/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +1 -4
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
- package/lib/module/components/executiontasks/scan/utils.js +11 -6
- package/lib/module/components/executiontasks/scan/utils.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/constants.js.map +1 -1
- package/lib/module/components/widgets/Card.js +0 -1
- package/lib/module/components/widgets/Card.js.map +1 -1
- package/lib/module/components/widgets/IconButton.js +19 -22
- package/lib/module/components/widgets/IconButton.js.map +1 -1
- package/lib/module/components/widgets/ModalWidget.js +1 -0
- 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 +21 -20
- package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/module/components/widgets/SplitTextInput.js +9 -10
- package/lib/module/components/widgets/SplitTextInput.js.map +1 -1
- package/lib/module/components/widgets/Timer.js +32 -0
- package/lib/module/components/widgets/Timer.js.map +1 -0
- package/lib/module/constants/apiConstants.js +4 -1
- package/lib/module/constants/apiConstants.js.map +1 -1
- package/lib/module/constants/constants.js +3 -0
- package/lib/module/constants/constants.js.map +1 -1
- package/lib/module/errors/BaseError.js +3 -3
- package/lib/module/events/EventDispatcher.js +3 -0
- package/lib/module/events/EventDispatcher.js.map +1 -1
- package/lib/module/events/constants.js +2 -1
- package/lib/module/events/constants.js.map +1 -1
- package/lib/module/events/interface.js.map +1 -1
- package/lib/module/icons/CircleMark.js +20 -0
- package/lib/module/icons/CircleMark.js.map +1 -0
- package/lib/module/icons/FailedIcon.js +62 -0
- package/lib/module/icons/FailedIcon.js.map +1 -0
- package/lib/module/icons/FailureCloseIcon.js +35 -0
- package/lib/module/icons/FailureCloseIcon.js.map +1 -0
- package/lib/module/icons/SuccessCompleteIcon.js +35 -0
- package/lib/module/icons/SuccessCompleteIcon.js.map +1 -0
- package/lib/module/manager/dispatch/DispatchStateContainer.js +10 -8
- package/lib/module/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js +5 -5
- package/lib/module/manager/dispatchCodes/EventCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js +5 -5
- package/lib/module/manager/dispatchCodes/EventCodeRepo.js.map +1 -1
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js +5 -5
- package/lib/module/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js +5 -5
- package/lib/module/manager/dispatchCodes/ReasonCodeRepo.js.map +1 -1
- package/lib/module/manager/location/LocationManager.js +5 -5
- package/lib/module/manager/location/LocationManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSDKManager.js +6 -6
- package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSdkCache.js +5 -5
- package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/module/manager/sdk/callbacksHandler.js +3 -3
- package/lib/module/manager/syncmanager/AppSyncManager.js +5 -5
- package/lib/module/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js +1 -0
- package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentManager.js +5 -5
- package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +6 -14
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/ETEventsManager.js +5 -6
- package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js +5 -6
- package/lib/module/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js +3 -7
- package/lib/module/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/module/models/DispatchModels.js.map +1 -1
- package/lib/module/models/execTasks/ETConfig.js +3 -0
- package/lib/module/models/execTasks/ETConfig.js.map +1 -1
- package/lib/module/models/sdk.js.map +1 -1
- package/lib/module/native/signature/SignatureCapture.js +4 -4
- package/lib/module/network/GraphQLClient.js +14 -18
- package/lib/module/network/GraphQLClient.js.map +1 -1
- package/lib/module/network/NetworkClient.js +29 -2
- package/lib/module/network/NetworkClient.js.map +1 -1
- package/lib/module/network/NetworkUtils.js +1 -4
- package/lib/module/network/NetworkUtils.js.map +1 -1
- package/lib/module/network/Queries.js.map +1 -1
- package/lib/module/network/client.js +4 -4
- package/lib/module/network/client.js.map +1 -1
- package/lib/module/resources/Login.js +3 -3
- package/lib/module/resources/network.js +3 -3
- package/lib/module/styles/executionTasks/CommonStyles.js +12 -2
- package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/module/ui/screens/CancellationScreen.js +5 -6
- package/lib/module/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/module/ui/screens/CaptureInputScreen.js +6 -7
- package/lib/module/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/module/ui/screens/CollectPaymentScreen.js +244 -0
- package/lib/module/ui/screens/CollectPaymentScreen.js.map +1 -0
- package/lib/module/ui/screens/CompleteObjectiveScreen.js +5 -6
- package/lib/module/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/module/ui/screens/DeliverScreen.js +6 -7
- package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/module/ui/screens/DisplayScreen.js +6 -7
- package/lib/module/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/module/ui/screens/DoodleScreen.js +6 -7
- package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/module/ui/screens/DropCashScreen.js +41 -10
- package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/module/ui/screens/ETScreensIndex.js +2 -1
- package/lib/module/ui/screens/ETScreensIndex.js.map +1 -1
- package/lib/module/ui/screens/FormsScreen.js +6 -7
- package/lib/module/ui/screens/FormsScreen.js.map +1 -1
- package/lib/module/ui/screens/GeofenceScreen.js +6 -7
- package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/module/ui/screens/HttpRequestScreen.js +6 -7
- package/lib/module/ui/screens/HttpRequestScreen.js.map +1 -1
- package/lib/module/ui/screens/ImageCaptureScreen.js +6 -7
- package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentScreen.js +7 -7
- package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/module/ui/screens/PickupScreen.js +6 -7
- package/lib/module/ui/screens/PickupScreen.js.map +1 -1
- package/lib/module/ui/screens/ScanScreen.js +6 -8
- package/lib/module/ui/screens/ScanScreen.js.map +1 -1
- package/lib/module/ui/screens/StartWorkFlowScreen.js +11 -7
- package/lib/module/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/module/ui/screens/ValidateOTPScreen.js +6 -7
- package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -1
- package/lib/module/ui/screens/WithBaseDispatchScreen.js +1 -1
- package/lib/module/ui/uiConfig/RouteParams.js +2 -1
- package/lib/module/ui/uiConfig/RouteParams.js.map +1 -1
- package/lib/module/utils/ApiUtils.js +2 -0
- package/lib/module/utils/ApiUtils.js.map +1 -1
- package/lib/module/utils/ExecTaskUtils.js +31 -4
- package/lib/module/utils/ExecTaskUtils.js.map +1 -1
- package/lib/module/utils/Logger.js +5 -6
- package/lib/module/utils/Logger.js.map +1 -1
- package/lib/module/utils/NetworkUtil.js +3 -3
- package/lib/module/utils/NetworkUtil.js.map +1 -1
- package/lib/module/utils/SdkUtils.js.map +1 -1
- package/lib/module/utils/SyncManagerUtils.js +1 -1
- package/lib/module/utils/SyncManagerUtils.js.map +1 -1
- package/lib/module/utils/context/paymentContext.js +3 -0
- package/lib/module/utils/context/paymentContext.js.map +1 -0
- package/lib/module/utils/fcm/FCM.js +20 -2
- package/lib/module/utils/fcm/FCM.js.map +1 -1
- package/lib/module/utils/fcm/FcmUtils.js +10 -0
- package/lib/module/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/module/utils/helper.js +5 -5
- package/lib/module/utils/helper.js.map +1 -1
- package/lib/module/utils/hooks/useModal.js +2 -1
- package/lib/module/utils/hooks/useModal.js.map +1 -1
- package/lib/module/utils/hooks/useTimer.js.map +1 -1
- package/lib/module/utils/storage.js +9 -15
- package/lib/module/utils/storage.js.map +1 -1
- package/lib/module/utils/utils.js +1 -2
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/typescript/components/executiontasks/ExecutionTasksIndex.d.ts +4 -2
- package/lib/typescript/components/executiontasks/collectPayment/CollectPayment.d.ts +4 -0
- package/lib/typescript/components/executiontasks/collectPayment/CollectPaymentSchema.d.ts +155 -0
- package/lib/typescript/components/executiontasks/collectPayment/PaymentStyles.d.ts +92 -0
- package/lib/typescript/components/executiontasks/collectPayment/PaymentUtils.d.ts +16 -0
- package/lib/typescript/components/executiontasks/collectPayment/components/CompletePayment.d.ts +4 -0
- package/lib/typescript/components/executiontasks/collectPayment/components/InitPayment.d.ts +4 -0
- package/lib/typescript/components/executiontasks/collectPayment/components/PaymentContactDetails.d.ts +4 -0
- package/lib/typescript/components/executiontasks/collectPayment/components/ProcessPayment.d.ts +4 -0
- package/lib/typescript/components/executiontasks/scan/interfaces.d.ts +1 -1
- package/lib/typescript/components/executiontasks/scan/utils.d.ts +1 -0
- package/lib/typescript/components/widgets/ProgressDialog.d.ts +3 -0
- package/lib/typescript/components/widgets/SnackBarCustom.d.ts +3 -2
- package/lib/typescript/components/widgets/Timer.d.ts +7 -0
- package/lib/typescript/constants/apiConstants.d.ts +3 -0
- package/lib/typescript/constants/constants.d.ts +3 -0
- package/lib/typescript/events/EventDispatcher.d.ts +1 -0
- package/lib/typescript/events/constants.d.ts +1 -0
- package/lib/typescript/events/interface.d.ts +1 -1
- package/lib/typescript/icons/CircleMark.d.ts +3 -0
- package/lib/typescript/icons/FailedIcon.d.ts +4 -0
- package/lib/typescript/icons/FailureCloseIcon.d.ts +4 -0
- package/lib/typescript/icons/SuccessCompleteIcon.d.ts +4 -0
- package/lib/typescript/models/DispatchModels.d.ts +11 -0
- package/lib/typescript/models/execTasks/ETConfig.d.ts +6 -3
- package/lib/typescript/models/sdk.d.ts +12 -0
- package/lib/typescript/network/NetworkClient.d.ts +3 -1
- package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +10 -1
- package/lib/typescript/ui/screens/CollectPaymentScreen.d.ts +3 -0
- package/lib/typescript/ui/screens/ETScreensIndex.d.ts +2 -1
- package/lib/typescript/ui/uiConfig/RouteParams.d.ts +1 -0
- package/lib/typescript/utils/ExecTaskUtils.d.ts +2 -0
- package/lib/typescript/utils/context/paymentContext.d.ts +7 -0
- package/package.json +6 -5
- package/src/components/dispatch/DispatchExecNavigator.tsx +14 -0
- package/src/components/executiontasks/ExecutionTasksIndex.ts +8 -0
- package/src/components/executiontasks/collectPayment/CollectPayment.tsx +60 -0
- package/src/components/executiontasks/collectPayment/CollectPaymentSchema.ts +182 -0
- package/src/components/executiontasks/collectPayment/PaymentStyles.ts +102 -0
- package/src/components/executiontasks/collectPayment/PaymentUtils.ts +200 -0
- package/src/components/executiontasks/collectPayment/components/CompletePayment.tsx +273 -0
- package/src/components/executiontasks/collectPayment/components/InitPayment.tsx +658 -0
- package/src/components/executiontasks/collectPayment/components/PaymentContactDetails.tsx +790 -0
- package/src/components/executiontasks/collectPayment/components/ProcessPayment.tsx +1352 -0
- package/src/components/executiontasks/deliver/SLDeliverET.tsx +132 -60
- package/src/components/executiontasks/dropCash/SLDropCash.tsx +35 -12
- package/src/components/executiontasks/payments/PaymentUtils.ts +10 -2
- package/src/components/executiontasks/pickup/SLPickupET.tsx +6 -3
- package/src/components/executiontasks/scan/ScanET.tsx +1 -1
- package/src/components/executiontasks/scan/interfaces.ts +1 -1
- package/src/components/executiontasks/scan/utils.ts +16 -8
- package/src/components/widgets/ModalWidget.tsx +26 -8
- package/src/components/widgets/ProgressDialog.tsx +23 -3
- package/src/components/widgets/SnackBarCustom.tsx +8 -1
- package/src/components/widgets/SplitTextInput.tsx +1 -1
- package/src/components/widgets/Timer.tsx +53 -0
- package/src/constants/apiConstants.ts +3 -0
- package/src/constants/constants.ts +3 -0
- package/src/events/EventDispatcher.ts +4 -0
- package/src/events/constants.ts +1 -0
- package/src/events/interface.ts +7 -1
- package/src/icons/CircleMark.tsx +18 -0
- package/src/icons/FailedIcon.tsx +80 -0
- package/src/icons/FailureCloseIcon.tsx +35 -0
- package/src/icons/SuccessCompleteIcon.tsx +35 -0
- package/src/manager/dispatch/DispatchStateContainer.tsx +6 -4
- package/src/manager/sdk/DispatchSDKManager.ts +1 -0
- package/src/models/DispatchModels.ts +12 -0
- package/src/models/execTasks/ETConfig.ts +3 -0
- package/src/models/sdk.ts +13 -0
- package/src/network/NetworkClient.ts +34 -1
- package/src/network/client.ts +1 -0
- package/src/styles/executionTasks/CommonStyles.ts +32 -8
- package/src/ui/screens/CollectPaymentScreen.tsx +315 -0
- package/src/ui/screens/DropCashScreen.tsx +49 -2
- package/src/ui/screens/ETScreensIndex.ts +2 -0
- package/src/ui/screens/PaymentScreen.tsx +1 -0
- package/src/ui/screens/StartWorkFlowScreen.tsx +15 -0
- package/src/ui/uiConfig/RouteParams.ts +8 -1
- package/src/utils/ApiUtils.ts +1 -0
- package/src/utils/ExecTaskUtils.ts +44 -3
- package/src/utils/SyncManagerUtils.ts +1 -0
- package/src/utils/context/paymentContext.ts +8 -0
- package/src/utils/fcm/FCM.ts +30 -0
- package/src/utils/fcm/FcmUtils.ts +53 -29
- package/android/.gradle/6.8/fileChanges/last-build.bin +0 -0
- package/android/.gradle/6.8/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.5/checksums/checksums.lock +0 -0
- package/android/.gradle/7.5/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/7.5/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/7.5/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.5/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.5/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.5/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/7.5/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.5/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/config.properties +0 -2
- package/android/.gradle/configuration-cache/gc.properties +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/compiler.xml +0 -6
- package/android/.idea/gradle.xml +0 -18
- package/android/.idea/kotlinc.xml +0 -6
- package/android/.idea/migrations.xml +0 -10
- package/android/.idea/misc.xml +0 -10
- package/android/.idea/other.xml +0 -263
- package/android/.idea/vcs.xml +0 -6
- package/lib/commonjs/icons/circleMark.svg +0 -3
- package/lib/module/icons/circleMark.svg +0 -3
- package/src/icons/circleMark.svg +0 -3
- /package/{android/.gradle/6.8/gc.properties → lib/typescript/components/executiontasks/collectPayment/components/CustomContactsModal.d.ts} +0 -0
- /package/{android/.gradle/7.5/dependencies-accessors/gc.properties → src/components/executiontasks/collectPayment/components/CustomContactsModal.tsx} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DispatchSdkCache","isTokenExpired","callbackHandler","getHeaders","contentType","_sdkConfig","_sdkConfig2","_sdkConfig3","_sdkConfig4","_sdkConfig5","_sdkConfig6","cache","getInstance","sdkConfig","getObjectFromCache","KEYS","SDK_CONFIG","accessToken","refresheAndUpdateToken","newHeadersObj","headers","Object","fromEntries","entries","map","
|
|
1
|
+
{"version":3,"names":["DispatchSdkCache","isTokenExpired","callbackHandler","getHeaders","contentType","_sdkConfig","_sdkConfig2","_sdkConfig3","_sdkConfig4","_sdkConfig5","_sdkConfig6","cache","getInstance","sdkConfig","getObjectFromCache","KEYS","SDK_CONFIG","accessToken","refresheAndUpdateToken","newHeadersObj","headers","Object","fromEntries","entries","map","k","v","toLowerCase","dspID","getKeyFromCache","DISPATCH_ID","keys","length","userID","tenantID","JSON","stringify","id","getAddHeaders","addHeaders","forEach","h","key","value"],"sources":["NetworkUtils.ts"],"sourcesContent":["import DispatchSdkCache from '../manager/sdk/DispatchSdkCache';\nimport type { Headers } from '../components/executiontasks/httpRequest/HttpRequestETSchema';\nimport type { DispatchSDKConfig } from '../models/sdk';\nimport { isTokenExpired } from '../utils/utils';\nimport callbackHandler from '../manager/sdk/callbacksHandler';\n\nexport async function getHeaders(contentType: string) {\n const cache = DispatchSdkCache.getInstance();\n let sdkConfig: DispatchSDKConfig = await cache.getObjectFromCache(\n DispatchSdkCache.KEYS.SDK_CONFIG\n );\n if(isTokenExpired(sdkConfig.accessToken)){\n await callbackHandler.refresheAndUpdateToken();\n sdkConfig = await cache.getObjectFromCache(\n DispatchSdkCache.KEYS.SDK_CONFIG\n );\n }\n const newHeadersObj = sdkConfig?.headers\n ? Object.fromEntries(\n Object.entries(sdkConfig.headers || {}).map(([k, v]) => [\n k.toLowerCase(),\n v,\n ])\n )\n : {};\n\n const dspID = await cache.getKeyFromCache(DispatchSdkCache.KEYS.DISPATCH_ID);\n return Object.keys(newHeadersObj).length\n ? newHeadersObj\n : {\n 'x-user-id': sdkConfig?.userID,\n 'x-coreos-tid': sdkConfig?.tenantID,\n 'x-coreos-access': sdkConfig?.accessToken,\n 'content-type': contentType,\n 'x-coreos-request-id': dspID ?? sdkConfig?.userID,\n 'x-coreos-userinfo': JSON.stringify({ id: sdkConfig?.userID }),\n };\n}\n\nexport function getAddHeaders(headers?: Headers[]) {\n if (!headers || headers.length === 0) return {};\n else {\n const addHeaders: { [k: string]: string } = {};\n headers.forEach((h) => {\n if (h.key && h.value) addHeaders[h.key] = h.value;\n });\n return addHeaders;\n }\n}\n"],"mappings":"AAAA,OAAOA,gBAAgB,MAAM,iCAAiC;AAG9D,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,OAAOC,eAAe,MAAM,iCAAiC;AAE7D,OAAO,eAAeC,UAAUA,CAACC,WAAmB,EAAE;EAAA,IAAAC,UAAA,EAAAC,WAAA,EAAAC,WAAA,EAAAC,WAAA,EAAAC,WAAA,EAAAC,WAAA;EACpD,MAAMC,KAAK,GAAGX,gBAAgB,CAACY,WAAW,CAAC,CAAC;EAC5C,IAAIC,SAA4B,GAAG,MAAMF,KAAK,CAACG,kBAAkB,CAC/Dd,gBAAgB,CAACe,IAAI,CAACC,UACxB,CAAC;EACD,IAAGf,cAAc,CAACY,SAAS,CAACI,WAAW,CAAC,EAAC;IACvC,MAAMf,eAAe,CAACgB,sBAAsB,CAAC,CAAC;IAC9CL,SAAS,GAAG,MAAMF,KAAK,CAACG,kBAAkB,CACxCd,gBAAgB,CAACe,IAAI,CAACC,UACxB,CAAC;EACH;EACA,MAAMG,aAAa,GAAG,CAAAd,UAAA,GAAAQ,SAAS,cAAAR,UAAA,eAATA,UAAA,CAAWe,OAAO,GACpCC,MAAM,CAACC,WAAW,CAChBD,MAAM,CAACE,OAAO,CAACV,SAAS,CAACO,OAAO,IAAI,CAAC,CAAC,CAAC,CAACI,GAAG,CAAC,CAAC,CAACC,CAAC,EAAEC,CAAC,CAAC,KAAK,CACtDD,CAAC,CAACE,WAAW,CAAC,CAAC,EACfD,CAAC,CACF,CACH,CAAC,GACD,CAAC,CAAC;EAEN,MAAME,KAAK,GAAG,MAAMjB,KAAK,CAACkB,eAAe,CAAC7B,gBAAgB,CAACe,IAAI,CAACe,WAAW,CAAC;EAC5E,OAAOT,MAAM,CAACU,IAAI,CAACZ,aAAa,CAAC,CAACa,MAAM,GACpCb,aAAa,GACb;IACE,WAAW,GAAAb,WAAA,GAAEO,SAAS,cAAAP,WAAA,uBAATA,WAAA,CAAW2B,MAAM;IAC9B,cAAc,GAAA1B,WAAA,GAAEM,SAAS,cAAAN,WAAA,uBAATA,WAAA,CAAW2B,QAAQ;IACnC,iBAAiB,GAAA1B,WAAA,GAAEK,SAAS,cAAAL,WAAA,uBAATA,WAAA,CAAWS,WAAW;IACzC,cAAc,EAAEb,WAAW;IAC3B,qBAAqB,EAAEwB,KAAK,MAAAnB,WAAA,GAAII,SAAS,cAAAJ,WAAA,uBAATA,WAAA,CAAWwB,MAAM;IACjD,mBAAmB,EAAEE,IAAI,CAACC,SAAS,CAAC;MAAEC,EAAE,GAAA3B,WAAA,GAAEG,SAAS,cAAAH,WAAA,uBAATA,WAAA,CAAWuB;IAAO,CAAC;EAC/D,CAAC;AACP;AAEA,OAAO,SAASK,aAAaA,CAAClB,OAAmB,EAAE;EACjD,IAAI,CAACA,OAAO,IAAIA,OAAO,CAACY,MAAM,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,KAC3C;IACH,MAAMO,UAAmC,GAAG,CAAC,CAAC;IAC9CnB,OAAO,CAACoB,OAAO,CAAEC,CAAC,IAAK;MACrB,IAAIA,CAAC,CAACC,GAAG,IAAID,CAAC,CAACE,KAAK,EAAEJ,UAAU,CAACE,CAAC,CAACC,GAAG,CAAC,GAAGD,CAAC,CAACE,KAAK;IACnD,CAAC,CAAC;IACF,OAAOJ,UAAU;EACnB;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["gql","FETCH_REASONS","CREATE_FMS_FOLDER","CUSTODY_IN","CUSTODY_OUT","WORKFLOW_UPDATE"],"sources":["Queries.ts"],"sourcesContent":["import { gql } from '@apollo/client';\n\nexport const FETCH_REASONS = gql`\n query ($limit: String, $offset: String) {\n reasonList(limit: $limit, offset: $offset) {\n data {\n description\n isEnabled\n reasonCode\n isSystemDefined\n }\n }\n }\n`;\n\nexport const CREATE_FMS_FOLDER = gql`\n mutation CreateDispatch($input: Folder!) {\n createFolder(input: $input) {\n id\n }\n }\n`;\n\nexport const CUSTODY_IN = gql`\n mutation CustodyInBatch($input: CustodyBatchInput!) {\n custodyInBatch(input: $input) {\n success\n }\n }\n`;\n\nexport const CUSTODY_OUT = gql`\n mutation CustodyOutBatch($input: CustodyBatchInput!) {\n custodyOutBatch(input: $input) {\n success\n }\n }\n`;\n\nexport const WORKFLOW_UPDATE = gql`\n mutation ($input: WorkflowUpdateStatusInput!) {\n updateWorkflowStatus(input: $input) {\n id\n }\n }\n`;\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AAEpC,OAAO,MAAMC,aAAa,GAAGD,
|
|
1
|
+
{"version":3,"names":["gql","FETCH_REASONS","CREATE_FMS_FOLDER","CUSTODY_IN","CUSTODY_OUT","WORKFLOW_UPDATE"],"sources":["Queries.ts"],"sourcesContent":["import { gql } from '@apollo/client';\n\nexport const FETCH_REASONS = gql`\n query ($limit: String, $offset: String) {\n reasonList(limit: $limit, offset: $offset) {\n data {\n description\n isEnabled\n reasonCode\n isSystemDefined\n }\n }\n }\n`;\n\nexport const CREATE_FMS_FOLDER = gql`\n mutation CreateDispatch($input: Folder!) {\n createFolder(input: $input) {\n id\n }\n }\n`;\n\nexport const CUSTODY_IN = gql`\n mutation CustodyInBatch($input: CustodyBatchInput!) {\n custodyInBatch(input: $input) {\n success\n }\n }\n`;\n\nexport const CUSTODY_OUT = gql`\n mutation CustodyOutBatch($input: CustodyBatchInput!) {\n custodyOutBatch(input: $input) {\n success\n }\n }\n`;\n\nexport const WORKFLOW_UPDATE = gql`\n mutation ($input: WorkflowUpdateStatusInput!) {\n updateWorkflowStatus(input: $input) {\n id\n }\n }\n`;\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AAEpC,OAAO,MAAMC,aAAa,GAAGD,GAAG;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAME,iBAAiB,GAAGF,GAAG;AACpC;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMG,UAAU,GAAGH,GAAG;AAC7B;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMI,WAAW,GAAGJ,GAAG;AAC9B;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMK,eAAe,GAAGL,GAAG;AAClC;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
function _defineProperty(
|
|
2
|
-
function _toPropertyKey(
|
|
3
|
-
function _toPrimitive(
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
4
|
import axios from 'axios';
|
|
5
5
|
import StatusCode from '../constants/statuscode';
|
|
6
6
|
// import { handleAccessTokenExpiry } from './utils/helper';
|
|
@@ -15,6 +15,7 @@ export default class HttpClient {
|
|
|
15
15
|
return response;
|
|
16
16
|
});
|
|
17
17
|
_defineProperty(this, "_handleError", error => {
|
|
18
|
+
console.log('error.response: ', error);
|
|
18
19
|
if (error.response) {
|
|
19
20
|
// Request made and server responded
|
|
20
21
|
const {
|
|
@@ -57,7 +58,6 @@ export default class HttpClient {
|
|
|
57
58
|
baseURL,
|
|
58
59
|
timeout: 60000 // timeout of 60s
|
|
59
60
|
});
|
|
60
|
-
|
|
61
61
|
this._initializeResponseInterceptor();
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["axios","StatusCode","HttpClient","constructor","baseURL","_defineProperty","instance","interceptors","response","use","_handleResponse","_handleError","error","status","InternalServerError","Forbidden","Unauthorized","TooManyRequests","request","
|
|
1
|
+
{"version":3,"names":["axios","StatusCode","HttpClient","constructor","baseURL","_defineProperty","instance","interceptors","response","use","_handleResponse","_handleError","error","console","log","status","InternalServerError","Forbidden","Unauthorized","TooManyRequests","request","message","Promise","reject","create","timeout","_initializeResponseInterceptor"],"sources":["client.ts"],"sourcesContent":["import axios, { AxiosInstance, AxiosResponse } from 'axios';\nimport StatusCode from '../constants/statuscode';\n// import { handleAccessTokenExpiry } from './utils/helper';\n\nexport default abstract class HttpClient {\n protected readonly instance: AxiosInstance;\n\n protected constructor(baseURL: string) {\n this.instance = axios.create({\n baseURL,\n timeout: 60000, // timeout of 60s\n });\n\n this._initializeResponseInterceptor();\n }\n\n private _initializeResponseInterceptor = () => {\n this.instance.interceptors.response.use(\n this._handleResponse,\n this._handleError\n );\n };\n\n protected _handleResponse = (response: AxiosResponse) => {\n return response;\n };\n\n protected _handleError = (error: any) => {\n console.log('error.response: ', error);\n if (error.response) {\n // Request made and server responded\n const { status } = error.response;\n switch (status) {\n case StatusCode.InternalServerError: {\n // Handle InternalServerError\n break;\n }\n case StatusCode.Forbidden: {\n // Handle Forbidden\n break;\n }\n case StatusCode.Unauthorized: {\n // Handle Unauthorized\n //LoginHelper.handleAccessTokenExpiry(); //commented out as this was causing cycles\n //cycle: ../src/utils/loginHelper.ts -> ../src/resources/Login.ts -> ../src/network/client.ts -> ../src/utils/loginHelper.ts\n break;\n }\n case StatusCode.TooManyRequests: {\n // Handle TooManyRequests\n break;\n }\n }\n } else if (error.request) {\n // The request was made but no response was received\n // Network error should be received here\n } else {\n // Something happened in setting up the request that triggered an Error\n console.log('Error else', error.message);\n }\n return Promise.reject(error);\n };\n}\n"],"mapp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}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
function _defineProperty(
|
|
2
|
-
function _toPropertyKey(
|
|
3
|
-
function _toPrimitive(
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
4
|
import HttpClient from '../network/client';
|
|
5
5
|
class Login extends HttpClient {
|
|
6
6
|
constructor() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
function _defineProperty(
|
|
2
|
-
function _toPropertyKey(
|
|
3
|
-
function _toPrimitive(
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
4
|
import HttpClient from '../network/client';
|
|
5
5
|
class Network extends HttpClient {
|
|
6
6
|
constructor() {
|
|
@@ -132,12 +132,20 @@ export const CommonStyles = StyleSheet.create({
|
|
|
132
132
|
justifyContent: 'center',
|
|
133
133
|
fontFamily: 'IBMPlexSans_400Regular',
|
|
134
134
|
fontStyle: 'normal',
|
|
135
|
+
fontWeight: '400',
|
|
135
136
|
fontSize: 14,
|
|
136
137
|
letterSpacing: 0.25,
|
|
137
138
|
lineHeight: 20,
|
|
138
139
|
textAlign: 'center',
|
|
139
|
-
color: '#
|
|
140
|
+
color: '#3D445C',
|
|
140
141
|
marginBottom: 10
|
|
142
|
+
},
|
|
143
|
+
titleText: {
|
|
144
|
+
fontFamily: Fonts.IBMPlexSans_500Medium,
|
|
145
|
+
fontWeight: '500',
|
|
146
|
+
fontSize: 16,
|
|
147
|
+
lineHeight: 28,
|
|
148
|
+
color: '#3D445C'
|
|
141
149
|
}
|
|
142
150
|
});
|
|
143
151
|
export const DeliverPickupStyles = StyleSheet.create({
|
|
@@ -164,11 +172,13 @@ export const DeliverPickupStyles = StyleSheet.create({
|
|
|
164
172
|
modalView: {
|
|
165
173
|
backgroundColor: 'white',
|
|
166
174
|
padding: 15,
|
|
175
|
+
paddingVertical: 45,
|
|
176
|
+
// paddingVertical: 14,
|
|
167
177
|
borderRadius: 9
|
|
168
178
|
},
|
|
169
179
|
titleText: {
|
|
170
180
|
justifyContent: 'center',
|
|
171
|
-
fontFamily: Fonts.IBMPlexSans_600SemiBold,
|
|
181
|
+
fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_600SemiBold : 'IBMPlexSans-SemiBold',
|
|
172
182
|
fontStyle: 'normal',
|
|
173
183
|
fontSize: 14,
|
|
174
184
|
lineHeight: 20,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","Platform","SdkColors","ColorTheme","Fonts","deliverETStyles","create","item","padding","marginTop","title","fontSize","footerButtonStyles","flexDirection","width","input","marginBottom","footerComponent","flex","marginStart","marginEnd","marginRight","position","bottom","errorText","color","fontStyle","CommonStyles","alignCenter","alignItems","flexRow","mainContainer","backgroundColor","nextButton","LIGHT","primaryButton","nextButtonLabel","fontFamily","OS","IBMPlexSans_500Medium","lineHeight","textAlign","fontWeight","cancelButton","borderWidth","borderColor","cancelButtonLabel","defaultColor","textTransform","mainExitButton","exitButton","mainExitButtonLabel","exitButtonLabel","justifyContent","modalContent","modalView","borderRadius","subText","letterSpacing","DeliverPickupStyles","itemTextStyle","IBMPlexSans_400Regular","flatList","titleText","IBMPlexSans_600SemiBold","messageText"],"sources":["CommonStyles.ts"],"sourcesContent":["import { StyleSheet,Platform } from 'react-native';\nimport SdkColors, { ColorTheme } from '../SdkColors';\n\nexport enum Fonts {\n IBMPlexSans_400Regular = 'IBMPlexSans_400Regular',\n IBMPlexSans_600SemiBold = 'IBMPlexSans_600SemiBold',\n IBMPlexSans_300Light = 'IBMPlexSans_300Light',\n IBMPlexSans_700Bold = 'IBMPlexSans_700Bold',\n IBMPlexSans_100Thin = 'IBMPlexSans_100Thin',\n IBMPlexSans_100Thin_Italic = 'IBMPlexSans_100Thin_Italic',\n IBMPlexSans_200ExtraLight = 'IBMPlexSans_200ExtraLight',\n IBMPlexSans_200ExtraLight_Italic = 'IBMPlexSans_200ExtraLight_Italic',\n IBMPlexSans_300Light_Italic = 'IBMPlexSans_300Light_Italic',\n IBMPlexSans_400Regular_Italic = 'IBMPlexSans_400Regular_Italic',\n IBMPlexSans_500Medium = 'IBMPlexSans_500Medium',\n IBMPlexSans_500Medium_Italic = 'IBMPlexSans_500Medium_Italic',\n IBMPlexSans_600SemiBold_Italic = 'IBMPlexSans_600SemiBold_Italic',\n IBMPlexSans_700Bold_Italic = 'IBMPlexSans_700Bold_Italic',\n}\nexport const deliverETStyles = StyleSheet.create({\n item: {\n padding: 2,\n marginTop: 8,\n },\n title: {\n fontSize: 16,\n },\n footerButtonStyles: {\n flexDirection: 'row',\n width: '100%',\n },\n input: {\n marginTop: 12,\n marginBottom: 10,\n },\n footerComponent: {\n flex: 1,\n marginStart: 8,\n marginEnd: 8,\n marginRight: 8,\n width: '100%',\n position: 'absolute',\n bottom: 10,\n },\n errorText: {\n color: 'red',\n fontSize: 16,\n fontStyle: 'normal',\n },\n});\nexport const CommonStyles = StyleSheet.create({\n alignCenter: {\n flex: 1,\n alignItems: 'center',\n },\n flexRow: {\n flex: 1,\n flexDirection: 'row',\n },\n mainContainer: {\n flex: 1,\n backgroundColor: '#f9f9f9',\n },\n nextButton: {\n backgroundColor: SdkColors[ColorTheme.LIGHT].primaryButton,\n },\n nextButtonLabel: {\n color: '#ffffff',\n fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_500Medium : 'IBMPlexSans-Medium',\n fontSize: 14,\n lineHeight: 20,\n textAlign: 'center',\n fontStyle: 'normal',\n fontWeight: '500',\n },\n cancelButton: {\n borderWidth: 1,\n borderColor: SdkColors[ColorTheme.LIGHT].primaryButton,\n },\n cancelButtonLabel: {\n color: SdkColors[ColorTheme.LIGHT].defaultColor,\n fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_500Medium : 'IBMPlexSans-Medium',\n fontSize: 14,\n fontWeight: '500',\n lineHeight: 20,\n textAlign: 'center',\n fontStyle: 'normal',\n textTransform:'capitalize'\n },\n mainExitButton: {\n backgroundColor: SdkColors[ColorTheme.LIGHT].exitButton,\n },\n mainExitButtonLabel: {\n color: '#ffffff',\n fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_500Medium : 'IBMPlexSans-Medium',\n fontSize: 14,\n fontWeight: '500',\n lineHeight: 20,\n textAlign: 'center',\n fontStyle: 'normal',\n },\n exitButton: {\n borderWidth: 1,\n borderColor: SdkColors[ColorTheme.LIGHT].exitButton,\n },\n exitButtonLabel: {\n color: SdkColors[ColorTheme.LIGHT].exitButton,\n fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_500Medium : 'IBMPlexSans-Medium',\n fontSize: 14,\n fontWeight: '500',\n lineHeight: 20,\n textAlign: 'center',\n fontStyle: 'normal',\n },\n bottom: {\n flex: 1,\n justifyContent: 'flex-end',\n marginBottom: 10,\n },\n modalContent: {\n marginStart: 60,\n marginEnd: 60,\n flex: 1,\n marginBottom: 60,\n },\n modalView: {\n backgroundColor: 'white',\n padding: 15,\n borderRadius: 9,\n },\n subText: {\n justifyContent: 'center',\n fontFamily: 'IBMPlexSans_400Regular',\n fontStyle: 'normal',\n fontSize: 14,\n letterSpacing: 0.25,\n lineHeight: 20,\n textAlign: 'center',\n color: '#000000',\n marginBottom: 10,\n },\n});\nexport const DeliverPickupStyles = StyleSheet.create({\n itemTextStyle: {\n fontFamily: Fonts.IBMPlexSans_400Regular,\n color: '#111111',\n textAlign: 'center',\n alignItems: 'center',\n justifyContent: 'center',\n },\n mainContainer: {\n flex: 1,\n backgroundColor: 'rgba(61, 68, 92, 0.7)',\n },\n modalContent: {\n marginStart: 60,\n marginEnd: 60,\n flex: 1,\n marginBottom: 60,\n },\n flatList: {\n marginTop: 7,\n },\n modalView: {\n backgroundColor: 'white',\n padding: 15,\n borderRadius: 9,\n },\n titleText: {\n justifyContent: 'center',\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n fontStyle: 'normal',\n fontSize: 14,\n lineHeight: 20,\n textAlign: 'center',\n color: '#111111',\n },\n messageText: {\n marginTop: 10,\n justifyContent: 'center',\n fontFamily: Fonts.IBMPlexSans_400Regular,\n fontStyle: 'normal',\n fontWeight: '400',\n fontSize: 14,\n lineHeight: 20,\n textAlign: 'center',\n color: '#000000',\n },\n});\n"],"mappings":"AAAA,SAASA,UAAU,EAACC,QAAQ,QAAQ,cAAc;AAClD,OAAOC,SAAS,IAAIC,UAAU,QAAQ,cAAc;AAEpD,WAAYC,KAAK,0BAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAAA,OAALA,KAAK;AAAA;AAgBjB,OAAO,MAAMC,eAAe,GAAGL,UAAU,CAACM,MAAM,CAAC;EAC/CC,IAAI,EAAE;IACJC,OAAO,EAAE,CAAC;IACVC,SAAS,EAAE;EACb,CAAC;EACDC,KAAK,EAAE;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,KAAK,CAAC4D,uBAAuB;IACzCtC,SAAS,EAAE,QAAQ;IACnBf,QAAQ,EAAE,EAAE;IACZ6B,UAAU,EAAE,EAAE;IACdC,SAAS,EAAE,QAAQ;IACnBhB,KAAK,EAAE;EACT,CAAC;EACDwC,WAAW,EAAE;IACXxD,SAAS,EAAE,EAAE;IACb4C,cAAc,EAAE,QAAQ;IACxBhB,UAAU,EAAEjC,KAAK,CAACyD,sBAAsB;IACxCnC,SAAS,EAAE,QAAQ;IACnBgB,UAAU,EAAE,KAAK;IACjB/B,QAAQ,EAAE,EAAE;IACZ6B,UAAU,EAAE,EAAE;IACdC,SAAS,EAAE,QAAQ;IACnBhB,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["StyleSheet","Platform","SdkColors","ColorTheme","Fonts","deliverETStyles","create","item","padding","marginTop","title","fontSize","footerButtonStyles","flexDirection","width","input","marginBottom","footerComponent","flex","marginStart","marginEnd","marginRight","position","bottom","errorText","color","fontStyle","CommonStyles","alignCenter","alignItems","flexRow","mainContainer","backgroundColor","nextButton","LIGHT","primaryButton","nextButtonLabel","fontFamily","OS","IBMPlexSans_500Medium","lineHeight","textAlign","fontWeight","cancelButton","borderWidth","borderColor","cancelButtonLabel","defaultColor","textTransform","mainExitButton","exitButton","mainExitButtonLabel","exitButtonLabel","justifyContent","modalContent","modalView","borderRadius","subText","letterSpacing","titleText","DeliverPickupStyles","itemTextStyle","IBMPlexSans_400Regular","flatList","paddingVertical","IBMPlexSans_600SemiBold","messageText"],"sources":["CommonStyles.ts"],"sourcesContent":["import { StyleSheet, Platform } from 'react-native';\nimport SdkColors, { ColorTheme } from '../SdkColors';\n\nexport enum Fonts {\n IBMPlexSans_400Regular = 'IBMPlexSans_400Regular',\n IBMPlexSans_600SemiBold = 'IBMPlexSans_600SemiBold',\n IBMPlexSans_300Light = 'IBMPlexSans_300Light',\n IBMPlexSans_700Bold = 'IBMPlexSans_700Bold',\n IBMPlexSans_100Thin = 'IBMPlexSans_100Thin',\n IBMPlexSans_100Thin_Italic = 'IBMPlexSans_100Thin_Italic',\n IBMPlexSans_200ExtraLight = 'IBMPlexSans_200ExtraLight',\n IBMPlexSans_200ExtraLight_Italic = 'IBMPlexSans_200ExtraLight_Italic',\n IBMPlexSans_300Light_Italic = 'IBMPlexSans_300Light_Italic',\n IBMPlexSans_400Regular_Italic = 'IBMPlexSans_400Regular_Italic',\n IBMPlexSans_500Medium = 'IBMPlexSans_500Medium',\n IBMPlexSans_500Medium_Italic = 'IBMPlexSans_500Medium_Italic',\n IBMPlexSans_600SemiBold_Italic = 'IBMPlexSans_600SemiBold_Italic',\n IBMPlexSans_700Bold_Italic = 'IBMPlexSans_700Bold_Italic',\n}\nexport const deliverETStyles = StyleSheet.create({\n item: {\n padding: 2,\n marginTop: 8,\n },\n title: {\n fontSize: 16,\n },\n footerButtonStyles: {\n flexDirection: 'row',\n width: '100%',\n },\n input: {\n marginTop: 12,\n marginBottom: 10,\n },\n footerComponent: {\n flex: 1,\n marginStart: 8,\n marginEnd: 8,\n marginRight: 8,\n width: '100%',\n position: 'absolute',\n bottom: 10,\n },\n errorText: {\n color: 'red',\n fontSize: 16,\n fontStyle: 'normal',\n },\n});\nexport const CommonStyles = StyleSheet.create({\n alignCenter: {\n flex: 1,\n alignItems: 'center',\n },\n flexRow: {\n flex: 1,\n flexDirection: 'row',\n },\n mainContainer: {\n flex: 1,\n backgroundColor: '#f9f9f9',\n },\n nextButton: {\n backgroundColor: SdkColors[ColorTheme.LIGHT].primaryButton,\n },\n nextButtonLabel: {\n color: '#ffffff',\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_500Medium\n : 'IBMPlexSans-Medium',\n fontSize: 14,\n lineHeight: 20,\n textAlign: 'center',\n fontStyle: 'normal',\n fontWeight: '500',\n },\n cancelButton: {\n borderWidth: 1,\n borderColor: SdkColors[ColorTheme.LIGHT].primaryButton,\n },\n cancelButtonLabel: {\n color: SdkColors[ColorTheme.LIGHT].defaultColor,\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_500Medium\n : 'IBMPlexSans-Medium',\n fontSize: 14,\n fontWeight: '500',\n lineHeight: 20,\n textAlign: 'center',\n fontStyle: 'normal',\n textTransform: 'capitalize',\n },\n mainExitButton: {\n backgroundColor: SdkColors[ColorTheme.LIGHT].exitButton,\n },\n mainExitButtonLabel: {\n color: '#ffffff',\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_500Medium\n : 'IBMPlexSans-Medium',\n fontSize: 14,\n fontWeight: '500',\n lineHeight: 20,\n textAlign: 'center',\n fontStyle: 'normal',\n },\n exitButton: {\n borderWidth: 1,\n borderColor: SdkColors[ColorTheme.LIGHT].exitButton,\n },\n exitButtonLabel: {\n color: SdkColors[ColorTheme.LIGHT].exitButton,\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_500Medium\n : 'IBMPlexSans-Medium',\n fontSize: 14,\n fontWeight: '500',\n lineHeight: 20,\n textAlign: 'center',\n fontStyle: 'normal',\n },\n bottom: {\n flex: 1,\n justifyContent: 'flex-end',\n marginBottom: 10,\n },\n modalContent: {\n marginStart: 60,\n marginEnd: 60,\n flex: 1,\n marginBottom: 60,\n },\n modalView: {\n backgroundColor: 'white',\n padding: 15,\n borderRadius: 9,\n },\n subText: {\n justifyContent: 'center',\n fontFamily: 'IBMPlexSans_400Regular',\n fontStyle: 'normal',\n fontWeight: '400',\n fontSize: 14,\n letterSpacing: 0.25,\n lineHeight: 20,\n textAlign: 'center',\n color: '#3D445C',\n marginBottom: 10,\n },\n titleText: {\n fontFamily: Fonts.IBMPlexSans_500Medium,\n fontWeight: '500',\n fontSize: 16,\n lineHeight: 28,\n color: '#3D445C',\n },\n});\nexport const DeliverPickupStyles = StyleSheet.create({\n itemTextStyle: {\n fontFamily: Fonts.IBMPlexSans_400Regular,\n color: '#111111',\n textAlign: 'center',\n alignItems: 'center',\n justifyContent: 'center',\n },\n mainContainer: {\n flex: 1,\n backgroundColor: 'rgba(61, 68, 92, 0.7)',\n },\n modalContent: {\n marginStart: 60,\n marginEnd: 60,\n flex: 1,\n marginBottom: 60,\n },\n flatList: {\n marginTop: 7,\n },\n modalView: {\n backgroundColor: 'white',\n padding: 15,\n paddingVertical: 45,\n // paddingVertical: 14,\n borderRadius: 9,\n },\n titleText: {\n justifyContent: 'center',\n fontFamily: Platform.OS === 'android'\n ? Fonts.IBMPlexSans_600SemiBold\n : 'IBMPlexSans-SemiBold',\n fontStyle: 'normal',\n fontSize: 14,\n lineHeight: 20,\n textAlign: 'center',\n color: '#111111',\n },\n messageText: {\n marginTop: 10,\n justifyContent: 'center',\n fontFamily: Fonts.IBMPlexSans_400Regular,\n fontStyle: 'normal',\n fontWeight: '400',\n fontSize: 14,\n lineHeight: 20,\n textAlign: 'center',\n color: '#000000',\n },\n});\n"],"mappings":"AAAA,SAASA,UAAU,EAAEC,QAAQ,QAAQ,cAAc;AACnD,OAAOC,SAAS,IAAIC,UAAU,QAAQ,cAAc;AAEpD,WAAYC,KAAK,0BAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAAA,OAALA,KAAK;AAAA;AAgBjB,OAAO,MAAMC,eAAe,GAAGL,UAAU,CAACM,MAAM,CAAC;EAC/CC,IAAI,EAAE;IACJC,OAAO,EAAE,CAAC;IACVC,SAAS,EAAE;EACb,CAAC;EACDC,KAAK,EAAE;IACLC,QAAQ,EAAE;EACZ,CAAC;EACDC,kBAAkB,EAAE;IAClBC,aAAa,EAAE,KAAK;IACpBC,KAAK,EAAE;EACT,CAAC;EACDC,KAAK,EAAE;IACLN,SAAS,EAAE,EAAE;IACbO,YAAY,EAAE;EAChB,CAAC;EACDC,eAAe,EAAE;IACfC,IAA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;IACxBhB,UAAU,EAAEpC,QAAQ,CAACqC,EAAE,KAAK,SAAS,GACnClC,KAAK,CAAC6D,uBAAuB,GAC7B,sBAAsB;IACxBvC,SAAS,EAAE,QAAQ;IACnBf,QAAQ,EAAE,EAAE;IACZ6B,UAAU,EAAE,EAAE;IACdC,SAAS,EAAE,QAAQ;IACnBhB,KAAK,EAAE;EACT,CAAC;EACDyC,WAAW,EAAE;IACXzD,SAAS,EAAE,EAAE;IACb4C,cAAc,EAAE,QAAQ;IACxBhB,UAAU,EAAEjC,KAAK,CAAC0D,sBAAsB;IACxCpC,SAAS,EAAE,QAAQ;IACnBgB,UAAU,EAAE,KAAK;IACjB/B,QAAQ,EAAE,EAAE;IACZ6B,UAAU,EAAE,EAAE;IACdC,SAAS,EAAE,QAAQ;IACnBhB,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -7,12 +7,11 @@ import ReasonCodeContainer from '../../manager/dispatchCodes/ReasonCodeContainer
|
|
|
7
7
|
import { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';
|
|
8
8
|
import DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';
|
|
9
9
|
const instance = DispatchStateContainer.getInstance();
|
|
10
|
-
const CancellationScreen =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} = _ref;
|
|
10
|
+
const CancellationScreen = ({
|
|
11
|
+
route,
|
|
12
|
+
navigation,
|
|
13
|
+
baseETProps
|
|
14
|
+
}) => {
|
|
16
15
|
const nextState = route.params[RouteParams.NEXT_STATES];
|
|
17
16
|
const {
|
|
18
17
|
taskMeta,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CancelET","React","useEffect","useState","getEventCodeByET","withBaseDispatchScreen","getBaseETResponse","getEntityCodeByET","ReasonCodeContainer","RouteParams","getDataFromNextState","DispatchStateContainer","instance","getInstance","CancellationScreen","_ref","route","navigation","baseETProps","nextState","params","NEXT_STATES","taskMeta","mergedObjectiveId","input","wfMeta","reasons","setReasons","events","setEvents","reasonCodes","REASONS","length","values","reasonCode","push","description","eventCodes","EVENT_CODES","e_values","eventCode","createElement","cancelEvent","CANCEL_EVENT","cancellationEvents","cancellationReasons","applicableCodes","APPLICABLE_CODES","eventRows","onSubmitET","reason","reasonsRow","isMergedObjBasedOutput","IS_MERGED_OBJ_BASED_OUTPUT","ET_SUCCESS","ET_SUCCESS_RESPONSE","getReasonCodeFromText","saveAndProceed","IS_LAST_ET","_eventCodeOutput","CURRENT_ET_NAME"],"sources":["CancellationScreen.tsx"],"sourcesContent":["import CancelET from '../../components/executiontasks/cancellation/CancelET';\nimport React, { useEffect, useState } from 'react';\nimport { getEventCodeByET } from '../../manager/dispatchCodes/EventCodeContainer';\nimport withBaseDispatchScreen from './WithBaseDispatchScreen';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport {\n getBaseETResponse,\n getEntityCodeByET,\n} from '../../utils/ExecTaskUtils';\nimport ReasonCodeContainer from '../../manager/dispatchCodes/ReasonCodeContainer';\nimport type { EventsRow, ReasonsRow } from '../../manager/syncmanager/DBConfig';\nimport { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\n\nconst instance = DispatchStateContainer.getInstance();\nconst CancellationScreen = ({\n route,\n navigation,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n const nextState = route.params[RouteParams.NEXT_STATES];\n const { taskMeta, mergedObjectiveId, input, wfMeta } =\n getDataFromNextState(nextState);\n const [reasons, setReasons] = useState<string[]>([]);\n const [events, setEvents] = useState<string[]>([]);\n useEffect(() => {\n const reasonCodes = route.params[RouteParams.REASONS];\n if (reasonCodes && reasonCodes.length) {\n const values: string[] = [];\n for (let reasonCode of reasonCodes as ReasonsRow[]) {\n values.push(reasonCode.description);\n }\n setReasons(values);\n }\n const eventCodes = route.params[RouteParams.EVENT_CODES];\n\n if (eventCodes && eventCodes.length) {\n const e_values: string[] = [];\n for (let eventCode of route.params[\n RouteParams.EVENT_CODES\n ] as EventsRow[]) {\n e_values.push(eventCode.description);\n }\n setEvents(e_values);\n }\n }, [route.params]);\n\n return events.length || reasons.length ? (\n <CancelET\n // mergedObjectiveId={mergedObjectiveId}\n cancelEvent={route.params[RouteParams.CANCEL_EVENT] || ''}\n cancellationEvents={events}\n cancellationReasons={reasons}\n applicableCodes={route.params[RouteParams.APPLICABLE_CODES]}\n eventRows={route.params[RouteParams.EVENT_CODES]}\n onSubmitET={async (reason, eventCode, reasonsRow) => {\n const isMergedObjBasedOutput =\n route.params[RouteParams.IS_MERGED_OBJ_BASED_OUTPUT];\n if (route.params[RouteParams.ET_SUCCESS]) {\n if (route.params[RouteParams.EVENT_CODES] && eventCode) {\n // if (isJobBasedOutput)\n // route.params[\n // RouteParams.ET_SUCCESS_RESPONSE\n // ].baseResponse.eventCode = eventCode;\n // else\n route.params[RouteParams.ET_SUCCESS_RESPONSE].eventCode = eventCode;\n } else if (eventCode) {\n // if (isJobBasedOutput)\n // route.params[\n // RouteParams.ET_SUCCESS_RESPONSE\n // ].baseResponse.eventCode = eventCode;\n // else\n route.params[RouteParams.ET_SUCCESS_RESPONSE].eventCode = eventCode;\n }\n\n // if (isJobBasedOutput)\n // route.params[\n // RouteParams.ET_SUCCESS_RESPONSE\n // ].baseResponse.reasonCode =\n // ReasonCodeContainer.getReasonCodeFromText(\n // reason,\n // route.params[RouteParams.REASONS]\n // ? route.params[RouteParams.REASONS]\n // : reasonsRow\n // );\n // else\n route.params[RouteParams.ET_SUCCESS_RESPONSE].reasonCode =\n ReasonCodeContainer.getReasonCodeFromText(\n reason,\n route.params[RouteParams.REASONS]\n ? route.params[RouteParams.REASONS]\n : reasonsRow\n );\n\n await instance.saveAndProceed(\n baseETProps,\n route.params[RouteParams.ET_SUCCESS_RESPONSE],\n route.params,\n navigation,\n route.params[RouteParams.IS_LAST_ET],\n isMergedObjBasedOutput\n );\n } else {\n let _eventCodeOutput = '';\n if (route.params[RouteParams.EVENT_CODES] && eventCode) {\n _eventCodeOutput = eventCode;\n } else if (eventCode) _eventCodeOutput = eventCode;\n\n await instance.saveAndProceed(\n baseETProps,\n await getBaseETResponse(\n getEntityCodeByET(route.params[RouteParams.CURRENT_ET_NAME]),\n false,\n _eventCodeOutput\n ? _eventCodeOutput\n : getEventCodeByET(\n route.params[RouteParams.CURRENT_ET_NAME],\n false,\n route.params[RouteParams.EVENT_CODES] || []\n ),\n ReasonCodeContainer.getReasonCodeFromText(\n reason,\n route.params[RouteParams.REASONS]\n ? route.params[RouteParams.REASONS]\n : reasonsRow\n ),\n mergedObjectiveId,\n route.params[RouteParams.CURRENT_ET_NAME]\n ),\n route.params,\n navigation,\n route.params[RouteParams.IS_LAST_ET],\n isMergedObjBasedOutput\n );\n }\n }}\n />\n ) : null;\n};\nexport default withBaseDispatchScreen(CancellationScreen);\n"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,uDAAuD;AAC5E,OAAOC,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,gBAAgB,QAAQ,gDAAgD;AACjF,OAAOC,sBAAsB,MAAM,0BAA0B;AAE7D,SACEC,iBAAiB,EACjBC,iBAAiB,QACZ,2BAA2B;AAClC,OAAOC,mBAAmB,MAAM,iDAAiD;AAEjF,SAASC,WAAW,EAAEC,oBAAoB,QAAQ,yBAAyB;AAC3E,OAAOC,sBAAsB,MAAM,+CAA+C;AAElF,MAAMC,QAAQ,GAAGD,sBAAsB,CAACE,WAAW,CAAC,CAAC;AACrD,MAAMC,kBAAkB,GAAGC,IAAA,IAQrB;EAAA,IARsB;IAC1BC,KAAK;IACLC,UAAU;IACVC;EAKF,CAAC,GAAAH,IAAA;EACC,MAAMI,SAAS,GAAGH,KAAK,CAACI,MAAM,CAACX,WAAW,CAACY,WAAW,CAAC;EACvD,MAAM;IAAEC,QAAQ;IAAEC,iBAAiB;IAAEC,KAAK;IAAE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MAAM;QACL,IAAIO,gBAAgB,GAAG,EAAE;QACzB,IAAI3C,KAAK,CAACI,MAAM,CAACX,WAAW,CAAC6B,WAAW,CAAC,IAAIE,SAAS,EAAE;UACtDmB,gBAAgB,GAAGnB,SAAS;QAC9B,CAAC,MAAM,IAAIA,SAAS,EAAEmB,gBAAgB,GAAGnB,SAAS;QAElD,MAAM5B,QAAQ,CAAC6C,cAAc,CAC3BvC,WAAW,EACX,MAAMZ,iBAAiB,CACrBC,iBAAiB,CAACS,KAAK,CAACI,MAAM,CAACX,WAAW,CAACmD,eAAe,CAAC,CAAC,EAC5D,KAAK,EACLD,gBAAgB,GACZA,gBAAgB,GAChBvD,gBAAgB,CACdY,KAAK,CAACI,MAAM,CAACX,WAAW,CAACmD,eAAe,CAAC,EACzC,KAAK,EACL5C,KAAK,CAACI,MAAM,CAACX,WAAW,CAAC6B,WAAW,CAAC,IAAI,EAC3C,CAAC,EACL9B,mBAAmB,CAACgD,qBAAqB,CACvCN,MAAM,EACNlC,KAAK,CAACI,MAAM,CAACX,WAAW,CAACsB,OAAO,CAAC,GAC7Bf,KAAK,CAACI,MAAM,CAACX,WAAW,CAACsB,OAAO,CAAC,GACjCoB,UACN,CAAC,EACD5B,iBAAiB,EACjBP,KAAK,CAACI,MAAM,CAACX,WAAW,CAACmD,eAAe,CAC1C,CAAC,EACD5C,KAAK,CAACI,MAAM,EACZH,UAAU,EACVD,KAAK,CAACI,MAAM,CAACX,WAAW,CAACiD,UAAU,CAAC,EACpCN,sBACF,CAAC;MACH;IACF;EAAE,CACH,CAAC,GACA,IAAI;AACV,CAAC;AACD,eAAe/C,sBAAsB,CAACS,kBAAkB,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["CancelET","React","useEffect","useState","getEventCodeByET","withBaseDispatchScreen","getBaseETResponse","getEntityCodeByET","ReasonCodeContainer","RouteParams","getDataFromNextState","DispatchStateContainer","instance","getInstance","CancellationScreen","route","navigation","baseETProps","nextState","params","NEXT_STATES","taskMeta","mergedObjectiveId","input","wfMeta","reasons","setReasons","events","setEvents","reasonCodes","REASONS","length","values","reasonCode","push","description","eventCodes","EVENT_CODES","e_values","eventCode","createElement","cancelEvent","CANCEL_EVENT","cancellationEvents","cancellationReasons","applicableCodes","APPLICABLE_CODES","eventRows","onSubmitET","reason","reasonsRow","isMergedObjBasedOutput","IS_MERGED_OBJ_BASED_OUTPUT","ET_SUCCESS","ET_SUCCESS_RESPONSE","getReasonCodeFromText","saveAndProceed","IS_LAST_ET","_eventCodeOutput","CURRENT_ET_NAME"],"sources":["CancellationScreen.tsx"],"sourcesContent":["import CancelET from '../../components/executiontasks/cancellation/CancelET';\nimport React, { useEffect, useState } from 'react';\nimport { getEventCodeByET } from '../../manager/dispatchCodes/EventCodeContainer';\nimport withBaseDispatchScreen from './WithBaseDispatchScreen';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport {\n getBaseETResponse,\n getEntityCodeByET,\n} from '../../utils/ExecTaskUtils';\nimport ReasonCodeContainer from '../../manager/dispatchCodes/ReasonCodeContainer';\nimport type { EventsRow, ReasonsRow } from '../../manager/syncmanager/DBConfig';\nimport { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\n\nconst instance = DispatchStateContainer.getInstance();\nconst CancellationScreen = ({\n route,\n navigation,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n const nextState = route.params[RouteParams.NEXT_STATES];\n const { taskMeta, mergedObjectiveId, input, wfMeta } =\n getDataFromNextState(nextState);\n const [reasons, setReasons] = useState<string[]>([]);\n const [events, setEvents] = useState<string[]>([]);\n useEffect(() => {\n const reasonCodes = route.params[RouteParams.REASONS];\n if (reasonCodes && reasonCodes.length) {\n const values: string[] = [];\n for (let reasonCode of reasonCodes as ReasonsRow[]) {\n values.push(reasonCode.description);\n }\n setReasons(values);\n }\n const eventCodes = route.params[RouteParams.EVENT_CODES];\n\n if (eventCodes && eventCodes.length) {\n const e_values: string[] = [];\n for (let eventCode of route.params[\n RouteParams.EVENT_CODES\n ] as EventsRow[]) {\n e_values.push(eventCode.description);\n }\n setEvents(e_values);\n }\n }, [route.params]);\n\n return events.length || reasons.length ? (\n <CancelET\n // mergedObjectiveId={mergedObjectiveId}\n cancelEvent={route.params[RouteParams.CANCEL_EVENT] || ''}\n cancellationEvents={events}\n cancellationReasons={reasons}\n applicableCodes={route.params[RouteParams.APPLICABLE_CODES]}\n eventRows={route.params[RouteParams.EVENT_CODES]}\n onSubmitET={async (reason, eventCode, reasonsRow) => {\n const isMergedObjBasedOutput =\n route.params[RouteParams.IS_MERGED_OBJ_BASED_OUTPUT];\n if (route.params[RouteParams.ET_SUCCESS]) {\n if (route.params[RouteParams.EVENT_CODES] && eventCode) {\n // if (isJobBasedOutput)\n // route.params[\n // RouteParams.ET_SUCCESS_RESPONSE\n // ].baseResponse.eventCode = eventCode;\n // else\n route.params[RouteParams.ET_SUCCESS_RESPONSE].eventCode = eventCode;\n } else if (eventCode) {\n // if (isJobBasedOutput)\n // route.params[\n // RouteParams.ET_SUCCESS_RESPONSE\n // ].baseResponse.eventCode = eventCode;\n // else\n route.params[RouteParams.ET_SUCCESS_RESPONSE].eventCode = eventCode;\n }\n\n // if (isJobBasedOutput)\n // route.params[\n // RouteParams.ET_SUCCESS_RESPONSE\n // ].baseResponse.reasonCode =\n // ReasonCodeContainer.getReasonCodeFromText(\n // reason,\n // route.params[RouteParams.REASONS]\n // ? route.params[RouteParams.REASONS]\n // : reasonsRow\n // );\n // else\n route.params[RouteParams.ET_SUCCESS_RESPONSE].reasonCode =\n ReasonCodeContainer.getReasonCodeFromText(\n reason,\n route.params[RouteParams.REASONS]\n ? route.params[RouteParams.REASONS]\n : reasonsRow\n );\n\n await instance.saveAndProceed(\n baseETProps,\n route.params[RouteParams.ET_SUCCESS_RESPONSE],\n route.params,\n navigation,\n route.params[RouteParams.IS_LAST_ET],\n isMergedObjBasedOutput\n );\n } else {\n let _eventCodeOutput = '';\n if (route.params[RouteParams.EVENT_CODES] && eventCode) {\n _eventCodeOutput = eventCode;\n } else if (eventCode) _eventCodeOutput = eventCode;\n\n await instance.saveAndProceed(\n baseETProps,\n await getBaseETResponse(\n getEntityCodeByET(route.params[RouteParams.CURRENT_ET_NAME]),\n false,\n _eventCodeOutput\n ? _eventCodeOutput\n : getEventCodeByET(\n route.params[RouteParams.CURRENT_ET_NAME],\n false,\n route.params[RouteParams.EVENT_CODES] || []\n ),\n ReasonCodeContainer.getReasonCodeFromText(\n reason,\n route.params[RouteParams.REASONS]\n ? route.params[RouteParams.REASONS]\n : reasonsRow\n ),\n mergedObjectiveId,\n route.params[RouteParams.CURRENT_ET_NAME]\n ),\n route.params,\n navigation,\n route.params[RouteParams.IS_LAST_ET],\n isMergedObjBasedOutput\n );\n }\n }}\n />\n ) : null;\n};\nexport default withBaseDispatchScreen(CancellationScreen);\n"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,uDAAuD;AAC5E,OAAOC,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,gBAAgB,QAAQ,gDAAgD;AACjF,OAAOC,sBAAsB,MAAM,0BAA0B;AAE7D,SACEC,iBAAiB,EACjBC,iBAAiB,QACZ,2BAA2B;AAClC,OAAOC,mBAAmB,MAAM,iDAAiD;AAEjF,SAASC,WAAW,EAAEC,oBAAoB,QAAQ,yBAAyB;AAC3E,OAAOC,sBAAsB,MAAM,+CAA+C;AAElF,MAAMC,QAAQ,GAAGD,sBAAsB,CAACE,WAAW,CAAC,CAAC;AACrD,MAAMC,kBAAkB,GAAGA,CAAC;EAC1BC,KAAK;EACLC,UAAU;EACVC;AAKF,CAAC,KAAK;EACJ,MAAMC,SAAS,GAAGH,KAAK,CAACI,MAAM,CAACV,WAAW,CAACW,WAAW,CAAC;EACvD,MAAM;IAAEC,QAAQ;IAAEC,iBAAiB;IAAEC,KAAK;IAAEC;EAAO,CAAC,GAClDd,oBAAoB,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AAG,EAAE;QACzB,IAAI3C,KAAK,CAACI,MAAM,CAACV,WAAW,CAAC4B,WAAW,CAAC,IAAIE,SAAS,EAAE;UACtDmB,gBAAgB,GAAGnB,SAAS;QAC9B,CAAC,MAAM,IAAIA,SAAS,EAAEmB,gBAAgB,GAAGnB,SAAS;QAElD,MAAM3B,QAAQ,CAAC4C,cAAc,CAC3BvC,WAAW,EACX,MAAMX,iBAAiB,CACrBC,iBAAiB,CAACQ,KAAK,CAACI,MAAM,CAACV,WAAW,CAACkD,eAAe,CAAC,CAAC,EAC5D,KAAK,EACLD,gBAAgB,GACZA,gBAAgB,GAChBtD,gBAAgB,CACdW,KAAK,CAACI,MAAM,CAACV,WAAW,CAACkD,eAAe,CAAC,EACzC,KAAK,EACL5C,KAAK,CAACI,MAAM,CAACV,WAAW,CAAC4B,WAAW,CAAC,IAAI,EAC3C,CAAC,EACL7B,mBAAmB,CAAC+C,qBAAqB,CACvCN,MAAM,EACNlC,KAAK,CAACI,MAAM,CAACV,WAAW,CAACqB,OAAO,CAAC,GAC7Bf,KAAK,CAACI,MAAM,CAACV,WAAW,CAACqB,OAAO,CAAC,GACjCoB,UACN,CAAC,EACD5B,iBAAiB,EACjBP,KAAK,CAACI,MAAM,CAACV,WAAW,CAACkD,eAAe,CAC1C,CAAC,EACD5C,KAAK,CAACI,MAAM,EACZH,UAAU,EACVD,KAAK,CAACI,MAAM,CAACV,WAAW,CAACgD,UAAU,CAAC,EACpCN,sBACF,CAAC;MACH;IACF;EAAE,CACH,CAAC,GACA,IAAI;AACV,CAAC;AACD,eAAe9C,sBAAsB,CAACS,kBAAkB,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
2
|
import { CaptureText } from '../../components/executiontasks/ExecutionTasksIndex';
|
|
3
3
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
4
4
|
import withBaseDispatchScreen from './WithBaseDispatchScreen';
|
|
@@ -9,12 +9,11 @@ import { View } from 'react-native';
|
|
|
9
9
|
import CancelOrderDialog from '../../components/widgets/CancelOrderDialog';
|
|
10
10
|
import { onTaskStart } from '../../utils/ExecTaskUtils';
|
|
11
11
|
import { GO_BACK_EVENT_CODE } from '../../constants/constants';
|
|
12
|
-
const CaptureInputScreen =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} = _ref;
|
|
12
|
+
const CaptureInputScreen = ({
|
|
13
|
+
route,
|
|
14
|
+
navigation,
|
|
15
|
+
baseETProps
|
|
16
|
+
}) => {
|
|
18
17
|
const nextState = route.params[RouteParams.NEXT_STATES];
|
|
19
18
|
const {
|
|
20
19
|
taskMeta,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CaptureText","React","useCallback","useEffect","useState","withBaseDispatchScreen","EntityCode","ExecutionTaskID","DispatchStateContainer","RouteParams","getDataFromNextState","View","CancelOrderDialog","onTaskStart","GO_BACK_EVENT_CODE","CaptureInputScreen","
|
|
1
|
+
{"version":3,"names":["CaptureText","React","useCallback","useEffect","useState","withBaseDispatchScreen","EntityCode","ExecutionTaskID","DispatchStateContainer","RouteParams","getDataFromNextState","View","CancelOrderDialog","onTaskStart","GO_BACK_EVENT_CODE","CaptureInputScreen","route","navigation","baseETProps","nextState","params","NEXT_STATES","taskMeta","mergedObjectiveId","input","wfMeta","ROOT_META_DATA","customEventsData","showAlert","setShowAlert","sResponse","setResponse","submitOutput","response","getInstance","navigateToNextTask","success","CAPTURE_INPUT","createElement","style","flex","_extends","onSubmitET","etResponse","eventCode","_prevState","visible","onSubmit","value"],"sources":["CaptureInputScreen.tsx"],"sourcesContent":["import { CaptureText } from '../../components/executiontasks/ExecutionTasksIndex';\nimport React, { useCallback, useEffect, useState } from 'react';\nimport withBaseDispatchScreen from './WithBaseDispatchScreen';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\nimport { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';\nimport { View } from 'react-native';\nimport CancelOrderDialog from '../../components/widgets/CancelOrderDialog';\nimport { onTaskStart } from '../../utils/ExecTaskUtils';\nimport { GO_BACK_EVENT_CODE } from '../../constants/constants';\t\nconst CaptureInputScreen = ({\n route,\n navigation,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n const nextState = route.params[RouteParams.NEXT_STATES];\n const { taskMeta, mergedObjectiveId, input, wfMeta } =\n getDataFromNextState(nextState);\n useEffect(() => {\n onTaskStart(\n nextState,\n route.params[RouteParams.ROOT_META_DATA].customEventsData\n );\n }, []);\n const [showAlert, setShowAlert] = useState(false);\n const [sResponse, setResponse] = useState<any>();\n const submitOutput = useCallback(\n async (response: any) => {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n response,\n response.success,\n EntityCode.CAPTURE_INPUT,\n ExecutionTaskID.CAPTURE_INPUT,\n baseETProps,\n false\n );\n },\n [baseETProps, navigation, route]\n );\n return (\n <View style={{ flex: 1 }}>\n <CaptureText\n {...input}\n navigation={navigation}\n taskMeta={taskMeta}\n mergedObjectiveId={mergedObjectiveId}\n onSubmitET={async (etResponse) => {\n if (etResponse.success || etResponse.eventCode == GO_BACK_EVENT_CODE) {\n await submitOutput(etResponse);\n } else {\n setResponse((_prevState: any) => {\n setShowAlert(true);\n return etResponse;\n });\n }\n }}\n />\n <CancelOrderDialog\n visible={showAlert}\n onSubmit={async (value) => {\n if (value) {\n setShowAlert(false);\n await submitOutput(sResponse);\n } else {\n setShowAlert(false);\n }\n }}\n />\n </View>\n );\n};\nex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B,UAAU,CAAC+B,aAAa,EACxB9B,eAAe,CAAC8B,aAAa,EAC7BnB,WAAW,EACX,KACF,CAAC;EACH,CAAC,EACD,CAACA,WAAW,EAAED,UAAU,EAAED,KAAK,CACjC,CAAC;EACD,oBACEf,KAAA,CAAAqC,aAAA,CAAC3B,IAAI;IAAC4B,KAAK,EAAE;MAAEC,IAAI,EAAE;IAAE;EAAE,gBACvBvC,KAAA,CAAAqC,aAAA,CAACtC,WAAW,EAAAyC,QAAA,KACNjB,KAAK;IACTP,UAAU,EAAEA,UAAW;IACvBK,QAAQ,EAAEA,QAAS;IACnBC,iBAAiB,EAAEA,iBAAkB;IACrCmB,UAAU,EAAE,MAAOC,UAAU,IAAK;MAChC,IAAIA,UAAU,CAACP,OAAO,IAAIO,UAAU,CAACC,SAAS,IAAI9B,kBAAkB,EAAE;QACpE,MAAMkB,YAAY,CAACW,UAAU,CAAC;MAChC,CAAC,MAAM;QACLZ,WAAW,CAAEc,UAAe,IAAK;UAC/BhB,YAAY,CAAC,IAAI,CAAC;UAClB,OAAOc,UAAU;QACnB,CAAC,CAAC;MACJ;IACF;EAAE,EACH,CAAC,eACF1C,KAAA,CAAAqC,aAAA,CAAC1B,iBAAiB;IAChBkC,OAAO,EAAElB,SAAU;IACnBmB,QAAQ,EAAE,MAAOC,KAAK,IAAK;MACzB,IAAIA,KAAK,EAAE;QACTnB,YAAY,CAAC,KAAK,CAAC;QACnB,MAAMG,YAAY,CAACF,SAAS,CAAC;MAC/B,CAAC,MAAM;QACLD,YAAY,CAAC,KAAK,CAAC;MACrB;IACF;EAAE,CACH,CACG,CAAC;AAEX,CAAC;AACD,eAAexB,sBAAsB,CAACU,kBAAkB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
|
+
import React, { useCallback, useState } from 'react';
|
|
4
|
+
import withBaseDispatchScreen from './WithBaseDispatchScreen';
|
|
5
|
+
import { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';
|
|
6
|
+
import { CollectPaymentET } from '../../components/executiontasks/ExecutionTasksIndex';
|
|
7
|
+
import DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';
|
|
8
|
+
import { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';
|
|
9
|
+
import { Alert } from 'react-native';
|
|
10
|
+
import { handleDynamicValues, onTaskStart } from '../../utils/ExecTaskUtils';
|
|
11
|
+
import { useEffect } from 'react';
|
|
12
|
+
import { DispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
|
|
13
|
+
import NetworkClient from '../../network/NetworkClient';
|
|
14
|
+
import DispatchSdkCache from '../../manager/sdk/DispatchSdkCache';
|
|
15
|
+
import { PaymentContext } from '../../utils/context/paymentContext';
|
|
16
|
+
import { isMandatoryKeysPresent } from '../../utils/utils';
|
|
17
|
+
import ErrorCodes from '../../errors/ErrorCodes';
|
|
18
|
+
import { ENDPOINTS } from '../../constants/apiConstants';
|
|
19
|
+
import Logger, { LOG_TYPE } from '../../utils/Logger';
|
|
20
|
+
import ProgressDialog from '../../components/widgets/ProgressDialog';
|
|
21
|
+
import { GO_BACK_EVENT_CODE } from '../../constants/constants';
|
|
22
|
+
import CancelOrderDialog from '../../components/widgets/CancelOrderDialog';
|
|
23
|
+
const CollectPaymentScreen = ({
|
|
24
|
+
navigation,
|
|
25
|
+
route,
|
|
26
|
+
baseETProps
|
|
27
|
+
}) => {
|
|
28
|
+
var _route$params$RoutePa;
|
|
29
|
+
const nextState = route.params[RouteParams.NEXT_STATES];
|
|
30
|
+
const {
|
|
31
|
+
taskMeta,
|
|
32
|
+
mergedObjectiveId,
|
|
33
|
+
input,
|
|
34
|
+
taskId
|
|
35
|
+
} = getDataFromNextState(nextState);
|
|
36
|
+
const [expectedAmount, setExpectedAmount] = useState(0);
|
|
37
|
+
const [modifiedInput, setInputs] = useState({
|
|
38
|
+
...input
|
|
39
|
+
});
|
|
40
|
+
const [contextData, setContextData] = useState();
|
|
41
|
+
const [showAlert, setShowAlert] = useState(false);
|
|
42
|
+
const [sResponse, setResponse] = useState();
|
|
43
|
+
const [showScreen, setShowScreen] = useState(false);
|
|
44
|
+
const paymentRefId = (_route$params$RoutePa = route.params[RouteParams.ROOT_META_DATA].paymentConfig) === null || _route$params$RoutePa === void 0 ? void 0 : _route$params$RoutePa.paymentRefId;
|
|
45
|
+
async function getSdkConfig() {
|
|
46
|
+
const cache = DispatchSdkCache.getInstance();
|
|
47
|
+
const _sdkConfig = await cache.getObjectFromCache(DispatchSdkCache.KEYS.SDK_CONFIG);
|
|
48
|
+
const networkInstance = new NetworkClient(_sdkConfig.domain);
|
|
49
|
+
setContextData({
|
|
50
|
+
_sdkConfig,
|
|
51
|
+
networkInstance
|
|
52
|
+
});
|
|
53
|
+
return {
|
|
54
|
+
_sdkConfig,
|
|
55
|
+
networkInstance
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
const showAlertMessage = useCallback((errorMessage, title) => {
|
|
59
|
+
Alert.alert(title, errorMessage);
|
|
60
|
+
navigation.goBack();
|
|
61
|
+
}, [navigation]);
|
|
62
|
+
const navigateWithError = useCallback((errorCode, errorMessage) => {
|
|
63
|
+
if (route.params.initRoute) {
|
|
64
|
+
navigation.navigate({
|
|
65
|
+
name: route.params.initRoute,
|
|
66
|
+
params: {
|
|
67
|
+
sdkError: {
|
|
68
|
+
code: errorCode,
|
|
69
|
+
message: errorMessage
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
merge: true
|
|
73
|
+
});
|
|
74
|
+
} else {
|
|
75
|
+
showAlertMessage(errorMessage, 'Error');
|
|
76
|
+
}
|
|
77
|
+
}, [navigation, route.params.initRoute, showAlertMessage]);
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
if (taskId === ExecutionTaskID.COLLECT_PAYMENT_ET && (!isMandatoryKeysPresent(route.params[RouteParams.ROOT_META_DATA], ['paymentConfig']) || !isMandatoryKeysPresent(route.params[RouteParams.ROOT_META_DATA].paymentConfig, ['paymentRefId']))) {
|
|
80
|
+
navigateWithError(ErrorCodes.InvalidArgumentError, 'Missing or Invalid Route Params to execute Payment.');
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
onTaskStart(route.params[RouteParams.NEXT_STATES], route.params[RouteParams.ROOT_META_DATA].customEventsData);
|
|
84
|
+
(async (_modifiedInput$allowe, _updatedInput$allowed) => {
|
|
85
|
+
let updatedInput = JSON.parse(JSON.stringify(modifiedInput));
|
|
86
|
+
if (route.params[RouteParams.ROOT_META_DATA]) {
|
|
87
|
+
updatedInput = handleDynamicValues(route === null || route === void 0 ? void 0 : route.params[RouteParams.NEXT_STATES].input, route.params[RouteParams.ROOT_META_DATA]);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Get sum of merged objectives amount
|
|
91
|
+
* Get sdkConfig from cache and set in context
|
|
92
|
+
*/
|
|
93
|
+
await getTotalExpected();
|
|
94
|
+
const {
|
|
95
|
+
networkInstance
|
|
96
|
+
} = await getSdkConfig();
|
|
97
|
+
/**
|
|
98
|
+
* Get list of selected payment modes from default PG for tenant
|
|
99
|
+
*/
|
|
100
|
+
if (modifiedInput.allowedModes.includes('ONLINE')) {
|
|
101
|
+
try {
|
|
102
|
+
const modes = await getPaymentModes(networkInstance);
|
|
103
|
+
updatedInput.allowedModes = modes === null || modes === void 0 ? void 0 : modes.methods;
|
|
104
|
+
updatedInput.plModes = (modes === null || modes === void 0 ? void 0 : modes.plModes) || [];
|
|
105
|
+
const index = modifiedInput.allowedModes.indexOf('ONLINE');
|
|
106
|
+
if (index > -1) {
|
|
107
|
+
modifiedInput.allowedModes.splice(index, 1);
|
|
108
|
+
}
|
|
109
|
+
} catch (error) {
|
|
110
|
+
var _error$response;
|
|
111
|
+
Logger.getInstance().logEvent('~ getTotalExpected triggered ', JSON.stringify((error === null || error === void 0 || (_error$response = error.response) === null || _error$response === void 0 ? void 0 : _error$response.data) || error), LOG_TYPE.SDK_ERROR);
|
|
112
|
+
updatedInput.allowedModes = [];
|
|
113
|
+
updatedInput.plModes = [];
|
|
114
|
+
const index = modifiedInput.allowedModes.indexOf('ONLINE');
|
|
115
|
+
if (index > -1) {
|
|
116
|
+
modifiedInput.allowedModes.splice(index, 1);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
} else {
|
|
120
|
+
updatedInput.allowedModes = [];
|
|
121
|
+
updatedInput.plModes = [];
|
|
122
|
+
}
|
|
123
|
+
if ((_modifiedInput$allowe = modifiedInput.allowedModes) !== null && _modifiedInput$allowe !== void 0 && _modifiedInput$allowe.length) {
|
|
124
|
+
updatedInput.allowedModes = [...modifiedInput.allowedModes, ...updatedInput.allowedModes];
|
|
125
|
+
}
|
|
126
|
+
if (!((_updatedInput$allowed = updatedInput.allowedModes) !== null && _updatedInput$allowed !== void 0 && _updatedInput$allowed.length)) {
|
|
127
|
+
navigateWithError(ErrorCodes.InvalidArgumentError, 'No payment modes available. Please contact your Admin.');
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
setInputs(updatedInput);
|
|
131
|
+
})();
|
|
132
|
+
}, []);
|
|
133
|
+
const getPaymentModes = async networkInstance => {
|
|
134
|
+
try {
|
|
135
|
+
var _paymentResp$data, _configData$paymentMe, _configData$paymentMe2;
|
|
136
|
+
let response = {
|
|
137
|
+
methods: [],
|
|
138
|
+
plModes: []
|
|
139
|
+
};
|
|
140
|
+
const paymentResp = await networkInstance.requestGet(ENDPOINTS.PAYMENT_MODES, {
|
|
141
|
+
requestId: 'payment:' + paymentRefId
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
// FOR TESTING
|
|
145
|
+
// const paymentResp = {
|
|
146
|
+
// data: {
|
|
147
|
+
// data: {
|
|
148
|
+
// configDetails: [
|
|
149
|
+
// {
|
|
150
|
+
// paymentMethods: {
|
|
151
|
+
// QR: true,
|
|
152
|
+
// paymentLink: true,
|
|
153
|
+
// },
|
|
154
|
+
// },
|
|
155
|
+
// ],
|
|
156
|
+
// },
|
|
157
|
+
// },
|
|
158
|
+
// };
|
|
159
|
+
|
|
160
|
+
const configData = paymentResp === null || paymentResp === void 0 || (_paymentResp$data = paymentResp.data) === null || _paymentResp$data === void 0 || (_paymentResp$data = _paymentResp$data.data) === null || _paymentResp$data === void 0 ? void 0 : _paymentResp$data.configDetails[0];
|
|
161
|
+
if (configData !== null && configData !== void 0 && (_configData$paymentMe = configData.paymentMethods) !== null && _configData$paymentMe !== void 0 && _configData$paymentMe.QR) {
|
|
162
|
+
response.methods.push('QR_CODE');
|
|
163
|
+
}
|
|
164
|
+
if (configData !== null && configData !== void 0 && (_configData$paymentMe2 = configData.paymentMethods) !== null && _configData$paymentMe2 !== void 0 && _configData$paymentMe2.paymentLink) {
|
|
165
|
+
response.methods.push('PAYMENT_LINK');
|
|
166
|
+
}
|
|
167
|
+
if (configData !== null && configData !== void 0 && configData.modesMapping) {
|
|
168
|
+
response.plModes = Object.values(configData.modesMapping);
|
|
169
|
+
}
|
|
170
|
+
return response;
|
|
171
|
+
} catch (error) {
|
|
172
|
+
var _error$response2;
|
|
173
|
+
Logger.getInstance().logEvent('~ getPaymentModes triggered ', JSON.stringify((error === null || error === void 0 || (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : _error$response2.data) || error), LOG_TYPE.SDK_ERROR);
|
|
174
|
+
return null;
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
const getTotalExpected = async () => {
|
|
178
|
+
const totalAmount = await DispatchExecutor.getTotalPaymentAmountMWI(mergedObjectiveId);
|
|
179
|
+
setExpectedAmount(totalAmount);
|
|
180
|
+
// setExpectedAmount(1000); //FOR TESTING
|
|
181
|
+
return totalAmount;
|
|
182
|
+
};
|
|
183
|
+
const submitOutput = useCallback(async etOutput => {
|
|
184
|
+
console.log('CollectPaymentScreen:SubmitOutput:', etOutput);
|
|
185
|
+
if (etOutput.paymentMode == 'QR_CODE') {
|
|
186
|
+
console.log('CollectPaymentScreen:SubmitOutput:etOutput.paymentMode', etOutput.paymentMode);
|
|
187
|
+
let jobData = await DispatchExecutor.wQueryJobForMOId(mergedObjectiveId[0]);
|
|
188
|
+
console.log('CollectPaymentScreen:SubmitOutput:etOutput.jobData', jobData);
|
|
189
|
+
let result = await DispatchExecutor.wUpdateAmountToZero(jobData[0].jobId);
|
|
190
|
+
console.log('CollectPaymentScreen:SubmitOutput:etOutput.result', result);
|
|
191
|
+
}
|
|
192
|
+
await DispatchStateContainer.getInstance().navigateToNextTask(navigation, route, etOutput, etOutput.success, EntityCode.COLLECT_PAYMENT_ET, ExecutionTaskID.COLLECT_PAYMENT_ET, baseETProps, false);
|
|
193
|
+
}, [baseETProps, navigation, route]);
|
|
194
|
+
|
|
195
|
+
// console.log("collectpayment1:",contextData)
|
|
196
|
+
// console.log("collectpayment2:",modifiedInput.allowedModes.includes('ONLINE'))
|
|
197
|
+
// console.log("collectpayment3:",modifiedInput.allowedModes?.length)
|
|
198
|
+
useEffect(() => {
|
|
199
|
+
var _modifiedInput$allowe2;
|
|
200
|
+
if (contextData && modifiedInput !== null && modifiedInput !== void 0 && (_modifiedInput$allowe2 = modifiedInput.allowedModes) !== null && _modifiedInput$allowe2 !== void 0 && _modifiedInput$allowe2.length) {
|
|
201
|
+
setShowScreen(true);
|
|
202
|
+
} else {
|
|
203
|
+
setShowScreen(false);
|
|
204
|
+
}
|
|
205
|
+
}, [contextData, modifiedInput === null || modifiedInput === void 0 ? void 0 : modifiedInput.allowedModes]);
|
|
206
|
+
return showScreen ? /*#__PURE__*/React.createElement(PaymentContext.Provider, {
|
|
207
|
+
value: {
|
|
208
|
+
sdkConfig: contextData === null || contextData === void 0 ? void 0 : contextData._sdkConfig,
|
|
209
|
+
networkInstance: contextData === null || contextData === void 0 ? void 0 : contextData.networkInstance
|
|
210
|
+
}
|
|
211
|
+
}, /*#__PURE__*/React.createElement(CollectPaymentET, _extends({}, modifiedInput, {
|
|
212
|
+
expectedAmount: expectedAmount,
|
|
213
|
+
navigation: navigation,
|
|
214
|
+
mergedObjectiveId: mergedObjectiveId,
|
|
215
|
+
taskMeta: taskMeta,
|
|
216
|
+
route: route,
|
|
217
|
+
onSubmitET: async etOutput => {
|
|
218
|
+
console.log('etOutput: ', JSON.stringify(etOutput));
|
|
219
|
+
if (etOutput.success || etOutput.eventCode == GO_BACK_EVENT_CODE) {
|
|
220
|
+
await submitOutput(etOutput);
|
|
221
|
+
} else {
|
|
222
|
+
setResponse(_prevState => {
|
|
223
|
+
setShowAlert(true);
|
|
224
|
+
return etOutput;
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
})), /*#__PURE__*/React.createElement(CancelOrderDialog, {
|
|
229
|
+
visible: showAlert,
|
|
230
|
+
onSubmit: async value => {
|
|
231
|
+
if (value) {
|
|
232
|
+
setShowAlert(false);
|
|
233
|
+
await submitOutput(sResponse);
|
|
234
|
+
} else {
|
|
235
|
+
setShowAlert(false);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
})) : /*#__PURE__*/React.createElement(ProgressDialog, {
|
|
239
|
+
visible: true,
|
|
240
|
+
label: "Loading..."
|
|
241
|
+
});
|
|
242
|
+
};
|
|
243
|
+
export default withBaseDispatchScreen(CollectPaymentScreen);
|
|
244
|
+
//# sourceMappingURL=CollectPaymentScreen.js.map
|