@zeniai/client-epic-state 4.13.11 → 4.13.12
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 +0 -7
- package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.d.ts +0 -0
- package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.js +1 -0
- package/lib/commonStateTypes/common.d.ts +0 -2
- package/lib/commonStateTypes/common.js +1 -5
- package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.d.ts +0 -1
- package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.js +1 -2
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.d.ts +0 -0
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.js +1 -0
- package/lib/commonStateTypes/timePeriod.d.ts +0 -16
- package/lib/commonStateTypes/timePeriod.js +1 -31
- package/lib/commonStateTypes/viewAndReport/reportIDHelper.d.ts +0 -1
- package/lib/commonStateTypes/viewAndReport/reportIDHelper.js +1 -3
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +0 -2
- package/lib/entity/account/accountPayload.d.ts +1 -1
- 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 +2 -16
- package/lib/entity/chargeCard/chargeCard.js +1 -18
- package/lib/entity/chargeCard/chargeCardPayload.d.ts +5 -14
- package/lib/entity/chargeCard/chargeCardPayload.js +7 -24
- 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 +0 -4
- package/lib/entity/company/companyPayload.js +3 -6
- package/lib/entity/company/companyReducer.d.ts +1 -4
- package/lib/entity/company/companyReducer.js +2 -6
- package/lib/entity/company/companyStateTypes.d.ts +1 -5
- package/lib/entity/file/fileState.d.ts +3 -3
- package/lib/entity/file/fileState.js +0 -2
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +1 -7
- package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -2
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +1 -3
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +1 -2
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +1 -3
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +0 -2
- package/lib/entity/jeSchedules/jeSchedulesTypes.js +1 -12
- 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 +0 -3
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -14
- package/lib/entity/tenant/clearAllEpic.js +0 -24
- package/lib/entity/tenant/epic/fetchActiveTenantEpic.d.ts +1 -2
- package/lib/entity/tenant/epic/fetchActiveTenantEpic.js +1 -9
- package/lib/entity/tenant/epic/fetchAllTenantsEpic.d.ts +1 -7
- package/lib/entity/tenant/epic/fetchAllTenantsEpic.js +2 -34
- package/lib/entity/tenant/tenantPayload.d.ts +0 -1
- package/lib/entity/tenant/tenantReducer.js +0 -3
- package/lib/entity/tenant/tenantState.d.ts +0 -1
- 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 +0 -1
- package/lib/entity/transaction/transactionSelector.js +1 -7
- package/lib/entity/user/userPayload.d.ts +0 -1
- package/lib/entity/user/userReducer.js +8 -9
- package/lib/entity/user/userState.d.ts +0 -1
- package/lib/entity/vendor/__mocks__/vendorMock.js +2 -0
- package/lib/entity/vendor/__mocks__/vendorStateMocks.d.ts +0 -2
- package/lib/entity/vendor/__mocks__/vendorStateMocks.js +4 -107
- package/lib/entity/vendor/vendorPayload.d.ts +1 -6
- package/lib/entity/vendor/vendorPayload.js +5 -6
- package/lib/entity/vendor/vendorState.d.ts +3 -10
- package/lib/entity/vendor/vendorType.d.ts +2 -2
- package/lib/entity/vendor/vendorType.js +4 -4
- package/lib/entity/vendorExpense/vendorExpenseSelector.d.ts +2 -2
- package/lib/entity/vendorExpense/vendorExpenseSelector.js +0 -1
- package/lib/epic.d.ts +2 -19
- package/lib/epic.js +2 -19
- package/lib/index.d.ts +21 -65
- package/lib/index.js +28 -102
- package/lib/reducer.d.ts +1 -34
- package/lib/reducer.js +1 -34
- package/lib/view/accountMappingView/accountMappingPayload.js +32 -75
- package/lib/view/accountMappingView/accountMappingReducer.js +10 -36
- package/lib/view/accountMappingView/accountMappingState.d.ts +1 -1
- package/lib/view/accountMappingView/accountMappingViewSelector.d.ts +0 -5
- package/lib/view/accountMappingView/accountMappingViewSelector.js +1 -11
- package/lib/view/accountMappingView/initializeAccountMappingViewEpic.d.ts +1 -2
- package/lib/view/accountMappingView/initializeAccountMappingViewEpic.js +0 -2
- package/lib/view/accountMappingView/saveAccountMappingViewEpic.js +1 -6
- package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +1 -7
- package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +1 -7
- package/lib/view/addressView/addressViewState.d.ts +1 -1
- package/lib/view/addressView/toAddressViewLocalData.d.ts +0 -2
- package/lib/view/addressView/toAddressViewLocalData.js +3 -9
- 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 +5 -10
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.js +7 -10
- 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 +3 -5
- 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 +6 -1
- package/lib/view/companyView/selectorHelpers/getCompanyView.js +0 -4
- package/lib/view/companyView/types/cockpitTypes.d.ts +2 -2
- package/lib/view/companyView/types/companyPassport/companyUsersLocalData.d.ts +0 -2
- package/lib/view/companyView/types/companyPassport/companyUsersLocalData.js +1 -7
- package/lib/view/companyView/types/companyView.d.ts +0 -1
- package/lib/view/dashboard/dashboardEpic.d.ts +1 -2
- package/lib/view/dashboard/dashboardEpic.js +2 -22
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -3
- package/lib/view/dashboard/dashboardReducer.js +1 -2
- package/lib/view/dashboard/dashboardSelector.d.ts +0 -2
- package/lib/view/dashboard/dashboardSelector.js +2 -10
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.d.ts +1 -8
- package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.js +1 -3
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +4 -5
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +0 -2
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +3 -6
- 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 +2 -3
- 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 +5 -19
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.d.ts +3 -8
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.js +57 -39
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.d.ts +8 -13
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.js +12 -19
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.d.ts +0 -1
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.js +3 -4
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailState.d.ts +0 -2
- 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 +4 -6
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +4 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +0 -2
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +0 -3
- package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.js +2 -2
- package/lib/view/spendManagement/billPay/internationalWire/internationalWireSelector.d.ts +1 -2
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer.d.ts +1 -3
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer.js +2 -6
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.d.ts +3 -2
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.js +3 -3
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingState.d.ts +3 -1
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/initializeCardUserOnboardingLocalDataEpic.d.ts +2 -1
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/initializeCardUserOnboardingLocalDataEpic.js +21 -1
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/saveCardOnboardingUserDetailsEpic.js +3 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +0 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.js +0 -4
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +1 -8
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +2 -25
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.d.ts +0 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.js +4 -8
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +1 -2
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +14 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +13 -2
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +6 -3
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +17 -2
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +2 -8
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +15 -55
- package/lib/view/spendManagement/chargeCards/{issueChargeCard → chargeCardList}/issueChargeCardEpic.d.ts +2 -3
- package/lib/view/spendManagement/chargeCards/{issueChargeCard → chargeCardList}/issueChargeCardEpic.js +18 -35
- package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.d.ts +1 -1
- package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +6 -31
- package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.d.ts +2 -2
- package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js +2 -5
- package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +1 -4
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +2 -6
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +0 -1
- package/lib/view/spendManagement/commonSetup/types/businessVerification.d.ts +0 -4
- 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 +1 -4
- package/lib/view/vendorFiling1099/__mock__/json/vendorFiling1099ListSuccess.json +1 -4
- package/lib/view/vendorFiling1099/__mock__/vendorFiling1099ListMock.js +3 -12
- package/lib/view/vendorFiling1099/__mock__/vendorFiling1099ListSelectorMock.js +4 -2
- package/lib/view/vendorFiling1099/__mock__/vendorFiling1099UploadDetailsMock.d.ts +1 -4
- package/lib/view/vendorFiling1099/vendorFiling1099List/fetchVendorsFiling1099AllEpic.d.ts +2 -2
- package/lib/view/vendorFiling1099/vendorFiling1099List/fetchVendorsFiling1099AllEpic.js +7 -7
- package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListSelector.js +10 -21
- package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListState.d.ts +1 -1
- package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListState.js +0 -1
- package/lib/view/vendorReviewView/common/state/commonTypes.d.ts +1 -1
- package/lib/view/vendorReviewView/vendorFirstReviewView/epics/saveVendorFirstReviewViewEpic.js +3 -34
- 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 +5 -2
- package/package.json +1 -1
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.d.ts +0 -32
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +0 -60
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksReducer.d.ts +0 -12
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksReducer.js +0 -25
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksSelector.d.ts +0 -7
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksSelector.js +0 -36
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +0 -38
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.js +0 -10
- package/lib/view/accountMappingView/__mocks__/accountMappingSelectorMock.d.ts +0 -11
- package/lib/view/accountMappingView/__mocks__/accountMappingSelectorMock.js +0 -4607
- package/lib/view/countryList/countryListReducer.d.ts +0 -17
- package/lib/view/countryList/countryListReducer.js +0 -58
- package/lib/view/countryList/countryListSelector.d.ts +0 -7
- package/lib/view/countryList/countryListSelector.js +0 -13
- package/lib/view/countryList/countryListState.d.ts +0 -12
- package/lib/view/countryList/countryListState.js +0 -2
- package/lib/view/countryList/epics/fetchCountryListEpic.d.ts +0 -6
- package/lib/view/countryList/epics/fetchCountryListEpic.js +0 -19
- package/lib/view/countryList/epics/fetchNationalityCountryListEpic.d.ts +0 -7
- package/lib/view/countryList/epics/fetchNationalityCountryListEpic.js +0 -38
- package/lib/view/countryList/payloads/countryListPayload.d.ts +0 -6
- package/lib/view/countryList/payloads/countryListPayload.js +0 -10
- package/lib/view/countryList/payloads/nationalityCountryListPayload.d.ts +0 -11
- package/lib/view/countryList/payloads/nationalityCountryListPayload.js +0 -2
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.d.ts +0 -10
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +0 -72
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.d.ts +0 -11
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +0 -53
- package/lib/view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic.d.ts +0 -11
- package/lib/view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic.js +0 -66
- package/lib/view/expenseAutomationView/epics/fluxAnalysis/reviewFluxAnalysisEpic.d.ts +0 -7
- package/lib/view/expenseAutomationView/epics/fluxAnalysis/reviewFluxAnalysisEpic.js +0 -39
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.d.ts +0 -7
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +0 -22
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +0 -59
- package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +0 -78
- package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.d.ts +0 -6
- package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.js +0 -28
- package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.d.ts +0 -9
- package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.js +0 -78
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMissingReceiptsEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMissingReceiptsEpic.js +0 -58
- package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.d.ts +0 -10
- package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +0 -12
- package/lib/view/expenseAutomationView/expenseAutomationViewPayload.d.ts +0 -3
- package/lib/view/expenseAutomationView/expenseAutomationViewPayload.js +0 -2
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +0 -17
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +0 -66
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.d.ts +0 -3
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -97
- package/lib/view/expenseAutomationView/expenseAutomationViewState.d.ts +0 -11
- package/lib/view/expenseAutomationView/expenseAutomationViewState.js +0 -14
- package/lib/view/expenseAutomationView/helpers/helpers.d.ts +0 -7
- package/lib/view/expenseAutomationView/helpers/helpers.js +0 -67
- package/lib/view/expenseAutomationView/payload/fluxAnalysisPayload.d.ts +0 -76
- package/lib/view/expenseAutomationView/payload/fluxAnalysisPayload.js +0 -9
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +0 -36
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.js +0 -58
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +0 -16
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +0 -2
- package/lib/view/expenseAutomationView/reducers/fluxAnalysisViewReducer.d.ts +0 -34
- package/lib/view/expenseAutomationView/reducers/fluxAnalysisViewReducer.js +0 -205
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +0 -53
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +0 -245
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +0 -31
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +0 -130
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +0 -5
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +0 -45
- package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +0 -34
- package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.js +0 -44
- package/lib/view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes.d.ts +0 -32
- package/lib/view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes.js +0 -2
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -28
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.js +0 -2
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +0 -11
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.js +0 -2
- package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.d.ts +0 -3
- package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +0 -55
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +0 -7
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +0 -95
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.d.ts +0 -3
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +0 -61
- package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.d.ts +0 -53
- package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.js +0 -5
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -31
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -2
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +0 -20
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +0 -13
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +0 -28
- package/lib/view/expenseAutomationView/types/transactionsViewState.js +0 -15
- package/lib/view/monthEndCloseChecksView/epics/fetchMonthEndCloseChecksEpic.d.ts +0 -8
- package/lib/view/monthEndCloseChecksView/epics/fetchMonthEndCloseChecksEpic.js +0 -58
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewPayload.d.ts +0 -3
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewPayload.js +0 -2
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.d.ts +0 -16
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.js +0 -36
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.d.ts +0 -10
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.js +0 -27
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewState.d.ts +0 -5
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewState.js +0 -2
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.d.ts +0 -7
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +0 -36
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.d.ts +0 -6
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +0 -42
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.d.ts +0 -9
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.js +0 -67
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.d.ts +0 -26
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.js +0 -22
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.d.ts +0 -22
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +0 -89
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.d.ts +0 -15
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +0 -30
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.d.ts +0 -20
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.js +0 -2
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/updatePhysicalChargeCardAttemptEpic.d.ts +0 -11
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/updatePhysicalChargeCardAttemptEpic.js +0 -42
- package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.d.ts +0 -9
- package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.js +0 -44
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +0 -15
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +0 -65
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +0 -22
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +0 -76
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +0 -28
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.js +0 -23
- package/lib/view/vendor1099TypeList/vendor1099TypeListEpic.d.ts +0 -7
- package/lib/view/vendor1099TypeList/vendor1099TypeListEpic.js +0 -23
- package/lib/view/vendor1099TypeList/vendor1099TypeListPayload.d.ts +0 -15
- package/lib/view/vendor1099TypeList/vendor1099TypeListPayload.js +0 -2
- package/lib/view/vendor1099TypeList/vendor1099TypeListReducer.d.ts +0 -7
- package/lib/view/vendor1099TypeList/vendor1099TypeListReducer.js +0 -52
- package/lib/view/vendor1099TypeList/vendor1099TypeListState.d.ts +0 -9
- package/lib/view/vendor1099TypeList/vendor1099TypeListState.js +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.revokeCardInviteFailure = exports.revokeCardInviteSuccess = exports.revokeCardInvite = exports.resendCardInviteFailure = exports.resendCardInviteSuccess = exports.resendCardInvite = exports.clearChargeCardList = exports.updateChargeCardListUIState = exports.updateSearchText = exports.updateChargeCardListFailure = exports.updateChargeCardList = exports.fetchChargeCardList = exports.updateCreditAccountFailure = exports.updateCreditAccount = exports.fetchCreditAccount = exports.fetchChargeCardListPage = exports.initialState = void 0;
|
|
4
|
+
exports.revokeCardInviteFailure = exports.revokeCardInviteSuccess = exports.revokeCardInvite = exports.resendCardInviteFailure = exports.resendCardInviteSuccess = exports.resendCardInvite = exports.clearChargeCardList = exports.updateChargeCardListUIState = exports.updateSearchText = exports.resetIssueChargeCardForm = exports.issueChargeCardSuccessOrFailure = exports.updateChargeCardLocalStore = exports.issueChargeCard = exports.updateChargeCardListFailure = exports.updateChargeCardList = exports.fetchChargeCardList = exports.updateCreditAccountFailure = exports.updateCreditAccount = exports.fetchCreditAccount = exports.fetchChargeCardListPage = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const chargeCardList_1 = require("./chargeCardList");
|
|
7
7
|
const amount_1 = require("../../../../commonStateTypes/amount");
|
|
@@ -15,6 +15,7 @@ exports.initialState = {
|
|
|
15
15
|
hasValidState() {
|
|
16
16
|
return this.fetchState == 'Completed';
|
|
17
17
|
},
|
|
18
|
+
issueChargeCard: chargeCardList_1.initialIssueChargeCard,
|
|
18
19
|
uiState: {
|
|
19
20
|
sortKey: 'owner',
|
|
20
21
|
sortOrder: 'ascending',
|
|
@@ -70,6 +71,20 @@ const chargeCardList = (0, toolkit_1.createSlice)({
|
|
|
70
71
|
draft.fetchState = 'Error';
|
|
71
72
|
draft.error = action.payload;
|
|
72
73
|
},
|
|
74
|
+
issueChargeCard(draft) {
|
|
75
|
+
draft.issueChargeCard.saveStatus.fetchState = 'In-Progress';
|
|
76
|
+
draft.issueChargeCard.saveStatus.error = undefined;
|
|
77
|
+
},
|
|
78
|
+
updateChargeCardLocalStore(draft, action) {
|
|
79
|
+
draft.issueChargeCard.localData = action.payload;
|
|
80
|
+
},
|
|
81
|
+
resetIssueChargeCardForm(draft) {
|
|
82
|
+
draft.issueChargeCard = Object.assign({}, exports.initialState.issueChargeCard);
|
|
83
|
+
},
|
|
84
|
+
issueChargeCardSuccessOrFailure(draft, action) {
|
|
85
|
+
draft.issueChargeCard.saveStatus.fetchState = action.payload.fetchState;
|
|
86
|
+
draft.issueChargeCard.saveStatus.error = action.payload.error;
|
|
87
|
+
},
|
|
73
88
|
updateSearchText(draft, action) {
|
|
74
89
|
draft.searchText = action.payload;
|
|
75
90
|
},
|
|
@@ -128,7 +143,7 @@ const chargeCardList = (0, toolkit_1.createSlice)({
|
|
|
128
143
|
},
|
|
129
144
|
},
|
|
130
145
|
});
|
|
131
|
-
_a = chargeCardList.actions, exports.fetchChargeCardListPage = _a.fetchChargeCardListPage, exports.fetchCreditAccount = _a.fetchCreditAccount, exports.updateCreditAccount = _a.updateCreditAccount, exports.updateCreditAccountFailure = _a.updateCreditAccountFailure, exports.fetchChargeCardList = _a.fetchChargeCardList, exports.updateChargeCardList = _a.updateChargeCardList, exports.updateChargeCardListFailure = _a.updateChargeCardListFailure, exports.updateSearchText = _a.updateSearchText, exports.updateChargeCardListUIState = _a.updateChargeCardListUIState, exports.clearChargeCardList = _a.clearChargeCardList, exports.resendCardInvite = _a.resendCardInvite, exports.resendCardInviteSuccess = _a.resendCardInviteSuccess, exports.resendCardInviteFailure = _a.resendCardInviteFailure, exports.revokeCardInvite = _a.revokeCardInvite, exports.revokeCardInviteSuccess = _a.revokeCardInviteSuccess, exports.revokeCardInviteFailure = _a.revokeCardInviteFailure;
|
|
146
|
+
_a = chargeCardList.actions, exports.fetchChargeCardListPage = _a.fetchChargeCardListPage, exports.fetchCreditAccount = _a.fetchCreditAccount, exports.updateCreditAccount = _a.updateCreditAccount, exports.updateCreditAccountFailure = _a.updateCreditAccountFailure, exports.fetchChargeCardList = _a.fetchChargeCardList, exports.updateChargeCardList = _a.updateChargeCardList, exports.updateChargeCardListFailure = _a.updateChargeCardListFailure, exports.issueChargeCard = _a.issueChargeCard, exports.updateChargeCardLocalStore = _a.updateChargeCardLocalStore, exports.issueChargeCardSuccessOrFailure = _a.issueChargeCardSuccessOrFailure, exports.resetIssueChargeCardForm = _a.resetIssueChargeCardForm, exports.updateSearchText = _a.updateSearchText, exports.updateChargeCardListUIState = _a.updateChargeCardListUIState, exports.clearChargeCardList = _a.clearChargeCardList, exports.resendCardInvite = _a.resendCardInvite, exports.resendCardInviteSuccess = _a.resendCardInviteSuccess, exports.resendCardInviteFailure = _a.resendCardInviteFailure, exports.revokeCardInvite = _a.revokeCardInvite, exports.revokeCardInviteSuccess = _a.revokeCardInviteSuccess, exports.revokeCardInviteFailure = _a.revokeCardInviteFailure;
|
|
132
147
|
exports.default = chargeCardList.reducer;
|
|
133
148
|
// helper
|
|
134
149
|
const toCreditAccount = (payload) => ({
|
|
@@ -7,7 +7,7 @@ import { Class, ClassBase } from '../../../../entity/class/classState';
|
|
|
7
7
|
import { User } from '../../../../entity/user/userState';
|
|
8
8
|
import { UserRole } from '../../../../entity/userRole/userRoleState';
|
|
9
9
|
import { RootState } from '../../../../reducer';
|
|
10
|
-
import { ChargeCardListUIState, CreditAccount, ResendRevokeCardInvite } from './chargeCardList';
|
|
10
|
+
import { ChargeCardListUIState, CreditAccount, IssueChargeCard, ResendRevokeCardInvite } from './chargeCardList';
|
|
11
11
|
import { Person } from '../../../people/peopleSelectorTypes';
|
|
12
12
|
import { ChargeCardConfigState } from '../chargeCardConfig/chargeCardConfigState';
|
|
13
13
|
export interface ChargeCardWithUser extends ChargeCard {
|
|
@@ -18,14 +18,12 @@ export interface ChargeCardWithUser extends ChargeCard {
|
|
|
18
18
|
department?: ClassBase;
|
|
19
19
|
mailingAddress?: Address;
|
|
20
20
|
}
|
|
21
|
-
export interface ChargeCardWithUserAndShippingAddress extends ChargeCardWithUser {
|
|
22
|
-
shippingAddress?: Address;
|
|
23
|
-
}
|
|
24
21
|
export interface ChargeCardListSelectorView extends SelectorView {
|
|
25
22
|
totalCashback: Amount;
|
|
26
23
|
cards: ChargeCardWithUser[];
|
|
27
24
|
creditAccount: CreditAccount;
|
|
28
25
|
chargeCardConfig: ChargeCardConfigState;
|
|
26
|
+
issueChargeCard: IssueChargeCard;
|
|
29
27
|
userList: Person[];
|
|
30
28
|
allAccountingClasses: Class[];
|
|
31
29
|
issueCardPageFetchState: FetchStateAndError;
|
|
@@ -35,10 +33,6 @@ export interface ChargeCardListSelectorView extends SelectorView {
|
|
|
35
33
|
revokeCardInvite: ResendRevokeCardInvite;
|
|
36
34
|
unAssignedCredits?: Amount;
|
|
37
35
|
}
|
|
38
|
-
export interface ChargeCardListWithShippingAddressSelectorView extends SelectorView {
|
|
39
|
-
cards: ChargeCardWithUserAndShippingAddress[];
|
|
40
|
-
}
|
|
41
36
|
export declare const getChargeCardListView: (state: RootState, includeCreditAccountAndCashbackInfo: boolean) => ChargeCardListSelectorView;
|
|
42
|
-
export declare const getMyChargeCardListWithShippingAddress: (state: RootState) => ChargeCardListWithShippingAddressSelectorView;
|
|
43
37
|
export declare const anyCardOnHold: (cards: ChargeCardWithUser[]) => boolean;
|
|
44
38
|
export declare const getCreditAccount: (state: RootState) => CreditAccount;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getCreditAccount = exports.anyCardOnHold = exports.
|
|
6
|
+
exports.getCreditAccount = exports.anyCardOnHold = exports.getChargeCardListView = void 0;
|
|
7
7
|
const orderBy_1 = __importDefault(require("lodash/orderBy"));
|
|
8
8
|
const reduceFetchState_1 = require("../../../../commonStateTypes/reduceFetchState");
|
|
9
9
|
const sortOrderPayload_1 = require("../../../../commonPayloadTypes/sortOrderPayload");
|
|
@@ -79,8 +79,6 @@ const getChargeCardListView = (state, includeCreditAccountAndCashbackInfo) => {
|
|
|
79
79
|
return card.cardName.toLowerCase();
|
|
80
80
|
case 'department':
|
|
81
81
|
return (_d = (_c = card.department) === null || _c === void 0 ? void 0 : _c.className.toLowerCase()) !== null && _d !== void 0 ? _d : '';
|
|
82
|
-
case 'status':
|
|
83
|
-
return card.status.code;
|
|
84
82
|
case 'utilisation':
|
|
85
83
|
return card.limit.amount - card.available.amount;
|
|
86
84
|
case 'limit':
|
|
@@ -88,7 +86,19 @@ const getChargeCardListView = (state, includeCreditAccountAndCashbackInfo) => {
|
|
|
88
86
|
return card.limit.amount;
|
|
89
87
|
}
|
|
90
88
|
};
|
|
91
|
-
|
|
89
|
+
let inviteAcceptedCards = [];
|
|
90
|
+
let inviteNotAcceptedCards = [];
|
|
91
|
+
chargeCardsWithUserFiltered.forEach((card) => {
|
|
92
|
+
if (card.status.code !== 'request_on_hold') {
|
|
93
|
+
inviteAcceptedCards.push(card);
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
inviteNotAcceptedCards.push(card);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
inviteAcceptedCards = (0, orderBy_1.default)(inviteAcceptedCards, (person) => getCardsBySortKey(person, sortKey), sortOrder);
|
|
100
|
+
inviteNotAcceptedCards = (0, orderBy_1.default)(inviteNotAcceptedCards, (person) => getCardsBySortKey(person, sortKey), sortOrder);
|
|
101
|
+
const cardsInOrder = [...inviteAcceptedCards, ...inviteNotAcceptedCards];
|
|
92
102
|
const userListSelectorView = (0, userListViewSelector_1.getUserList)(userState, userRoleState, userListViewState, 'cardHolderCandidate');
|
|
93
103
|
const userList = userListSelectorView.users;
|
|
94
104
|
const fetchState = includeCreditAccountAndCashbackInfo === true
|
|
@@ -117,6 +127,7 @@ const getChargeCardListView = (state, includeCreditAccountAndCashbackInfo) => {
|
|
|
117
127
|
unAssignedCredits: chargeCardListState.unAssignedCredits,
|
|
118
128
|
creditAccount: chargeCardListState.creditAccount,
|
|
119
129
|
chargeCardConfig: chargeCardConfigState,
|
|
130
|
+
issueChargeCard: chargeCardListState.issueChargeCard,
|
|
120
131
|
userList,
|
|
121
132
|
allAccountingClasses,
|
|
122
133
|
issueCardPageFetchState,
|
|
@@ -128,57 +139,6 @@ const getChargeCardListView = (state, includeCreditAccountAndCashbackInfo) => {
|
|
|
128
139
|
};
|
|
129
140
|
};
|
|
130
141
|
exports.getChargeCardListView = getChargeCardListView;
|
|
131
|
-
const getMyChargeCardListWithShippingAddress = (state) => {
|
|
132
|
-
var _a, _b;
|
|
133
|
-
const { tenantState, addressState, chargeCardListState, chargeCardState, classState, userState, userRoleState, chargeCardConfigState, } = state;
|
|
134
|
-
const userId = (_b = (_a = tenantState.loggedInUser) === null || _a === void 0 ? void 0 : _a.userId) !== null && _b !== void 0 ? _b : '';
|
|
135
|
-
const cards = (0, chargeCardSelector_1.getChargeCardsByIds)(chargeCardState, chargeCardListState.cardIds);
|
|
136
|
-
const chargeCardsWithUserAndShippingAddress = [];
|
|
137
|
-
cards
|
|
138
|
-
.filter((chargeCard) => chargeCard.cardHolderUserId === userId)
|
|
139
|
-
.forEach((chargeCard) => {
|
|
140
|
-
const cardHolderUser = (0, userSelector_1.getUserByUserId)(userState, chargeCard.cardHolderUserId);
|
|
141
|
-
const cardCreatedByUser = (0, userSelector_1.getUserByUserId)(userState, chargeCard.cardCreaterUserId);
|
|
142
|
-
const cardHolderUserRole = (0, userRoleSelector_1.getUserRoleByUserId)(userRoleState, chargeCard.cardHolderUserId);
|
|
143
|
-
const department = cardHolderUserRole != null
|
|
144
|
-
? (0, classSelector_1.getClassById)(classState, {
|
|
145
|
-
classId: cardHolderUserRole.accountingClassIDs[0],
|
|
146
|
-
reportId: 'class_list',
|
|
147
|
-
})
|
|
148
|
-
: undefined;
|
|
149
|
-
const mailingAddress = chargeCard.mailingAddressId != null
|
|
150
|
-
? (0, addressSelector_1.getAddressByAddressId)(addressState, chargeCard.mailingAddressId)
|
|
151
|
-
: undefined;
|
|
152
|
-
const billingAddress = (0, addressSelector_1.getAddressByAddressId)(addressState, chargeCard.billingAddressId);
|
|
153
|
-
const shippingAddress = chargeCard.shippingAddressId != null
|
|
154
|
-
? (0, addressSelector_1.getAddressByAddressId)(addressState, chargeCard.shippingAddressId)
|
|
155
|
-
: undefined;
|
|
156
|
-
if (cardCreatedByUser == null ||
|
|
157
|
-
cardHolderUser == null ||
|
|
158
|
-
cardHolderUserRole == null ||
|
|
159
|
-
billingAddress == null) {
|
|
160
|
-
console.error(`Cannot find details for card ${chargeCard.cardName} id ${chargeCard.id} - Created by ${cardCreatedByUser === null || cardCreatedByUser === void 0 ? void 0 : cardCreatedByUser.firstName}, for ${cardHolderUser === null || cardHolderUser === void 0 ? void 0 : cardHolderUser.firstName} with role ${cardHolderUserRole} and billing address in ${billingAddress === null || billingAddress === void 0 ? void 0 : billingAddress.country}.`);
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
chargeCardsWithUserAndShippingAddress.push(Object.assign(Object.assign({}, chargeCard), { cardHolderUser,
|
|
164
|
-
cardCreatedByUser, cardHolderRoles: cardHolderUserRole, billingAddress,
|
|
165
|
-
department,
|
|
166
|
-
mailingAddress,
|
|
167
|
-
shippingAddress }));
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
const fetchState = (0, reduceFetchState_1.reduceFetchState)([
|
|
171
|
-
chargeCardListState,
|
|
172
|
-
chargeCardConfigState,
|
|
173
|
-
]).fetchState;
|
|
174
|
-
return {
|
|
175
|
-
fetchState,
|
|
176
|
-
error: chargeCardListState.error,
|
|
177
|
-
cards: chargeCardsWithUserAndShippingAddress,
|
|
178
|
-
version: '1.0',
|
|
179
|
-
};
|
|
180
|
-
};
|
|
181
|
-
exports.getMyChargeCardListWithShippingAddress = getMyChargeCardListWithShippingAddress;
|
|
182
142
|
const anyCardOnHold = (cards) => {
|
|
183
143
|
return cards.reduce((prevValue, currentValue) => {
|
|
184
144
|
return (prevValue === true && currentValue.status.code === 'request_on_hold');
|
|
@@ -6,8 +6,7 @@ import { updateChargeCards } from '../../../../entity/chargeCard/chargeCardReduc
|
|
|
6
6
|
import { updateAllUsers } from '../../../../entity/user/userReducer';
|
|
7
7
|
import { updateUserRoles } from '../../../../entity/userRole/userRoleReducer';
|
|
8
8
|
import { updateAddresses } from '../../../../entity/address/addressReducer';
|
|
9
|
+
import { issueChargeCard, issueChargeCardSuccessOrFailure, updateChargeCardList } from './chargeCardListReducer';
|
|
9
10
|
import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
10
|
-
|
|
11
|
-
import { updateChargeCardList } from '../chargeCardList/chargeCardListReducer';
|
|
12
|
-
export declare type ActionType = ReturnType<typeof issueChargeCards> | ReturnType<typeof updateChargeCards> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateUserRoles> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateChargeCardList> | ReturnType<typeof issueChargeCardSuccessOrFailure> | ReturnType<typeof updateAddresses>;
|
|
11
|
+
export declare type ActionType = ReturnType<typeof issueChargeCard> | ReturnType<typeof updateChargeCards> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateUserRoles> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateChargeCardList> | ReturnType<typeof issueChargeCardSuccessOrFailure> | ReturnType<typeof updateAddresses>;
|
|
13
12
|
export declare const issueChargeCardEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -8,39 +8,22 @@ const chargeCardReducer_1 = require("../../../../entity/chargeCard/chargeCardRed
|
|
|
8
8
|
const userReducer_1 = require("../../../../entity/user/userReducer");
|
|
9
9
|
const userRoleReducer_1 = require("../../../../entity/userRole/userRoleReducer");
|
|
10
10
|
const addressReducer_1 = require("../../../../entity/address/addressReducer");
|
|
11
|
+
const chargeCardListReducer_1 = require("./chargeCardListReducer");
|
|
11
12
|
const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
const issueChargeCardEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(issueChargeCardReducer_1.issueChargeCards.match), (0, operators_1.switchMap)(() => {
|
|
13
|
+
const issueChargeCardEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(chargeCardListReducer_1.issueChargeCard.match), (0, operators_1.switchMap)(() => {
|
|
14
|
+
var _a, _b, _c, _d;
|
|
15
15
|
const state = state$.value;
|
|
16
|
-
const localData = state.
|
|
17
|
-
const payload =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
credit_limit_frequency: { code: data.physicalCard.frequency },
|
|
28
|
-
card_type: data.cardType,
|
|
29
|
-
shipping_address_type: data.physicalCard.addressType,
|
|
30
|
-
shipping_address_id: data.physicalCard.addressId,
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
return {
|
|
35
|
-
card_holder_user_ids: data.virtualCard.userIds,
|
|
36
|
-
card_name: data.virtualCard.cardName,
|
|
37
|
-
credit_limit: (_f = (_e = data.virtualCard.amount) === null || _e === void 0 ? void 0 : _e.amount) !== null && _f !== void 0 ? _f : 0,
|
|
38
|
-
currency_code: (_h = (_g = data.virtualCard.amount) === null || _g === void 0 ? void 0 : _g.currencyCode) !== null && _h !== void 0 ? _h : 'USD',
|
|
39
|
-
credit_limit_frequency: { code: data.virtualCard.frequency },
|
|
40
|
-
card_type: data.cardType,
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
});
|
|
16
|
+
const localData = state.chargeCardListState.issueChargeCard.localData;
|
|
17
|
+
const payload = [
|
|
18
|
+
{
|
|
19
|
+
card_holder_user_ids: localData.userIds,
|
|
20
|
+
card_name: localData.cardName,
|
|
21
|
+
credit_limit: (_b = (_a = localData.amount) === null || _a === void 0 ? void 0 : _a.amount) !== null && _b !== void 0 ? _b : 0,
|
|
22
|
+
currency_code: (_d = (_c = localData.amount) === null || _c === void 0 ? void 0 : _c.currencyCode) !== null && _d !== void 0 ? _d : 'USD',
|
|
23
|
+
credit_limit_frequency: { code: localData.frequency },
|
|
24
|
+
card_type: 'business_virtual_credit_card',
|
|
25
|
+
},
|
|
26
|
+
];
|
|
44
27
|
return zeniAPI
|
|
45
28
|
.postAndGetJSON(`${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/cards`, { cards: payload })
|
|
46
29
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
@@ -49,7 +32,7 @@ const issueChargeCardEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, ope
|
|
|
49
32
|
actions.push((0, chargeCardReducer_1.updateChargeCards)(response.data.cards), (0, userReducer_1.updateAllUsers)({ users: response.data.users }), (0, userRoleReducer_1.updateUserRoles)(response.data.user_roles), (0, chargeCardListReducer_1.updateChargeCardList)({
|
|
50
33
|
chargeCardListPayload: response.data,
|
|
51
34
|
keepExistingListItems: true,
|
|
52
|
-
}), (0, addressReducer_1.updateAddresses)(response.data.addresses), (0,
|
|
35
|
+
}), (0, addressReducer_1.updateAddresses)(response.data.addresses), (0, chargeCardListReducer_1.issueChargeCardSuccessOrFailure)({ fetchState: 'Completed' }));
|
|
53
36
|
const cardHolderIds = response.data.cards.map((card) => card.holder_user_id);
|
|
54
37
|
const names = response.data.users
|
|
55
38
|
.filter((user) => cardHolderIds.includes(user.user_id))
|
|
@@ -62,20 +45,20 @@ const issueChargeCardEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, ope
|
|
|
62
45
|
variables: [
|
|
63
46
|
{
|
|
64
47
|
variableName: '_user-name_',
|
|
65
|
-
variableValue: names,
|
|
48
|
+
variableValue: names !== null && names !== void 0 ? names : '',
|
|
66
49
|
},
|
|
67
50
|
],
|
|
68
51
|
}));
|
|
69
52
|
return (0, rxjs_1.from)(actions);
|
|
70
53
|
}
|
|
71
54
|
else {
|
|
72
|
-
return (0, rxjs_1.of)((0,
|
|
55
|
+
return (0, rxjs_1.of)((0, chargeCardListReducer_1.issueChargeCardSuccessOrFailure)({
|
|
73
56
|
fetchState: 'Error',
|
|
74
57
|
error: response.status,
|
|
75
58
|
}));
|
|
76
59
|
}
|
|
77
60
|
}), (0, operators_1.catchError)((error) => {
|
|
78
|
-
return (0, rxjs_1.of)((0,
|
|
61
|
+
return (0, rxjs_1.of)((0, chargeCardListReducer_1.issueChargeCardSuccessOrFailure)({
|
|
79
62
|
fetchState: 'Error',
|
|
80
63
|
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Issue Charge Card REST API call errored out' +
|
|
81
64
|
JSON.stringify(error)),
|
package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.d.ts
CHANGED
|
@@ -16,6 +16,6 @@ import { CompanyDetailsVerificationPayload, CompanyOfficerVerificationPayload, N
|
|
|
16
16
|
import { CompanyDetailsLocalData, CompanyOfficerLocalData, PrimaryContactLocalData } from '../../setupViewState';
|
|
17
17
|
export declare type ActionType = ReturnType<typeof updateBusinessVerificationDetails> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateUserRoles> | ReturnType<typeof updateCompanies> | ReturnType<typeof updateAddresses> | ReturnType<typeof updateFiles> | ReturnType<typeof updateAccounts> | ReturnType<typeof updatePaymentAccounts> | ReturnType<typeof updateSetupViewLocalStoreData> | ReturnType<typeof updateSelectedCompanyOfficer> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateBusinessVerificationDetailsSuccess> | ReturnType<typeof updateBusinessVerificationDetailsFailure>;
|
|
18
18
|
export declare const updateBusinessVerificationDetailsEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
19
|
-
export declare const toBusinessVerificationCompanyDataPayload: (companyLocalData: CompanyDetailsLocalData, sendForVerification: boolean, companyAddressData?: AddressUpdatableInfo | undefined
|
|
19
|
+
export declare const toBusinessVerificationCompanyDataPayload: (companyLocalData: CompanyDetailsLocalData, sendForVerification: boolean, companyAddressData?: AddressUpdatableInfo | undefined) => Partial<CompanyDetailsVerificationPayload>;
|
|
20
20
|
export declare const toBusinessVerificationPrimaryContactDataPayload: (primaryContact: PrimaryContactLocalData, isNewPrimaryContactUser: boolean) => Partial<PrimaryContactVerificationPayload>;
|
|
21
21
|
export declare const toBusinessVerificationOfficerDataPayload: (companyOfficer: CompanyOfficerLocalData, isSubmittingAdditionalDocuments: boolean, companyOfficerAddressData?: AddressUpdatableInfo | undefined) => Partial<CompanyOfficerVerificationPayload> | Partial<NewCompanyOfficerVerificationPayload>;
|
package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.toBusinessVerificationOfficerDataPayload = exports.toBusinessVerificationPrimaryContactDataPayload = exports.toBusinessVerificationCompanyDataPayload = exports.updateBusinessVerificationDetailsEpic = void 0;
|
|
7
4
|
const rxjs_1 = require("rxjs");
|
|
@@ -18,10 +15,8 @@ const paymentAccountReducer_1 = require("../../../../../entity/paymentAccount/pa
|
|
|
18
15
|
const addressViewPayload_1 = require("../../../../addressView/addressViewPayload");
|
|
19
16
|
const getCompanyView_1 = require("../../../../companyView/selectorHelpers/getCompanyView");
|
|
20
17
|
const setupViewReducer_1 = require("../../setupViewReducer");
|
|
21
|
-
const addressViewSelector_1 = require("../../../../addressView/addressViewSelector");
|
|
22
|
-
const isEqual_1 = __importDefault(require("lodash/isEqual"));
|
|
23
18
|
const updateBusinessVerificationDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(setupViewReducer_1.updateBusinessVerificationDetails.match), (0, operators_1.mergeMap)((action) => {
|
|
24
|
-
var _a, _b, _c
|
|
19
|
+
var _a, _b, _c;
|
|
25
20
|
const { companyId, officerType, setupViewType, sendForVerification, fromBillListScreen, isSubmittingAdditionalDocuments, } = action.payload;
|
|
26
21
|
const { setupViewState } = state$.value;
|
|
27
22
|
const companyLocalData = setupViewState.companyDetails.localData;
|
|
@@ -31,15 +26,14 @@ const updateBusinessVerificationDetailsEpic = (actions$, state$, zeniAPI) => act
|
|
|
31
26
|
const companyView = (0, getCompanyView_1.getCompanyView)(state$.value, companyId, []);
|
|
32
27
|
const { newAddressState } = state$.value.addressViewState;
|
|
33
28
|
const companyAddressToCreate = (_a = newAddressState === null || newAddressState === void 0 ? void 0 : newAddressState.company_address) === null || _a === void 0 ? void 0 : _a.addressToCreate;
|
|
34
|
-
const registeredAddressToCreate = (_b = newAddressState === null || newAddressState === void 0 ? void 0 : newAddressState.company_registered_address) === null || _b === void 0 ? void 0 : _b.addressToCreate;
|
|
35
29
|
const addressType = officerType
|
|
36
30
|
.toLowerCase()
|
|
37
31
|
.concat('_address');
|
|
38
|
-
const companyOfficerAddressToCreate = (
|
|
32
|
+
const companyOfficerAddressToCreate = (_b = newAddressState === null || newAddressState === void 0 ? void 0 : newAddressState[addressType]) === null || _b === void 0 ? void 0 : _b.addressToCreate;
|
|
39
33
|
const isNewPrimaryContactUser = (primaryContactLocalData === null || primaryContactLocalData === void 0 ? void 0 : primaryContactLocalData.userId) == null ||
|
|
40
34
|
(primaryContactLocalData === null || primaryContactLocalData === void 0 ? void 0 : primaryContactLocalData.email) !==
|
|
41
|
-
((
|
|
42
|
-
const company = (0, exports.toBusinessVerificationCompanyDataPayload)(companyLocalData, sendForVerification, companyAddressToCreate
|
|
35
|
+
((_c = companyView === null || companyView === void 0 ? void 0 : companyView.primaryContact) === null || _c === void 0 ? void 0 : _c.user.email);
|
|
36
|
+
const company = (0, exports.toBusinessVerificationCompanyDataPayload)(companyLocalData, sendForVerification, companyAddressToCreate);
|
|
43
37
|
const primary_contact_user = primaryContactLocalData != null &&
|
|
44
38
|
Boolean(primaryContactLocalData.email) === true // Don't save Empty Primary Contact details
|
|
45
39
|
? (0, exports.toBusinessVerificationPrimaryContactDataPayload)(primaryContactLocalData, isNewPrimaryContactUser)
|
|
@@ -110,7 +104,7 @@ const updateBusinessVerificationDetailsEpic = (actions$, state$, zeniAPI) => act
|
|
|
110
104
|
}
|
|
111
105
|
}));
|
|
112
106
|
exports.updateBusinessVerificationDetailsEpic = updateBusinessVerificationDetailsEpic;
|
|
113
|
-
const toBusinessVerificationCompanyDataPayload = (companyLocalData, sendForVerification, companyAddressData
|
|
107
|
+
const toBusinessVerificationCompanyDataPayload = (companyLocalData, sendForVerification, companyAddressData) => {
|
|
114
108
|
const { companyDescription, companyLegalName, companyIndustry, website, incDate, taxIdOrEIN, phone, syncToken, fileIds, typeOfIncorporation, } = companyLocalData;
|
|
115
109
|
const company = {
|
|
116
110
|
is_ready_for_verification: sendForVerification,
|
|
@@ -119,19 +113,6 @@ const toBusinessVerificationCompanyDataPayload = (companyLocalData, sendForVerif
|
|
|
119
113
|
const companyAddressPayload = companyAddressData != null
|
|
120
114
|
? (0, addressViewPayload_1.toAddressUpdatableInfoPayload)(companyAddressData)
|
|
121
115
|
: undefined;
|
|
122
|
-
const registeredAddressPayload = registeredAddressData != null
|
|
123
|
-
? (0, addressViewPayload_1.toAddressUpdatableInfoPayload)(registeredAddressData)
|
|
124
|
-
: undefined;
|
|
125
|
-
if ((0, isEqual_1.default)(companyAddressData != null
|
|
126
|
-
? (0, addressViewSelector_1.getFormattedAddress)(companyAddressData)
|
|
127
|
-
: companyAddressData, registeredAddressData != null
|
|
128
|
-
? (0, addressViewSelector_1.getFormattedAddress)(registeredAddressData)
|
|
129
|
-
: registeredAddressData)) {
|
|
130
|
-
company['is_registered_address_same_as_company_address'] = true;
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
company['is_registered_address_same_as_company_address'] = false;
|
|
134
|
-
}
|
|
135
116
|
if (companyDescription != null) {
|
|
136
117
|
company['company_description'] = companyDescription;
|
|
137
118
|
}
|
|
@@ -156,9 +137,6 @@ const toBusinessVerificationCompanyDataPayload = (companyLocalData, sendForVerif
|
|
|
156
137
|
if (companyAddressPayload != null) {
|
|
157
138
|
company['address'] = companyAddressPayload;
|
|
158
139
|
}
|
|
159
|
-
if (registeredAddressPayload != null) {
|
|
160
|
-
company['registered_address'] = registeredAddressPayload;
|
|
161
|
-
}
|
|
162
140
|
if (typeOfIncorporation != null) {
|
|
163
141
|
company['company_inc_type'] = typeOfIncorporation;
|
|
164
142
|
}
|
|
@@ -185,7 +163,7 @@ const toBusinessVerificationPrimaryContactDataPayload = (primaryContact, isNewPr
|
|
|
185
163
|
};
|
|
186
164
|
exports.toBusinessVerificationPrimaryContactDataPayload = toBusinessVerificationPrimaryContactDataPayload;
|
|
187
165
|
const toBusinessVerificationOfficerDataPayload = (companyOfficer, isSubmittingAdditionalDocuments, companyOfficerAddressData) => {
|
|
188
|
-
const { firstName, lastName, userId, email, syncToken: userSyncToken, ssn, birthday,
|
|
166
|
+
const { firstName, lastName, userId, email, syncToken: userSyncToken, ssn, birthday, phone: userPhone, otpChallenge, isPhoneVerified, titleAtCompany, ownershipInCompany, documentTypeSelectedForVerification, fileIds: userFileIds, additionalSubmittedDocumentsForVerificationFileIds, } = companyOfficer;
|
|
189
167
|
const company_officer = {
|
|
190
168
|
first_name: firstName,
|
|
191
169
|
last_name: lastName,
|
|
@@ -216,9 +194,6 @@ const toBusinessVerificationOfficerDataPayload = (companyOfficer, isSubmittingAd
|
|
|
216
194
|
if (birthday != null) {
|
|
217
195
|
company_officer['birthday'] = birthday.format('YYYY-MM-DD');
|
|
218
196
|
}
|
|
219
|
-
if (nationalityCountryCode != null) {
|
|
220
|
-
company_officer['nationality_country_code'] = nationalityCountryCode;
|
|
221
|
-
}
|
|
222
197
|
if (userPhone != null) {
|
|
223
198
|
company_officer['phone'] = userPhone;
|
|
224
199
|
}
|
package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import { Company } from '../../../../../entity/company/companyStateTypes';
|
|
|
5
5
|
import { clearSetupViewDataInLocalStore, saveSetupViewDataInLocalStore, updateSetupViewLocalStoreData } from '../../setupViewReducer';
|
|
6
6
|
import { SetupViewLocalData } from '../../setupViewState';
|
|
7
7
|
import { UserRole } from '../../../../../entity/userRole/userRoleState';
|
|
8
|
-
import { newAddressInLocalStore,
|
|
9
|
-
export declare type ActionType = ReturnType<typeof updateSetupViewLocalStoreData> | ReturnType<typeof saveSetupViewDataInLocalStore> | ReturnType<typeof clearSetupViewDataInLocalStore> | ReturnType<typeof
|
|
8
|
+
import { newAddressInLocalStore, resetNewAddressesInLocalStore } from '../../../../addressView/addressViewReducer';
|
|
9
|
+
export declare type ActionType = ReturnType<typeof updateSetupViewLocalStoreData> | ReturnType<typeof saveSetupViewDataInLocalStore> | ReturnType<typeof clearSetupViewDataInLocalStore> | ReturnType<typeof resetNewAddressesInLocalStore> | ReturnType<typeof newAddressInLocalStore>;
|
|
10
10
|
export declare const updateSetupViewLocalStoreDataEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => import("rxjs").Observable<ActionType>;
|
|
11
11
|
/**
|
|
12
12
|
* Helpers
|
package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js
CHANGED
|
@@ -29,8 +29,7 @@ const updateSetupViewLocalStoreDataEpic = (actions$, state$) => actions$.pipe((0
|
|
|
29
29
|
const fetchActions = [];
|
|
30
30
|
if (company != null) {
|
|
31
31
|
const setupViewLocalData = toSetupViewLocalData(company, companyOfficers, companyOfficerRoles, primaryContact);
|
|
32
|
-
fetchActions.push((0, setupViewReducer_1.clearSetupViewDataInLocalStore)(), (0, setupViewReducer_1.saveSetupViewDataInLocalStore)(setupViewLocalData));
|
|
33
|
-
fetchActions.push((0, addressViewReducer_1.resetNewAddressDataInLocalStoreForAddressTypes)(companyUsersLocalData_1.AllCompanyPassportAddressTypes));
|
|
32
|
+
fetchActions.push((0, setupViewReducer_1.clearSetupViewDataInLocalStore)(), (0, setupViewReducer_1.saveSetupViewDataInLocalStore)(setupViewLocalData), (0, addressViewReducer_1.resetNewAddressesInLocalStore)());
|
|
34
33
|
}
|
|
35
34
|
if (companyView != null) {
|
|
36
35
|
const addresses = (0, toAddressViewLocalData_1.toAddressViewLocalData)(companyView);
|
|
@@ -91,7 +90,7 @@ function toSetupViewLocalData(company, users, userRoles, primaryContact) {
|
|
|
91
90
|
}
|
|
92
91
|
const officers = companyOfficers.map((user, index) => {
|
|
93
92
|
var _a, _b, _c, _d, _e;
|
|
94
|
-
const { userId, firstName, lastName, birthday, email,
|
|
93
|
+
const { userId, firstName, lastName, birthday, email, phone: userPhone, isPhoneVerified, ssn, syncToken, } = user;
|
|
95
94
|
const userRole = userRoles.find((userRole) => userRole.userId === userId);
|
|
96
95
|
return {
|
|
97
96
|
officerType: `Officer_${index + 1}`,
|
|
@@ -100,7 +99,6 @@ function toSetupViewLocalData(company, users, userRoles, primaryContact) {
|
|
|
100
99
|
lastName,
|
|
101
100
|
birthday,
|
|
102
101
|
email,
|
|
103
|
-
nationalityCountryCode,
|
|
104
102
|
phone: userPhone,
|
|
105
103
|
isPhoneVerified,
|
|
106
104
|
ssn,
|
|
@@ -124,7 +122,6 @@ function toSetupViewLocalData(company, users, userRoles, primaryContact) {
|
|
|
124
122
|
firstName: '',
|
|
125
123
|
lastName: '',
|
|
126
124
|
email: '',
|
|
127
|
-
nationalityCountryCode: undefined,
|
|
128
125
|
fileIds: [],
|
|
129
126
|
isSelectedForVerification: false,
|
|
130
127
|
additionalDocumentTypesRequestedForVerification: [],
|
|
@@ -16,7 +16,6 @@ import { DepositAccount } from '../../../entity/depositAccount/depositAccount';
|
|
|
16
16
|
import { AllowedValueWithCode } from '../../../commonStateTypes/allowedValue';
|
|
17
17
|
import { Amount } from '../../../commonStateTypes/amount';
|
|
18
18
|
import { BalanceChange } from '../../../commonStateTypes/balance';
|
|
19
|
-
import { Country } from '../../countryList/countryListState';
|
|
20
19
|
export interface SetupView {
|
|
21
20
|
allFundingAccounts: FundingAccount[];
|
|
22
21
|
allBankAccounts: AccountBase[];
|
|
@@ -73,7 +72,6 @@ export interface CompanyDetails {
|
|
|
73
72
|
incDate?: ZeniDate;
|
|
74
73
|
syncToken?: string;
|
|
75
74
|
addressStatus?: NewAddressData;
|
|
76
|
-
registeredAddressStatus?: NewAddressData;
|
|
77
75
|
primaryContactLocalData?: PrimaryContactLocalData;
|
|
78
76
|
typeOfIncorporation?: string;
|
|
79
77
|
}
|
|
@@ -82,9 +80,8 @@ interface CompanyAndOfficerLocalData {
|
|
|
82
80
|
companyOfficerLocalData: Record<CompanyOfficerType, CompanyOfficersDetails | undefined>;
|
|
83
81
|
}
|
|
84
82
|
export interface BusinessVerificationDetails extends CompanyAndOfficerLocalData {
|
|
85
|
-
updateStatus: FetchStateAndError;
|
|
86
|
-
allNationalityCountries: Country[];
|
|
87
83
|
companyView?: CompanyView;
|
|
84
|
+
updateStatus: FetchStateAndError;
|
|
88
85
|
}
|
|
89
86
|
export declare function getCommonSetupViewDetails(state: RootState, companyId: ID, setupViewType: SetupViewType, plaidAccountKeyType: PlaidAccountKeyType): SetupView;
|
|
90
87
|
export declare function getBusinessVerificationDetails(state: RootState, companyId: ID): BusinessVerificationDetails;
|
|
@@ -82,7 +82,7 @@ function getPrimaryAccountForTheProduct(state, companyId, setupViewType) {
|
|
|
82
82
|
return primaryFundingAccount;
|
|
83
83
|
}
|
|
84
84
|
function getBusinessVerificationDetails(state, companyId) {
|
|
85
|
-
const { setupViewState
|
|
85
|
+
const { setupViewState } = state;
|
|
86
86
|
const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails, updateStatus, } = setupViewState;
|
|
87
87
|
const companyView = (0, getCompanyView_1.getCompanyView)(state, companyId, []);
|
|
88
88
|
const { companyDetailsLocalData, companyOfficerLocalData } = (0, exports.getCompanyAndIdentityDetails)(state, companyId, {
|
|
@@ -90,18 +90,16 @@ function getBusinessVerificationDetails(state, companyId) {
|
|
|
90
90
|
companyOfficerUpdateStatus,
|
|
91
91
|
primaryContactDetails,
|
|
92
92
|
});
|
|
93
|
-
const allNationalityCountries = countryListState.byCountryListCode.nationalityCountryList.countries;
|
|
94
93
|
return {
|
|
95
94
|
companyDetailsLocalData,
|
|
96
95
|
companyOfficerLocalData,
|
|
97
96
|
companyView,
|
|
98
97
|
updateStatus,
|
|
99
|
-
allNationalityCountries,
|
|
100
98
|
};
|
|
101
99
|
}
|
|
102
100
|
exports.getBusinessVerificationDetails = getBusinessVerificationDetails;
|
|
103
101
|
const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetails) => {
|
|
104
|
-
var _a
|
|
102
|
+
var _a;
|
|
105
103
|
const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails } = companyAndIdentityDetails;
|
|
106
104
|
const { fileState, addressViewState } = state;
|
|
107
105
|
const { localData: primaryContactLocalData } = primaryContactDetails;
|
|
@@ -117,7 +115,6 @@ const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetail
|
|
|
117
115
|
updateFileStatusById[fileId] = (0, fileViewSelector_1.getFileUpdateNameStatusById)(state, fileId);
|
|
118
116
|
});
|
|
119
117
|
const companyAddress = (_a = addressViewState.newAddressState) === null || _a === void 0 ? void 0 : _a.company_address;
|
|
120
|
-
const registeredCompanyAddress = (_b = addressViewState.newAddressState) === null || _b === void 0 ? void 0 : _b.company_registered_address;
|
|
121
118
|
companyDetailsLocalData = {
|
|
122
119
|
companyId,
|
|
123
120
|
companyDescription,
|
|
@@ -132,7 +129,6 @@ const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetail
|
|
|
132
129
|
deleteFileStatusById,
|
|
133
130
|
updateFileStatusById,
|
|
134
131
|
addressStatus: companyAddress,
|
|
135
|
-
registeredAddressStatus: registeredCompanyAddress,
|
|
136
132
|
primaryContactLocalData,
|
|
137
133
|
typeOfIncorporation,
|
|
138
134
|
};
|
|
@@ -8,7 +8,6 @@ export interface CompanyOfficerVerificationPayload {
|
|
|
8
8
|
sync_token: string;
|
|
9
9
|
ssn: string;
|
|
10
10
|
birthday: string;
|
|
11
|
-
nationality_country_code: string;
|
|
12
11
|
title_at_company: string;
|
|
13
12
|
company_ownership: number;
|
|
14
13
|
document_type_for_verification: string;
|
|
@@ -32,7 +31,6 @@ export interface NewCompanyOfficerVerificationPayload {
|
|
|
32
31
|
title_at_company: string;
|
|
33
32
|
company_ownership: number;
|
|
34
33
|
document_type_for_verification: string;
|
|
35
|
-
nationality_country_code: string;
|
|
36
34
|
file_ids: ID[];
|
|
37
35
|
address: AddressUpdatableInfoPayload;
|
|
38
36
|
phone_verification?: {
|
|
@@ -57,8 +55,6 @@ export interface CompanyDetailsVerificationPayload {
|
|
|
57
55
|
file_ids: ID[];
|
|
58
56
|
sync_token: string;
|
|
59
57
|
address: AddressUpdatableInfoPayload;
|
|
60
|
-
registered_address: AddressUpdatableInfoPayload;
|
|
61
|
-
is_registered_address_same_as_company_address: boolean;
|
|
62
58
|
company_inc_type: string;
|
|
63
59
|
company_inc_date: string | null;
|
|
64
60
|
is_new_company_industry_verified: boolean;
|
package/lib/view/spendManagement/reimbursement/editRemiView/epics/parseReceiptsToRemiEpic.js
CHANGED
|
@@ -27,7 +27,7 @@ const parseReceiptsToRemiEpic = (actions$, state$) => actions$.pipe((0, operator
|
|
|
27
27
|
newUpdatesByLineId[currentLineId] = Object.assign(Object.assign({}, newUpdatesByLineId[currentLineId]), { type: 'out_of_pocket', fileId: (_a = receipt.file_id) !== null && _a !== void 0 ? _a : '', lineId: String(currentLineId) });
|
|
28
28
|
currentLineId++;
|
|
29
29
|
});
|
|
30
|
-
const files = receiptsProcessingPayload.files.map((file) => (0, attachmentPayload_1.
|
|
30
|
+
const files = receiptsProcessingPayload.files.map((file) => (0, attachmentPayload_1.mapFiletoAttachment)(file));
|
|
31
31
|
return (0, rxjs_1.of)((0, editRemiViewReducer_1.saveRemiUpdatesToLocalStore)({
|
|
32
32
|
remiDetailLocalData: Object.assign(Object.assign({}, remiState.remiDetailLocalData), { files: remiState.remiDetailLocalData.files != null
|
|
33
33
|
? [...remiState.remiDetailLocalData.files, ...files]
|
|
@@ -91,7 +91,7 @@ const parseReceiptsToRemiEpic = (actions$, state$) => actions$.pipe((0, operator
|
|
|
91
91
|
}
|
|
92
92
|
currentLineId++;
|
|
93
93
|
});
|
|
94
|
-
const files = receiptsProcessingPayload.files.map((file) => (0, attachmentPayload_1.
|
|
94
|
+
const files = receiptsProcessingPayload.files.map((file) => (0, attachmentPayload_1.mapFiletoAttachment)(file));
|
|
95
95
|
actions.push((0, editRemiViewReducer_1.saveRemiUpdatesToLocalStore)({
|
|
96
96
|
remiDetailLocalData: Object.assign(Object.assign({}, remiState.remiDetailLocalData), { files: remiState.remiDetailLocalData.files != null
|
|
97
97
|
? [...remiState.remiDetailLocalData.files, ...files]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const toSubscriptionSortKeyType: (v: string) => "status" | "controller" | "companyName" | "monthlyRecurringRevenue" | "avg2MonthExpenses" | "
|
|
1
|
+
export declare const toSubscriptionSortKeyType: (v: string) => "status" | "controller" | "companyName" | "monthlyRecurringRevenue" | "avg2MonthExpenses" | "plans" | "planLowerLimit" | "planHigherLimit" | "addons" | "upgradeStatus" | "notes";
|
|
2
2
|
export declare type SubscriptionViewSortKey = ReturnType<typeof toSubscriptionSortKeyType>;
|
|
3
3
|
export declare const SUBSCRIPTION_STATUS_CODES: string[];
|
|
4
4
|
declare const toSubscriptionStatusCodeType: (v: string) => string;
|
|
@@ -8,7 +8,7 @@ import { updateCreatedTagToLocalStore } from '../../taskManager/taskDetailView/t
|
|
|
8
8
|
export declare type ActionType = ReturnType<typeof createTag> | ReturnType<typeof updateTagCreateStatus> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateCreatedTagToLocalStore> | ReturnType<typeof updateTags>;
|
|
9
9
|
export declare const createTagEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
10
10
|
payload: {
|
|
11
|
-
messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "
|
|
11
|
+
messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation";
|
|
12
12
|
messageText: "failed" | "success" | "notification";
|
|
13
13
|
type: import("../../..").SnackbarMessageType;
|
|
14
14
|
showStatusIcon?: boolean | undefined;
|