@zeniai/client-epic-state 4.20.2-betaNB1 → 4.20.2-betaNB2

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.
@@ -6,6 +6,7 @@ const getSummationBalance_1 = require("../../commonStateTypes/coaBalance/additio
6
6
  const currencyHelper_1 = require("../../commonStateTypes/currencyHelper");
7
7
  const reduceFetchState_1 = require("../../commonStateTypes/reduceFetchState");
8
8
  const sectionClassesViewSelector_1 = require("../../entity/sectionClassesViewV2/sectionClassesViewSelector");
9
+ const profitAndLossClassesByClassHorizontalSelectorTypes_1 = require("./profitAndLossClassesByClassHorizontalSelectorTypes");
9
10
  const profitAndLossHorizontalEnrichment_1 = require("./profitAndLossHorizontalEnrichment");
10
11
  exports.profitAndLossHorizontalIdsInOrder = [
11
12
  'income',
@@ -307,6 +308,7 @@ function buildHeaderBalances(classColumns, timeframe, selectedPeriod, currency)
307
308
  startDate,
308
309
  type: 'default',
309
310
  label: col.className,
311
+ id: col.classId,
310
312
  }));
311
313
  // Add a "Total" column
312
314
  balances.push({
@@ -316,6 +318,7 @@ function buildHeaderBalances(classColumns, timeframe, selectedPeriod, currency)
316
318
  startDate,
317
319
  type: 'default',
318
320
  label: 'Total',
321
+ id: profitAndLossClassesByClassHorizontalSelectorTypes_1.HORIZONTAL_CLASS_TOTAL_BALANCE_ID,
319
322
  });
320
323
  return balances;
321
324
  }
@@ -17,6 +17,7 @@ export interface TransactionDetailReport extends SelectorView {
17
17
  classHierarchyList: NestedClassHierarchyForReport[];
18
18
  classList: ClassListSelectorView;
19
19
  deleteStatusByAttachmentName: Record<string, FetchStateAndError>;
20
+ isAccountingClassesEnabled: boolean;
20
21
  linkedTransactions: SupportedTransactionWithCOT[];
21
22
  transactionDetailLocalData: TransactionDetailLocalData;
22
23
  transactionDetailUpdateStatus: FetchStateAndError;
@@ -7,6 +7,7 @@ exports.getInitialUpdatablePeriodsForTransactionRecommendations = exports.getTra
7
7
  exports.getTransactionDetailForTransaction = getTransactionDetailForTransaction;
8
8
  const get_1 = __importDefault(require("lodash/get"));
9
9
  const reduceFetchState_1 = require("../../commonStateTypes/reduceFetchState");
10
+ const tenantSelector_1 = require("../../entity/tenant/tenantSelector");
10
11
  const transactionType_1 = require("../../entity/transaction/stateTypes/transactionType");
11
12
  const transactionHelper_1 = require("../../entity/transaction/transactionHelper");
12
13
  const transactionSelector_1 = require("../../entity/transaction/transactionSelector");
@@ -58,9 +59,14 @@ const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = tr
58
59
  }
59
60
  }
60
61
  const accountsList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, 'accountList');
61
- const classList = (0, classListSelector_1.getClassList)(classState, classListState);
62
+ const isAccountingClassesEnabled = (0, tenantSelector_1.getIsAccountingClassesEnabled)(state);
63
+ const classList = isAccountingClassesEnabled
64
+ ? (0, classListSelector_1.getClassList)(classState, classListState)
65
+ : { classes: [], nestedClassHierarchy: [], fetchState: 'Completed', error: undefined, version: 0 };
62
66
  const accountsHierarchyList = (0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, 'accountList');
63
- const classHierarchyList = (0, classListSelector_1.getNestedClassListHierarchy)(classListState);
67
+ const classHierarchyList = isAccountingClassesEnabled
68
+ ? (0, classListSelector_1.getNestedClassListHierarchy)(classListState)
69
+ : [];
64
70
  const transactionDetailAnyUpdateStatus = reduceUpdateFetchStates(transactionDetail);
65
71
  const vendors = (0, vendorSelector_1.getVendorsByVendorIds)(vendorState, vendorListState.vendorIds);
66
72
  return {
@@ -78,6 +84,7 @@ const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = tr
78
84
  classHierarchyList,
79
85
  accountsHierarchyList,
80
86
  classList: classList,
87
+ isAccountingClassesEnabled,
81
88
  isUpdateNotAllowed: transactionDetail?.isUpdateNotAllowed,
82
89
  transactionDetailLocalData: transactionDetail?.transactionDetailLocalData ??
83
90
  transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.20.2-betaNB1",
3
+ "version": "4.20.2-betaNB2",
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",