@zeniai/client-epic-state 4.20.3-betaSS4 → 4.20.3-betaSS6

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.
@@ -45,7 +45,7 @@ export const initialState = {
45
45
  searchString: '',
46
46
  scrollPosition: { scrollTop: 0, scrollLeft: undefined },
47
47
  selectedMainTab: 'pending_review',
48
- sortKey: 'startMonth',
48
+ sortKey: 'transactionDate',
49
49
  sortOrder: 'descending',
50
50
  totalCount: 0,
51
51
  limit: 10,
@@ -1,7 +1,7 @@
1
1
  import omit from 'lodash/omit';
2
2
  import { reduceAllFetchState, reduceAnyFetchState, } from '../../../commonStateTypes/reduceFetchState';
3
3
  import { toMonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
4
- import { getCurrentTenant } from '../../../entity/tenant/tenantSelector';
4
+ import { getIsAccountingClassesEnabled, getCurrentTenant, } from '../../../entity/tenant/tenantSelector';
5
5
  import { getTransactionWithCOT } from '../../../entity/transaction/transactionHelper';
6
6
  import { getSupportedTransactionsByIds } from '../../../entity/transaction/transactionSelector';
7
7
  import { getAccountList, getNestedAccountListHierarchy, getUncategorizedAccounts, } from '../../accountList/accountListSelector';
@@ -44,12 +44,16 @@ export function getExpenseAutomationTransactionView(state) {
44
44
  const monthEndFetchState = monthYearPeriodId != null
45
45
  ? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
46
46
  : { fetchState: 'Not-Started', error: undefined };
47
+ const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state);
48
+ const allFetchStateList = [
49
+ accountList,
50
+ expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab],
51
+ ];
52
+ if (isAccountingClassesEnabled) {
53
+ allFetchStateList.push(classList);
54
+ }
47
55
  const fetchStatus = reduceAnyFetchState([
48
- reduceAllFetchState([
49
- accountList,
50
- classList,
51
- expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab],
52
- ]),
56
+ reduceAllFetchState(allFetchStateList),
53
57
  monthEndFetchState,
54
58
  ]);
55
59
  const totalCountByReview = expenseAutomationTransactionsViewState.transactionCategorizationView.review
@@ -49,7 +49,7 @@ exports.initialState = {
49
49
  searchString: '',
50
50
  scrollPosition: { scrollTop: 0, scrollLeft: undefined },
51
51
  selectedMainTab: 'pending_review',
52
- sortKey: 'startMonth',
52
+ sortKey: 'transactionDate',
53
53
  sortOrder: 'descending',
54
54
  totalCount: 0,
55
55
  limit: 10,
@@ -50,12 +50,16 @@ function getExpenseAutomationTransactionView(state) {
50
50
  const monthEndFetchState = monthYearPeriodId != null
51
51
  ? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
52
52
  : { fetchState: 'Not-Started', error: undefined };
53
+ const isAccountingClassesEnabled = (0, tenantSelector_1.getIsAccountingClassesEnabled)(state);
54
+ const allFetchStateList = [
55
+ accountList,
56
+ expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab],
57
+ ];
58
+ if (isAccountingClassesEnabled) {
59
+ allFetchStateList.push(classList);
60
+ }
53
61
  const fetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)([
54
- (0, reduceFetchState_1.reduceAllFetchState)([
55
- accountList,
56
- classList,
57
- expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab],
58
- ]),
62
+ (0, reduceFetchState_1.reduceAllFetchState)(allFetchStateList),
59
63
  monthEndFetchState,
60
64
  ]);
61
65
  const totalCountByReview = expenseAutomationTransactionsViewState.transactionCategorizationView.review
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.20.3-betaSS4",
3
+ "version": "4.20.3-betaSS6",
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
  "module": "lib/esm/index.js",