@zeniai/client-epic-state 5.2.30 → 5.2.32-betaAK0
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/commonStateTypes/coaBalance/classBalances/getSumOfBalancesGroupedByPeriod.js +16 -3
- package/lib/commonStateTypes/viewAndReport/reportIDHelper.d.ts +6 -0
- package/lib/commonStateTypes/viewAndReport/reportIDHelper.js +12 -1
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewEpic.js +2 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
- package/lib/entity/sectionProjectView/sectionProjectView.d.ts +1 -1
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +2 -2
- package/lib/epic.d.ts +10 -6
- package/lib/epic.js +15 -8
- package/lib/esm/commonStateTypes/coaBalance/classBalances/getSumOfBalancesGroupedByPeriod.js +16 -3
- package/lib/esm/commonStateTypes/viewAndReport/reportIDHelper.js +7 -0
- package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
- package/lib/esm/entity/sectionClassesViewV2/sectionClassesViewEpic.js +2 -1
- package/lib/esm/epic.js +14 -7
- package/lib/esm/index.js +16 -13
- package/lib/esm/reducer.js +18 -12
- package/lib/esm/view/cashFlow/cashFlowGroupedSectionOrder.js +47 -0
- package/lib/esm/view/cashFlowClassesView/cashFlowClassesViewEpic.js +30 -0
- package/lib/esm/view/cashFlowClassesView/cashFlowClassesViewReducer.js +129 -0
- package/lib/esm/view/cashFlowClassesView/cashFlowClassesViewSelector.js +53 -0
- package/lib/esm/view/cashFlowClassesView/cashFlowForTimeframeClassesViewEpic.js +55 -0
- package/lib/esm/view/cashFlowProjectView/cashFlowForTimeframeProjectViewEpic.js +57 -0
- package/lib/esm/view/cashFlowProjectView/cashFlowProjectViewEpic.js +30 -0
- package/lib/esm/view/cashFlowProjectView/cashFlowProjectViewReducer.js +125 -0
- package/lib/esm/view/cashFlowProjectView/cashFlowProjectViewSelector.js +54 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +29 -11
- package/lib/esm/view/financeStatement/financeStatementSelector.js +21 -1
- package/lib/esm/view/invoicing/customerPaymentMethod/customerPaymentMethodEpic.js +1 -1
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.js +1 -1
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewReducer.js +1 -24
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +10 -36
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogSubFamilyEpics.js +2 -21
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +11 -33
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.js +9 -1
- package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.js +2 -0
- package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/initializeInvoicingCustomerAddressEpic.js +1 -1
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.js +15 -0
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/fetchInvoicingSubscriptionFormPageEpic.js +1 -1
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/initializeInvoicingSubscriptionAddressEpic.js +1 -1
- package/lib/esm/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewEpics.js → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewEpics.js} +1 -1
- package/lib/esm/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewReducer.js → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewReducer.js} +4 -4
- package/lib/esm/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.js → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewSelector.js} +2 -4
- package/lib/esm/view/invoicing/{invoicingCouponDetailView → invoicingCouponRecordView}/fetchInvoicingCouponDetailEpic.js +1 -1
- package/lib/esm/view/invoicing/invoicingCouponRecordView/invoicingCouponRecordViewPayload.js +1 -0
- package/lib/esm/view/invoicing/{invoicingCouponDetailView/invoicingCouponDetailViewReducer.js → invoicingCouponRecordView/invoicingCouponRecordViewReducer.js} +4 -4
- package/lib/esm/view/invoicing/{invoicingCouponDetailView/invoicingCouponDetailViewSelector.js → invoicingCouponRecordView/invoicingCouponRecordViewSelector.js} +2 -2
- package/lib/esm/view/invoicing/invoicingCouponRecordView/invoicingCouponRecordViewState.js +1 -0
- package/lib/esm/view/invoicing/{invoicingCustomerDetailView → invoicingCustomerRecordView}/fetchInvoicingCustomerDetailEpic.js +1 -1
- package/lib/esm/view/invoicing/{invoicingCustomerDetailView → invoicingCustomerRecordView}/fetchInvoicingCustomerDetailPageEpic.js +2 -2
- package/lib/esm/view/invoicing/invoicingCustomerRecordView/invoicingCustomerRecordViewPayload.js +1 -0
- package/lib/esm/view/invoicing/{invoicingCustomerDetailView/invoicingCustomerDetailViewReducer.js → invoicingCustomerRecordView/invoicingCustomerRecordViewReducer.js} +4 -4
- package/lib/esm/view/invoicing/{invoicingCustomerDetailView/invoicingCustomerDetailViewSelector.js → invoicingCustomerRecordView/invoicingCustomerRecordViewSelector.js} +3 -3
- package/lib/esm/view/invoicing/invoicingCustomerRecordView/invoicingCustomerRecordViewState.js +1 -0
- package/lib/esm/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewEpics.js → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewEpics.js} +1 -1
- package/lib/esm/view/invoicing/invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewPayload.js +1 -0
- package/lib/esm/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewReducer.js → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewReducer.js} +4 -4
- package/lib/esm/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.js → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewSelector.js} +2 -2
- package/lib/esm/view/invoicing/invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewState.js +1 -0
- package/lib/esm/view/invoicing/promotionalCreditAction/promotionalCreditActionEpic.js +1 -1
- package/lib/index.d.ts +26 -20
- package/lib/index.js +88 -74
- package/lib/reducer.d.ts +6 -4
- package/lib/reducer.js +18 -12
- package/lib/rootStateTypes.d.ts +12 -8
- package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
- package/lib/view/cashFlow/cashFlowGroupedSectionOrder.d.ts +15 -0
- package/lib/view/cashFlow/cashFlowGroupedSectionOrder.js +50 -0
- package/lib/view/cashFlowClassesView/cashFlowClassesViewEpic.d.ts +6 -0
- package/lib/view/cashFlowClassesView/cashFlowClassesViewEpic.js +34 -0
- package/lib/view/cashFlowClassesView/cashFlowClassesViewPayload.d.ts +14 -0
- package/lib/view/cashFlowClassesView/cashFlowClassesViewReducer.d.ts +34 -0
- package/lib/view/cashFlowClassesView/cashFlowClassesViewReducer.js +133 -0
- package/lib/view/cashFlowClassesView/cashFlowClassesViewSelector.d.ts +7 -0
- package/lib/view/cashFlowClassesView/cashFlowClassesViewSelector.js +57 -0
- package/lib/view/cashFlowClassesView/cashFlowClassesViewSelectorTypes.d.ts +15 -0
- package/lib/view/cashFlowClassesView/cashFlowClassesViewState.d.ts +23 -0
- package/lib/view/cashFlowClassesView/cashFlowForTimeframeClassesViewEpic.d.ts +9 -0
- package/lib/view/cashFlowClassesView/cashFlowForTimeframeClassesViewEpic.js +60 -0
- package/lib/view/cashFlowProjectView/cashFlowForTimeframeProjectViewEpic.d.ts +10 -0
- package/lib/view/cashFlowProjectView/cashFlowForTimeframeProjectViewEpic.js +62 -0
- package/lib/view/cashFlowProjectView/cashFlowProjectViewEpic.d.ts +6 -0
- package/lib/view/cashFlowProjectView/cashFlowProjectViewEpic.js +34 -0
- package/lib/view/cashFlowProjectView/cashFlowProjectViewPayload.d.ts +14 -0
- package/lib/view/cashFlowProjectView/cashFlowProjectViewReducer.d.ts +33 -0
- package/lib/view/cashFlowProjectView/cashFlowProjectViewReducer.js +129 -0
- package/lib/view/cashFlowProjectView/cashFlowProjectViewSelector.d.ts +7 -0
- package/lib/view/cashFlowProjectView/cashFlowProjectViewSelector.js +58 -0
- package/lib/view/cashFlowProjectView/cashFlowProjectViewSelectorTypes.d.ts +19 -0
- package/lib/view/cashFlowProjectView/cashFlowProjectViewState.d.ts +22 -0
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +29 -11
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/financeStatement/financeStatementSelector.d.ts +4 -0
- package/lib/view/financeStatement/financeStatementSelector.js +21 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.d.ts +2 -2
- package/lib/view/invoicing/customerPaymentMethod/customerPaymentMethodEpic.d.ts +1 -1
- package/lib/view/invoicing/customerPaymentMethod/customerPaymentMethodEpic.js +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.d.ts +1 -1
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.js +1 -1
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewReducer.d.ts +3 -19
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewReducer.js +2 -25
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.d.ts +11 -11
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +11 -38
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewState.d.ts +4 -27
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogSubFamilyEpics.d.ts +2 -3
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogSubFamilyEpics.js +2 -22
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.d.ts +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +9 -31
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.d.ts +12 -1
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.js +9 -1
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.d.ts +8 -0
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.js +2 -0
- package/lib/view/invoicing/editInvoicingCustomerDetailView/initializeInvoicingCustomerAddressEpic.d.ts +1 -1
- package/lib/view/invoicing/editInvoicingCustomerDetailView/initializeInvoicingCustomerAddressEpic.js +2 -2
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.d.ts +11 -2
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.js +15 -0
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/fetchInvoicingSubscriptionFormPageEpic.d.ts +1 -1
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/fetchInvoicingSubscriptionFormPageEpic.js +2 -2
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/initializeInvoicingSubscriptionAddressEpic.d.ts +1 -1
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/initializeInvoicingSubscriptionAddressEpic.js +2 -2
- package/lib/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewEpics.d.ts → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewEpics.d.ts} +1 -1
- package/lib/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewEpics.js → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewEpics.js} +5 -5
- package/lib/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewReducer.d.ts → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewReducer.d.ts} +5 -5
- package/lib/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewReducer.js → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewReducer.js} +4 -4
- package/lib/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.d.ts → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewSelector.d.ts} +3 -5
- package/lib/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.js → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewSelector.js} +4 -6
- package/lib/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewState.d.ts → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewState.d.ts} +1 -1
- package/lib/view/invoicing/{invoicingCouponDetailView → invoicingCouponRecordView}/fetchInvoicingCouponDetailEpic.d.ts +1 -1
- package/lib/view/invoicing/{invoicingCouponDetailView → invoicingCouponRecordView}/fetchInvoicingCouponDetailEpic.js +5 -5
- package/lib/view/invoicing/invoicingCouponRecordView/invoicingCouponRecordViewPayload.js +2 -0
- package/lib/view/invoicing/{invoicingCouponDetailView/invoicingCouponDetailViewReducer.d.ts → invoicingCouponRecordView/invoicingCouponRecordViewReducer.d.ts} +6 -6
- package/lib/view/invoicing/{invoicingCouponDetailView/invoicingCouponDetailViewReducer.js → invoicingCouponRecordView/invoicingCouponRecordViewReducer.js} +4 -4
- package/lib/view/invoicing/{invoicingCouponDetailView/invoicingCouponDetailViewSelector.d.ts → invoicingCouponRecordView/invoicingCouponRecordViewSelector.d.ts} +2 -2
- package/lib/view/invoicing/{invoicingCouponDetailView/invoicingCouponDetailViewSelector.js → invoicingCouponRecordView/invoicingCouponRecordViewSelector.js} +4 -4
- package/lib/view/invoicing/{invoicingCouponDetailView/invoicingCouponDetailViewState.d.ts → invoicingCouponRecordView/invoicingCouponRecordViewState.d.ts} +1 -1
- package/lib/view/invoicing/invoicingCouponRecordView/invoicingCouponRecordViewState.js +2 -0
- package/lib/view/invoicing/{invoicingCustomerDetailView → invoicingCustomerRecordView}/fetchInvoicingCustomerDetailEpic.d.ts +1 -1
- package/lib/view/invoicing/{invoicingCustomerDetailView → invoicingCustomerRecordView}/fetchInvoicingCustomerDetailEpic.js +5 -5
- package/lib/view/invoicing/{invoicingCustomerDetailView → invoicingCustomerRecordView}/fetchInvoicingCustomerDetailPageEpic.d.ts +1 -1
- package/lib/view/invoicing/{invoicingCustomerDetailView → invoicingCustomerRecordView}/fetchInvoicingCustomerDetailPageEpic.js +4 -4
- package/lib/view/invoicing/invoicingCustomerRecordView/invoicingCustomerRecordViewPayload.js +2 -0
- package/lib/view/invoicing/{invoicingCustomerDetailView/invoicingCustomerDetailViewReducer.d.ts → invoicingCustomerRecordView/invoicingCustomerRecordViewReducer.d.ts} +7 -7
- package/lib/view/invoicing/{invoicingCustomerDetailView/invoicingCustomerDetailViewReducer.js → invoicingCustomerRecordView/invoicingCustomerRecordViewReducer.js} +4 -4
- package/lib/view/invoicing/{invoicingCustomerDetailView/invoicingCustomerDetailViewSelector.d.ts → invoicingCustomerRecordView/invoicingCustomerRecordViewSelector.d.ts} +2 -2
- package/lib/view/invoicing/{invoicingCustomerDetailView/invoicingCustomerDetailViewSelector.js → invoicingCustomerRecordView/invoicingCustomerRecordViewSelector.js} +5 -5
- package/lib/view/invoicing/{invoicingCustomerDetailView/invoicingCustomerDetailViewState.d.ts → invoicingCustomerRecordView/invoicingCustomerRecordViewState.d.ts} +1 -1
- package/lib/view/invoicing/invoicingCustomerRecordView/invoicingCustomerRecordViewState.js +2 -0
- package/lib/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewEpics.d.ts → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewEpics.d.ts} +1 -1
- package/lib/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewEpics.js → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewEpics.js} +5 -5
- package/lib/view/invoicing/invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewPayload.js +2 -0
- package/lib/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewReducer.d.ts → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewReducer.d.ts} +5 -5
- package/lib/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewReducer.js → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewReducer.js} +4 -4
- package/lib/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.d.ts → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewSelector.d.ts} +2 -2
- package/lib/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.js → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewSelector.js} +4 -4
- package/lib/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewState.d.ts → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewState.d.ts} +1 -1
- package/lib/view/invoicing/invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewState.js +2 -0
- package/lib/view/invoicing/promotionalCreditAction/promotionalCreditActionEpic.d.ts +1 -1
- package/lib/view/invoicing/promotionalCreditAction/promotionalCreditActionEpic.js +2 -2
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/package.json +71 -38
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.js +0 -191
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.d.ts +0 -46
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.js +0 -198
- /package/lib/esm/view/{invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewPayload.js → cashFlowClassesView/cashFlowClassesViewPayload.js} +0 -0
- /package/lib/esm/view/{invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewState.js → cashFlowClassesView/cashFlowClassesViewSelectorTypes.js} +0 -0
- /package/lib/esm/view/{invoicing/invoicingCouponDetailView/invoicingCouponDetailViewPayload.js → cashFlowClassesView/cashFlowClassesViewState.js} +0 -0
- /package/lib/esm/view/{invoicing/invoicingCouponDetailView/invoicingCouponDetailViewState.js → cashFlowProjectView/cashFlowProjectViewPayload.js} +0 -0
- /package/lib/esm/view/{invoicing/invoicingCustomerDetailView/invoicingCustomerDetailViewPayload.js → cashFlowProjectView/cashFlowProjectViewSelectorTypes.js} +0 -0
- /package/lib/esm/view/{invoicing/invoicingCustomerDetailView/invoicingCustomerDetailViewState.js → cashFlowProjectView/cashFlowProjectViewState.js} +0 -0
- /package/lib/esm/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewPayload.js → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewPayload.js} +0 -0
- /package/lib/esm/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewState.js → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewState.js} +0 -0
- /package/lib/view/{invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewPayload.js → cashFlowClassesView/cashFlowClassesViewPayload.js} +0 -0
- /package/lib/view/{invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewState.js → cashFlowClassesView/cashFlowClassesViewSelectorTypes.js} +0 -0
- /package/lib/view/{invoicing/invoicingCouponDetailView/invoicingCouponDetailViewPayload.js → cashFlowClassesView/cashFlowClassesViewState.js} +0 -0
- /package/lib/view/{invoicing/invoicingCouponDetailView/invoicingCouponDetailViewState.js → cashFlowProjectView/cashFlowProjectViewPayload.js} +0 -0
- /package/lib/view/{invoicing/invoicingCustomerDetailView/invoicingCustomerDetailViewPayload.js → cashFlowProjectView/cashFlowProjectViewSelectorTypes.js} +0 -0
- /package/lib/view/{invoicing/invoicingCustomerDetailView/invoicingCustomerDetailViewState.js → cashFlowProjectView/cashFlowProjectViewState.js} +0 -0
- /package/lib/view/invoicing/{invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewPayload.d.ts → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewPayload.d.ts} +0 -0
- /package/lib/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewPayload.js → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewPayload.js} +0 -0
- /package/lib/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewState.js → invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewState.js} +0 -0
- /package/lib/view/invoicing/{invoicingCouponDetailView/invoicingCouponDetailViewPayload.d.ts → invoicingCouponRecordView/invoicingCouponRecordViewPayload.d.ts} +0 -0
- /package/lib/view/invoicing/{invoicingCustomerDetailView/invoicingCustomerDetailViewPayload.d.ts → invoicingCustomerRecordView/invoicingCustomerRecordViewPayload.d.ts} +0 -0
- /package/lib/view/invoicing/{invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewPayload.d.ts → invoicingSubscriptionRecordView/invoicingSubscriptionRecordViewPayload.d.ts} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
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, tenantId: string, fetchFullReport?: any, cacheOverride?: any, excludeResources?: ("vendor" | "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "operating_expenses_by_projects" | "revenue" | "revenue_by_classes" | "revenue_by_projects" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "net_burn_or_income_by_projects" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "balance_sheet_by_classes" | "balance_sheet_by_projects" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts")[] | undefined], {
|
|
3
|
+
export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string, companyId: string, tenantId: string, fetchFullReport?: any, cacheOverride?: any, excludeResources?: ("vendor" | "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "operating_expenses_by_projects" | "revenue" | "revenue_by_classes" | "revenue_by_projects" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "net_burn_or_income_by_projects" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "balance_sheet_by_classes" | "balance_sheet_by_projects" | "cash_flow" | "cash_flow_by_classes" | "cash_flow_by_projects" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts")[] | undefined], {
|
|
4
4
|
userId: string;
|
|
5
5
|
companyId: string;
|
|
6
6
|
tenantId: string;
|
|
7
7
|
fetchFullReport: any;
|
|
8
8
|
cacheOverride: any;
|
|
9
|
-
excludeResources: ("vendor" | "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "operating_expenses_by_projects" | "revenue" | "revenue_by_classes" | "revenue_by_projects" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "net_burn_or_income_by_projects" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "balance_sheet_by_classes" | "balance_sheet_by_projects" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts")[];
|
|
9
|
+
excludeResources: ("vendor" | "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "operating_expenses_by_projects" | "revenue" | "revenue_by_classes" | "revenue_by_projects" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "net_burn_or_income_by_projects" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "balance_sheet_by_classes" | "balance_sheet_by_projects" | "cash_flow" | "cash_flow_by_classes" | "cash_flow_by_projects" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts")[];
|
|
10
10
|
}, "dashboard/fetchDashboard", never, never>;
|
|
11
11
|
declare const _default: import("redux").Reducer<DashboardState>;
|
|
12
12
|
export default _default;
|
|
@@ -12,6 +12,18 @@ const rootActions_1 = require("../../../../rootActions");
|
|
|
12
12
|
const zeniDayJS_1 = require("../../../../zeniDayJS");
|
|
13
13
|
const jeSchedulesPayload_1 = require("../../payload/jeSchedulesPayload");
|
|
14
14
|
const jeSchedulesViewReducer_1 = require("../../reducers/jeSchedulesViewReducer");
|
|
15
|
+
/**
|
|
16
|
+
* How far back to look for accrued schedules, matching the Vendors page
|
|
17
|
+
* (`getDefaultSelectedTimeframeForScheduleType`, 'accrued_expenses'), which queries the same
|
|
18
|
+
* start_date filter through /1.0/schedules.
|
|
19
|
+
*/
|
|
20
|
+
const ACCRUED_LOOKBACK_MONTHS = 24;
|
|
21
|
+
/**
|
|
22
|
+
* One-time accruals keep their own, narrower lookback. Unlike an accrued schedule they belong to
|
|
23
|
+
* exactly one service month and never span months, so the reason the accrued window has to reach
|
|
24
|
+
* back does not apply to them -- widening it would only add older history to the Existing tab.
|
|
25
|
+
*/
|
|
26
|
+
const ONE_TIME_ACCRUAL_LOOKBACK_MONTHS = 12;
|
|
15
27
|
const fetchJeSchedulesEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(jeSchedulesViewReducer_1.fetchJeSchedules.match), (0, operators_1.mergeMap)((action) => {
|
|
16
28
|
const state = state$.value;
|
|
17
29
|
const { expenseAutomationViewState: { selectedPeriodByTenantId }, } = state;
|
|
@@ -33,15 +45,21 @@ const fetchJeSchedulesEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, op
|
|
|
33
45
|
const endDate = isClosePeriodTab || existingEndDate == null
|
|
34
46
|
? (0, timePeriod_2.toString)(period.end)
|
|
35
47
|
: (0, timePeriod_2.toString)(existingEndDate);
|
|
36
|
-
// Accrued rows are windowed on the schedule's own start_date
|
|
37
|
-
//
|
|
38
|
-
//
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
// Accrued rows are windowed on the schedule's own start_date -- its FIRST posting date --
|
|
49
|
+
// rather than a transaction date, so the lower bound has to reach back past the start of
|
|
50
|
+
// every accrual still running in this period, not just the ones that began in it. Review
|
|
51
|
+
// used to send the close month itself, which returned only accruals whose first posting fell
|
|
52
|
+
// in that month and hid every longer-running one.
|
|
53
|
+
const parsedEndDate = (0, zeniDayJS_1.date)(endDate);
|
|
54
|
+
const accruedStartDate = parsedEndDate
|
|
55
|
+
.subtract(ACCRUED_LOOKBACK_MONTHS, 'month')
|
|
56
|
+
.startOf('month')
|
|
57
|
+
.format(timePeriod_1.DEFAULT_DATE_FORMAT);
|
|
58
|
+
// Formatted as a service month, not a date: that is the only thing it is sent as.
|
|
59
|
+
const oneTimeAccrualServiceMonthStart = parsedEndDate
|
|
60
|
+
.subtract(ONE_TIME_ACCRUAL_LOOKBACK_MONTHS, 'month')
|
|
61
|
+
.startOf('month')
|
|
62
|
+
.format(jeSchedulesPayload_1.SERVICE_MONTH_FORMAT);
|
|
45
63
|
const queryParam = {
|
|
46
64
|
base_transaction_end_date: endDate,
|
|
47
65
|
end_date: endDate,
|
|
@@ -62,8 +80,8 @@ const fetchJeSchedulesEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, op
|
|
|
62
80
|
filter_failed_je_postings_by_date: true,
|
|
63
81
|
}
|
|
64
82
|
: {
|
|
65
|
-
one_time_accrual_service_month_start:
|
|
66
|
-
one_time_accrual_service_month_end:
|
|
83
|
+
one_time_accrual_service_month_start: oneTimeAccrualServiceMonthStart,
|
|
84
|
+
one_time_accrual_service_month_end: parsedEndDate.format(jeSchedulesPayload_1.SERVICE_MONTH_FORMAT),
|
|
67
85
|
// Existing lists what actually reached the books.
|
|
68
86
|
one_time_accrual_statuses: ['posted'],
|
|
69
87
|
// A failed posting from an earlier month still needs to surface here, so this list
|
|
@@ -17,7 +17,7 @@ export declare const fetchFinanceStatement: import("@reduxjs/toolkit").ActionCre
|
|
|
17
17
|
firstMonthOfFY: Month;
|
|
18
18
|
maxNumOfPeriodsToHighlight: number;
|
|
19
19
|
thisPeriod: TimeframeTick;
|
|
20
|
-
}, "financeStatement/updateFinanceStatementThisPeriod">, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, "financeStatement/updateCOABalancesRange">, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"vendor" | "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "operating_expenses_by_projects" | "revenue" | "revenue_by_classes" | "revenue_by_projects" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "net_burn_or_income_by_projects" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "balance_sheet_by_classes" | "balance_sheet_by_projects" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts", "financeStatement/updateSelectedReportId">, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
20
|
+
}, "financeStatement/updateFinanceStatementThisPeriod">, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, "financeStatement/updateCOABalancesRange">, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"vendor" | "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "operating_expenses_by_projects" | "revenue" | "revenue_by_classes" | "revenue_by_projects" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "net_burn_or_income_by_projects" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "balance_sheet_by_classes" | "balance_sheet_by_projects" | "cash_flow" | "cash_flow_by_classes" | "cash_flow_by_projects" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts", "financeStatement/updateSelectedReportId">, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
21
21
|
additionalBalances: COABalanceType[];
|
|
22
22
|
coaBalances: COABalance[];
|
|
23
23
|
firstMonthOfFY: Month;
|
|
@@ -9,6 +9,8 @@ import { BalanceSheetReport } from '../balanceSheet/balanceSheetSelectorTypes';
|
|
|
9
9
|
import { BalanceSheetClassesViewReport } from '../balanceSheetClassesView/balanceSheetClassesViewSelectorTypes';
|
|
10
10
|
import { BalanceSheetProjectViewReport } from '../balanceSheetProjectView/balanceSheetProjectViewSelectorTypes';
|
|
11
11
|
import { CashFlowReport } from '../cashFlow/cashFlowSelectorTypes';
|
|
12
|
+
import { CashFlowClassesViewReport } from '../cashFlowClassesView/cashFlowClassesViewSelectorTypes';
|
|
13
|
+
import { CashFlowProjectViewReport } from '../cashFlowProjectView/cashFlowProjectViewSelectorTypes';
|
|
12
14
|
import { ProfitAndLossReport } from '../profitAndLoss/profitAndLossSelector';
|
|
13
15
|
import { ProfitAndLossByClassHorizontalReport } from '../profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes';
|
|
14
16
|
import { ProfitAndLossClassesViewReport } from '../profitAndLossClassesView/profitAndLossClassesViewSelectorTypes';
|
|
@@ -19,6 +21,8 @@ export interface FinanceStatementReport extends SelectorReport {
|
|
|
19
21
|
balanceSheetByProjectReport: BalanceSheetProjectViewReport;
|
|
20
22
|
balanceSheetReport: BalanceSheetReport;
|
|
21
23
|
balancesInTimeframe: COABalance[];
|
|
24
|
+
cashFlowByClassReport: CashFlowClassesViewReport;
|
|
25
|
+
cashFlowByProjectReport: CashFlowProjectViewReport;
|
|
22
26
|
cashFlowReport: CashFlowReport;
|
|
23
27
|
displayOrder: COABalancesOrder;
|
|
24
28
|
downloadState: FetchState;
|
|
@@ -14,6 +14,8 @@ const balanceSheetSelector_1 = require("../balanceSheet/balanceSheetSelector");
|
|
|
14
14
|
const balanceSheetClassesViewSelector_1 = require("../balanceSheetClassesView/balanceSheetClassesViewSelector");
|
|
15
15
|
const balanceSheetProjectViewSelector_1 = require("../balanceSheetProjectView/balanceSheetProjectViewSelector");
|
|
16
16
|
const cashFlowSelector_1 = require("../cashFlow/cashFlowSelector");
|
|
17
|
+
const cashFlowClassesViewSelector_1 = require("../cashFlowClassesView/cashFlowClassesViewSelector");
|
|
18
|
+
const cashFlowProjectViewSelector_1 = require("../cashFlowProjectView/cashFlowProjectViewSelector");
|
|
17
19
|
const profitAndLossSelector_1 = require("../profitAndLoss/profitAndLossSelector");
|
|
18
20
|
const profitAndLossClassesByClassHorizontalSelector_1 = require("../profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector");
|
|
19
21
|
const profitAndLossClassesViewSelector_1 = require("../profitAndLossClassesView/profitAndLossClassesViewSelector");
|
|
@@ -42,7 +44,7 @@ function getFirstMonthOfFY(profitAndLossState, balanceSheetState, cashFlowState)
|
|
|
42
44
|
cashFlowState.firstMonthOfFY ??
|
|
43
45
|
1);
|
|
44
46
|
}
|
|
45
|
-
exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.accountState, (state) => state.accountGroupState, (state) => state.classState, (state) => state.sectionClassesViewStateV2, (state) => state.profitAndLossState, (state) => state.profitAndLossClassesViewState, (state) => state.projectState, (state) => state.sectionProjectViewState, (state) => state.profitAndLossProjectViewState, (state) => state.balanceSheetState, (state) => state.balanceSheetClassesViewState, (state) => state.balanceSheetProjectViewState, (state) => state.cashFlowState, (state) => state.financeStatementState, (state) => state.sectionAccountsViewState, (state) => state.forecastState, (accountState, accountGroupState, classState, sectionsState, profitAndLossState, profitAndLossClassesViewState, projectState, sectionProjectViewState, profitAndLossProjectViewState, balanceSheetState, balanceSheetClassesViewState, balanceSheetProjectViewState, cashFlowState, financeStatementState, sectionAccountsViewState, forecastState) => {
|
|
47
|
+
exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.accountState, (state) => state.accountGroupState, (state) => state.classState, (state) => state.sectionClassesViewStateV2, (state) => state.profitAndLossState, (state) => state.profitAndLossClassesViewState, (state) => state.projectState, (state) => state.sectionProjectViewState, (state) => state.profitAndLossProjectViewState, (state) => state.balanceSheetState, (state) => state.balanceSheetClassesViewState, (state) => state.balanceSheetProjectViewState, (state) => state.cashFlowState, (state) => state.cashFlowClassesViewState, (state) => state.cashFlowProjectViewState, (state) => state.financeStatementState, (state) => state.sectionAccountsViewState, (state) => state.forecastState, (accountState, accountGroupState, classState, sectionsState, profitAndLossState, profitAndLossClassesViewState, projectState, sectionProjectViewState, profitAndLossProjectViewState, balanceSheetState, balanceSheetClassesViewState, balanceSheetProjectViewState, cashFlowState, cashFlowClassesViewState, cashFlowProjectViewState, financeStatementState, sectionAccountsViewState, forecastState) => {
|
|
46
48
|
// to get min and max dates across three reports
|
|
47
49
|
let allTimeframeTicks = [];
|
|
48
50
|
let balancesInTimeframe = [];
|
|
@@ -84,6 +86,10 @@ exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.acc
|
|
|
84
86
|
const balanceSheetReport = (0, balanceSheetSelector_1.getBalanceSheet)(filter, accountState, accountGroupState, sectionAccountsViewState, balanceSheetState);
|
|
85
87
|
const balanceSheetClassFilter = (0, coaBalancesFilterClassesView_1.newBalancesFilterClassesView)(filter.firstMonthOfFY, filter.timeframe, filter.balancesRange.numberOfPeriods, filter.balancesRange.thisPeriod, filter.balancesRange.orderBy, filter.additionalBalances, balanceSheetClassesViewState.uiState.classesToFilterOut);
|
|
86
88
|
const balanceSheetByClassReport = (0, balanceSheetClassesViewSelector_1.getBalanceSheetClassesView)(balanceSheetClassFilter, accountState, classState, sectionsState, balanceSheetClassesViewState);
|
|
89
|
+
const cashFlowClassFilter = (0, coaBalancesFilterClassesView_1.newBalancesFilterClassesView)(filter.firstMonthOfFY, filter.timeframe, filter.balancesRange.numberOfPeriods, filter.balancesRange.thisPeriod, filter.balancesRange.orderBy, filter.additionalBalances, cashFlowClassesViewState.uiState.classesToFilterOut);
|
|
90
|
+
const cashFlowByClassReport = (0, cashFlowClassesViewSelector_1.getCashFlowClassesView)(cashFlowClassFilter, accountState, classState, sectionsState, cashFlowClassesViewState);
|
|
91
|
+
const cashFlowProjectFilter = (0, coaBalancesFilterProjectView_1.newBalancesFilterProjectView)(filter.firstMonthOfFY, filter.timeframe, filter.balancesRange.numberOfPeriods, filter.balancesRange.thisPeriod, filter.balancesRange.orderBy, filter.additionalBalances, cashFlowProjectViewState.uiState.projectsToFilterOut);
|
|
92
|
+
const cashFlowByProjectReport = (0, cashFlowProjectViewSelector_1.getCashFlowProjectView)(cashFlowProjectFilter, accountState, projectState, sectionProjectViewState, cashFlowProjectViewState);
|
|
87
93
|
const balanceSheetProjectFilter = (0, coaBalancesFilterProjectView_1.newBalancesFilterProjectView)(filter.firstMonthOfFY, filter.timeframe, filter.balancesRange.numberOfPeriods, filter.balancesRange.thisPeriod, filter.balancesRange.orderBy, filter.additionalBalances, balanceSheetProjectViewState.uiState.projectsToFilterOut);
|
|
88
94
|
const balanceSheetByProjectReport = (0, balanceSheetProjectViewSelector_1.getBalanceSheetProjectView)(balanceSheetProjectFilter, accountState, projectState, sectionProjectViewState, balanceSheetProjectViewState);
|
|
89
95
|
const cashFlowReport = (0, cashFlowSelector_1.getCashFlow)(filter, accountState, accountGroupState, sectionAccountsViewState, cashFlowState);
|
|
@@ -132,6 +138,18 @@ exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.acc
|
|
|
132
138
|
error: cashFlowReport.error,
|
|
133
139
|
};
|
|
134
140
|
break;
|
|
141
|
+
case 'cash_flow_by_classes':
|
|
142
|
+
selectedReportAndTimeframeFetchState = {
|
|
143
|
+
fetchState: cashFlowByClassReport.fetchState,
|
|
144
|
+
error: cashFlowByClassReport.error,
|
|
145
|
+
};
|
|
146
|
+
break;
|
|
147
|
+
case 'cash_flow_by_projects':
|
|
148
|
+
selectedReportAndTimeframeFetchState = {
|
|
149
|
+
fetchState: cashFlowByProjectReport.fetchState,
|
|
150
|
+
error: cashFlowByProjectReport.error,
|
|
151
|
+
};
|
|
152
|
+
break;
|
|
135
153
|
default:
|
|
136
154
|
break;
|
|
137
155
|
}
|
|
@@ -154,6 +172,8 @@ exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.acc
|
|
|
154
172
|
profitAndLossByClassHorizontalReport,
|
|
155
173
|
balanceSheetReport,
|
|
156
174
|
balanceSheetByClassReport,
|
|
175
|
+
cashFlowByClassReport,
|
|
176
|
+
cashFlowByProjectReport,
|
|
157
177
|
balanceSheetByProjectReport,
|
|
158
178
|
cashFlowReport,
|
|
159
179
|
filter,
|
|
@@ -3,9 +3,9 @@ import { ZeniAPIStatus } from '../../responsePayload';
|
|
|
3
3
|
import { VendorReviewViewAllRecommendationsPayload } from '../vendorReviewView/common/payload/commonTypesPayloadShapes';
|
|
4
4
|
import { GlobalMerchantViewState, GlobalRecommendationFetchSource, NewGlobalMerchantCurrentSelection } from './globalMerchantViewState';
|
|
5
5
|
export declare const initialState: GlobalMerchantViewState;
|
|
6
|
-
export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "vendor" | "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "operating_expenses_by_projects" | "revenue" | "revenue_by_classes" | "revenue_by_projects" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "net_burn_or_income_by_projects" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "balance_sheet_by_classes" | "balance_sheet_by_projects" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts" | undefined], {
|
|
6
|
+
export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "vendor" | "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "operating_expenses_by_projects" | "revenue" | "revenue_by_classes" | "revenue_by_projects" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "net_burn_or_income_by_projects" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "balance_sheet_by_classes" | "balance_sheet_by_projects" | "cash_flow" | "cash_flow_by_classes" | "cash_flow_by_projects" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts" | undefined], {
|
|
7
7
|
merchantId: string | undefined;
|
|
8
|
-
context: "vendor" | "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "operating_expenses_by_projects" | "revenue" | "revenue_by_classes" | "revenue_by_projects" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "net_burn_or_income_by_projects" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "balance_sheet_by_classes" | "balance_sheet_by_projects" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts" | undefined;
|
|
8
|
+
context: "vendor" | "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "operating_expenses_by_projects" | "revenue" | "revenue_by_classes" | "revenue_by_projects" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "net_burn_or_income_by_projects" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "balance_sheet_by_classes" | "balance_sheet_by_projects" | "cash_flow" | "cash_flow_by_classes" | "cash_flow_by_projects" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts" | undefined;
|
|
9
9
|
}, "globalMerchantView/createGlobalMerchant", never, never>, createGlobalMerchantSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
10
10
|
merchantId: ID;
|
|
11
11
|
}, "globalMerchantView/createGlobalMerchantSuccess">, createGlobalMerchantFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -7,8 +7,8 @@ import { RootState } from '../../../rootStateTypes';
|
|
|
7
7
|
import { InvoicingCreateInvoiceFormLocalData } from './createInvoiceState';
|
|
8
8
|
/**
|
|
9
9
|
* One catalog plan price, split into its two naming parts so consumers can
|
|
10
|
-
* compose the label themselves (the plan family name and the
|
|
11
|
-
* name are separate columns in the catalog). `price` is the
|
|
10
|
+
* compose the label themselves (the plan family name and the price point/price
|
|
11
|
+
* name are separate columns in the catalog). `price` is the price point's
|
|
12
12
|
* catalog price in whole USD (never minor units), absent when the catalog
|
|
13
13
|
* carries no price for it.
|
|
14
14
|
*/
|
|
@@ -2,7 +2,7 @@ import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { RootState } from '../../../rootStateTypes';
|
|
4
4
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
5
|
-
import { fetchInvoicingCustomerDetail } from '../
|
|
5
|
+
import { fetchInvoicingCustomerDetail } from '../invoicingCustomerRecordView/invoicingCustomerRecordViewReducer';
|
|
6
6
|
import { createInvoicingSetupIntent, createInvoicingSetupIntentFailure, createInvoicingSetupIntentSuccess, fetchInvoicingPlaidLinkToken, fetchInvoicingPlaidLinkTokenFailure, fetchInvoicingPlaidLinkTokenSuccess, saveInvoicingPaymentMethod, saveInvoicingPaymentMethodFailure, saveInvoicingPaymentMethodSuccess, sendInvoicingPaymentLink, sendInvoicingPaymentLinkFailure, sendInvoicingPaymentLinkSuccess } from './customerPaymentMethodReducer';
|
|
7
7
|
export type ActionType = ReturnType<typeof createInvoicingSetupIntent> | ReturnType<typeof createInvoicingSetupIntentSuccess> | ReturnType<typeof createInvoicingSetupIntentFailure> | ReturnType<typeof fetchInvoicingPlaidLinkToken> | ReturnType<typeof fetchInvoicingPlaidLinkTokenSuccess> | ReturnType<typeof fetchInvoicingPlaidLinkTokenFailure> | ReturnType<typeof saveInvoicingPaymentMethod> | ReturnType<typeof saveInvoicingPaymentMethodSuccess> | ReturnType<typeof saveInvoicingPaymentMethodFailure> | ReturnType<typeof sendInvoicingPaymentLink> | ReturnType<typeof sendInvoicingPaymentLinkSuccess> | ReturnType<typeof sendInvoicingPaymentLinkFailure> | ReturnType<typeof fetchInvoicingCustomerDetail>;
|
|
8
8
|
export declare const createInvoicingSetupIntentEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -4,7 +4,7 @@ exports.sendInvoicingPaymentLinkEpic = exports.saveInvoicingPaymentMethodEpic =
|
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const responsePayload_1 = require("../../../responsePayload");
|
|
7
|
-
const
|
|
7
|
+
const invoicingCustomerRecordViewReducer_1 = require("../invoicingCustomerRecordView/invoicingCustomerRecordViewReducer");
|
|
8
8
|
const customerPaymentMethodReducer_1 = require("./customerPaymentMethodReducer");
|
|
9
9
|
const createInvoicingSetupIntentEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(customerPaymentMethodReducer_1.createInvoicingSetupIntent.match), (0, operators_1.mergeMap)((action) => {
|
|
10
10
|
const { customerId } = action.payload;
|
|
@@ -41,7 +41,7 @@ const saveInvoicingPaymentMethodEpic = (actions$, _state$, zeniAPI) => actions$.
|
|
|
41
41
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
42
42
|
return [
|
|
43
43
|
(0, customerPaymentMethodReducer_1.saveInvoicingPaymentMethodSuccess)(),
|
|
44
|
-
(0,
|
|
44
|
+
(0, invoicingCustomerRecordViewReducer_1.fetchInvoicingCustomerDetail)({ id: customerId }),
|
|
45
45
|
];
|
|
46
46
|
}
|
|
47
47
|
return (0, rxjs_1.of)((0, customerPaymentMethodReducer_1.saveInvoicingPaymentMethodFailure)(response.status));
|
|
@@ -22,6 +22,6 @@ export interface InvoicingCatalogAccountingFields {
|
|
|
22
22
|
export declare const buildAccountingDetail: (subFamily: InvoicingCatalogAccountingFields, lookup: InvoicingCatalogAccountingLookup) => Record<string, unknown> | undefined;
|
|
23
23
|
/**
|
|
24
24
|
* Build the parent catalog-item request body from the form draft. Creates omit
|
|
25
|
-
* both parent and
|
|
25
|
+
* both parent and price point IDs; edits retain returned price point IDs.
|
|
26
26
|
*/
|
|
27
27
|
export declare const localDataToSaveInvoicingCatalogItemPayload: (localData: InvoicingCatalogItemFormLocalData, isCreate: boolean, lookup: InvoicingCatalogAccountingLookup) => Record<string, unknown>;
|
|
@@ -96,7 +96,7 @@ const buildSubFamilyPayload = (localData, subFamily, clearEmptyValues, lookup) =
|
|
|
96
96
|
const DEFAULT_CATALOG_ITEM_UNIT = 'USD';
|
|
97
97
|
/**
|
|
98
98
|
* Build the parent catalog-item request body from the form draft. Creates omit
|
|
99
|
-
* both parent and
|
|
99
|
+
* both parent and price point IDs; edits retain returned price point IDs.
|
|
100
100
|
*/
|
|
101
101
|
const localDataToSaveInvoicingCatalogItemPayload = (localData, isCreate, lookup) => {
|
|
102
102
|
const description = trimOrUndefined(localData.description);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
3
|
-
import { InvoicingCatalogItemKind } from '../
|
|
4
|
-
import
|
|
5
|
-
import { type CatalogDetailEditValues, EditInvoicingCatalogItemDetailViewState, InvoicingCatalogItemFormLocalData } from './editInvoicingCatalogItemDetailViewState';
|
|
3
|
+
import { InvoicingCatalogItemKind } from '../invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewState';
|
|
4
|
+
import { EditInvoicingCatalogItemDetailViewState, InvoicingCatalogItemFormLocalData } from './editInvoicingCatalogItemDetailViewState';
|
|
6
5
|
/** Push the full form draft into CES (edit tree when `id` is present). */
|
|
7
6
|
export interface UpdateInvoicingCatalogItemFormDraftPayload {
|
|
8
7
|
localData: InvoicingCatalogItemFormLocalData;
|
|
@@ -12,11 +11,6 @@ export interface UpdateInvoicingCatalogItemFormDraftPayload {
|
|
|
12
11
|
export interface SubmitInvoicingCatalogItemFormPayload {
|
|
13
12
|
id?: ID;
|
|
14
13
|
}
|
|
15
|
-
/** Push the detail page's inline-edit draft into CES. */
|
|
16
|
-
export interface UpdateInvoicingCatalogItemDetailEditDraftPayload {
|
|
17
|
-
id: ID;
|
|
18
|
-
localData: CatalogDetailEditValues;
|
|
19
|
-
}
|
|
20
14
|
/**
|
|
21
15
|
* Save the catalog detail page's inline edit. Carries no form data: the draft,
|
|
22
16
|
* the saved price points and the item type all come off state in the epic, so
|
|
@@ -26,22 +20,12 @@ export interface SaveInvoicingCatalogItemPayload {
|
|
|
26
20
|
kind: InvoicingCatalogItemKind;
|
|
27
21
|
id?: ID;
|
|
28
22
|
}
|
|
29
|
-
export interface CreateInvoicingCatalogSubFamilyPayload {
|
|
30
|
-
itemType: string;
|
|
31
|
-
parentItemId: ID;
|
|
32
|
-
/**
|
|
33
|
-
* The dialog's form values. The request body is built in the epic, which can
|
|
34
|
-
* resolve a picked account id to the record the payload carries — the page
|
|
35
|
-
* holds ids and never needs to know the wire shape.
|
|
36
|
-
*/
|
|
37
|
-
values: CreateSubFamilyFormValues;
|
|
38
|
-
}
|
|
39
23
|
export interface ArchiveInvoicingCatalogSubFamilyPayload {
|
|
40
24
|
parentItemId: ID;
|
|
41
25
|
subFamilyId: ID;
|
|
42
26
|
}
|
|
43
27
|
export declare const initialState: EditInvoicingCatalogItemDetailViewState;
|
|
44
|
-
export declare const
|
|
28
|
+
export declare const updateInvoicingCatalogItemFormDraft: import("@reduxjs/toolkit").ActionCreatorWithPayload<UpdateInvoicingCatalogItemFormDraftPayload, "editInvoicingCatalogItemDetailView/updateInvoicingCatalogItemFormDraft">, submitInvoicingCatalogItemForm: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: SubmitInvoicingCatalogItemFormPayload], SubmitInvoicingCatalogItemFormPayload, "editInvoicingCatalogItemDetailView/submitInvoicingCatalogItemForm", never, never>, archiveInvoicingCatalogSubFamily: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: ArchiveInvoicingCatalogSubFamilyPayload], ArchiveInvoicingCatalogSubFamilyPayload, "editInvoicingCatalogItemDetailView/archiveInvoicingCatalogSubFamily", never, never>, submitInvoicingCatalogItemFormSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
45
29
|
itemId: ID;
|
|
46
30
|
kind: InvoicingCatalogItemKind;
|
|
47
31
|
}, "editInvoicingCatalogItemDetailView/submitInvoicingCatalogItemFormSuccess">, submitInvoicingCatalogItemFormFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "editInvoicingCatalogItemDetailView/submitInvoicingCatalogItemFormFailure">, resetEditInvoicingCatalogItemDetailView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"editInvoicingCatalogItemDetailView/resetEditInvoicingCatalogItemDetailView">;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.resetEditInvoicingCatalogItemDetailView = exports.submitInvoicingCatalogItemFormFailure = exports.submitInvoicingCatalogItemFormSuccess = exports.archiveInvoicingCatalogSubFamily = exports.
|
|
4
|
+
exports.resetEditInvoicingCatalogItemDetailView = exports.submitInvoicingCatalogItemFormFailure = exports.submitInvoicingCatalogItemFormSuccess = exports.archiveInvoicingCatalogSubFamily = exports.submitInvoicingCatalogItemForm = exports.updateInvoicingCatalogItemFormDraft = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const rootActions_1 = require("../../../rootActions");
|
|
7
7
|
const invoicingCatalogItemFormConfig_1 = require("./invoicingCatalogItemFormConfig");
|
|
8
8
|
exports.initialState = {
|
|
9
9
|
fetchState: 'Not-Started',
|
|
10
10
|
error: undefined,
|
|
11
|
-
detailEditDraftById: {},
|
|
12
11
|
editDraftById: {},
|
|
13
12
|
newItemDraft: { ...invoicingCatalogItemFormConfig_1.initialInvoicingCatalogItemFormLocalData },
|
|
14
13
|
savedItemId: undefined,
|
|
@@ -30,10 +29,6 @@ const editInvoicingCatalogItemDetailView = (0, toolkit_1.createSlice)({
|
|
|
30
29
|
draft.newItemDraft = localData;
|
|
31
30
|
}
|
|
32
31
|
},
|
|
33
|
-
updateInvoicingCatalogItemDetailEditDraft(draft, action) {
|
|
34
|
-
const { id, localData } = action.payload;
|
|
35
|
-
draft.detailEditDraftById[id] = localData;
|
|
36
|
-
},
|
|
37
32
|
submitInvoicingCatalogItemForm: {
|
|
38
33
|
reducer(draft) {
|
|
39
34
|
draft.fetchState = 'In-Progress';
|
|
@@ -44,22 +39,6 @@ const editInvoicingCatalogItemDetailView = (0, toolkit_1.createSlice)({
|
|
|
44
39
|
return { payload };
|
|
45
40
|
},
|
|
46
41
|
},
|
|
47
|
-
saveInvoicingCatalogItem(draft, action) {
|
|
48
|
-
draft.fetchState = 'In-Progress';
|
|
49
|
-
draft.error = undefined;
|
|
50
|
-
draft.savedItemId = undefined;
|
|
51
|
-
draft.savedKind = action.payload.kind;
|
|
52
|
-
},
|
|
53
|
-
createInvoicingCatalogSubFamily: {
|
|
54
|
-
reducer(draft) {
|
|
55
|
-
draft.fetchState = 'In-Progress';
|
|
56
|
-
draft.error = undefined;
|
|
57
|
-
draft.savedItemId = undefined;
|
|
58
|
-
},
|
|
59
|
-
prepare(payload) {
|
|
60
|
-
return { payload };
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
42
|
archiveInvoicingCatalogSubFamily: {
|
|
64
43
|
reducer(draft) {
|
|
65
44
|
draft.fetchState = 'In-Progress';
|
|
@@ -75,7 +54,6 @@ const editInvoicingCatalogItemDetailView = (0, toolkit_1.createSlice)({
|
|
|
75
54
|
draft.error = undefined;
|
|
76
55
|
draft.savedItemId = action.payload.itemId;
|
|
77
56
|
draft.savedKind = action.payload.kind;
|
|
78
|
-
delete draft.detailEditDraftById[action.payload.itemId];
|
|
79
57
|
},
|
|
80
58
|
submitInvoicingCatalogItemFormFailure(draft, action) {
|
|
81
59
|
draft.fetchState = 'Error';
|
|
@@ -86,7 +64,6 @@ const editInvoicingCatalogItemDetailView = (0, toolkit_1.createSlice)({
|
|
|
86
64
|
draft.error = undefined;
|
|
87
65
|
draft.savedItemId = undefined;
|
|
88
66
|
draft.savedKind = undefined;
|
|
89
|
-
draft.detailEditDraftById = {};
|
|
90
67
|
draft.editDraftById = {};
|
|
91
68
|
draft.newItemDraft = { ...invoicingCatalogItemFormConfig_1.initialInvoicingCatalogItemFormLocalData };
|
|
92
69
|
},
|
|
@@ -97,5 +74,5 @@ const editInvoicingCatalogItemDetailView = (0, toolkit_1.createSlice)({
|
|
|
97
74
|
});
|
|
98
75
|
},
|
|
99
76
|
});
|
|
100
|
-
_a = editInvoicingCatalogItemDetailView.actions, exports.
|
|
77
|
+
_a = editInvoicingCatalogItemDetailView.actions, exports.updateInvoicingCatalogItemFormDraft = _a.updateInvoicingCatalogItemFormDraft, exports.submitInvoicingCatalogItemForm = _a.submitInvoicingCatalogItemForm, exports.archiveInvoicingCatalogSubFamily = _a.archiveInvoicingCatalogSubFamily, exports.submitInvoicingCatalogItemFormSuccess = _a.submitInvoicingCatalogItemFormSuccess, exports.submitInvoicingCatalogItemFormFailure = _a.submitInvoicingCatalogItemFormFailure, exports.resetEditInvoicingCatalogItemDetailView = _a.resetEditInvoicingCatalogItemDetailView;
|
|
101
78
|
exports.default = editInvoicingCatalogItemDetailView.reducer;
|
|
@@ -5,17 +5,9 @@ import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndRep
|
|
|
5
5
|
import { InvoicingFieldHelpByCode, InvoicingNamedOption, InvoicingNamedOptionsByKey } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
6
6
|
import { InvoicingPlan } from '../../../entity/invoicing/plan/planState';
|
|
7
7
|
import { RootState } from '../../../rootStateTypes';
|
|
8
|
-
import { InvoicingCatalogItemKind } from '../
|
|
9
|
-
import { type
|
|
10
|
-
|
|
11
|
-
export declare const initialCatalogDetailEditValues: () => CatalogDetailEditValues;
|
|
12
|
-
/**
|
|
13
|
-
* The detail page's inline-edit form data: the stored draft once the user has
|
|
14
|
-
* touched the form, seeded from the loaded record until then. Memoized so the
|
|
15
|
-
* page receives a stable value — recomputing it per store change would reseed
|
|
16
|
-
* the form mid-edit and drop what the user had typed.
|
|
17
|
-
*/
|
|
18
|
-
export declare const getInvoicingCatalogItemDetailEditLocalData: (state: RootState, id: ID | undefined) => CatalogDetailEditValues;
|
|
8
|
+
import { InvoicingCatalogItemKind } from '../invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewState';
|
|
9
|
+
import { type InvoicingCatalogItemRecordView } from '../invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewSelector';
|
|
10
|
+
import { InvoicingCatalogItemFormLocalData } from './editInvoicingCatalogItemDetailViewState';
|
|
19
11
|
export declare const getEditInvoicingCatalogItemDetailViewState: (state: RootState) => FetchStateAndError;
|
|
20
12
|
export declare const getSavedInvoicingCatalogItemId: (state: RootState) => ID | undefined;
|
|
21
13
|
export declare const getSavedInvoicingCatalogItemKind: (state: RootState) => InvoicingCatalogItemKind | undefined;
|
|
@@ -41,6 +33,9 @@ export declare const getInvoicingApplicableCatalogItemOptions: (state: RootState
|
|
|
41
33
|
export interface InvoicingCatalogItemFormView extends SelectorView {
|
|
42
34
|
applicabilityValues: readonly string[];
|
|
43
35
|
applicableItemOptions: ApplicableCatalogItemOption[];
|
|
36
|
+
/** Lifecycle option lists, folded in from the record view. */
|
|
37
|
+
catalogItemLifecycleActionOptions: InvoicingCatalogItemRecordView['catalogItemLifecycleActionOptions'];
|
|
38
|
+
catalogProductLifecycleActionOptions: InvoicingCatalogItemRecordView['catalogProductLifecycleActionOptions'];
|
|
44
39
|
/**
|
|
45
40
|
* Backend help copy for this screen's field group, keyed by field code.
|
|
46
41
|
* Folded in here so the screen never reaches for the config view itself.
|
|
@@ -64,6 +59,11 @@ export interface InvoicingCatalogItemFormView extends SelectorView {
|
|
|
64
59
|
*/
|
|
65
60
|
qboAccountHierarchy: NestedAccountHierarchyForReport[];
|
|
66
61
|
qboClassHierarchy: NestedClassHierarchyForReport[];
|
|
62
|
+
/**
|
|
63
|
+
* Loading the item, as distinct from this view's own `fetchState`, which
|
|
64
|
+
* tracks the save.
|
|
65
|
+
*/
|
|
66
|
+
recordState: FetchStateAndError;
|
|
67
67
|
tierTypeValues: readonly string[];
|
|
68
68
|
trialEndActionOptions: InvoicingNamedOption[];
|
|
69
69
|
trialUnitOptions: InvoicingNamedOption[];
|
|
@@ -1,48 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getInvoicingCatalogItemFormView = exports.getInvoicingApplicableCatalogItemOptions = exports.getSavedInvoicingCatalogItemKind = exports.getSavedInvoicingCatalogItemId = exports.getEditInvoicingCatalogItemDetailViewState =
|
|
3
|
+
exports.getInvoicingCatalogItemFormView = exports.getInvoicingApplicableCatalogItemOptions = exports.getSavedInvoicingCatalogItemKind = exports.getSavedInvoicingCatalogItemId = exports.getEditInvoicingCatalogItemDetailViewState = void 0;
|
|
4
4
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
5
|
const planSelector_1 = require("../../../entity/invoicing/plan/planSelector");
|
|
6
|
+
const invoicingCatalogItemRecordViewSelector_1 = require("../invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewSelector");
|
|
6
7
|
const invoicingConfigViewSelector_1 = require("../invoicingConfigView/invoicingConfigViewSelector");
|
|
7
8
|
const invoicingQboViewSelector_1 = require("../invoicingQboView/invoicingQboViewSelector");
|
|
8
|
-
const catalogDetailEditPayload_1 = require("./catalogDetailEditPayload");
|
|
9
9
|
const invoicingCatalogItemFormConfig_1 = require("./invoicingCatalogItemFormConfig");
|
|
10
|
-
/** An unsaved item's inline-edit draft, before the record has loaded. */
|
|
11
|
-
const initialCatalogDetailEditValues = () => ({
|
|
12
|
-
applicableItems: [],
|
|
13
|
-
description: '',
|
|
14
|
-
enabledForCheckout: true,
|
|
15
|
-
enabledInPortal: true,
|
|
16
|
-
giftClaimRedirectUrl: '',
|
|
17
|
-
includedInMrr: true,
|
|
18
|
-
isGiftable: false,
|
|
19
|
-
isShippable: false,
|
|
20
|
-
itemApplicability: 'all',
|
|
21
|
-
metered: false,
|
|
22
|
-
name: '',
|
|
23
|
-
productCode: '',
|
|
24
|
-
subFamilies: [],
|
|
25
|
-
unit: '',
|
|
26
|
-
usageCalculation: 'sum_of_usages',
|
|
27
|
-
});
|
|
28
|
-
exports.initialCatalogDetailEditValues = initialCatalogDetailEditValues;
|
|
29
|
-
/**
|
|
30
|
-
* The detail page's inline-edit form data: the stored draft once the user has
|
|
31
|
-
* touched the form, seeded from the loaded record until then. Memoized so the
|
|
32
|
-
* page receives a stable value — recomputing it per store change would reseed
|
|
33
|
-
* the form mid-edit and drop what the user had typed.
|
|
34
|
-
*/
|
|
35
|
-
exports.getInvoicingCatalogItemDetailEditLocalData = (0, toolkit_1.createSelector)([
|
|
36
|
-
(state, id) => id != null
|
|
37
|
-
? state.editInvoicingCatalogItemDetailViewState.detailEditDraftById[id]
|
|
38
|
-
: undefined,
|
|
39
|
-
(state, id) => id != null
|
|
40
|
-
? (0, planSelector_1.getInvoicingPlanById)(state.invoicingPlanState, id)
|
|
41
|
-
: undefined,
|
|
42
|
-
], (storedDraft, plan) => storedDraft ??
|
|
43
|
-
(plan != null
|
|
44
|
-
? (0, catalogDetailEditPayload_1.planToCatalogDetailEditValues)(plan)
|
|
45
|
-
: (0, exports.initialCatalogDetailEditValues)()));
|
|
46
10
|
const getEditInvoicingCatalogItemDetailViewState = (state) => ({
|
|
47
11
|
fetchState: state.editInvoicingCatalogItemDetailViewState.fetchState,
|
|
48
12
|
error: state.editInvoicingCatalogItemDetailViewState.error,
|
|
@@ -96,7 +60,16 @@ const getInvoicingCatalogItemFormView = (state, id) => {
|
|
|
96
60
|
? (0, invoicingQboViewSelector_1.getInvoicingQboView)(state)
|
|
97
61
|
: undefined;
|
|
98
62
|
const { billingPeriodUnitOptions, catalogItemTypeOptions, catalogTierTypeOptionsByPricingModel, catalogTrialEndActionOptions, catalogTrialUnitOptions, } = (0, invoicingConfigViewSelector_1.getInvoicingConfigView)(state);
|
|
63
|
+
// In create mode there is no record to load, so the record view is only
|
|
64
|
+
// consulted when editing an existing item.
|
|
65
|
+
const recordView = id != null ? (0, invoicingCatalogItemRecordViewSelector_1.getInvoicingCatalogItemRecord)(state, 'plan', id) : undefined;
|
|
99
66
|
return {
|
|
67
|
+
catalogItemLifecycleActionOptions: recordView?.catalogItemLifecycleActionOptions ?? [],
|
|
68
|
+
catalogProductLifecycleActionOptions: recordView?.catalogProductLifecycleActionOptions ?? [],
|
|
69
|
+
recordState: {
|
|
70
|
+
error: recordView?.error,
|
|
71
|
+
fetchState: recordView?.fetchState ?? 'Not-Started',
|
|
72
|
+
},
|
|
100
73
|
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'catalog'),
|
|
101
74
|
isQboPickerDataLoading: (0, invoicingQboViewSelector_1.isInvoicingAccountingPickerDataLoading)(state),
|
|
102
75
|
qboAccountHierarchy: qboView?.nestedAccountHierarchy ?? [],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Amount } from '../../../commonStateTypes/amount';
|
|
2
2
|
import { FetchedState, ID } from '../../../commonStateTypes/common';
|
|
3
|
-
import { InvoicingCatalogItemKind } from '../
|
|
4
|
-
/** A single pricing tier within a
|
|
3
|
+
import { InvoicingCatalogItemKind } from '../invoicingCatalogItemRecordView/invoicingCatalogItemRecordViewState';
|
|
4
|
+
/** A single pricing tier within a price point (values kept as raw strings). */
|
|
5
5
|
export interface InvoicingCatalogItemFormTier {
|
|
6
6
|
endingUnit: string;
|
|
7
7
|
packageSize: string;
|
|
@@ -10,9 +10,9 @@ export interface InvoicingCatalogItemFormTier {
|
|
|
10
10
|
/** Unset until entered, so a blank field is distinguishable from a real 0. */
|
|
11
11
|
price?: Amount;
|
|
12
12
|
}
|
|
13
|
-
/** A
|
|
13
|
+
/** A price point (price point) of a catalog item. */
|
|
14
14
|
export interface InvoicingCatalogItemFormSubFamily {
|
|
15
|
-
/** Accounting integration is per
|
|
15
|
+
/** Accounting integration is per price point: the API carries
|
|
16
16
|
* `accounting_detail` on each product, not on the parent item. */
|
|
17
17
|
accountingCategory: string;
|
|
18
18
|
accountingCode: string;
|
|
@@ -55,31 +55,8 @@ export interface InvoicingCatalogItemFormLocalData {
|
|
|
55
55
|
subFamilies: InvoicingCatalogItemFormSubFamily[];
|
|
56
56
|
unit: string;
|
|
57
57
|
}
|
|
58
|
-
/**
|
|
59
|
-
* Draft form state for the detail page's inline edit. Separate from
|
|
60
|
-
* {@link InvoicingCatalogItemFormLocalData}: the inline editor exposes the
|
|
61
|
-
* portal/checkout/gifting fields the create form does not.
|
|
62
|
-
*/
|
|
63
|
-
export interface CatalogDetailEditValues {
|
|
64
|
-
applicableItems: string[];
|
|
65
|
-
description: string;
|
|
66
|
-
enabledForCheckout: boolean;
|
|
67
|
-
enabledInPortal: boolean;
|
|
68
|
-
giftClaimRedirectUrl: string;
|
|
69
|
-
includedInMrr: boolean;
|
|
70
|
-
isGiftable: boolean;
|
|
71
|
-
isShippable: boolean;
|
|
72
|
-
itemApplicability: string;
|
|
73
|
-
metered: boolean;
|
|
74
|
-
name: string;
|
|
75
|
-
productCode: string;
|
|
76
|
-
subFamilies: InvoicingCatalogItemFormSubFamily[];
|
|
77
|
-
unit: string;
|
|
78
|
-
usageCalculation: string;
|
|
79
|
-
}
|
|
80
58
|
export interface EditInvoicingCatalogItemDetailViewState extends FetchedState {
|
|
81
59
|
/** Inline-edit drafts, keyed by catalog item id. */
|
|
82
|
-
detailEditDraftById: Record<ID, CatalogDetailEditValues>;
|
|
83
60
|
editDraftById: Record<ID, InvoicingCatalogItemFormLocalData>;
|
|
84
61
|
newItemDraft: InvoicingCatalogItemFormLocalData;
|
|
85
62
|
savedItemId?: ID;
|
package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogSubFamilyEpics.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { Observable } from 'rxjs';
|
|
|
3
3
|
import { mergeInvoicingPlanSubFamily } from '../../../entity/invoicing/plan/planReducer';
|
|
4
4
|
import { RootState } from '../../../rootStateTypes';
|
|
5
5
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
6
|
-
import { archiveInvoicingCatalogSubFamily,
|
|
7
|
-
export type ActionType = ReturnType<typeof
|
|
8
|
-
export declare const createInvoicingCatalogSubFamilyEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
6
|
+
import { archiveInvoicingCatalogSubFamily, submitInvoicingCatalogItemFormFailure, submitInvoicingCatalogItemFormSuccess } from './editInvoicingCatalogItemDetailViewReducer';
|
|
7
|
+
export type ActionType = ReturnType<typeof archiveInvoicingCatalogSubFamily> | ReturnType<typeof mergeInvoicingPlanSubFamily> | ReturnType<typeof submitInvoicingCatalogItemFormSuccess> | ReturnType<typeof submitInvoicingCatalogItemFormFailure>;
|
|
9
8
|
export declare const archiveInvoicingCatalogSubFamilyEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|