@zeniai/client-epic-state 5.0.79 → 5.0.80
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/coreEpics.js +1 -1
- package/lib/entity/account/accountSelector.d.ts +1 -27
- package/lib/entity/account/accountSelector.js +1 -47
- package/lib/entity/account/accountState.d.ts +1 -6
- package/lib/entity/account/accountState.js +4 -11
- package/lib/entity/account/subAccountSelector.d.ts +1 -1
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +3 -1
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +2 -1
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.d.ts +1 -1
- package/lib/entity/chargeCard/chargeCardReducer.d.ts +2 -19
- package/lib/entity/chargeCard/chargeCardReducer.js +2 -35
- package/lib/entity/chargeCardTransaction/chargeCardTransactionReducer.d.ts +1 -14
- package/lib/entity/chargeCardTransaction/chargeCardTransactionReducer.js +2 -36
- package/lib/entity/class/classSelector.d.ts +0 -35
- package/lib/entity/class/classSelector.js +0 -50
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +1 -1
- package/lib/entity/sectionProjectView/sectionProjectViewSelector.js +1 -1
- package/lib/entity/tenant/SessionManager.js +3 -6
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -2
- package/lib/entity/tenant/clearAllEpic.js +2 -2
- package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.js +2 -6
- package/lib/entity/tenant/epic/saveOAuthConnectionEpic.js +2 -6
- package/lib/entity/tenant/tenantReducer.js +1 -6
- package/lib/entity/transaction/payloadTypes/transactionLinePayload.js +1 -3
- package/lib/epic.d.ts +11 -11
- package/lib/epic.js +12 -12
- package/lib/esm/coreEpics.js +1 -1
- package/lib/esm/entity/account/accountSelector.js +1 -46
- package/lib/esm/entity/account/accountState.js +1 -7
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +3 -1
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +2 -1
- package/lib/esm/entity/chargeCard/chargeCardReducer.js +1 -34
- package/lib/esm/entity/chargeCardTransaction/chargeCardTransactionReducer.js +1 -35
- package/lib/esm/entity/class/classSelector.js +0 -48
- package/lib/esm/entity/sectionProjectView/sectionProjectViewSelector.js +1 -1
- package/lib/esm/entity/tenant/SessionManager.js +1 -4
- package/lib/esm/entity/tenant/clearAllEpic.js +2 -2
- package/lib/esm/entity/tenant/epic/saveAPIKeyConnectionEpic.js +2 -6
- package/lib/esm/entity/tenant/epic/saveOAuthConnectionEpic.js +2 -6
- package/lib/esm/entity/tenant/tenantReducer.js +1 -6
- package/lib/esm/entity/transaction/payloadTypes/transactionLinePayload.js +1 -3
- package/lib/esm/epic.js +12 -12
- package/lib/esm/index.js +21 -31
- package/lib/esm/reducer.js +2 -2
- package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +5 -2
- package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +5 -2
- package/lib/esm/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +1 -4
- package/lib/esm/view/companyHealthMetricView/companyHealthMetricViewSelector.js +1 -1
- package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +1 -1
- package/lib/esm/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.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/creditAgentView/creditAgentViewReducer.js +16 -1
- package/lib/esm/view/creditAgentView/epics/fetchCreditAgentAccessEpic.js +13 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +1 -2
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +6 -8
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +1 -7
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +1 -11
- package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +1 -21
- package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +1 -2
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +14 -253
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +13 -147
- package/lib/esm/view/expenseAutomationView/types/missingReceiptsViewState.js +2 -0
- package/lib/esm/view/financeStatement/financeStatementSelector.js +1 -1
- package/lib/esm/view/recommendation/recommendationHelper.js +0 -29
- package/lib/esm/view/recommendation/recommendationReducer.js +1 -26
- package/lib/esm/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer.js +2 -3
- package/lib/esm/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer.js +2 -3
- package/lib/esm/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +18 -55
- package/lib/esm/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +2 -16
- package/lib/esm/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailPageEpic.js +4 -5
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +9 -26
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.js +6 -9
- package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryReducer.js +2 -3
- package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/fetchChargeCardPaymentPageEpic.js +1 -1
- package/lib/esm/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailReducer.js +3 -7
- package/lib/esm/view/spendManagement/spendManagementFilterHelpers.js +2 -4
- package/lib/esm/view/subscriptionView/subscriptionViewSelector.js +1 -1
- package/lib/esm/view/taskManager/cannedResponsesView/epics/fetchCannedResponsesEpic.js +1 -1
- package/lib/esm/view/taskManager/cannedResponsesView/epics/saveCannedResponseEpic.js +1 -1
- package/lib/esm/view/taskManager/taskDetailView/epics/unsnoozeTaskEpic.js +1 -1
- package/lib/esm/view/taskManager/taskListView/taskListReducer.js +1 -1
- package/lib/esm/view/transactionDetail/transactionDetailReducer.js +6 -121
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +1 -29
- package/lib/index.d.ts +24 -31
- package/lib/index.js +60 -84
- package/lib/reducer.d.ts +2 -2
- package/lib/reducer.js +2 -2
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
- package/lib/view/aiAccountantView/aiAccountantViewPayload.d.ts +2 -2
- package/lib/view/aiAccountantView/aiAccountantViewReducer.d.ts +1 -1
- package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +5 -2
- package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +5 -2
- package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +1 -4
- package/lib/view/companyHealthMetricView/companyHealthMetricViewSelector.js +1 -1
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +1 -1
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.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/creditAgentView/creditAgentViewPayload.d.ts +3 -0
- package/lib/view/creditAgentView/creditAgentViewReducer.d.ts +1 -1
- package/lib/view/creditAgentView/creditAgentViewReducer.js +17 -2
- package/lib/view/creditAgentView/creditAgentViewState.d.ts +5 -0
- package/lib/view/creditAgentView/epics/fetchCreditAgentAccessEpic.d.ts +11 -0
- package/lib/view/creditAgentView/epics/fetchCreditAgentAccessEpic.js +17 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +2 -2
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +1 -2
- package/lib/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +6 -8
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +1 -7
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +0 -10
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -23
- package/lib/view/expenseAutomationView/payload/transactionCategorizationPayload.d.ts +0 -21
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +1 -2
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +1 -2
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +5 -28
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +14 -253
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +1 -2
- package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +0 -16
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +1 -7
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +13 -150
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +2 -1
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +4 -1
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +2 -44
- package/lib/view/financeStatement/financeStatementSelector.js +1 -1
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.d.ts +1 -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 -20
- package/lib/view/recommendation/recommendationReducer.js +2 -27
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer.d.ts +1 -3
- package/lib/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer.js +2 -3
- package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer.d.ts +1 -3
- package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer.js +2 -3
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +18 -55
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +2 -16
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailPageEpic.js +4 -5
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +3 -18
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +10 -27
- package/lib/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.js +6 -9
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistory.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryReducer.d.ts +1 -3
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryReducer.js +2 -3
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/fetchChargeCardPaymentPageEpic.js +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailReducer.d.ts +1 -3
- package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailReducer.js +3 -7
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
- package/lib/view/spendManagement/spendManagementFilterHelpers.d.ts +3 -12
- package/lib/view/spendManagement/spendManagementFilterHelpers.js +2 -4
- 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/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 +2 -31
- package/lib/view/transactionDetail/transactionDetailTypes.d.ts +0 -1
- package/lib/view/zeniOAuthView/zeniOAuthSelector.d.ts +1 -1
- package/package.json +4 -9
- package/lib/commonStateTypes/cacheOverrideFetchReducer.d.ts +0 -17
- package/lib/commonStateTypes/cacheOverrideFetchReducer.js +0 -20
- package/lib/commonStateTypes/filterPrimitives.d.ts +0 -23
- package/lib/commonStateTypes/filterPrimitives.js +0 -21
- package/lib/commonStateTypes/pusherActions.d.ts +0 -11
- package/lib/commonStateTypes/pusherActions.js +0 -6
- package/lib/esm/commonStateTypes/cacheOverrideFetchReducer.js +0 -16
- package/lib/esm/commonStateTypes/filterPrimitives.js +0 -20
- package/lib/esm/commonStateTypes/pusherActions.js +0 -3
- package/lib/esm/view/expenseAutomationView/transactionFilterHelpers.js +0 -258
- package/lib/esm/view/expenseAutomationView/types/completedSubTab.js +0 -17
- package/lib/esm/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.js +0 -87
- package/lib/view/expenseAutomationView/transactionFilterHelpers.d.ts +0 -66
- package/lib/view/expenseAutomationView/transactionFilterHelpers.js +0 -262
- package/lib/view/expenseAutomationView/types/completedSubTab.d.ts +0 -10
- package/lib/view/expenseAutomationView/types/completedSubTab.js +0 -21
- package/lib/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.d.ts +0 -9
- package/lib/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.js +0 -91
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { createSlice } from '@reduxjs/toolkit';
|
|
2
2
|
import { toAmount } from '../../../../commonStateTypes/amount';
|
|
3
|
-
import { createCacheOverrideFetchReducer } from '../../../../commonStateTypes/cacheOverrideFetchReducer';
|
|
4
3
|
import { date } from '../../../../zeniDayJS';
|
|
5
4
|
import { initialCreditAcc, initialCreditAccountRepayment, initialDebitCardSummaries, initialResendRevokeCardInvite, toCreditAccountStatusType, } from './chargeCardList';
|
|
6
5
|
export const initialState = {
|
|
@@ -44,10 +43,6 @@ export const initialState = {
|
|
|
44
43
|
revokeCardInvite: initialResendRevokeCardInvite,
|
|
45
44
|
creditAccountRepayment: initialCreditAccountRepayment,
|
|
46
45
|
};
|
|
47
|
-
// Silent-Pusher-refresh contract: when cacheOverride=true, fetch reducers
|
|
48
|
-
// leave fetchState and error unchanged so the list page's reduceFetchState
|
|
49
|
-
// selector stays 'Completed' and doesn't flash ChargeCardListLoading.
|
|
50
|
-
// See createCacheOverrideFetchReducer for details.
|
|
51
46
|
const chargeCardList = createSlice({
|
|
52
47
|
name: 'chargeCardList',
|
|
53
48
|
initialState,
|
|
@@ -67,10 +62,10 @@ const chargeCardList = createSlice({
|
|
|
67
62
|
};
|
|
68
63
|
},
|
|
69
64
|
},
|
|
70
|
-
fetchCreditAccountRepayment
|
|
65
|
+
fetchCreditAccountRepayment(draft) {
|
|
71
66
|
draft.creditAccountRepayment.fetchState = 'In-Progress';
|
|
72
67
|
draft.creditAccountRepayment.error = undefined;
|
|
73
|
-
}
|
|
68
|
+
},
|
|
74
69
|
updateCreditAccountRepaymentAmountAndDate(draft, action) {
|
|
75
70
|
draft.creditAccountRepayment.initiatedRepayments = action.payload.amount;
|
|
76
71
|
draft.creditAccountRepayment.initiatedRepaymentDate = action.payload.date;
|
|
@@ -88,10 +83,10 @@ const chargeCardList = createSlice({
|
|
|
88
83
|
updateRowActionCardId(draft, action) {
|
|
89
84
|
draft.rowActionCardId = action.payload;
|
|
90
85
|
},
|
|
91
|
-
fetchCreditAccount
|
|
86
|
+
fetchCreditAccount(draft) {
|
|
92
87
|
draft.creditAccount.fetchState = 'In-Progress';
|
|
93
88
|
draft.creditAccount.error = undefined;
|
|
94
|
-
}
|
|
89
|
+
},
|
|
95
90
|
updateCreditAccount(draft, action) {
|
|
96
91
|
if (action.payload.length > 0) {
|
|
97
92
|
draft.creditAccount = toCreditAccount(action.payload[0]);
|
|
@@ -104,10 +99,10 @@ const chargeCardList = createSlice({
|
|
|
104
99
|
error: action.payload,
|
|
105
100
|
};
|
|
106
101
|
},
|
|
107
|
-
fetchDebitCardSummary
|
|
102
|
+
fetchDebitCardSummary(draft) {
|
|
108
103
|
draft.debitCardSummaries.fetchState = 'In-Progress';
|
|
109
104
|
draft.debitCardSummaries.error = undefined;
|
|
110
|
-
}
|
|
105
|
+
},
|
|
111
106
|
updateDebitCardSummary(draft, action) {
|
|
112
107
|
draft.debitCardSummaries = toDebitCardSummaries(action.payload);
|
|
113
108
|
},
|
|
@@ -118,10 +113,10 @@ const chargeCardList = createSlice({
|
|
|
118
113
|
error: action.payload,
|
|
119
114
|
};
|
|
120
115
|
},
|
|
121
|
-
fetchChargeCardList
|
|
116
|
+
fetchChargeCardList(draft) {
|
|
122
117
|
draft.fetchState = 'In-Progress';
|
|
123
118
|
draft.error = undefined;
|
|
124
|
-
}
|
|
119
|
+
},
|
|
125
120
|
updateChargeCardList(draft, action) {
|
|
126
121
|
const { cards, unassigned_credit } = action.payload.chargeCardListPayload;
|
|
127
122
|
const newCard = cards.map((card) => card.card_id);
|
|
@@ -157,18 +152,6 @@ const chargeCardList = createSlice({
|
|
|
157
152
|
draft.uiState.scrollYOffset = action.payload.uiState.scrollYOffset;
|
|
158
153
|
}
|
|
159
154
|
},
|
|
160
|
-
updateCreditAccountBalanceFromPusher(draft, action) {
|
|
161
|
-
const { currencyCode, currencySymbol } = action.payload;
|
|
162
|
-
const amt = (v) => v !== undefined ? toAmount(v, currencyCode, currencySymbol) : undefined;
|
|
163
|
-
draft.creditAccount.available =
|
|
164
|
-
amt(action.payload.available) ?? draft.creditAccount.available;
|
|
165
|
-
draft.creditAccount.balance =
|
|
166
|
-
amt(action.payload.balance) ?? draft.creditAccount.balance;
|
|
167
|
-
draft.creditAccount.hold =
|
|
168
|
-
amt(action.payload.hold) ?? draft.creditAccount.hold;
|
|
169
|
-
draft.creditAccount.cashback =
|
|
170
|
-
amt(action.payload.cashback) ?? draft.creditAccount.cashback;
|
|
171
|
-
},
|
|
172
155
|
clearChargeCardList(draft) {
|
|
173
156
|
Object.assign(draft, initialState);
|
|
174
157
|
},
|
|
@@ -324,7 +307,7 @@ const chargeCardList = createSlice({
|
|
|
324
307
|
},
|
|
325
308
|
},
|
|
326
309
|
});
|
|
327
|
-
export const { fetchChargeCardListPage, fetchCreditAccountRepayment, updateCreditAccountRepayment, updateCreditAccountRepaymentFailure, updateCreditAccountRepaymentAmountAndDate, updateRowActionCardId, fetchCreditAccount, updateCreditAccount, updateCreditAccountFailure, fetchDebitCardSummary, updateDebitCardSummary, updateDebitCardSummaryFailure, fetchChargeCardList, updateChargeCardList, updateChargeCardListFailure, updateSearchText, updateBulkActionCardIds, updateChargeCardListUIState,
|
|
310
|
+
export const { fetchChargeCardListPage, fetchCreditAccountRepayment, updateCreditAccountRepayment, updateCreditAccountRepaymentFailure, updateCreditAccountRepaymentAmountAndDate, updateRowActionCardId, fetchCreditAccount, updateCreditAccount, updateCreditAccountFailure, fetchDebitCardSummary, updateDebitCardSummary, updateDebitCardSummaryFailure, fetchChargeCardList, updateChargeCardList, updateChargeCardListFailure, updateSearchText, updateBulkActionCardIds, updateChargeCardListUIState, clearChargeCardList, resendCardInvite, resendCardInviteSuccess, resendCardInviteFailure, revokeCardInvite, revokeCardInviteSuccess, revokeCardInviteFailure, updateChargeCardsSpendLimit, updateChargeCardsSpendLimitSuccessOrFailure, lockChargeCards, lockChargeCardsSuccessOrFailure, unlockChargeCards, unlockChargeCardsSuccessOrFailure, closeChargeCards, closeChargeCardsSuccessOrFailure, revokeChargeCardsInvite, revokeChargeCardsInviteSuccessOrFailure, } = chargeCardList.actions;
|
|
328
311
|
export default chargeCardList.reducer;
|
|
329
312
|
// helper
|
|
330
313
|
const toCreditAccount = (payload) => ({
|
package/lib/esm/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.js
CHANGED
|
@@ -14,21 +14,18 @@ export const fetchChargeCardListPageEpic = (actions$, state$) => actions$.pipe(f
|
|
|
14
14
|
const state = state$.value;
|
|
15
15
|
const cashbackDetailState = state.cashbackDetailState;
|
|
16
16
|
if (cacheOverride === true) {
|
|
17
|
-
// Forward cacheOverride to all sub-fetches to prevent skeleton flash.
|
|
18
17
|
if (doFetchCreditAccountsDebitSummaryAndCashback === true) {
|
|
19
18
|
if (isCreditCardEnabled) {
|
|
20
|
-
chargeCardListPageAction.push(fetchCreditAccount(
|
|
21
|
-
chargeCardListPageAction.push(fetchCreditAccountRepayment(
|
|
19
|
+
chargeCardListPageAction.push(fetchCreditAccount());
|
|
20
|
+
chargeCardListPageAction.push(fetchCreditAccountRepayment());
|
|
22
21
|
}
|
|
23
22
|
if (isDebitCardEnabled) {
|
|
24
|
-
chargeCardListPageAction.push(fetchDebitCardSummary(
|
|
23
|
+
chargeCardListPageAction.push(fetchDebitCardSummary());
|
|
25
24
|
}
|
|
26
|
-
chargeCardListPageAction.push(fetchCashbackDetail(
|
|
25
|
+
chargeCardListPageAction.push(fetchCashbackDetail());
|
|
27
26
|
}
|
|
28
|
-
chargeCardListPageAction.push(fetchChargeCardList(
|
|
29
|
-
|
|
30
|
-
chargeCardListPageAction.push(fetchChargeCardConfig(true));
|
|
31
|
-
// These don't participate in the list page's reduceFetchState.
|
|
27
|
+
chargeCardListPageAction.push(fetchChargeCardList());
|
|
28
|
+
chargeCardListPageAction.push(fetchChargeCardConfig());
|
|
32
29
|
chargeCardListPageAction.push(fetchUserListByType('cardHolderCandidate', true));
|
|
33
30
|
chargeCardListPageAction.push(fetchUserListByType('cardAdmin', true));
|
|
34
31
|
chargeCardListPageAction.push(fetchClassList());
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
-
import { createCacheOverrideFetchReducer } from '../../../../commonStateTypes/cacheOverrideFetchReducer';
|
|
3
2
|
import { initialChargeCardPaymentHistoryState, } from './chargeCardPaymentHistory';
|
|
4
3
|
export const initialState = initialChargeCardPaymentHistoryState;
|
|
5
4
|
const chargeCardPaymentHistory = createSlice({
|
|
@@ -18,10 +17,10 @@ const chargeCardPaymentHistory = createSlice({
|
|
|
18
17
|
};
|
|
19
18
|
},
|
|
20
19
|
},
|
|
21
|
-
fetchChargeCardPaymentHistory
|
|
20
|
+
fetchChargeCardPaymentHistory(draft) {
|
|
22
21
|
draft.fetchState = 'In-Progress';
|
|
23
22
|
draft.error = undefined;
|
|
24
|
-
}
|
|
23
|
+
},
|
|
25
24
|
updateChargeCardPaymentHistory(draft, action) {
|
|
26
25
|
const payload = action.payload;
|
|
27
26
|
draft.creditAccountId = payload.credit_account_id;
|
|
@@ -8,7 +8,7 @@ export const fetchChargeCardPaymentPageEpic = (actions$, state$) => actions$.pip
|
|
|
8
8
|
const state = state$.value;
|
|
9
9
|
const chargeCardPaymentHistoryState = state.chargeCardPaymentHistoryState;
|
|
10
10
|
if (cacheOverride === true) {
|
|
11
|
-
chargeCardPaymentPageActions.push(fetchChargeCardPaymentHistory(
|
|
11
|
+
chargeCardPaymentPageActions.push(fetchChargeCardPaymentHistory());
|
|
12
12
|
}
|
|
13
13
|
else {
|
|
14
14
|
if (chargeCardPaymentHistoryState.fetchState !== 'Completed' &&
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
-
import { createCacheOverrideFetchReducer } from '../../../../commonStateTypes/cacheOverrideFetchReducer';
|
|
3
2
|
export const initialState = {
|
|
4
3
|
localData: {
|
|
5
4
|
amount: {
|
|
@@ -18,12 +17,9 @@ const chargeCardRepaymentDetail = createSlice({
|
|
|
18
17
|
name: 'chargeCardRepaymentDetail',
|
|
19
18
|
initialState,
|
|
20
19
|
reducers: {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
fetchChargeCardRepaymentDetail: createCacheOverrideFetchReducer(() => {
|
|
25
|
-
// do nothing
|
|
26
|
-
}),
|
|
20
|
+
fetchChargeCardRepaymentDetail() {
|
|
21
|
+
//do nothing
|
|
22
|
+
},
|
|
27
23
|
updateChargeCardRepaymentLocalStore(draft, action) {
|
|
28
24
|
draft.localData = action.payload;
|
|
29
25
|
},
|
|
@@ -8,8 +8,6 @@ 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.
|
|
13
11
|
const filterItemOnRangeCategoryType = (valueForItem, currentFilter) => {
|
|
14
12
|
let doesItemFallInValueRange = false;
|
|
15
13
|
const filterField = currentFilter.field;
|
|
@@ -43,7 +41,7 @@ const filterItemOnCategoriesWithSingleValue = (categoryValue, currentFilter, ran
|
|
|
43
41
|
return filterItemOnRangeCategoryType(categoryValue, currentFilter);
|
|
44
42
|
}
|
|
45
43
|
// if filter category is not rangeType
|
|
46
|
-
if (currentFilter.matchingOperator === '
|
|
44
|
+
if (currentFilter.matchingOperator === 'not-equal') {
|
|
47
45
|
return currentFilter.values.indexOf(categoryValue.toString()) === -1;
|
|
48
46
|
}
|
|
49
47
|
return currentFilter.values.indexOf(categoryValue.toString()) > -1;
|
|
@@ -117,7 +115,7 @@ export const applyAdvancedFiltersOnList = (entity, allItems, filters, filteredIt
|
|
|
117
115
|
? getCategoryValueForTaskList(key, item)
|
|
118
116
|
: getCategoryValueForPaymentHistory(key, item);
|
|
119
117
|
if (categoryValue == null) {
|
|
120
|
-
if (currentFilter.matchingOperator === '
|
|
118
|
+
if (currentFilter.matchingOperator === 'not-equal') {
|
|
121
119
|
return true;
|
|
122
120
|
}
|
|
123
121
|
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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter,
|
|
2
|
+
import { catchError, filter, switchMap, mergeMap } from 'rxjs/operators';
|
|
3
3
|
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
|
|
4
4
|
import { mapCannedResponsePayloadToCannedResponse, } from '../cannedResponsesPayload';
|
|
5
5
|
import { fetchCannedResponses, updateCannedResponses, updateCannedResponsesFetchStatus, } from '../cannedResponsesReducer';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter,
|
|
2
|
+
import { catchError, filter, switchMap, mergeMap } from 'rxjs/operators';
|
|
3
3
|
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
|
|
4
4
|
import { fetchCannedResponses, saveCannedResponse, saveCannedResponseFailure, saveCannedResponseSuccess, } from '../cannedResponsesReducer';
|
|
5
5
|
export const saveCannedResponseEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(saveCannedResponse.match), switchMap((action) => {
|
|
@@ -4,7 +4,7 @@ import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
|
4
4
|
import { updateTasks } from '../../../../entity/task/taskReducer';
|
|
5
5
|
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
|
|
6
6
|
import { fetchTaskList, removeTaskFromList, } from '../../taskListView/taskListReducer';
|
|
7
|
-
import { snoozeTaskSuccessOrFailure, unsnoozeTask } from '../taskDetailReducer';
|
|
7
|
+
import { snoozeTaskSuccessOrFailure, unsnoozeTask, } from '../taskDetailReducer';
|
|
8
8
|
export const unsnoozeTaskEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(unsnoozeTask.match), mergeMap((action) => handleUnsnoozeTask(action.payload.taskId, zeniAPI)));
|
|
9
9
|
const handleUnsnoozeTask = (taskId, zeniAPI) => {
|
|
10
10
|
const unsnoozeTaskApi$ = zeniAPI.deleteAndGetJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tasks/${taskId}/snooze`);
|
|
@@ -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);
|
|
@@ -76,13 +56,7 @@ export const getTransactionDetail = (state, transactionId, fetchLinkedTransactio
|
|
|
76
56
|
const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state);
|
|
77
57
|
const classList = isAccountingClassesEnabled
|
|
78
58
|
? getClassList(classState, classListState)
|
|
79
|
-
: {
|
|
80
|
-
classes: [],
|
|
81
|
-
nestedClassHierarchy: [],
|
|
82
|
-
fetchState: 'Completed',
|
|
83
|
-
error: undefined,
|
|
84
|
-
version: 0,
|
|
85
|
-
};
|
|
59
|
+
: { classes: [], nestedClassHierarchy: [], fetchState: 'Completed', error: undefined, version: 0 };
|
|
86
60
|
const isAccountingProjectsEnabled = getIsAccountingProjectsEnabled(state);
|
|
87
61
|
const projectList = isAccountingProjectsEnabled
|
|
88
62
|
? getProjectList(projectState, projectListState)
|
|
@@ -98,7 +72,6 @@ export const getTransactionDetail = (state, transactionId, fetchLinkedTransactio
|
|
|
98
72
|
: [];
|
|
99
73
|
const transactionDetailAnyUpdateStatus = reduceUpdateFetchStates(transactionDetail);
|
|
100
74
|
const vendors = getVendorsByVendorIds(vendorState, vendorListState.vendorIds);
|
|
101
|
-
const hasInFlightCategoryClassRecommendations = getDetailInFlightRecommendations(state, transactionId);
|
|
102
75
|
return {
|
|
103
76
|
reportId: 'transaction_detail',
|
|
104
77
|
reportTitle: 'Transaction Detail',
|
|
@@ -114,7 +87,6 @@ export const getTransactionDetail = (state, transactionId, fetchLinkedTransactio
|
|
|
114
87
|
classHierarchyList,
|
|
115
88
|
accountsHierarchyList,
|
|
116
89
|
classList: classList,
|
|
117
|
-
hasInFlightCategoryClassRecommendations,
|
|
118
90
|
isAccountingClassesEnabled,
|
|
119
91
|
isAccountingProjectsEnabled,
|
|
120
92
|
projectList,
|