@zeniai/client-epic-state 5.0.69-betaML8 → 5.0.69-betaRR07
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/epic.d.ts +1 -2
- package/lib/epic.js +1 -2
- package/lib/esm/epic.js +1 -2
- package/lib/esm/index.js +6 -6
- package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +1 -21
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +14 -117
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +0 -31
- package/lib/esm/view/recommendation/recommendationHelper.js +0 -29
- package/lib/esm/view/recommendation/recommendationReducer.js +1 -36
- package/lib/esm/view/transactionDetail/transactionDetailReducer.js +6 -121
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +0 -22
- package/lib/index.d.ts +6 -7
- package/lib/index.js +32 -35
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +0 -1
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -23
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +1 -14
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +14 -117
- package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +0 -2
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +0 -3
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +0 -32
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +0 -1
- package/lib/view/recommendation/recommendationHelper.d.ts +0 -9
- package/lib/view/recommendation/recommendationHelper.js +1 -31
- package/lib/view/recommendation/recommendationReducer.d.ts +1 -18
- package/lib/view/recommendation/recommendationReducer.js +2 -37
- package/lib/view/transactionDetail/transactionDetailReducer.d.ts +1 -11
- package/lib/view/transactionDetail/transactionDetailReducer.js +7 -122
- package/lib/view/transactionDetail/transactionDetailSelector.d.ts +0 -2
- package/lib/view/transactionDetail/transactionDetailSelector.js +1 -24
- package/lib/view/transactionDetail/transactionDetailTypes.d.ts +0 -1
- package/package.json +1 -1
- package/lib/esm/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.js +0 -83
- package/lib/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.d.ts +0 -9
- package/lib/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.js +0 -87
|
@@ -3,7 +3,7 @@ import recordGet from 'lodash/get';
|
|
|
3
3
|
import uniq from 'lodash/uniq';
|
|
4
4
|
import { toMonthYearPeriodId, } from '../../../commonStateTypes/timePeriod';
|
|
5
5
|
import { isVendorTransaction } from '../../../entity/transaction/stateTypes/vendorTransaction';
|
|
6
|
-
import { filterAutoTabLineItems, mergeTabSpecificLineItems, removeTransactionFromTabView, setEntityRecommendationForLineIdInLocalData,
|
|
6
|
+
import { MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, filterAutoTabLineItems, mergeTabSpecificLineItems, removeTransactionFromTabView, setEntityRecommendationForLineIdInLocalData, toSetAllLineItemsToCategoryClass, toTransactionDetailLocalData, } from '../helpers/transactionCategorizationLocalDataHelper';
|
|
7
7
|
import { DEFAULT_COMPLETED_SUB_TAB, } from '../types/completedSubTab';
|
|
8
8
|
export const initialTransactionTabViewState = {
|
|
9
9
|
saveStatus: {
|
|
@@ -420,9 +420,12 @@ const expenseAutomationTransactionsView = createSlice({
|
|
|
420
420
|
const selectedCheckBoxTransactionIds = draft.transactionCategorizationView[selectedTab]
|
|
421
421
|
.selectedCheckBoxTransactionIds;
|
|
422
422
|
if (selectedTransaction != null &&
|
|
423
|
-
|
|
423
|
+
checkIfAllLineItemsAreCategoryClassFilled(selectedTransaction, newTransactionLocalData, uncategorizedAccounts, isUncategorizedExpenseCategoryEnabled, isAccountingClassesEnabled) === true && // check if all line items are filled
|
|
424
|
+
selectedCheckBoxTransactionIds.length < MAX_SELECTION_LIMIT &&
|
|
425
|
+
selectedCheckBoxTransactionIds.includes(transactionId) === false) {
|
|
424
426
|
draft.transactionCategorizationView[selectedTab].selectedCheckBoxTransactionIds = [
|
|
425
|
-
...
|
|
427
|
+
...draft.transactionCategorizationView[selectedTab]
|
|
428
|
+
.selectedCheckBoxTransactionIds,
|
|
426
429
|
transactionId,
|
|
427
430
|
];
|
|
428
431
|
}
|
|
@@ -505,26 +508,9 @@ const expenseAutomationTransactionsView = createSlice({
|
|
|
505
508
|
const transactionLocalData = recordGet(draft.transactionCategorizationView[selectedTab]
|
|
506
509
|
.transactionReviewLocalDataById, transactionId.id, undefined);
|
|
507
510
|
if (transactionLocalData != null) {
|
|
508
|
-
const newLocalData = setEntityRecommendationForLineIdInLocalData(draft.transactionCategorizationView[selectedTab], transaction, transactionLocalData.transactionReviewLocalData, entity, lineIds, uncategorizedAccounts, action.payload.recommendationWithCOTByLineId, isUncategorizedExpenseCategoryEnabled, isAccountingClassesEnabled);
|
|
509
|
-
// Release the per-line fetch flag for every line this fetch
|
|
510
|
-
// covered. Done in-place on the freshly returned local data
|
|
511
|
-
// (the helper produces a new mutable object), before we write
|
|
512
|
-
// it back to the draft.
|
|
513
|
-
lineIds.forEach((lineId) => {
|
|
514
|
-
const lineItem = newLocalData.lineItemById[lineId];
|
|
515
|
-
if (lineItem != null) {
|
|
516
|
-
newLocalData.lineItemById[lineId] = {
|
|
517
|
-
...lineItem,
|
|
518
|
-
categoryClassRecommendationsFetchState: {
|
|
519
|
-
fetchState: 'Completed',
|
|
520
|
-
error: undefined,
|
|
521
|
-
},
|
|
522
|
-
};
|
|
523
|
-
}
|
|
524
|
-
});
|
|
525
511
|
draft.transactionCategorizationView[selectedTab].transactionReviewLocalDataById[transaction.id] = {
|
|
526
512
|
transactionId: transaction.id,
|
|
527
|
-
transactionReviewLocalData:
|
|
513
|
+
transactionReviewLocalData: setEntityRecommendationForLineIdInLocalData(draft.transactionCategorizationView[selectedTab], transaction, transactionLocalData.transactionReviewLocalData, entity, lineIds, uncategorizedAccounts, action.payload.recommendationWithCOTByLineId, isUncategorizedExpenseCategoryEnabled, isAccountingClassesEnabled),
|
|
528
514
|
};
|
|
529
515
|
// Mark transaction as dirty (autofill happened)
|
|
530
516
|
if (!draft.transactionCategorizationView[selectedTab].transactionIdsWithUnsavedData.includes(transaction.id)) {
|
|
@@ -537,99 +523,6 @@ const expenseAutomationTransactionsView = createSlice({
|
|
|
537
523
|
}
|
|
538
524
|
},
|
|
539
525
|
},
|
|
540
|
-
// Start arm of the line-update recommendations fetch. Flips covered
|
|
541
|
-
// lines to In-Progress AND removes the transaction from
|
|
542
|
-
// selectedCheckBoxTransactionIds — the row is unchecked + disabled
|
|
543
|
-
// until either the success arm (recheck if limit allows) or the
|
|
544
|
-
// failure arm releases the per-line flag.
|
|
545
|
-
markCategoryClassRecommendationsInProgressForCategorization: {
|
|
546
|
-
reducer(draft, action) {
|
|
547
|
-
const { selectedTab, transactionId, lineIds } = action.payload;
|
|
548
|
-
const tab = draft.transactionCategorizationView[selectedTab];
|
|
549
|
-
const transactionLocalData = recordGet(tab.transactionReviewLocalDataById, transactionId.id, undefined);
|
|
550
|
-
if (transactionLocalData != null) {
|
|
551
|
-
lineIds.forEach((lineId) => {
|
|
552
|
-
const lineItem = transactionLocalData.transactionReviewLocalData.lineItemById[lineId];
|
|
553
|
-
if (lineItem != null) {
|
|
554
|
-
transactionLocalData.transactionReviewLocalData.lineItemById[lineId] = {
|
|
555
|
-
...lineItem,
|
|
556
|
-
categoryClassRecommendationsFetchState: {
|
|
557
|
-
fetchState: 'In-Progress',
|
|
558
|
-
error: undefined,
|
|
559
|
-
},
|
|
560
|
-
};
|
|
561
|
-
}
|
|
562
|
-
});
|
|
563
|
-
}
|
|
564
|
-
// Uncheck on fetch start: the row's existing category/class are
|
|
565
|
-
// stale after a payee change, so we drop the auto-selection until
|
|
566
|
-
// fresh recommendations land.
|
|
567
|
-
if (tab.selectedCheckBoxTransactionIds.includes(transactionId.id)) {
|
|
568
|
-
tab.selectedCheckBoxTransactionIds =
|
|
569
|
-
tab.selectedCheckBoxTransactionIds.filter((id) => id !== transactionId.id);
|
|
570
|
-
}
|
|
571
|
-
},
|
|
572
|
-
prepare(selectedTab, transactionId, lineIds) {
|
|
573
|
-
return { payload: { selectedTab, transactionId, lineIds } };
|
|
574
|
-
},
|
|
575
|
-
},
|
|
576
|
-
// Completed arm. Used by the epic when the HTTP call succeeds but the
|
|
577
|
-
// server returned no per-line recommendations — we still need to
|
|
578
|
-
// release the In-Progress flag so the skeleton resolves. Successful
|
|
579
|
-
// responses with recommendations go through
|
|
580
|
-
// setEntityRecommendationForLineIdsForCategorization instead (which
|
|
581
|
-
// also flips the lines to Completed).
|
|
582
|
-
markCategoryClassRecommendationsCompletedForCategorization: {
|
|
583
|
-
reducer(draft, action) {
|
|
584
|
-
const { selectedTab, transactionId, lineIds } = action.payload;
|
|
585
|
-
const transactionLocalData = recordGet(draft.transactionCategorizationView[selectedTab]
|
|
586
|
-
.transactionReviewLocalDataById, transactionId.id, undefined);
|
|
587
|
-
if (transactionLocalData != null) {
|
|
588
|
-
lineIds.forEach((lineId) => {
|
|
589
|
-
const lineItem = transactionLocalData.transactionReviewLocalData.lineItemById[lineId];
|
|
590
|
-
if (lineItem != null) {
|
|
591
|
-
transactionLocalData.transactionReviewLocalData.lineItemById[lineId] = {
|
|
592
|
-
...lineItem,
|
|
593
|
-
categoryClassRecommendationsFetchState: {
|
|
594
|
-
fetchState: 'Completed',
|
|
595
|
-
error: undefined,
|
|
596
|
-
},
|
|
597
|
-
};
|
|
598
|
-
}
|
|
599
|
-
});
|
|
600
|
-
}
|
|
601
|
-
},
|
|
602
|
-
prepare(selectedTab, transactionId, lineIds) {
|
|
603
|
-
return { payload: { selectedTab, transactionId, lineIds } };
|
|
604
|
-
},
|
|
605
|
-
},
|
|
606
|
-
// Failure arm. Flips covered lines to Error so the skeleton resolves
|
|
607
|
-
// and downstream UI can react to the failure. The transaction stays
|
|
608
|
-
// unchecked from the start-arm action.
|
|
609
|
-
markCategoryClassRecommendationsFailureForCategorization: {
|
|
610
|
-
reducer(draft, action) {
|
|
611
|
-
const { selectedTab, transactionId, lineIds, error } = action.payload;
|
|
612
|
-
const transactionLocalData = recordGet(draft.transactionCategorizationView[selectedTab]
|
|
613
|
-
.transactionReviewLocalDataById, transactionId.id, undefined);
|
|
614
|
-
if (transactionLocalData != null) {
|
|
615
|
-
lineIds.forEach((lineId) => {
|
|
616
|
-
const lineItem = transactionLocalData.transactionReviewLocalData.lineItemById[lineId];
|
|
617
|
-
if (lineItem != null) {
|
|
618
|
-
transactionLocalData.transactionReviewLocalData.lineItemById[lineId] = {
|
|
619
|
-
...lineItem,
|
|
620
|
-
categoryClassRecommendationsFetchState: {
|
|
621
|
-
fetchState: 'Error',
|
|
622
|
-
error,
|
|
623
|
-
},
|
|
624
|
-
};
|
|
625
|
-
}
|
|
626
|
-
});
|
|
627
|
-
}
|
|
628
|
-
},
|
|
629
|
-
prepare(selectedTab, transactionId, lineIds, error) {
|
|
630
|
-
return { payload: { selectedTab, transactionId, lineIds, error } };
|
|
631
|
-
},
|
|
632
|
-
},
|
|
633
526
|
fetchTransactionCategorizationSuccess(draft, action) {
|
|
634
527
|
const { selectedTab, refreshViewInBackground } = action.payload;
|
|
635
528
|
if (draft.transactionCategorizationView[selectedTab].fetchState ===
|
|
@@ -725,7 +618,9 @@ const expenseAutomationTransactionsView = createSlice({
|
|
|
725
618
|
.selectedCheckBoxTransactionIds;
|
|
726
619
|
if (newTransactionLocalData.customer != null &&
|
|
727
620
|
newTransactionLocalData.customer.id != null &&
|
|
728
|
-
|
|
621
|
+
checkIfAllLineItemsAreCategoryClassFilled(selectedTransaction, newTransactionLocalData, uncategorizedAccounts, isUncategorizedExpenseCategoryEnabled, isAccountingClassesEnabled) === true && // check if all line items are filled
|
|
622
|
+
selectedCheckBoxTransactionIds.length < MAX_SELECTION_LIMIT &&
|
|
623
|
+
selectedCheckBoxTransactionIds.includes(transactionId) === false) {
|
|
729
624
|
draft.transactionCategorizationView[selectedTab].selectedCheckBoxTransactionIds = [
|
|
730
625
|
...selectedCheckBoxTransactionIds,
|
|
731
626
|
transactionId,
|
|
@@ -799,7 +694,9 @@ const expenseAutomationTransactionsView = createSlice({
|
|
|
799
694
|
.selectedCheckBoxTransactionIds;
|
|
800
695
|
if (newTransactionLocalData.vendor != null &&
|
|
801
696
|
newTransactionLocalData.vendor.id != null &&
|
|
802
|
-
|
|
697
|
+
checkIfAllLineItemsAreCategoryClassFilled(selectedTransaction, newTransactionLocalData, uncategorizedAccounts, isUncategorizedExpenseCategoryEnabled, isAccountingClassesEnabled) === true && // check if all line items are filled
|
|
698
|
+
selectedCheckBoxTransactionIds.length < MAX_SELECTION_LIMIT &&
|
|
699
|
+
selectedCheckBoxTransactionIds.includes(transactionId) === false) {
|
|
803
700
|
draft.transactionCategorizationView[selectedTab].selectedCheckBoxTransactionIds = [
|
|
804
701
|
...selectedCheckBoxTransactionIds,
|
|
805
702
|
transactionId,
|
|
@@ -1032,5 +929,5 @@ const expenseAutomationTransactionsView = createSlice({
|
|
|
1032
929
|
},
|
|
1033
930
|
},
|
|
1034
931
|
});
|
|
1035
|
-
export const { fetchTransactionCategorization, updateTransactionCategorizationUIState, initializeTransactionCategorizationViewLocalData, saveTransactionCategorizationLocalData, fetchTransactionCategorizationFailure, saveTransactionCategorization, updateTransactionCategorization, updateCurrentSelectedTransactionCategorizationTab, updateTransactionCategorizationCompletedSubTab, updateTransactionCategorizationSaveStatus, markTransactionAsNotMiscategorized, updateStatusForTransactionNotMiscategorizedUpdateForCategorization, updateSelectedVendorForTransaction, updateSelectedCustomerForTransaction, setAllItemsToCategoryClassInLocalDataForCategorization, updateTotalCountForTransactionCategorization, updateParentTotalCountForTab, fetchTransactionCategorizationSuccess, resetOtherTabsFetchState, fetchTransactionCategorizationView, updateSelectedCheckboxTransactionIds, clearExpenseAutomationTransactionsViewPerTabView, clearExpenseAutomationTransactionsView, setEntityRecommendationForLineIdsForCategorization,
|
|
932
|
+
export const { fetchTransactionCategorization, updateTransactionCategorizationUIState, initializeTransactionCategorizationViewLocalData, saveTransactionCategorizationLocalData, fetchTransactionCategorizationFailure, saveTransactionCategorization, updateTransactionCategorization, updateCurrentSelectedTransactionCategorizationTab, updateTransactionCategorizationCompletedSubTab, updateTransactionCategorizationSaveStatus, markTransactionAsNotMiscategorized, updateStatusForTransactionNotMiscategorizedUpdateForCategorization, updateSelectedVendorForTransaction, updateSelectedCustomerForTransaction, setAllItemsToCategoryClassInLocalDataForCategorization, updateTotalCountForTransactionCategorization, updateParentTotalCountForTab, fetchTransactionCategorizationSuccess, resetOtherTabsFetchState, fetchTransactionCategorizationView, updateSelectedCheckboxTransactionIds, clearExpenseAutomationTransactionsViewPerTabView, clearExpenseAutomationTransactionsView, setEntityRecommendationForLineIdsForCategorization, updateSelectedTransactionId, syncTransactionCategorizationFromDetailSave, backgroundRefetchReviewTab, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess, } = expenseAutomationTransactionsView.actions;
|
|
1036
933
|
export default expenseAutomationTransactionsView.reducer;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createSelector } from '@reduxjs/toolkit';
|
|
2
1
|
import omit from 'lodash/omit';
|
|
3
2
|
import { reduceAllFetchState, reduceAnyFetchState, } from '../../../commonStateTypes/reduceFetchState';
|
|
4
3
|
import { toMonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
@@ -9,32 +8,6 @@ import { getAccountList, getNestedAccountListHierarchy, getUncategorizedAccounts
|
|
|
9
8
|
import { getClassList, getNestedClassListHierarchy, } from '../../classList/classListSelector';
|
|
10
9
|
import { getProjectList } from '../../projectList/projectListSelector';
|
|
11
10
|
import { getAllSteps } from '../selectorTypes/expenseAutomationViewSelectorTypes';
|
|
12
|
-
// Per-transaction "any line is fetching category/class recommendations?"
|
|
13
|
-
// map for the active categorization tab. Memoized on the active tab's
|
|
14
|
-
// transactionReviewLocalDataById reference, so steady state (no fetches
|
|
15
|
-
// in flight) recomputes only when local data changes — and the row-table
|
|
16
|
-
// can read a single map lookup per row instead of re-iterating the
|
|
17
|
-
// row's lineItemById in the render path.
|
|
18
|
-
export const getCategorizationInFlightRecommendationsByTransactionId = createSelector((state) => {
|
|
19
|
-
const view = state.expenseAutomationTransactionsViewState;
|
|
20
|
-
return view.transactionCategorizationView[view.selectedTransactionCategorizationTab]?.transactionReviewLocalDataById;
|
|
21
|
-
}, (transactionReviewLocalDataById) => {
|
|
22
|
-
const result = {};
|
|
23
|
-
if (transactionReviewLocalDataById == null) {
|
|
24
|
-
return result;
|
|
25
|
-
}
|
|
26
|
-
for (const [transactionId, data] of Object.entries(transactionReviewLocalDataById)) {
|
|
27
|
-
const lineItems = Object.values(data.transactionReviewLocalData.lineItemById);
|
|
28
|
-
if (lineItems.some((lineItem) => lineItem.categoryClassRecommendationsFetchState?.fetchState ===
|
|
29
|
-
'In-Progress')) {
|
|
30
|
-
result[transactionId] = true;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return result;
|
|
34
|
-
});
|
|
35
|
-
// Page-level "any line on the active tab is in flight?" flag. Drives the
|
|
36
|
-
// list-page Save disable.
|
|
37
|
-
export const getCategorizationHasInFlightRecommendations = createSelector(getCategorizationInFlightRecommendationsByTransactionId, (inFlightByTransactionId) => Object.keys(inFlightByTransactionId).length > 0);
|
|
38
11
|
export function getExpenseAutomationTransactionView(state) {
|
|
39
12
|
const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState, projectState, projectListState, transactionState, monthEndCloseChecksState, monthEndCloseChecksViewState, } = state;
|
|
40
13
|
const { selectedTransactionCategorizationCompletedSubTab, selectedTransactionCategorizationTab, } = expenseAutomationTransactionsViewState;
|
|
@@ -130,8 +103,6 @@ export function getExpenseAutomationTransactionView(state) {
|
|
|
130
103
|
: [];
|
|
131
104
|
const transactionCompletionStatus = allSteps.find((step) => step.step === 'transaction_categorization')?.completionStatus;
|
|
132
105
|
const completionStatus = transactionCompletionStatus ?? 'incomplete';
|
|
133
|
-
const inFlightCategoryClassRecommendationsByTransactionId = getCategorizationInFlightRecommendationsByTransactionId(state);
|
|
134
|
-
const hasInFlightCategoryClassRecommendations = getCategorizationHasInFlightRecommendations(state);
|
|
135
106
|
return {
|
|
136
107
|
version: 0,
|
|
137
108
|
fetchState: fetchStatus.fetchState,
|
|
@@ -145,8 +116,6 @@ export function getExpenseAutomationTransactionView(state) {
|
|
|
145
116
|
classList: allClasses,
|
|
146
117
|
accountsHierarchyList,
|
|
147
118
|
classHierarchyList,
|
|
148
|
-
hasInFlightCategoryClassRecommendations,
|
|
149
|
-
inFlightCategoryClassRecommendationsByTransactionId,
|
|
150
119
|
isAccountingProjectsEnabled,
|
|
151
120
|
projectList,
|
|
152
121
|
transactionLocalData,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { transformRecommendation, transformRecommendationWithCOT, } from '../../entity/transaction/payloadTypes/transactionPayload';
|
|
2
|
-
import { getActualTransactionID } from '../transactionDetail/transactionDetailState';
|
|
3
2
|
export const getRecommendationFromRecommendationPayload = (payload) => {
|
|
4
3
|
if (payload == null || payload.length === 0) {
|
|
5
4
|
return undefined;
|
|
@@ -38,34 +37,6 @@ export const getRecommendationWithCOTFromRecommendationPayloadWithCOT = (payload
|
|
|
38
37
|
});
|
|
39
38
|
return recommendations;
|
|
40
39
|
};
|
|
41
|
-
// Pluralized URL segment for entity types. Mirrors the legacy
|
|
42
|
-
// fetchEntityRecommendationsByTransactionIdEpic.toEntityTypeURL.
|
|
43
|
-
const toEntityTypeUrlSegment = (entityType) => `${entityType}s`;
|
|
44
|
-
// Build the recommendations URL for a single entity + transaction target.
|
|
45
|
-
// Centralizes the URL shape so the legacy
|
|
46
|
-
// fetchEntityRecommendationsByTransactionIdEpic and the new
|
|
47
|
-
// fetchEntityRecommendationsForLineUpdateEpic stay in lockstep.
|
|
48
|
-
export const buildRecommendationUrl = (accountMicroServiceBaseUrl, entity, amount, transactionDetails, isFetchCOT) => {
|
|
49
|
-
const entityQuery = {
|
|
50
|
-
entity_name: entity.name,
|
|
51
|
-
entity_type: entity.type,
|
|
52
|
-
};
|
|
53
|
-
// Entity-id-null case: server expects entity_name / entity_type query
|
|
54
|
-
// instead of the {entityType}/{qboId}/recommendations path.
|
|
55
|
-
if (entity.qboId === entity.name) {
|
|
56
|
-
return `${accountMicroServiceBaseUrl}/1.0/recommendations?query=${encodeURIComponent(JSON.stringify(entityQuery))}`;
|
|
57
|
-
}
|
|
58
|
-
const query = {
|
|
59
|
-
amount,
|
|
60
|
-
transaction_id: getActualTransactionID(transactionDetails.transactionId.id),
|
|
61
|
-
transaction_type: transactionDetails.transaction.type,
|
|
62
|
-
line_ids: transactionDetails.lineIds,
|
|
63
|
-
};
|
|
64
|
-
if (isFetchCOT === true) {
|
|
65
|
-
query.include_cot = true;
|
|
66
|
-
}
|
|
67
|
-
return `${accountMicroServiceBaseUrl}/1.0/${toEntityTypeUrlSegment(entity.type)}/${entity.qboId}/recommendations?query=${encodeURIComponent(JSON.stringify(query))}`;
|
|
68
|
-
};
|
|
69
40
|
export const getRecommendationByLineIdWithCOTFromRecommendationPayloadWithCOT = (recommendationPayload, lineIds) => {
|
|
70
41
|
if (recommendationPayload.length === 0) {
|
|
71
42
|
return undefined;
|
|
@@ -33,41 +33,6 @@ const recommendation = createSlice({
|
|
|
33
33
|
};
|
|
34
34
|
},
|
|
35
35
|
},
|
|
36
|
-
// Targeted recommendations fetch fired when the user changes the
|
|
37
|
-
// payee/customer on a single transaction line (or the JE sibling set
|
|
38
|
-
// for that change). Routed by `fetchEntityRecommendationsForLineUpdateEpic`
|
|
39
|
-
// which uses groupBy + switchMap to keep fetches for distinct targets
|
|
40
|
-
// running in parallel while same-target re-fetches still cancel each
|
|
41
|
-
// other. The flowType discriminator selects the categorization vs
|
|
42
|
-
// detail slice for the per-line In-Progress / Completed / Error state.
|
|
43
|
-
fetchEntityRecommendationsForLineUpdate: {
|
|
44
|
-
reducer(draft, action) {
|
|
45
|
-
const { entity } = action.payload;
|
|
46
|
-
const key = getEntityRecommendationKey(entity.type, entity.id);
|
|
47
|
-
// Unconditional flip to In-Progress; the previous variant only
|
|
48
|
-
// seeded when missing, which left stale fetchStates when a prior
|
|
49
|
-
// fetch had already populated the entity entry.
|
|
50
|
-
draft.recommendationByEntity[key] = {
|
|
51
|
-
...(draft.recommendationByEntity[key] ??
|
|
52
|
-
initialEntityRecommendationState),
|
|
53
|
-
fetchState: 'In-Progress',
|
|
54
|
-
error: undefined,
|
|
55
|
-
};
|
|
56
|
-
},
|
|
57
|
-
prepare(entity, amount, transactionDetails, flowType, selectedTab, isFetchCOT = false, isUncategorizedExpenseCategoryEnabled) {
|
|
58
|
-
return {
|
|
59
|
-
payload: {
|
|
60
|
-
entity,
|
|
61
|
-
amount,
|
|
62
|
-
transactionDetails,
|
|
63
|
-
flowType,
|
|
64
|
-
selectedTab,
|
|
65
|
-
isFetchCOT,
|
|
66
|
-
isUncategorizedExpenseCategoryEnabled,
|
|
67
|
-
},
|
|
68
|
-
};
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
36
|
fetchRecommendationByEntityName: {
|
|
72
37
|
reducer(draft, action) {
|
|
73
38
|
const { entityName, entityType } = action.payload;
|
|
@@ -146,7 +111,7 @@ const recommendation = createSlice({
|
|
|
146
111
|
},
|
|
147
112
|
},
|
|
148
113
|
});
|
|
149
|
-
export const { fetchEntityRecommendationsByTransactionId,
|
|
114
|
+
export const { fetchEntityRecommendationsByTransactionId, fetchRecommendationByEntityName, fetchRecommendationByEntityId, updateRecommendationForEntity, updateRecommendationForEntityFailure, indicateReadyToInitializeRecommendation, clearRecommendation, } = recommendation.actions;
|
|
150
115
|
export default recommendation.reducer;
|
|
151
116
|
const doUpdateRecommendationForEntity = (draft, entityId, entityType, payload) => {
|
|
152
117
|
const key = getEntityRecommendationKey(entityType, entityId);
|
|
@@ -238,34 +238,12 @@ const transactionDetail = createSlice({
|
|
|
238
238
|
saveTransactionDetailLocalData(draft, action) {
|
|
239
239
|
const key = getTransactionDetailKey(action.payload.transactionId);
|
|
240
240
|
const detail = recordGet(draft.transactionDetailById, key, undefined);
|
|
241
|
-
if (detail
|
|
242
|
-
|
|
241
|
+
if (detail != null) {
|
|
242
|
+
draft.transactionDetailById[key] = {
|
|
243
|
+
...detail,
|
|
244
|
+
transactionDetailLocalData: action.payload.transactionLocalData,
|
|
245
|
+
};
|
|
243
246
|
}
|
|
244
|
-
const incoming = action.payload.transactionLocalData;
|
|
245
|
-
const prevById = detail.transactionDetailLocalData.lineItemById;
|
|
246
|
-
// Per-line `categoryClassRecommendationsFetchState` is owned by the
|
|
247
|
-
// recommendation epic/reducers (markInProgress / markCompleted /
|
|
248
|
-
// markFailure / setEntityRecommendationForLineIdsForTransactionDetail).
|
|
249
|
-
// Callers that rebuild `transactionLocalData` from a UI snapshot will
|
|
250
|
-
// typically have an out-of-date copy of this field (e.g. payee-change
|
|
251
|
-
// captures the snapshot before the epic's start arm runs and would
|
|
252
|
-
// otherwise clobber In-Progress back to undefined). Treat the field as
|
|
253
|
-
// sticky: only let the caller override it when they explicitly set it.
|
|
254
|
-
const mergedLineItemById = {};
|
|
255
|
-
Object.entries(incoming.lineItemById ?? {}).forEach(([lineId, line]) => {
|
|
256
|
-
mergedLineItemById[lineId] = {
|
|
257
|
-
...line,
|
|
258
|
-
categoryClassRecommendationsFetchState: line.categoryClassRecommendationsFetchState ??
|
|
259
|
-
prevById?.[lineId]?.categoryClassRecommendationsFetchState,
|
|
260
|
-
};
|
|
261
|
-
});
|
|
262
|
-
draft.transactionDetailById[key] = {
|
|
263
|
-
...detail,
|
|
264
|
-
transactionDetailLocalData: {
|
|
265
|
-
...incoming,
|
|
266
|
-
lineItemById: mergedLineItemById,
|
|
267
|
-
},
|
|
268
|
-
};
|
|
269
247
|
},
|
|
270
248
|
saveTransactionDetail(draft, action) {
|
|
271
249
|
const key = getTransactionDetailKey(action.payload.transactionId);
|
|
@@ -387,21 +365,6 @@ const transactionDetail = createSlice({
|
|
|
387
365
|
const detail = recordGet(draft.transactionDetailById, key, undefined);
|
|
388
366
|
if (detail != null) {
|
|
389
367
|
const newLocalData = setEntityRecommendationForLineIdInLocalData(transaction, detail.transactionDetailLocalData, action.payload.entity, lineIds, uncategorizedIncomeExpense, recommendationWithCOTByLineId);
|
|
390
|
-
// Release the per-line fetch flag for every line this fetch
|
|
391
|
-
// covered so the inline skeleton resolves and the page-level
|
|
392
|
-
// Save button can re-enable.
|
|
393
|
-
lineIds.forEach((lineId) => {
|
|
394
|
-
const lineItem = newLocalData.lineItemById[lineId];
|
|
395
|
-
if (lineItem != null) {
|
|
396
|
-
newLocalData.lineItemById[lineId] = {
|
|
397
|
-
...lineItem,
|
|
398
|
-
categoryClassRecommendationsFetchState: {
|
|
399
|
-
fetchState: 'Completed',
|
|
400
|
-
error: undefined,
|
|
401
|
-
},
|
|
402
|
-
};
|
|
403
|
-
}
|
|
404
|
-
});
|
|
405
368
|
draft.transactionDetailById[key] = {
|
|
406
369
|
...detail,
|
|
407
370
|
transactionDetailLocalData: newLocalData,
|
|
@@ -422,84 +385,6 @@ const transactionDetail = createSlice({
|
|
|
422
385
|
};
|
|
423
386
|
},
|
|
424
387
|
},
|
|
425
|
-
// Start arm of the line-update recommendations fetch for the detail
|
|
426
|
-
// page. Flips covered lines to In-Progress; detail page has no
|
|
427
|
-
// checkbox, so no auto-uncheck side effect.
|
|
428
|
-
markCategoryClassRecommendationsInProgressForTransactionDetail: {
|
|
429
|
-
reducer(draft, action) {
|
|
430
|
-
const { transactionId, lineIds } = action.payload;
|
|
431
|
-
const key = getTransactionDetailKey(transactionId);
|
|
432
|
-
const detail = recordGet(draft.transactionDetailById, key, undefined);
|
|
433
|
-
if (detail != null) {
|
|
434
|
-
lineIds.forEach((lineId) => {
|
|
435
|
-
const lineItem = detail.transactionDetailLocalData.lineItemById[lineId];
|
|
436
|
-
if (lineItem != null) {
|
|
437
|
-
detail.transactionDetailLocalData.lineItemById[lineId] = {
|
|
438
|
-
...lineItem,
|
|
439
|
-
categoryClassRecommendationsFetchState: {
|
|
440
|
-
fetchState: 'In-Progress',
|
|
441
|
-
error: undefined,
|
|
442
|
-
},
|
|
443
|
-
};
|
|
444
|
-
}
|
|
445
|
-
});
|
|
446
|
-
}
|
|
447
|
-
},
|
|
448
|
-
prepare(transactionId, lineIds) {
|
|
449
|
-
return { payload: { transactionId, lineIds } };
|
|
450
|
-
},
|
|
451
|
-
},
|
|
452
|
-
// Completed arm. Used when the HTTP call succeeded but the server
|
|
453
|
-
// returned no per-line recommendations — still need to release the
|
|
454
|
-
// In-Progress flag.
|
|
455
|
-
markCategoryClassRecommendationsCompletedForTransactionDetail: {
|
|
456
|
-
reducer(draft, action) {
|
|
457
|
-
const { transactionId, lineIds } = action.payload;
|
|
458
|
-
const key = getTransactionDetailKey(transactionId);
|
|
459
|
-
const detail = recordGet(draft.transactionDetailById, key, undefined);
|
|
460
|
-
if (detail != null) {
|
|
461
|
-
lineIds.forEach((lineId) => {
|
|
462
|
-
const lineItem = detail.transactionDetailLocalData.lineItemById[lineId];
|
|
463
|
-
if (lineItem != null) {
|
|
464
|
-
detail.transactionDetailLocalData.lineItemById[lineId] = {
|
|
465
|
-
...lineItem,
|
|
466
|
-
categoryClassRecommendationsFetchState: {
|
|
467
|
-
fetchState: 'Completed',
|
|
468
|
-
error: undefined,
|
|
469
|
-
},
|
|
470
|
-
};
|
|
471
|
-
}
|
|
472
|
-
});
|
|
473
|
-
}
|
|
474
|
-
},
|
|
475
|
-
prepare(transactionId, lineIds) {
|
|
476
|
-
return { payload: { transactionId, lineIds } };
|
|
477
|
-
},
|
|
478
|
-
},
|
|
479
|
-
markCategoryClassRecommendationsFailureForTransactionDetail: {
|
|
480
|
-
reducer(draft, action) {
|
|
481
|
-
const { transactionId, lineIds, error } = action.payload;
|
|
482
|
-
const key = getTransactionDetailKey(transactionId);
|
|
483
|
-
const detail = recordGet(draft.transactionDetailById, key, undefined);
|
|
484
|
-
if (detail != null) {
|
|
485
|
-
lineIds.forEach((lineId) => {
|
|
486
|
-
const lineItem = detail.transactionDetailLocalData.lineItemById[lineId];
|
|
487
|
-
if (lineItem != null) {
|
|
488
|
-
detail.transactionDetailLocalData.lineItemById[lineId] = {
|
|
489
|
-
...lineItem,
|
|
490
|
-
categoryClassRecommendationsFetchState: {
|
|
491
|
-
fetchState: 'Error',
|
|
492
|
-
error,
|
|
493
|
-
},
|
|
494
|
-
};
|
|
495
|
-
}
|
|
496
|
-
});
|
|
497
|
-
}
|
|
498
|
-
},
|
|
499
|
-
prepare(transactionId, lineIds, error) {
|
|
500
|
-
return { payload: { transactionId, lineIds, error } };
|
|
501
|
-
},
|
|
502
|
-
},
|
|
503
388
|
removeEntityRecommendationForLineIdForTransactionDetail: {
|
|
504
389
|
reducer(draft, action) {
|
|
505
390
|
const { transaction, lineId } = action.payload;
|
|
@@ -771,7 +656,7 @@ const transactionDetail = createSlice({
|
|
|
771
656
|
},
|
|
772
657
|
},
|
|
773
658
|
});
|
|
774
|
-
export const { downloadAccountingProviderAttachment, downloadAccountingProviderAttachmentSuccess, downloadAccountingProviderAttachmentFailure, fetchTransactionDetail, updateTransactionDetailFetchState, removeTransactionDetail, clearTransactionDetail, uploadMissingAttachmentSuccess, updateTransactionDetail, updateTransactionDetailSaveStatus, clearTransactionDetailSaveStatus, markTransactionAsNotMiscategorized, deleteTransactionAttachment, deleteTransactionAttachmentFailure, deleteTransactionAttachmentSuccess, updateStatusForTransactionNotMiscategorizedUpdate, updateStatusConsolidatedSaveTransactionDetail, updateTransactionStateIfUpdateActionNotAllowed, saveTransactionDetail, initializeTransactionDetailLocalData, saveTransactionDetailLocalData, clearTransactionDetailLocalData, resetLineItemsCategoryClassInLocalData, setAllLineItemsToCategoryClassInLocalData, setAllLineItemsLocalDataIsUpdateAllChecked, setEntityRecommendationForLineIdsForTransactionDetail,
|
|
659
|
+
export const { downloadAccountingProviderAttachment, downloadAccountingProviderAttachmentSuccess, downloadAccountingProviderAttachmentFailure, fetchTransactionDetail, updateTransactionDetailFetchState, removeTransactionDetail, clearTransactionDetail, uploadMissingAttachmentSuccess, updateTransactionDetail, updateTransactionDetailSaveStatus, clearTransactionDetailSaveStatus, markTransactionAsNotMiscategorized, deleteTransactionAttachment, deleteTransactionAttachmentFailure, deleteTransactionAttachmentSuccess, updateStatusForTransactionNotMiscategorizedUpdate, updateStatusConsolidatedSaveTransactionDetail, updateTransactionStateIfUpdateActionNotAllowed, saveTransactionDetail, initializeTransactionDetailLocalData, saveTransactionDetailLocalData, clearTransactionDetailLocalData, resetLineItemsCategoryClassInLocalData, setAllLineItemsToCategoryClassInLocalData, setAllLineItemsLocalDataIsUpdateAllChecked, setEntityRecommendationForLineIdsForTransactionDetail, removeEntityRecommendationForLineIdForTransactionDetail, updateSelectedVendor, updateSelectedCustomer, resetVendor, resetSelectedCustomer, updateLocalDataWithTransactionsUpdateWithVendorCheckbox, updateVendorToAllLineItems, resetAllLineItemsToVendor, updateLatestSelectedEntity, updateVendorBulkRecommendationsFetchStatus, setIsVendorUpdateAllChecked, } = transactionDetail.actions;
|
|
775
660
|
export default transactionDetail.reducer;
|
|
776
661
|
function getUpdatedEntityLocalData(detail, updates, entity, resetRecommendations, type) {
|
|
777
662
|
const key = type === 'customer' ? 'customerUpdates' : 'vendorUpdates';
|
|
@@ -10,26 +10,6 @@ import { getAccountList, getNestedAccountListHierarchy, } from '../accountList/a
|
|
|
10
10
|
import { getClassList, getNestedClassListHierarchy, } from '../classList/classListSelector';
|
|
11
11
|
import { getProjectList, } from '../projectList/projectListSelector';
|
|
12
12
|
import { getAllLinkedTransactions, getTransactionDetailKey, initialSupportedTransactionDetail, } from './transactionDetailState';
|
|
13
|
-
// "Any line on this transaction is fetching category/class recommendations?"
|
|
14
|
-
// Inlined as a plain function because the upstream selector
|
|
15
|
-
// `getTransactionDetail` is also un-memoized and the iteration is O(lines)
|
|
16
|
-
// — typically <10. Exported standalone so consumers that only need the
|
|
17
|
-
// flag (e.g. footer save-disable) can avoid materializing the whole
|
|
18
|
-
// detail report.
|
|
19
|
-
export const getDetailInFlightRecommendations = (state, transactionId) => {
|
|
20
|
-
const detailKey = getTransactionDetailKey(transactionId);
|
|
21
|
-
const detail = recordGet(state.transactionDetailState.transactionDetailById, detailKey, undefined);
|
|
22
|
-
if (detail == null) {
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
for (const lineItem of Object.values(detail.transactionDetailLocalData.lineItemById)) {
|
|
26
|
-
if (lineItem.categoryClassRecommendationsFetchState?.fetchState ===
|
|
27
|
-
'In-Progress') {
|
|
28
|
-
return true;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return false;
|
|
32
|
-
};
|
|
33
13
|
export const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = true) => {
|
|
34
14
|
const { transactionDetailState, transactionState, vendorState, vendorListState, accountState, classState, classListState, accountListState, projectState, projectListState, } = state;
|
|
35
15
|
const detailKey = getTransactionDetailKey(transactionId);
|
|
@@ -98,7 +78,6 @@ export const getTransactionDetail = (state, transactionId, fetchLinkedTransactio
|
|
|
98
78
|
: [];
|
|
99
79
|
const transactionDetailAnyUpdateStatus = reduceUpdateFetchStates(transactionDetail);
|
|
100
80
|
const vendors = getVendorsByVendorIds(vendorState, vendorListState.vendorIds);
|
|
101
|
-
const hasInFlightCategoryClassRecommendations = getDetailInFlightRecommendations(state, transactionId);
|
|
102
81
|
return {
|
|
103
82
|
reportId: 'transaction_detail',
|
|
104
83
|
reportTitle: 'Transaction Detail',
|
|
@@ -114,7 +93,6 @@ export const getTransactionDetail = (state, transactionId, fetchLinkedTransactio
|
|
|
114
93
|
classHierarchyList,
|
|
115
94
|
accountsHierarchyList,
|
|
116
95
|
classList: classList,
|
|
117
|
-
hasInFlightCategoryClassRecommendations,
|
|
118
96
|
isAccountingClassesEnabled,
|
|
119
97
|
isAccountingProjectsEnabled,
|
|
120
98
|
projectList,
|
package/lib/index.d.ts
CHANGED
|
@@ -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,
|
|
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';
|
|
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';
|
|
@@ -371,7 +371,7 @@ import { ProfitAndLossProjectViewReport } from './view/profitAndLossProjectView/
|
|
|
371
371
|
import { ProfitAndLossProjectViewUIState } from './view/profitAndLossProjectView/profitAndLossProjectViewState';
|
|
372
372
|
import { fetchProjectList } from './view/projectList/projectListReducer';
|
|
373
373
|
import { ProjectListSelectorView, getProjectList } from './view/projectList/projectListSelector';
|
|
374
|
-
import { fetchEntityRecommendationsByTransactionId,
|
|
374
|
+
import { fetchEntityRecommendationsByTransactionId, fetchRecommendationByEntityId, fetchRecommendationByEntityName } from './view/recommendation/recommendationReducer';
|
|
375
375
|
import { clearReferrals, fetchReferrals, fetchRewardsPlan, resendReferralInvite, saveReferralFormDataInLocalStore, sendReferralInvite, updateReferViewed, updateReferralListSortUiState } from './view/referralView/referralReducer';
|
|
376
376
|
import { ReferralListSelectorView, RewardsPlanCardReport, getInviteFormView, getReferralListView, getRewardsPlanCard } from './view/referralView/referralSelector';
|
|
377
377
|
import { AmountStatusTypes, InviteCompanyLocalData, ReferralAmountStatus, ReferralInvitation, ReferralListViewSortKey, ReferralStatus, ReferralViewState, ReferralViewUIState, RewardsPlanData, StatusTypes, toReferralListViewSortKeyType } from './view/referralView/referralState';
|
|
@@ -569,7 +569,7 @@ import { TopExAccount, TopExReport, TopExTimePeriodWithMetaData, TopExpenses } f
|
|
|
569
569
|
import { TOP_EX_TIME_PERIODS, TopExTimePeriod, TopExpense } from './view/topEx/topExState';
|
|
570
570
|
import { AccountingProviderAttachmentSelector, getAccountingProviderAttachment } from './view/transactionDetail/getAccountingProviderAttachmentSelector';
|
|
571
571
|
import { getChangedLineItemCountFromLocalData, isAccountUncategorized } from './view/transactionDetail/transactionDetailLocalDataHelper';
|
|
572
|
-
import { clearTransactionDetailSaveStatus, deleteTransactionAttachment, downloadAccountingProviderAttachment, downloadAccountingProviderAttachmentFailure, downloadAccountingProviderAttachmentSuccess, fetchTransactionDetail, initializeTransactionDetailLocalData,
|
|
572
|
+
import { clearTransactionDetailSaveStatus, deleteTransactionAttachment, downloadAccountingProviderAttachment, downloadAccountingProviderAttachmentFailure, downloadAccountingProviderAttachmentSuccess, fetchTransactionDetail, initializeTransactionDetailLocalData, removeEntityRecommendationForLineIdForTransactionDetail, resetAllLineItemsToVendor, resetLineItemsCategoryClassInLocalData, resetSelectedCustomer, resetVendor, saveTransactionDetail, saveTransactionDetailLocalData, setAllLineItemsLocalDataIsUpdateAllChecked, setAllLineItemsToCategoryClassInLocalData, setIsVendorUpdateAllChecked, updateLatestSelectedEntity, updateLocalDataWithTransactionsUpdateWithVendorCheckbox, updateSelectedCustomer, updateSelectedVendor, updateTransactionDetail, updateVendorBulkRecommendationsFetchStatus, updateVendorToAllLineItems, uploadMissingAttachmentSuccess } from './view/transactionDetail/transactionDetailReducer';
|
|
573
573
|
import { TransactionDetailReport, VendorDetailsView, getInitialUpdatablePeriodsForTransactionRecommendations, getTransactionDetail, getTransactionDetailForTransaction } from './view/transactionDetail/transactionDetailSelector';
|
|
574
574
|
import { TransactionUpdates, getThirdPartyIdFromTransactionId } from './view/transactionDetail/transactionDetailState';
|
|
575
575
|
import { TransactionDetailLineItemData, TransactionDetailLocalData, TransactionVendorUpdates } from './view/transactionDetail/transactionDetailTypes';
|
|
@@ -663,7 +663,7 @@ export { fetchMonthEndCloseChecks, fetchMonthClosePerformanceTrend, MonthClosePe
|
|
|
663
663
|
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
664
|
export { JEScheduleLocalData };
|
|
665
665
|
export { ExpenseAutomationJESchedulesViewSelector, JEAccountSettingsView, JEScheduledTransactionWithFailedEntries, };
|
|
666
|
-
export { fetchTransactionCategorization, fetchTransactionCategorizationView, updateTransactionCategorizationUIState, updateSelectedCheckboxTransactionIds,
|
|
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
667
|
export { TopExpense, TopExTimePeriod, TOP_EX_TIME_PERIODS };
|
|
668
668
|
export { TimeframeTick, TimeframeTickWithMetaData, toTimeframeTick, mapTimePeriodtoTimeframeTick, toTimePeriod, toAbsoluteDay, toMonthYearPeriodId, convertToPeriod, MonthYearPeriod, };
|
|
669
669
|
export { VendorSpendTrendFilterTabType, toVendorSpendTrendFilterTabsTypeStrict, } from './entity/vendorExpense/vendorExpenseSelector';
|
|
@@ -728,7 +728,7 @@ export { MatchedTransaction };
|
|
|
728
728
|
export { SupportedTransaction, SupportedTransactionWithCOT, SupportedTransactionPayload, getSupportedTransactionById, };
|
|
729
729
|
export { clearTransactionList, updateLatestTransactionId, parallelFetchAccountTransactionList, parallelFetchEntityTransactionList, fetchAccountTransactionList, updateTransactionListByAccount, updateTransactionListByAccountFailure, updateTransactionListByAccountUIState, parallelFetchClassTransactionList, updateTransactionListByClassUIState, updateTransactionListByClass, parallelFetchProjectTransactionList, updateTransactionListByProjectUIState, updateTransactionListByProject, updateTransactionListUIStateByCategoryType, parallelFetchTransactionListByCategoryType, };
|
|
730
730
|
export { TransactionListByAccountReport, getTransactionListByAccount, getTransactionListUIStateByAccountKey, };
|
|
731
|
-
export { fetchEntityTransactionList, updateTransactionListByEntity, saveTransactionDetailLocalData, clearTransactionDetailSaveStatus, updateTransactionListByEntityFailure, resetLineItemsCategoryClassInLocalData, setAllLineItemsToCategoryClassInLocalData, saveTransactionDetail, setAllLineItemsLocalDataIsUpdateAllChecked, initializeTransactionDetailLocalData,
|
|
731
|
+
export { fetchEntityTransactionList, updateTransactionListByEntity, saveTransactionDetailLocalData, clearTransactionDetailSaveStatus, updateTransactionListByEntityFailure, resetLineItemsCategoryClassInLocalData, setAllLineItemsToCategoryClassInLocalData, saveTransactionDetail, setAllLineItemsLocalDataIsUpdateAllChecked, initializeTransactionDetailLocalData, removeEntityRecommendationForLineIdForTransactionDetail, updateSelectedVendor, updateSelectedCustomer, resetSelectedCustomer, resetVendor, updateLocalDataWithTransactionsUpdateWithVendorCheckbox, updateVendorToAllLineItems, resetAllLineItemsToVendor, updateLatestSelectedEntity, updateVendorBulkRecommendationsFetchStatus, setIsVendorUpdateAllChecked, };
|
|
732
732
|
export { TransactionUpdates, downloadAccountingProviderAttachment, downloadAccountingProviderAttachmentSuccess, downloadAccountingProviderAttachmentFailure, fetchTransactionDetail, updateTransactionDetail, uploadMissingAttachmentSuccess, deleteTransactionAttachment, getThirdPartyIdFromTransactionId, };
|
|
733
733
|
export { TransactionListByEntityView, getTransactionListByEntity };
|
|
734
734
|
export { TransactionListByClassReport, getTransactionListByClass, getTransactionListUIStateByClassKey, TransactionListByProjectReport, getTransactionListByProject, getTransactionListUIStateByProjectKey, getTransactionListByEntityForSinglePeriod, };
|
|
@@ -836,8 +836,7 @@ export { Filing1099TinType };
|
|
|
836
836
|
export { BillPayCardReport };
|
|
837
837
|
export { ReimbursementCardReport };
|
|
838
838
|
export { VendorListViewSortKey, VendorViewUIState, VendorListSelectorView, VendorListQuery, getVendorList, VendorListView, updateSortUiState, updatePageToken, updateYTDSelectionUIState, VendorListViewYTDSpendSortKey, isColumnYTDSpend, isVendorsTabVisible, VendorViewType, VendorReportIDType, toVendorReportIDType, VendorFiling1099ListSelectorView, getVendorFiling1099List, VendorFiling1099ListViewSortKey, VendorFiling1099ViewUIState, VendorFiling1099DownloadData, fetchVendorsFiling1099Download, Type1099Download, VendorFiling1099DownloadDataForType, };
|
|
839
|
-
export { fetchEntityRecommendationsByTransactionId,
|
|
840
|
-
export type { RecommendationLineUpdateFlowType } from './view/recommendation/recommendationReducer';
|
|
839
|
+
export { fetchEntityRecommendationsByTransactionId, fetchRecommendationByEntityId, fetchRecommendationByEntityName, };
|
|
841
840
|
export { fetchOwnerList };
|
|
842
841
|
export { ZeniAccountsConfigSelectorView, getZeniAccountsConfigDetail, ZeniAccountListSelectorView, getZeniAccountList, fetchZeniAccountList, fetchAccountList, DepositAccount, createCheckingAccount, fetchPaymentAccountList, unlinkPaymentAccount, getDepositAccountDetail, DepositAccountDetailSelectorView, DepositAccountListSelectorView, getAllDepositAccounts, getDepositAccountDetailForPDF, DepositAccountDetailForPDF, fetchDepositAccount, fetchZeniAccountsConfig, AccountHistoryWithBalances, TransferDetailLocalData, ReviewTransferDetail, updateTransferMoneyLocalData, updateTransferToLocalData, updateDepositToLocalData, transferMoney, getTransferDetail, TransferDetailSelectorView, clearTransferDetail, clearReviewTransferDetail, fetchReviewTransferDetail, fetchDepositAccountDetail, DepositAccountTransaction, DepositAccountWithAutoTransferRules, DepositTransactionStatusCode, DepositTransactionStatus, CheckDepositLocalData, depositCheck, updateCheckDepositLocalData, clearCheckDeposit, CheckDepositSelectorView, getCheckDepositDetail, updateDepositAccount, fetchDepositAccountHistorySuccess, fetchDepositAccountHistoryFailure, DepositAccountUpdateType, ZeniAccountSummaryWithBalance, fetchZeniAccStatementPage, getZeniAccStatements, ZeniAccStatementsSelectorView, ZeniAccountPaymentMethod, };
|
|
843
842
|
export { CommonHistoryView, HistoricEvent, HistoricEventUpdate, ActivityHistorySelectorView, };
|