@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
package/lib/commonjs/components/executiontasks/collectPayment/components/PaymentContactDetails.js
ADDED
|
@@ -0,0 +1,538 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _PaymentUtils = require("../PaymentUtils");
|
|
10
|
+
var _ExecTaskUtils = require("../../../../utils/ExecTaskUtils");
|
|
11
|
+
var _ETConfig = require("../../../../models/execTasks/ETConfig");
|
|
12
|
+
var _EventCodeContainer = require("../../../../manager/dispatchCodes/EventCodeContainer");
|
|
13
|
+
var _CommonStyles = require("../../../../styles/executionTasks/CommonStyles");
|
|
14
|
+
var _reactNativePaper = require("react-native-paper");
|
|
15
|
+
var _MaterialIcons = _interopRequireDefault(require("react-native-vector-icons/MaterialIcons"));
|
|
16
|
+
var _constants = require("../../../../constants/constants");
|
|
17
|
+
var _events = _interopRequireDefault(require("../../../../events"));
|
|
18
|
+
var _CollectPaymentSchema = require("../CollectPaymentSchema");
|
|
19
|
+
var _native = require("@react-navigation/native");
|
|
20
|
+
var _RouteParams = require("../../../../ui/uiConfig/RouteParams");
|
|
21
|
+
var _platformCoreosExecutionEngineSdk = require("@os1-platform/platform-coreos-execution-engine-sdk");
|
|
22
|
+
var _callbacksHandler = _interopRequireDefault(require("../../../../manager/sdk/callbacksHandler"));
|
|
23
|
+
var _ModalWidget = _interopRequireDefault(require("../../../../components/widgets/ModalWidget"));
|
|
24
|
+
var _storage = _interopRequireDefault(require("../../../../utils/storage"));
|
|
25
|
+
var _paymentContext = require("../../../../utils/context/paymentContext");
|
|
26
|
+
var _apiConstants = require("../../../../constants/apiConstants");
|
|
27
|
+
var _Constants = require("../../../../utils/Constants");
|
|
28
|
+
var _Logger = _interopRequireWildcard(require("../../../../utils/Logger"));
|
|
29
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
30
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
31
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
32
|
+
let storage = _storage.default.getInstance();
|
|
33
|
+
const PaymentContactDetails = props => {
|
|
34
|
+
var _props$route$params$R, _props$onsiteLinkShar;
|
|
35
|
+
const paymentConfigContext = (0, _react.useContext)(_paymentContext.PaymentContext);
|
|
36
|
+
const [selectedContact, setSelectedContact] = (0, _react.useState)('');
|
|
37
|
+
const [displayContactModal, setDisplayContactModal] = (0, _react.useState)(false);
|
|
38
|
+
const [manualContactDetails, setManualContactDetails] = (0, _react.useState)();
|
|
39
|
+
const [displayError, setErrorDisplay] = (0, _react.useState)(false);
|
|
40
|
+
const [manualContact, setManualContact] = (0, _react.useState)('');
|
|
41
|
+
const [contactList, setContactList] = (0, _react.useState)([]);
|
|
42
|
+
const paymentRefId = (_props$route$params$R = props.route.params[_RouteParams.RouteParams.ROOT_META_DATA].paymentConfig) === null || _props$route$params$R === void 0 ? void 0 : _props$route$params$R.paymentRefId;
|
|
43
|
+
(0, _react.useEffect)(() => {
|
|
44
|
+
(async () => {
|
|
45
|
+
if (props.route.params[_RouteParams.RouteParams.ROOT_META_DATA]) {
|
|
46
|
+
var _phoneNumbers$value;
|
|
47
|
+
//Call objectiveDetails fn and fetch sds ids
|
|
48
|
+
let progressGroup = null;
|
|
49
|
+
try {
|
|
50
|
+
progressGroup = await _storage.default.getInstance().getSharedItem(_Constants.PROGRESS_GROUP, false);
|
|
51
|
+
} catch (error) {
|
|
52
|
+
var _error$response;
|
|
53
|
+
_Logger.default.getInstance().logEvent('~ getPaymentStatus triggered ', JSON.stringify((error === null || error === void 0 || (_error$response = error.response) === null || _error$response === void 0 ? void 0 : _error$response.data) || error), _Logger.LOG_TYPE.SDK_ERROR);
|
|
54
|
+
progressGroup = null;
|
|
55
|
+
}
|
|
56
|
+
const {
|
|
57
|
+
contact
|
|
58
|
+
} = await _platformCoreosExecutionEngineSdk.DispatchExecutor.getObjectiveTaskDetails(props.mergedObjectiveId[0], progressGroup, props.route.params[_RouteParams.RouteParams.ROOT_META_DATA].statusFilter);
|
|
59
|
+
|
|
60
|
+
// run callback to get corresponding phone numbers
|
|
61
|
+
const phoneNumbers = await _callbacksHandler.default.getPhoneNumbers(contact);
|
|
62
|
+
if (phoneNumbers && (_phoneNumbers$value = phoneNumbers.value) !== null && _phoneNumbers$value !== void 0 && _phoneNumbers$value.length) {
|
|
63
|
+
setContactList(phoneNumbers.value);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
})();
|
|
67
|
+
_events.default.on(_constants.PAYMENT_NOTIFICATION, async data => {
|
|
68
|
+
console.log("PaymentCollectDetail:", JSON.stringify(data));
|
|
69
|
+
let sharedPrefPaymentData = null;
|
|
70
|
+
if (data && (data.status === _CollectPaymentSchema.STATUS.SUCCESS || data.status === _CollectPaymentSchema.STATUS.FAILED)) {
|
|
71
|
+
sharedPrefPaymentData = await (0, _PaymentUtils.getPaymentDataMO)(props.mergedObjectiveId, data.refId, storage);
|
|
72
|
+
}
|
|
73
|
+
if (sharedPrefPaymentData && data && data.status === _CollectPaymentSchema.STATUS.SUCCESS) {
|
|
74
|
+
var _sharedPrefPaymentDat, _sharedPrefPaymentDat2, _sharedPrefPaymentDat3, _paymentConfigContext, _props$applicableReas;
|
|
75
|
+
props.next({
|
|
76
|
+
paymentMode: ((_sharedPrefPaymentDat = sharedPrefPaymentData) === null || _sharedPrefPaymentDat === void 0 ? void 0 : _sharedPrefPaymentDat.paymentMode) || props.paymentMode,
|
|
77
|
+
collectedAmount: {
|
|
78
|
+
value: ((_sharedPrefPaymentDat2 = sharedPrefPaymentData) === null || _sharedPrefPaymentDat2 === void 0 ? void 0 : _sharedPrefPaymentDat2.amount.value) || props.expectedAmount,
|
|
79
|
+
currencyCode: ((_sharedPrefPaymentDat3 = sharedPrefPaymentData) === null || _sharedPrefPaymentDat3 === void 0 ? void 0 : _sharedPrefPaymentDat3.amount.currencyCode) || (paymentConfigContext === null || paymentConfigContext === void 0 || (_paymentConfigContext = paymentConfigContext.sdkConfig) === null || _paymentConfigContext === void 0 || (_paymentConfigContext = _paymentConfigContext.etConfig) === null || _paymentConfigContext === void 0 ? void 0 : _paymentConfigContext.currencyCode) || ''
|
|
80
|
+
},
|
|
81
|
+
refId: data.refId,
|
|
82
|
+
screen: _CollectPaymentSchema.PAYMENT_SCREEN.COMPLETE,
|
|
83
|
+
sourceScreen: _CollectPaymentSchema.PAYMENT_SCREEN.CONTACTS,
|
|
84
|
+
...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.COLLECT_PAYMENT_ET, true, (0, _EventCodeContainer.getEventCodeByET)(_ETConfig.ExecutionTaskID.COLLECT_PAYMENT_ET, true, (_props$applicableReas = props.applicableReasons) === null || _props$applicableReas === void 0 ? void 0 : _props$applicableReas.success), '', props.mergedObjectiveId, _ETConfig.ExecutionTaskID.COLLECT_PAYMENT_ET))
|
|
85
|
+
});
|
|
86
|
+
} else if (sharedPrefPaymentData && data && data.status === _CollectPaymentSchema.STATUS.FAILED) {
|
|
87
|
+
/* const _sharedPrefPaymentData = JSON.parse(
|
|
88
|
+
JSON.stringify(sharedPrefPaymentData)
|
|
89
|
+
); */
|
|
90
|
+
/* await storage.removeSharedItems(
|
|
91
|
+
props.mergedObjectiveId.map((_id) => PAYMENT_SHARED_PREF_KEY + _id)
|
|
92
|
+
); */
|
|
93
|
+
await (0, _PaymentUtils.removeSharedPrefPaymentData)(data.refId, storage);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
return () => _events.default.remove(_constants.PAYMENT_NOTIFICATION);
|
|
97
|
+
}, []);
|
|
98
|
+
const handleOnCancelClick = async () => {
|
|
99
|
+
var _props$applicableReas2, _paymentConfigContext2;
|
|
100
|
+
props.onSubmitET({
|
|
101
|
+
paymentMode: props.paymentMode,
|
|
102
|
+
refId: paymentRefId,
|
|
103
|
+
...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.COLLECT_PAYMENT_ET, false, (0, _EventCodeContainer.getEventCodeByET)(_ETConfig.ExecutionTaskID.COLLECT_PAYMENT_ET, false, (_props$applicableReas2 = props.applicableReasons) === null || _props$applicableReas2 === void 0 ? void 0 : _props$applicableReas2.failure), '', props.mergedObjectiveId, _ETConfig.ExecutionTaskID.COLLECT_PAYMENT_ET)),
|
|
104
|
+
collectedAmount: {
|
|
105
|
+
value: props.expectedAmount,
|
|
106
|
+
currencyCode: (paymentConfigContext === null || paymentConfigContext === void 0 || (_paymentConfigContext2 = paymentConfigContext.sdkConfig) === null || _paymentConfigContext2 === void 0 || (_paymentConfigContext2 = _paymentConfigContext2.etConfig) === null || _paymentConfigContext2 === void 0 ? void 0 : _paymentConfigContext2.currencyCode) || ''
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
const getPaymentStatus = async isProceed => {
|
|
111
|
+
try {
|
|
112
|
+
var _ps$data$transactions, _ps$data$meta, _ps$data$meta2, _ps$data$transactions2;
|
|
113
|
+
let sharedPrefPaymentData = null;
|
|
114
|
+
const paymentResp = await (paymentConfigContext === null || paymentConfigContext === void 0 ? void 0 : paymentConfigContext.networkInstance.requestGet(_apiConstants.ENDPOINTS.PAYMENT_STATUS + paymentRefId, {
|
|
115
|
+
requestId: 'payment:' + paymentRefId
|
|
116
|
+
}, {
|
|
117
|
+
appAbbr: paymentConfigContext.sdkConfig.etConfig.appAbbr,
|
|
118
|
+
latest: true
|
|
119
|
+
}));
|
|
120
|
+
// const paymentResp = {
|
|
121
|
+
// data: {
|
|
122
|
+
// data: {
|
|
123
|
+
// meta: { totalCount: 1 },
|
|
124
|
+
// transactions: [
|
|
125
|
+
// {
|
|
126
|
+
// refId: paymentRefId,
|
|
127
|
+
// status: STATUS.FAILED,
|
|
128
|
+
// subStatus: SUB_STATUS.completed,
|
|
129
|
+
// money: {
|
|
130
|
+
// amount: 1000,
|
|
131
|
+
// currency: 'INR',
|
|
132
|
+
// },
|
|
133
|
+
// txnId: '123',
|
|
134
|
+
// txnType: TRANSACTION_TYPE.LINK,
|
|
135
|
+
// appAbbr: 'testApp31',
|
|
136
|
+
// },
|
|
137
|
+
// ],
|
|
138
|
+
// },
|
|
139
|
+
// },
|
|
140
|
+
// };
|
|
141
|
+
const _ps = paymentResp === null || paymentResp === void 0 ? void 0 : paymentResp.data;
|
|
142
|
+
console.log('Contact getPaymentStatus _ps: ', JSON.stringify(_ps));
|
|
143
|
+
sharedPrefPaymentData = await (0, _PaymentUtils.getPaymentDataMO)(props.mergedObjectiveId, paymentRefId, storage);
|
|
144
|
+
if (_ps !== null && _ps !== void 0 && (_ps$data$transactions = _ps.data.transactions) !== null && _ps$data$transactions !== void 0 && _ps$data$transactions.length && (sharedPrefPaymentData || (0, _PaymentUtils.getPaymentType)(_ps === null || _ps === void 0 ? void 0 : _ps.data.transactions[0].txnType)) && (_ps$data$meta = _ps.data.meta) !== null && _ps$data$meta !== void 0 && _ps$data$meta.totalCount && (_ps === null || _ps === void 0 ? void 0 : _ps.data.transactions[0].status) === _CollectPaymentSchema.STATUS.SUCCESS) {
|
|
145
|
+
var _sharedPrefPaymentDat4, _sharedPrefPaymentDat5, _sharedPrefPaymentDat6, _paymentConfigContext3, _props$applicableReas3;
|
|
146
|
+
props.next({
|
|
147
|
+
paymentMode: ((_sharedPrefPaymentDat4 = sharedPrefPaymentData) === null || _sharedPrefPaymentDat4 === void 0 ? void 0 : _sharedPrefPaymentDat4.paymentMode) || (0, _PaymentUtils.getPaymentType)(_ps === null || _ps === void 0 ? void 0 : _ps.data.transactions[0].txnType) || props.paymentMode,
|
|
148
|
+
collectedAmount: {
|
|
149
|
+
value: ((_sharedPrefPaymentDat5 = sharedPrefPaymentData) === null || _sharedPrefPaymentDat5 === void 0 ? void 0 : _sharedPrefPaymentDat5.amount.value) || (_ps === null || _ps === void 0 ? void 0 : _ps.data.transactions[0].money.amount) || props.expectedAmount,
|
|
150
|
+
currencyCode: ((_sharedPrefPaymentDat6 = sharedPrefPaymentData) === null || _sharedPrefPaymentDat6 === void 0 ? void 0 : _sharedPrefPaymentDat6.amount.currencyCode) || (_ps === null || _ps === void 0 ? void 0 : _ps.data.transactions[0].money.currency) || (paymentConfigContext === null || paymentConfigContext === void 0 || (_paymentConfigContext3 = paymentConfigContext.sdkConfig) === null || _paymentConfigContext3 === void 0 || (_paymentConfigContext3 = _paymentConfigContext3.etConfig) === null || _paymentConfigContext3 === void 0 ? void 0 : _paymentConfigContext3.currencyCode) || ''
|
|
151
|
+
},
|
|
152
|
+
refId: _ps.data.transactions[0].refId,
|
|
153
|
+
screen: _CollectPaymentSchema.PAYMENT_SCREEN.COMPLETE,
|
|
154
|
+
sourceScreen: _CollectPaymentSchema.PAYMENT_SCREEN.CONTACTS,
|
|
155
|
+
...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.COLLECT_PAYMENT_ET, true, (0, _EventCodeContainer.getEventCodeByET)(_ETConfig.ExecutionTaskID.COLLECT_PAYMENT_ET, true, (_props$applicableReas3 = props.applicableReasons) === null || _props$applicableReas3 === void 0 ? void 0 : _props$applicableReas3.success), '', props.mergedObjectiveId, _ETConfig.ExecutionTaskID.COLLECT_PAYMENT_ET))
|
|
156
|
+
});
|
|
157
|
+
return;
|
|
158
|
+
} else if (sharedPrefPaymentData && (_ps$data$meta2 = _ps.data.meta) !== null && _ps$data$meta2 !== void 0 && _ps$data$meta2.totalCount && _ps !== null && _ps !== void 0 && (_ps$data$transactions2 = _ps.data.transactions) !== null && _ps$data$transactions2 !== void 0 && _ps$data$transactions2.length && (_ps === null || _ps === void 0 ? void 0 : _ps.data.transactions[0].status) === _CollectPaymentSchema.STATUS.FAILED) {
|
|
159
|
+
await (0, _PaymentUtils.removeSharedPrefPaymentData)(paymentRefId, storage);
|
|
160
|
+
}
|
|
161
|
+
if (isProceed) await sendPaymentLink(selectedContact);else if (isProceed === false) await handleOnCancelClick();
|
|
162
|
+
} catch (err) {
|
|
163
|
+
var _err$response, _err$response2;
|
|
164
|
+
_Logger.default.getInstance().logEvent('~ getPaymentStatus triggered ', JSON.stringify((err === null || err === void 0 || (_err$response = err.response) === null || _err$response === void 0 ? void 0 : _err$response.data) || err), _Logger.LOG_TYPE.SDK_ERROR);
|
|
165
|
+
console.error('STATUS: ', (err === null || err === void 0 || (_err$response2 = err.response) === null || _err$response2 === void 0 ? void 0 : _err$response2.data) || err.message);
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
// Handle back-button click
|
|
170
|
+
(0, _native.useFocusEffect)(_react.default.useCallback(() => {
|
|
171
|
+
const onBackPress = () => {
|
|
172
|
+
(async (_props$applicableReas4, _paymentConfigContext4) => props.next({
|
|
173
|
+
paymentMode: props.paymentMode,
|
|
174
|
+
refId: paymentRefId,
|
|
175
|
+
...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.COLLECT_PAYMENT_ET, true, (0, _EventCodeContainer.getEventCodeByET)(_ETConfig.ExecutionTaskID.COLLECT_PAYMENT_ET, true, (_props$applicableReas4 = props.applicableReasons) === null || _props$applicableReas4 === void 0 ? void 0 : _props$applicableReas4.success), '', props.mergedObjectiveId, _ETConfig.ExecutionTaskID.COLLECT_PAYMENT_ET)),
|
|
176
|
+
screen: _CollectPaymentSchema.PAYMENT_SCREEN.INIT,
|
|
177
|
+
sourceScreen: _CollectPaymentSchema.PAYMENT_SCREEN.CONTACTS,
|
|
178
|
+
collectedAmount: {
|
|
179
|
+
value: props.expectedAmount,
|
|
180
|
+
currencyCode: (paymentConfigContext === null || paymentConfigContext === void 0 || (_paymentConfigContext4 = paymentConfigContext.sdkConfig) === null || _paymentConfigContext4 === void 0 || (_paymentConfigContext4 = _paymentConfigContext4.etConfig) === null || _paymentConfigContext4 === void 0 ? void 0 : _paymentConfigContext4.currencyCode) || ''
|
|
181
|
+
}
|
|
182
|
+
}))();
|
|
183
|
+
return true;
|
|
184
|
+
};
|
|
185
|
+
_reactNative.BackHandler.addEventListener('hardwareBackPress', onBackPress);
|
|
186
|
+
return () => _reactNative.BackHandler.removeEventListener('hardwareBackPress', onBackPress);
|
|
187
|
+
}, []));
|
|
188
|
+
(0, _react.useLayoutEffect)(() => {
|
|
189
|
+
props.navigation.setOptions({
|
|
190
|
+
headerShown: true,
|
|
191
|
+
title: 'Payment Link',
|
|
192
|
+
headerLeft: () => {
|
|
193
|
+
return /*#__PURE__*/_react.default.createElement(_MaterialIcons.default, {
|
|
194
|
+
onPress: async () => {
|
|
195
|
+
var _props$applicableReas5, _paymentConfigContext5;
|
|
196
|
+
props.next({
|
|
197
|
+
paymentMode: props.paymentMode,
|
|
198
|
+
refId: paymentRefId,
|
|
199
|
+
...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.COLLECT_PAYMENT_ET, true, (0, _EventCodeContainer.getEventCodeByET)(_ETConfig.ExecutionTaskID.COLLECT_PAYMENT_ET, true, (_props$applicableReas5 = props.applicableReasons) === null || _props$applicableReas5 === void 0 ? void 0 : _props$applicableReas5.success), '', props.mergedObjectiveId, _ETConfig.ExecutionTaskID.COLLECT_PAYMENT_ET)),
|
|
200
|
+
screen: _CollectPaymentSchema.PAYMENT_SCREEN.INIT,
|
|
201
|
+
sourceScreen: _CollectPaymentSchema.PAYMENT_SCREEN.CONTACTS,
|
|
202
|
+
collectedAmount: {
|
|
203
|
+
value: props.expectedAmount,
|
|
204
|
+
currencyCode: (paymentConfigContext === null || paymentConfigContext === void 0 || (_paymentConfigContext5 = paymentConfigContext.sdkConfig) === null || _paymentConfigContext5 === void 0 || (_paymentConfigContext5 = _paymentConfigContext5.etConfig) === null || _paymentConfigContext5 === void 0 ? void 0 : _paymentConfigContext5.currencyCode) || ''
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
},
|
|
208
|
+
name: "arrow-back",
|
|
209
|
+
color: 'black',
|
|
210
|
+
size: 25,
|
|
211
|
+
style: {
|
|
212
|
+
paddingRight: 15,
|
|
213
|
+
paddingTop: 5
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
}, [props.navigation, props.title]);
|
|
219
|
+
const renderItem = ({
|
|
220
|
+
item
|
|
221
|
+
}) => {
|
|
222
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
223
|
+
style: styles.reasonItemStyle
|
|
224
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNativePaper.RadioButton, {
|
|
225
|
+
color: '#5B80F7',
|
|
226
|
+
value: item,
|
|
227
|
+
status: selectedContact === item ? 'checked' : 'unchecked',
|
|
228
|
+
onPress: () => {
|
|
229
|
+
setSelectedContact(item);
|
|
230
|
+
}
|
|
231
|
+
}), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
232
|
+
style: [styles.reasonTextStyle, {
|
|
233
|
+
fontWeight: 'bold'
|
|
234
|
+
}],
|
|
235
|
+
onPress: () => {
|
|
236
|
+
setSelectedContact(item);
|
|
237
|
+
}
|
|
238
|
+
}, (0, _ExecTaskUtils.maskContact)(item)));
|
|
239
|
+
};
|
|
240
|
+
const inputValidation = (data, _regex) => {
|
|
241
|
+
if (_regex) {
|
|
242
|
+
const regex = new RegExp(_regex);
|
|
243
|
+
return regex.test(data);
|
|
244
|
+
}
|
|
245
|
+
return false;
|
|
246
|
+
};
|
|
247
|
+
const sendPaymentLink = async contactDetails => {
|
|
248
|
+
var _props$applicableReas6, _paymentConfigContext6;
|
|
249
|
+
props.next({
|
|
250
|
+
paymentMode: props.paymentMode,
|
|
251
|
+
refId: paymentRefId,
|
|
252
|
+
...(await (0, _ExecTaskUtils.getBaseETResponse)(_ETConfig.EntityCode.COLLECT_PAYMENT_ET, true, (0, _EventCodeContainer.getEventCodeByET)(_ETConfig.ExecutionTaskID.COLLECT_PAYMENT_ET, true, (_props$applicableReas6 = props.applicableReasons) === null || _props$applicableReas6 === void 0 ? void 0 : _props$applicableReas6.success), '', props.mergedObjectiveId, _ETConfig.ExecutionTaskID.COLLECT_PAYMENT_ET)),
|
|
253
|
+
screen: _CollectPaymentSchema.PAYMENT_SCREEN.PROCESS,
|
|
254
|
+
sourceScreen: _CollectPaymentSchema.PAYMENT_SCREEN.CONTACTS,
|
|
255
|
+
collectedAmount: {
|
|
256
|
+
value: props.expectedAmount,
|
|
257
|
+
currencyCode: (paymentConfigContext === null || paymentConfigContext === void 0 || (_paymentConfigContext6 = paymentConfigContext.sdkConfig) === null || _paymentConfigContext6 === void 0 || (_paymentConfigContext6 = _paymentConfigContext6.etConfig) === null || _paymentConfigContext6 === void 0 ? void 0 : _paymentConfigContext6.currencyCode) || ''
|
|
258
|
+
},
|
|
259
|
+
contactDetails
|
|
260
|
+
});
|
|
261
|
+
};
|
|
262
|
+
const onModalSubmit = () => {
|
|
263
|
+
var _paymentConfigContext7;
|
|
264
|
+
const regex = (manualContactDetails === null || manualContactDetails === void 0 ? void 0 : manualContactDetails.type) === 'PHONE' ? (paymentConfigContext === null || paymentConfigContext === void 0 || (_paymentConfigContext7 = paymentConfigContext.sdkConfig) === null || _paymentConfigContext7 === void 0 || (_paymentConfigContext7 = _paymentConfigContext7.etConfig) === null || _paymentConfigContext7 === void 0 ? void 0 : _paymentConfigContext7.mobilePhoneRegex) || '' : _constants.EMAIL_REGEX;
|
|
265
|
+
if (inputValidation(manualContact, regex)) {
|
|
266
|
+
setErrorDisplay(false);
|
|
267
|
+
(async _paymentConfigContext8 => {
|
|
268
|
+
const contact = (manualContactDetails === null || manualContactDetails === void 0 ? void 0 : manualContactDetails.type) === 'PHONE' ? (paymentConfigContext === null || paymentConfigContext === void 0 || (_paymentConfigContext8 = paymentConfigContext.sdkConfig) === null || _paymentConfigContext8 === void 0 || (_paymentConfigContext8 = _paymentConfigContext8.etConfig) === null || _paymentConfigContext8 === void 0 ? void 0 : _paymentConfigContext8.phoneCode) + manualContact : manualContact;
|
|
269
|
+
await sendPaymentLink(contact);
|
|
270
|
+
})();
|
|
271
|
+
} else {
|
|
272
|
+
setErrorDisplay(true);
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
const renderManualContactsModal = () => {
|
|
276
|
+
return /*#__PURE__*/_react.default.createElement(_ModalWidget.default, {
|
|
277
|
+
title: {
|
|
278
|
+
label: (manualContactDetails === null || manualContactDetails === void 0 ? void 0 : manualContactDetails.title) || ''
|
|
279
|
+
},
|
|
280
|
+
contentContainerStyle: {
|
|
281
|
+
marginBottom: 120
|
|
282
|
+
},
|
|
283
|
+
showModal: displayContactModal,
|
|
284
|
+
renderChildren: () => {
|
|
285
|
+
var _paymentConfigContext9, _paymentConfigContext10, _paymentConfigContext11;
|
|
286
|
+
return (manualContactDetails === null || manualContactDetails === void 0 ? void 0 : manualContactDetails.type) === 'PHONE' ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
287
|
+
style: {
|
|
288
|
+
marginVertical: 10
|
|
289
|
+
}
|
|
290
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, null, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
291
|
+
style: [styles.inputLabel, {
|
|
292
|
+
marginBottom: 8
|
|
293
|
+
}]
|
|
294
|
+
}, "Phone Number")), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
295
|
+
style: [{
|
|
296
|
+
justifyContent: 'flex-start',
|
|
297
|
+
display: 'flex',
|
|
298
|
+
flexDirection: 'row'
|
|
299
|
+
}]
|
|
300
|
+
}, paymentConfigContext !== null && paymentConfigContext !== void 0 && (_paymentConfigContext9 = paymentConfigContext.sdkConfig) !== null && _paymentConfigContext9 !== void 0 && (_paymentConfigContext9 = _paymentConfigContext9.etConfig) !== null && _paymentConfigContext9 !== void 0 && _paymentConfigContext9.phoneCode ? /*#__PURE__*/_react.default.createElement(_reactNativePaper.TextInput, {
|
|
301
|
+
style: [styles.input, {
|
|
302
|
+
borderTopEndRadius: 0,
|
|
303
|
+
borderBottomEndRadius: 0
|
|
304
|
+
}, displayError ? {
|
|
305
|
+
borderColor: 'red'
|
|
306
|
+
} : {}],
|
|
307
|
+
disabled: true,
|
|
308
|
+
value: '(' + (paymentConfigContext === null || paymentConfigContext === void 0 || (_paymentConfigContext10 = paymentConfigContext.sdkConfig) === null || _paymentConfigContext10 === void 0 || (_paymentConfigContext10 = _paymentConfigContext10.etConfig) === null || _paymentConfigContext10 === void 0 ? void 0 : _paymentConfigContext10.phoneCode) + ')'
|
|
309
|
+
}) : null, /*#__PURE__*/_react.default.createElement(_reactNativePaper.TextInput, {
|
|
310
|
+
style: [styles.input, {
|
|
311
|
+
flexGrow: 1,
|
|
312
|
+
flex: 1
|
|
313
|
+
}, paymentConfigContext !== null && paymentConfigContext !== void 0 && (_paymentConfigContext11 = paymentConfigContext.sdkConfig) !== null && _paymentConfigContext11 !== void 0 && (_paymentConfigContext11 = _paymentConfigContext11.etConfig) !== null && _paymentConfigContext11 !== void 0 && _paymentConfigContext11.phoneCode ? {
|
|
314
|
+
borderLeftWidth: 0,
|
|
315
|
+
borderTopStartRadius: 0,
|
|
316
|
+
borderBottomStartRadius: 0
|
|
317
|
+
} : {}, displayError ? {
|
|
318
|
+
borderColor: 'red'
|
|
319
|
+
} : {}],
|
|
320
|
+
autoFocus: true,
|
|
321
|
+
placeholder: "Add Phone Number",
|
|
322
|
+
onChangeText: setManualContact,
|
|
323
|
+
activeUnderlineColor: "transparent"
|
|
324
|
+
})), displayError ? /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
325
|
+
style: {
|
|
326
|
+
color: 'red'
|
|
327
|
+
}
|
|
328
|
+
}, "Enter valid phone number.") : null) : /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
329
|
+
style: {
|
|
330
|
+
marginVertical: 10
|
|
331
|
+
}
|
|
332
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, null, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
333
|
+
style: [styles.inputLabel, {
|
|
334
|
+
marginBottom: 8
|
|
335
|
+
}]
|
|
336
|
+
}, "Email Address")), /*#__PURE__*/_react.default.createElement(_reactNative.View, null, /*#__PURE__*/_react.default.createElement(_reactNativePaper.TextInput, {
|
|
337
|
+
style: [styles.input, displayError ? {
|
|
338
|
+
borderColor: 'red'
|
|
339
|
+
} : {}],
|
|
340
|
+
autoFocus: true,
|
|
341
|
+
placeholder: "Add Email Address",
|
|
342
|
+
onChangeText: setManualContact,
|
|
343
|
+
activeUnderlineColor: 'transparent'
|
|
344
|
+
})), displayError ? /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
345
|
+
style: {
|
|
346
|
+
color: 'red'
|
|
347
|
+
}
|
|
348
|
+
}, "Enter valid email address.") : null);
|
|
349
|
+
},
|
|
350
|
+
primaryButton: {
|
|
351
|
+
label: 'Send Payment Link',
|
|
352
|
+
onPress: () => {
|
|
353
|
+
onModalSubmit();
|
|
354
|
+
},
|
|
355
|
+
labelStyles: {
|
|
356
|
+
..._CommonStyles.CommonStyles.nextButtonLabel
|
|
357
|
+
},
|
|
358
|
+
styles: {
|
|
359
|
+
..._CommonStyles.CommonStyles.nextButton,
|
|
360
|
+
padding: 8,
|
|
361
|
+
borderRadius: 5,
|
|
362
|
+
marginVertical: 10,
|
|
363
|
+
marginTop: 15
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
secondaryButton: {
|
|
367
|
+
label: 'Cancel',
|
|
368
|
+
onPress: () => {
|
|
369
|
+
setErrorDisplay(false);
|
|
370
|
+
setDisplayContactModal(false);
|
|
371
|
+
},
|
|
372
|
+
labelStyles: {
|
|
373
|
+
..._CommonStyles.CommonStyles.cancelButtonLabel
|
|
374
|
+
},
|
|
375
|
+
styles: {
|
|
376
|
+
..._CommonStyles.CommonStyles.cancelButton,
|
|
377
|
+
padding: 8,
|
|
378
|
+
borderRadius: 5
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
};
|
|
383
|
+
return /*#__PURE__*/_react.default.createElement(_reactNativePaper.Provider, null, renderManualContactsModal(), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
384
|
+
style: _CommonStyles.CommonStyles.mainContainer
|
|
385
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
386
|
+
style: [styles.title, {
|
|
387
|
+
paddingBottom: 0
|
|
388
|
+
}]
|
|
389
|
+
}, "Select or add contact details to send the payment link"), contactList.length ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
390
|
+
style: {
|
|
391
|
+
marginBottom: 16,
|
|
392
|
+
maxHeight: 500
|
|
393
|
+
}
|
|
394
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, {
|
|
395
|
+
data: contactList,
|
|
396
|
+
renderItem: renderItem,
|
|
397
|
+
keyExtractor: item => item
|
|
398
|
+
})) : null, (_props$onsiteLinkShar = props.onsiteLinkSharing) !== null && _props$onsiteLinkShar !== void 0 && _props$onsiteLinkShar.length ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
399
|
+
style: [{
|
|
400
|
+
backgroundColor: 'white',
|
|
401
|
+
padding: 16,
|
|
402
|
+
flexDirection: 'row',
|
|
403
|
+
justifyContent: 'space-evenly'
|
|
404
|
+
}, props.onsiteLinkSharing.includes('Email') && props.onsiteLinkSharing.includes('Phone Number') ? {} : {
|
|
405
|
+
justifyContent: 'flex-start',
|
|
406
|
+
paddingStart: 55
|
|
407
|
+
}]
|
|
408
|
+
}, props.onsiteLinkSharing.includes('Email') ? /*#__PURE__*/_react.default.createElement(_reactNative.View, null, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
409
|
+
style: [styles.link],
|
|
410
|
+
onPress: () => {
|
|
411
|
+
setDisplayContactModal(true);
|
|
412
|
+
setManualContactDetails({
|
|
413
|
+
title: 'Add Email Address',
|
|
414
|
+
type: 'EMAIL'
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
}, "Add Email Address")) : null, props.onsiteLinkSharing.includes('Email') && props.onsiteLinkSharing.includes('Phone Number') ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
418
|
+
style: {
|
|
419
|
+
borderLeftWidth: 1,
|
|
420
|
+
borderColor: '#cccccc'
|
|
421
|
+
}
|
|
422
|
+
}) : null, props.onsiteLinkSharing.includes('Phone Number') ? /*#__PURE__*/_react.default.createElement(_reactNative.View, null, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
423
|
+
style: [styles.link],
|
|
424
|
+
onPress: () => {
|
|
425
|
+
setDisplayContactModal(true);
|
|
426
|
+
setManualContactDetails({
|
|
427
|
+
title: 'Add Phone Number',
|
|
428
|
+
type: 'PHONE'
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
}, "Add Phone Number")) : null) : null, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
432
|
+
style: styles.btnContainer
|
|
433
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
434
|
+
style: styles.buttonParentContainer
|
|
435
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNativePaper.Button, {
|
|
436
|
+
style: [_CommonStyles.CommonStyles.cancelButton, {
|
|
437
|
+
marginEnd: 5,
|
|
438
|
+
flex: 1
|
|
439
|
+
}],
|
|
440
|
+
labelStyle: {
|
|
441
|
+
..._CommonStyles.CommonStyles.cancelButtonLabel,
|
|
442
|
+
color: '#5B80F7',
|
|
443
|
+
textTransform: 'capitalize'
|
|
444
|
+
},
|
|
445
|
+
mode: 'outlined',
|
|
446
|
+
onPress: async () => {
|
|
447
|
+
await getPaymentStatus(false);
|
|
448
|
+
}
|
|
449
|
+
}, "Cancel"), /*#__PURE__*/_react.default.createElement(_reactNativePaper.Button, {
|
|
450
|
+
style: [_CommonStyles.CommonStyles.nextButton, {
|
|
451
|
+
flex: 1,
|
|
452
|
+
marginStart: 5
|
|
453
|
+
}, !selectedContact ? {
|
|
454
|
+
backgroundColor: '#E0E3EB'
|
|
455
|
+
} : {}],
|
|
456
|
+
labelStyle: [_CommonStyles.CommonStyles.nextButtonLabel, {
|
|
457
|
+
textTransform: 'capitalize'
|
|
458
|
+
}, !selectedContact ? {
|
|
459
|
+
color: '#A3AAC2'
|
|
460
|
+
} : {}],
|
|
461
|
+
disabled: !selectedContact,
|
|
462
|
+
mode: 'contained',
|
|
463
|
+
onPress: async () => {
|
|
464
|
+
await getPaymentStatus(true);
|
|
465
|
+
}
|
|
466
|
+
}, "Send Payment Link")))));
|
|
467
|
+
};
|
|
468
|
+
var _default = exports.default = PaymentContactDetails;
|
|
469
|
+
const styles = _reactNative.StyleSheet.create({
|
|
470
|
+
title: {
|
|
471
|
+
fontFamily: _reactNative.Platform.OS === 'android' ? _CommonStyles.Fonts.IBMPlexSans_400Regular : 'IBMPlexSans-Regular',
|
|
472
|
+
fontWeight: '400',
|
|
473
|
+
fontSize: 16,
|
|
474
|
+
lineHeight: 24,
|
|
475
|
+
color: '#3D445C',
|
|
476
|
+
margin: 20
|
|
477
|
+
},
|
|
478
|
+
reasonItemStyle: {
|
|
479
|
+
flexDirection: 'row',
|
|
480
|
+
paddingVertical: 5,
|
|
481
|
+
paddingStart: 20,
|
|
482
|
+
paddingEnd: 20,
|
|
483
|
+
backgroundColor: 'white',
|
|
484
|
+
marginBottom: 5
|
|
485
|
+
},
|
|
486
|
+
reasonTextStyle: {
|
|
487
|
+
flex: 1,
|
|
488
|
+
flexWrap: 'wrap',
|
|
489
|
+
fontFamily: _reactNative.Platform.OS === 'android' ? _CommonStyles.Fonts.IBMPlexSans_400Regular : 'IBMPlexSans-Regular',
|
|
490
|
+
fontStyle: 'normal',
|
|
491
|
+
fontSize: 14,
|
|
492
|
+
lineHeight: 21,
|
|
493
|
+
letterSpacing: 0.25,
|
|
494
|
+
textAlign: 'justify',
|
|
495
|
+
color: '#111111',
|
|
496
|
+
paddingTop: 5
|
|
497
|
+
},
|
|
498
|
+
link: {
|
|
499
|
+
color: '#5B80F7',
|
|
500
|
+
fontSize: 14,
|
|
501
|
+
fontWeight: '500',
|
|
502
|
+
lineHeight: 20
|
|
503
|
+
},
|
|
504
|
+
inputLabel: {
|
|
505
|
+
fontSize: 14,
|
|
506
|
+
lineHeight: 20,
|
|
507
|
+
fontWeight: '500',
|
|
508
|
+
fontFamily: _reactNative.Platform.OS === 'android' ? _CommonStyles.Fonts.IBMPlexSans_500Medium : 'IBMPlexSans-Medium',
|
|
509
|
+
color: '#3D445C'
|
|
510
|
+
},
|
|
511
|
+
input: {
|
|
512
|
+
// flex: 1,
|
|
513
|
+
fontSize: 14,
|
|
514
|
+
lineHeight: 24,
|
|
515
|
+
fontFamily: _reactNative.Platform.OS === 'android' ? _CommonStyles.Fonts.IBMPlexSans_400Regular : 'IBMPlexSans-Regular',
|
|
516
|
+
borderColor: '#E0E3EB',
|
|
517
|
+
borderWidth: 1,
|
|
518
|
+
height: 22,
|
|
519
|
+
borderRadius: 6,
|
|
520
|
+
paddingHorizontal: 13,
|
|
521
|
+
paddingVertical: 9,
|
|
522
|
+
backgroundColor: '#ffffff'
|
|
523
|
+
},
|
|
524
|
+
buttonParentContainer: {
|
|
525
|
+
flexDirection: 'row',
|
|
526
|
+
padding: 10,
|
|
527
|
+
paddingTop: 16,
|
|
528
|
+
backgroundColor: 'white',
|
|
529
|
+
borderTopWidth: 1,
|
|
530
|
+
borderTopColor: '#eeeeee'
|
|
531
|
+
},
|
|
532
|
+
btnContainer: {
|
|
533
|
+
justifyContent: 'flex-end',
|
|
534
|
+
marginBottom: 10,
|
|
535
|
+
flexGrow: 1
|
|
536
|
+
}
|
|
537
|
+
});
|
|
538
|
+
//# sourceMappingURL=PaymentContactDetails.js.map
|