@zeniai/client-epic-state 4.13.69 → 4.13.71

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.
@@ -234,8 +234,9 @@ const checkIfAllLineItemsAreCategoryClassFilled = (transaction, transactionDetai
234
234
  !(((_a = lineItem.account) === null || _a === void 0 ? void 0 : _a.qboId) != null &&
235
235
  [exports.EXPENSE_QBOID, exports.INCOME_QBOID].includes(lineItem.account.qboId)) &&
236
236
  (isVendorTransactionAvailable
237
- ? ((_b = transactionDetailLocalData.vendor) === null || _b === void 0 ? void 0 : _b.id) != null
238
- : ((_c = lineItem.vendor) === null || _c === void 0 ? void 0 : _c.id) != null);
237
+ ? ((_b = transactionDetailLocalData.vendor) === null || _b === void 0 ? void 0 : _b.id) != null &&
238
+ Boolean(transactionDetailLocalData.vendor.id) === true
239
+ : ((_c = lineItem.vendor) === null || _c === void 0 ? void 0 : _c.id) != null && Boolean(lineItem.vendor.id) === true);
239
240
  });
240
241
  };
241
242
  exports.checkIfAllLineItemsAreCategoryClassFilled = checkIfAllLineItemsAreCategoryClassFilled;
@@ -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.69",
3
+ "version": "4.13.71",
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",