@os1-platform/dispatch-mobile 2.1.22 → 2.1.24
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 -4
- 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 -16
- 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/constants.js +1 -1
- package/lib/commonjs/manager/syncmanager/constants.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/database.js +2 -2
- package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +2 -2
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +7 -10
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +13 -47
- 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 +14 -10
- 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 -62
- 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/firebase/FirebaseLogging.js +0 -3
- package/lib/module/analytics/firebase/FirebaseLogging.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 -14
- 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/constants.js +1 -1
- package/lib/module/manager/syncmanager/constants.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentManager.js +6 -9
- package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +11 -45
- 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 +12 -8
- 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 -61
- 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/CustomContactsModal.d.ts +0 -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/manager/syncmanager/constants.d.ts +1 -1
- 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 +5 -4
- package/src/analytics/firebase/FirebaseLogging.ts +2 -11
- package/src/analytics/sentry/SentryAnalyticsUtils.ts +0 -7
- 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/CustomContactsModal.tsx +0 -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/manager/syncmanager/constants.ts +1 -1
- package/src/manager/syncmanager/document/DocumentManager.ts +6 -8
- package/src/manager/syncmanager/document/DocumentSyncManager.ts +8 -43
- 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 +16 -1
- 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/Logger.ts +1 -58
- 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/lib/commonjs/icons/circleMark.svg +0 -3
- package/lib/module/icons/circleMark.svg +0 -3
- package/src/icons/circleMark.svg +0 -3
|
@@ -0,0 +1,32 @@
|
|
|
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, { useState } from 'react';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import { PAYMENT_SCREEN } from './CollectPaymentSchema';
|
|
6
|
+
import InitPayment from './components/InitPayment';
|
|
7
|
+
import { Provider } from 'react-native-paper';
|
|
8
|
+
import ProcessPayment from './components/ProcessPayment';
|
|
9
|
+
import CompletePayment from './components/CompletePayment';
|
|
10
|
+
import PaymentContactDetails from './components/PaymentContactDetails';
|
|
11
|
+
const CollectPaymentET = props => {
|
|
12
|
+
const [moveToNextData, setMoveToNextData] = useState();
|
|
13
|
+
return /*#__PURE__*/React.createElement(Provider, null, /*#__PURE__*/React.createElement(View, {
|
|
14
|
+
style: {
|
|
15
|
+
flex: 1
|
|
16
|
+
}
|
|
17
|
+
}, !moveToNextData || moveToNextData.screen === PAYMENT_SCREEN.INIT ? /*#__PURE__*/React.createElement(InitPayment, _extends({}, props, moveToNextData, {
|
|
18
|
+
onSubmitET: async etOutput => props.onSubmitET(etOutput),
|
|
19
|
+
next: etOutput => setMoveToNextData(etOutput)
|
|
20
|
+
})) : moveToNextData.screen === PAYMENT_SCREEN.CONTACTS ? /*#__PURE__*/React.createElement(PaymentContactDetails, _extends({}, props, moveToNextData, {
|
|
21
|
+
onSubmitET: async etOutput => props.onSubmitET(etOutput),
|
|
22
|
+
next: etOutput => setMoveToNextData(etOutput)
|
|
23
|
+
})) : moveToNextData.screen === PAYMENT_SCREEN.PROCESS ? /*#__PURE__*/React.createElement(ProcessPayment, _extends({}, props, moveToNextData, {
|
|
24
|
+
onSubmitET: async etOutput => props.onSubmitET(etOutput),
|
|
25
|
+
next: etOutput => setMoveToNextData(etOutput)
|
|
26
|
+
})) : moveToNextData.screen === PAYMENT_SCREEN.COMPLETE ? /*#__PURE__*/React.createElement(CompletePayment, _extends({}, props, moveToNextData, {
|
|
27
|
+
onSubmitET: async etOutput => props.onSubmitET(etOutput),
|
|
28
|
+
next: etOutput => setMoveToNextData(etOutput)
|
|
29
|
+
})) : null));
|
|
30
|
+
};
|
|
31
|
+
export default CollectPaymentET;
|
|
32
|
+
//# sourceMappingURL=CollectPayment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useState","View","PAYMENT_SCREEN","InitPayment","Provider","ProcessPayment","CompletePayment","PaymentContactDetails","CollectPaymentET","props","moveToNextData","setMoveToNextData","createElement","style","flex","screen","INIT","_extends","onSubmitET","etOutput","next","CONTACTS","PROCESS","COMPLETE"],"sources":["CollectPayment.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\nimport React, { useState } from 'react';\nimport { View } from 'react-native';\nimport {\n CollectPaymentInput,\n CollectPaymentOutput,\n PAYMENT_SCREEN,\n} from './CollectPaymentSchema';\nimport InitPayment from './components/InitPayment';\nimport { Provider } from 'react-native-paper';\nimport ProcessPayment from './components/ProcessPayment';\nimport CompletePayment from './components/CompletePayment';\nimport PaymentContactDetails from './components/PaymentContactDetails';\n\nconst CollectPaymentET = (props: CollectPaymentInput) => {\n const [moveToNextData, setMoveToNextData] = useState<\n CollectPaymentOutput & {\n screen: PAYMENT_SCREEN;\n sourceScreen: PAYMENT_SCREEN;\n }\n >();\n\n return (\n <Provider>\n <View style={{ flex: 1 }}>\n {!moveToNextData || moveToNextData.screen === PAYMENT_SCREEN.INIT ? (\n <InitPayment\n {...props}\n {...moveToNextData}\n onSubmitET={async (etOutput) => props.onSubmitET(etOutput)}\n next={(etOutput) => setMoveToNextData(etOutput)}\n />\n ) : moveToNextData.screen === PAYMENT_SCREEN.CONTACTS ? (\n <PaymentContactDetails\n {...props}\n {...moveToNextData}\n onSubmitET={async (etOutput) => props.onSubmitET(etOutput)}\n next={(etOutput) => setMoveToNextData(etOutput)}\n />\n ) : moveToNextData.screen === PAYMENT_SCREEN.PROCESS ? (\n <ProcessPayment\n {...props}\n {...moveToNextData}\n onSubmitET={async (etOutput) => props.onSubmitET(etOutput)}\n next={(etOutput) => setMoveToNextData(etOutput)}\n />\n ) : moveToNextData.screen === PAYMENT_SCREEN.COMPLETE ? (\n <CompletePayment\n {...props}\n {...moveToNextData}\n onSubmitET={async (etOutput) => props.onSubmitET(etOutput)}\n next={(etOutput) => setMoveToNextData(etOutput)}\n />\n ) : null}\n </View>\n </Provider>\n );\n};\n\nexport default CollectPaymentET;\n"],"mappings":";AAAA;AACA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,IAAI,QAAQ,cAAc;AACnC,SAGEC,cAAc,QACT,wBAAwB;AAC/B,OAAOC,WAAW,MAAM,0BAA0B;AAClD,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAO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B,QAAQ,gBACnDxB,KAAA,CAAAa,aAAA,CAACN,eAAe,EAAAW,QAAA,KACVR,KAAK,EACLC,cAAc;IAClBQ,UAAU,EAAE,MAAOC,QAAQ,IAAKV,KAAK,CAACS,UAAU,CAACC,QAAQ,CAAE;IAC3DC,IAAI,EAAGD,QAAQ,IAAKR,iBAAiB,CAACQ,QAAQ;EAAE,EACjD,CAAC,GACA,IACA,CACE,CAAC;AAEf,CAAC;AAED,eAAeX,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export let STATUS = /*#__PURE__*/function (STATUS) {
|
|
2
|
+
STATUS["INITIATED"] = "INITIATED";
|
|
3
|
+
STATUS["FAILED"] = "FAILED";
|
|
4
|
+
STATUS["SUCCESS"] = "SUCCESS";
|
|
5
|
+
return STATUS;
|
|
6
|
+
}({});
|
|
7
|
+
export let SUB_STATUS = /*#__PURE__*/function (SUB_STATUS) {
|
|
8
|
+
SUB_STATUS["completed"] = "completed";
|
|
9
|
+
SUB_STATUS["expired"] = "expired";
|
|
10
|
+
SUB_STATUS["created"] = "created";
|
|
11
|
+
SUB_STATUS["plFailed"] = "plFailed";
|
|
12
|
+
SUB_STATUS["qrFailed"] = "qrFailed";
|
|
13
|
+
SUB_STATUS["paymentFailed"] = "paymentFailed";
|
|
14
|
+
SUB_STATUS["closed"] = "closed";
|
|
15
|
+
return SUB_STATUS;
|
|
16
|
+
}({});
|
|
17
|
+
export let PAYMENT_SCREEN = /*#__PURE__*/function (PAYMENT_SCREEN) {
|
|
18
|
+
PAYMENT_SCREEN["INIT"] = "INIT";
|
|
19
|
+
PAYMENT_SCREEN["CONTACTS"] = "CONTACTS";
|
|
20
|
+
PAYMENT_SCREEN["PROCESS"] = "PROCESS";
|
|
21
|
+
PAYMENT_SCREEN["COMPLETE"] = "COMPLETE";
|
|
22
|
+
return PAYMENT_SCREEN;
|
|
23
|
+
}({});
|
|
24
|
+
export let TRANSACTION_TYPE = /*#__PURE__*/function (TRANSACTION_TYPE) {
|
|
25
|
+
TRANSACTION_TYPE["LINK"] = "link";
|
|
26
|
+
TRANSACTION_TYPE["QRCODE"] = "qrCode";
|
|
27
|
+
return TRANSACTION_TYPE;
|
|
28
|
+
}({});
|
|
29
|
+
//# sourceMappingURL=CollectPaymentSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["STATUS","SUB_STATUS","PAYMENT_SCREEN","TRANSACTION_TYPE"],"sources":["CollectPaymentSchema.ts"],"sourcesContent":["import {\n BaseETRequest,\n BaseETResponse,\n} from '../../../models/execTasks/ETBaseModels';\nimport {\n HTTPMethod,\n HTTPRequestBody,\n} from '../httpRequest/HttpRequestETSchema';\nimport { Headers, PathParams, QueryParams } from '../../../utils/ApiUtils';\n\nexport type AllowedModes = 'CASH' | 'QR_CODE' | 'PAYMENT_LINK' | 'ONLINE';\nexport type OnsiteLink = 'Phone Number' | 'Email';\n\nexport interface ETAmount {\n value: number;\n currencyCode: string;\n // minorUnit?: number;\n}\n\nexport interface API {\n uri: string;\n timeout?: number;\n httpMethod: HTTPMethod;\n headers?: Headers[];\n requestBody?: HTTPRequestBody;\n queryParams?: QueryParams[];\n pathParams?: PathParams[];\n responseJsonLogic: object;\n errorJsonLogic: object;\n}\n\nexport type CollectPaymentInput = BaseETRequest & {\n // amount: ETAmount;\n allowedModes: AllowedModes[];\n plModes?: string[];\n expectedAmount: number;\n onsiteLinkSharing?: OnsiteLink[];\n onSubmitET: (output: CollectPaymentOutput) => void;\n next: (\n output: CollectPaymentOutput & {\n screen: PAYMENT_SCREEN;\n contactDetails?: string;\n sourceScreen: PAYMENT_SCREEN;\n }\n ) => void;\n screen: PAYMENT_SCREEN;\n sourceScreen: PAYMENT_SCREEN;\n};\n\nexport interface ProcessPaymentInput {\n paymentMode: AllowedModes;\n contactDetails?: string;\n}\n\nexport interface CompletePaymentInput {\n paymentMode: AllowedModes;\n}\n\nexport type CollectPaymentOutput = BaseETResponse & {\n refId: string;\n collectedAmount: ETAmount;\n paymentMeta?: {};\n paymentMode: AllowedModes;\n};\n\nexport interface QrResponse {\n data: {\n qrCode?: string;\n txnId?: string;\n paymentCompleted?: boolean;\n status?: STATUS;\n };\n}\n\nexport interface QR_REQUEST_BODY {\n refId: string;\n appAbbr: string;\n money: {\n amount: number;\n currency: string;\n };\n userInfo?: {\n phone?: {\n countryCode: string;\n mobileNumber: string;\n };\n };\n pgConfigId?: string;\n description?: string;\n meta?: { [key: string]: any };\n}\n\nexport interface PaymentStatusResponse {\n data: {\n meta?: { totalCount?: number };\n transactions?: {\n refId: string;\n status: STATUS;\n subStatus: SUB_STATUS;\n money: {\n amount: number;\n currency: string;\n };\n txnId: string;\n txnType: TRANSACTION_TYPE;\n appAbbr: string;\n }[];\n };\n}\n\nexport interface PaymentLinkResponse {\n txnId: string;\n refId: string;\n status?: STATUS;\n}\n\nexport interface notificationPaymentStatus {\n refId: string;\n status: STATUS;\n}\n\nexport enum STATUS {\n INITIATED = 'INITIATED',\n FAILED = 'FAILED',\n SUCCESS = 'SUCCESS',\n}\n\nexport enum SUB_STATUS {\n completed = 'completed',\n expired = 'expired',\n created = 'created',\n plFailed = 'plFailed',\n qrFailed = 'qrFailed',\n paymentFailed = 'paymentFailed',\n closed = 'closed',\n}\n\nexport enum PAYMENT_SCREEN {\n INIT = 'INIT',\n CONTACTS = 'CONTACTS',\n PROCESS = 'PROCESS',\n COMPLETE = 'COMPLETE',\n}\n\nexport interface sharedPrefPaymentDataInterface {\n paymentMode: AllowedModes;\n amount: ETAmount;\n // refId: string;\n moIds: string[];\n previousSelection?: AllowedModes[];\n}\n\nexport interface PaymentEventDataInterface {\n refId: string;\n money: {\n amount: number;\n currency: string;\n };\n contactDetails?: string;\n paymentLink?: string;\n}\n\nexport interface PaymentConfigResponse {\n data: {\n configDetails: {\n tenantId: string;\n paymentMethods: PaymentMethods;\n modesMapping: object;\n }[];\n };\n}\n\nexport interface PaymentMethods {\n QR: boolean;\n paymentLink: boolean;\n modes?: object;\n}\n\nexport enum TRANSACTION_TYPE {\n LINK = 'link',\n QRCODE = 'qrCode',\n}\n"],"mappings":"AAyHA,WAAYA,MAAM,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA;AAMlB,WAAYC,UAAU,0BAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAUtB,WAAYC,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAyC1B,WAAYC,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { StyleSheet, Platform } from 'react-native';
|
|
2
|
+
import { Fonts } from '../../../styles/executionTasks/CommonStyles';
|
|
3
|
+
export const PaymentStyles = StyleSheet.create({
|
|
4
|
+
amountStyle: {
|
|
5
|
+
fontSize: 18,
|
|
6
|
+
fontWeight: '600',
|
|
7
|
+
fontStyle: 'normal',
|
|
8
|
+
// backgroundColor: 'white',
|
|
9
|
+
textAlign: 'center',
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
paddingTop: 25,
|
|
12
|
+
paddingBottom: 25,
|
|
13
|
+
fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_600SemiBold : 'IBMPlexSans-SemiBold'
|
|
14
|
+
},
|
|
15
|
+
messageStyle: {
|
|
16
|
+
fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_400Regular : 'IBMPlexSans-Regular',
|
|
17
|
+
backgroundColor: '#FFFFFF',
|
|
18
|
+
color: '#111111',
|
|
19
|
+
padding: 20,
|
|
20
|
+
fontStyle: 'normal',
|
|
21
|
+
fontWeight: 'normal',
|
|
22
|
+
fontSize: 14
|
|
23
|
+
},
|
|
24
|
+
textStyle1: {
|
|
25
|
+
fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_400Regular : 'IBMPlexSans-Regular',
|
|
26
|
+
marginTop: 20,
|
|
27
|
+
marginStart: 20,
|
|
28
|
+
marginEnd: 20,
|
|
29
|
+
color: '#9D9D9D',
|
|
30
|
+
fontStyle: 'normal',
|
|
31
|
+
fontWeight: 'normal',
|
|
32
|
+
fontSize: 14
|
|
33
|
+
},
|
|
34
|
+
reasonTextStyle: {
|
|
35
|
+
flex: 1,
|
|
36
|
+
flexWrap: 'wrap',
|
|
37
|
+
fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_400Regular : 'IBMPlexSans-Regular',
|
|
38
|
+
fontStyle: 'normal',
|
|
39
|
+
fontSize: 14,
|
|
40
|
+
lineHeight: 21,
|
|
41
|
+
letterSpacing: 0.25,
|
|
42
|
+
textAlign: 'justify',
|
|
43
|
+
color: '#111111',
|
|
44
|
+
paddingTop: 5
|
|
45
|
+
},
|
|
46
|
+
reasonItemStyle: {
|
|
47
|
+
flexDirection: 'row',
|
|
48
|
+
paddingTop: 10,
|
|
49
|
+
paddingStart: 20,
|
|
50
|
+
paddingEnd: 20,
|
|
51
|
+
backgroundColor: 'white'
|
|
52
|
+
},
|
|
53
|
+
heading: {
|
|
54
|
+
marginTop: 30,
|
|
55
|
+
marginStart: 25,
|
|
56
|
+
fontSize: 14,
|
|
57
|
+
lineHeight: 21,
|
|
58
|
+
letterSpacing: 0.25,
|
|
59
|
+
fontFamily: 'IBMPlexSans_400Regular',
|
|
60
|
+
color: '#9D9D9D'
|
|
61
|
+
},
|
|
62
|
+
item: {
|
|
63
|
+
margin: 10,
|
|
64
|
+
padding: 15,
|
|
65
|
+
borderWidth: 0.2
|
|
66
|
+
},
|
|
67
|
+
btn: {
|
|
68
|
+
width: 240,
|
|
69
|
+
borderRadius: 4,
|
|
70
|
+
backgroundColor: '#62d1bc',
|
|
71
|
+
paddingHorizontal: 24,
|
|
72
|
+
paddingVertical: 12,
|
|
73
|
+
marginVertical: 8
|
|
74
|
+
},
|
|
75
|
+
loader: {
|
|
76
|
+
flex: 1,
|
|
77
|
+
justifyContent: 'center',
|
|
78
|
+
alignItems: 'center'
|
|
79
|
+
},
|
|
80
|
+
flexCenter: {
|
|
81
|
+
width: 300,
|
|
82
|
+
height: 200,
|
|
83
|
+
flex: 1,
|
|
84
|
+
justifyContent: 'center',
|
|
85
|
+
alignItems: 'center'
|
|
86
|
+
},
|
|
87
|
+
paymentWaitIcon: {
|
|
88
|
+
backgroundColor: '#ECF0FF',
|
|
89
|
+
width: 113,
|
|
90
|
+
height: 113,
|
|
91
|
+
borderRadius: 60,
|
|
92
|
+
justifyContent: 'center',
|
|
93
|
+
alignItems: 'center'
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
//# sourceMappingURL=PaymentStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StyleSheet","Platform","Fonts","PaymentStyles","create","amountStyle","fontSize","fontWeight","fontStyle","textAlign","alignItems","paddingTop","paddingBottom","fontFamily","OS","IBMPlexSans_600SemiBold","messageStyle","IBMPlexSans_400Regular","backgroundColor","color","padding","textStyle1","marginTop","marginStart","marginEnd","reasonTextStyle","flex","flexWrap","lineHeight","letterSpacing","reasonItemStyle","flexDirection","paddingStart","paddingEnd","heading","item","margin","borderWidth","btn","width","borderRadius","paddingHorizontal","paddingVertical","marginVertical","loader","justifyContent","flexCenter","height","paymentWaitIcon"],"sources":["PaymentStyles.ts"],"sourcesContent":["import { StyleSheet, Platform } from 'react-native';\nimport { Fonts } from '../../../styles/executionTasks/CommonStyles';\n\nexport const PaymentStyles = StyleSheet.create({\n amountStyle: {\n fontSize: 18,\n fontWeight: '600',\n fontStyle: 'normal',\n // backgroundColor: 'white',\n textAlign: 'center',\n alignItems: 'center',\n paddingTop: 25,\n paddingBottom: 25,\n fontFamily: Platform.OS === 'android'\n ? Fonts.IBMPlexSans_600SemiBold\n : 'IBMPlexSans-SemiBold',\n },\n messageStyle: {\n fontFamily: Platform.OS === 'android'\n ? Fonts.IBMPlexSans_400Regular\n : 'IBMPlexSans-Regular',\n backgroundColor: '#FFFFFF',\n color: '#111111',\n padding: 20,\n fontStyle: 'normal',\n fontWeight: 'normal',\n fontSize: 14,\n },\n textStyle1: {\n fontFamily: Platform.OS === 'android'\n ? Fonts.IBMPlexSans_400Regular\n : 'IBMPlexSans-Regular',\n marginTop: 20,\n marginStart: 20,\n marginEnd: 20,\n color: '#9D9D9D',\n fontStyle: 'normal',\n fontWeight: 'normal',\n fontSize: 14,\n },\n reasonTextStyle: {\n flex: 1,\n flexWrap: 'wrap',\n fontFamily: Platform.OS === 'android'\n ? Fonts.IBMPlexSans_400Regular\n : 'IBMPlexSans-Regular',\n fontStyle: 'normal',\n fontSize: 14,\n lineHeight: 21,\n letterSpacing: 0.25,\n textAlign: 'justify',\n color: '#111111',\n paddingTop: 5,\n },\n\n reasonItemStyle: {\n flexDirection: 'row',\n paddingTop: 10,\n paddingStart: 20,\n paddingEnd: 20,\n backgroundColor: 'white',\n },\n heading: {\n marginTop: 30,\n marginStart: 25,\n fontSize: 14,\n lineHeight: 21,\n letterSpacing: 0.25,\n fontFamily: 'IBMPlexSans_400Regular',\n color: '#9D9D9D',\n },\n item: {\n margin: 10,\n padding: 15,\n borderWidth: 0.2,\n },\n btn: {\n width: 240,\n borderRadius: 4,\n backgroundColor: '#62d1bc',\n paddingHorizontal: 24,\n paddingVertical: 12,\n marginVertical: 8,\n },\n\n loader: { flex: 1, justifyContent: 'center', alignItems: 'center' },\n flexCenter: {\n width: 300,\n height: 200,\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n },\n paymentWaitIcon: {\n backgroundColor: '#ECF0FF',\n width: 113,\n height: 113,\n borderRadius: 60,\n justifyContent: 'center',\n alignItems: 'center',\n },\n});\n"],"mappings":"AAAA,SAASA,UAAU,EAAE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1
|
+
import Logger, { LOG_TYPE } from '../../../utils/Logger';
|
|
2
|
+
import { getApiResponse } from '../../../utils/ApiUtils';
|
|
3
|
+
import * as jsonLogic from 'json-logic-js';
|
|
4
|
+
import { TRANSACTION_TYPE } from './CollectPaymentSchema';
|
|
5
|
+
export const PAYMENT_SHARED_PREF_KEY = '@Payment_';
|
|
6
|
+
export const PAYMENT_SELECTION_SHARED_PREF_KEY = '@Payment_Selection_';
|
|
7
|
+
export function getUniqueTransactionID(amt) {
|
|
8
|
+
return `TID${Date.now().toString() + amt.toString()}`;
|
|
9
|
+
}
|
|
10
|
+
export function getPaymentValue(amt, minorUnit) {
|
|
11
|
+
if (!minorUnit) return amt;
|
|
12
|
+
return amt / Math.pow(10, minorUnit);
|
|
13
|
+
}
|
|
14
|
+
export function getPaymentType(txnType) {
|
|
15
|
+
if (txnType === TRANSACTION_TYPE.LINK) {
|
|
16
|
+
return 'PAYMENT_LINK';
|
|
17
|
+
} else if (txnType === TRANSACTION_TYPE.QRCODE) {
|
|
18
|
+
return 'QR_CODE';
|
|
19
|
+
} else return null;
|
|
20
|
+
}
|
|
21
|
+
export function getPaymentLink(env, tenant, appAbbr, refId) {
|
|
22
|
+
let baseDomain = 'dev.os1.delhivery.com';
|
|
23
|
+
switch (env) {
|
|
24
|
+
case 'SHARED_P1':
|
|
25
|
+
case 'DLV_INDIA_P2':
|
|
26
|
+
baseDomain = 'os1.app';
|
|
27
|
+
break;
|
|
28
|
+
case 'SANDBOX':
|
|
29
|
+
baseDomain = 'sandbox.os1.app';
|
|
30
|
+
break;
|
|
31
|
+
case 'DEV':
|
|
32
|
+
default:
|
|
33
|
+
baseDomain = 'dev.os1.delhivery.com';
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
return `https://${tenant}.${baseDomain}/pay/${appAbbr}/${refId}`;
|
|
37
|
+
}
|
|
38
|
+
export const apiExecution = async api => {
|
|
39
|
+
try {
|
|
40
|
+
const apiData = {
|
|
41
|
+
errorJsonPath: '',
|
|
42
|
+
responseJsonPath: '',
|
|
43
|
+
uri: api.uri,
|
|
44
|
+
httpMethod: api.httpMethod,
|
|
45
|
+
timeout: api.timeout
|
|
46
|
+
};
|
|
47
|
+
if (api.headers) {
|
|
48
|
+
apiData.headers = api.headers;
|
|
49
|
+
}
|
|
50
|
+
if (api.requestBody) {
|
|
51
|
+
apiData.requestBody = api.requestBody;
|
|
52
|
+
}
|
|
53
|
+
if (api.pathParams) {
|
|
54
|
+
apiData.pathParams = api.pathParams;
|
|
55
|
+
}
|
|
56
|
+
if (api.queryParams) {
|
|
57
|
+
apiData.queryParams = api.queryParams;
|
|
58
|
+
}
|
|
59
|
+
const apiResponse = await getApiResponse(apiData);
|
|
60
|
+
console.log('apiResponse: ', JSON.stringify(apiResponse.data));
|
|
61
|
+
return jsonLogic.apply(api.responseJsonLogic, apiResponse.data);
|
|
62
|
+
} catch (error) {
|
|
63
|
+
console.log('error: ', error);
|
|
64
|
+
console.log('error: ', JSON.stringify(error));
|
|
65
|
+
Logger.getInstance().logEvent('~ api triggered ', error.message, LOG_TYPE.SDK_ERROR);
|
|
66
|
+
// return false;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
export async function getPaymentDataMO(mergedObjectiveIds, refId, storage) {
|
|
70
|
+
/**
|
|
71
|
+
* Can use bulk get here, but probability of getting the item on first render is more compared to
|
|
72
|
+
* fetching all the data and finding a single moId
|
|
73
|
+
*/
|
|
74
|
+
/* for await (const moId of mergedObjectiveId) {
|
|
75
|
+
const moIdPaymentData = await storage.getSharedItem(
|
|
76
|
+
PAYMENT_SHARED_PREF_KEY + moId
|
|
77
|
+
);
|
|
78
|
+
if (moIdPaymentData) {
|
|
79
|
+
const parsedPaymentData: sharedPrefPaymentDataInterface =
|
|
80
|
+
JSON.parse(moIdPaymentData);
|
|
81
|
+
if (parsedPaymentData.refId === refId) {
|
|
82
|
+
return parsedPaymentData;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
} */
|
|
86
|
+
|
|
87
|
+
const moIdPaymentData = await storage.getSharedItem(PAYMENT_SHARED_PREF_KEY + refId);
|
|
88
|
+
if (moIdPaymentData) {
|
|
89
|
+
const parsedPaymentData = JSON.parse(moIdPaymentData);
|
|
90
|
+
if (parsedPaymentData.moIds.some(value => mergedObjectiveIds.includes(value))) {
|
|
91
|
+
return parsedPaymentData;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
export async function setSharedPrefPaymentData(refId,
|
|
97
|
+
// moIds: string[],
|
|
98
|
+
payload, storage) {
|
|
99
|
+
await storage.setSharedItem(PAYMENT_SHARED_PREF_KEY + refId, JSON.stringify(payload));
|
|
100
|
+
/* let finalPayload: { key: string; value: string }[] = [];
|
|
101
|
+
for (const moId of moIds) {
|
|
102
|
+
finalPayload.push({
|
|
103
|
+
key: PAYMENT_SHARED_PREF_KEY + moId,
|
|
104
|
+
value: JSON.stringify(payload),
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
await storage.setSharedItems(finalPayload); */
|
|
108
|
+
}
|
|
109
|
+
export async function getSharedPrefPaymentSelection(refId, storage) {
|
|
110
|
+
let prevSelection = await storage.getSharedItem(PAYMENT_SELECTION_SHARED_PREF_KEY + refId);
|
|
111
|
+
if (prevSelection) {
|
|
112
|
+
return JSON.parse(prevSelection);
|
|
113
|
+
}
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
export async function setSharedPrefPaymentSelection(refId, mode, storage) {
|
|
117
|
+
let updatedPayload = [mode];
|
|
118
|
+
let prevSelection = await getSharedPrefPaymentSelection(refId, storage);
|
|
119
|
+
if (prevSelection) {
|
|
120
|
+
updatedPayload = [...new Set([...prevSelection, mode])];
|
|
121
|
+
}
|
|
122
|
+
await storage.setSharedItem(PAYMENT_SELECTION_SHARED_PREF_KEY + refId, JSON.stringify(updatedPayload));
|
|
123
|
+
}
|
|
124
|
+
export async function removeSharedPrefPaymentData(refId, storage) {
|
|
125
|
+
await storage.removeSharedItem(PAYMENT_SHARED_PREF_KEY + refId);
|
|
126
|
+
}
|
|
127
|
+
export const formatTime = time => {
|
|
128
|
+
const minutes = Math.floor(time / 60);
|
|
129
|
+
const remainingSeconds = time % 60;
|
|
130
|
+
return `${minutes > 0 ? String(minutes).padStart(2, '') + ' min' : ''} ${String(remainingSeconds).padStart(2, '')} sec`;
|
|
131
|
+
};
|
|
132
|
+
//# sourceMappingURL=PaymentUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Logger","LOG_TYPE","getApiResponse","jsonLogic","TRANSACTION_TYPE","PAYMENT_SHARED_PREF_KEY","PAYMENT_SELECTION_SHARED_PREF_KEY","getUniqueTransactionID","amt","Date","now","toString","getPaymentValue","minorUnit","Math","pow","getPaymentType","txnType","LINK","QRCODE","getPaymentLink","env","tenant","appAbbr","refId","baseDomain","apiExecution","api","apiData","errorJsonPath","responseJsonPath","uri","httpMethod","timeout","headers","requestBody","pathParams","queryParams","apiResponse","console","log","JSON","stringify","data","apply","responseJsonLogic","error","getInstance","logEvent","message","SDK_ERROR","getPaymentDataMO","mergedObjectiveIds","storage","moIdPaymentData","getSharedItem","parsedPaymentData","parse","moIds","some","value","includes","setSharedPrefPaymentData","payload","setSharedItem","getSharedPrefPaymentSelection","prevSelection","setSharedPrefPaymentSelection","mode","updatedPayload","Set","removeSharedPrefPaymentData","removeSharedItem","formatTime","time","minutes","floor","remainingSeconds","String","padStart"],"sources":["PaymentUtils.ts"],"sourcesContent":["import Logger, { LOG_TYPE } from '../../../utils/Logger';\nimport { APIData, getApiResponse } from '../../../utils/ApiUtils';\nimport * as jsonLogic from 'json-logic-js';\nimport {\n API,\n AllowedModes,\n TRANSACTION_TYPE,\n sharedPrefPaymentDataInterface,\n} from './CollectPaymentSchema';\nimport Storage from '../../../utils/storage';\nimport { ENV } from '../../../models/sdk';\n\nexport const PAYMENT_SHARED_PREF_KEY = '@Payment_';\nexport const PAYMENT_SELECTION_SHARED_PREF_KEY = '@Payment_Selection_';\n\nexport function getUniqueTransactionID(amt: number): string {\n return `TID${Date.now().toString() + amt.toString()}`;\n}\nexport function getPaymentValue(amt: number, minorUnit?: number): number {\n if (!minorUnit) return amt;\n return amt / Math.pow(10, minorUnit);\n}\n\nexport function getPaymentType(txnType: TRANSACTION_TYPE): AllowedModes | null {\n if (txnType === TRANSACTION_TYPE.LINK) {\n return 'PAYMENT_LINK';\n } else if (txnType === TRANSACTION_TYPE.QRCODE) {\n return 'QR_CODE';\n } else return null;\n}\n\nexport function getPaymentLink(\n env: ENV,\n tenant: string,\n appAbbr: string,\n refId: string\n) {\n let baseDomain = 'dev.os1.delhivery.com';\n switch (env) {\n case 'SHARED_P1':\n case 'DLV_INDIA_P2':\n baseDomain = 'os1.app';\n break;\n case 'SANDBOX':\n baseDomain = 'sandbox.os1.app';\n break;\n case 'DEV':\n default:\n baseDomain = 'dev.os1.delhivery.com';\n break;\n }\n return `https://${tenant}.${baseDomain}/pay/${appAbbr}/${refId}`;\n}\n\nexport const apiExecution = async (api: API) => {\n try {\n const apiData: APIData = {\n errorJsonPath: '',\n responseJsonPath: '',\n uri: api.uri,\n httpMethod: api.httpMethod,\n timeout: api.timeout,\n };\n if (api.headers) {\n apiData.headers = api.headers;\n }\n if (api.requestBody) {\n apiData.requestBody = api.requestBody;\n }\n if (api.pathParams) {\n apiData.pathParams = api.pathParams;\n }\n if (api.queryParams) {\n apiData.queryParams = api.queryParams;\n }\n\n const apiResponse = await getApiResponse(apiData);\n console.log('apiResponse: ', JSON.stringify(apiResponse.data));\n\n return jsonLogic.apply(\n <jsonLogic.RulesLogic>api.responseJsonLogic,\n apiResponse.data\n );\n } catch (error: any) {\n console.log('error: ', error);\n console.log('error: ', JSON.stringify(error));\n\n Logger.getInstance().logEvent(\n '~ api triggered ',\n error.message,\n LOG_TYPE.SDK_ERROR\n );\n // return false;\n }\n};\n\nexport async function getPaymentDataMO(\n mergedObjectiveIds: string[],\n refId: string,\n storage: Storage\n) {\n /**\n * Can use bulk get here, but probability of getting the item on first render is more compared to\n * fetching all the data and finding a single moId\n */\n /* for await (const moId of mergedObjectiveId) {\n const moIdPaymentData = await storage.getSharedItem(\n PAYMENT_SHARED_PREF_KEY + moId\n );\n if (moIdPaymentData) {\n const parsedPaymentData: sharedPrefPaymentDataInterface =\n JSON.parse(moIdPaymentData);\n if (parsedPaymentData.refId === refId) {\n return parsedPaymentData;\n }\n }\n } */\n\n const moIdPaymentData = await storage.getSharedItem(\n PAYMENT_SHARED_PREF_KEY + refId\n );\n if (moIdPaymentData) {\n const parsedPaymentData: sharedPrefPaymentDataInterface =\n JSON.parse(moIdPaymentData);\n if (\n parsedPaymentData.moIds.some((value) =>\n mergedObjectiveIds.includes(value)\n )\n ) {\n return parsedPaymentData;\n }\n }\n return null;\n}\n\nexport async function setSharedPrefPaymentData(\n refId: string,\n // moIds: string[],\n payload: sharedPrefPaymentDataInterface,\n storage: Storage\n) {\n await storage.setSharedItem(\n PAYMENT_SHARED_PREF_KEY + refId,\n JSON.stringify(payload)\n );\n /* let finalPayload: { key: string; value: string }[] = [];\n for (const moId of moIds) {\n finalPayload.push({\n key: PAYMENT_SHARED_PREF_KEY + moId,\n value: JSON.stringify(payload),\n });\n }\n await storage.setSharedItems(finalPayload); */\n}\n\nexport async function getSharedPrefPaymentSelection(\n refId: string,\n storage: Storage\n): Promise<AllowedModes[] | null> {\n let prevSelection = await storage.getSharedItem(\n PAYMENT_SELECTION_SHARED_PREF_KEY + refId\n );\n if (prevSelection) {\n return JSON.parse(prevSelection);\n }\n\n return null;\n}\n\nexport async function setSharedPrefPaymentSelection(\n refId: string,\n mode: AllowedModes,\n storage: Storage\n) {\n let updatedPayload = [mode];\n let prevSelection = await getSharedPrefPaymentSelection(refId, storage);\n if (prevSelection) {\n updatedPayload = [...new Set([...prevSelection, mode])];\n }\n\n await storage.setSharedItem(\n PAYMENT_SELECTION_SHARED_PREF_KEY + refId,\n JSON.stringify(updatedPayload)\n );\n}\n\nexport async function removeSharedPrefPaymentData(\n refId: string,\n storage: Storage\n) {\n await storage.removeSharedItem(PAYMENT_SHARED_PREF_KEY + refId);\n}\n\nexport const formatTime = (time: number) => {\n const minutes = Math.floor(time / 60);\n const remainingSeconds = time % 60;\n return `${\n minutes > 0 ? String(minutes).padStart(2, '') + ' min' : ''\n } ${String(remainingSeconds).padStart(2, '')} sec`;\n};\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,QAAQ,QAAQ,uBAAuB;AACxD,SAAkBC,cAAc,QAAQ,yBAAyB;AACjE,OAAO,KAAKC,SAAS,MAAM,eAAe;AAC1C,SAGEC,gBAAgB,QAEX,wBAAwB;AAI/B,OAAO,MAAMC,uBAAuB,GAAG,WAAW;AAClD,OAAO,MAAMC,iCAAiC,GAAG,qBAAqB;AAEtE,OAAO,SAASC,sBAAsBA,CAACC,GAAW,EAAU;EAC1D,OAAO,MAAMC,IAAI,CAACC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,GAAGH,GAAG,CAACG,QAAQ,CAAC,CAAC,EAAE;AACvD;AACA,OAAO,SAASC,eAAeA,CAACJ,GAAW,EAAEK,SAAkB,EAAU;EACvE,IAAI,CAACA,SAAS,EAAE,OAAOL,GAAG;EAC1B,OAAOA,GAAG,GAAGM,IAAI,CAACC,GAAG,CAAC,EAAE,EAAEF,SAAS,CAAC;AACtC;AAEA,OAAO,SAASG,cAAcA,CAACC,OAAyB,EAAuB;EAC7E,IAAIA,OAAO,KAAKb,gBAAgB,CAACc,IAAI,EAAE;IACrC,OAAO,cAAc;EACvB,CAAC,MAAM,IAAID,OAAO,KAAKb,gBAAgB,CAACe,MAAM,EAAE;IAC9C,OAAO,SAAS;EAClB,CAAC,MAAM,OAAO,IAAI;AACpB;AAEA,OAAO,SAASC,cAAcA,CAC5BC,GAAQ,EACRC,MAAc,EACdC,OAAe,EACfC,KAAa,EACb;EACA,IAAIC,UAAU,GAAG,uBAAuB;EACxC,QAAQJ,GAAG;IACT,KA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O,IAAI;AACb;AAEA,OAAO,eAAeC,6BAA6BA,CACjD3C,KAAa,EACb4C,IAAkB,EAClBf,OAAgB,EAChB;EACA,IAAIgB,cAAc,GAAG,CAACD,IAAI,CAAC;EAC3B,IAAIF,aAAa,GAAG,MAAMD,6BAA6B,CAACzC,KAAK,EAAE6B,OAAO,CAAC;EACvE,IAAIa,aAAa,EAAE;IACjBG,cAAc,GAAG,CAAC,GAAG,IAAIC,GAAG,CAAC,CAAC,GAAGJ,aAAa,EAAEE,IAAI,CAAC,CAAC,CAAC;EACzD;EAEA,MAAMf,OAAO,CAACW,aAAa,CACzB1D,iCAAiC,GAAGkB,KAAK,EACzCiB,IAAI,CAACC,SAAS,CAAC2B,cAAc,CAC/B,CAAC;AACH;AAEA,OAAO,eAAeE,2BAA2BA,CAC/C/C,KAAa,EACb6B,OAAgB,EAChB;EACA,MAAMA,OAAO,CAACmB,gBAAgB,CAACnE,uBAAuB,GAAGmB,KAAK,CAAC;AACjE;AAEA,OAAO,MAAMiD,UAAU,GAAIC,IAAY,IAAK;EAC1C,MAAMC,OAAO,GAAG7D,IAAI,CAAC8D,KAAK,CAACF,IAAI,GAAG,EAAE,CAAC;EACrC,MAAMG,gBAAgB,GAAGH,IAAI,GAAG,EAAE;EAClC,OAAO,GACLC,OAAO,GAAG,CAAC,GAAGG,MAAM,CAACH,OAAO,CAAC,CAACI,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,MAAM,GAAG,EAAE,IACzDD,MAAM,CAACD,gBAAgB,CAAC,CAACE,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM;AACpD,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
+
/* eslint-disable react-native/no-inline-styles */
|
|
3
|
+
import React, { useState, useLayoutEffect, useEffect, useContext } from 'react';
|
|
4
|
+
import { getBaseETResponse } from '../../../../utils/ExecTaskUtils';
|
|
5
|
+
import { getEventCodeByET } from '../../../../manager/dispatchCodes/EventCodeContainer';
|
|
6
|
+
import { EntityCode, ExecutionTaskID } from '../../../../models/execTasks/ETConfig';
|
|
7
|
+
import { Button, Modal, Portal, Provider, Text } from 'react-native-paper';
|
|
8
|
+
import { Platform, StyleSheet, View } from 'react-native';
|
|
9
|
+
import { CommonStyles, DeliverPickupStyles, Fonts } from '../../../../styles/executionTasks/CommonStyles';
|
|
10
|
+
import { PAYMENT_SUCCESS_DEFAULT_TIMEOUT } from '../../../../constants/constants';
|
|
11
|
+
import { useFocusEffect } from '@react-navigation/native';
|
|
12
|
+
import { BackHandler } from 'react-native';
|
|
13
|
+
import FailureCloseIcon from '../../../../icons/FailureCloseIcon';
|
|
14
|
+
import SuccessCompleteIcon from '../../../../icons/SuccessCompleteIcon';
|
|
15
|
+
import { PAYMENT_SCREEN } from '../CollectPaymentSchema';
|
|
16
|
+
import { PaymentContext } from '../../../../utils/context/paymentContext';
|
|
17
|
+
import { PAYMENT_SELECTION_SHARED_PREF_KEY, getSharedPrefPaymentSelection } from '../PaymentUtils';
|
|
18
|
+
import Storage from '../../../../utils/storage';
|
|
19
|
+
let storage = Storage.getInstance();
|
|
20
|
+
const CompletePayment = props => {
|
|
21
|
+
const paymentConfigContext = useContext(PaymentContext);
|
|
22
|
+
const [disableProceed, setDisableProceed] = useState(false);
|
|
23
|
+
const [showModal, setShowModal] = useState(true);
|
|
24
|
+
|
|
25
|
+
// TO hide header for modal screen
|
|
26
|
+
useLayoutEffect(() => {
|
|
27
|
+
props.navigation.setOptions({
|
|
28
|
+
headerShown: false
|
|
29
|
+
});
|
|
30
|
+
}, [props.navigation]);
|
|
31
|
+
|
|
32
|
+
// Handle back-button click
|
|
33
|
+
useFocusEffect(React.useCallback(() => {
|
|
34
|
+
const onBackPress = () => {
|
|
35
|
+
return false;
|
|
36
|
+
};
|
|
37
|
+
BackHandler.addEventListener('hardwareBackPress', onBackPress);
|
|
38
|
+
return () => BackHandler.removeEventListener('hardwareBackPress', onBackPress);
|
|
39
|
+
}, []));
|
|
40
|
+
|
|
41
|
+
// useLayoutEffect(() => {
|
|
42
|
+
// props.navigation.setOptions({
|
|
43
|
+
// title: 'Payment Complete',
|
|
44
|
+
// headerShown: false,
|
|
45
|
+
// });
|
|
46
|
+
// }, [props.navigation, props.title]);
|
|
47
|
+
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
if (props.success) {
|
|
50
|
+
// setTimeout(() => {
|
|
51
|
+
sendOutput();
|
|
52
|
+
// }, 3000);
|
|
53
|
+
}
|
|
54
|
+
}, [props.success]);
|
|
55
|
+
const sendOutput = () => {
|
|
56
|
+
var _paymentConfigContext;
|
|
57
|
+
setTimeout(async () => {
|
|
58
|
+
var _props$applicableReas;
|
|
59
|
+
const previousSelectedModes = await getSharedPrefPaymentSelection(props.refId, storage);
|
|
60
|
+
let etOutput = {
|
|
61
|
+
paymentMode: props.paymentMode,
|
|
62
|
+
collectedAmount: props.collectedAmount,
|
|
63
|
+
refId: props.refId,
|
|
64
|
+
...(await getBaseETResponse(EntityCode.COLLECT_PAYMENT_ET, props.success, getEventCodeByET(ExecutionTaskID.COLLECT_PAYMENT_ET, props.success, (_props$applicableReas = props.applicableReasons) === null || _props$applicableReas === void 0 ? void 0 : _props$applicableReas.success), '', props.mergedObjectiveId, ExecutionTaskID.COLLECT_PAYMENT_ET))
|
|
65
|
+
};
|
|
66
|
+
if (previousSelectedModes) {
|
|
67
|
+
etOutput.paymentMeta = {
|
|
68
|
+
previousSelectedModes
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
if (props.success) {
|
|
72
|
+
setShowModal(false);
|
|
73
|
+
}
|
|
74
|
+
setDisableProceed(true);
|
|
75
|
+
props.onSubmitET(etOutput);
|
|
76
|
+
storage.removeSharedItem(PAYMENT_SELECTION_SHARED_PREF_KEY + props.refId);
|
|
77
|
+
}, (paymentConfigContext === null || paymentConfigContext === void 0 || (_paymentConfigContext = paymentConfigContext.sdkConfig) === null || _paymentConfigContext === void 0 ? void 0 : _paymentConfigContext.paymentSuccessTimeout) || PAYMENT_SUCCESS_DEFAULT_TIMEOUT);
|
|
78
|
+
};
|
|
79
|
+
return /*#__PURE__*/React.createElement(Provider, null, /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(View, {
|
|
80
|
+
style: DeliverPickupStyles.mainContainer
|
|
81
|
+
}, /*#__PURE__*/React.createElement(Modal, {
|
|
82
|
+
dismissable: false,
|
|
83
|
+
visible: showModal,
|
|
84
|
+
contentContainerStyle: DeliverPickupStyles.modalContent
|
|
85
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
86
|
+
style: DeliverPickupStyles.modalView
|
|
87
|
+
}, props.success ? /*#__PURE__*/React.createElement(View, {
|
|
88
|
+
style: {
|
|
89
|
+
justifyContent: 'center',
|
|
90
|
+
alignItems: 'center',
|
|
91
|
+
paddingVertical: 30
|
|
92
|
+
}
|
|
93
|
+
}, /*#__PURE__*/React.createElement(SuccessCompleteIcon, null), /*#__PURE__*/React.createElement(Text, {
|
|
94
|
+
style: [CommonStyles.titleText, {
|
|
95
|
+
marginTop: 20
|
|
96
|
+
}]
|
|
97
|
+
}, "Payment Received!")) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(View, {
|
|
98
|
+
style: {
|
|
99
|
+
justifyContent: 'center',
|
|
100
|
+
alignItems: 'center',
|
|
101
|
+
paddingVertical: 30
|
|
102
|
+
}
|
|
103
|
+
}, /*#__PURE__*/React.createElement(FailureCloseIcon, null), /*#__PURE__*/React.createElement(Text, {
|
|
104
|
+
style: [CommonStyles.titleText, {
|
|
105
|
+
marginTop: 20
|
|
106
|
+
}]
|
|
107
|
+
}, "Payment Failed!")), /*#__PURE__*/React.createElement(Button, {
|
|
108
|
+
disabled: disableProceed,
|
|
109
|
+
mode: 'contained',
|
|
110
|
+
uppercase: false,
|
|
111
|
+
labelStyle: CommonStyles.nextButtonLabel,
|
|
112
|
+
style: [CommonStyles.nextButton, {
|
|
113
|
+
marginTop: 20
|
|
114
|
+
}],
|
|
115
|
+
onPress: async () => {
|
|
116
|
+
var _props$applicableReas2;
|
|
117
|
+
let etOutput = {
|
|
118
|
+
paymentMode: props.paymentMode,
|
|
119
|
+
collectedAmount: props.collectedAmount,
|
|
120
|
+
refId: props.refId,
|
|
121
|
+
screen: PAYMENT_SCREEN.INIT,
|
|
122
|
+
sourceScreen: PAYMENT_SCREEN.COMPLETE,
|
|
123
|
+
...(await getBaseETResponse(EntityCode.COLLECT_PAYMENT_ET, false, getEventCodeByET(ExecutionTaskID.COLLECT_PAYMENT_ET, false, (_props$applicableReas2 = props.applicableReasons) === null || _props$applicableReas2 === void 0 ? void 0 : _props$applicableReas2.failure), '', props.mergedObjectiveId, ExecutionTaskID.COLLECT_PAYMENT_ET))
|
|
124
|
+
};
|
|
125
|
+
storage.removeSharedItem(PAYMENT_SELECTION_SHARED_PREF_KEY + props.refId);
|
|
126
|
+
setDisableProceed(true);
|
|
127
|
+
props.next(etOutput);
|
|
128
|
+
}
|
|
129
|
+
}, "Try again"), /*#__PURE__*/React.createElement(Button, {
|
|
130
|
+
labelStyle: [CommonStyles.cancelButtonLabel, {
|
|
131
|
+
color: '#3D445C'
|
|
132
|
+
}],
|
|
133
|
+
style: [CommonStyles.cancelButton, {
|
|
134
|
+
marginTop: 10
|
|
135
|
+
}],
|
|
136
|
+
mode: 'outlined',
|
|
137
|
+
onPress: async () => {
|
|
138
|
+
var _props$applicableReas3;
|
|
139
|
+
const previousSelectedModes = await getSharedPrefPaymentSelection(props.refId, storage);
|
|
140
|
+
let etOutput = {
|
|
141
|
+
paymentMode: props.paymentMode,
|
|
142
|
+
collectedAmount: props.collectedAmount,
|
|
143
|
+
refId: props.refId,
|
|
144
|
+
...(await getBaseETResponse(EntityCode.COLLECT_PAYMENT_ET, false, getEventCodeByET(ExecutionTaskID.COLLECT_PAYMENT_ET, false, (_props$applicableReas3 = props.applicableReasons) === null || _props$applicableReas3 === void 0 ? void 0 : _props$applicableReas3.failure), '', props.mergedObjectiveId, ExecutionTaskID.COLLECT_PAYMENT_ET))
|
|
145
|
+
};
|
|
146
|
+
if (previousSelectedModes) {
|
|
147
|
+
etOutput.paymentMeta = {
|
|
148
|
+
previousSelectedModes
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
setDisableProceed(true);
|
|
152
|
+
props.onSubmitET(etOutput);
|
|
153
|
+
storage.removeSharedItem(PAYMENT_SELECTION_SHARED_PREF_KEY + props.refId);
|
|
154
|
+
}
|
|
155
|
+
}, "Cancel")))))));
|
|
156
|
+
};
|
|
157
|
+
export default CompletePayment;
|
|
158
|
+
const styles = StyleSheet.create({
|
|
159
|
+
title: {
|
|
160
|
+
fontSize: 18,
|
|
161
|
+
fontStyle: 'normal',
|
|
162
|
+
fontWeight: '600',
|
|
163
|
+
lineHeight: 28,
|
|
164
|
+
textAlign: 'center',
|
|
165
|
+
color: '#111111',
|
|
166
|
+
fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_600SemiBold : 'IBMPlexSans-SemiBold'
|
|
167
|
+
},
|
|
168
|
+
message1: {
|
|
169
|
+
fontStyle: 'normal',
|
|
170
|
+
fontWeight: 'normal',
|
|
171
|
+
fontSize: 12,
|
|
172
|
+
lineHeight: 20,
|
|
173
|
+
textAlign: 'center',
|
|
174
|
+
color: '#111111',
|
|
175
|
+
marginTop: 12,
|
|
176
|
+
fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_400Regular : 'IBMPlexSans-Regular'
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
//# sourceMappingURL=CompletePayment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useState","useLayoutEffect","useEffect","useContext","getBaseETResponse","getEventCodeByET","EntityCode","ExecutionTaskID","Button","Modal","Portal","Provider","Text","Platform","StyleSheet","View","CommonStyles","DeliverPickupStyles","Fonts","PAYMENT_SUCCESS_DEFAULT_TIMEOUT","useFocusEffect","BackHandler","FailureCloseIcon","SuccessCompleteIcon","PAYMENT_SCREEN","PaymentContext","PAYMENT_SELECTION_SHARED_PREF_KEY","getSharedPrefPaymentSelection","Storage","storage","getInstance","CompletePayment","props","paymentConfigContext","disableProceed","setDisableProceed","showModal","setShowModal","navigation","setOptions","headerShown","useCallback","onBackPress","addEventListener","removeEventListener","success","sendOutput","_paymentConfigContext","setTimeout","_props$applicableReas","previousSelectedModes","refId","etOutput","paymentMode","collectedAmount","COLLECT_PAYMENT_ET","applicableReasons","mergedObjectiveId","paymentMeta","onSubmitET","removeSharedItem","sdkConfig","paymentSuccessTimeout","createElement","style","mainContainer","dismissable","visible","contentContainerStyle","modalContent","modalView","justifyContent","alignItems","paddingVertical","titleText","marginTop","Fragment","disabled","mode","uppercase","labelStyle","nextButtonLabel","nextButton","onPress","_props$applicableReas2","screen","INIT","sourceScreen","COMPLETE","failure","next","cancelButtonLabel","color","cancelButton","_props$applicableReas3","styles","create","title","fontSize","fontStyle","fontWeight","lineHeight","textAlign","fontFamily","OS","IBMPlexSans_600SemiBold","message1","IBMPlexSans_400Regular"],"sources":["CompletePayment.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable react-native/no-inline-styles */\nimport React, { useState, useLayoutEffect, useEffect, useContext } from 'react';\nimport { getBaseETResponse } from '../../../../utils/ExecTaskUtils';\nimport { getEventCodeByET } from '../../../../manager/dispatchCodes/EventCodeContainer';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../../models/execTasks/ETConfig';\nimport { Button, Modal, Portal, Provider, Text } from 'react-native-paper';\nimport { Platform, StyleSheet, View } from 'react-native';\nimport {\n CommonStyles,\n DeliverPickupStyles,\n Fonts,\n} from '../../../../styles/executionTasks/CommonStyles';\nimport { PAYMENT_SUCCESS_DEFAULT_TIMEOUT } from '../../../../constants/constants';\nimport { useFocusEffect } from '@react-navigation/native';\nimport { BackHandler } from 'react-native';\nimport FailureCloseIcon from '../../../../icons/FailureCloseIcon';\nimport SuccessCompleteIcon from '../../../../icons/SuccessCompleteIcon';\nimport {\n CollectPaymentInput,\n CollectPaymentOutput,\n PAYMENT_SCREEN,\n} from '../CollectPaymentSchema';\nimport { PaymentContext } from '../../../../utils/context/paymentContext';\nimport {\n PAYMENT_SELECTION_SHARED_PREF_KEY,\n getSharedPrefPaymentSelection,\n} from '../PaymentUtils';\nimport Storage from '../../../../utils/storage';\n\nlet storage = Storage.getInstance();\n\nconst CompletePayment = (props: CollectPaymentInput & CollectPaymentOutput) => {\n const paymentConfigContext = useContext(PaymentContext);\n\n const [disableProceed, setDisableProceed] = useState(false);\n const [showModal, setShowModal] = useState<boolean>(true);\n\n // TO hide header for modal screen\n useLayoutEffect(() => {\n props.navigation.setOptions({\n headerShown: false,\n });\n }, [props.navigation]);\n\n // Handle back-button click\n useFocusEffect(\n React.useCallback(() => {\n const onBackPress = () => {\n return false;\n };\n BackHandler.addEventListener('hardwareBackPress', onBackPress);\n return () =>\n BackHandler.removeEventListener('hardwareBackPress', onBackPress);\n }, [])\n );\n\n // useLayoutEffect(() => {\n // props.navigation.setOptions({\n // title: 'Payment Complete',\n // headerShown: false,\n // });\n // }, [props.navigation, props.title]);\n\n useEffect(() => {\n if (props.success) {\n // setTimeout(() => {\n sendOutput();\n // }, 3000);\n }\n }, [props.success]);\n\n const sendOutput = () => {\n setTimeout(async () => {\n const previousSelectedModes = await getSharedPrefPaymentSelection(\n props.refId,\n storage\n );\n let etOutput: CollectPaymentOutput = {\n paymentMode: props.paymentMode,\n collectedAmount: props.collectedAmount,\n refId: props.refId,\n ...(await getBaseETResponse(\n EntityCode.COLLECT_PAYMENT_ET,\n props.success,\n getEventCodeByET(\n ExecutionTaskID.COLLECT_PAYMENT_ET,\n props.success,\n props.applicableReasons?.success\n ),\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.COLLECT_PAYMENT_ET\n )),\n };\n if (previousSelectedModes) {\n etOutput.paymentMeta = {\n previousSelectedModes,\n };\n }\n if (props.success) {\n setShowModal(false);\n }\n setDisableProceed(true);\n props.onSubmitET(etOutput);\n storage.removeSharedItem(PAYMENT_SELECTION_SHARED_PREF_KEY + props.refId);\n }, paymentConfigContext?.sdkConfig?.paymentSuccessTimeout || PAYMENT_SUCCESS_DEFAULT_TIMEOUT);\n };\n\n return (\n <Provider>\n <Portal>\n <View style={DeliverPickupStyles.mainContainer}>\n <Modal\n dismissable={false}\n visible={showModal}\n contentContainerStyle={DeliverPickupStyles.modalContent}\n >\n <View style={DeliverPickupStyles.modalView}>\n {props.success ? (\n <View\n style={{\n justifyContent: 'center',\n alignItems: 'center',\n paddingVertical: 30,\n }}\n >\n <SuccessCompleteIcon />\n <Text style={[CommonStyles.titleText, { marginTop: 20 }]}>\n Payment Received!\n </Text>\n </View>\n ) : (\n <>\n <View\n style={{\n justifyContent: 'center',\n alignItems: 'center',\n paddingVertical: 30,\n }}\n >\n <FailureCloseIcon />\n <Text style={[CommonStyles.titleText, { marginTop: 20 }]}>\n Payment Failed!\n </Text>\n </View>\n <Button\n disabled={disableProceed}\n mode={'contained'}\n uppercase={false}\n labelStyle={CommonStyles.nextButtonLabel}\n style={[\n CommonStyles.nextButton,\n {\n marginTop: 20,\n },\n ]}\n onPress={async () => {\n let etOutput: CollectPaymentOutput & {\n screen: PAYMENT_SCREEN;\n contactDetails?: string;\n sourceScreen: PAYMENT_SCREEN;\n } = {\n paymentMode: props.paymentMode,\n collectedAmount: props.collectedAmount,\n refId: props.refId,\n screen: PAYMENT_SCREEN.INIT,\n sourceScreen: PAYMENT_SCREEN.COMPLETE,\n ...(await getBaseETResponse(\n EntityCode.COLLECT_PAYMENT_ET,\n false,\n getEventCodeByET(\n ExecutionTaskID.COLLECT_PAYMENT_ET,\n false,\n props.applicableReasons?.failure\n ),\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.COLLECT_PAYMENT_ET\n )),\n };\n storage.removeSharedItem(\n PAYMENT_SELECTION_SHARED_PREF_KEY + props.refId\n );\n setDisableProceed(true);\n props.next(etOutput);\n }}\n >\n Try again\n </Button>\n <Button\n labelStyle={[\n CommonStyles.cancelButtonLabel,\n { color: '#3D445C' },\n ]}\n style={[CommonStyles.cancelButton, { marginTop: 10 }]}\n mode={'outlined'}\n onPress={async () => {\n const previousSelectedModes =\n await getSharedPrefPaymentSelection(\n props.refId,\n storage\n );\n let etOutput: CollectPaymentOutput = {\n paymentMode: props.paymentMode,\n collectedAmount: props.collectedAmount,\n refId: props.refId,\n ...(await getBaseETResponse(\n EntityCode.COLLECT_PAYMENT_ET,\n false,\n getEventCodeByET(\n ExecutionTaskID.COLLECT_PAYMENT_ET,\n false,\n props.applicableReasons?.failure\n ),\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.COLLECT_PAYMENT_ET\n )),\n };\n if (previousSelectedModes) {\n etOutput.paymentMeta = {\n previousSelectedModes,\n };\n }\n setDisableProceed(true);\n props.onSubmitET(etOutput);\n storage.removeSharedItem(\n PAYMENT_SELECTION_SHARED_PREF_KEY + props.refId\n );\n }}\n >\n Cancel\n </Button>\n </>\n )}\n </View>\n </Modal>\n </View>\n </Portal>\n </Provider>\n );\n};\nexport default CompletePayment;\n\nconst styles = StyleSheet.create({\n title: {\n fontSize: 18,\n fontStyle: 'normal',\n fontWeight: '600',\n lineHeight: 28,\n textAlign: 'center',\n color: '#111111',\n fontFamily: Platform.OS === 'android'\n ? Fonts.IBMPlexSans_600SemiBold\n : 'IBMPlexSans-SemiBold',\n },\n message1: {\n fontStyle: 'normal',\n fontWeight: 'normal',\n fontSize: 12,\n lineHeight: 20,\n textAlign: 'center',\n color: '#111111',\n marginTop: 12,\n fontFamily: Platform.OS === 'android'\n ? Fonts.IBMPlexSans_400Regular\n : 'IBMPlexSans-Regular',\n },\n});\n"],"mappings":"AAAA;AACA;AACA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,eAAe,EAAEC,SAAS,EAAEC,UAAU,QAAQ,OAAO;AAC/E,SAASC,iBAAiB,QAAQ,iCAAiC;AACnE,SAASC,gB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ACA,CAAC;AAEf,CAAC;AACD,eAAepB,eAAe;AAE9B,MAAMgE,MAAM,GAAGjF,UAAU,CAACkF,MAAM,CAAC;EAC/BC,KAAK,EAAE;IACLC,QAAQ,EAAE,EAAE;IACZC,SAAS,EAAE,QAAQ;IACnBC,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAE,EAAE;IACdC,SAAS,EAAE,QAAQ;IACnBV,KAAK,EAAE,SAAS;IAChBW,UAAU,EAAE1F,QAAQ,CAAC2F,EAAE,KAAK,SAAS,GACnCtF,KAAK,CAACuF,uBAAuB,GAC7B;EACJ,CAAC;EACDC,QAAQ,EAAE;IACRP,SAAS,EAAE,QAAQ;IACnBC,UAAU,EAAE,QAAQ;IACpBF,QAAQ,EAAE,EAAE;IACZG,UAAU,EAAE,EAAE;IACdC,SAAS,EAAE,QAAQ;IACnBV,KAAK,EAAE,SAAS;IAChBjB,SAAS,EAAE,EAAE;IACb4B,UAAU,EAAE1F,QAAQ,CAAC2F,EAAE,KAAK,SAAS,GACnCtF,KAAK,CAACyF,sBAAsB,GAC5B;EACJ;AACF,CAAC,CAAC","ignoreList":[]}
|
package/lib/module/components/executiontasks/collectPayment/components/CustomContactsModal.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["CustomContactsModal.tsx"],"sourcesContent":[""],"mappings":"","ignoreList":[]}
|