@zeniai/client-epic-state 4.13.15 → 4.13.17
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/lib/commonPayloadTypes/commonPayload.d.ts +7 -0
- package/lib/commonStateTypes/common.d.ts +2 -0
- package/lib/commonStateTypes/common.js +5 -1
- package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.d.ts +1 -0
- package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.js +2 -1
- package/lib/commonStateTypes/timePeriod.d.ts +16 -0
- package/lib/commonStateTypes/timePeriod.js +31 -1
- package/lib/commonStateTypes/viewAndReport/reportIDHelper.d.ts +1 -0
- package/lib/commonStateTypes/viewAndReport/reportIDHelper.js +3 -1
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/chargeCard/chargeCard.d.ts +16 -2
- package/lib/entity/chargeCard/chargeCard.js +18 -1
- package/lib/entity/chargeCard/chargeCardPayload.d.ts +14 -5
- package/lib/entity/chargeCard/chargeCardPayload.js +24 -7
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/company/companyPayload.d.ts +4 -0
- package/lib/entity/company/companyPayload.js +6 -3
- package/lib/entity/company/companyReducer.d.ts +4 -1
- package/lib/entity/company/companyReducer.js +6 -2
- package/lib/entity/company/companyStateTypes.d.ts +5 -1
- package/lib/entity/file/fileState.d.ts +3 -3
- package/lib/entity/file/fileState.js +2 -0
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +7 -1
- package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -2
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +3 -1
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +2 -1
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +3 -1
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +2 -0
- package/lib/entity/jeSchedules/jeSchedulesTypes.js +12 -1
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.d.ts +32 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +60 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksReducer.d.ts +12 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksReducer.js +25 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksSelector.d.ts +7 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksSelector.js +36 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +38 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.js +10 -0
- package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +5 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +12 -2
- package/lib/entity/tenant/clearAllEpic.js +20 -0
- package/lib/entity/tenant/epic/fetchActiveTenantEpic.d.ts +2 -1
- package/lib/entity/tenant/epic/fetchActiveTenantEpic.js +9 -1
- package/lib/entity/tenant/epic/fetchAllTenantsEpic.d.ts +7 -1
- package/lib/entity/tenant/epic/fetchAllTenantsEpic.js +34 -2
- package/lib/entity/tenant/tenantPayload.d.ts +1 -0
- package/lib/entity/tenant/tenantReducer.js +3 -0
- package/lib/entity/tenant/tenantState.d.ts +1 -0
- package/lib/entity/toastNotification/epic/pushToastNotificationEpic.d.ts +1 -1
- package/lib/entity/transaction/payloadTypes/attachmentPayload.d.ts +1 -1
- package/lib/entity/transaction/payloadTypes/attachmentPayload.js +3 -3
- package/lib/entity/transaction/stateTypes/transactionType.d.ts +2 -2
- package/lib/entity/transaction/transactionSelector.d.ts +1 -0
- package/lib/entity/transaction/transactionSelector.js +7 -1
- package/lib/entity/user/userPayload.d.ts +1 -0
- package/lib/entity/user/userReducer.js +9 -8
- package/lib/entity/user/userState.d.ts +1 -0
- package/lib/entity/vendor/__mocks__/vendorStateMocks.d.ts +1 -0
- package/lib/entity/vendor/__mocks__/vendorStateMocks.js +35 -1
- package/lib/entity/vendor/vendorPayload.js +3 -2
- package/lib/entity/vendor/vendorState.d.ts +3 -3
- package/lib/entity/vendor/vendorType.d.ts +0 -2
- package/lib/entity/vendor/vendorType.js +1 -4
- package/lib/entity/vendorExpense/vendorExpenseSelector.d.ts +2 -2
- package/lib/entity/vendorExpense/vendorExpenseSelector.js +1 -0
- package/lib/epic.d.ts +20 -2
- package/lib/epic.js +20 -2
- package/lib/index.d.ts +65 -21
- package/lib/index.js +104 -28
- package/lib/reducer.d.ts +31 -1
- package/lib/reducer.js +31 -1
- package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +7 -1
- package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +7 -1
- package/lib/view/addressView/addressViewState.d.ts +1 -1
- package/lib/view/addressView/toAddressViewLocalData.d.ts +2 -0
- package/lib/view/addressView/toAddressViewLocalData.js +9 -3
- package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
- package/lib/view/cardPayment/epic/addCardPaymentSourceEpic.d.ts +1 -1
- package/lib/view/cardPayment/epic/confirmCardSetupIntentEpic.d.ts +1 -1
- package/lib/view/cardPayment/epic/createCardSetupIntentEpic.d.ts +1 -1
- package/lib/view/cardPayment/epic/fetchPaymentSourcesEpic.d.ts +1 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +1 -1
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.d.ts +2 -2
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.d.ts +10 -5
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.js +10 -7
- package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportTemplatesEpic.js +4 -4
- package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportViewEpic.js +4 -4
- package/lib/view/companyMonthEndReportView/epics/improveUsingZeniGPTEpic.js +5 -3
- package/lib/view/companyMonthEndReportView/epics/saveCompanyMonthEndReportEpic.js +3 -3
- package/lib/view/companyMonthEndReportView/epics/sendCompanyMonthEndReportEpic.js +3 -3
- package/lib/view/companyView/epic/companyPassport/updateCompanyPassportLocalStoreDataEpic.js +1 -6
- package/lib/view/companyView/selectorHelpers/getCompanyView.js +4 -0
- package/lib/view/companyView/types/cockpitTypes.d.ts +2 -2
- package/lib/view/companyView/types/companyPassport/companyUsersLocalData.d.ts +2 -0
- package/lib/view/companyView/types/companyPassport/companyUsersLocalData.js +7 -1
- package/lib/view/companyView/types/companyView.d.ts +1 -0
- package/lib/view/countryList/countryListReducer.d.ts +17 -0
- package/lib/view/countryList/countryListReducer.js +58 -0
- package/lib/view/countryList/countryListSelector.d.ts +7 -0
- package/lib/view/countryList/countryListSelector.js +13 -0
- package/lib/view/countryList/countryListState.d.ts +12 -0
- package/lib/view/countryList/countryListState.js +2 -0
- package/lib/view/countryList/epics/fetchCountryListEpic.d.ts +6 -0
- package/lib/view/countryList/epics/fetchCountryListEpic.js +19 -0
- package/lib/view/countryList/epics/fetchNationalityCountryListEpic.d.ts +7 -0
- package/lib/view/countryList/epics/fetchNationalityCountryListEpic.js +38 -0
- package/lib/view/countryList/payloads/countryListPayload.d.ts +6 -0
- package/lib/view/countryList/payloads/countryListPayload.js +10 -0
- package/lib/view/countryList/payloads/nationalityCountryListPayload.d.ts +11 -0
- package/lib/view/countryList/payloads/nationalityCountryListPayload.js +2 -0
- package/lib/view/dashboard/dashboardEpic.d.ts +2 -1
- package/lib/view/dashboard/dashboardEpic.js +22 -2
- package/lib/view/dashboard/dashboardReducer.d.ts +3 -2
- package/lib/view/dashboard/dashboardReducer.js +2 -1
- package/lib/view/dashboard/dashboardSelector.d.ts +2 -0
- package/lib/view/dashboard/dashboardSelector.js +10 -2
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.d.ts +10 -0
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +73 -0
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.d.ts +11 -0
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +55 -0
- package/lib/view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic.d.ts +11 -0
- package/lib/view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic.js +72 -0
- package/lib/view/expenseAutomationView/epics/fluxAnalysis/reviewFluxAnalysisEpic.d.ts +12 -0
- package/lib/view/expenseAutomationView/epics/fluxAnalysis/reviewFluxAnalysisEpic.js +77 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.d.ts +7 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +22 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +59 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +78 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.d.ts +6 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.js +28 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.d.ts +9 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.js +78 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMissingReceiptsEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMissingReceiptsEpic.js +58 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.d.ts +10 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +12 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewPayload.d.ts +3 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewPayload.js +2 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +17 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +66 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.d.ts +3 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +100 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewState.d.ts +11 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewState.js +14 -0
- package/lib/view/expenseAutomationView/helpers/helpers.d.ts +7 -0
- package/lib/view/expenseAutomationView/helpers/helpers.js +67 -0
- package/lib/view/expenseAutomationView/payload/fluxAnalysisPayload.d.ts +76 -0
- package/lib/view/expenseAutomationView/payload/fluxAnalysisPayload.js +9 -0
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +36 -0
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.js +58 -0
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +16 -0
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +2 -0
- package/lib/view/expenseAutomationView/reducers/fluxAnalysisViewReducer.d.ts +47 -0
- package/lib/view/expenseAutomationView/reducers/fluxAnalysisViewReducer.js +241 -0
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +53 -0
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +245 -0
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +31 -0
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +130 -0
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +5 -0
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +45 -0
- package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +34 -0
- package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.js +44 -0
- package/lib/view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes.d.ts +32 -0
- package/lib/view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes.js +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +28 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.js +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +11 -0
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.js +2 -0
- package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.d.ts +3 -0
- package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +89 -0
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +7 -0
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +95 -0
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.d.ts +3 -0
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +61 -0
- package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.d.ts +54 -0
- package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.js +5 -0
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +31 -0
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +2 -0
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +20 -0
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +13 -0
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +28 -0
- package/lib/view/expenseAutomationView/types/transactionsViewState.js +15 -0
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/monthEndCloseChecksView/epics/fetchMonthEndCloseChecksEpic.d.ts +8 -0
- package/lib/view/monthEndCloseChecksView/epics/fetchMonthEndCloseChecksEpic.js +58 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewPayload.d.ts +3 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewPayload.js +2 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.d.ts +16 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.js +36 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.d.ts +10 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.js +27 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewState.d.ts +5 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewState.js +2 -0
- package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.d.ts +8 -1
- package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.js +3 -1
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +5 -4
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +2 -0
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +6 -3
- package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
- package/lib/view/people/deletePersonEpic.d.ts +1 -1
- package/lib/view/people/invitePeopleEpic.d.ts +1 -1
- package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
- package/lib/view/people/resendInviteEpic.d.ts +1 -1
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
- package/lib/view/scheduleView/scheduleAccruedDetailView/LinkBillExpenseView/linkBillExpense.d.ts +1 -1
- package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsEpic.js +3 -2
- package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsPageEpic.js +1 -1
- package/lib/view/scheduleView/scheduleDetailView/epics/saveScheduleDetailsEpic.js +2 -2
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailLocalDataHelper.js +19 -5
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.d.ts +8 -3
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.js +39 -57
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.d.ts +13 -8
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.js +19 -12
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.d.ts +1 -0
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.js +4 -3
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailState.d.ts +2 -0
- package/lib/view/scheduleView/scheduleListView/scheduleListSelector.js +1 -1
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
- package/lib/view/settingsView/epic/updateMyProfileEpic.js +6 -4
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +1 -4
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +2 -0
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +3 -0
- package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.js +2 -2
- package/lib/view/spendManagement/billPay/internationalWire/internationalWireSelector.d.ts +2 -1
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.d.ts +7 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +36 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.d.ts +6 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +42 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.d.ts +9 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.js +67 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.d.ts +26 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.js +22 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.d.ts +22 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +89 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.d.ts +15 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +30 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.d.ts +20 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.js +2 -0
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer.d.ts +3 -1
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer.js +6 -2
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.d.ts +2 -3
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.js +3 -3
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingState.d.ts +1 -3
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/initializeCardUserOnboardingLocalDataEpic.d.ts +1 -2
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/initializeCardUserOnboardingLocalDataEpic.js +1 -21
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/saveCardOnboardingUserDetailsEpic.js +1 -3
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +1 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.js +4 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +8 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +25 -2
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.d.ts +1 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.js +8 -4
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +2 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/updatePhysicalChargeCardAttemptEpic.d.ts +11 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/updatePhysicalChargeCardAttemptEpic.js +42 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -14
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +2 -13
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +3 -6
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +2 -17
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +8 -2
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +55 -15
- package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.js +44 -0
- package/lib/view/spendManagement/chargeCards/{chargeCardList → issueChargeCard}/issueChargeCardEpic.d.ts +3 -2
- package/lib/view/spendManagement/chargeCards/{chargeCardList → issueChargeCard}/issueChargeCardEpic.js +35 -18
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +15 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +65 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +22 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +77 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +28 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.js +23 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.d.ts +1 -1
- package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +31 -6
- package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.d.ts +2 -2
- package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js +5 -2
- package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +4 -1
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +6 -2
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +1 -0
- package/lib/view/spendManagement/commonSetup/types/businessVerification.d.ts +4 -0
- package/lib/view/spendManagement/reimbursement/editRemiView/epics/parseReceiptsToRemiEpic.js +2 -2
- package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +1 -1
- package/lib/view/tagView/epics/createTagEpic.d.ts +1 -1
- package/lib/view/tagView/epics/deleteTagEpic.d.ts +1 -1
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/view/transactionDetail/epics/uploadMissingReceiptSuccessEpic.js +2 -2
- package/lib/view/transactionDetail/transactionDetailState.d.ts +2 -2
- package/lib/view/userListView/fetchUserListByTypeEpic.js +4 -1
- package/lib/view/vendorFiling1099/__mock__/vendorFiling1099ListMock.js +1 -1
- package/lib/view/vendorFiling1099/__mock__/vendorFiling1099ListSelectorMock.js +1 -1
- package/lib/view/vendorReviewView/common/state/commonTypes.d.ts +1 -1
- package/lib/view/vendorReviewView/vendorFirstReviewView/epics/saveVendorFirstReviewViewEpic.js +34 -3
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.d.ts +1 -1
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +2 -2
- package/lib/view/zeniAccStatementList/zeniAccStatementList.d.ts +2 -5
- package/package.json +2 -2
- package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.d.ts +0 -0
- package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.js +0 -1
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.d.ts +0 -0
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.js +0 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initializeIntlVerificationFormEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const internationalWireVerificationReducer_1 = require("../internationalWireVerificationReducer");
|
|
7
|
+
const initializeIntlVerificationFormEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(internationalWireVerificationReducer_1.initializeIntlVerificationForm.match), (0, operators_1.mergeMap)((action) => {
|
|
8
|
+
const { companyId, internationalWireFormPayload } = action.payload;
|
|
9
|
+
const actions = [];
|
|
10
|
+
const state = state$.value;
|
|
11
|
+
const onboardingDataFromCompanyInfo = state.companyState.companiesById[companyId].companyBillPayInfo
|
|
12
|
+
.internationalWireOnboardingDetails;
|
|
13
|
+
const localData = {};
|
|
14
|
+
Object.keys(internationalWireFormPayload).forEach((formFieldKey) => {
|
|
15
|
+
const values = onboardingDataFromCompanyInfo != null
|
|
16
|
+
? onboardingDataFromCompanyInfo[formFieldKey].values
|
|
17
|
+
: undefined;
|
|
18
|
+
if (values != null) {
|
|
19
|
+
localData[formFieldKey] =
|
|
20
|
+
internationalWireFormPayload[formFieldKey].type === 'enum'
|
|
21
|
+
? values.length === 1
|
|
22
|
+
? typeof values[0] === 'object' && 'code' in values[0]
|
|
23
|
+
? values[0].code
|
|
24
|
+
: ''
|
|
25
|
+
: values.map((value) => typeof value === 'object' && 'code' in value
|
|
26
|
+
? value.code
|
|
27
|
+
: '')
|
|
28
|
+
: values[0];
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
localData[formFieldKey] =
|
|
32
|
+
internationalWireFormPayload[formFieldKey].type === 'enum' &&
|
|
33
|
+
internationalWireFormPayload[formFieldKey]
|
|
34
|
+
.is_multiple_values_allowed === true
|
|
35
|
+
? []
|
|
36
|
+
: '';
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
actions.push((0, internationalWireVerificationReducer_1.updateVerificationFormLocalData)(localData));
|
|
40
|
+
return (0, rxjs_1.from)(actions);
|
|
41
|
+
}));
|
|
42
|
+
exports.initializeIntlVerificationFormEpic = initializeIntlVerificationFormEpic;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
4
|
+
import { RootState } from '../../../../../reducer';
|
|
5
|
+
import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
|
|
6
|
+
import { submitInternationalVerificationForm, updateVerificationFormSubmissionStatus } from '../internationalWireVerificationReducer';
|
|
7
|
+
import { updateInternationalWireOnboardingStatus } from '../../../../../entity/company/companyReducer';
|
|
8
|
+
export declare type ActionType = ReturnType<typeof submitInternationalVerificationForm> | ReturnType<typeof updateVerificationFormSubmissionStatus> | ReturnType<typeof updateInternationalWireOnboardingStatus> | ReturnType<typeof openSnackbar>;
|
|
9
|
+
export declare const submitIntlVerificationEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.submitIntlVerificationEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../../../responsePayload");
|
|
7
|
+
const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
|
|
8
|
+
const internationalWireVerificationReducer_1 = require("../internationalWireVerificationReducer");
|
|
9
|
+
const companyReducer_1 = require("../../../../../entity/company/companyReducer");
|
|
10
|
+
const submitIntlVerificationEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(internationalWireVerificationReducer_1.submitInternationalVerificationForm.match), (0, operators_1.switchMap)((action) => {
|
|
11
|
+
const { internationalWireVerificationState } = state$.value;
|
|
12
|
+
const { companyId } = action.payload;
|
|
13
|
+
const localData = internationalWireVerificationState.verificationFormLocalData;
|
|
14
|
+
if (localData != null) {
|
|
15
|
+
return zeniAPI
|
|
16
|
+
.postAndGetJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/international-wire/onboarding`, toIntlWireVerificationPayload(localData))
|
|
17
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
18
|
+
var _a;
|
|
19
|
+
const actions = [];
|
|
20
|
+
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
21
|
+
actions.push((0, internationalWireVerificationReducer_1.updateVerificationFormSubmissionStatus)({
|
|
22
|
+
fetchState: 'Completed',
|
|
23
|
+
error: undefined,
|
|
24
|
+
}));
|
|
25
|
+
actions.push((0, snackbarReducer_1.openSnackbar)({
|
|
26
|
+
messageSection: 'business_verification_submit',
|
|
27
|
+
messageText: 'success',
|
|
28
|
+
type: 'success',
|
|
29
|
+
}));
|
|
30
|
+
if (response.data != null) {
|
|
31
|
+
actions.push((0, companyReducer_1.updateInternationalWireOnboardingStatus)({
|
|
32
|
+
companyId: companyId,
|
|
33
|
+
status: (_a = response.data) === null || _a === void 0 ? void 0 : _a.international_wire_onboarding_status,
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
actions.push((0, internationalWireVerificationReducer_1.updateVerificationFormSubmissionStatus)({
|
|
39
|
+
fetchState: 'Error',
|
|
40
|
+
error: response.status,
|
|
41
|
+
}));
|
|
42
|
+
actions.push((0, snackbarReducer_1.openSnackbar)({
|
|
43
|
+
messageSection: 'business_verification_submit',
|
|
44
|
+
messageText: 'failed',
|
|
45
|
+
type: 'error',
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
return (0, rxjs_1.from)(actions);
|
|
49
|
+
}), (0, operators_1.catchError)((error) => {
|
|
50
|
+
return (0, rxjs_1.of)((0, internationalWireVerificationReducer_1.updateVerificationFormSubmissionStatus)({
|
|
51
|
+
fetchState: 'Error',
|
|
52
|
+
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Submit international wire verification REST API call errored out' +
|
|
53
|
+
JSON.stringify(error)),
|
|
54
|
+
}));
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
return (0, rxjs_1.from)([]);
|
|
59
|
+
}
|
|
60
|
+
}));
|
|
61
|
+
exports.submitIntlVerificationEpic = submitIntlVerificationEpic;
|
|
62
|
+
const toIntlWireVerificationPayload = (localData) => {
|
|
63
|
+
return {
|
|
64
|
+
is_applicant_declaration: true,
|
|
65
|
+
form_details: localData,
|
|
66
|
+
};
|
|
67
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AllowedValueWithCode } from '../../../../commonStateTypes/allowedValue';
|
|
2
|
+
import { ZeniAPIResponse } from '../../../../responsePayload';
|
|
3
|
+
import { VerificationFormField } from './internationalWireVerificationState';
|
|
4
|
+
export interface FieldPayload {
|
|
5
|
+
label: string;
|
|
6
|
+
type: string;
|
|
7
|
+
field_hint_text?: string;
|
|
8
|
+
field_values?: {
|
|
9
|
+
code: string;
|
|
10
|
+
description: string;
|
|
11
|
+
}[];
|
|
12
|
+
is_multiple_values_allowed?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const toDynamicFormField: (key: string, payload: FieldPayload) => VerificationFormField;
|
|
15
|
+
export declare type IntlVerificationFormResponse = ZeniAPIResponse<IntlVerificationFormPayload>;
|
|
16
|
+
export interface IntlVerificationFormPayload {
|
|
17
|
+
labels: Record<string, FieldPayload>;
|
|
18
|
+
create_time: string;
|
|
19
|
+
update_time: string;
|
|
20
|
+
}
|
|
21
|
+
interface SubmitIntlVerificationFormPayload {
|
|
22
|
+
international_wire_onboarding_status: AllowedValueWithCode;
|
|
23
|
+
status_remarks: string | null;
|
|
24
|
+
}
|
|
25
|
+
export declare type SubmitIntlVerificationFormResponse = ZeniAPIResponse<SubmitIntlVerificationFormPayload>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toDynamicFormField = void 0;
|
|
4
|
+
const toDynamicFormField = (key, payload) => {
|
|
5
|
+
var _a, _b;
|
|
6
|
+
return ({
|
|
7
|
+
name: key,
|
|
8
|
+
label: payload.label,
|
|
9
|
+
placeholder: (_a = payload.field_hint_text) !== null && _a !== void 0 ? _a : '',
|
|
10
|
+
isMultipleValuesAllowed: (_b = payload.is_multiple_values_allowed) !== null && _b !== void 0 ? _b : false,
|
|
11
|
+
type: payload.type,
|
|
12
|
+
fieldValues: payload.field_values != null && payload.field_values.length > 0
|
|
13
|
+
? payload.field_values.map((fieldValue) => {
|
|
14
|
+
return {
|
|
15
|
+
code: fieldValue.code,
|
|
16
|
+
description: fieldValue.description,
|
|
17
|
+
};
|
|
18
|
+
})
|
|
19
|
+
: [],
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
exports.toDynamicFormField = toDynamicFormField;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FieldPayload } from './internationalWireVerificationPayload';
|
|
2
|
+
import { VerificationFormLocalData, InternationalWireVerificationState } from './internationalWireVerificationState';
|
|
3
|
+
import { FetchState } from '../../../../commonStateTypes/common';
|
|
4
|
+
import { ZeniAPIStatus } from '../../../../responsePayload';
|
|
5
|
+
export declare const initialState: InternationalWireVerificationState;
|
|
6
|
+
export declare const fetchInternationalVerificationForm: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string], {
|
|
7
|
+
companyId: string;
|
|
8
|
+
}, string, never, never>, updateInternationalVerificationForm: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
9
|
+
internationalWireFormPayload: Record<string, FieldPayload>;
|
|
10
|
+
}, string>, updateVerificationFormFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
11
|
+
error?: ZeniAPIStatus<Record<string, unknown>> | undefined;
|
|
12
|
+
}, string>, updateVerificationFormLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<VerificationFormLocalData, string>, submitInternationalVerificationForm: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string], {
|
|
13
|
+
companyId: string;
|
|
14
|
+
}, string, never, never>, updateVerificationFormSubmissionStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
15
|
+
fetchState: FetchState;
|
|
16
|
+
error?: ZeniAPIStatus<Record<string, unknown>> | undefined;
|
|
17
|
+
}, string>, initializeIntlVerificationForm: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, internationalWireFormPayload: Record<string, FieldPayload>], {
|
|
18
|
+
companyId: string;
|
|
19
|
+
internationalWireFormPayload: Record<string, FieldPayload>;
|
|
20
|
+
}, string, never, never>, clearInternationalVerificationView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
21
|
+
declare const _default: import("@reduxjs/toolkit").Reducer<InternationalWireVerificationState, import("@reduxjs/toolkit").AnyAction>;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.clearInternationalVerificationView = exports.initializeIntlVerificationForm = exports.updateVerificationFormSubmissionStatus = exports.submitInternationalVerificationForm = exports.updateVerificationFormLocalData = exports.updateVerificationFormFailure = exports.updateInternationalVerificationForm = exports.fetchInternationalVerificationForm = exports.initialState = void 0;
|
|
5
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const internationalWireVerificationPayload_1 = require("./internationalWireVerificationPayload");
|
|
7
|
+
exports.initialState = {
|
|
8
|
+
verificationFormFetchState: {
|
|
9
|
+
fetchState: 'Not-Started',
|
|
10
|
+
},
|
|
11
|
+
verificationFormFields: [],
|
|
12
|
+
verificationFormLocalData: {},
|
|
13
|
+
verificationFormSubmitState: {
|
|
14
|
+
fetchState: 'Not-Started',
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
const internationalWireVerification = (0, toolkit_1.createSlice)({
|
|
18
|
+
name: 'internationalWireVerification',
|
|
19
|
+
initialState: exports.initialState,
|
|
20
|
+
reducers: {
|
|
21
|
+
fetchInternationalVerificationForm: {
|
|
22
|
+
reducer(draft) {
|
|
23
|
+
draft.verificationFormFetchState = {
|
|
24
|
+
fetchState: 'In-Progress',
|
|
25
|
+
error: undefined,
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
prepare(companyId) {
|
|
29
|
+
return {
|
|
30
|
+
payload: {
|
|
31
|
+
companyId,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
updateInternationalVerificationForm(draft, action) {
|
|
37
|
+
const { internationalWireFormPayload } = action.payload;
|
|
38
|
+
const verificationFormFields = [];
|
|
39
|
+
Object.keys(internationalWireFormPayload).forEach((key) => {
|
|
40
|
+
verificationFormFields.push((0, internationalWireVerificationPayload_1.toDynamicFormField)(key, internationalWireFormPayload[key]));
|
|
41
|
+
});
|
|
42
|
+
draft.verificationFormFields = verificationFormFields;
|
|
43
|
+
draft.verificationFormFetchState.fetchState = 'Completed';
|
|
44
|
+
},
|
|
45
|
+
updateVerificationFormFailure(draft, action) {
|
|
46
|
+
const { error } = action.payload;
|
|
47
|
+
draft.verificationFormFetchState.fetchState = 'Error';
|
|
48
|
+
draft.verificationFormFetchState.error = error;
|
|
49
|
+
},
|
|
50
|
+
updateVerificationFormLocalData(draft, action) {
|
|
51
|
+
draft.verificationFormLocalData = Object.assign({}, action.payload);
|
|
52
|
+
},
|
|
53
|
+
submitInternationalVerificationForm: {
|
|
54
|
+
reducer(draft) {
|
|
55
|
+
draft.verificationFormSubmitState.fetchState = 'In-Progress';
|
|
56
|
+
draft.verificationFormSubmitState.error = undefined;
|
|
57
|
+
},
|
|
58
|
+
prepare(companyId) {
|
|
59
|
+
return {
|
|
60
|
+
payload: { companyId },
|
|
61
|
+
};
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
updateVerificationFormSubmissionStatus(draft, action) {
|
|
65
|
+
const { fetchState, error } = action.payload;
|
|
66
|
+
draft.verificationFormSubmitState.fetchState = fetchState;
|
|
67
|
+
draft.verificationFormSubmitState.error = error;
|
|
68
|
+
},
|
|
69
|
+
initializeIntlVerificationForm: {
|
|
70
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
71
|
+
reducer(_draft) {
|
|
72
|
+
// do nothing
|
|
73
|
+
},
|
|
74
|
+
prepare(companyId, internationalWireFormPayload) {
|
|
75
|
+
return {
|
|
76
|
+
payload: {
|
|
77
|
+
companyId,
|
|
78
|
+
internationalWireFormPayload,
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
clearInternationalVerificationView(draft) {
|
|
84
|
+
Object.assign(draft, exports.initialState);
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
_a = internationalWireVerification.actions, exports.fetchInternationalVerificationForm = _a.fetchInternationalVerificationForm, exports.updateInternationalVerificationForm = _a.updateInternationalVerificationForm, exports.updateVerificationFormFailure = _a.updateVerificationFormFailure, exports.updateVerificationFormLocalData = _a.updateVerificationFormLocalData, exports.submitInternationalVerificationForm = _a.submitInternationalVerificationForm, exports.updateVerificationFormSubmissionStatus = _a.updateVerificationFormSubmissionStatus, exports.initializeIntlVerificationForm = _a.initializeIntlVerificationForm, exports.clearInternationalVerificationView = _a.clearInternationalVerificationView;
|
|
89
|
+
exports.default = internationalWireVerification.reducer;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ID, FetchStateAndError } from '../../../../commonStateTypes/common';
|
|
2
|
+
import { RootState } from '../../../../reducer';
|
|
3
|
+
import { SelectorView } from '../../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
4
|
+
import { VerificationFormField, VerificationFormLocalData } from './internationalWireVerificationState';
|
|
5
|
+
import { File } from '../../../../entity/file/fileState';
|
|
6
|
+
export interface InternationalWireVerificationView extends SelectorView {
|
|
7
|
+
verificationFormFetchState: FetchStateAndError;
|
|
8
|
+
verificationFormFields: VerificationFormField[];
|
|
9
|
+
verificationFormLocalData: VerificationFormLocalData;
|
|
10
|
+
verificationFormSubmitState: FetchStateAndError;
|
|
11
|
+
userFiles: File[];
|
|
12
|
+
deleteFileStatusById: Record<ID, FetchStateAndError | undefined>;
|
|
13
|
+
updateFileStatusById: Record<ID, FetchStateAndError | undefined>;
|
|
14
|
+
}
|
|
15
|
+
export declare const getIntlWireVerificationView: (state: RootState) => InternationalWireVerificationView;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getIntlWireVerificationView = void 0;
|
|
4
|
+
const fileSelector_1 = require("../../../../entity/file/fileSelector");
|
|
5
|
+
const fileViewSelector_1 = require("../../../fileView/fileViewSelector");
|
|
6
|
+
const getIntlWireVerificationView = (state) => {
|
|
7
|
+
const deleteFileStatusById = {};
|
|
8
|
+
const updateFileStatusById = {};
|
|
9
|
+
// field with type = file
|
|
10
|
+
const fileField = state.internationalWireVerificationState.verificationFormFields.find((field) => field.type === 'file');
|
|
11
|
+
let fileId;
|
|
12
|
+
if (fileField != null) {
|
|
13
|
+
fileId = state.internationalWireVerificationState.verificationFormLocalData[fileField.name];
|
|
14
|
+
}
|
|
15
|
+
if (fileId != null) {
|
|
16
|
+
deleteFileStatusById[fileId] = (0, fileViewSelector_1.getFileDeleteStatusById)(state, fileId);
|
|
17
|
+
updateFileStatusById[fileId] = (0, fileViewSelector_1.getFileUpdateNameStatusById)(state, fileId);
|
|
18
|
+
}
|
|
19
|
+
let userFiles = [];
|
|
20
|
+
if (fileId != null) {
|
|
21
|
+
userFiles = (0, fileSelector_1.getFilesByFileIds)(state.fileState, [fileId]);
|
|
22
|
+
}
|
|
23
|
+
const fetchState = state.internationalWireVerificationState.verificationFormFetchState
|
|
24
|
+
.fetchState;
|
|
25
|
+
return Object.assign(Object.assign({}, state.internationalWireVerificationState), { deleteFileStatusById,
|
|
26
|
+
updateFileStatusById,
|
|
27
|
+
userFiles,
|
|
28
|
+
fetchState });
|
|
29
|
+
};
|
|
30
|
+
exports.getIntlWireVerificationView = getIntlWireVerificationView;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FetchStateAndError } from '../../../../commonStateTypes/common';
|
|
2
|
+
export interface InternationalWireVerificationState {
|
|
3
|
+
verificationFormFetchState: FetchStateAndError;
|
|
4
|
+
verificationFormFields: VerificationFormField[];
|
|
5
|
+
verificationFormLocalData: VerificationFormLocalData;
|
|
6
|
+
verificationFormSubmitState: FetchStateAndError;
|
|
7
|
+
}
|
|
8
|
+
export declare type VerificationFormLocalData = Record<string, string | string[]>;
|
|
9
|
+
export interface FieldValueType {
|
|
10
|
+
code: string;
|
|
11
|
+
description: string;
|
|
12
|
+
}
|
|
13
|
+
export interface VerificationFormField {
|
|
14
|
+
name: string;
|
|
15
|
+
label: string;
|
|
16
|
+
placeholder: string;
|
|
17
|
+
fieldValues: FieldValueType[];
|
|
18
|
+
isMultipleValuesAllowed: boolean;
|
|
19
|
+
type: string;
|
|
20
|
+
}
|
package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export declare const initializeCardUserOnboardingLocalData: import("@reduxjs/too
|
|
|
8
8
|
localData: CardUserOnboardingLocalData;
|
|
9
9
|
}, string>, sendOtpCardUserOnboarding: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, sendOtpCardUserOnboardingSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
10
10
|
otpChallenge: string;
|
|
11
|
-
}, string>, sendOtpCardUserOnboardingFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, resendOtpCardUserOnboarding: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, verifyOtpCardUserOnboarding: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, verifyOtpCardUserOnboardingSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, verifyOtpCardUserOnboardingFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, saveCardOnboardingUserDetails: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, startActivationWait: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, completeActivationWait: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, setFirstViewAfterActivation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, setFirstViewCompleteAfterActivation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>,
|
|
11
|
+
}, string>, sendOtpCardUserOnboardingFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, resendOtpCardUserOnboarding: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, verifyOtpCardUserOnboarding: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, verifyOtpCardUserOnboardingSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, verifyOtpCardUserOnboardingFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, saveCardOnboardingUserDetails: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, startActivationWait: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, completeActivationWait: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, setFirstViewAfterActivation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, setFirstViewCompleteAfterActivation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, setCurrentDisplayedCardId: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
12
|
+
cardId: ID;
|
|
13
|
+
}, string>, clearCardUserOnboarding: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
12
14
|
declare const _default: import("@reduxjs/toolkit").Reducer<CardUserOnboardingState, import("@reduxjs/toolkit").AnyAction>;
|
|
13
15
|
export default _default;
|
package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clearCardUserOnboarding = exports.setFirstViewCompleteAfterActivation = exports.setFirstViewAfterActivation = exports.completeActivationWait = exports.startActivationWait = exports.saveCardOnboardingUserDetails = exports.verifyOtpCardUserOnboardingFailure = exports.verifyOtpCardUserOnboardingSuccess = exports.verifyOtpCardUserOnboarding = exports.resendOtpCardUserOnboarding = exports.sendOtpCardUserOnboardingFailure = exports.sendOtpCardUserOnboardingSuccess = exports.sendOtpCardUserOnboarding = exports.updateCardUserOnboardingLocalData = exports.initializeCardUserOnboardingLocalData = exports.initialState = void 0;
|
|
4
|
+
exports.clearCardUserOnboarding = exports.setCurrentDisplayedCardId = exports.setFirstViewCompleteAfterActivation = exports.setFirstViewAfterActivation = exports.completeActivationWait = exports.startActivationWait = exports.saveCardOnboardingUserDetails = exports.verifyOtpCardUserOnboardingFailure = exports.verifyOtpCardUserOnboardingSuccess = exports.verifyOtpCardUserOnboarding = exports.resendOtpCardUserOnboarding = exports.sendOtpCardUserOnboardingFailure = exports.sendOtpCardUserOnboardingSuccess = exports.sendOtpCardUserOnboarding = exports.updateCardUserOnboardingLocalData = exports.initializeCardUserOnboardingLocalData = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
exports.initialState = {
|
|
7
7
|
cardUserOnboardingLocalData: undefined,
|
|
@@ -68,6 +68,10 @@ const cardUserOnboarding = (0, toolkit_1.createSlice)({
|
|
|
68
68
|
draft.verifyOtpStatus.fetchState = 'Error';
|
|
69
69
|
draft.verifyOtpStatus.error = action.payload;
|
|
70
70
|
},
|
|
71
|
+
setCurrentDisplayedCardId(draft, action) {
|
|
72
|
+
const { cardId } = action.payload;
|
|
73
|
+
draft.currentDisplayedCardId = cardId;
|
|
74
|
+
},
|
|
71
75
|
saveCardOnboardingUserDetails(
|
|
72
76
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
73
77
|
_draft) {
|
|
@@ -90,5 +94,5 @@ const cardUserOnboarding = (0, toolkit_1.createSlice)({
|
|
|
90
94
|
},
|
|
91
95
|
},
|
|
92
96
|
});
|
|
93
|
-
_a = cardUserOnboarding.actions, exports.initializeCardUserOnboardingLocalData = _a.initializeCardUserOnboardingLocalData, exports.updateCardUserOnboardingLocalData = _a.updateCardUserOnboardingLocalData, exports.sendOtpCardUserOnboarding = _a.sendOtpCardUserOnboarding, exports.sendOtpCardUserOnboardingSuccess = _a.sendOtpCardUserOnboardingSuccess, exports.sendOtpCardUserOnboardingFailure = _a.sendOtpCardUserOnboardingFailure, exports.resendOtpCardUserOnboarding = _a.resendOtpCardUserOnboarding, exports.verifyOtpCardUserOnboarding = _a.verifyOtpCardUserOnboarding, exports.verifyOtpCardUserOnboardingSuccess = _a.verifyOtpCardUserOnboardingSuccess, exports.verifyOtpCardUserOnboardingFailure = _a.verifyOtpCardUserOnboardingFailure, exports.saveCardOnboardingUserDetails = _a.saveCardOnboardingUserDetails, exports.startActivationWait = _a.startActivationWait, exports.completeActivationWait = _a.completeActivationWait, exports.setFirstViewAfterActivation = _a.setFirstViewAfterActivation, exports.setFirstViewCompleteAfterActivation = _a.setFirstViewCompleteAfterActivation, exports.clearCardUserOnboarding = _a.clearCardUserOnboarding;
|
|
97
|
+
_a = cardUserOnboarding.actions, exports.initializeCardUserOnboardingLocalData = _a.initializeCardUserOnboardingLocalData, exports.updateCardUserOnboardingLocalData = _a.updateCardUserOnboardingLocalData, exports.sendOtpCardUserOnboarding = _a.sendOtpCardUserOnboarding, exports.sendOtpCardUserOnboardingSuccess = _a.sendOtpCardUserOnboardingSuccess, exports.sendOtpCardUserOnboardingFailure = _a.sendOtpCardUserOnboardingFailure, exports.resendOtpCardUserOnboarding = _a.resendOtpCardUserOnboarding, exports.verifyOtpCardUserOnboarding = _a.verifyOtpCardUserOnboarding, exports.verifyOtpCardUserOnboardingSuccess = _a.verifyOtpCardUserOnboardingSuccess, exports.verifyOtpCardUserOnboardingFailure = _a.verifyOtpCardUserOnboardingFailure, exports.saveCardOnboardingUserDetails = _a.saveCardOnboardingUserDetails, exports.startActivationWait = _a.startActivationWait, exports.completeActivationWait = _a.completeActivationWait, exports.setFirstViewAfterActivation = _a.setFirstViewAfterActivation, exports.setFirstViewCompleteAfterActivation = _a.setFirstViewCompleteAfterActivation, exports.setCurrentDisplayedCardId = _a.setCurrentDisplayedCardId, exports.clearCardUserOnboarding = _a.clearCardUserOnboarding;
|
|
94
98
|
exports.default = cardUserOnboarding.reducer;
|
package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { View } from '../../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
2
2
|
import { RootState } from '../../../../reducer';
|
|
3
3
|
import { CardUserOnboardingLocalData } from './cardUserOnboardingState';
|
|
4
|
-
import { FetchStateAndError } from '../../../../commonStateTypes/common';
|
|
5
|
-
import { NewAddressData } from '../../../addressView/addressViewState';
|
|
4
|
+
import { FetchStateAndError, ID } from '../../../../commonStateTypes/common';
|
|
6
5
|
import { TwoFactorAuthenticationView } from '../../../twoFactorAuthentication/twoFactorAuthenticationSelector';
|
|
7
6
|
export interface CardUserOnboardingView extends View {
|
|
8
7
|
cardUserOnboardingLocalData?: CardUserOnboardingLocalData;
|
|
@@ -13,6 +12,6 @@ export interface CardUserOnboardingView extends View {
|
|
|
13
12
|
updateStatus: FetchStateAndError;
|
|
14
13
|
sendOtpStatus: FetchStateAndError;
|
|
15
14
|
verifyOtpStatus: FetchStateAndError;
|
|
16
|
-
|
|
15
|
+
currentDisplayedCardId?: ID;
|
|
17
16
|
}
|
|
18
17
|
export declare const getCardUserOnboardingView: (state: RootState) => CardUserOnboardingView;
|
package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.js
CHANGED
|
@@ -5,8 +5,8 @@ const toolkit_1 = require("@reduxjs/toolkit");
|
|
|
5
5
|
const twoFactorAuthenticationSelector_1 = require("../../../twoFactorAuthentication/twoFactorAuthenticationSelector");
|
|
6
6
|
const reduceFetchState_1 = require("../../../../commonStateTypes/reduceFetchState");
|
|
7
7
|
const userSelector_1 = require("../../../../entity/user/userSelector");
|
|
8
|
-
exports.getCardUserOnboardingView = (0, toolkit_1.createSelector)((state) => state, (state) => state.
|
|
9
|
-
var _a
|
|
8
|
+
exports.getCardUserOnboardingView = (0, toolkit_1.createSelector)((state) => state, (state) => state.cardUserOnboardingState, (state) => state.settingsViewState, (state) => state.tenantState, (state) => state.userState, (state, cardUserOnboardingState, settingsViewState, tenantState, userState) => {
|
|
9
|
+
var _a;
|
|
10
10
|
const twoFAView = (0, twoFactorAuthenticationSelector_1.getTwoFactorAuthenticationView)(state);
|
|
11
11
|
const updateStatus = (0, reduceFetchState_1.reduceAllFetchState)([
|
|
12
12
|
settingsViewState.profile.updateStatus,
|
|
@@ -22,7 +22,6 @@ exports.getCardUserOnboardingView = (0, toolkit_1.createSelector)((state) => sta
|
|
|
22
22
|
const isDOBPresent = (user === null || user === void 0 ? void 0 : user.birthday) != null;
|
|
23
23
|
return {
|
|
24
24
|
cardUserOnboardingLocalData: cardUserOnboardingState.cardUserOnboardingLocalData,
|
|
25
|
-
addressData: (_b = addressViewState.newAddressState) === null || _b === void 0 ? void 0 : _b['user_address'],
|
|
26
25
|
onboardingProgressStatus: updateStatus,
|
|
27
26
|
updateStatus: settingsViewState.profile.updateStatus,
|
|
28
27
|
sendOtpStatus: cardUserOnboardingState.sendOtpStatus,
|
|
@@ -30,5 +29,6 @@ exports.getCardUserOnboardingView = (0, toolkit_1.createSelector)((state) => sta
|
|
|
30
29
|
twoFAView,
|
|
31
30
|
isDOBPresent,
|
|
32
31
|
firstViewAfterActivation: cardUserOnboardingState.firstViewAfterActivation,
|
|
32
|
+
currentDisplayedCardId: cardUserOnboardingState.currentDisplayedCardId,
|
|
33
33
|
};
|
|
34
34
|
});
|
package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingState.d.ts
CHANGED
|
@@ -2,9 +2,6 @@ import { FetchStateAndError, ID } from '../../../../commonStateTypes/common';
|
|
|
2
2
|
import { ZeniDate } from '../../../../zeniDayJS';
|
|
3
3
|
export interface CardUserOnboardingLocalData {
|
|
4
4
|
userId: ID;
|
|
5
|
-
firstName: string;
|
|
6
|
-
lastName: string;
|
|
7
|
-
email: string;
|
|
8
5
|
phone?: string;
|
|
9
6
|
isPhoneVerified?: boolean;
|
|
10
7
|
otpChallenge?: string;
|
|
@@ -17,4 +14,5 @@ export interface CardUserOnboardingState {
|
|
|
17
14
|
verifyOtpStatus: FetchStateAndError;
|
|
18
15
|
activationWaitStatus: FetchStateAndError;
|
|
19
16
|
firstViewAfterActivation: boolean;
|
|
17
|
+
currentDisplayedCardId?: ID;
|
|
20
18
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { RootState } from '../../../../../reducer';
|
|
4
|
-
import { newAddressInLocalStore, resetNewAddressDataInLocalStore } from '../../../../addressView/addressViewReducer';
|
|
5
4
|
import { initializeCardUserOnboardingLocalData, updateCardUserOnboardingLocalData } from '../cardUserOnboardingReducer';
|
|
6
|
-
export declare type ActionType = ReturnType<typeof initializeCardUserOnboardingLocalData> | ReturnType<typeof updateCardUserOnboardingLocalData
|
|
5
|
+
export declare type ActionType = ReturnType<typeof initializeCardUserOnboardingLocalData> | ReturnType<typeof updateCardUserOnboardingLocalData>;
|
|
7
6
|
export declare const initializeCardUserOnboardingLocalDataEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
|
|
@@ -3,33 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.initializeCardUserOnboardingLocalDataEpic = void 0;
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const addressSelector_1 = require("../../../../../entity/address/addressSelector");
|
|
7
|
-
const addressViewReducer_1 = require("../../../../addressView/addressViewReducer");
|
|
8
6
|
const cardUserOnboardingReducer_1 = require("../cardUserOnboardingReducer");
|
|
9
7
|
const userRoleSelector_1 = require("../../../../../entity/userRole/userRoleSelector");
|
|
10
8
|
const userSelector_1 = require("../../../../../entity/user/userSelector");
|
|
11
|
-
const chargeCardSelector_1 = require("../../../../../entity/chargeCard/chargeCardSelector");
|
|
12
9
|
const initializeCardUserOnboardingLocalDataEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(cardUserOnboardingReducer_1.initializeCardUserOnboardingLocalData.match), (0, operators_1.mergeMap)((action) => {
|
|
13
10
|
const { userId } = action.payload;
|
|
14
|
-
const actions = [
|
|
15
|
-
(0, addressViewReducer_1.resetNewAddressDataInLocalStore)('user_address'),
|
|
16
|
-
];
|
|
17
11
|
const userState = state$.value.userState;
|
|
18
12
|
const userRoleState = state$.value.userRoleState;
|
|
19
13
|
const user = (0, userSelector_1.getUserByUserId)(userState, userId);
|
|
20
14
|
const userRole = (0, userRoleSelector_1.getUserRoleByUserId)(userRoleState, userId);
|
|
21
|
-
const
|
|
22
|
-
const userAddress = (userRole === null || userRole === void 0 ? void 0 : userRole.addressId) != null
|
|
23
|
-
? (0, addressSelector_1.getAddressByAddressId)(state$.value.addressState, userRole.addressId)
|
|
24
|
-
: userCards.length > 0
|
|
25
|
-
? (0, addressSelector_1.getAddressByAddressId)(state$.value.addressState, userCards[0].billingAddressId)
|
|
26
|
-
: undefined;
|
|
27
|
-
if (userAddress != null) {
|
|
28
|
-
actions.push((0, addressViewReducer_1.newAddressInLocalStore)({
|
|
29
|
-
addressType: 'user_address',
|
|
30
|
-
addressToCreate: userAddress,
|
|
31
|
-
}));
|
|
32
|
-
}
|
|
15
|
+
const actions = [];
|
|
33
16
|
if (user != null && userRole != null) {
|
|
34
17
|
const dateOfBirth = user.birthday;
|
|
35
18
|
const phoneNumber = user.phone;
|
|
@@ -37,9 +20,6 @@ const initializeCardUserOnboardingLocalDataEpic = (actions$, state$) => actions$
|
|
|
37
20
|
const syncToken = user === null || user === void 0 ? void 0 : user.syncToken;
|
|
38
21
|
const cardUserOnboardingLocalData = {
|
|
39
22
|
userId,
|
|
40
|
-
firstName: user.firstName,
|
|
41
|
-
lastName: user.lastName,
|
|
42
|
-
email: user.email,
|
|
43
23
|
dateOfBirth,
|
|
44
24
|
phone: phoneNumber,
|
|
45
25
|
isPhoneVerified,
|
|
@@ -6,11 +6,9 @@ const operators_1 = require("rxjs/operators");
|
|
|
6
6
|
const cardUserOnboardingReducer_1 = require("../cardUserOnboardingReducer");
|
|
7
7
|
const settingsViewReducer_1 = require("../../../../settingsView/settingsViewReducer");
|
|
8
8
|
const saveCardOnboardingUserDetailsEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(cardUserOnboardingReducer_1.saveCardOnboardingUserDetails.match), (0, operators_1.mergeMap)(() => {
|
|
9
|
-
var _a;
|
|
10
9
|
const localData = state$.value.cardUserOnboardingState.cardUserOnboardingLocalData;
|
|
11
|
-
const address = (_a = state$.value.addressViewState.newAddressState) === null || _a === void 0 ? void 0 : _a.user_address.addressToCreate;
|
|
12
10
|
return (0, rxjs_1.from)([
|
|
13
|
-
(0, settingsViewReducer_1.updateMyProfile)('CardUserOnboarding', localData === null || localData === void 0 ? void 0 : localData.phone, localData === null || localData === void 0 ? void 0 : localData.otpChallenge, localData === null || localData === void 0 ? void 0 : localData.dateOfBirth
|
|
11
|
+
(0, settingsViewReducer_1.updateMyProfile)('CardUserOnboarding', localData === null || localData === void 0 ? void 0 : localData.phone, localData === null || localData === void 0 ? void 0 : localData.otpChallenge, localData === null || localData === void 0 ? void 0 : localData.dateOfBirth),
|
|
14
12
|
]);
|
|
15
13
|
}));
|
|
16
14
|
exports.saveCardOnboardingUserDetailsEpic = saveCardOnboardingUserDetailsEpic;
|
|
@@ -9,6 +9,7 @@ interface ChargeCardDetail extends FetchedState {
|
|
|
9
9
|
id: ID;
|
|
10
10
|
transactionList: ChargeCardDetailTransactionList;
|
|
11
11
|
updateStatus: FetchStateAndError;
|
|
12
|
+
updatePhysicalChargeCardAttemptFetchState: FetchStateAndError;
|
|
12
13
|
}
|
|
13
14
|
export declare const toChargeCardTransactionSortKeyType: (v: string) => "type" | "amount" | "merchant" | "paymentDate" | "receipts";
|
|
14
15
|
export declare type ChargeCardTransactionSortKey = ReturnType<typeof toChargeCardTransactionSortKeyType>;
|
|
@@ -42,7 +42,14 @@ export declare const fetchChargeCardDetailPage: import("@reduxjs/toolkit").Actio
|
|
|
42
42
|
cardId: ID;
|
|
43
43
|
transactionId: ID;
|
|
44
44
|
status: ZeniAPIStatus;
|
|
45
|
-
}, string>,
|
|
45
|
+
}, string>, updatePhysicalChargeCardAttemptSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
46
|
+
chargeCardId: ID;
|
|
47
|
+
fetchState: FetchState;
|
|
48
|
+
error?: ZeniAPIStatus<Record<string, unknown>> | undefined;
|
|
49
|
+
}, string>, updatePhysicalChargeCardAttempt: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[chargeCardId: string, statusCode: "failed" | "success"], {
|
|
50
|
+
chargeCardId: string;
|
|
51
|
+
statusCode: "failed" | "success";
|
|
52
|
+
}, string, never, never>, updateChargeCardTransactionReceiptsShowTickFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
46
53
|
transactionId: ID;
|
|
47
54
|
chargeCardId: ID;
|
|
48
55
|
shouldShowTick: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clearChargeCardDetail = exports.updateChargeCardDetailUpdateStatus = exports.updateChargeCardDetail = exports.updateChargeCardTransactionListFailure = exports.updateChargeCardTransactionAttachmentsInCardDetail = exports.updateChargeCardTransactionReceiptsShowTickFetchStatus = exports.updateChargeCardTransactionAttachmentsFailure = exports.updateChargeCardTransactionIsViewReceiptClicked = exports.fetchChargeCardTransactionAttachments = exports.updateChargeCardTransactionUploadReceiptsFetchStatus = exports.updateChargeCardTransactionList = exports.updateChargeCardDetailUIState = exports.fetchChargeCardTransactionList = exports.updateChargeCardDetailFetchState = exports.fetchChargeCardDetail = exports.fetchChargeCardDetailPage = exports.initialState = void 0;
|
|
4
|
+
exports.clearChargeCardDetail = exports.updateChargeCardDetailUpdateStatus = exports.updateChargeCardDetail = exports.updateChargeCardTransactionListFailure = exports.updateChargeCardTransactionAttachmentsInCardDetail = exports.updateChargeCardTransactionReceiptsShowTickFetchStatus = exports.updatePhysicalChargeCardAttempt = exports.updatePhysicalChargeCardAttemptSuccessOrFailure = exports.updateChargeCardTransactionAttachmentsFailure = exports.updateChargeCardTransactionIsViewReceiptClicked = exports.fetchChargeCardTransactionAttachments = exports.updateChargeCardTransactionUploadReceiptsFetchStatus = exports.updateChargeCardTransactionList = exports.updateChargeCardDetailUIState = exports.fetchChargeCardTransactionList = exports.updateChargeCardDetailFetchState = exports.fetchChargeCardDetail = exports.fetchChargeCardDetailPage = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const sortOrderPayload_1 = require("../../../../commonPayloadTypes/sortOrderPayload");
|
|
7
7
|
const attachmentPayload_1 = require("../../../../entity/transaction/payloadTypes/attachmentPayload");
|
|
@@ -94,6 +94,29 @@ const chargeCardDetail = (0, toolkit_1.createSlice)({
|
|
|
94
94
|
const existingCardDetail = draft.detailById[chargeCardId];
|
|
95
95
|
draft.detailById[chargeCardId] = Object.assign(Object.assign({}, existingCardDetail), { transactionList: Object.assign(Object.assign({}, existingCardDetail.transactionList), { fetchState: 'Error', error }) });
|
|
96
96
|
},
|
|
97
|
+
updatePhysicalChargeCardAttempt: {
|
|
98
|
+
reducer(draft, action) {
|
|
99
|
+
const { chargeCardId } = action.payload;
|
|
100
|
+
const existingCardDetail = draft.detailById[chargeCardId];
|
|
101
|
+
draft.detailById[chargeCardId] = Object.assign(Object.assign({}, existingCardDetail), { updatePhysicalChargeCardAttemptFetchState: {
|
|
102
|
+
fetchState: 'In-Progress',
|
|
103
|
+
error: undefined,
|
|
104
|
+
} });
|
|
105
|
+
},
|
|
106
|
+
prepare(chargeCardId, statusCode) {
|
|
107
|
+
return {
|
|
108
|
+
payload: { chargeCardId, statusCode },
|
|
109
|
+
};
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
updatePhysicalChargeCardAttemptSuccessOrFailure(draft, action) {
|
|
113
|
+
const { chargeCardId, fetchState, error } = action.payload;
|
|
114
|
+
const existingCardDetail = draft.detailById[chargeCardId];
|
|
115
|
+
draft.detailById[chargeCardId] = Object.assign(Object.assign({}, existingCardDetail), { updatePhysicalChargeCardAttemptFetchState: {
|
|
116
|
+
fetchState,
|
|
117
|
+
error,
|
|
118
|
+
} });
|
|
119
|
+
},
|
|
97
120
|
updateChargeCardDetail: {
|
|
98
121
|
reducer(draft, action) {
|
|
99
122
|
const { chargeCardId } = action.payload;
|
|
@@ -181,5 +204,5 @@ const chargeCardDetail = (0, toolkit_1.createSlice)({
|
|
|
181
204
|
},
|
|
182
205
|
},
|
|
183
206
|
});
|
|
184
|
-
_a = chargeCardDetail.actions, exports.fetchChargeCardDetailPage = _a.fetchChargeCardDetailPage, exports.fetchChargeCardDetail = _a.fetchChargeCardDetail, exports.updateChargeCardDetailFetchState = _a.updateChargeCardDetailFetchState, exports.fetchChargeCardTransactionList = _a.fetchChargeCardTransactionList, exports.updateChargeCardDetailUIState = _a.updateChargeCardDetailUIState, exports.updateChargeCardTransactionList = _a.updateChargeCardTransactionList, exports.updateChargeCardTransactionUploadReceiptsFetchStatus = _a.updateChargeCardTransactionUploadReceiptsFetchStatus, exports.fetchChargeCardTransactionAttachments = _a.fetchChargeCardTransactionAttachments, exports.updateChargeCardTransactionIsViewReceiptClicked = _a.updateChargeCardTransactionIsViewReceiptClicked, exports.updateChargeCardTransactionAttachmentsFailure = _a.updateChargeCardTransactionAttachmentsFailure, exports.updateChargeCardTransactionReceiptsShowTickFetchStatus = _a.updateChargeCardTransactionReceiptsShowTickFetchStatus, exports.updateChargeCardTransactionAttachmentsInCardDetail = _a.updateChargeCardTransactionAttachmentsInCardDetail, exports.updateChargeCardTransactionListFailure = _a.updateChargeCardTransactionListFailure, exports.updateChargeCardDetail = _a.updateChargeCardDetail, exports.updateChargeCardDetailUpdateStatus = _a.updateChargeCardDetailUpdateStatus, exports.clearChargeCardDetail = _a.clearChargeCardDetail;
|
|
207
|
+
_a = chargeCardDetail.actions, exports.fetchChargeCardDetailPage = _a.fetchChargeCardDetailPage, exports.fetchChargeCardDetail = _a.fetchChargeCardDetail, exports.updateChargeCardDetailFetchState = _a.updateChargeCardDetailFetchState, exports.fetchChargeCardTransactionList = _a.fetchChargeCardTransactionList, exports.updateChargeCardDetailUIState = _a.updateChargeCardDetailUIState, exports.updateChargeCardTransactionList = _a.updateChargeCardTransactionList, exports.updateChargeCardTransactionUploadReceiptsFetchStatus = _a.updateChargeCardTransactionUploadReceiptsFetchStatus, exports.fetchChargeCardTransactionAttachments = _a.fetchChargeCardTransactionAttachments, exports.updateChargeCardTransactionIsViewReceiptClicked = _a.updateChargeCardTransactionIsViewReceiptClicked, exports.updateChargeCardTransactionAttachmentsFailure = _a.updateChargeCardTransactionAttachmentsFailure, exports.updatePhysicalChargeCardAttemptSuccessOrFailure = _a.updatePhysicalChargeCardAttemptSuccessOrFailure, exports.updatePhysicalChargeCardAttempt = _a.updatePhysicalChargeCardAttempt, exports.updateChargeCardTransactionReceiptsShowTickFetchStatus = _a.updateChargeCardTransactionReceiptsShowTickFetchStatus, exports.updateChargeCardTransactionAttachmentsInCardDetail = _a.updateChargeCardTransactionAttachmentsInCardDetail, exports.updateChargeCardTransactionListFailure = _a.updateChargeCardTransactionListFailure, exports.updateChargeCardDetail = _a.updateChargeCardDetail, exports.updateChargeCardDetailUpdateStatus = _a.updateChargeCardDetailUpdateStatus, exports.clearChargeCardDetail = _a.clearChargeCardDetail;
|
|
185
208
|
exports.default = chargeCardDetail.reducer;
|