@zeniai/client-epic-state 5.0.73 → 5.0.74
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/filterPrimitives.d.ts +23 -0
- package/lib/commonStateTypes/filterPrimitives.js +21 -0
- package/lib/entity/account/accountSelector.d.ts +26 -0
- package/lib/entity/account/accountSelector.js +47 -1
- package/lib/entity/account/accountState.d.ts +5 -0
- package/lib/entity/account/accountState.js +11 -4
- package/lib/entity/class/classSelector.d.ts +35 -0
- package/lib/entity/class/classSelector.js +50 -0
- package/lib/esm/commonStateTypes/filterPrimitives.js +20 -0
- package/lib/esm/entity/account/accountSelector.js +46 -1
- package/lib/esm/entity/account/accountState.js +7 -1
- package/lib/esm/entity/class/classSelector.js +48 -0
- package/lib/esm/index.js +10 -4
- package/lib/esm/view/companyHealthMetricView/companyHealthMetricViewSelector.js +1 -1
- package/lib/esm/view/companyView/helpers/cockpitHelpers.js +1 -1
- package/lib/esm/view/companyView/selector/companyManagementViewSelector.js +1 -1
- package/lib/esm/view/companyView/selector/companyPortfolioViewSelector.js +1 -1
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +11 -1
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +69 -12
- package/lib/esm/view/expenseAutomationView/transactionFilterHelpers.js +258 -0
- package/lib/esm/view/spendManagement/spendManagementFilterHelpers.js +4 -2
- package/lib/esm/view/subscriptionView/subscriptionViewSelector.js +1 -1
- package/lib/esm/view/taskManager/taskListView/taskListReducer.js +1 -1
- package/lib/index.d.ts +7 -5
- package/lib/index.js +41 -32
- package/lib/view/companyHealthMetricView/companyHealthMetricViewSelector.js +1 -1
- package/lib/view/companyView/helpers/cockpitHelpers.js +1 -1
- package/lib/view/companyView/selector/companyManagementViewSelector.js +1 -1
- package/lib/view/companyView/selector/companyPortfolioViewSelector.js +1 -1
- package/lib/view/companyView/types/cockpitTypes.d.ts +1 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +5 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +12 -2
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +4 -1
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +71 -12
- package/lib/view/expenseAutomationView/transactionFilterHelpers.d.ts +66 -0
- package/lib/view/expenseAutomationView/transactionFilterHelpers.js +262 -0
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +2 -0
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistory.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
- package/lib/view/spendManagement/spendManagementFilterHelpers.d.ts +12 -3
- package/lib/view/spendManagement/spendManagementFilterHelpers.js +4 -2
- package/lib/view/subscriptionView/subscriptionViewSelector.js +1 -1
- package/lib/view/taskManager/taskListView/taskList.d.ts +1 -1
- package/lib/view/taskManager/taskListView/taskListReducer.js +1 -1
- package/package.json +1 -1
|
@@ -4,14 +4,33 @@ import { toMonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
|
4
4
|
import { getCurrentTenant, getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, } from '../../../entity/tenant/tenantSelector';
|
|
5
5
|
import { getTransactionWithCOT } from '../../../entity/transaction/transactionHelper';
|
|
6
6
|
import { getSupportedTransactionsByIds } from '../../../entity/transaction/transactionSelector';
|
|
7
|
+
import { applyTransactionFilters, } from '../transactionFilterHelpers';
|
|
7
8
|
import { getAccountList, getNestedAccountListHierarchy, getUncategorizedAccounts, } from '../../accountList/accountListSelector';
|
|
8
9
|
import { getClassList, getNestedClassListHierarchy, } from '../../classList/classListSelector';
|
|
9
10
|
import { getProjectList } from '../../projectList/projectListSelector';
|
|
10
11
|
import { getAllSteps } from '../selectorTypes/expenseAutomationViewSelectorTypes';
|
|
12
|
+
export const toTransactionView = (transaction, transactionLocalData) => {
|
|
13
|
+
return {
|
|
14
|
+
id: transaction.id,
|
|
15
|
+
date: transaction.date,
|
|
16
|
+
amount: transaction.amount,
|
|
17
|
+
vendorName: transaction.vendorName,
|
|
18
|
+
customerName: transaction.customerName,
|
|
19
|
+
vendorId: transaction.vendorId,
|
|
20
|
+
customerId: transaction.customerId,
|
|
21
|
+
description: transaction.description,
|
|
22
|
+
memo: transaction.memo,
|
|
23
|
+
type: transaction.type,
|
|
24
|
+
typeName: transaction.typeName,
|
|
25
|
+
createTime: transaction.createTime,
|
|
26
|
+
transaction: transaction,
|
|
27
|
+
transactionLocalData,
|
|
28
|
+
};
|
|
29
|
+
};
|
|
11
30
|
export function getExpenseAutomationTransactionView(state) {
|
|
12
31
|
const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState, projectState, projectListState, transactionState, monthEndCloseChecksState, monthEndCloseChecksViewState, } = state;
|
|
13
32
|
const { selectedTransactionCategorizationCompletedSubTab, selectedTransactionCategorizationTab, } = expenseAutomationTransactionsViewState;
|
|
14
|
-
const { uiState, refreshStatus, saveStatus, markAsNotMiscategorizedStatus, transactionIdsBySelectedPeriod, transactionReviewLocalDataById, selectedCheckBoxTransactionIds, transactionIdsWithUnsavedData, uploadReceiptStatusById, selectedTransactionId, selectedTransactionLineId, } = expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab];
|
|
33
|
+
const { uiState, refreshStatus, saveStatus, markAsNotMiscategorizedStatus, transactionIdsBySelectedPeriod, transactionReviewLocalDataById, selectedCheckBoxTransactionIds, transactionIdsWithUnsavedData, uploadReceiptStatusById, selectedTransactionId, selectedTransactionLineId, filters, } = expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab];
|
|
15
34
|
const uncategorizedIncomeExpense = getUncategorizedAccounts(accountState, accountListState, 'accountList');
|
|
16
35
|
const accountList = getAccountList(accountState, accountListState, 'accountList');
|
|
17
36
|
const classList = getClassList(classState, classListState);
|
|
@@ -30,20 +49,58 @@ export function getExpenseAutomationTransactionView(state) {
|
|
|
30
49
|
? transactionIdsBySelectedPeriod[monthYearPeriodId]
|
|
31
50
|
: null;
|
|
32
51
|
const transactionIds = transactionIdsForSelectedPeriod ?? [];
|
|
33
|
-
const
|
|
34
|
-
|
|
52
|
+
const transactions = getSupportedTransactionsByIds(transactionState, transactionIds);
|
|
53
|
+
const transactionsWithCOT = transactions.map((transaction) => getTransactionWithCOT(transaction));
|
|
54
|
+
const transactionLocalDataMap = new Map();
|
|
55
|
+
transactionIds.forEach((transactionId) => {
|
|
35
56
|
const transactionData = transactionReviewLocalDataById[transactionId];
|
|
36
57
|
if (transactionData != null) {
|
|
37
|
-
|
|
58
|
+
transactionLocalDataMap.set(transactionId, {
|
|
38
59
|
transactionId,
|
|
39
60
|
transactionReviewLocalData: transactionData.transactionReviewLocalData,
|
|
40
|
-
};
|
|
61
|
+
});
|
|
41
62
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
63
|
+
});
|
|
64
|
+
// Step 2: Convert to TransactionView and apply advanced filters
|
|
65
|
+
const transactionViews = transactionsWithCOT.map((transaction) => {
|
|
66
|
+
const localData = transactionLocalDataMap.get(transaction.id);
|
|
67
|
+
return toTransactionView(transaction, localData);
|
|
68
|
+
});
|
|
69
|
+
// Apply TC-specific filters (lives under expenseAutomationView, independent
|
|
70
|
+
// of the Spend Management filter pipeline).
|
|
71
|
+
const filteredTransactionViews = applyTransactionFilters(transactionViews, filters);
|
|
72
|
+
// Convert back to TransactionWithCOT for return
|
|
73
|
+
const filteredTransactionsWithCOT = filteredTransactionViews.map((view) => view.transaction);
|
|
74
|
+
// Get transactionLocalData for filtered transactions
|
|
75
|
+
// Also include transactionLocalData for transactions that don't exist in transactionState
|
|
76
|
+
// but have local data (to match original behavior)
|
|
77
|
+
const filteredTransactionIds = new Set(filteredTransactionViews.map((view) => view.id));
|
|
78
|
+
// Pre-compute the membership set once. The previous implementation called
|
|
79
|
+
// `transactions.some(t => t.id === transactionId)` inside the per-id loop,
|
|
80
|
+
// turning the pipeline into O(n × m) — measurable on tenants with large
|
|
81
|
+
// transaction lists since this selector runs on every Redux dispatch.
|
|
82
|
+
const transactionExistsById = new Set(transactions.map((t) => t.id));
|
|
83
|
+
// `.flatMap` returns `X[]` directly when the callback returns `[]` for the
|
|
84
|
+
// skip case, so we don't need the trailing `.filter((d): d is X => …)` type
|
|
85
|
+
// predicate that the previous `map → filter` pipeline required.
|
|
86
|
+
const filteredTransactionLocalData = transactionIds.flatMap((transactionId) => {
|
|
87
|
+
const transactionData = transactionReviewLocalDataById[transactionId];
|
|
88
|
+
if (transactionData == null) {
|
|
89
|
+
return [];
|
|
90
|
+
}
|
|
91
|
+
// Include if transaction is in filtered results, or if transaction doesn't exist in state
|
|
92
|
+
// (to maintain backward compatibility with tests)
|
|
93
|
+
const transactionExists = transactionExistsById.has(transactionId);
|
|
94
|
+
if (filteredTransactionIds.has(transactionId) || !transactionExists) {
|
|
95
|
+
return [
|
|
96
|
+
{
|
|
97
|
+
transactionId,
|
|
98
|
+
transactionReviewLocalData: transactionData.transactionReviewLocalData,
|
|
99
|
+
},
|
|
100
|
+
];
|
|
101
|
+
}
|
|
102
|
+
return [];
|
|
103
|
+
});
|
|
47
104
|
const monthEndFetchState = monthYearPeriodId != null
|
|
48
105
|
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
|
|
49
106
|
: { fetchState: 'Not-Started', error: undefined };
|
|
@@ -107,7 +164,7 @@ export function getExpenseAutomationTransactionView(state) {
|
|
|
107
164
|
version: 0,
|
|
108
165
|
fetchState: fetchStatus.fetchState,
|
|
109
166
|
error: fetchStatus.error,
|
|
110
|
-
transactions:
|
|
167
|
+
transactions: filteredTransactionsWithCOT,
|
|
111
168
|
selectedCheckBoxTransactionIds,
|
|
112
169
|
transactionIdsWithUnsavedData,
|
|
113
170
|
uncategorizedAccounts: uncategorizedIncomeExpense,
|
|
@@ -118,7 +175,7 @@ export function getExpenseAutomationTransactionView(state) {
|
|
|
118
175
|
classHierarchyList,
|
|
119
176
|
isAccountingProjectsEnabled,
|
|
120
177
|
projectList,
|
|
121
|
-
transactionLocalData,
|
|
178
|
+
transactionLocalData: filteredTransactionLocalData,
|
|
122
179
|
uiState,
|
|
123
180
|
refreshStatus,
|
|
124
181
|
saveStatus,
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Narrowing type-guard for "has a non-empty string here". Used in place of
|
|
3
|
+
* raw `if (foo)` truthiness checks on `string | null | undefined` values so
|
|
4
|
+
* the `@typescript-eslint/strict-boolean-expressions` lint stays clean —
|
|
5
|
+
* empty strings should explicitly fall through to the next candidate
|
|
6
|
+
* (vendorName → customerName → localData.vendor.name → ...) rather than
|
|
7
|
+
* being implicitly coerced to falsy.
|
|
8
|
+
*/
|
|
9
|
+
const isNonEmptyString = (s) => s != null && s !== '';
|
|
10
|
+
/**
|
|
11
|
+
* First line item in UI order. `lineItemById` is a Record whose iteration
|
|
12
|
+
* order is not guaranteed to match what the user sees; `sortedLineItems`
|
|
13
|
+
* is the canonical ordering used by the categorization list/detail views.
|
|
14
|
+
*/
|
|
15
|
+
const getFirstLineItemFromReviewLocalData = (localData) => {
|
|
16
|
+
const { sortedLineItems, lineItemById } = localData;
|
|
17
|
+
if (sortedLineItems.length > 0) {
|
|
18
|
+
return lineItemById[sortedLineItems[0]];
|
|
19
|
+
}
|
|
20
|
+
const lineItems = Object.values(lineItemById);
|
|
21
|
+
return lineItems.length > 0 ? lineItems[0] : undefined;
|
|
22
|
+
};
|
|
23
|
+
export const TRANSACTION_FILTER_CATEGORIES = [
|
|
24
|
+
{ value: 'payment_account_name', type: 'dropdown' },
|
|
25
|
+
{ value: 'payment_account_type', type: 'dropdown' },
|
|
26
|
+
{ value: 'payee', type: 'searchAutocomplete' },
|
|
27
|
+
{ value: 'category', type: 'dropdown' },
|
|
28
|
+
{ value: 'class', type: 'dropdown' },
|
|
29
|
+
{ value: 'amount', type: 'numberRange' },
|
|
30
|
+
];
|
|
31
|
+
/**
|
|
32
|
+
* Resolve the comparable value for a transaction against a given filter field.
|
|
33
|
+
* Returns undefined when the transaction doesn't carry the field — callers
|
|
34
|
+
* decide whether absence counts as a match (for 'not_equal' it does).
|
|
35
|
+
*/
|
|
36
|
+
const getCategoryValueForTransaction = (key, transaction) => {
|
|
37
|
+
switch (key) {
|
|
38
|
+
case 'amount': {
|
|
39
|
+
// Prefer transactionLocalData line items (sum). Fall back to lines on
|
|
40
|
+
// the transaction itself. Final fallback: transaction-level amount.
|
|
41
|
+
const localDataForAmount = transaction.transactionLocalData?.transactionReviewLocalData;
|
|
42
|
+
if (localDataForAmount?.lineItemById) {
|
|
43
|
+
const lineItems = Object.values(localDataForAmount.lineItemById);
|
|
44
|
+
if (lineItems.length > 0) {
|
|
45
|
+
return lineItems.reduce((sum, lineItem) => sum + (lineItem.amount?.amount ?? 0), 0);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (transaction.transaction.lines &&
|
|
49
|
+
transaction.transaction.lines.length > 0) {
|
|
50
|
+
return transaction.transaction.lines.reduce((sum, line) => sum + (line.amount?.amount ?? 0), 0);
|
|
51
|
+
}
|
|
52
|
+
return transaction.amount.amount;
|
|
53
|
+
}
|
|
54
|
+
case 'payee': {
|
|
55
|
+
if (isNonEmptyString(transaction.vendorName)) {
|
|
56
|
+
return transaction.vendorName;
|
|
57
|
+
}
|
|
58
|
+
if (isNonEmptyString(transaction.customerName)) {
|
|
59
|
+
return transaction.customerName;
|
|
60
|
+
}
|
|
61
|
+
const localData = transaction.transactionLocalData?.transactionReviewLocalData;
|
|
62
|
+
const vendorName = localData?.vendor?.name;
|
|
63
|
+
if (isNonEmptyString(vendorName)) {
|
|
64
|
+
return vendorName;
|
|
65
|
+
}
|
|
66
|
+
const customerName = localData?.customer?.name;
|
|
67
|
+
if (isNonEmptyString(customerName)) {
|
|
68
|
+
return customerName;
|
|
69
|
+
}
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
case 'payment_account_name': {
|
|
73
|
+
// Match what TransactionCategorizationListRow renders for the cell.
|
|
74
|
+
return transaction.transaction.account?.accountName;
|
|
75
|
+
}
|
|
76
|
+
case 'payment_account_type': {
|
|
77
|
+
// Raw `paymentType` enum ("credit_card" / "check" / "cash"). Dropdown
|
|
78
|
+
// option values use the same enum; row uses `paymentTypeName` for the
|
|
79
|
+
// human label.
|
|
80
|
+
return transaction.transaction.paymentType;
|
|
81
|
+
}
|
|
82
|
+
case 'category': {
|
|
83
|
+
const localDataForCategory = transaction.transactionLocalData?.transactionReviewLocalData;
|
|
84
|
+
if (localDataForCategory != null) {
|
|
85
|
+
const firstLineItem = getFirstLineItemFromReviewLocalData(localDataForCategory);
|
|
86
|
+
const accountId = firstLineItem?.account?.accountId;
|
|
87
|
+
if (isNonEmptyString(accountId)) {
|
|
88
|
+
return accountId;
|
|
89
|
+
}
|
|
90
|
+
const qboId = firstLineItem?.account?.qboId;
|
|
91
|
+
if (isNonEmptyString(qboId)) {
|
|
92
|
+
return qboId;
|
|
93
|
+
}
|
|
94
|
+
const accountName = firstLineItem?.account?.accountName;
|
|
95
|
+
if (isNonEmptyString(accountName)) {
|
|
96
|
+
return accountName;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
const firstLineForCategory = transaction.transaction.lines?.[0];
|
|
100
|
+
if (firstLineForCategory?.type ===
|
|
101
|
+
'transaction_with_account_and_class_line' ||
|
|
102
|
+
firstLineForCategory?.type ===
|
|
103
|
+
'transaction_with_product_or_service_line' ||
|
|
104
|
+
firstLineForCategory?.type === 'journal_entry_transaction_line') {
|
|
105
|
+
const account = firstLineForCategory.account;
|
|
106
|
+
return account?.accountId ?? account?.qboId ?? account?.accountName;
|
|
107
|
+
}
|
|
108
|
+
return undefined;
|
|
109
|
+
}
|
|
110
|
+
case 'class': {
|
|
111
|
+
const localDataForClass = transaction.transactionLocalData?.transactionReviewLocalData;
|
|
112
|
+
if (localDataForClass != null) {
|
|
113
|
+
const firstLineItemForClass = getFirstLineItemFromReviewLocalData(localDataForClass);
|
|
114
|
+
const classId = firstLineItemForClass?.class?.classId;
|
|
115
|
+
if (isNonEmptyString(classId)) {
|
|
116
|
+
return classId;
|
|
117
|
+
}
|
|
118
|
+
const qboId = firstLineItemForClass?.class?.qboId;
|
|
119
|
+
if (isNonEmptyString(qboId)) {
|
|
120
|
+
return qboId;
|
|
121
|
+
}
|
|
122
|
+
const className = firstLineItemForClass?.class?.className;
|
|
123
|
+
if (isNonEmptyString(className)) {
|
|
124
|
+
return className;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
const firstLineForClass = transaction.transaction.lines?.[0];
|
|
128
|
+
if (firstLineForClass?.type === 'transaction_with_account_and_class_line' ||
|
|
129
|
+
firstLineForClass?.type ===
|
|
130
|
+
'transaction_with_product_or_service_line' ||
|
|
131
|
+
firstLineForClass?.type === 'journal_entry_transaction_line') {
|
|
132
|
+
const classData = firstLineForClass.class;
|
|
133
|
+
return classData?.classId ?? classData?.qboId ?? classData?.className;
|
|
134
|
+
}
|
|
135
|
+
return undefined;
|
|
136
|
+
}
|
|
137
|
+
default:
|
|
138
|
+
return undefined;
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* TC-only amount matcher. Supports all five operators TC defines, including
|
|
143
|
+
* the legacy "1000<->5000" range-string form (kept for backward compatibility
|
|
144
|
+
* with persisted filter state that may still contain that encoding).
|
|
145
|
+
*
|
|
146
|
+
* The `'equal' | 'not_equal'` branch matches if `amount` equals ANY of the
|
|
147
|
+
* configured values (consistent with how non-amount filters interpret a
|
|
148
|
+
* multi-value `values` array). `.some()` over the values array also makes
|
|
149
|
+
* the empty-values case behave correctly — empty array → `matched = false`
|
|
150
|
+
* — though in practice `applyTransactionFilters` strips empty-values
|
|
151
|
+
* categories before they reach this matcher. The trailing
|
|
152
|
+
* `op === 'not_equal' ? !matched : matched` line inverts for `not_equal`.
|
|
153
|
+
*/
|
|
154
|
+
const matchAmount = (amount, category) => {
|
|
155
|
+
const op = category.matchingOperator;
|
|
156
|
+
const values = category.values;
|
|
157
|
+
let matched = false;
|
|
158
|
+
if (op === 'in_between') {
|
|
159
|
+
if (values.length >= 2) {
|
|
160
|
+
const min = Number(values[0]);
|
|
161
|
+
const max = Number(values[1]);
|
|
162
|
+
matched = amount >= min && amount <= max;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
else if (op === 'less_than') {
|
|
166
|
+
if (values.length >= 1) {
|
|
167
|
+
matched = amount < Number(values[0]);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
else if (op === 'greater_than') {
|
|
171
|
+
if (values.length >= 1) {
|
|
172
|
+
matched = amount > Number(values[0]);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
else if (op === 'equal' || op === 'not_equal') {
|
|
176
|
+
matched = values.some((v) => {
|
|
177
|
+
const s = String(v);
|
|
178
|
+
// Backward compatibility: legacy "low<->high" range-string form
|
|
179
|
+
// persisted under `matchingOperator: 'equal'`.
|
|
180
|
+
if (s.includes('<->')) {
|
|
181
|
+
const parts = s.split('<->');
|
|
182
|
+
return (amount >= Number(parts[0] ?? '') && amount <= Number(parts[1] ?? ''));
|
|
183
|
+
}
|
|
184
|
+
return amount === Number(v);
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
return op === 'not_equal' ? !matched : matched;
|
|
188
|
+
};
|
|
189
|
+
const transactionMatchesCategory = (transaction, category) => {
|
|
190
|
+
const value = getCategoryValueForTransaction(category.field, transaction);
|
|
191
|
+
if (value == null) {
|
|
192
|
+
// Absent-value semantics — pinning these down explicitly so the
|
|
193
|
+
// asymmetry isn't surprising:
|
|
194
|
+
//
|
|
195
|
+
// not_equal: a missing value IS NOT EQUAL to any candidate, so the
|
|
196
|
+
// transaction matches the filter (passes through).
|
|
197
|
+
// equal: a missing value is not equal to any candidate, so the
|
|
198
|
+
// transaction does NOT match (filtered out).
|
|
199
|
+
// less_than / greater_than: SQL-style three-valued logic — comparing
|
|
200
|
+
// against a missing value is "unknown", which we treat as
|
|
201
|
+
// "does not match" (filtered out). A user setting
|
|
202
|
+
// "amount < $1000" probably wants transactions with a
|
|
203
|
+
// concrete amount that satisfies the bound, not rows
|
|
204
|
+
// where the amount can't be determined.
|
|
205
|
+
// in_between: same as the single-sided comparators — missing values
|
|
206
|
+
// are filtered out.
|
|
207
|
+
//
|
|
208
|
+
// Only the `not_equal` branch returns `true` here; everything else
|
|
209
|
+
// falls through to the `false` below.
|
|
210
|
+
return category.matchingOperator === 'not_equal';
|
|
211
|
+
}
|
|
212
|
+
if (category.field === 'amount') {
|
|
213
|
+
return matchAmount(Number(value), category);
|
|
214
|
+
}
|
|
215
|
+
const valueStr = value.toString();
|
|
216
|
+
const valueInList = category.values.some((v) => v.toString() === valueStr);
|
|
217
|
+
return category.matchingOperator === 'not_equal' ? !valueInList : valueInList;
|
|
218
|
+
};
|
|
219
|
+
/**
|
|
220
|
+
* TC-only equivalent of `applyAdvancedFiltersOnList`. Filters a list of
|
|
221
|
+
* `TransactionView` items against a `TransactionFilters` object using the
|
|
222
|
+
* AND/OR combination semantics from `categoryCombinationOperator`.
|
|
223
|
+
*
|
|
224
|
+
* Independent of `view/spendManagement` — keeps the TC filter pipeline cleanly
|
|
225
|
+
* inside the Expense Automation feature group.
|
|
226
|
+
*/
|
|
227
|
+
export const applyTransactionFilters = (transactions, filters) => {
|
|
228
|
+
if (filters?.categories == null || filters.categories.length === 0) {
|
|
229
|
+
return transactions;
|
|
230
|
+
}
|
|
231
|
+
// Mirrors the predicate used by `getTransactionAppliedFiltersCount` on the
|
|
232
|
+
// webc side. A half-filled category — e.g. `in_between` with only the
|
|
233
|
+
// `min` typed — would otherwise survive the filter pass and produce zero
|
|
234
|
+
// matches because `Number("")` collapses to `0`, artificially emptying
|
|
235
|
+
// the list while editing. Skipping such categories keeps the filtered
|
|
236
|
+
// view stable while the user finishes typing.
|
|
237
|
+
const activeCategories = filters.categories.filter((c) => {
|
|
238
|
+
if (c.field == null || c.values.length === 0) {
|
|
239
|
+
return false;
|
|
240
|
+
}
|
|
241
|
+
if (c.field === 'amount' && c.matchingOperator === 'in_between') {
|
|
242
|
+
return (c.values.length >= 2 &&
|
|
243
|
+
String(c.values[0] ?? '').trim() !== '' &&
|
|
244
|
+
String(c.values[1] ?? '').trim() !== '');
|
|
245
|
+
}
|
|
246
|
+
return String(c.values[0] ?? '').trim() !== '';
|
|
247
|
+
});
|
|
248
|
+
if (activeCategories.length === 0) {
|
|
249
|
+
return transactions;
|
|
250
|
+
}
|
|
251
|
+
const op = filters.categoryCombinationOperator;
|
|
252
|
+
return transactions.filter((txn) => {
|
|
253
|
+
if (op === 'AND') {
|
|
254
|
+
return activeCategories.every((cat) => transactionMatchesCategory(txn, cat));
|
|
255
|
+
}
|
|
256
|
+
return activeCategories.some((cat) => transactionMatchesCategory(txn, cat));
|
|
257
|
+
});
|
|
258
|
+
};
|
|
@@ -8,6 +8,8 @@ import { getActualPaymentDate } from './helpers';
|
|
|
8
8
|
import { getApproversOrRejectors as getApproversOrRejectorsForReimbursement, } from './reimbursement/remiListView/remiListSelector';
|
|
9
9
|
import { ALL_REMI_TABS, getRemiListKey, } from './reimbursement/remiListView/remiListState';
|
|
10
10
|
//filters items against filter values representing a range. ex: date (from-to), amount(1k<-->5k)
|
|
11
|
+
// Spend Management uses only equal/not_equal — TC amount operators
|
|
12
|
+
// (inBetween, lessThan, greaterThan) live in the TC filter pipeline.
|
|
11
13
|
const filterItemOnRangeCategoryType = (valueForItem, currentFilter) => {
|
|
12
14
|
let doesItemFallInValueRange = false;
|
|
13
15
|
const filterField = currentFilter.field;
|
|
@@ -41,7 +43,7 @@ const filterItemOnCategoriesWithSingleValue = (categoryValue, currentFilter, ran
|
|
|
41
43
|
return filterItemOnRangeCategoryType(categoryValue, currentFilter);
|
|
42
44
|
}
|
|
43
45
|
// if filter category is not rangeType
|
|
44
|
-
if (currentFilter.matchingOperator === '
|
|
46
|
+
if (currentFilter.matchingOperator === 'not_equal') {
|
|
45
47
|
return currentFilter.values.indexOf(categoryValue.toString()) === -1;
|
|
46
48
|
}
|
|
47
49
|
return currentFilter.values.indexOf(categoryValue.toString()) > -1;
|
|
@@ -115,7 +117,7 @@ export const applyAdvancedFiltersOnList = (entity, allItems, filters, filteredIt
|
|
|
115
117
|
? getCategoryValueForTaskList(key, item)
|
|
116
118
|
: getCategoryValueForPaymentHistory(key, item);
|
|
117
119
|
if (categoryValue == null) {
|
|
118
|
-
if (currentFilter.matchingOperator === '
|
|
120
|
+
if (currentFilter.matchingOperator === 'not_equal') {
|
|
119
121
|
return true;
|
|
120
122
|
}
|
|
121
123
|
return false;
|
|
@@ -208,7 +208,7 @@ const applyAdvancedFiltersOnCompaniesList = (allCompanies, filters, filteredComp
|
|
|
208
208
|
const key = currentFilter.field;
|
|
209
209
|
const categoryValue = getCategoryValueForCompany(key, company);
|
|
210
210
|
if (categoryValue == null) {
|
|
211
|
-
if (currentFilter.matchingOperator === '
|
|
211
|
+
if (currentFilter.matchingOperator === 'not_equal') {
|
|
212
212
|
return true;
|
|
213
213
|
}
|
|
214
214
|
return false;
|
package/lib/index.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ import { AgingDateSelectionType, AgingDetailReportInvoice, AgingDetailReportUISt
|
|
|
39
39
|
import { isAgingReport, isCashFlowOrBalanceSheetReport, isDashboardClassesViewReport, isDashboardReport, isFluxAnalysisOpExReport, isOpExByVendorReport, isPAndLClassesViewReport, isPAndLProjectViewReport, isPAndLReport } from './commonStateTypes/viewAndReport/reportIDHelper';
|
|
40
40
|
import { PageToken, Report, ReportFormat, ReportID, ReportIDPlusForecastID, SelectorReport, SelectorView, View, toReportFormatStrict, toReportID } from './commonStateTypes/viewAndReport/viewAndReport';
|
|
41
41
|
import { PAYMENT_BUSINESS_DAYS, filterDays, getNextNthWorkingDay, getPreviousNthWorkingDay, getYearsList, holidaysFormatted, isHoliday, isHolidayToday } from './commonStateTypes/workingDayHelper';
|
|
42
|
-
import { AccountReport, AccountWithBalanceReport } from './entity/account/accountSelector';
|
|
42
|
+
import { AccountFilterOption, AccountReport, AccountWithBalanceReport, getAllAccounts, getTransactionFilterAccountOptions } from './entity/account/accountSelector';
|
|
43
43
|
import { Account, AccountBase, AccountType, RecommendedAccountBase, ReconciliationAccountSourceType, StatementCloseDay, toAccountType, toReconciliationAccountSource } from './entity/account/accountState';
|
|
44
44
|
import { NestedAccountReport } from './entity/account/subAccountSelector';
|
|
45
45
|
import { AccountGroupReport } from './entity/accountGroup/accountGroupSelector';
|
|
@@ -274,7 +274,7 @@ import { clearExpenseAutomationFluxAnalysisView, fetchFluxAnalysisView, reviewFl
|
|
|
274
274
|
import { clearJeScheduleLocalData as clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchJeSchedulesPage as fetchExpenseAutomationJESchedulesPage, ignoreRecommendedJeSchedule as ignoreExpenseAutomationJESchedule, initializeAccountSettingsView as initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryJeSchedule as retryExpenseAutomationJESchedule, saveAccountSettings as saveJeAccountSettings, saveAccountSettingsLocalData as saveJeAccountSettingsLocalData, updateJESchedulesUIState as updateExpenseAutomationJESchedulesUIState, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys } from './view/expenseAutomationView/reducers/jeSchedulesViewReducer';
|
|
275
275
|
import { acknowledgeBulkUploadConfirmMatchComplete, bulkUploadAutomatchingTimedOut, bulkUploadReceipts, bulkUploadReceiptsFailure, bulkUploadReceiptsSuccess, clearBulkUpload, clearManualSearchResults, clearMissingReceiptsTabNavigation, confirmBulkUploadMatch, confirmBulkUploadMatchFailure, confirmBulkUploadMatchSuccess, fetchBulkUploadBatchDetails, fetchBulkUploadBatchDetailsFailure, fetchBulkUploadBatchDetailsSuccess, fetchBulkUploadBatches, fetchBulkUploadBatchesFailure, fetchBulkUploadBatchesSuccess, fetchCompletedTransactions, fetchCompletedTransactionsFailure, fetchCompletedTransactionsSuccess, fetchMissingReceipts as fetchExpenseAutomationMissingReceipts, fetchMoreBatchDetails, fetchMoreBatchDetailsComplete, fetchMoreBatchDetailsFailure, markMissingReceiptAsDone as markExpenseAutomationMissingReceiptAsDone, pusherBatchStatusUpdate, requestMissingReceiptsTabNavigation, restoreBulkUploadAutomatchingOnMount, restoreBulkUploadMatchingState, searchTransactionsForManualMatch, searchTransactionsForManualMatchFailure, searchTransactionsForManualMatchSuccess, setBulkUploadCompletedSubTab, setBulkUploadResultsTab, setBulkUploadSortConfig, setBulkUploadUploadedFileCount, storeBatchDetails, updateBulkUploadProgress, updateMissingReceiptUploadState as updateExpenseAutomationMissingReceiptUploadState, updateMissingReceiptsUIState as updateExpenseAutomationMissingReceiptsUIState, uploadMissingReceiptSuccess as uploadExpenseAutomationMissingReceiptSuccess } from './view/expenseAutomationView/reducers/missingReceiptsViewReducer';
|
|
276
276
|
import { deleteAccountStatement, excludeAccountFromReconciliation, fetchReconciliation as fetchReconciliationView, includeAccountInReconciliation, saveReconciliationDetail as saveExpenseAutomationReconciliationDetail, saveReconciliationReview as saveExpenseAutomationReconciliationReview, setConnectionInProgressForAccount as setConnectionInProgressForAccountReconciliation, setStatementParseInProgress, updateAccountReconciliationLocalData as updateExpenseAutomationAccountReconciliationLocalData, updateSelectedAccountId as updateExpenseAutomationAccountReconciliationSelectedAccountId, updateSelectedTab as updateExpenseAutomationAccountReconciliationSelectedTab, updateReconListScrollPosition as updateExpenseAutomationReconListScrollPosition, updateReviewTabSortState as updateExpenseAutomationReconReviewTabListSortState, updateReviewTabLocalData as updateExpenseAutomationReconReviewTabLocalData, updateReconcileTabListScrollState as updateExpenseAutomationReconcileTabListScrollState, updateReconcileTabListSortState as updateExpenseAutomationReconcileTabListSortState, updateReconcileTabLocalData as updateExpenseAutomationReconcileTabLocalData, updateSelectedDrawerAccountId as updateExpenseAutomationSelectedDrawerAccountId, updateNodeCollapseState, updateStatementUploadChosen, uploadAccountStatement } from './view/expenseAutomationView/reducers/reconciliationViewReducer';
|
|
277
|
-
import { backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, fetchTransactionCategorization, fetchTransactionCategorizationFailure, fetchTransactionCategorizationView, initializeTransactionCategorizationViewLocalData, markTransactionAsNotMiscategorized, saveTransactionCategorization, saveTransactionCategorizationLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, setEntityRecommendationForLineIdsForCategorization, syncTransactionCategorizationFromDetailSave, updateCurrentSelectedTransactionCategorizationTab, updateSelectedCheckboxTransactionIds, updateSelectedCustomerForTransaction, updateSelectedTransactionId, updateSelectedVendorForTransaction, updateTransactionCategorization, updateTransactionCategorizationCompletedSubTab, updateTransactionCategorizationSaveStatus, updateTransactionCategorizationUIState, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess } from './view/expenseAutomationView/reducers/transactionsViewReducer';
|
|
277
|
+
import { backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, fetchTransactionCategorization, fetchTransactionCategorizationFailure, fetchTransactionCategorizationView, initializeTransactionCategorizationViewLocalData, markTransactionAsNotMiscategorized, saveTransactionCategorization, saveTransactionCategorizationLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, setEntityRecommendationForLineIdsForCategorization, syncTransactionCategorizationFromDetailSave, updateCurrentSelectedTransactionCategorizationTab, updateSelectedCheckboxTransactionIds, updateSelectedCustomerForTransaction, updateSelectedTransactionId, updateSelectedVendorForTransaction, updateTransactionCategorization, updateTransactionCategorizationCompletedSubTab, updateTransactionCategorizationSaveStatus, updateTransactionCategorizationUIState, updateTransactionCategorizationUploadReceiptState, updateTransactionFilters, uploadTransactionCategorizationReceiptSuccess } from './view/expenseAutomationView/reducers/transactionsViewReducer';
|
|
278
278
|
import { ExpenseAutomationStepDetails, ExpenseAutomationViewSelector } from './view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes';
|
|
279
279
|
import { ExpenseAutomationFluxAnalysisViewSelector, FluxAnalysisOperatingExpenseView, FluxAnalysisSectionType, FluxAnalysisVendorView, FluxAnalysisViewSectionReport, FluxVendorAccountsAndClassesView } from './view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes';
|
|
280
280
|
import { JEAccountSettingsView } from './view/expenseAutomationView/selectorTypes/jeAccountSettingsViewSelectorTypes';
|
|
@@ -508,6 +508,7 @@ import { MileageDenomination, MileageDetailsLocalData, RemiSetupViewLocalData, R
|
|
|
508
508
|
import { approveOrRejectRemisBulkAction, autoReviewPendingApprovalRemis, cancelOrDeleteRemisBulkAction, clearAllRemisFromBulkActionList, clearRemiBulkActionView, incrementRemiBulkActionProcessedCount, removeRemiFromBulkActionList, reviewDraftRemisBulkAction, submitDraftRemisBulkAction, updateRemisBulkActionList } from './view/spendManagement/reimbursement/remisBulkActionView/remisBulkActionViewReducer';
|
|
509
509
|
import { RemisBulkReviewView, getRemisBulkOperationProgress, getRemisBulkReviewView } from './view/spendManagement/reimbursement/remisBulkActionView/remisBulkActionViewSelector';
|
|
510
510
|
import { BillPayFilterCategoryDropdownOption, CategoryCombinationOperator, FilterCategoryType, MatchingOperatorDropdownOption, ReimbursementFilterCategoryDropdownOption, SpendManagementFilterCategoryDropdownOption, SpendManagementFilterEntityType, SpendManagementFiltersType, TaskFilterCategoryDropdownOption, hideCreatedByFilter } from './view/spendManagement/spendManagementFilterHelpers';
|
|
511
|
+
import { TRANSACTION_FILTER_CATEGORIES, TransactionFilterAmountMatchingOperator, TransactionFilterCategory, TransactionFilterCategoryDropdownOption, TransactionFilterCategoryField, TransactionFilterEntityType, TransactionFilters, applyTransactionFilters } from './view/expenseAutomationView/transactionFilterHelpers';
|
|
511
512
|
import { acceptTreasuryTerms, clearTreasurySetupView, fetchPortfolioAllocation, fetchTreasuryFunds, fetchTreasurySetupView, updateFundAllocationLocalData, updatePortfolioAllocation, updateTreasuryVideoViewed } from './view/spendManagement/treasury/treasurySetUp/treasurySetupViewReducer';
|
|
512
513
|
import { TreasuryBusinessVerificationDetails, TreasurySetupView, getTreasuryBusinessVerificationDetails, getTreasurySetupViewDetails } from './view/spendManagement/treasury/treasurySetUp/treasurySetupViewSelector';
|
|
513
514
|
import { FundAllocationOption, FundComposition, FundData, getTreasuryFundsMaximumYield } from './view/spendManagement/treasury/treasurySetUp/treasurySetupViewState';
|
|
@@ -663,16 +664,16 @@ export { fetchMonthEndCloseChecks, fetchMonthClosePerformanceTrend, MonthClosePe
|
|
|
663
664
|
export { ExpenseAutomationViewSelector, ExpenseAutomationStepDetails, ExpenseAutomationViewType, ExpenseAutomationMissingReceiptsViewSelector, BulkUploadSelectorData, ExpenseAutomationFluxAnalysisViewSelector, FluxAnalysisVendorView, FluxAnalysisViewSectionReport, FluxVendorAccountsAndClassesView, ExpenseAutomationMissingReceiptsViewUIState, ExpenseAutomationMissingReceiptsViewState, ExpenseAutomationViewState, ExpenseAutomationTransactionsTab, ExpenseAutomationMissingReceiptsSortKey, BATCH_FILE_STATUSES, BatchDetails, BatchFile, BatchFileStatus, BatchListItem, isUnmatchedTabFileStatus, BatchStatus, BatchStatusValue, BatchSummary, BulkUploadPhase, BulkUploadResultsTab, BulkUploadSortKey, BulkUploadState, CandidateRef, CompletedSubTab, CompletedTransactionsSelectorData, DEFAULT_COMPLETED_SUB_TAB, MatchCandidate, MatchSource, MissingReceiptsTab, toBatchFileStatus, toBatchStatusValue, toBulkUploadPhase, toBulkUploadResultsTab, toBulkUploadSortKey, toCompletedSubTab, toMatchSource, toMissingReceiptsTab, ResolvedBatchFile, ResolvedBatchDetails, ResolvedCandidate, ExpenseAutomationJEScheduleMainTab, ExpenseAutomationJEScheduleSortKey, ExpenseAutomationJESchedulesViewUIState, toExpenseAutomationJEScheduleMainTab, toExpenseAutomationJEScheduleSortKey, getExpenseAutomationView, toExpenseAutomationMissingReceiptsSortKey, toExpenseAutomationTransactionsTabKey, toExpenseAutomationViewType, uploadExpenseAutomationMissingReceiptSuccess, markExpenseAutomationMissingReceiptAsDone, fetchAllExpenseAutomationTabs, refreshExpenseAutomationCurrentTab, updateCurrentSelectedTransactionCategorizationTab, updateTransactionCategorizationCompletedSubTab, fetchExpenseAutomationMissingReceipts, bulkUploadReceipts, bulkUploadAutomatchingTimedOut, bulkUploadReceiptsSuccess, bulkUploadReceiptsFailure, restoreBulkUploadAutomatchingOnMount, restoreBulkUploadMatchingState, updateBulkUploadProgress, pusherBatchStatusUpdate, requestMissingReceiptsTabNavigation, clearMissingReceiptsTabNavigation, fetchBulkUploadBatchDetails, fetchBulkUploadBatchDetailsSuccess, fetchBulkUploadBatchDetailsFailure, storeBatchDetails, fetchMoreBatchDetails, fetchMoreBatchDetailsComplete, fetchMoreBatchDetailsFailure, fetchBulkUploadBatches, fetchBulkUploadBatchesSuccess, fetchBulkUploadBatchesFailure, confirmBulkUploadMatch, confirmBulkUploadMatchSuccess, confirmBulkUploadMatchFailure, setBulkUploadResultsTab, setBulkUploadCompletedSubTab, setBulkUploadSortConfig, setBulkUploadUploadedFileCount, clearBulkUpload, searchTransactionsForManualMatch, searchTransactionsForManualMatchSuccess, searchTransactionsForManualMatchFailure, clearManualSearchResults, acknowledgeBulkUploadConfirmMatchComplete, fetchCompletedTransactions, fetchCompletedTransactionsSuccess, fetchCompletedTransactionsFailure, fetchFluxAnalysisView, clearExpenseAutomationFluxAnalysisView, updateOperatingExpensesIdsForReview as updateFluxOperatingExpensesIdsForReview, updateSelectedSectionIdsForReview as updateFluxAnalysisSelectedSectionIdsForReview, reviewFluxAnalysisView, updateExpenseAutomationMissingReceiptUploadState, updateExpenseAutomationMissingReceiptsUIState, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess, FluxAnalysisOperatingExpenseView, FluxAnalysisSectionType, getExpenseAutomationFluxAnalysisView, FluxAnalysisSortKey, FluxAnalysisActionType, FluxBalancesByMonth, updateCurrentSelectedView, updateCurrentSelectedPeriod, getExpenseAutomationTransactionView, ReconReconcileSortKey, ReconciliationReconcileTabLocalData, FluxAnalysisReviewStatus, updateFluxAnalysisViewUIState, FluxAnalysisViewUIState, updateFluxAnalysisViewPageMetaData, MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, getLineItemsByTransactionIdsFromLocalData, isAnyItemWithUncategorizedExpenseAccount, SaveExpenseAutomationReconciliationActionType, ExcludeAccountFromReconciliationPayload, excludeAccountFromReconciliation, includeAccountInReconciliation, saveExpenseAutomationReconciliationDetail, updateExpenseAutomationReconcileTabListScrollState, updateExpenseAutomationReconReviewTabListSortState, updateExpenseAutomationReconcileTabListSortState, updateExpenseAutomationReconcileTabLocalData, updateExpenseAutomationAccountReconciliationSelectedTab, updateExpenseAutomationAccountReconciliationSelectedAccountId, ExpenseAutomationReconciliationViewSelector, getExpenseAutomationReconciliationView, AccountReconciliationBySection, fetchReconciliationView, uploadAccountStatementIntoDocumentAI, UploadStatementDocumentAIResponse, updateExpenseAutomationReconListScrollPosition, setConnectionInProgressForAccountReconciliation, AccountReconciliationByAccount, AccountReconciliationEntity, getAccountReconByAccountIdAndSelectedPeriod, ExpenseAutomationReconciliationViewTab, toReconciliationTabsType, isAccountReconReport, ReconReviewSortKey, AccountReconSectionID, ReconciliationReviewTabLocalData, TransactionsToReview, RecommendedActionCodeType, ReconciliationStatusCodeType, BalanceDataStatusCodeType, updateExpenseAutomationReconReviewTabLocalData, updateExpenseAutomationSelectedDrawerAccountId, saveExpenseAutomationReconciliationReview, updateExpenseAutomationAccountReconciliationLocalData, BankStatusCodeType, ReconciliationAccountSourceType, toReconciliationAccountSource, StatementStatusCodeType, AccountReconciliationLocalData, StatementDataStatusCodeType, deleteAccountStatement, uploadAccountStatement, updateNodeCollapseState, UploadStatementDocumentAIPayload, updateStatementUploadChosen, isReviewTransactionBankTransferType, isReviewTransactionBillPaymentType, isReviewTransactionCreditCardPaymentType, isReviewTransactionDepositType, isReviewTransactionExpenseType, isReviewTransactionCreditCardCreditType, setStatementParseInProgress, };
|
|
664
665
|
export { JEScheduleLocalData };
|
|
665
666
|
export { ExpenseAutomationJESchedulesViewSelector, JEAccountSettingsView, JEScheduledTransactionWithFailedEntries, };
|
|
666
|
-
export { fetchTransactionCategorization, fetchTransactionCategorizationView, updateTransactionCategorizationUIState, updateSelectedCheckboxTransactionIds, setEntityRecommendationForLineIdsForCategorization, initializeTransactionCategorizationViewLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, saveTransactionCategorizationLocalData, fetchTransactionCategorizationFailure, saveTransactionCategorization, updateTransactionCategorization, updateTransactionCategorizationSaveStatus, markTransactionAsNotMiscategorized, updateSelectedVendorForTransaction, updateSelectedCustomerForTransaction, updateSelectedTransactionId, syncTransactionCategorizationFromDetailSave, backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, TransactionsSortKey, toTransactionsSortKey, TransactionsTab, TransactionCategorizationLineItemData, TransactionReviewLocalData, SupportedTransactionCategorization, ExpenseAutomationTransactionsViewState, ExpenseAutomationTransactionsViewUIState, ExpenseAutomationTransactionViewSelector, TransactionReviewLocalDataSelectorView, };
|
|
667
|
+
export { fetchTransactionCategorization, fetchTransactionCategorizationView, updateTransactionCategorizationUIState, updateTransactionFilters, updateSelectedCheckboxTransactionIds, setEntityRecommendationForLineIdsForCategorization, initializeTransactionCategorizationViewLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, saveTransactionCategorizationLocalData, fetchTransactionCategorizationFailure, saveTransactionCategorization, updateTransactionCategorization, updateTransactionCategorizationSaveStatus, markTransactionAsNotMiscategorized, updateSelectedVendorForTransaction, updateSelectedCustomerForTransaction, updateSelectedTransactionId, syncTransactionCategorizationFromDetailSave, backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, TransactionsSortKey, toTransactionsSortKey, TransactionsTab, TransactionCategorizationLineItemData, TransactionReviewLocalData, SupportedTransactionCategorization, ExpenseAutomationTransactionsViewState, ExpenseAutomationTransactionsViewUIState, ExpenseAutomationTransactionViewSelector, TransactionReviewLocalDataSelectorView, };
|
|
667
668
|
export { TopExpense, TopExTimePeriod, TOP_EX_TIME_PERIODS };
|
|
668
669
|
export { TimeframeTick, TimeframeTickWithMetaData, toTimeframeTick, mapTimePeriodtoTimeframeTick, toTimePeriod, toAbsoluteDay, toMonthYearPeriodId, convertToPeriod, MonthYearPeriod, };
|
|
669
670
|
export { VendorSpendTrendFilterTabType, toVendorSpendTrendFilterTabsTypeStrict, } from './entity/vendorExpense/vendorExpenseSelector';
|
|
670
671
|
export { getNumberOfPeriods };
|
|
671
672
|
export { SCHEDULE_DAYS_OF_MONTH, ScheduleDaysOfMonth, toScheduleDaysOfMonth, Day, Month, toMonth, toMonthStrict, Quarter, toQuarter, toQuarterStrict, AbsoluteDay, TimePeriod, };
|
|
672
673
|
export { Tenant, TenantView, LoggedInUser, TenantBaseView, CurrentTenant, TenantProductSettings, getTenantBaseById, getCurrentTenant, getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, getTenantsByCheckInDateSelector, getTenantsBaseByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, toTenantCoreDetailsView, getTenantBaseViewForTenantView, getTenantBaseViewForTenantId, isZeniDomainTenant, isTenantUsingZeniCOA, TenantsBaseOrdered, TenantsOrdered, TenantCoreDetailsView, fetchActiveTenant, fetchAllTenants, updateCurrentTenant, clearAll, doMagicLinkSignIn, verifyDeviceWithTwoFA, resendVerifyDeviceOTP, sendEmailMagicLinkToUser, doSignIn, updateSignInState, DoSignInPayload, doSignOut, sendSessionHeartbeat, resetSignInState, RoleResource, Connection, fetchExcludedResourcesForTenant, fetchExternalConnectionsForTenant, saveExternalConnectionForTenant, deleteConnection, saveAPIKeyConnection, saveConnectorCredentials, saveOAuthConnection, toExternalIntegrationType, toExternalSupportedTool, fetchSubscriptionSummaryForTenant, isTenantBankingOnly, isTenantCardsOnly, isTenantBookkeepingEnabled, isOtherProductsEnabledForTenant, };
|
|
673
|
-
export { Account, AccountType, AccountBase, StatementCloseDay, toAccountType, AccountReport, NestedAccountReport, AccountWithBalanceReport, AccountGroup, AccountGroupReportV2, AccountGroupType, toAccountGroupType, AccountGroupReport, getAccountGroupKey, AccountGroupKey, RecommendedAccountBase, };
|
|
674
|
+
export { Account, AccountType, AccountBase, StatementCloseDay, toAccountType, AccountReport, NestedAccountReport, AccountWithBalanceReport, AccountGroup, AccountGroupReportV2, AccountGroupType, toAccountGroupType, AccountGroupReport, getAccountGroupKey, AccountGroupKey, RecommendedAccountBase, AccountFilterOption, getAllAccounts, getTransactionFilterAccountOptions, };
|
|
674
675
|
export { Class, ClassBase, RecommendedClassBase, } from './entity/class/classState';
|
|
675
|
-
export { getClassById } from './entity/class/classSelector';
|
|
676
|
+
export { ClassFilterOption, getAllClasses, getClassById, getClassFilterOptions, } from './entity/class/classSelector';
|
|
676
677
|
export { ClassReport } from './entity/class/classSelectorTypes';
|
|
677
678
|
export type { Forecast, ForecastType, toForecastType, } from './entity/forecast/forecastState';
|
|
678
679
|
export { getForecast };
|
|
@@ -798,6 +799,7 @@ export { MilageReimbursementLine, OutofPocketReimbursementLine, ReimbursementLin
|
|
|
798
799
|
export { AccountListSelectorView, ClassListSelectorView, getClassList, fetchClassList, ProjectListSelectorView, getProjectList, fetchProjectList, };
|
|
799
800
|
export { BillTab, BillsSubTabType, SaveBillStageCode, BillPayReviewSelectorView, DuplicateBillsSelectorView, EditBillDetailSelectorView, LineItemRecommendationsLocalData, EditBillInitialDetails, BillableStatus, PaymentDetailsSection, BillListReport, BillListDownloadReport, WhatForSection, fetchBillList, fetchBillListPerTab, updateTab, updateSubTab, updateSelectedBillId, updateBillDetailSaveBillCode, fetchVendorByNameAndParseInvoice, saveBillUpdatesToLocalStore, discardBillUpdatesInLocalStore, saveBillDetail, approveOrRejectBill, updateApprovalStatusOnSuccess, deleteBill, cancelAndDeleteBill, retryOrRefundBill, getBillList, getBillDownloadList, BillDetailViewSelector, ActorActivityWithUser, BillActivity, StepWithStatus, getBillDetailView, checkApproveRejectBtnShowForBill, BillDetailView, getBillTransactionDetailKey, fetchBillDetail, fetchEditBillDetailPage, fetchAndUpdateVendorRecommendations, fetchDuplicateBill, clearBillPayReview, EditBillDetail, EditBillDetailViewState, getEditBillDetail, getReviewPageBillDetail, BillDetailLocalData, PaymentDetailsSectionView, fetchBillAndInitializeLocalStore, updateShowAutofill, saveVendorSuccessOrFailure, BillPaymentStatus, BillPaymentStatusCodeType, BillPaymentRefundStatus, BillPaymentRefundStatusCodeType, BillStatus, BillStatusCodeType, BillApprovalType, updateBillListUIState, BillListUIState, BillPayViewSortKey, BillPayFilters, BillPayFilterCategory, BillListViewFilterCategoryField, BILL_PAY_FILTER_CATEGORIES, updateVendorDetailLocalData, resetVendorDetailLocalData, resetVendorSaveStatus, updateContactsInVendorDetailLocalData, updateVendorTabDetailUIState, updateContactsInVendorTabDetailLocalData, updateBillUploadFetchState, updateBillListSearchResult, fetchUserDetails, verifyUser, updateVendorContact, PaymentToOption, toPaymentToOption, convertAmountToHomeCurrency, RecurringBillInstance, RecurringBillConfigLocalData, EditRecurringBillType, fetchVendorAndUpdateBillLocalData, markBillForRetry, updateWithdrawFromAccountId, removeBillFileFromLocalStore, replaceBillFileInLocalStore, updateShouldReplaceBillData, };
|
|
800
801
|
export { SpendManagementFiltersType, SpendManagementFilterEntityType, FilterCategoryType, BillPayFilterCategoryDropdownOption, ReimbursementFilterCategoryDropdownOption, TaskFilterCategoryDropdownOption, SpendManagementFilterCategoryDropdownOption, MatchingOperatorDropdownOption, CategoryCombinationOperator, hideCreatedByFilter, };
|
|
802
|
+
export { TRANSACTION_FILTER_CATEGORIES, TransactionFilterAmountMatchingOperator, TransactionFilterCategory, TransactionFilterCategoryDropdownOption, TransactionFilterCategoryField, TransactionFilterEntityType, TransactionFilters, applyTransactionFilters, };
|
|
801
803
|
export { BillPaySetupViewState, ZeniAccountSetupViewState, BillPaySetupViewLocalData, ZeniAccountSetupViewLocalData, PlaidAccountState, fetchBillPaySetupView, fetchZeniAccountSetupView, enableSetup, getPaymentAccounts, getPlaidLinkToken, updateSelectedCompanyOfficer, updateSetupViewLocalStoreData, updateBusinessVerificationDetails, updatePaymentAccount, updatePaymentAccountLoginStatus, updatePaymentAccountStatus, establishPlaidConnection, updateMappedCashAccount, updatePrimaryFundingAccount, acceptBillPayTerms, acceptZeniAccountTerms, acceptBillPayUpdatedTerms, saveSetupViewDataInLocalStore, saveCompnayOfficerPhoneInLocalStore, saveCompnayOfficerAdditionalDocumentsInLocalStore, saveTreasuryAdditionalDocumentsInLocalStore, saveIndustryAndIncDateInLocalStore, clearSetupViewDataInLocalStore, clearBillPaySetupView, clearZeniAccountSetupView, sendOtp, resendOtp, verifyOtp, CompanyDetails, CompanyOfficersDetails, BillPaySetupView, ZeniAccountSetupView, BillPayBusinessVerificationDetails, ZeniAccountBusinessVerificationDetails, TreasuryBusinessVerificationDetails, SetupViewState, SetupViewLocalData, SetupView, BusinessVerificationDetails, getBillPaySetupViewDetails, getPlaidAccountDetails, getZeniAccountSetupViewDetails, getBusinessVerificationDetails, getBillPayBusinessVerificationDetails, getZeniAccountBusinessVerificationDetails, getTreasuryBusinessVerificationDetails, getCommonSetupViewDetails, PlaidConnectionDetails, PlaidLinkTokenType, PlaidAccountKeyType, Token, FundingAccount, getTwoFactorAuthenticationView, getTwoFactorAuthenticationViewForCardUserOnboarding, getTwoFactorAuthenticationViewForChargeCardHolder, TwoFactorAuthenticationView, };
|
|
802
804
|
export { BankConnectionsSetupView, IntegrationsView, getApprovalRuleViewDetails, getBankConnectionsSetupViewDetails, getIntegrationsView, };
|
|
803
805
|
export { fetchUserFinancialAccount };
|