@zeniai/client-epic-state 5.1.80 → 5.1.81
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/viewAndReport/reportIDHelper.d.ts +1 -0
- package/lib/commonStateTypes/viewAndReport/reportIDHelper.js +13 -1
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +3 -0
- package/lib/entity/account/accountState.d.ts +1 -1
- 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/invoicing/invoicingCommonPayload.d.ts +42 -0
- package/lib/entity/invoicing/invoicingCommonPayload.js +66 -1
- 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/sectionProjectView/sectionProjectView.d.ts +1 -1
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +2 -2
- package/lib/entity/tenant/clearAllEpic.d.ts +5 -1
- package/lib/entity/tenant/clearAllEpic.js +8 -0
- package/lib/epic.d.ts +9 -1
- package/lib/epic.js +14 -1
- package/lib/esm/commonStateTypes/viewAndReport/reportIDHelper.js +11 -0
- package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +3 -0
- package/lib/esm/entity/invoicing/invoicingCommonPayload.js +61 -0
- package/lib/esm/entity/tenant/clearAllEpic.js +8 -0
- package/lib/esm/epic.js +14 -1
- package/lib/esm/index.js +18 -3
- package/lib/esm/reducer.js +12 -0
- package/lib/esm/view/dashboard/dashboardSelector.js +14 -10
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +4 -18
- package/lib/esm/view/invoicing/createCreditNote/createCreditNoteFormConfig.js +6 -1
- package/lib/esm/view/invoicing/createCreditNote/createCreditNotePayload.js +1 -8
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.js +4 -5
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.js +10 -11
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormConfig.js +8 -10
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewPayload.js +2 -2
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewReducer.js +1 -1
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.js +1 -1
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewState.js +43 -1
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewPayload.js +2 -5
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/invoicingSubscriptionFormConfig.js +1 -2
- package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +7 -1
- package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +3 -0
- package/lib/esm/view/invoicing/invoicingQboView/epics/fetchInvoicingQboAccountsEpic.js +25 -0
- package/lib/esm/view/invoicing/invoicingQboView/epics/fetchInvoicingQboClassesEpic.js +15 -0
- package/lib/esm/view/invoicing/invoicingQboView/epics/fetchInvoicingQboConnectionEpic.js +15 -0
- package/lib/esm/view/invoicing/invoicingQboView/epics/fetchInvoicingQboSyncHealthEpic.js +15 -0
- package/lib/esm/view/invoicing/invoicingQboView/epics/invoicingQboViewActionType.js +1 -0
- package/lib/esm/view/invoicing/invoicingQboView/epics/retryInvoicingQboSyncTaskEpic.js +26 -0
- package/lib/esm/view/invoicing/invoicingQboView/epics/startInvoicingQboBackfillEpic.js +18 -0
- package/lib/esm/view/invoicing/invoicingQboView/invoicingQboViewPayload.js +47 -0
- package/lib/esm/view/invoicing/invoicingQboView/invoicingQboViewReducer.js +128 -0
- package/lib/esm/view/invoicing/invoicingQboView/invoicingQboViewSelector.js +20 -0
- package/lib/esm/view/invoicing/invoicingQboView/invoicingQboViewState.js +1 -0
- package/lib/esm/view/invoicing/issueCreditNote/issueCreditNotePayload.js +4 -11
- package/lib/esm/view/invoicing/recordPayment/recordPaymentFormConfig.js +0 -1
- package/lib/esm/view/invoicing/recordPayment/recordPaymentPayload.js +5 -14
- package/lib/esm/view/netBurnOrIncomeProjectView/netBurnOrIncomeForTimeframeProjectViewEpic.js +45 -0
- package/lib/esm/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewEpic.js +30 -0
- package/lib/esm/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewPayload.js +1 -0
- package/lib/esm/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewReducer.js +111 -0
- package/lib/esm/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewSelector.js +65 -0
- package/lib/esm/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewSelectorTypes.js +1 -0
- package/lib/esm/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewState.js +1 -0
- package/lib/esm/view/opExProjectView/opExForTimeframeProjectViewEpic.js +43 -0
- package/lib/esm/view/opExProjectView/opExProjectViewEpic.js +30 -0
- package/lib/esm/view/opExProjectView/opExProjectViewPayload.js +1 -0
- package/lib/esm/view/opExProjectView/opExProjectViewReducer.js +111 -0
- package/lib/esm/view/opExProjectView/opExProjectViewSelector.js +52 -0
- package/lib/esm/view/opExProjectView/opExProjectViewSelectorTypes.js +1 -0
- package/lib/esm/view/opExProjectView/opExProjectViewState.js +1 -0
- package/lib/esm/view/reportsResync/reportsClassViewRefetchingEpic.js +0 -4
- package/lib/esm/view/reportsResync/reportsProjectViewRefetchingEpic.js +30 -0
- package/lib/esm/view/reportsResync/reportsResyncEpic.js +11 -3
- package/lib/esm/view/reportsResync/reportsResyncReducer.js +9 -1
- package/lib/esm/view/revenueProjectView/revenueForTimeframeProjectViewEpic.js +35 -0
- package/lib/esm/view/revenueProjectView/revenueProjectViewEpic.js +30 -0
- package/lib/esm/view/revenueProjectView/revenueProjectViewPayload.js +1 -0
- package/lib/esm/view/revenueProjectView/revenueProjectViewReducer.js +111 -0
- package/lib/esm/view/revenueProjectView/revenueProjectViewSelector.js +58 -0
- package/lib/esm/view/revenueProjectView/revenueProjectViewSelectorTypes.js +1 -0
- package/lib/esm/view/revenueProjectView/revenueProjectViewState.js +1 -0
- package/lib/index.d.ts +26 -3
- package/lib/index.js +106 -50
- package/lib/reducer.d.ts +12 -0
- package/lib/reducer.js +12 -0
- 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/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/dashboard/dashboardSelector.d.ts +2 -3
- package/lib/view/dashboard/dashboardSelector.js +13 -9
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +3 -17
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/invoicing/createCreditNote/createCreditNoteFormConfig.js +6 -1
- package/lib/view/invoicing/createCreditNote/createCreditNotePayload.js +1 -8
- package/lib/view/invoicing/createCreditNote/createCreditNoteState.d.ts +3 -1
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.d.ts +2 -1
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.js +4 -5
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.js +10 -11
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewState.d.ts +10 -5
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormConfig.js +8 -10
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewPayload.js +2 -2
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewReducer.js +3 -3
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.js +2 -2
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewState.d.ts +9 -2
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewState.js +45 -0
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewPayload.js +2 -5
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewState.d.ts +3 -1
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/invoicingSubscriptionFormConfig.js +1 -2
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewPayload.d.ts +4 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +6 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.d.ts +4 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +3 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewState.d.ts +4 -1
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboAccountsEpic.d.ts +6 -0
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboAccountsEpic.js +29 -0
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboClassesEpic.d.ts +6 -0
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboClassesEpic.js +19 -0
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboConnectionEpic.d.ts +6 -0
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboConnectionEpic.js +19 -0
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboSyncHealthEpic.d.ts +6 -0
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboSyncHealthEpic.js +19 -0
- package/lib/view/invoicing/invoicingQboView/epics/invoicingQboViewActionType.d.ts +2 -0
- package/lib/view/invoicing/invoicingQboView/epics/invoicingQboViewActionType.js +2 -0
- package/lib/view/invoicing/invoicingQboView/epics/retryInvoicingQboSyncTaskEpic.d.ts +6 -0
- package/lib/view/invoicing/invoicingQboView/epics/retryInvoicingQboSyncTaskEpic.js +30 -0
- package/lib/view/invoicing/invoicingQboView/epics/startInvoicingQboBackfillEpic.d.ts +6 -0
- package/lib/view/invoicing/invoicingQboView/epics/startInvoicingQboBackfillEpic.js +22 -0
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewPayload.d.ts +79 -0
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewPayload.js +52 -0
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewReducer.d.ts +25 -0
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewReducer.js +132 -0
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewSelector.d.ts +21 -0
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewSelector.js +24 -0
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewState.d.ts +14 -0
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewState.js +2 -0
- package/lib/view/invoicing/issueCreditNote/issueCreditNotePayload.js +4 -11
- package/lib/view/invoicing/issueCreditNote/issueCreditNoteState.d.ts +3 -2
- package/lib/view/invoicing/recordPayment/recordPaymentFormConfig.js +0 -1
- package/lib/view/invoicing/recordPayment/recordPaymentPayload.js +5 -14
- package/lib/view/invoicing/recordPayment/recordPaymentState.d.ts +4 -2
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeForTimeframeProjectViewEpic.d.ts +9 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeForTimeframeProjectViewEpic.js +49 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewEpic.d.ts +6 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewEpic.js +34 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewPayload.d.ts +11 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewPayload.js +2 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewReducer.d.ts +33 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewReducer.js +115 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewSelector.d.ts +13 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewSelector.js +69 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewSelectorTypes.d.ts +21 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewSelectorTypes.js +2 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewState.d.ts +20 -0
- package/lib/view/netBurnOrIncomeProjectView/netBurnOrIncomeProjectViewState.js +2 -0
- package/lib/view/opExProjectView/opExForTimeframeProjectViewEpic.d.ts +9 -0
- package/lib/view/opExProjectView/opExForTimeframeProjectViewEpic.js +47 -0
- package/lib/view/opExProjectView/opExProjectViewEpic.d.ts +6 -0
- package/lib/view/opExProjectView/opExProjectViewEpic.js +34 -0
- package/lib/view/opExProjectView/opExProjectViewPayload.d.ts +6 -0
- package/lib/view/opExProjectView/opExProjectViewPayload.js +2 -0
- package/lib/view/opExProjectView/opExProjectViewReducer.d.ts +33 -0
- package/lib/view/opExProjectView/opExProjectViewReducer.js +115 -0
- package/lib/view/opExProjectView/opExProjectViewSelector.d.ts +12 -0
- package/lib/view/opExProjectView/opExProjectViewSelector.js +56 -0
- package/lib/view/opExProjectView/opExProjectViewSelectorTypes.d.ts +19 -0
- package/lib/view/opExProjectView/opExProjectViewSelectorTypes.js +2 -0
- package/lib/view/opExProjectView/opExProjectViewState.d.ts +20 -0
- package/lib/view/opExProjectView/opExProjectViewState.js +2 -0
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reportsResync/reportsClassViewRefetchingEpic.d.ts +1 -2
- package/lib/view/reportsResync/reportsClassViewRefetchingEpic.js +0 -4
- package/lib/view/reportsResync/reportsProjectViewRefetchingEpic.d.ts +10 -0
- package/lib/view/reportsResync/reportsProjectViewRefetchingEpic.js +34 -0
- package/lib/view/reportsResync/reportsResyncEpic.d.ts +2 -2
- package/lib/view/reportsResync/reportsResyncEpic.js +10 -2
- package/lib/view/reportsResync/reportsResyncReducer.d.ts +5 -3
- package/lib/view/reportsResync/reportsResyncReducer.js +10 -2
- package/lib/view/revenueProjectView/revenueForTimeframeProjectViewEpic.d.ts +9 -0
- package/lib/view/revenueProjectView/revenueForTimeframeProjectViewEpic.js +39 -0
- package/lib/view/revenueProjectView/revenueProjectViewEpic.d.ts +6 -0
- package/lib/view/revenueProjectView/revenueProjectViewEpic.js +34 -0
- package/lib/view/revenueProjectView/revenueProjectViewPayload.d.ts +9 -0
- package/lib/view/revenueProjectView/revenueProjectViewPayload.js +2 -0
- package/lib/view/revenueProjectView/revenueProjectViewReducer.d.ts +33 -0
- package/lib/view/revenueProjectView/revenueProjectViewReducer.js +115 -0
- package/lib/view/revenueProjectView/revenueProjectViewSelector.d.ts +12 -0
- package/lib/view/revenueProjectView/revenueProjectViewSelector.js +62 -0
- package/lib/view/revenueProjectView/revenueProjectViewSelectorTypes.d.ts +19 -0
- package/lib/view/revenueProjectView/revenueProjectViewSelectorTypes.js +2 -0
- package/lib/view/revenueProjectView/revenueProjectViewState.d.ts +20 -0
- package/lib/view/revenueProjectView/revenueProjectViewState.js +2 -0
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/package.json +1 -1
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/invoicingCouponFormConfig.js +0 -44
- package/lib/view/invoicing/editInvoicingCouponDetailView/invoicingCouponFormConfig.d.ts +0 -5
- package/lib/view/invoicing/editInvoicingCouponDetailView/invoicingCouponFormConfig.js +0 -48
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRevenueProjectViewForHighlightedRange = exports.getRevenueProjectViewForSelectedRange = exports.getRevenueProjectView = exports.revenueProjectIdsInOrder = void 0;
|
|
4
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
|
+
const getDifferenceOfBalancesGroupedByPeriod_1 = require("../../commonStateTypes/coaBalance/classBalances/getDifferenceOfBalancesGroupedByPeriod");
|
|
6
|
+
const coaBalance_1 = require("../../commonStateTypes/coaBalance/coaBalance");
|
|
7
|
+
const coaBalancesFilterProjectView_1 = require("../../commonStateTypes/coaBalance/coaBalancesFilterProjectView");
|
|
8
|
+
const reduceFetchState_1 = require("../../commonStateTypes/reduceFetchState");
|
|
9
|
+
const projectSelector_1 = require("../../entity/project/projectSelector");
|
|
10
|
+
const sectionProjectViewSelector_1 = require("../../entity/sectionProjectView/sectionProjectViewSelector");
|
|
11
|
+
const revenueClassesViewSelectorTypes_1 = require("../revenueClassesView/revenueClassesViewSelectorTypes");
|
|
12
|
+
exports.revenueProjectIdsInOrder = ['income', 'cogs', 'grossMargin'];
|
|
13
|
+
const getRevenueProjectView = (filter, accountState, projectState, sectionsState, revenueProjectViewState) => {
|
|
14
|
+
const fetchState = (0, reduceFetchState_1.reduceFetchStateParallelTimeframes)([
|
|
15
|
+
revenueProjectViewState.fetchState.month,
|
|
16
|
+
revenueProjectViewState.fetchState.quarter,
|
|
17
|
+
revenueProjectViewState.fetchState.year,
|
|
18
|
+
]);
|
|
19
|
+
const reportId = 'revenue_by_projects';
|
|
20
|
+
const sections = {};
|
|
21
|
+
const calculatedSections = {};
|
|
22
|
+
if (fetchState.fetchState === 'Completed') {
|
|
23
|
+
revenueClassesViewSelectorTypes_1.ALL_REVENUE_CLASSES_VIEW_SECTION_IDS.forEach((sectionId) => {
|
|
24
|
+
sections[`${sectionId}`] = (0, sectionProjectViewSelector_1.getSectionProjectViewReport)(accountState, projectState, sectionsState, revenueProjectViewState.projectIds, {
|
|
25
|
+
reportId,
|
|
26
|
+
sectionId,
|
|
27
|
+
}, filter);
|
|
28
|
+
});
|
|
29
|
+
const grossProfitBalancesByPeriod = (0, getDifferenceOfBalancesGroupedByPeriod_1.getDifferenceOfBalancesGroupedByPeriod)(sections['income'].sectionBalancesTotalByPeriod, sections['cogs'].sectionBalancesTotalByPeriod);
|
|
30
|
+
calculatedSections['grossMargin'] = (0, coaBalance_1.getCOABalances)(grossProfitBalancesByPeriod, filter);
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
sections,
|
|
34
|
+
calculatedSections,
|
|
35
|
+
reportId: revenueProjectViewState.reportId,
|
|
36
|
+
reportTitle: revenueProjectViewState.reportTitle,
|
|
37
|
+
firstMonthOfFY: revenueProjectViewState.firstMonthOfFY,
|
|
38
|
+
dataAvailable: revenueProjectViewState.dataAvailable,
|
|
39
|
+
bookCloseDate: revenueProjectViewState.bookCloseDate,
|
|
40
|
+
version: revenueProjectViewState.version,
|
|
41
|
+
status: revenueProjectViewState.status,
|
|
42
|
+
fetchState: fetchState.fetchState,
|
|
43
|
+
error: fetchState.error,
|
|
44
|
+
filter,
|
|
45
|
+
uiState: revenueProjectViewState.uiState,
|
|
46
|
+
projects: (0, projectSelector_1.getProjectsByIds)(projectState, revenueProjectViewState.projectIds),
|
|
47
|
+
projectsToFilterOut: revenueProjectViewState.uiState.projectsToFilterOut,
|
|
48
|
+
idsInOrder: exports.revenueProjectIdsInOrder,
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
exports.getRevenueProjectView = getRevenueProjectView;
|
|
52
|
+
exports.getRevenueProjectViewForSelectedRange = (0, toolkit_1.createSelector)((state) => state.accountState, (state) => state.projectState, (state) => state.sectionProjectViewState, (state) => state.revenueState, (state) => state.revenueProjectViewState, (accountState, projectState, sectionsState, revenueState, revenueProjectViewState) => {
|
|
53
|
+
const { timeframe, selectedCOABalancesRange, selectedAdditionalBalances } = revenueState.uiState;
|
|
54
|
+
const noFilter = (0, coaBalancesFilterProjectView_1.newBalancesFilterProjectView)(revenueState.revenue.firstMonthOfFY, timeframe, selectedCOABalancesRange.numberOfPeriods, selectedCOABalancesRange.thisPeriod, 'ascending_date', selectedAdditionalBalances, revenueProjectViewState.uiState.projectsToFilterOut);
|
|
55
|
+
return (0, exports.getRevenueProjectView)(noFilter, accountState, projectState, sectionsState, revenueProjectViewState);
|
|
56
|
+
});
|
|
57
|
+
exports.getRevenueProjectViewForHighlightedRange = (0, toolkit_1.createSelector)((state) => state.accountState, (state) => state.projectState, (state) => state.sectionProjectViewState, (state) => state.revenueState, (state) => state.revenueProjectViewState, (accountState, projectState, sectionsState, revenueState, revenueProjectViewState) => {
|
|
58
|
+
const { timeframe, highlightedCOABalancesRange, selectedAdditionalBalances, maxNumOfPeriodsToHighlight, } = revenueState.uiState;
|
|
59
|
+
const filter = (0, coaBalancesFilterProjectView_1.newBalancesFilterProjectView)(revenueState.revenue.firstMonthOfFY, timeframe, highlightedCOABalancesRange?.numberOfPeriods ??
|
|
60
|
+
maxNumOfPeriodsToHighlight, highlightedCOABalancesRange?.thisPeriod, 'ascending_date', selectedAdditionalBalances, revenueProjectViewState.uiState.projectsToFilterOut);
|
|
61
|
+
return (0, exports.getRevenueProjectView)(filter, accountState, projectState, sectionsState, revenueProjectViewState);
|
|
62
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { COABalancesFilterProjectView } from '../../commonStateTypes/coaBalance/coaBalancesFilterProjectView';
|
|
2
|
+
import { ID } from '../../commonStateTypes/common';
|
|
3
|
+
import { DataAvailable } from '../../commonStateTypes/dataAvailable';
|
|
4
|
+
import { CalculatedSection } from '../../commonStateTypes/selectorTypes/selectorTypes';
|
|
5
|
+
import { SelectorReport } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
6
|
+
import { Project } from '../../entity/project/projectState';
|
|
7
|
+
import { SectionProjectViewReport } from '../../entity/sectionProjectView/sectionProjectViewSelectorTypes';
|
|
8
|
+
import { RevenueClassesViewCalculatedSectionID, RevenueClassesViewSectionID } from '../revenueClassesView/revenueClassesViewSelectorTypes';
|
|
9
|
+
import { RevenueProjectViewUIState } from './revenueProjectViewState';
|
|
10
|
+
export interface RevenueProjectViewReport extends SelectorReport {
|
|
11
|
+
calculatedSections: Record<RevenueClassesViewCalculatedSectionID, CalculatedSection>;
|
|
12
|
+
filter: COABalancesFilterProjectView;
|
|
13
|
+
idsInOrder: (RevenueClassesViewSectionID | RevenueClassesViewCalculatedSectionID)[];
|
|
14
|
+
projects: Project[];
|
|
15
|
+
projectsToFilterOut: ID[];
|
|
16
|
+
sections: Record<RevenueClassesViewSectionID, SectionProjectViewReport>;
|
|
17
|
+
uiState: RevenueProjectViewUIState;
|
|
18
|
+
dataAvailable?: DataAvailable;
|
|
19
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AccountViewMode, FetchStateAndError, ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { Report } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
+
export interface RevenueProjectViewUIState {
|
|
4
|
+
accountViewMode: AccountViewMode;
|
|
5
|
+
nodeCollapseState: Record<ID, boolean>;
|
|
6
|
+
projectsToFilterOut: ID[];
|
|
7
|
+
scrollPosition: {
|
|
8
|
+
scrollTop: number;
|
|
9
|
+
scrollLeft?: number;
|
|
10
|
+
} | undefined;
|
|
11
|
+
}
|
|
12
|
+
export interface RevenueProjectViewState extends Report {
|
|
13
|
+
fetchState: {
|
|
14
|
+
month: FetchStateAndError;
|
|
15
|
+
quarter: FetchStateAndError;
|
|
16
|
+
year: FetchStateAndError;
|
|
17
|
+
};
|
|
18
|
+
projectIds: ID[];
|
|
19
|
+
uiState: RevenueProjectViewUIState;
|
|
20
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getTasksCardReport: (state: RootState) => {
|
|
3
|
-
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "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" | "profit_and_loss_by_projects" | "balance_sheet" | "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" | "vendor" | "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";
|
|
3
|
+
reportId: "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" | "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" | "vendor" | "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";
|
|
4
4
|
reportTitle: string;
|
|
5
5
|
version: string | number | undefined;
|
|
6
6
|
status: import("../..").Status | undefined;
|
|
@@ -4,7 +4,7 @@ import { RootState } from '../../reducer';
|
|
|
4
4
|
import { TopExReport, TopExTimePeriodWithMetaData } from './topExSelectorTypes';
|
|
5
5
|
import { TopExState } from './topExState';
|
|
6
6
|
export declare const getTopExpenses: (accountState: AccountState, topExState: TopExState, numberOfExpenses?: number) => {
|
|
7
|
-
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "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" | "profit_and_loss_by_projects" | "balance_sheet" | "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" | "vendor" | "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";
|
|
7
|
+
reportId: "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" | "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" | "vendor" | "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";
|
|
8
8
|
reportTitle: string;
|
|
9
9
|
version: string | number | undefined;
|
|
10
10
|
status: import("../..").Status | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.81",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
export const initialInvoicingCouponFormLocalData = {
|
|
2
|
-
applyOn: 'invoice_amount',
|
|
3
|
-
couponCode: '',
|
|
4
|
-
couponId: '',
|
|
5
|
-
discountAmount: '',
|
|
6
|
-
discountPercentage: '',
|
|
7
|
-
discountQuantity: '',
|
|
8
|
-
discountType: 'percentage',
|
|
9
|
-
durationType: 'one_time',
|
|
10
|
-
invoiceName: '',
|
|
11
|
-
invoiceNotes: '',
|
|
12
|
-
maxRedemptions: '',
|
|
13
|
-
name: '',
|
|
14
|
-
period: '',
|
|
15
|
-
periodUnit: 'month',
|
|
16
|
-
validFrom: '',
|
|
17
|
-
validTill: '',
|
|
18
|
-
};
|
|
19
|
-
/** Seed the form draft from an existing coupon entity (edit mode). */
|
|
20
|
-
export const entityToInvoicingCouponFormLocalData = (coupon) => {
|
|
21
|
-
if (coupon == null) {
|
|
22
|
-
return { ...initialInvoicingCouponFormLocalData };
|
|
23
|
-
}
|
|
24
|
-
return {
|
|
25
|
-
applyOn: coupon.applyOn ?? 'invoice_amount',
|
|
26
|
-
couponCode: coupon.couponCode ?? '',
|
|
27
|
-
couponId: coupon.id ?? '',
|
|
28
|
-
discountAmount: coupon.discountAmount != null ? String(coupon.discountAmount.amount) : '',
|
|
29
|
-
discountPercentage: coupon.discountPercentage != null
|
|
30
|
-
? String(coupon.discountPercentage)
|
|
31
|
-
: '',
|
|
32
|
-
discountQuantity: coupon.discountQuantity != null ? String(coupon.discountQuantity) : '',
|
|
33
|
-
discountType: coupon.discountType ?? 'percentage',
|
|
34
|
-
durationType: coupon.durationType ?? 'one_time',
|
|
35
|
-
invoiceName: coupon.invoiceName ?? '',
|
|
36
|
-
invoiceNotes: coupon.invoiceNotes ?? '',
|
|
37
|
-
maxRedemptions: coupon.maxRedemptions != null ? String(coupon.maxRedemptions) : '',
|
|
38
|
-
name: coupon.name ?? '',
|
|
39
|
-
period: coupon.period != null ? String(coupon.period) : '',
|
|
40
|
-
periodUnit: coupon.periodUnit ?? 'month',
|
|
41
|
-
validFrom: coupon.validFrom != null ? coupon.validFrom.format('YYYY-MM-DD') : '',
|
|
42
|
-
validTill: coupon.validTill != null ? coupon.validTill.format('YYYY-MM-DD') : '',
|
|
43
|
-
};
|
|
44
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { InvoicingCoupon } from '../../../entity/invoicing/coupon/couponState';
|
|
2
|
-
import { InvoicingCouponFormLocalData } from './editInvoicingCouponDetailViewState';
|
|
3
|
-
export declare const initialInvoicingCouponFormLocalData: InvoicingCouponFormLocalData;
|
|
4
|
-
/** Seed the form draft from an existing coupon entity (edit mode). */
|
|
5
|
-
export declare const entityToInvoicingCouponFormLocalData: (coupon?: InvoicingCoupon) => InvoicingCouponFormLocalData;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.entityToInvoicingCouponFormLocalData = exports.initialInvoicingCouponFormLocalData = void 0;
|
|
4
|
-
exports.initialInvoicingCouponFormLocalData = {
|
|
5
|
-
applyOn: 'invoice_amount',
|
|
6
|
-
couponCode: '',
|
|
7
|
-
couponId: '',
|
|
8
|
-
discountAmount: '',
|
|
9
|
-
discountPercentage: '',
|
|
10
|
-
discountQuantity: '',
|
|
11
|
-
discountType: 'percentage',
|
|
12
|
-
durationType: 'one_time',
|
|
13
|
-
invoiceName: '',
|
|
14
|
-
invoiceNotes: '',
|
|
15
|
-
maxRedemptions: '',
|
|
16
|
-
name: '',
|
|
17
|
-
period: '',
|
|
18
|
-
periodUnit: 'month',
|
|
19
|
-
validFrom: '',
|
|
20
|
-
validTill: '',
|
|
21
|
-
};
|
|
22
|
-
/** Seed the form draft from an existing coupon entity (edit mode). */
|
|
23
|
-
const entityToInvoicingCouponFormLocalData = (coupon) => {
|
|
24
|
-
if (coupon == null) {
|
|
25
|
-
return { ...exports.initialInvoicingCouponFormLocalData };
|
|
26
|
-
}
|
|
27
|
-
return {
|
|
28
|
-
applyOn: coupon.applyOn ?? 'invoice_amount',
|
|
29
|
-
couponCode: coupon.couponCode ?? '',
|
|
30
|
-
couponId: coupon.id ?? '',
|
|
31
|
-
discountAmount: coupon.discountAmount != null ? String(coupon.discountAmount.amount) : '',
|
|
32
|
-
discountPercentage: coupon.discountPercentage != null
|
|
33
|
-
? String(coupon.discountPercentage)
|
|
34
|
-
: '',
|
|
35
|
-
discountQuantity: coupon.discountQuantity != null ? String(coupon.discountQuantity) : '',
|
|
36
|
-
discountType: coupon.discountType ?? 'percentage',
|
|
37
|
-
durationType: coupon.durationType ?? 'one_time',
|
|
38
|
-
invoiceName: coupon.invoiceName ?? '',
|
|
39
|
-
invoiceNotes: coupon.invoiceNotes ?? '',
|
|
40
|
-
maxRedemptions: coupon.maxRedemptions != null ? String(coupon.maxRedemptions) : '',
|
|
41
|
-
name: coupon.name ?? '',
|
|
42
|
-
period: coupon.period != null ? String(coupon.period) : '',
|
|
43
|
-
periodUnit: coupon.periodUnit ?? 'month',
|
|
44
|
-
validFrom: coupon.validFrom != null ? coupon.validFrom.format('YYYY-MM-DD') : '',
|
|
45
|
-
validTill: coupon.validTill != null ? coupon.validTill.format('YYYY-MM-DD') : '',
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
exports.entityToInvoicingCouponFormLocalData = entityToInvoicingCouponFormLocalData;
|