@zeniai/client-epic-state 4.13.70 → 4.13.72

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.
@@ -224,6 +224,17 @@ const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
224
224
  transactionReviewLocalData: newTransactionLocalData,
225
225
  transactionId,
226
226
  };
227
+ const selectedTransaction = transactions.find((transaction) => transaction.id === transactionId);
228
+ const selectedCheckBoxTransactionIds = draft[selectedTab].selectedCheckBoxTransactionIds;
229
+ if (selectedTransaction != null &&
230
+ (0, transactionCategorizationLocalDataHelper_1.checkIfAllLineItemsAreCategoryClassFilled)(selectedTransaction, newTransactionLocalData) === true && // check if all line items are filled
231
+ selectedCheckBoxTransactionIds.length < transactionCategorizationLocalDataHelper_1.MAX_SELECTION_LIMIT &&
232
+ selectedCheckBoxTransactionIds.includes(transactionId) === false) {
233
+ draft[selectedTab].selectedCheckBoxTransactionIds = [
234
+ ...draft[selectedTab].selectedCheckBoxTransactionIds,
235
+ transactionId,
236
+ ];
237
+ }
227
238
  }
228
239
  if (vendorId != null) {
229
240
  transactions.forEach((transaction) => {
@@ -14,6 +14,8 @@ const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState")
14
14
  function getExpenseAutomationTransactionView(state, selectedTab) {
15
15
  const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState, transactionState, } = state;
16
16
  const { uiState, refreshStatus, saveStatus, markAsNotMiscategorizedStatus, transactionIdsBySelectedPeriod, transactionReviewLocalDataById, selectedCheckBoxTransactionIds, } = expenseAutomationTransactionsViewState[selectedTab];
17
+ const { transactionIdsBySelectedPeriod: transactionIdsBySelectedPeriodAutoCatTab, } = expenseAutomationTransactionsViewState.autoCategorized;
18
+ const { transactionIdsBySelectedPeriod: transactionIdsBySelectedPeriodReviewTab, } = expenseAutomationTransactionsViewState.review;
17
19
  const uncategorizedIncomeExpense = (0, accountListSelector_1.getUncategorizedAccounts)(accountState, accountListState, 'accountList');
18
20
  const accountList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, 'accountList');
19
21
  const classList = (0, classListSelector_1.getClassList)(classState, classListState);
@@ -29,7 +31,15 @@ function getExpenseAutomationTransactionView(state, selectedTab) {
29
31
  const transactionIdsForSelectedPeriod = monthYearPeriodId != null
30
32
  ? transactionIdsBySelectedPeriod[monthYearPeriodId]
31
33
  : null;
34
+ const transactionIdsForSelectedPeriodAutoCat = monthYearPeriodId != null
35
+ ? transactionIdsBySelectedPeriodAutoCatTab[monthYearPeriodId]
36
+ : null;
37
+ const transactionIdsForSelectedPeriodReview = monthYearPeriodId != null
38
+ ? transactionIdsBySelectedPeriodReviewTab[monthYearPeriodId]
39
+ : null;
32
40
  const transactionIds = transactionIdsForSelectedPeriod !== null && transactionIdsForSelectedPeriod !== void 0 ? transactionIdsForSelectedPeriod : [];
41
+ const transactionIdsAutoCat = transactionIdsForSelectedPeriodAutoCat !== null && transactionIdsForSelectedPeriodAutoCat !== void 0 ? transactionIdsForSelectedPeriodAutoCat : [];
42
+ const transactionIdsReview = transactionIdsForSelectedPeriodReview !== null && transactionIdsForSelectedPeriodReview !== void 0 ? transactionIdsForSelectedPeriodReview : [];
33
43
  const transactionLocalData = transactionIds
34
44
  .map((transactionId) => {
35
45
  const transactionData = transactionReviewLocalDataById[transactionId];
@@ -85,7 +95,8 @@ function getExpenseAutomationTransactionView(state, selectedTab) {
85
95
  markAsNotMiscategorizedStatus,
86
96
  completionStatus: transactionIdsForSelectedPeriod != null &&
87
97
  fetchStatus.fetchState === 'Completed' &&
88
- transactionIds.length === 0
98
+ transactionIdsAutoCat.length === 0 &&
99
+ transactionIdsReview.length === 0
89
100
  ? 'complete'
90
101
  : 'incomplete',
91
102
  totalCountByTab,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.13.70",
3
+ "version": "4.13.72",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",