@zeniai/client-epic-state 4.10.6 → 4.10.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonPayloadTypes/agingReportPayloadTypes.d.ts +1 -0
- package/lib/commonPayloadTypes/commonPayload.d.ts +8 -0
- package/lib/commonPayloadTypes/commonPayload.js +20 -0
- package/lib/commonPayloadTypes/subAccountView/subAccountPayloadHelper.js +2 -2
- package/lib/commonStateTypes/accountView/{getNestedAccountIDHeirarchyForReport.d.ts → getNestedAccountIDHierarchyForReport.d.ts} +2 -2
- package/lib/commonStateTypes/accountView/nestedAccountID.d.ts +2 -2
- package/lib/commonStateTypes/agingBalance/agingBalance.d.ts +4 -0
- package/lib/commonStateTypes/agingBalance/agingBalance.js +4 -1
- package/lib/commonStateTypes/classesView/getNestedClassIDHierarchyForReport.d.ts +2 -2
- package/lib/commonStateTypes/classesView/nestedClassID.d.ts +2 -2
- package/lib/commonStateTypes/customerView/getNestedCustomerHierarchy.d.ts +9 -0
- package/lib/commonStateTypes/customerView/getNestedCustomerHierarchy.js +46 -0
- package/lib/commonStateTypes/customerView/nestedCustomerID.d.ts +42 -0
- package/lib/commonStateTypes/customerView/nestedCustomerID.js +9 -0
- package/lib/commonStateTypes/selectorTypes/classesViewSelectorReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/agingReportStateTypes.d.ts +4 -7
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/account/subAccountSelector.d.ts +1 -1
- package/lib/entity/account/subAccountSelector.js +7 -7
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupV2Selector.js +3 -3
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classSelectorV2.d.ts +1 -1
- package/lib/entity/class/classSelectorV2.js +10 -10
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/customer/customerPayload.d.ts +1 -1
- package/lib/entity/customer/customerPayload.js +1 -1
- package/lib/entity/customer/customerReducer.d.ts +1 -1
- package/lib/entity/customer/customerSelector.d.ts +1 -1
- package/lib/entity/customerIncome/customerIncomeTrend.d.ts +1 -1
- package/lib/entity/customerIncome/customerIncomeTrendReducer.d.ts +1 -1
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/notification/notificationPayload.d.ts +46 -0
- package/lib/entity/notification/notificationPayload.js +144 -0
- package/lib/entity/notification/notificationReducer.d.ts +20 -0
- package/lib/entity/notification/notificationReducer.js +118 -0
- package/lib/entity/notification/notificationSelector.d.ts +9 -0
- package/lib/entity/notification/notificationSelector.js +36 -0
- package/lib/entity/notification/notificationState.d.ts +7 -0
- package/lib/entity/notification/notificationState.js +2 -0
- package/lib/entity/notification/types/notificationSelectorTypes.d.ts +8 -0
- package/lib/entity/notification/types/notificationSelectorTypes.js +2 -0
- package/lib/entity/notification/types/notificationStateTypes.d.ts +50 -0
- package/lib/entity/notification/types/notificationStateTypes.js +2 -0
- package/lib/entity/notification/types/notificationTypes.d.ts +24 -0
- package/lib/entity/notification/types/notificationTypes.js +58 -0
- package/lib/entity/sectionAccountsView/getNestedAccountIDHierarchyForSection.js +9 -9
- package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
- package/lib/entity/sectionAccountsView/sectionAccountsViewEpic.js +2 -2
- package/lib/entity/sectionAccountsView/sectionAccountsViewSelector.js +3 -3
- package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewEpic.js +2 -2
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
- package/lib/entity/sectionClassesViewV2/sectionClassesViewSelector.js +7 -7
- package/lib/entity/sectionClassesViewV2/selectorHelpers/getNestedClassIDHierarchyForSection.js +7 -7
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +1 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +4 -2
- package/lib/entity/tenant/clearAllEpic.js +5 -1
- package/lib/entity/transaction/stateTypes/customerTransaction.d.ts +1 -1
- package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
- package/lib/epic.d.ts +7 -3
- package/lib/epic.js +5 -1
- package/lib/index.d.ts +24 -14
- package/lib/index.js +35 -13
- package/lib/reducer.d.ts +7 -1
- package/lib/reducer.js +6 -0
- package/lib/view/accountList/accountListReducer.js +2 -2
- package/lib/view/accountList/accountListSelector.d.ts +3 -3
- package/lib/view/accountList/accountListSelector.js +3 -3
- package/lib/view/accountList/accountListState.d.ts +2 -2
- package/lib/view/accountMappingView/accountMappingReducer.js +19 -19
- package/lib/view/accountMappingView/accountMappingState.d.ts +8 -8
- package/lib/view/accountMappingView/accountMappingViewSelector.d.ts +8 -8
- package/lib/view/accountMappingView/accountMappingViewSelector.js +7 -7
- package/lib/view/apAgingView/apAgingReport/apAgingReducer.d.ts +7 -5
- package/lib/view/apAgingView/apAgingReport/apAgingReducer.js +34 -15
- package/lib/view/apAgingView/apAgingReport/apAgingSelector.d.ts +1 -1
- package/lib/view/apAgingView/apAgingReport/apAgingSelector.js +29 -16
- package/lib/view/apAgingView/apAgingReport/apAgingState.d.ts +6 -3
- package/lib/view/apAgingView/apAgingReport/fetchApAgingEpic.js +11 -7
- package/lib/view/arAgingView/arAgingDetail/arAgingDetailSelector.d.ts +1 -1
- package/lib/view/arAgingView/arAgingReport/arAgingPayload.js +8 -1
- package/lib/view/arAgingView/arAgingReport/arAgingReducer.d.ts +13 -7
- package/lib/view/arAgingView/arAgingReport/arAgingReducer.js +49 -15
- package/lib/view/arAgingView/arAgingReport/arAgingSelector.d.ts +12 -6
- package/lib/view/arAgingView/arAgingReport/arAgingSelector.js +68 -35
- package/lib/view/arAgingView/arAgingReport/arAgingState.d.ts +12 -4
- package/lib/view/arAgingView/arAgingReport/fetchArAgingEpic.js +10 -7
- package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
- package/lib/view/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/classList/classListSelector.d.ts +3 -3
- package/lib/view/classList/classListSelector.js +3 -3
- package/lib/view/classList/classListState.d.ts +2 -2
- package/lib/view/commonVendorView/transactionVendorView/transactionVendorViewSelector.d.ts +4 -4
- package/lib/view/commonVendorView/transactionVendorView/transactionVendorViewSelector.js +4 -4
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +4 -4
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +4 -4
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +4 -4
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +4 -4
- package/lib/view/dashboard/dashboardEpic.js +6 -4
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/netBurnOrIncomeClassesView/netBurnOrIncomeClassesViewReducer.js +3 -3
- package/lib/view/netBurnOrIncomeClassesView/netBurnOrIncomeClassesViewSelector.js +3 -3
- package/lib/view/netBurnOrIncomeClassesView/netBurnOrIncomeClassesViewState.d.ts +2 -2
- package/lib/view/notificationView/epics/fetchNotificationUnreadCountEpic.d.ts +10 -0
- package/lib/view/notificationView/epics/fetchNotificationUnreadCountEpic.js +39 -0
- package/lib/view/notificationView/epics/fetchNotificationViewEpic.d.ts +9 -0
- package/lib/view/notificationView/epics/fetchNotificationViewEpic.js +56 -0
- package/lib/view/notificationView/epics/updateNotificationViewAllNotificationsStatusEpic.d.ts +9 -0
- package/lib/view/notificationView/epics/updateNotificationViewAllNotificationsStatusEpic.js +50 -0
- package/lib/view/notificationView/epics/updateNotificationViewNotificationStatusEpic.d.ts +9 -0
- package/lib/view/notificationView/epics/updateNotificationViewNotificationStatusEpic.js +86 -0
- package/lib/view/notificationView/notificationView.helpers.d.ts +2 -0
- package/lib/view/notificationView/notificationView.helpers.js +11 -0
- package/lib/view/notificationView/notificationViewPayload.d.ts +48 -0
- package/lib/view/notificationView/notificationViewPayload.js +2 -0
- package/lib/view/notificationView/notificationViewReducer.d.ts +64 -0
- package/lib/view/notificationView/notificationViewReducer.js +372 -0
- package/lib/view/notificationView/notificationViewSelector.d.ts +29 -0
- package/lib/view/notificationView/notificationViewSelector.js +89 -0
- package/lib/view/notificationView/notificationViewState.d.ts +31 -0
- package/lib/view/notificationView/notificationViewState.js +19 -0
- package/lib/view/opExClassesView/opExClassesViewReducer.js +3 -3
- package/lib/view/opExClassesView/opExClassesViewSelector.js +3 -3
- package/lib/view/opExClassesView/opExClassesViewState.d.ts +2 -2
- package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
- package/lib/view/people/deletePersonEpic.d.ts +1 -1
- package/lib/view/people/invitePeopleEpic.d.ts +1 -1
- package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
- package/lib/view/people/resendInviteEpic.d.ts +1 -1
- package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +3 -3
- package/lib/view/profitAndLossClassesView/profitAndLossClassesViewSelector.js +2 -2
- package/lib/view/profitAndLossClassesView/profitAndLossClassesViewState.d.ts +2 -2
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/revenueClassesView/revenueClassesViewReducer.js +3 -3
- package/lib/view/revenueClassesView/revenueClassesViewSelector.js +3 -3
- package/lib/view/revenueClassesView/revenueClassesViewState.d.ts +2 -2
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.d.ts +5 -5
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.js +5 -5
- package/lib/view/scheduleView/scheduleListView/scheduleListHelper.d.ts +2 -2
- package/lib/view/scheduleView/scheduleListView/scheduleListSelector.d.ts +2 -2
- package/lib/view/scheduleView/scheduleListView/scheduleListSelector.js +1 -1
- package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +4 -4
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +4 -4
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.d.ts +4 -4
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +4 -4
- package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.d.ts +2 -1
- package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.js +37 -5
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/view/transactionDetail/transactionDetailSelector.d.ts +4 -4
- package/lib/view/transactionDetail/transactionDetailSelector.js +4 -4
- package/lib/view/transactionDetail/transactionDetailState.d.ts +1 -1
- package/lib/view/transactionDetail/transactionDetailTypes.d.ts +1 -1
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.d.ts +1 -1
- package/lib/zeniAPI.d.ts +2 -0
- package/lib/zeniAPI.js +8 -0
- package/package.json +2 -1
- package/lib/commonStateTypes/accountView/{getNestedAccountIDHeirarchyForReport.js → getNestedAccountIDHierarchyForReport.js} +0 -0
- package/lib/entity/customer/{customer.d.ts → customerState.d.ts} +4 -4
- /package/lib/entity/customer/{customer.js → customerState.js} +0 -0
|
@@ -5,36 +5,44 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getArAgingReport = void 0;
|
|
7
7
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
8
|
-
const keys_1 = __importDefault(require("lodash/keys"));
|
|
9
8
|
const orderBy_1 = __importDefault(require("lodash/orderBy"));
|
|
10
|
-
const
|
|
9
|
+
const customerState_1 = require("../../../entity/customer/customerState");
|
|
10
|
+
const agingBalance_1 = require("../../../commonStateTypes/agingBalance/agingBalance");
|
|
11
11
|
const customerSelector_1 = require("../../../entity/customer/customerSelector");
|
|
12
12
|
exports.getArAgingReport = (0, toolkit_1.createSelector)((state) => state.arAgingState, (state) => state.customerState, (arAgingState, customerState) => {
|
|
13
|
-
const { reportId, reportTitle, fetchState, uiState, firstMonthOfFY,
|
|
14
|
-
const { searchString, sortOrder, sortKey } = uiState;
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
13
|
+
const { reportId, reportTitle, fetchState, uiState, firstMonthOfFY, agingPeriods, } = arAgingState;
|
|
14
|
+
const { searchString, sortOrder, sortKey, selectedDate } = uiState;
|
|
15
|
+
const balancesKey = (0, agingBalance_1.getAgingBalancesKey)(selectedDate);
|
|
16
|
+
const arAgingBalancesByDate = arAgingState.arAgingBalancesByDate[balancesKey];
|
|
17
|
+
const arAgingBalancesByCustomerId = arAgingBalancesByDate != null
|
|
18
|
+
? arAgingBalancesByDate.arAgingBalancesByCustomerId
|
|
19
|
+
: {};
|
|
20
|
+
const arAgingTotals = arAgingBalancesByDate != null
|
|
21
|
+
? arAgingBalancesByDate.arAgingTotals
|
|
22
|
+
: [];
|
|
23
|
+
const nestedHierarchy = arAgingBalancesByDate != null
|
|
24
|
+
? arAgingBalancesByDate.nestedCustomerHierarchy
|
|
25
|
+
: [];
|
|
26
|
+
const agingBalances = getNestedAgingBalancesByCustomer(customerState, arAgingBalancesByCustomerId, nestedHierarchy, searchString, sortKey, sortOrder);
|
|
27
|
+
return {
|
|
28
|
+
agingBalances,
|
|
29
|
+
reportId,
|
|
30
|
+
reportTitle,
|
|
31
|
+
fetchState,
|
|
32
|
+
firstMonthOfFY,
|
|
33
|
+
agingPeriods,
|
|
34
|
+
arAgingUIState: uiState,
|
|
35
|
+
totalBalances: arAgingTotals,
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
const getNestedAgingBalancesByCustomer = (customerState, agingBalancesByCustomerId, nestedCustomerHierarchy, searchString, sortKey, sortOrder) => {
|
|
39
|
+
if (nestedCustomerHierarchy.length === 0) {
|
|
40
|
+
return [];
|
|
41
|
+
}
|
|
42
|
+
const agingBalancesByCustomer = nestedCustomerHierarchy.map((parentCustomer) => {
|
|
43
|
+
return getCustomerAgingReport(customerState, parentCustomer, agingBalancesByCustomerId, searchString, sortKey, sortOrder, parentCustomer.children.length === 0);
|
|
34
44
|
});
|
|
35
|
-
const filteredAgingBalancesByCustomer = agingBalancesByCustomer.filter((balance) => balance.customer.name
|
|
36
|
-
.toLowerCase()
|
|
37
|
-
.includes(searchString.toLowerCase()));
|
|
45
|
+
const filteredAgingBalancesByCustomer = agingBalancesByCustomer.filter((balance) => balance.customer.name.toLowerCase().includes(searchString.toLowerCase()));
|
|
38
46
|
const sortedAgingBalancesByCustomer = (0, orderBy_1.default)(filteredAgingBalancesByCustomer, (balance) => {
|
|
39
47
|
var _a;
|
|
40
48
|
switch (sortKey) {
|
|
@@ -48,14 +56,39 @@ exports.getArAgingReport = (0, toolkit_1.createSelector)((state) => state.arAgin
|
|
|
48
56
|
}
|
|
49
57
|
}
|
|
50
58
|
}, sortOrder === 'ascending' ? 'asc' : 'desc');
|
|
59
|
+
return sortedAgingBalancesByCustomer;
|
|
60
|
+
};
|
|
61
|
+
const getCustomerAgingReport = (customerState, nestedCustomer, arAgingBalancesByCustomerId, searchString, sortKey, sortOrder, isLeafCustomer) => {
|
|
62
|
+
const customerId = nestedCustomer.customerId[0];
|
|
63
|
+
const customer = (0, customerSelector_1.getCustomer)(customerState, customerId);
|
|
64
|
+
if (customer == null) {
|
|
65
|
+
throw new Error(`Customer with ${customerId} doesn't exist`);
|
|
66
|
+
}
|
|
67
|
+
const arAgingBalances = arAgingBalancesByCustomerId[customerId];
|
|
68
|
+
const { currencyCode, currencySymbol } = customer;
|
|
69
|
+
const customerTotal = arAgingBalances.reduce((prev, curr) => {
|
|
70
|
+
return prev + curr.balance.amount;
|
|
71
|
+
}, 0);
|
|
72
|
+
const customerTotalWithChildren = arAgingBalances.reduce((prev, curr) => {
|
|
73
|
+
var _a, _b;
|
|
74
|
+
return prev + ((_b = (_a = curr.totalBalance) === null || _a === void 0 ? void 0 : _a.amount) !== null && _b !== void 0 ? _b : 0);
|
|
75
|
+
}, 0);
|
|
51
76
|
return {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
77
|
+
id: nestedCustomer.customerId,
|
|
78
|
+
isLeafCustomer,
|
|
79
|
+
hasSiblings: nestedCustomer.hasSiblings,
|
|
80
|
+
customer,
|
|
81
|
+
arAgingBalances,
|
|
82
|
+
children: getNestedAgingBalancesByCustomer(customerState, arAgingBalancesByCustomerId, nestedCustomer.children, searchString, sortKey, sortOrder),
|
|
83
|
+
total: {
|
|
84
|
+
amount: customerTotal,
|
|
85
|
+
currencyCode: currencyCode !== null && currencyCode !== void 0 ? currencyCode : customerState_1.defaultCustomerCurrency.currencyCode,
|
|
86
|
+
currencySymbol: currencySymbol !== null && currencySymbol !== void 0 ? currencySymbol : customerState_1.defaultCustomerCurrency.currencySymbol,
|
|
87
|
+
},
|
|
88
|
+
totalWithChildren: {
|
|
89
|
+
amount: customerTotalWithChildren,
|
|
90
|
+
currencyCode: currencyCode !== null && currencyCode !== void 0 ? currencyCode : customerState_1.defaultCustomerCurrency.currencyCode,
|
|
91
|
+
currencySymbol: currencySymbol !== null && currencySymbol !== void 0 ? currencySymbol : customerState_1.defaultCustomerCurrency.currencySymbol,
|
|
92
|
+
},
|
|
60
93
|
};
|
|
61
|
-
}
|
|
94
|
+
};
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
|
-
import {
|
|
3
|
-
import { AgingBalance, AgingPeriod } from '../../../commonStateTypes/agingBalance/agingBalance';
|
|
2
|
+
import { AgingBalance, AgingBalancesKey, AgingPeriod } from '../../../commonStateTypes/agingBalance/agingBalance';
|
|
4
3
|
import { AgingReportUIState } from '../../../commonStateTypes/viewAndReport/agingReportStateTypes';
|
|
5
|
-
|
|
4
|
+
import { NestedCustomerHierarchy } from '../../../commonStateTypes/customerView/nestedCustomerID';
|
|
5
|
+
import { ReportV2 } from '../../../commonStateTypes/v2/viewAndReport';
|
|
6
|
+
export interface ARAgingBalancesByAgingBalancesKey {
|
|
6
7
|
arAgingBalancesByCustomerId: Record<ID, AgingBalance[]>;
|
|
7
|
-
|
|
8
|
+
nestedCustomerHierarchy: NestedCustomerHierarchy[];
|
|
8
9
|
arAgingTotals: AgingBalance[];
|
|
10
|
+
}
|
|
11
|
+
export interface ArAgingUIState extends AgingReportUIState {
|
|
12
|
+
nodeCollapseState: Record<ID, boolean>;
|
|
13
|
+
}
|
|
14
|
+
export interface ArAgingState extends ReportV2, FetchStateAndError {
|
|
15
|
+
arAgingBalancesByDate: Record<AgingBalancesKey, ARAgingBalancesByAgingBalancesKey>;
|
|
16
|
+
uiState: ArAgingUIState;
|
|
9
17
|
agingPeriods: AgingPeriod[];
|
|
10
18
|
}
|
|
@@ -6,22 +6,25 @@ const operators_1 = require("rxjs/operators");
|
|
|
6
6
|
const customerReducer_1 = require("../../../entity/customer/customerReducer");
|
|
7
7
|
const responsePayload_1 = require("../../../responsePayload");
|
|
8
8
|
const arAgingReducer_1 = require("./arAgingReducer");
|
|
9
|
+
const agingBalance_1 = require("../../../commonStateTypes/agingBalance/agingBalance");
|
|
9
10
|
const fetchArAgingEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(arAgingReducer_1.fetchArAging.match), (0, operators_1.switchMap)((action) => {
|
|
10
|
-
|
|
11
|
-
const state = state$.value;
|
|
12
|
-
const { reportDate } = action.payload;
|
|
11
|
+
const { reportDate, cacheOverride } = action.payload;
|
|
13
12
|
const queryParam = {
|
|
14
|
-
report_date: reportDate
|
|
15
|
-
? reportDate.format('YYYY-MM-DD')
|
|
16
|
-
: (_a = state.arAgingState.uiState.selectedDate) === null || _a === void 0 ? void 0 : _a.date.format('YYYY-MM-DD'),
|
|
13
|
+
report_date: reportDate.format('YYYY-MM-DD'),
|
|
17
14
|
};
|
|
15
|
+
const arAgingState = state$.value.arAgingState;
|
|
16
|
+
const key = (0, agingBalance_1.getAgingBalancesKey)(reportDate);
|
|
17
|
+
if (arAgingState.arAgingBalancesByDate[key] != null &&
|
|
18
|
+
cacheOverride === false) {
|
|
19
|
+
return (0, rxjs_1.from)([]);
|
|
20
|
+
}
|
|
18
21
|
return zeniAPI
|
|
19
22
|
.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/2.0/reports/accounts_receivable_aging?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
20
23
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
21
24
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
22
25
|
const actions = [
|
|
23
26
|
(0, customerReducer_1.updateCustomers)(response.data.report.customers),
|
|
24
|
-
(0, arAgingReducer_1.updateArAgingOnSuccess)(response.data.report),
|
|
27
|
+
(0, arAgingReducer_1.updateArAgingOnSuccess)(reportDate, response.data.report),
|
|
25
28
|
];
|
|
26
29
|
return (0, rxjs_1.from)(actions);
|
|
27
30
|
}
|
|
@@ -4,8 +4,8 @@ import { View } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
|
4
4
|
export declare const AUDIT_RULE_ENTITY_TYPES: readonly ["reports", "transactions", "dashboard"];
|
|
5
5
|
export declare const toAuditRuleEntityType: (v: string) => "dashboard" | "transactions" | "reports";
|
|
6
6
|
export declare type AuditRuleEntityType = ReturnType<typeof toAuditRuleEntityType>;
|
|
7
|
-
export declare const AUDIT_RULE_ENTITY_IDS: readonly ["uncategorized-expense", "uncategorized-income", "cash_balance", "card_balance", "operating_expenses", "operating_expenses_by_classes", "revenue", "revenue_by_classes", "net_burn_or_income", "net_burn_or_income_story_card", "net_burn_or_income_by_classes", "cash_position", "top_expenses", "profit_and_loss", "profit_and_loss_by_classes", "balance_sheet", "cash_flow", "dashboard", "finance_statement", "transaction_list_of_account", "transaction_list_missing_receipt", "transaction_list_of_account_by_class", "transaction_detail", "cash_in_cash_out", "insights_dashboard", "company_details", "class_list", "account_list", "account_list_by_type", "vendor", "task_card", "bill_pay", "reimbursement", "bill_pay_card", "reimbursement_card", "bill_pay_promo_card", "zeni_accounts", "zeni_accounts_promo_card", "charge_cards", "reimbursement_promo_card", "onboarding", "operating_expenses_by_vendor", "operating_expenses_by_vendor_summary", "vendors_tab", "accounts_payable_aging", "accounts_receivable_aging", "vendor_global_review", "prepaid_expenses", "fixed_assets"];
|
|
8
|
-
export declare const toAuditRuleEntityIdType: (v: string) => "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "uncategorized-expense" | "uncategorized-income";
|
|
7
|
+
export declare const AUDIT_RULE_ENTITY_IDS: readonly ["uncategorized-expense", "uncategorized-income", "cash_balance", "card_balance", "operating_expenses", "operating_expenses_by_classes", "revenue", "revenue_by_classes", "net_burn_or_income", "net_burn_or_income_story_card", "net_burn_or_income_by_classes", "cash_position", "top_expenses", "profit_and_loss", "profit_and_loss_by_classes", "balance_sheet", "cash_flow", "dashboard", "finance_statement", "transaction_list_of_account", "transaction_list_missing_receipt", "transaction_list_of_account_by_class", "transaction_detail", "cash_in_cash_out", "insights_dashboard", "company_details", "class_list", "account_list", "account_list_by_type", "vendor", "task_card", "bill_pay", "reimbursement", "bill_pay_card", "reimbursement_card", "bill_pay_promo_card", "zeni_accounts", "zeni_accounts_promo_card", "charge_cards", "reimbursement_promo_card", "onboarding", "operating_expenses_by_vendor", "operating_expenses_by_vendor_summary", "vendors_tab", "accounts_payable_aging", "accounts_receivable_aging", "vendor_global_review", "prepaid_expenses", "fixed_assets", "notification"];
|
|
8
|
+
export declare const toAuditRuleEntityIdType: (v: string) => "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "uncategorized-expense" | "uncategorized-income";
|
|
9
9
|
export declare type AuditRuleEntityIdType = ReturnType<typeof toAuditRuleEntityIdType>;
|
|
10
10
|
export declare const AUDIT_REPORT_ACTION_TYPES: readonly ["generate", "view"];
|
|
11
11
|
export declare const toAuditReportActionType: (v: string) => "view" | "generate";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getBillPayCardReport: (state: RootState) => {
|
|
3
|
-
reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets";
|
|
3
|
+
reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification";
|
|
4
4
|
reportTitle: string;
|
|
5
5
|
version: string | number | undefined;
|
|
6
6
|
fetchState: import("../..").FetchState;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="url-parse" />
|
|
2
2
|
import { RootState } from '../../reducer';
|
|
3
3
|
export declare const getCardBalance: (state: RootState) => {
|
|
4
|
-
reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets";
|
|
4
|
+
reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification";
|
|
5
5
|
reportTitle: string;
|
|
6
6
|
version: string | number | undefined;
|
|
7
7
|
status: import("../..").Status | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="url-parse" />
|
|
2
2
|
import { RootState } from '../../reducer';
|
|
3
3
|
export declare const getCashBalance: (state: RootState) => {
|
|
4
|
-
reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets";
|
|
4
|
+
reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification";
|
|
5
5
|
reportTitle: string;
|
|
6
6
|
version: string | number | undefined;
|
|
7
7
|
status: import("../..").Status | undefined;
|
|
@@ -15,7 +15,7 @@ export declare const getCashInCashOut: (accountState: AccountState, accountGroup
|
|
|
15
15
|
firstMonthOfFY: 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
16
16
|
dataAvailable: import("../../commonStateTypes/timeframeTick").TimeframeTick | undefined;
|
|
17
17
|
availableNumberOfPeriods: number | undefined;
|
|
18
|
-
reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets";
|
|
18
|
+
reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification";
|
|
19
19
|
reportTitle: string;
|
|
20
20
|
version: string | number | undefined;
|
|
21
21
|
status: import("../..").Status | undefined;
|
|
@@ -12,7 +12,7 @@ export declare const getCashPosition: (accountState: AccountState, cashPositionS
|
|
|
12
12
|
firstMonthOfFY: 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
13
13
|
dataAvailable: import("../../commonStateTypes/timeframeTick").TimeframeTick | undefined;
|
|
14
14
|
availableNumberOfPeriods: number | undefined;
|
|
15
|
-
reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets";
|
|
15
|
+
reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification";
|
|
16
16
|
reportTitle: string;
|
|
17
17
|
version: string | number | undefined;
|
|
18
18
|
status: import("../..").Status | undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
2
2
|
import { ClassBase, ClassState } from '../../entity/class/classState';
|
|
3
3
|
import { ClassListState } from './classListState';
|
|
4
|
-
import {
|
|
4
|
+
import { NestedClassHierarchyForReport } from '../../commonStateTypes/classesView/nestedClassID';
|
|
5
5
|
export interface ClassListSelectorView extends SelectorView {
|
|
6
6
|
classes: ClassBase[];
|
|
7
|
-
nestedClassHierarchy:
|
|
7
|
+
nestedClassHierarchy: NestedClassHierarchyForReport[];
|
|
8
8
|
}
|
|
9
9
|
export declare const getClassList: (classState: ClassState, classListState: ClassListState) => ClassListSelectorView;
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const getNestedClassListHierarchy: (classListState: ClassListState) => NestedClassHierarchyForReport[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getNestedClassListHierarchy = exports.getClassList = void 0;
|
|
4
4
|
const classSelector_1 = require("../../entity/class/classSelector");
|
|
5
5
|
// TODO - Fix return type, currently it's returning Class[] but ClassListSelectorView --> classes is ClassBase[]
|
|
6
6
|
const getClassList = (classState, classListState) => {
|
|
@@ -16,7 +16,7 @@ const getClassList = (classState, classListState) => {
|
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
exports.getClassList = getClassList;
|
|
19
|
-
const
|
|
19
|
+
const getNestedClassListHierarchy = (classListState) => {
|
|
20
20
|
return classListState.nestedClassHierarchy;
|
|
21
21
|
};
|
|
22
|
-
exports.
|
|
22
|
+
exports.getNestedClassListHierarchy = getNestedClassListHierarchy;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NestedClassHierarchyForReport } from '../../commonStateTypes/classesView/nestedClassID';
|
|
2
2
|
import { FetchedState, ID } from '../../commonStateTypes/common';
|
|
3
3
|
export interface ClassListState extends FetchedState {
|
|
4
4
|
classIds: ID[];
|
|
5
|
-
nestedClassHierarchy:
|
|
5
|
+
nestedClassHierarchy: NestedClassHierarchyForReport[];
|
|
6
6
|
}
|
|
@@ -6,8 +6,8 @@ import { AccountListSelectorView } from '../../accountList/accountListSelector';
|
|
|
6
6
|
import { ClassListSelectorView } from '../../classList/classListSelector';
|
|
7
7
|
import { User } from '../../../entity/user/userState';
|
|
8
8
|
import { TransactionID } from '../../../entity/transaction/stateTypes/transaction';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { NestedAccountHierarchyForReport } from '../../../commonStateTypes/accountView/nestedAccountID';
|
|
10
|
+
import { NestedClassHierarchyForReport } from '../../../commonStateTypes/classesView/nestedClassID';
|
|
11
11
|
export interface TransactionVendorDetails {
|
|
12
12
|
saveStatus: FetchStateAndError;
|
|
13
13
|
vendorDetailLocalData?: TransactionVendorLocalData;
|
|
@@ -16,8 +16,8 @@ export interface TransactionVendorDetails {
|
|
|
16
16
|
export interface TransactionVendorSelectorView extends SelectorView {
|
|
17
17
|
accountList: AccountListSelectorView;
|
|
18
18
|
classList: ClassListSelectorView;
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
accountsHierarchyList: NestedAccountHierarchyForReport[];
|
|
20
|
+
classHierarchyList: NestedClassHierarchyForReport[];
|
|
21
21
|
ownerList: User[];
|
|
22
22
|
editVendorState?: TransactionVendorDetails;
|
|
23
23
|
newVendorState?: TransactionVendorDetails;
|
|
@@ -35,13 +35,13 @@ const getTransactionVendorView = (state, vendorId) => {
|
|
|
35
35
|
{ fetchState: classList.fetchState, error: classList.error },
|
|
36
36
|
]);
|
|
37
37
|
}
|
|
38
|
-
const
|
|
39
|
-
const
|
|
38
|
+
const accountsHierarchyList = (0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, 'accountList');
|
|
39
|
+
const classHierarchyList = (0, classListSelector_1.getNestedClassListHierarchy)(classListState);
|
|
40
40
|
return {
|
|
41
41
|
accountList: accountList,
|
|
42
42
|
classList: classList,
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
accountsHierarchyList,
|
|
44
|
+
classHierarchyList,
|
|
45
45
|
ownerList: ownerList,
|
|
46
46
|
editVendorState: editVendorState,
|
|
47
47
|
newVendorState: newVendorState,
|
|
@@ -18,8 +18,8 @@ import { VendorSpend } from '../../../entity/vendorExpense/vendorExpenseState';
|
|
|
18
18
|
import { Entity } from '../../../entity/genericEntity/entity';
|
|
19
19
|
import { File } from '../../../entity/file/fileState';
|
|
20
20
|
import { VendorType } from '../../vendorTypeList/vendorTypeListPayload';
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
21
|
+
import { NestedAccountHierarchyForReport } from '../../../commonStateTypes/accountView/nestedAccountID';
|
|
22
|
+
import { NestedClassHierarchyForReport } from '../../../commonStateTypes/classesView/nestedClassID';
|
|
23
23
|
import { PaymentInstrument } from '../../../entity/paymentInstrument/paymentInstrument';
|
|
24
24
|
export interface VendorDetails {
|
|
25
25
|
vendorBasic: VendorBasic | undefined;
|
|
@@ -50,8 +50,8 @@ export interface VendorBasic {
|
|
|
50
50
|
export interface VendorViewSelectorView extends BankAccountSelectorView, SelectorView {
|
|
51
51
|
accountList: AccountListSelectorView;
|
|
52
52
|
classList: ClassListSelectorView;
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
accountsHierarchyList: NestedAccountHierarchyForReport[];
|
|
54
|
+
classHierarchyList: NestedClassHierarchyForReport[];
|
|
55
55
|
vendorTypeList: VendorType[];
|
|
56
56
|
ownerList: User[];
|
|
57
57
|
editVendorState?: VendorDetails;
|
|
@@ -112,14 +112,14 @@ const getVendorView = (state, vendorIdFromUrl) => {
|
|
|
112
112
|
(configDetails.method.includes('international') === true &&
|
|
113
113
|
configDetails.isEnabled === true));
|
|
114
114
|
}, false);
|
|
115
|
-
const
|
|
116
|
-
const
|
|
115
|
+
const accountsHierarchyList = (0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, 'billPayAccountList');
|
|
116
|
+
const classHierarchyList = (0, classListSelector_1.getNestedClassListHierarchy)(classListState);
|
|
117
117
|
const loggedInUserVerification = Object.assign(Object.assign({}, vendorViewState.loggedInUserVerification), { phone: (_1 = vendorViewState.loggedInUserVerification.phone) !== null && _1 !== void 0 ? _1 : (_3 = (0, userSelector_1.getUserByUserId)(userState, (_2 = vendorViewState.loggedInUserVerification.userId) !== null && _2 !== void 0 ? _2 : '')) === null || _3 === void 0 ? void 0 : _3.phone });
|
|
118
118
|
return Object.assign(Object.assign({}, bankAccount), { bankAccountCreationState: {
|
|
119
119
|
fetchState: bankAccount.fetchState,
|
|
120
120
|
error: bankAccount.error,
|
|
121
|
-
}, accountList: accountList, classList: classList,
|
|
122
|
-
|
|
121
|
+
}, accountList: accountList, classList: classList, accountsHierarchyList,
|
|
122
|
+
classHierarchyList, vendorTypeList: vendorTypeList, ownerList: ownerList, editVendorState: editVendorState, newVendorState: newVendorState, error: fetchState.error, version: 0, fetchState: fetchState.fetchState, hasWireTransfer,
|
|
123
123
|
hasInternationalWireTransfer,
|
|
124
124
|
deleteFileStatusById,
|
|
125
125
|
updateFileStatusById,
|
|
@@ -10,8 +10,8 @@ import { TrendWithTransactionsView } from '../../trendWithTransactions/trendWith
|
|
|
10
10
|
import { User } from '../../../entity/user/userState';
|
|
11
11
|
import { VendorSpend } from '../../../entity/vendorExpense/vendorExpenseState';
|
|
12
12
|
import { Entity } from '../../../entity/genericEntity/entity';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { NestedAccountHierarchyForReport } from '../../../commonStateTypes/accountView/nestedAccountID';
|
|
14
|
+
import { NestedClassHierarchyForReport } from '../../../commonStateTypes/classesView/nestedClassID';
|
|
15
15
|
import { TransactionListByEntityView } from '../../transactionList/transactionListByEntitySelector';
|
|
16
16
|
import { TimePeriod } from '../../../commonStateTypes/timePeriod';
|
|
17
17
|
import { Month } from '../../../commonStateTypes/timePeriod';
|
|
@@ -34,8 +34,8 @@ export interface VendorsTabVendorBasic {
|
|
|
34
34
|
export interface VendorsTabVendorViewSelectorView extends SelectorView {
|
|
35
35
|
accountList: AccountListSelectorView;
|
|
36
36
|
classList: ClassListSelectorView;
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
accountsHierarchyList: NestedAccountHierarchyForReport[];
|
|
38
|
+
classHierarchyList: NestedClassHierarchyForReport[];
|
|
39
39
|
ownerList: User[];
|
|
40
40
|
vendorView?: VendorsTabVendorDetails;
|
|
41
41
|
}
|
|
@@ -54,13 +54,13 @@ const getVendorsTabVendorView = (state, vendorIdFromUrl) => {
|
|
|
54
54
|
fetchState: 'Not-Started',
|
|
55
55
|
},
|
|
56
56
|
]);
|
|
57
|
-
const
|
|
58
|
-
const
|
|
57
|
+
const accountsHierarchyList = (0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, 'accountList');
|
|
58
|
+
const classHierarchyList = (0, classListSelector_1.getNestedClassListHierarchy)(classListState);
|
|
59
59
|
return {
|
|
60
60
|
accountList: accountList,
|
|
61
61
|
classList: classList,
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
accountsHierarchyList,
|
|
63
|
+
classHierarchyList,
|
|
64
64
|
ownerList: ownerList,
|
|
65
65
|
vendorView: vendorDetailState,
|
|
66
66
|
error: fetchState.error,
|
|
@@ -36,6 +36,8 @@ const fetchDashboardEpic = (actions$, state$) => actions$.pipe((0, operators_1.f
|
|
|
36
36
|
? (0, userRoleType_1.hasAdminLevelAccess)(currentTenant.userRole)
|
|
37
37
|
: false;
|
|
38
38
|
const isInvestorBanker = (0, userRoleType_1.hasInvestorBankerLevelAccess)(currentTenant.userRole);
|
|
39
|
+
const arAgingDate = state$.value.arAgingState.uiState.selectedDate;
|
|
40
|
+
const apAgingDate = state$.value.apAgingState.uiState.selectedDate;
|
|
39
41
|
if (cacheOverride === true) {
|
|
40
42
|
const actions = [
|
|
41
43
|
(0, tenantReducer_1.fetchAllTenants)(userId),
|
|
@@ -53,10 +55,10 @@ const fetchDashboardEpic = (actions$, state$) => actions$.pipe((0, operators_1.f
|
|
|
53
55
|
(0, tasksCardReducer_1.fetchTasksCard)(),
|
|
54
56
|
];
|
|
55
57
|
if (excludeResources.includes('accounts_payable_aging') === false) {
|
|
56
|
-
actions.push((0, apAgingReducer_1.fetchApAging)());
|
|
58
|
+
actions.push((0, apAgingReducer_1.fetchApAging)(apAgingDate));
|
|
57
59
|
}
|
|
58
60
|
if (excludeResources.includes('accounts_receivable_aging') === false) {
|
|
59
|
-
actions.push((0, arAgingReducer_1.fetchArAging)());
|
|
61
|
+
actions.push((0, arAgingReducer_1.fetchArAging)(arAgingDate));
|
|
60
62
|
}
|
|
61
63
|
if (excludeResources.includes('zeni_accounts_promo_card') === false) {
|
|
62
64
|
actions.push((0, zeniAccountsPromoCardReducer_1.fetchZeniAccountsPromoCard)());
|
|
@@ -133,12 +135,12 @@ const fetchDashboardEpic = (actions$, state$) => actions$.pipe((0, operators_1.f
|
|
|
133
135
|
if (state.apAgingState.fetchState !== 'In-Progress' &&
|
|
134
136
|
state.apAgingState.fetchState !== 'Completed' &&
|
|
135
137
|
excludeResources.includes('accounts_payable_aging') === false) {
|
|
136
|
-
fetchActions.push((0, apAgingReducer_1.fetchApAging)());
|
|
138
|
+
fetchActions.push((0, apAgingReducer_1.fetchApAging)(apAgingDate));
|
|
137
139
|
}
|
|
138
140
|
if (state.arAgingState.fetchState !== 'In-Progress' &&
|
|
139
141
|
state.arAgingState.fetchState !== 'Completed' &&
|
|
140
142
|
excludeResources.includes('accounts_receivable_aging') === false) {
|
|
141
|
-
fetchActions.push((0, arAgingReducer_1.fetchArAging)());
|
|
143
|
+
fetchActions.push((0, arAgingReducer_1.fetchArAging)(arAgingDate));
|
|
142
144
|
}
|
|
143
145
|
if (state.zeniAccountsPromoCardState.fetchState !== 'In-Progress' &&
|
|
144
146
|
!state.zeniAccountsPromoCardState.hasValidState() &&
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { DashboardState } from './dashboardState';
|
|
2
2
|
export declare const initialState: DashboardState;
|
|
3
|
-
export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string, companyId: string, fetchFullReport?: any, cacheOverride?: any, excludeResources?: ("cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets")[] | undefined], {
|
|
3
|
+
export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string, companyId: string, fetchFullReport?: any, cacheOverride?: any, excludeResources?: ("cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification")[] | undefined], {
|
|
4
4
|
userId: string;
|
|
5
5
|
companyId: string;
|
|
6
6
|
fetchFullReport: any;
|
|
7
7
|
cacheOverride: any;
|
|
8
|
-
excludeResources: ("cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets")[];
|
|
8
|
+
excludeResources: ("cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification")[];
|
|
9
9
|
}, string, never, never>, clearDashboard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
10
10
|
declare const _default: import("@reduxjs/toolkit").Reducer<DashboardState, import("@reduxjs/toolkit").AnyAction>;
|
|
11
11
|
export default _default;
|
|
@@ -16,7 +16,7 @@ export declare const fetchFinanceStatement: import("@reduxjs/toolkit").ActionCre
|
|
|
16
16
|
thisPeriod: TimeframeTick;
|
|
17
17
|
coaBalances: COABalance[];
|
|
18
18
|
maxNumOfPeriodsToHighlight: number;
|
|
19
|
-
}, string>, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, string>, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets", string>, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
19
|
+
}, string>, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, string>, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification", string>, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
20
20
|
firstMonthOfFY: Month;
|
|
21
21
|
isCompareModeOn: boolean;
|
|
22
22
|
additionalBalances: COABalanceType[];
|
|
@@ -4,9 +4,9 @@ import { ID } from '../../commonStateTypes/common';
|
|
|
4
4
|
import { ZeniAPIStatus } from '../../responsePayload';
|
|
5
5
|
import { VendorReviewViewAllRecommendationsPayload } from '../vendorReviewView/common/payload/commonTypes';
|
|
6
6
|
export declare const initialState: GlobalMerchantViewState;
|
|
7
|
-
export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | undefined], {
|
|
7
|
+
export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | undefined], {
|
|
8
8
|
merchantId: string | undefined;
|
|
9
|
-
context: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | undefined;
|
|
9
|
+
context: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | undefined;
|
|
10
10
|
}, string, never, never>, createGlobalMerchantSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
11
11
|
merchantId: ID;
|
|
12
12
|
}, string>, createGlobalMerchantFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -7,7 +7,7 @@ const getNestedClassIDHierarchyForReport_1 = require("../../commonStateTypes/cla
|
|
|
7
7
|
const classPayload_1 = require("../../entity/class/classPayload");
|
|
8
8
|
const viewAndReportPayloadv2_1 = require("../../commonPayloadTypes/v2/viewAndReportPayloadv2");
|
|
9
9
|
exports.initialState = {
|
|
10
|
-
|
|
10
|
+
classHierarchy: [],
|
|
11
11
|
fetchState: {
|
|
12
12
|
month: {
|
|
13
13
|
fetchState: 'Not-Started',
|
|
@@ -115,7 +115,7 @@ const doUpdatedNetBurnOrIncomeClassesView = (draft, timeframe, netBurnReport) =>
|
|
|
115
115
|
draft.firstMonthOfFY = report.firstMonthOfFY;
|
|
116
116
|
draft.fetchState[timeframe].fetchState = 'Completed';
|
|
117
117
|
const classMetadata = netBurnReport.report.classes.map((eachClass) => (0, classPayload_1.toClassMetadata)(eachClass));
|
|
118
|
-
if (draft.
|
|
119
|
-
draft.
|
|
118
|
+
if (draft.classHierarchy.length <= 0) {
|
|
119
|
+
draft.classHierarchy = (0, getNestedClassIDHierarchyForReport_1.geNestedClassIDHierarchyForReport)(classMetadata);
|
|
120
120
|
}
|
|
121
121
|
};
|