@zeniai/client-epic-state 4.13.11 → 4.13.13
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/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 -12
- package/lib/entity/tenant/clearAllEpic.js +0 -20
- 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__/vendorStateMocks.d.ts +0 -1
- package/lib/entity/vendor/__mocks__/vendorStateMocks.js +1 -35
- package/lib/entity/vendor/vendorPayload.js +2 -3
- package/lib/entity/vendor/vendorState.d.ts +3 -3
- package/lib/entity/vendor/vendorType.d.ts +2 -0
- package/lib/entity/vendor/vendorType.js +4 -1
- package/lib/entity/vendorExpense/vendorExpenseSelector.d.ts +2 -2
- package/lib/entity/vendorExpense/vendorExpenseSelector.js +0 -1
- package/lib/epic.d.ts +2 -18
- package/lib/epic.js +2 -18
- package/lib/index.d.ts +21 -65
- package/lib/index.js +28 -102
- package/lib/reducer.d.ts +1 -31
- package/lib/reducer.js +1 -31
- 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__/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 +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/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
|
@@ -6,16 +6,16 @@ const operators_1 = require("rxjs/operators");
|
|
|
6
6
|
const responsePayload_1 = require("../../../responsePayload");
|
|
7
7
|
const companyMonthEndReportViewReducer_1 = require("../companyMonthEndReportViewReducer");
|
|
8
8
|
const fetchCompanyMonthEndReportTemplatesEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyMonthEndReportViewReducer_1.fetchCompanyMonthEndReportTemplates.match), (0, operators_1.switchMap)((action) => {
|
|
9
|
-
const { companyId
|
|
9
|
+
const { companyId } = action.payload;
|
|
10
10
|
const state = state$.value;
|
|
11
|
-
const
|
|
11
|
+
const tenantId = state.companyState.companiesById[companyId].companyInfo.tenantId;
|
|
12
12
|
const queryParam = {
|
|
13
13
|
email_templates: true,
|
|
14
14
|
};
|
|
15
|
-
if (
|
|
15
|
+
if (tenantId != null) {
|
|
16
16
|
return zeniAPI
|
|
17
17
|
.getJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}/emails/month-end?query=${encodeURIComponent(JSON.stringify(queryParam))}`, {
|
|
18
|
-
'zeni-tenant-id':
|
|
18
|
+
'zeni-tenant-id': tenantId,
|
|
19
19
|
})
|
|
20
20
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
21
21
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
@@ -7,15 +7,15 @@ const responsePayload_1 = require("../../../responsePayload");
|
|
|
7
7
|
const companyMonthEndReportViewReducer_1 = require("../companyMonthEndReportViewReducer");
|
|
8
8
|
const fileReducer_1 = require("../../../entity/file/fileReducer");
|
|
9
9
|
const fetchCompanyMonthEndReportViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyMonthEndReportViewReducer_1.fetchCompanyMonthEndReportView.match), (0, operators_1.switchMap)((action) => {
|
|
10
|
-
const { cacheOverride, companyId
|
|
10
|
+
const { cacheOverride, companyId } = action.payload;
|
|
11
11
|
const state = state$.value;
|
|
12
12
|
const fetchState = state.companyMonthEndReportViewState.monthEndReportDataByCompanyId[companyId].fetchState;
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
13
|
+
const tenantId = state.companyState.companiesById[companyId].companyInfo.tenantId;
|
|
14
|
+
if (tenantId != null &&
|
|
15
15
|
(cacheOverride === true || fetchState !== 'Completed')) {
|
|
16
16
|
return zeniAPI
|
|
17
17
|
.getJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}/emails/month-end`, {
|
|
18
|
-
'zeni-tenant-id':
|
|
18
|
+
'zeni-tenant-id': tenantId,
|
|
19
19
|
})
|
|
20
20
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
21
21
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
@@ -6,16 +6,14 @@ const operators_1 = require("rxjs/operators");
|
|
|
6
6
|
const companyMonthEndReportViewReducer_1 = require("../companyMonthEndReportViewReducer");
|
|
7
7
|
const responsePayload_1 = require("../../../responsePayload");
|
|
8
8
|
const improveUsingZeniGPTEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyMonthEndReportViewReducer_1.fetchImproveUsingZeniGPT.match), (0, operators_1.switchMap)((action) => {
|
|
9
|
-
const { companyId
|
|
9
|
+
const { companyId } = action.payload;
|
|
10
10
|
const state = state$.value;
|
|
11
11
|
const company = state.companyState.companiesById[companyId];
|
|
12
|
-
const
|
|
12
|
+
const tenantId = company.companyInfo.tenantId;
|
|
13
13
|
return zeniAPI
|
|
14
14
|
.postAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/ai-text-assist/emails/month-end`, {
|
|
15
15
|
text: action.payload.text,
|
|
16
|
-
}, Object.assign({}, (Boolean(
|
|
17
|
-
'zeni-tenant-id': zeniTenantId,
|
|
18
|
-
})))
|
|
16
|
+
}, Object.assign({}, (Boolean(tenantId) === true && { 'zeni-tenant-id': tenantId })))
|
|
19
17
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
20
18
|
var _a;
|
|
21
19
|
if (((_a = response.data) === null || _a === void 0 ? void 0 : _a.text) != null) {
|
|
@@ -11,11 +11,11 @@ const companyReducer_1 = require("../../../entity/company/companyReducer");
|
|
|
11
11
|
const fileSelector_1 = require("../../../entity/file/fileSelector");
|
|
12
12
|
const formatZeniDateFY_1 = require("../../../commonStateTypes/fiscalYearHelpers/formatZeniDateFY");
|
|
13
13
|
const saveCompanyMonthEndReportEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyMonthEndReportViewReducer_1.saveCompanyMonthEndReport.match), (0, operators_1.mergeMap)((action) => {
|
|
14
|
-
const { companyId, recipientEmailList, subject, isPreview, fileId, zeniRequestsHtml,
|
|
14
|
+
const { companyId, recipientEmailList, subject, isPreview, fileId, zeniRequestsHtml, } = action.payload;
|
|
15
15
|
const state = state$.value;
|
|
16
16
|
const company = state.companyState.companiesById[companyId];
|
|
17
17
|
const companyName = state.companyState.companiesById[companyId].companyInfo.name;
|
|
18
|
-
const
|
|
18
|
+
const tenantId = company.companyInfo.tenantId;
|
|
19
19
|
const lastReportSentBusinessDay = (0, zeniDayJS_1.getBusinessDayOfDate)((0, zeniDayJS_1.dateNow)());
|
|
20
20
|
const lastReportSentDate = (0, zeniDayJS_1.dateNow)();
|
|
21
21
|
const filePayload = [];
|
|
@@ -41,7 +41,7 @@ const saveCompanyMonthEndReportEpic = (actions$, state$, zeniAPI) => actions$.pi
|
|
|
41
41
|
const query = { is_preview: isPreview };
|
|
42
42
|
return zeniAPI
|
|
43
43
|
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}/emails/month-end?query=${encodeURIComponent(JSON.stringify(query))}`, payload, {
|
|
44
|
-
'zeni-tenant-id':
|
|
44
|
+
'zeni-tenant-id': tenantId,
|
|
45
45
|
})
|
|
46
46
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
47
47
|
if ((0, responsePayload_1.isSuccessStatus)(response) && response.data != null) {
|
|
@@ -12,14 +12,14 @@ const snackbarReducer_1 = require("../../../entity/snackbar/snackbarReducer");
|
|
|
12
12
|
const fileSelector_1 = require("../../../entity/file/fileSelector");
|
|
13
13
|
const formatZeniDateFY_1 = require("../../../commonStateTypes/fiscalYearHelpers/formatZeniDateFY");
|
|
14
14
|
const sendCompanyMonthEndReportEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyMonthEndReportViewReducer_1.sendCompanyMonthEndReport.match), (0, operators_1.mergeMap)((action) => {
|
|
15
|
-
const { companyId, fileId
|
|
15
|
+
const { companyId, fileId } = action.payload;
|
|
16
16
|
const state = state$.value;
|
|
17
17
|
const recipientEmailList = state.companyMonthEndReportViewState.monthEndReportDataByCompanyId[companyId].companyMonthEndReportData.recipientEmailList;
|
|
18
18
|
const subject = state.companyMonthEndReportViewState.monthEndReportDataByCompanyId[companyId].companyMonthEndReportData.subject;
|
|
19
19
|
const zeniRequestsHtml = state.companyMonthEndReportViewState.monthEndReportDataByCompanyId[companyId].companyMonthEndReportData.zeniRequestsHtml;
|
|
20
20
|
const company = state.companyState.companiesById[companyId];
|
|
21
21
|
const companyName = state.companyState.companiesById[companyId].companyInfo.name;
|
|
22
|
-
const
|
|
22
|
+
const tenantId = company.companyInfo.tenantId;
|
|
23
23
|
const lastReportSentBusinessDay = (0, zeniDayJS_1.getBusinessDayOfDate)((0, zeniDayJS_1.dateNow)());
|
|
24
24
|
const lastReportSentDate = (0, zeniDayJS_1.dateNow)();
|
|
25
25
|
const filePayload = [];
|
|
@@ -44,7 +44,7 @@ const sendCompanyMonthEndReportEpic = (actions$, state$, zeniAPI) => actions$.pi
|
|
|
44
44
|
};
|
|
45
45
|
return zeniAPI
|
|
46
46
|
.postAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}/emails/month-end`, payload, {
|
|
47
|
-
'zeni-tenant-id':
|
|
47
|
+
'zeni-tenant-id': tenantId,
|
|
48
48
|
})
|
|
49
49
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
50
50
|
if ((0, responsePayload_1.isSuccessStatus)(response)) {
|
package/lib/view/companyView/epic/companyPassport/updateCompanyPassportLocalStoreDataEpic.js
CHANGED
|
@@ -25,7 +25,12 @@ const updateCompanyPassportLocalStoreDataEpic = (actions$, state$) => actions$.p
|
|
|
25
25
|
const companyFiles = (0, fileSelector_1.getFilesByFileIds)(fileState, fileIds);
|
|
26
26
|
const companyLocalData = (0, companyPassportLocalData_1.toCompanyPassportLocalData)(companyView, companyFiles);
|
|
27
27
|
fetchActions.push((0, companyViewReducer_1.companyPassportClearDataInLocalStore)(), (0, companyViewReducer_1.companyPassportSaveDataInLocalStore)(companyLocalData));
|
|
28
|
-
|
|
28
|
+
const officerAddressTypes = companyUsersLocalData_1.ALL_OFFICERS.map((all) => `officer_${all}_address`);
|
|
29
|
+
const companyPassportAddressTypes = [
|
|
30
|
+
'company_address',
|
|
31
|
+
...officerAddressTypes,
|
|
32
|
+
];
|
|
33
|
+
fetchActions.push((0, addressViewReducer_1.resetNewAddressDataInLocalStoreForAddressTypes)(companyPassportAddressTypes));
|
|
29
34
|
const addresses = (0, toAddressViewLocalData_1.toAddressViewLocalData)(companyView);
|
|
30
35
|
if (addresses != null) {
|
|
31
36
|
Object.keys(addresses).forEach((addressType) => {
|
|
@@ -60,9 +60,6 @@ function getCompanyView(state, companyId, subscriptionIdsOfCompany, mergePending
|
|
|
60
60
|
const companyAddress = updatedManagegmentInfo.companyAddressId != null
|
|
61
61
|
? (0, addressSelector_1.getAddressByAddressId)(state.addressState, updatedManagegmentInfo.companyAddressId)
|
|
62
62
|
: undefined;
|
|
63
|
-
const registeredAddress = updatedManagegmentInfo.registeredAddressId != null
|
|
64
|
-
? (0, addressSelector_1.getAddressByAddressId)(state.addressState, updatedManagegmentInfo.registeredAddressId)
|
|
65
|
-
: undefined;
|
|
66
63
|
const primaryContact = updatedManagegmentInfo.primaryContactUserId != null
|
|
67
64
|
? (0, userAndRole_1.getUserAndUserRole)(state.userState, state.userRoleState, state.addressState, updatedManagegmentInfo.primaryContactUserId)
|
|
68
65
|
: undefined;
|
|
@@ -173,7 +170,6 @@ function getCompanyView(state, companyId, subscriptionIdsOfCompany, mergePending
|
|
|
173
170
|
return {
|
|
174
171
|
company,
|
|
175
172
|
companyAddress,
|
|
176
|
-
registeredAddress,
|
|
177
173
|
primaryContact,
|
|
178
174
|
companyOfficers,
|
|
179
175
|
companyContact,
|
|
@@ -4,9 +4,9 @@ import { SubscriptionViewSortKey } from '../../subscriptionView/types/subscripti
|
|
|
4
4
|
import { FilterCategoryValueType } from '../helpers/cockpitHelpers';
|
|
5
5
|
import { CockpitDownloadTabsID, CockpitTabsFileType } from './cockpitTabsID';
|
|
6
6
|
export declare const toPortfolioSortKeyType: (v: string) => "expenses" | "runway" | "cashBalance" | "netIncome" | "companyName" | "revenues";
|
|
7
|
-
export declare const toManagementSortKeyType: (v: string) => "status" | "group" | "bookCloseDate" | "controller" | "preparer" | "reviewer" | "companyName" | "monthlyRecurringRevenue" | "annualRecurringRevenue" | "taxStatus" | "
|
|
7
|
+
export declare const toManagementSortKeyType: (v: string) => "status" | "group" | "bookCloseDate" | "controller" | "preparer" | "reviewer" | "companyName" | "monthlyRecurringRevenue" | "annualRecurringRevenue" | "taxStatus" | "plans" | "notes" | "task" | "customerSuccessManager" | "apAnalyst" | "reportSent" | "taxLead" | "satisfaction";
|
|
8
8
|
export declare const toOnboardingSortKeyType: (v: string) => "companyName" | "notes" | "bankAccountLinked" | "qboLinked" | "identityVerified" | "businessVerified" | "groupCreated" | "customerCreated" | "enroller" | "invite";
|
|
9
|
-
export declare const toHealthSortKeyType: (v: string) => "group" | "runway" | "controller" | "companyName" | "monthlyRecurringRevenue" | "
|
|
9
|
+
export declare const toHealthSortKeyType: (v: string) => "group" | "runway" | "controller" | "companyName" | "monthlyRecurringRevenue" | "customerSuccessManager" | "netPromoterScore" | "customerSatisfactionScore" | "lastReportSent" | "externalProductServiceExposure" | "finOpsEngagementFrequency" | "companyEngagementMetricsUpdatedAt" | "issues" | "productVerticals" | "churnProbability" | "subscriptionDate" | "renewalDate";
|
|
10
10
|
export declare const toTaskManagerSortKeyType: (v: string) => "priority" | "name" | "status" | "dueDate" | "taskName" | "assignee" | "tags" | "createdBy";
|
|
11
11
|
export declare type PortfolioViewSortKey = ReturnType<typeof toPortfolioSortKeyType>;
|
|
12
12
|
export declare type ManagementViewSortKey = ReturnType<typeof toManagementSortKeyType>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ID } from '../../../../commonStateTypes/common';
|
|
2
|
-
import { AddressType } from '../../../addressView/addressViewState';
|
|
3
2
|
export interface PrimaryContactLocalData {
|
|
4
3
|
userId: ID | undefined;
|
|
5
4
|
firstName: string;
|
|
@@ -10,7 +9,6 @@ export declare const ALL_OFFICERS: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
|
10
9
|
declare const toOfficerType: (n: number) => 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
|
|
11
10
|
export declare type OfficerType = ReturnType<typeof toOfficerType>;
|
|
12
11
|
export declare type CompanyOfficerType = `Officer_${OfficerType}`;
|
|
13
|
-
export declare const AllCompanyPassportAddressTypes: AddressType[];
|
|
14
12
|
export interface CompanyOfficerLocalData {
|
|
15
13
|
officerType: CompanyOfficerType;
|
|
16
14
|
userId: ID | undefined;
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ALL_OFFICERS = void 0;
|
|
4
4
|
const numberToUnion_1 = require("../../../../commonStateTypes/numberToUnion");
|
|
5
5
|
exports.ALL_OFFICERS = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
6
6
|
const toOfficerType = (n) => (0, numberToUnion_1.numberToUnion)(n, exports.ALL_OFFICERS);
|
|
7
|
-
const officerAddressTypes = exports.ALL_OFFICERS.map((all) => `officer_${all}_address`);
|
|
8
|
-
exports.AllCompanyPassportAddressTypes = [
|
|
9
|
-
'company_address',
|
|
10
|
-
'company_registered_address',
|
|
11
|
-
...officerAddressTypes,
|
|
12
|
-
];
|
|
@@ -12,7 +12,6 @@ export interface PrimarySubscription {
|
|
|
12
12
|
export interface CompanyView {
|
|
13
13
|
company: CompanyWithSchema;
|
|
14
14
|
companyAddress?: Address;
|
|
15
|
-
registeredAddress?: Address;
|
|
16
15
|
primaryContact?: UserAndRole;
|
|
17
16
|
companyOfficers: UserAndRole[];
|
|
18
17
|
companyContact?: UserAndRole;
|
|
@@ -20,6 +20,5 @@ import { fetchApAging } from '../apAgingView/apAgingReport/apAgingReducer';
|
|
|
20
20
|
import { fetchArAging } from '../arAgingView/arAgingReport/arAgingReducer';
|
|
21
21
|
import { fetchZeniAccountsPromoCard } from '../zeniAccountsPromoCard/zeniAccountsPromoCardReducer';
|
|
22
22
|
import { fetchRewardsPlan } from '../referralView/referralReducer';
|
|
23
|
-
|
|
24
|
-
export declare type ActionType = ReturnType<typeof fetchDashboard> | ReturnType<typeof fetchAllTenants> | ReturnType<typeof fetchCardBalance> | ReturnType<typeof fetchCashBalance> | ReturnType<typeof fetchOpEx> | ReturnType<typeof fetchRevenue> | ReturnType<typeof fetchNetBurnOrIncome> | ReturnType<typeof fetchNetBurnOrIncomeStoryCard> | ReturnType<typeof fetchTopEx> | ReturnType<typeof fetchCashPosition> | ReturnType<typeof fetchCashInCashOut> | ReturnType<typeof fetchInsightsCard> | ReturnType<typeof fetchCompanyPassportView> | ReturnType<typeof fetchTasksCard> | ReturnType<typeof fetchBillPayCard> | ReturnType<typeof fetchApAging> | ReturnType<typeof fetchArAging> | ReturnType<typeof fetchReimbursementCard> | ReturnType<typeof fetchZeniAccountsPromoCard> | ReturnType<typeof fetchRewardsPlan> | ReturnType<typeof fetchMonthEndCloseChecks>;
|
|
23
|
+
export declare type ActionType = ReturnType<typeof fetchDashboard> | ReturnType<typeof fetchAllTenants> | ReturnType<typeof fetchCardBalance> | ReturnType<typeof fetchCashBalance> | ReturnType<typeof fetchOpEx> | ReturnType<typeof fetchRevenue> | ReturnType<typeof fetchNetBurnOrIncome> | ReturnType<typeof fetchNetBurnOrIncomeStoryCard> | ReturnType<typeof fetchTopEx> | ReturnType<typeof fetchCashPosition> | ReturnType<typeof fetchCashInCashOut> | ReturnType<typeof fetchInsightsCard> | ReturnType<typeof fetchCompanyPassportView> | ReturnType<typeof fetchTasksCard> | ReturnType<typeof fetchBillPayCard> | ReturnType<typeof fetchApAging> | ReturnType<typeof fetchArAging> | ReturnType<typeof fetchReimbursementCard> | ReturnType<typeof fetchZeniAccountsPromoCard> | ReturnType<typeof fetchRewardsPlan>;
|
|
25
24
|
export declare const fetchDashboardEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => import("rxjs").Observable<ActionType>;
|
|
@@ -28,14 +28,10 @@ const apAgingReducer_1 = require("../apAgingView/apAgingReport/apAgingReducer");
|
|
|
28
28
|
const arAgingReducer_1 = require("../arAgingView/arAgingReport/arAgingReducer");
|
|
29
29
|
const zeniAccountsPromoCardReducer_1 = require("../zeniAccountsPromoCard/zeniAccountsPromoCardReducer");
|
|
30
30
|
const referralReducer_1 = require("../referralView/referralReducer");
|
|
31
|
-
const monthEndCloseChecksViewReducer_1 = require("../monthEndCloseChecksView/monthEndCloseChecksViewReducer");
|
|
32
|
-
const timePeriod_1 = require("../../commonStateTypes/timePeriod");
|
|
33
|
-
const fetchAllTenantsEpic_1 = require("../../entity/tenant/epic/fetchAllTenantsEpic");
|
|
34
31
|
const fetchDashboardEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(dashboardReducer_1.fetchDashboard.match), (0, operators_1.switchMap)((action) => {
|
|
35
|
-
var _a, _b, _c, _d
|
|
36
|
-
const { userId, companyId, fetchFullReport, cacheOverride, excludeResources,
|
|
32
|
+
var _a, _b, _c, _d;
|
|
33
|
+
const { userId, companyId, fetchFullReport, cacheOverride, excludeResources, } = action.payload;
|
|
37
34
|
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state$.value);
|
|
38
|
-
const zeniBookCloseDate = currentTenant.zeniBookCloseDate;
|
|
39
35
|
const isReimbursementFeatureEnabled = (_a = currentTenant.company) === null || _a === void 0 ? void 0 : _a.featuresActivationInfo.isReimbursementFeatureEnabled;
|
|
40
36
|
const isAdmin = Boolean(currentTenant === null || currentTenant === void 0 ? void 0 : currentTenant.userRole) === true
|
|
41
37
|
? (0, userRoleType_1.hasAdminLevelAccess)(currentTenant.userRole)
|
|
@@ -43,7 +39,6 @@ const fetchDashboardEpic = (actions$, state$) => actions$.pipe((0, operators_1.f
|
|
|
43
39
|
const isInvestorBanker = (0, userRoleType_1.hasInvestorBankerLevelAccess)(currentTenant.userRole);
|
|
44
40
|
const arAgingDate = state$.value.arAgingState.uiState.selectedDate;
|
|
45
41
|
const apAgingDate = state$.value.apAgingState.uiState.selectedDate;
|
|
46
|
-
const monthEndChecksPeriod = (0, fetchAllTenantsEpic_1.getMonthYearPeriodFromBookCloseDate)(zeniBookCloseDate);
|
|
47
42
|
if (cacheOverride === true) {
|
|
48
43
|
const actions = [
|
|
49
44
|
(0, tenantReducer_1.fetchAllTenants)(userId),
|
|
@@ -78,12 +73,6 @@ const fetchDashboardEpic = (actions$, state$) => actions$.pipe((0, operators_1.f
|
|
|
78
73
|
if (excludeResources.includes('rewards_card') === false) {
|
|
79
74
|
actions.push((0, referralReducer_1.fetchRewardsPlan)(true));
|
|
80
75
|
}
|
|
81
|
-
if (excludeResources.includes('expense_automation_card') === false) {
|
|
82
|
-
actions.push((0, monthEndCloseChecksViewReducer_1.fetchMonthEndCloseChecks)({
|
|
83
|
-
tenantId,
|
|
84
|
-
period: monthEndChecksPeriod,
|
|
85
|
-
}));
|
|
86
|
-
}
|
|
87
76
|
return (0, rxjs_1.from)(actions);
|
|
88
77
|
}
|
|
89
78
|
else {
|
|
@@ -181,15 +170,6 @@ const fetchDashboardEpic = (actions$, state$) => actions$.pipe((0, operators_1.f
|
|
|
181
170
|
excludeResources.includes('rewards_card') === false) {
|
|
182
171
|
fetchActions.push((0, referralReducer_1.fetchRewardsPlan)(true));
|
|
183
172
|
}
|
|
184
|
-
const monthEndChecksId = (0, timePeriod_1.toMonthYearPeriodId)(monthEndChecksPeriod);
|
|
185
|
-
if (((_f = (_e = state.monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]) === null || _e === void 0 ? void 0 : _e[monthEndChecksId]) === null || _f === void 0 ? void 0 : _f.fetchState) !== 'In-Progress' &&
|
|
186
|
-
((_h = (_g = state.monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]) === null || _g === void 0 ? void 0 : _g[monthEndChecksId]) === null || _h === void 0 ? void 0 : _h.fetchState) !== 'Completed' &&
|
|
187
|
-
excludeResources.includes('expense_automation_card') === false) {
|
|
188
|
-
fetchActions.push((0, monthEndCloseChecksViewReducer_1.fetchMonthEndCloseChecks)({
|
|
189
|
-
tenantId,
|
|
190
|
-
period: monthEndChecksPeriod,
|
|
191
|
-
}));
|
|
192
|
-
}
|
|
193
173
|
return (0, rxjs_1.from)(fetchActions);
|
|
194
174
|
}
|
|
195
175
|
}));
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { DashboardState } from './dashboardState';
|
|
2
2
|
export declare const initialState: DashboardState;
|
|
3
|
-
export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string, companyId: string,
|
|
3
|
+
export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string, companyId: string, fetchFullReport?: any, cacheOverride?: any, excludeResources?: ("cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing")[] | undefined], {
|
|
4
4
|
userId: string;
|
|
5
5
|
companyId: string;
|
|
6
|
-
tenantId: string;
|
|
7
6
|
fetchFullReport: any;
|
|
8
7
|
cacheOverride: any;
|
|
9
|
-
excludeResources: ("cash_balance" | "card_balance" | "
|
|
8
|
+
excludeResources: ("cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing")[];
|
|
10
9
|
}, string, never, never>, clearDashboard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
11
10
|
declare const _default: import("@reduxjs/toolkit").Reducer<DashboardState, import("@reduxjs/toolkit").AnyAction>;
|
|
12
11
|
export default _default;
|
|
@@ -15,12 +15,11 @@ const dashboard = (0, toolkit_1.createSlice)({
|
|
|
15
15
|
reducer(draft) {
|
|
16
16
|
draft.lastFetchRequestTime = (0, zeniDayJS_1.dateNow)();
|
|
17
17
|
},
|
|
18
|
-
prepare(userId, companyId,
|
|
18
|
+
prepare(userId, companyId, fetchFullReport = false, cacheOverride = false, excludeResources = []) {
|
|
19
19
|
return {
|
|
20
20
|
payload: {
|
|
21
21
|
userId,
|
|
22
22
|
companyId,
|
|
23
|
-
tenantId,
|
|
24
23
|
fetchFullReport,
|
|
25
24
|
cacheOverride,
|
|
26
25
|
excludeResources,
|
|
@@ -18,7 +18,6 @@ import { ApAgingReport } from '../apAgingView/apAgingReport/apAgingSelector';
|
|
|
18
18
|
import { ArAgingReport } from '../arAgingView/arAgingReport/arAgingSelector';
|
|
19
19
|
import { ZeniAccountsPromoCardReport } from '../zeniAccountsPromoCard/zeniAccountsPromoCardSelector';
|
|
20
20
|
import { RewardsPlanCardReport } from '../referralView/referralSelector';
|
|
21
|
-
import { MonthEndCloseChecksView } from '../monthEndCloseChecksView/monthEndCloseChecksViewSelector';
|
|
22
21
|
export interface DashboardReport extends SelectorReport {
|
|
23
22
|
tenantsOrdered: TenantsOrdered;
|
|
24
23
|
currentTenant?: Tenant;
|
|
@@ -39,6 +38,5 @@ export interface DashboardReport extends SelectorReport {
|
|
|
39
38
|
arAgingReport: ArAgingReport;
|
|
40
39
|
zeniAccountsPromoCard: ZeniAccountsPromoCardReport;
|
|
41
40
|
rewardsPlanCard: RewardsPlanCardReport;
|
|
42
|
-
monthEndCloseChecksView: MonthEndCloseChecksView;
|
|
43
41
|
}
|
|
44
42
|
export declare const getDashboard: (state: RootState, additionalExcludedReports: ReportID[]) => DashboardReport;
|
|
@@ -24,7 +24,6 @@ const apAgingSelector_1 = require("../apAgingView/apAgingReport/apAgingSelector"
|
|
|
24
24
|
const arAgingSelector_1 = require("../arAgingView/arAgingReport/arAgingSelector");
|
|
25
25
|
const zeniAccountsPromoCardSelector_1 = require("../zeniAccountsPromoCard/zeniAccountsPromoCardSelector");
|
|
26
26
|
const referralSelector_1 = require("../referralView/referralSelector");
|
|
27
|
-
const monthEndCloseChecksViewSelector_1 = require("../monthEndCloseChecksView/monthEndCloseChecksViewSelector");
|
|
28
27
|
const getNetBurnOrIncomeForLast4Periods = (state) => {
|
|
29
28
|
return (0, netBurnOrIncomeSelector_1.getNetBurnOrIncomeReport)(state.accountState, state.accountGroupState, state.sectionAccountsViewState, state.netBurnOrIncomeState, state.forecastState, state.forecastListState, (0, coaBalancesFilter_1.newBalancesFilter)(state.netBurnOrIncomeState.netBurnOrIncome.firstMonthOfFY, state.netBurnOrIncomeState.uiState.timeframe, 4, undefined, 'ascending_date', state.netBurnOrIncomeState.uiState.selectedAdditionalBalances));
|
|
30
29
|
};
|
|
@@ -41,10 +40,7 @@ const tenantSelector = (0, toolkit_1.createSelector)(tenantSelector_1.getTenants
|
|
|
41
40
|
tenantsOrdered,
|
|
42
41
|
currentTenant,
|
|
43
42
|
}));
|
|
44
|
-
exports.getDashboard = (0, toolkit_1.createSelector)(tenantSelector, cardBalanceSelector_1.getCardBalance, cashBalanceSelector_1.getCashBalance, getOperatingExpensesForLast5Periods, getRevenueForLast4Periods, topExSelector_1.getTop6Expenses, getNetBurnOrIncomeForLast4Periods, getNetBurnOrIncomeStoryCard, getCashPositionLast5Periods, getCashInCashOutLast4Periods, insightsCardSelector_1.getInsights, companyPassportViewSelector_1.getCompanyPassportView, tasksCardSelector_1.getTasksCardReport, billPayCardSelector_1.getBillPayCardReport, reimbursementCardSelector_1.getReimbursementCardReport, apAgingSelector, arAgingSelector, zeniAccountsPromoCardSelector_1.getZeniAccountsPromoCard, referralSelector_1.getRewardsPlanCard, (state) => {
|
|
45
|
-
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
|
|
46
|
-
return (0, monthEndCloseChecksViewSelector_1.getMonthEndCloseChecksViewByTenantId)(state, currentTenant.tenantId);
|
|
47
|
-
}, (state) => state.tenantState, (_state, additionalExcludedReports) => additionalExcludedReports, (tenants, cardBalance, cashBalance, opEx, revenue, topEx, netBurnOrIncome, netBurnOrIncomeStoryCard, cashPosition, cashInCashOut, insightsView, companyPassportView, tasksCard, billPayCard, reimbursementCard, apAgingReport, arAgingReport, zeniAccountsPromoCard, rewardsPlanCard, monthEndCloseChecksView, tenantState, additionalExcludedReports) => {
|
|
43
|
+
exports.getDashboard = (0, toolkit_1.createSelector)(tenantSelector, cardBalanceSelector_1.getCardBalance, cashBalanceSelector_1.getCashBalance, getOperatingExpensesForLast5Periods, getRevenueForLast4Periods, topExSelector_1.getTop6Expenses, getNetBurnOrIncomeForLast4Periods, getNetBurnOrIncomeStoryCard, getCashPositionLast5Periods, getCashInCashOutLast4Periods, insightsCardSelector_1.getInsights, companyPassportViewSelector_1.getCompanyPassportView, tasksCardSelector_1.getTasksCardReport, billPayCardSelector_1.getBillPayCardReport, reimbursementCardSelector_1.getReimbursementCardReport, apAgingSelector, arAgingSelector, zeniAccountsPromoCardSelector_1.getZeniAccountsPromoCard, referralSelector_1.getRewardsPlanCard, (state) => state.tenantState, (_state, additionalExcludedReports) => additionalExcludedReports, (tenants, cardBalance, cashBalance, opEx, revenue, topEx, netBurnOrIncome, netBurnOrIncomeStoryCard, cashPosition, cashInCashOut, insightsView, companyPassportView, tasksCard, billPayCard, reimbursementCard, apAgingReport, arAgingReport, zeniAccountsPromoCard, rewardsPlanCard, tenantState, additionalExcludedReports) => {
|
|
48
44
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
49
45
|
const isReimbursementFeatureEnabled = (_a = tenants.currentTenant.company) === null || _a === void 0 ? void 0 : _a.featuresActivationInfo.isReimbursementFeatureEnabled;
|
|
50
46
|
const isAdmin = Boolean((_b = tenants.currentTenant) === null || _b === void 0 ? void 0 : _b.userRole) === true
|
|
@@ -67,9 +63,6 @@ exports.getDashboard = (0, toolkit_1.createSelector)(tenantSelector, cardBalance
|
|
|
67
63
|
insightsView,
|
|
68
64
|
Object.assign(Object.assign({}, companyPassportView), { reportId: 'company_details', reportTitle: 'Company Details' }),
|
|
69
65
|
];
|
|
70
|
-
if (additionalExcludedReports.includes('expense_automation_card') === false) {
|
|
71
|
-
reportsInOrder.push(monthEndCloseChecksView);
|
|
72
|
-
}
|
|
73
66
|
if (additionalExcludedReports.includes('accounts_payable_aging') === false) {
|
|
74
67
|
reportsInOrder.push(apAgingReport);
|
|
75
68
|
}
|
|
@@ -113,6 +106,5 @@ exports.getDashboard = (0, toolkit_1.createSelector)(tenantSelector, cardBalance
|
|
|
113
106
|
apAgingReport,
|
|
114
107
|
arAgingReport,
|
|
115
108
|
zeniAccountsPromoCard,
|
|
116
|
-
rewardsPlanCard
|
|
117
|
-
monthEndCloseChecksView });
|
|
109
|
+
rewardsPlanCard });
|
|
118
110
|
});
|
|
@@ -17,7 +17,7 @@ export declare const fetchFinanceStatement: import("@reduxjs/toolkit").ActionCre
|
|
|
17
17
|
thisPeriod: TimeframeTick;
|
|
18
18
|
coaBalances: COABalance[];
|
|
19
19
|
maxNumOfPeriodsToHighlight: number;
|
|
20
|
-
}, string>, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, string>, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"cash_balance" | "card_balance" | "
|
|
20
|
+
}, string>, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, string>, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing", string>, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
21
21
|
firstMonthOfFY: Month;
|
|
22
22
|
isCompareModeOn: boolean;
|
|
23
23
|
additionalBalances: COABalanceType[];
|
|
@@ -4,9 +4,9 @@ import { ID } from '../../commonStateTypes/common';
|
|
|
4
4
|
import { ZeniAPIStatus } from '../../responsePayload';
|
|
5
5
|
import { VendorReviewViewAllRecommendationsPayload } from '../vendorReviewView/common/payload/commonTypes';
|
|
6
6
|
export declare const initialState: GlobalMerchantViewState;
|
|
7
|
-
export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "cash_balance" | "card_balance" | "
|
|
7
|
+
export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | undefined], {
|
|
8
8
|
merchantId: string | undefined;
|
|
9
|
-
context: "cash_balance" | "card_balance" | "
|
|
9
|
+
context: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | undefined;
|
|
10
10
|
}, string, never, never>, createGlobalMerchantSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
11
11
|
merchantId: ID;
|
|
12
12
|
}, string>, createGlobalMerchantFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -2,17 +2,10 @@ import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
|
2
2
|
import { RootState } from '../../../../../reducer';
|
|
3
3
|
import { fetchOnboardingCustomerSetupView } from '../../onboardingCustomerViewReducer';
|
|
4
4
|
import { fetchCompanyConfig } from '../../../../companyConfigView/companyConfigReducer';
|
|
5
|
-
|
|
6
|
-
export declare type ActionType = ReturnType<typeof fetchOnboardingCustomerSetupView> | ReturnType<typeof fetchCountryList> | ReturnType<typeof fetchCompanyConfig>;
|
|
5
|
+
export declare type ActionType = ReturnType<typeof fetchOnboardingCustomerSetupView> | ReturnType<typeof fetchCompanyConfig>;
|
|
7
6
|
export declare const fetchOnboardingCustomerViewEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => import("rxjs").Observable<{
|
|
8
7
|
payload: undefined;
|
|
9
8
|
type: string;
|
|
10
|
-
} | {
|
|
11
|
-
payload: {
|
|
12
|
-
countryListKey: "nationalityCountryList";
|
|
13
|
-
cacheOverride: any;
|
|
14
|
-
};
|
|
15
|
-
type: string;
|
|
16
9
|
} | {
|
|
17
10
|
payload: {
|
|
18
11
|
companyId: string;
|
package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.js
CHANGED
|
@@ -5,16 +5,14 @@ const rxjs_1 = require("rxjs");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const onboardingCustomerViewReducer_1 = require("../../onboardingCustomerViewReducer");
|
|
7
7
|
const companyConfigReducer_1 = require("../../../../companyConfigView/companyConfigReducer");
|
|
8
|
-
const countryListReducer_1 = require("../../../../countryList/countryListReducer");
|
|
9
8
|
const fetchOnboardingCustomerViewEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(onboardingCustomerViewReducer_1.fetchOnboardingCustomerView.match), (0, operators_1.switchMap)((action) => {
|
|
10
9
|
const { companyId, cacheOverride, reCalculateCurrentStep } = action.payload;
|
|
11
10
|
if (cacheOverride === true) {
|
|
12
|
-
return (0, rxjs_1.of)((0,
|
|
11
|
+
return (0, rxjs_1.of)((0, onboardingCustomerViewReducer_1.fetchOnboardingCustomerSetupView)(companyId, cacheOverride, reCalculateCurrentStep), (0, companyConfigReducer_1.fetchCompanyConfig)());
|
|
13
12
|
}
|
|
14
13
|
else {
|
|
15
14
|
const state = state$.value;
|
|
16
15
|
const fetchActions = [];
|
|
17
|
-
fetchActions.push((0, countryListReducer_1.fetchCountryList)('nationalityCountryList'));
|
|
18
16
|
if (state.onboardingCustomerViewState.fetchState !== 'In-Progress' &&
|
|
19
17
|
!state.onboardingCustomerViewState.hasValidState()) {
|
|
20
18
|
fetchActions.push((0, onboardingCustomerViewReducer_1.fetchOnboardingCustomerSetupView)(companyId, cacheOverride, reCalculateCurrentStep));
|
|
@@ -16,7 +16,7 @@ const getCompanyView_1 = require("../../../../companyView/selectorHelpers/getCom
|
|
|
16
16
|
const onboardingCustomerViewReducer_1 = require("../../onboardingCustomerViewReducer");
|
|
17
17
|
const updateBusinessVerificationDetailsEpic_1 = require("../../../../spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic");
|
|
18
18
|
const updateOnboardingCustomerViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(onboardingCustomerViewReducer_1.updateOnboardingCustomerView.match), (0, operators_1.mergeMap)((action) => {
|
|
19
|
-
var _a, _b, _c
|
|
19
|
+
var _a, _b, _c;
|
|
20
20
|
const { companyId, officerType, sendForVerification, reCalculateCurrentStep = false, } = action.payload;
|
|
21
21
|
const { onboardingCustomerViewState } = state$.value;
|
|
22
22
|
const { companyDetails, primaryContactDetails, companyOfficerUpdateStatus, currentStep, } = onboardingCustomerViewState;
|
|
@@ -27,15 +27,14 @@ const updateOnboardingCustomerViewEpic = (actions$, state$, zeniAPI) => actions$
|
|
|
27
27
|
const companyView = (0, getCompanyView_1.getCompanyView)(state$.value, companyId, []);
|
|
28
28
|
const { newAddressState } = state$.value.addressViewState;
|
|
29
29
|
const companyAddressToCreate = (_a = newAddressState === null || newAddressState === void 0 ? void 0 : newAddressState.company_address) === null || _a === void 0 ? void 0 : _a.addressToCreate;
|
|
30
|
-
const registeredAddressToCreate = (_b = newAddressState === null || newAddressState === void 0 ? void 0 : newAddressState.company_registered_address) === null || _b === void 0 ? void 0 : _b.addressToCreate;
|
|
31
30
|
const addressType = officerType
|
|
32
31
|
.toLowerCase()
|
|
33
32
|
.concat('_address');
|
|
34
|
-
const companyOfficerAddressToCreate = (
|
|
33
|
+
const companyOfficerAddressToCreate = (_b = newAddressState === null || newAddressState === void 0 ? void 0 : newAddressState[addressType]) === null || _b === void 0 ? void 0 : _b.addressToCreate;
|
|
35
34
|
const isNewPrimaryContactUser = (primaryContactLocalData === null || primaryContactLocalData === void 0 ? void 0 : primaryContactLocalData.userId) == null ||
|
|
36
35
|
(primaryContactLocalData === null || primaryContactLocalData === void 0 ? void 0 : primaryContactLocalData.email) !==
|
|
37
|
-
((
|
|
38
|
-
const company = (0, updateBusinessVerificationDetailsEpic_1.toBusinessVerificationCompanyDataPayload)(companyLocalData, sendForVerification, companyAddressToCreate
|
|
36
|
+
((_c = companyView === null || companyView === void 0 ? void 0 : companyView.primaryContact) === null || _c === void 0 ? void 0 : _c.user.email);
|
|
37
|
+
const company = (0, updateBusinessVerificationDetailsEpic_1.toBusinessVerificationCompanyDataPayload)(companyLocalData, sendForVerification, companyAddressToCreate);
|
|
39
38
|
const primary_contact_user = primaryContactLocalData != null &&
|
|
40
39
|
Boolean(primaryContactLocalData.email) === true // Don't save Empty Primary Contact details
|
|
41
40
|
? (0, updateBusinessVerificationDetailsEpic_1.toBusinessVerificationPrimaryContactDataPayload)(primaryContactLocalData, isNewPrimaryContactUser)
|
|
@@ -14,7 +14,6 @@ import { TenantExternalConnections, TenantProductSettings } from '../../../entit
|
|
|
14
14
|
import { AccountingConnectionCreationMode } from '../../../entity/company/companyStateTypes';
|
|
15
15
|
import { FileState } from '../../../entity/file/fileState';
|
|
16
16
|
import { PlaidConnectionDetails } from '../../spendManagement/plaidAccount/plaidAccountViewState';
|
|
17
|
-
import { Country } from '../../countryList/countryListState';
|
|
18
17
|
export interface OnboardingCustomerView {
|
|
19
18
|
companyDetailsLocalData?: CompanyDetails;
|
|
20
19
|
companyOfficerLocalData: Record<CompanyOfficerType, CompanyOfficersDetails | undefined>;
|
|
@@ -35,7 +34,6 @@ export interface OnboardingCustomerView {
|
|
|
35
34
|
allStepsCompleted: boolean;
|
|
36
35
|
allSteps: OnboardingStep[];
|
|
37
36
|
companyIndustries: AllowedValueWithCode[];
|
|
38
|
-
allNationalityCountries: Country[];
|
|
39
37
|
updateStatus: FetchStateAndError;
|
|
40
38
|
fetchStatus: FetchStateAndError;
|
|
41
39
|
saveStatus: FetchStateAndError;
|
|
@@ -14,7 +14,7 @@ const userRoleSelector_1 = require("../../../entity/userRole/userRoleSelector");
|
|
|
14
14
|
const fileSelector_1 = require("../../../entity/file/fileSelector");
|
|
15
15
|
function getOnboardingCustomerView(state, companyId) {
|
|
16
16
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
17
|
-
const { fileState, paymentAccountState, onboardingCustomerViewState, userState, userRoleState, subscriptionPaymentAccountState, companyConfigState, cardPaymentViewState,
|
|
17
|
+
const { fileState, paymentAccountState, onboardingCustomerViewState, userState, userRoleState, subscriptionPaymentAccountState, companyConfigState, cardPaymentViewState, } = state;
|
|
18
18
|
const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails, subscriptionPaymentAccountIds, paymentAccountDetails, plaidConnectionDetails, updateStatus, saveStatus, currentStep, uiState, fetchState, error, } = onboardingCustomerViewState;
|
|
19
19
|
const { paymentAccountIds } = paymentAccountDetails;
|
|
20
20
|
let subscriptionPaymentAccount;
|
|
@@ -94,12 +94,10 @@ function getOnboardingCustomerView(state, companyId) {
|
|
|
94
94
|
{ fetchState: configFetchState, error: configError },
|
|
95
95
|
{ fetchState, error },
|
|
96
96
|
]);
|
|
97
|
-
const allNationalityCountries = countryListState.byCountryListCode.nationalityCountryList.countries;
|
|
98
97
|
return {
|
|
99
98
|
companyDetailsLocalData,
|
|
100
99
|
companyOfficerLocalData,
|
|
101
100
|
companyView,
|
|
102
|
-
allNationalityCountries,
|
|
103
101
|
pendingSaveDetails: {
|
|
104
102
|
companyDetails: isCompanyDetailsSavePending(fileState, companyView, primaryContact, companyDetailsLocalData),
|
|
105
103
|
officer: isOfficerDetailsSavePending(companyOfficers, companyOfficerRoles, fileState, companyOfficerLocalData[selectedOfficerType]),
|
|
@@ -246,8 +244,8 @@ function isOfficerDetailsSavePending(companyOfficers, companyOfficerRoles, fileS
|
|
|
246
244
|
if (selectedOfficerIndex < 0) {
|
|
247
245
|
selectedOfficerIndex = 0;
|
|
248
246
|
}
|
|
249
|
-
const { userId, firstName, lastName, birthday, email, phone: userPhone, ssn,
|
|
250
|
-
const { firstName: firstNameLocalData, lastName: lastNameLocalData, birthday: birthdayLocalData, email: emailLocalData, phone, ssn: ssnLocalData,
|
|
247
|
+
const { userId, firstName, lastName, birthday, email, phone: userPhone, ssn, } = companyOfficers[selectedOfficerIndex];
|
|
248
|
+
const { firstName: firstNameLocalData, lastName: lastNameLocalData, birthday: birthdayLocalData, email: emailLocalData, phone, ssn: ssnLocalData, fileIds: officerFileIds, documentTypeSelectedForVerification, ownershipInCompany, titleAtCompany, } = officerDetails;
|
|
251
249
|
const fileIdsLocalData = (0, fileSelector_1.getFilesByFileIds)(fileState, officerFileIds).map((file) => file.fileId);
|
|
252
250
|
const userRole = companyOfficerRoles.find((userRole) => userRole.userId === userId);
|
|
253
251
|
const fileIds = (0, fileSelector_1.getFilesByFileIds)(fileState, (_a = userRole === null || userRole === void 0 ? void 0 : userRole.fileIds) !== null && _a !== void 0 ? _a : []).map((file) => file.fileId);
|
|
@@ -257,7 +255,6 @@ function isOfficerDetailsSavePending(companyOfficers, companyOfficerRoles, fileS
|
|
|
257
255
|
email != emailLocalData ||
|
|
258
256
|
userPhone != phone ||
|
|
259
257
|
ssn != ssnLocalData ||
|
|
260
|
-
nationalityCountryCode != nccLocalData ||
|
|
261
258
|
(userRole === null || userRole === void 0 ? void 0 : userRole.documentTypeSelectedForVerification) !=
|
|
262
259
|
documentTypeSelectedForVerification ||
|
|
263
260
|
(userRole === null || userRole === void 0 ? void 0 : userRole.titleAtCompany) != titleAtCompany ||
|
|
@@ -26,7 +26,7 @@ export declare const changeZeniPersonRolesEpic: (actions$: ActionsObservable<Act
|
|
|
26
26
|
type: string;
|
|
27
27
|
} | {
|
|
28
28
|
payload: {
|
|
29
|
-
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" | "
|
|
29
|
+
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";
|
|
30
30
|
messageText: "failed" | "success" | "notification";
|
|
31
31
|
type: import("../..").SnackbarMessageType;
|
|
32
32
|
showStatusIcon?: boolean | undefined;
|