@zeniai/client-epic-state 5.0.64-betaML1 → 5.0.64-betaSS1
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/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +0 -2
- package/lib/entity/account/accountSelector.d.ts +0 -9
- package/lib/entity/account/accountSelector.js +1 -14
- 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/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/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -2
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +0 -4
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +0 -10
- package/lib/entity/transaction/stateTypes/transaction.d.ts +0 -3
- package/lib/epic.d.ts +1 -3
- package/lib/epic.js +1 -3
- package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +0 -2
- package/lib/esm/entity/account/accountSelector.js +0 -11
- package/lib/esm/entity/snackbar/snackbarTypes.js +0 -2
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +0 -10
- package/lib/esm/epic.js +1 -3
- package/lib/esm/index.js +7 -6
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +2 -1
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +6 -0
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +11 -1
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +1 -8
- package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +2 -1
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +113 -78
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +20 -31
- package/lib/esm/view/expenseAutomationView/types/completedSubTab.js +17 -0
- package/lib/esm/view/expenseAutomationView/types/missingReceiptsViewState.js +0 -2
- package/lib/esm/view/expenseAutomationView/types/transactionsViewState.js +0 -5
- package/lib/esm/view/transactionDetail/epics/transactionDetailEpic.js +0 -10
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +2 -24
- package/lib/index.d.ts +6 -5
- package/lib/index.js +39 -45
- 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/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +2 -1
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +6 -0
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +10 -0
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +0 -7
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/transactionCategorizationPayload.d.ts +21 -0
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +2 -1
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +2 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +10 -23
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +114 -79
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +2 -1
- package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +15 -4
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +0 -2
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +20 -32
- package/lib/view/expenseAutomationView/types/completedSubTab.d.ts +10 -0
- package/lib/view/expenseAutomationView/types/completedSubTab.js +21 -0
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +1 -2
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +1 -4
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +32 -15
- package/lib/view/expenseAutomationView/types/transactionsViewState.js +1 -6
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/view/transactionDetail/epics/transactionDetailEpic.d.ts +1 -2
- package/lib/view/transactionDetail/epics/transactionDetailEpic.js +0 -10
- package/lib/view/transactionDetail/transactionDetailPayload.d.ts +1 -1
- package/lib/view/transactionDetail/transactionDetailSelector.d.ts +1 -6
- package/lib/view/transactionDetail/transactionDetailSelector.js +1 -23
- package/package.json +1 -1
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/createTransferEntryEpic.js +0 -81
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransferAccountsEpic.js +0 -30
- package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
- package/lib/view/expenseAutomationView/epics/transactionCategorization/createTransferEntryEpic.d.ts +0 -9
- package/lib/view/expenseAutomationView/epics/transactionCategorization/createTransferEntryEpic.js +0 -85
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransferAccountsEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransferAccountsEpic.js +0 -34
|
@@ -3,12 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getLastTransferEntryReplacement = getLastTransferEntryReplacement;
|
|
7
6
|
exports.getExpenseAutomationTransactionView = getExpenseAutomationTransactionView;
|
|
8
7
|
const omit_1 = __importDefault(require("lodash/omit"));
|
|
9
8
|
const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
|
|
10
9
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
11
|
-
const accountSelector_1 = require("../../../entity/account/accountSelector");
|
|
12
10
|
const tenantSelector_1 = require("../../../entity/tenant/tenantSelector");
|
|
13
11
|
const transactionHelper_1 = require("../../../entity/transaction/transactionHelper");
|
|
14
12
|
const transactionSelector_1 = require("../../../entity/transaction/transactionSelector");
|
|
@@ -16,12 +14,9 @@ const accountListSelector_1 = require("../../accountList/accountListSelector");
|
|
|
16
14
|
const classListSelector_1 = require("../../classList/classListSelector");
|
|
17
15
|
const projectListSelector_1 = require("../../projectList/projectListSelector");
|
|
18
16
|
const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
|
|
19
|
-
function getLastTransferEntryReplacement(state) {
|
|
20
|
-
return state.expenseAutomationTransactionsViewState.lastTransferEntryReplacement;
|
|
21
|
-
}
|
|
22
17
|
function getExpenseAutomationTransactionView(state) {
|
|
23
18
|
const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState, projectState, projectListState, transactionState, monthEndCloseChecksState, monthEndCloseChecksViewState, } = state;
|
|
24
|
-
const { selectedTransactionCategorizationTab } = expenseAutomationTransactionsViewState;
|
|
19
|
+
const { selectedTransactionCategorizationCompletedSubTab, selectedTransactionCategorizationTab, } = expenseAutomationTransactionsViewState;
|
|
25
20
|
const { uiState, refreshStatus, saveStatus, markAsNotMiscategorizedStatus, transactionIdsBySelectedPeriod, transactionReviewLocalDataById, selectedCheckBoxTransactionIds, transactionIdsWithUnsavedData, uploadReceiptStatusById, selectedTransactionId, selectedTransactionLineId, } = expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab];
|
|
26
21
|
const uncategorizedIncomeExpense = (0, accountListSelector_1.getUncategorizedAccounts)(accountState, accountListState, 'accountList');
|
|
27
22
|
const accountList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, 'accountList');
|
|
@@ -74,10 +69,27 @@ function getExpenseAutomationTransactionView(state) {
|
|
|
74
69
|
.uiState.totalCount;
|
|
75
70
|
const totalCountByAutoCat = expenseAutomationTransactionsViewState.transactionCategorizationView
|
|
76
71
|
.autoCategorized.uiState.totalCount;
|
|
72
|
+
// Per-(sub-)tab counts powering pagination, in-list "showing X of Y", and
|
|
73
|
+
// any save/refresh round-trips. Sourced from `uiState.totalCount` which
|
|
74
|
+
// mirrors the response's `total_count` for whatever tab/sub-tab the user is
|
|
75
|
+
// viewing (e.g. only the Manual sub-tab rows for Completed → Manual).
|
|
77
76
|
const totalCountByTab = {
|
|
78
77
|
review: monthYearPeriodId != null ? totalCountByReview[monthYearPeriodId] : 0,
|
|
79
78
|
autoCategorized: monthYearPeriodId != null ? totalCountByAutoCat[monthYearPeriodId] : 0,
|
|
80
79
|
};
|
|
80
|
+
// Parent-tab badge counts. Sourced from `parent_tab_total_count` in the
|
|
81
|
+
// listing response and used exclusively by the navbar / tab strip badges.
|
|
82
|
+
// Independent of which Completed sub-tab is active so the badge stays
|
|
83
|
+
// stable across sub-tab switches.
|
|
84
|
+
const parentTotalCountByTab = expenseAutomationTransactionsViewState.parentTotalCountByTab;
|
|
85
|
+
const parentTabTotalCountByTab = {
|
|
86
|
+
review: monthYearPeriodId != null
|
|
87
|
+
? (parentTotalCountByTab.review[monthYearPeriodId] ?? 0)
|
|
88
|
+
: 0,
|
|
89
|
+
autoCategorized: monthYearPeriodId != null
|
|
90
|
+
? (parentTotalCountByTab.autoCategorized[monthYearPeriodId] ?? 0)
|
|
91
|
+
: 0,
|
|
92
|
+
};
|
|
81
93
|
const fetchStateByTab = {
|
|
82
94
|
review: {
|
|
83
95
|
fetchState: expenseAutomationTransactionsViewState.transactionCategorizationView
|
|
@@ -97,29 +109,6 @@ function getExpenseAutomationTransactionView(state) {
|
|
|
97
109
|
: [];
|
|
98
110
|
const transactionCompletionStatus = allSteps.find((step) => step.step === 'transaction_categorization')?.completionStatus;
|
|
99
111
|
const completionStatus = transactionCompletionStatus ?? 'incomplete';
|
|
100
|
-
const transferAccountsFromApi = expenseAutomationTransactionsViewState.transferAccounts.accountIds
|
|
101
|
-
.map((id) => (0, accountSelector_1.getAccountBaseForTransferAccounts)(accountState, id))
|
|
102
|
-
.filter((account) => account != null);
|
|
103
|
-
/**
|
|
104
|
-
* Credit transfer picker uses transfer-account ids from a dedicated fetch. If that list
|
|
105
|
-
* resolves to nothing while the COA list is loaded, fall back to the full COA list so the
|
|
106
|
-
* credit dropdown is not empty.
|
|
107
|
-
*/
|
|
108
|
-
const transferAccountsList = transferAccountsFromApi.length > 0
|
|
109
|
-
? transferAccountsFromApi
|
|
110
|
-
: accountList.accounts
|
|
111
|
-
.map((a) => (0, accountSelector_1.getAccountBase)(accountState, a.accountId, 'account_list'))
|
|
112
|
-
.filter((account) => account != null);
|
|
113
|
-
const creditCardAccountsFromApi = expenseAutomationTransactionsViewState.creditCardAccountsForTransfer.accountIds
|
|
114
|
-
.map((id) => (0, accountSelector_1.getAccountBaseForCreditCardTransferAccounts)(accountState, id))
|
|
115
|
-
.filter((account) => account != null);
|
|
116
|
-
const coaCreditCardsFallback = accountList.accounts
|
|
117
|
-
.map((a) => (0, accountSelector_1.getAccountBase)(accountState, a.accountId, 'account_list'))
|
|
118
|
-
.filter((account) => account != null)
|
|
119
|
-
.filter((a) => a.accountType === 'credit_card');
|
|
120
|
-
const creditCardAccountsForTransferList = creditCardAccountsFromApi.length > 0
|
|
121
|
-
? creditCardAccountsFromApi
|
|
122
|
-
: coaCreditCardsFallback;
|
|
123
112
|
return {
|
|
124
113
|
version: 0,
|
|
125
114
|
fetchState: fetchStatus.fetchState,
|
|
@@ -140,14 +129,13 @@ function getExpenseAutomationTransactionView(state) {
|
|
|
140
129
|
refreshStatus,
|
|
141
130
|
saveStatus,
|
|
142
131
|
markAsNotMiscategorizedStatus,
|
|
143
|
-
createTransferEntryStatus: expenseAutomationTransactionsViewState.createTransferEntryStatus,
|
|
144
132
|
completionStatus,
|
|
145
133
|
totalCountByTab,
|
|
134
|
+
parentTabTotalCountByTab,
|
|
146
135
|
fetchStateByTransactionTabs: fetchStateByTab,
|
|
147
136
|
uploadReceiptStatusById,
|
|
148
137
|
selectedTransactionId,
|
|
149
138
|
selectedTransactionLineId,
|
|
150
|
-
|
|
151
|
-
transferAccounts: transferAccountsList,
|
|
139
|
+
selectedTransactionCategorizationCompletedSubTab,
|
|
152
140
|
};
|
|
153
141
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const toCompletedSubTab: (v: string) => "all" | "manual" | "ai_accountant";
|
|
2
|
+
export type CompletedSubTab = ReturnType<typeof toCompletedSubTab>;
|
|
3
|
+
/**
|
|
4
|
+
* "No sub-tab filter" sentinel — single source of truth for the default
|
|
5
|
+
* value of {@link CompletedSubTab}. Use this constant in initial slice
|
|
6
|
+
* state and at any call site that needs to fall back to the parent-tab
|
|
7
|
+
* listing semantics (review tab requests, manual-search overrides, etc.)
|
|
8
|
+
* so a future rename of the union doesn't require chasing literals.
|
|
9
|
+
*/
|
|
10
|
+
export declare const DEFAULT_COMPLETED_SUB_TAB: CompletedSubTab;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_COMPLETED_SUB_TAB = exports.toCompletedSubTab = void 0;
|
|
4
|
+
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
|
+
/**
|
|
6
|
+
* Sub-tabs that can appear under any "Completed" tab in the Expense Automation
|
|
7
|
+
* surface (Transaction Categorization Completed and Missing Receipts Completed
|
|
8
|
+
* both use this exact union). Forwarded verbatim to listing APIs as `sub_tab`
|
|
9
|
+
* / `match_type`. `'all'` preserves parent-tab semantics on the backend.
|
|
10
|
+
*/
|
|
11
|
+
const COMPLETED_SUB_TABS = ['all', 'ai_accountant', 'manual'];
|
|
12
|
+
const toCompletedSubTab = (v) => (0, stringToUnion_1.stringToUnion)(v.trim().toLowerCase(), COMPLETED_SUB_TABS);
|
|
13
|
+
exports.toCompletedSubTab = toCompletedSubTab;
|
|
14
|
+
/**
|
|
15
|
+
* "No sub-tab filter" sentinel — single source of truth for the default
|
|
16
|
+
* value of {@link CompletedSubTab}. Use this constant in initial slice
|
|
17
|
+
* state and at any call site that needs to fall back to the parent-tab
|
|
18
|
+
* listing semantics (review tab requests, manual-search overrides, etc.)
|
|
19
|
+
* so a future rename of the union doesn't require chasing literals.
|
|
20
|
+
*/
|
|
21
|
+
exports.DEFAULT_COMPLETED_SUB_TAB = 'all';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FetchStateAndError, FetchedState, ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
3
3
|
import { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
4
|
+
import { CompletedSubTab } from './completedSubTab';
|
|
4
5
|
export declare const toMissingReceiptsSortKey: (v: string) => "date" | "amount" | "vendor" | "category" | "class";
|
|
5
6
|
export type MissingReceiptsSortKey = ReturnType<typeof toMissingReceiptsSortKey>;
|
|
6
7
|
export interface MissingReceiptsViewUIState {
|
|
@@ -31,8 +32,6 @@ export declare const toBulkUploadResultsTab: (v: string) => "completed" | "unmat
|
|
|
31
32
|
export type BulkUploadResultsTab = ReturnType<typeof toBulkUploadResultsTab>;
|
|
32
33
|
export declare const toMissingReceiptsTab: (v: string) => "completed" | "unmatched" | "missing";
|
|
33
34
|
export type MissingReceiptsTab = ReturnType<typeof toMissingReceiptsTab>;
|
|
34
|
-
export declare const toCompletedSubTab: (v: string) => "all" | "manual" | "ai_accountant";
|
|
35
|
-
export type CompletedSubTab = ReturnType<typeof toCompletedSubTab>;
|
|
36
35
|
export declare const toMatchSource: (v: string) => "manual" | "ai";
|
|
37
36
|
export type MatchSource = ReturnType<typeof toMatchSource>;
|
|
38
37
|
export declare const toBulkUploadSortKey: (v: string) => "date" | "amount" | "vendor" | "category" | "class";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toBulkUploadSortKey = exports.toMatchSource = exports.
|
|
3
|
+
exports.toBulkUploadSortKey = exports.toMatchSource = exports.toMissingReceiptsTab = exports.toBulkUploadResultsTab = exports.toBulkUploadPhase = exports.toBatchFileStatus = exports.BATCH_FILE_STATUSES = exports.toBatchStatusValue = exports.MIN_MANUAL_TRANSACTION_SEARCH_LENGTH = exports.toMissingReceiptsSortKey = void 0;
|
|
4
4
|
exports.isUnmatchedTabFileStatus = isUnmatchedTabFileStatus;
|
|
5
5
|
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
6
6
|
const MISSING_RECEIPTS_SORT_KEYS = [
|
|
@@ -49,9 +49,6 @@ exports.toBulkUploadResultsTab = toBulkUploadResultsTab;
|
|
|
49
49
|
const MISSING_RECEIPTS_TABS = ['missing', 'completed', 'unmatched'];
|
|
50
50
|
const toMissingReceiptsTab = (v) => (0, stringToUnion_1.stringToUnion)(v.trim().toLowerCase(), MISSING_RECEIPTS_TABS);
|
|
51
51
|
exports.toMissingReceiptsTab = toMissingReceiptsTab;
|
|
52
|
-
const COMPLETED_SUB_TABS = ['all', 'ai_accountant', 'manual'];
|
|
53
|
-
const toCompletedSubTab = (v) => (0, stringToUnion_1.stringToUnion)(v.trim().toLowerCase(), COMPLETED_SUB_TABS);
|
|
54
|
-
exports.toCompletedSubTab = toCompletedSubTab;
|
|
55
52
|
const MATCH_SOURCES = ['ai', 'manual'];
|
|
56
53
|
const toMatchSource = (v) => (0, stringToUnion_1.stringToUnion)(v.trim().toLowerCase(), MATCH_SOURCES);
|
|
57
54
|
exports.toMatchSource = toMatchSource;
|
|
@@ -13,9 +13,11 @@ import { TransactionID } from '../../../entity/transaction/stateTypes/transactio
|
|
|
13
13
|
import { BillableStatus, CategorizationStatusType, PlatformLineDetailType, ProductOrService, TransactionLineBase } from '../../../entity/transaction/stateTypes/transactionLine';
|
|
14
14
|
import { TransactionCategory, TransactionType } from '../../../entity/transaction/stateTypes/transactionType';
|
|
15
15
|
import { VendorBase } from '../../../entity/vendor/vendorState';
|
|
16
|
+
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
16
17
|
import { ZeniDate } from '../../../zeniDayJS';
|
|
17
18
|
import { EntityRecommendationKey } from '../../recommendation/recommendationState';
|
|
18
19
|
import { TransactionDetailKey } from '../../transactionDetail/transactionDetailState';
|
|
20
|
+
import { CompletedSubTab } from './completedSubTab';
|
|
19
21
|
export declare const toTransactionsSortKey: (v: string) => "date" | "amount" | "vendor" | "project" | "category" | "class" | "payment_account" | "transaction_type" | "memo_and_receipt";
|
|
20
22
|
export type TransactionsSortKey = ReturnType<typeof toTransactionsSortKey>;
|
|
21
23
|
export declare const TRANSACTIONS_TABS: readonly ["review", "autoCategorized"];
|
|
@@ -103,26 +105,41 @@ export interface TransactionsTabViewState extends FetchedState {
|
|
|
103
105
|
selectedTransactionId?: ID;
|
|
104
106
|
selectedTransactionLineId?: ID;
|
|
105
107
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
+
/**
|
|
109
|
+
* Snapshot of the autoCategorized tab's paginated dataset for a single
|
|
110
|
+
* Completed sub-tab. Stored in {@link TransactionsViewState.autoCategorizedSubTabCache}
|
|
111
|
+
* so revisiting an already-loaded sub-tab can short-circuit the fetch epic
|
|
112
|
+
* (mirrors parent-tab caching). The snapshot is period-spanning — both the
|
|
113
|
+
* `totalCount` map and `transactionIdsBySelectedPeriod` map preserve every
|
|
114
|
+
* period the user has paged through under that sub-tab.
|
|
115
|
+
*/
|
|
116
|
+
export interface AutoCategorizedSubTabSnapshot {
|
|
117
|
+
error: ZeniAPIStatus | undefined;
|
|
108
118
|
fetchState: FetchState;
|
|
119
|
+
pageToken: PageToken;
|
|
120
|
+
totalCount: Record<MonthYearPeriodId, number>;
|
|
121
|
+
transactionIdsBySelectedPeriod: Record<MonthYearPeriodId, ID[]>;
|
|
109
122
|
}
|
|
110
|
-
/** Which pool `fetchAccountsForTransferFlow` / transfer-flow epic should load. */
|
|
111
|
-
export declare const TRANSFER_ACCOUNTS_FETCH_KIND: readonly ["transfer_eligible", "credit_card_only"];
|
|
112
|
-
export type TransferAccountsFetchKind = (typeof TRANSFER_ACCOUNTS_FETCH_KIND)[number];
|
|
113
|
-
export type TransferEntryRouteReplacement = {
|
|
114
|
-
newTransactionId: TransactionID;
|
|
115
|
-
previousTransactionId: TransactionID;
|
|
116
|
-
};
|
|
117
123
|
export type TransactionsViewState = {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
124
|
+
/**
|
|
125
|
+
* Per-sub-tab snapshot cache for the Completed (autoCategorized) tab. Keyed
|
|
126
|
+
* by {@link CompletedSubTab}. Populated as the user navigates between
|
|
127
|
+
* sub-tabs and consulted on every switch — the active autoCategorized slot
|
|
128
|
+
* is restored from here when a snapshot exists, otherwise it is reset and
|
|
129
|
+
* the fetch epic loads page 1 fresh.
|
|
130
|
+
*/
|
|
131
|
+
autoCategorizedSubTabCache: Partial<Record<CompletedSubTab, AutoCategorizedSubTabSnapshot>>;
|
|
132
|
+
/**
|
|
133
|
+
* Period-keyed parent tab counts, scoped per {@link TransactionsTab}.
|
|
134
|
+
* Sourced from the listing response's `parent_tab_total_count` and used
|
|
135
|
+
* exclusively to drive the parent tab badges on the UI — every other
|
|
136
|
+
* count consumer (pagination, sub-tab chips, in-tab "showing X of Y")
|
|
137
|
+
* keeps reading from {@link TransactionsViewUIState.totalCount}.
|
|
138
|
+
*/
|
|
139
|
+
parentTotalCountByTab: Record<TransactionsTab, Record<MonthYearPeriodId, number>>;
|
|
140
|
+
selectedTransactionCategorizationCompletedSubTab: CompletedSubTab;
|
|
123
141
|
selectedTransactionCategorizationTab: TransactionsTab;
|
|
124
142
|
transactionCategorizationView: Record<TransactionsTab, TransactionsTabViewState>;
|
|
125
|
-
transferAccounts: TransferAccountsState;
|
|
126
143
|
};
|
|
127
144
|
export interface TransactionLineUpdates {
|
|
128
145
|
account?: AccountBase;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.initialSupportedTransactionCategorization = exports.getTransactionCategorizationKey = exports.toTransactionsTabKey = exports.TRANSACTIONS_TABS = exports.toTransactionsSortKey = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
5
|
const transactionDetailState_1 = require("../../transactionDetail/transactionDetailState");
|
|
6
6
|
const TRANSACTIONS_SORT_KEYS = [
|
|
@@ -31,8 +31,3 @@ exports.initialSupportedTransactionCategorization = {
|
|
|
31
31
|
tabSpecificLineItems: {},
|
|
32
32
|
},
|
|
33
33
|
};
|
|
34
|
-
/** Which pool `fetchAccountsForTransferFlow` / transfer-flow epic should load. */
|
|
35
|
-
exports.TRANSFER_ACCOUNTS_FETCH_KIND = [
|
|
36
|
-
'transfer_eligible',
|
|
37
|
-
'credit_card_only',
|
|
38
|
-
];
|
|
@@ -17,7 +17,7 @@ export declare const fetchFinanceStatement: import("@reduxjs/toolkit").ActionCre
|
|
|
17
17
|
firstMonthOfFY: Month;
|
|
18
18
|
maxNumOfPeriodsToHighlight: number;
|
|
19
19
|
thisPeriod: TimeframeTick;
|
|
20
|
-
}, "financeStatement/updateFinanceStatementThisPeriod">, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, "financeStatement/updateCOABalancesRange">, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"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"
|
|
20
|
+
}, "financeStatement/updateFinanceStatementThisPeriod">, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, "financeStatement/updateCOABalancesRange">, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"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", "financeStatement/updateSelectedReportId">, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
21
21
|
additionalBalances: COABalanceType[];
|
|
22
22
|
coaBalances: COABalance[];
|
|
23
23
|
firstMonthOfFY: Month;
|
|
@@ -3,9 +3,9 @@ import { ZeniAPIStatus } from '../../responsePayload';
|
|
|
3
3
|
import { VendorReviewViewAllRecommendationsPayload } from '../vendorReviewView/common/payload/commonTypes';
|
|
4
4
|
import { GlobalMerchantViewState, GlobalRecommendationFetchSource, NewGlobalMerchantCurrentSelection } from './globalMerchantViewState';
|
|
5
5
|
export declare const initialState: GlobalMerchantViewState;
|
|
6
|
-
export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "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" |
|
|
6
|
+
export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "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" | undefined], {
|
|
7
7
|
merchantId: string | undefined;
|
|
8
|
-
context: "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" |
|
|
8
|
+
context: "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" | undefined;
|
|
9
9
|
}, "globalMerchantView/createGlobalMerchant", never, never>, createGlobalMerchantSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
10
10
|
merchantId: ID;
|
|
11
11
|
}, "globalMerchantView/createGlobalMerchantSuccess">, createGlobalMerchantFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getReimbursementCardReport: (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"
|
|
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";
|
|
4
4
|
reportTitle: string;
|
|
5
5
|
version: string | number | undefined;
|
|
6
6
|
fetchState: import("../..").FetchState;
|
|
@@ -2,8 +2,8 @@ import { ReportID } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
|
2
2
|
import { ZeniAPIStatus } from '../../responsePayload';
|
|
3
3
|
import { ReportsResyncState } from './reportsResyncState';
|
|
4
4
|
export declare const initialReportsResyncState: ReportsResyncState;
|
|
5
|
-
export declare const initiateReportsResync: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[reportIdToResync: "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"
|
|
6
|
-
reportIdToResync: "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"
|
|
5
|
+
export declare const initiateReportsResync: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[reportIdToResync: "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"], {
|
|
6
|
+
reportIdToResync: "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";
|
|
7
7
|
}, "initiateReportsResync/initiateReportsResync", never, never>, initiateReportsClassViewRefetching: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
8
8
|
reportIdToResync: ReportID;
|
|
9
9
|
}, "initiateReportsResync/initiateReportsClassViewRefetching">, reportsResyncSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -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"
|
|
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";
|
|
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"
|
|
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";
|
|
8
8
|
reportTitle: string;
|
|
9
9
|
version: string | number | undefined;
|
|
10
10
|
status: import("../..").Status | undefined;
|
|
@@ -7,10 +7,9 @@ import { ZeniAPI } from '../../../zeniAPI';
|
|
|
7
7
|
import { fetchAccountList } from '../../accountList/accountListReducer';
|
|
8
8
|
import { fetchClassList } from '../../classList/classListReducer';
|
|
9
9
|
import { updateTransactionVendorLocalData } from '../../commonVendorView/transactionVendorView/transactionVendorViewReducer';
|
|
10
|
-
import { fetchAccountsForTransferFlow } from '../../expenseAutomationView/reducers/transactionsViewReducer';
|
|
11
10
|
import { fetchOwnerList } from '../../ownerList/ownerListReducer';
|
|
12
11
|
import { fetchProjectList } from '../../projectList/projectListReducer';
|
|
13
12
|
import { updateSortUiState } from '../../vendorList/vendorListReducer';
|
|
14
13
|
import { fetchTransactionDetail, initializeTransactionDetailLocalData, removeTransactionDetail, updateTransactionDetailFetchState } from '../transactionDetailReducer';
|
|
15
|
-
export type ActionType = ReturnType<typeof fetchTransactionDetail> | ReturnType<typeof updateTransaction> | ReturnType<typeof updateTransactionDetailFetchState> | ReturnType<typeof initializeTransactionDetailLocalData> | ReturnType<typeof removeTransaction> | ReturnType<typeof removeTransactionDetail> | ReturnType<typeof fetchClassList> | ReturnType<typeof fetchProjectList> | ReturnType<typeof fetchAccountList> | ReturnType<typeof updateSortUiState> | ReturnType<typeof updateVendors> | ReturnType<typeof updateTransactionVendorLocalData> | ReturnType<typeof fetchOwnerList
|
|
14
|
+
export type ActionType = ReturnType<typeof fetchTransactionDetail> | ReturnType<typeof updateTransaction> | ReturnType<typeof updateTransactionDetailFetchState> | ReturnType<typeof initializeTransactionDetailLocalData> | ReturnType<typeof removeTransaction> | ReturnType<typeof removeTransactionDetail> | ReturnType<typeof fetchClassList> | ReturnType<typeof fetchProjectList> | ReturnType<typeof fetchAccountList> | ReturnType<typeof updateSortUiState> | ReturnType<typeof updateVendors> | ReturnType<typeof updateTransactionVendorLocalData> | ReturnType<typeof fetchOwnerList>;
|
|
16
15
|
export declare const fetchTransactionDetailEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -19,7 +19,6 @@ const accountListReducer_1 = require("../../accountList/accountListReducer");
|
|
|
19
19
|
const classListReducer_1 = require("../../classList/classListReducer");
|
|
20
20
|
const transactionVendorLocalDataHelper_1 = require("../../commonVendorView/transactionVendorView/transactionVendorLocalDataHelper");
|
|
21
21
|
const transactionVendorViewReducer_1 = require("../../commonVendorView/transactionVendorView/transactionVendorViewReducer");
|
|
22
|
-
const transactionsViewReducer_1 = require("../../expenseAutomationView/reducers/transactionsViewReducer");
|
|
23
22
|
const ownerListReducer_1 = require("../../ownerList/ownerListReducer");
|
|
24
23
|
const projectListReducer_1 = require("../../projectList/projectListReducer");
|
|
25
24
|
const transactionDetailReducer_1 = require("../transactionDetailReducer");
|
|
@@ -42,15 +41,6 @@ const fetchTransactionDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe(
|
|
|
42
41
|
accountList.fetchState !== 'In-Progress') {
|
|
43
42
|
transactionActions.push((0, accountListReducer_1.fetchAccountList)('accountList'));
|
|
44
43
|
}
|
|
45
|
-
const { transferAccounts, creditCardAccountsForTransfer, } = state$.value.expenseAutomationTransactionsViewState;
|
|
46
|
-
if (transferAccounts.fetchState !== 'In-Progress' &&
|
|
47
|
-
transferAccounts.fetchState !== 'Completed') {
|
|
48
|
-
transactionActions.push((0, transactionsViewReducer_1.fetchAccountsForTransferFlow)({ kind: 'transfer_eligible' }));
|
|
49
|
-
}
|
|
50
|
-
if (creditCardAccountsForTransfer.fetchState !== 'In-Progress' &&
|
|
51
|
-
creditCardAccountsForTransfer.fetchState !== 'Completed') {
|
|
52
|
-
transactionActions.push((0, transactionsViewReducer_1.fetchAccountsForTransferFlow)({ kind: 'credit_card_only' }));
|
|
53
|
-
}
|
|
54
44
|
const classList = state$.value.classListState;
|
|
55
45
|
if (classList.hasValidState() === false &&
|
|
56
46
|
classList.fetchState !== 'In-Progress') {
|
|
@@ -3,7 +3,7 @@ import { TransactionPayload } from '../../entity/transaction/payloadTypes/transa
|
|
|
3
3
|
import { SupportedTransactionPayload } from '../../entity/transaction/transactionState';
|
|
4
4
|
import { VendorPayload } from '../../entity/vendor/vendorPayload';
|
|
5
5
|
import { ZeniAPIResponse } from '../../responsePayload';
|
|
6
|
-
|
|
6
|
+
interface TransactionDetailPayload {
|
|
7
7
|
query: {
|
|
8
8
|
transaction_id: string;
|
|
9
9
|
transaction_type: string;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { NestedAccountHierarchyForReport } from '../../commonStateTypes/accountView/nestedAccountID';
|
|
2
2
|
import { NestedClassHierarchyForReport } from '../../commonStateTypes/classesView/nestedClassID';
|
|
3
|
-
import {
|
|
3
|
+
import { FetchStateAndError } from '../../commonStateTypes/common';
|
|
4
4
|
import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
5
|
-
import { AccountBase } from '../../entity/account/accountState';
|
|
6
5
|
import { TransactionID } from '../../entity/transaction/stateTypes/transaction';
|
|
7
6
|
import { SupportedTransactionWithCOT } from '../../entity/transaction/transactionState';
|
|
8
7
|
import { Vendor } from '../../entity/vendor/vendorState';
|
|
@@ -18,9 +17,6 @@ export interface TransactionDetailReport extends SelectorView {
|
|
|
18
17
|
allVendors: Vendor[];
|
|
19
18
|
classHierarchyList: NestedClassHierarchyForReport[];
|
|
20
19
|
classList: ClassListSelectorView;
|
|
21
|
-
createTransferEntryStatus: FetchState;
|
|
22
|
-
/** Resolved credit-card pool for credit_card_payment transfer drawer. */
|
|
23
|
-
creditCardAccountsForTransferList: AccountBase[];
|
|
24
20
|
deleteStatusByAttachmentName: Record<string, FetchStateAndError>;
|
|
25
21
|
isAccountingClassesEnabled: boolean;
|
|
26
22
|
isAccountingProjectsEnabled: boolean;
|
|
@@ -28,7 +24,6 @@ export interface TransactionDetailReport extends SelectorView {
|
|
|
28
24
|
projectList: ProjectListSelectorView;
|
|
29
25
|
transactionDetailLocalData: TransactionDetailLocalData;
|
|
30
26
|
transactionDetailUpdateStatus: FetchStateAndError;
|
|
31
|
-
transferAccounts: AccountBase[];
|
|
32
27
|
isUpdateNotAllowed?: boolean;
|
|
33
28
|
transaction?: SupportedTransactionWithCOT;
|
|
34
29
|
}
|
|
@@ -7,7 +7,6 @@ exports.getInitialUpdatablePeriodsForTransactionRecommendations = exports.getTra
|
|
|
7
7
|
exports.getTransactionDetailForTransaction = getTransactionDetailForTransaction;
|
|
8
8
|
const get_1 = __importDefault(require("lodash/get"));
|
|
9
9
|
const reduceFetchState_1 = require("../../commonStateTypes/reduceFetchState");
|
|
10
|
-
const accountSelector_1 = require("../../entity/account/accountSelector");
|
|
11
10
|
const tenantSelector_1 = require("../../entity/tenant/tenantSelector");
|
|
12
11
|
const transactionType_1 = require("../../entity/transaction/stateTypes/transactionType");
|
|
13
12
|
const transactionHelper_1 = require("../../entity/transaction/transactionHelper");
|
|
@@ -19,7 +18,7 @@ const classListSelector_1 = require("../classList/classListSelector");
|
|
|
19
18
|
const projectListSelector_1 = require("../projectList/projectListSelector");
|
|
20
19
|
const transactionDetailState_1 = require("./transactionDetailState");
|
|
21
20
|
const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = true) => {
|
|
22
|
-
const { transactionDetailState, transactionState, vendorState, vendorListState, accountState, classState, classListState, accountListState,
|
|
21
|
+
const { transactionDetailState, transactionState, vendorState, vendorListState, accountState, classState, classListState, accountListState, projectState, projectListState, } = state;
|
|
23
22
|
const detailKey = (0, transactionDetailState_1.getTransactionDetailKey)(transactionId);
|
|
24
23
|
const transactionDetail = (0, get_1.default)(transactionDetailState.transactionDetailById, detailKey);
|
|
25
24
|
let fetchState = {
|
|
@@ -80,24 +79,6 @@ const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = tr
|
|
|
80
79
|
: [];
|
|
81
80
|
const transactionDetailAnyUpdateStatus = reduceUpdateFetchStates(transactionDetail);
|
|
82
81
|
const vendors = (0, vendorSelector_1.getVendorsByVendorIds)(vendorState, vendorListState.vendorIds);
|
|
83
|
-
const transferAccountsFromApi = expenseAutomationTransactionsViewState.transferAccounts.accountIds
|
|
84
|
-
.map((id) => (0, accountSelector_1.getAccountBaseForTransferAccounts)(accountState, id))
|
|
85
|
-
.filter((account) => account != null);
|
|
86
|
-
const transferAccountsList = transferAccountsFromApi.length > 0
|
|
87
|
-
? transferAccountsFromApi
|
|
88
|
-
: accountsList.accounts
|
|
89
|
-
.map((a) => (0, accountSelector_1.getAccountBase)(accountState, a.accountId, 'account_list'))
|
|
90
|
-
.filter((account) => account != null);
|
|
91
|
-
const creditCardAccountsFromApi = expenseAutomationTransactionsViewState.creditCardAccountsForTransfer.accountIds
|
|
92
|
-
.map((id) => (0, accountSelector_1.getAccountBaseForCreditCardTransferAccounts)(accountState, id))
|
|
93
|
-
.filter((account) => account != null);
|
|
94
|
-
const coaCreditCardsFallback = accountsList.accounts
|
|
95
|
-
.map((a) => (0, accountSelector_1.getAccountBase)(accountState, a.accountId, 'account_list'))
|
|
96
|
-
.filter((account) => account != null)
|
|
97
|
-
.filter((a) => a.accountType === 'credit_card');
|
|
98
|
-
const creditCardAccountsForTransferList = creditCardAccountsFromApi.length > 0
|
|
99
|
-
? creditCardAccountsFromApi
|
|
100
|
-
: coaCreditCardsFallback;
|
|
101
82
|
return {
|
|
102
83
|
reportId: 'transaction_detail',
|
|
103
84
|
reportTitle: 'Transaction Detail',
|
|
@@ -114,9 +95,6 @@ const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = tr
|
|
|
114
95
|
accountsHierarchyList,
|
|
115
96
|
classList: classList,
|
|
116
97
|
isAccountingClassesEnabled,
|
|
117
|
-
createTransferEntryStatus: expenseAutomationTransactionsViewState.createTransferEntryStatus,
|
|
118
|
-
creditCardAccountsForTransferList,
|
|
119
|
-
transferAccounts: transferAccountsList,
|
|
120
98
|
isAccountingProjectsEnabled,
|
|
121
99
|
projectList,
|
|
122
100
|
isUpdateNotAllowed: transactionDetail?.isUpdateNotAllowed,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.0.64-
|
|
3
|
+
"version": "5.0.64-betaSS1",
|
|
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",
|