@zeniai/client-epic-state 5.0.49 → 5.0.50-betaAS1

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.
Files changed (35) hide show
  1. package/lib/entity/project/projectPayload.d.ts +3 -3
  2. package/lib/entity/project/projectPayload.js +3 -3
  3. package/lib/entity/project/projectState.d.ts +4 -2
  4. package/lib/entity/transaction/payloadTypes/transactionLinePayload.js +1 -1
  5. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +2 -0
  6. package/lib/entity/transaction/payloadTypes/transactionPayload.js +6 -0
  7. package/lib/entity/transaction/stateTypes/transaction.d.ts +2 -0
  8. package/lib/entity/transaction/stateTypes/transactionLine.d.ts +2 -2
  9. package/lib/esm/entity/project/projectPayload.js +1 -1
  10. package/lib/esm/entity/transaction/payloadTypes/transactionLinePayload.js +2 -2
  11. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +6 -0
  12. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +8 -0
  13. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +3 -0
  14. package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +1 -0
  15. package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +11 -2
  16. package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +13 -4
  17. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +7 -2
  18. package/lib/esm/view/spendManagement/zeniAccounts/depositAccountDetail/depositAccountDetailSelector.js +1 -1
  19. package/lib/index.d.ts +2 -2
  20. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.d.ts +2 -1
  21. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +8 -0
  22. package/lib/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +3 -0
  23. package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +1 -0
  24. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +2 -1
  25. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +11 -2
  26. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +3 -1
  27. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +13 -4
  28. package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +3 -0
  29. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +6 -1
  30. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +3 -0
  31. package/lib/view/spendManagement/zeniAccounts/depositAccountDetail/depositAccountDetailSelector.js +1 -1
  32. package/lib/view/transactionDetail/transactionDetailState.d.ts +2 -2
  33. package/lib/view/transactionDetail/transactionDetailTypes.d.ts +2 -2
  34. package/package.json +1 -1
  35. package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
@@ -6,6 +6,7 @@ import { AccountBase } from '../../../entity/account/accountState';
6
6
  import { ClassBase } from '../../../entity/class/classState';
7
7
  import { SupportedTransactionWithCOT } from '../../../entity/transaction/transactionState';
8
8
  import { UncategorizedAccounts } from '../../accountList/accountListSelector';
9
+ import { ProjectListSelectorView } from '../../projectList/projectListSelector';
9
10
  import { TransactionReviewLocalData, TransactionsTab, TransactionsViewUIState } from '../types/transactionsViewState';
10
11
  export interface TransactionReviewLocalDataSelectorView {
11
12
  transactionId: ID;
@@ -18,7 +19,9 @@ export interface ExpenseAutomationTransactionViewSelector extends SelectorView {
18
19
  classList: ClassBase[];
19
20
  completionStatus: CompletionStatusType;
20
21
  fetchStateByTransactionTabs: Record<TransactionsTab, FetchStateAndError>;
22
+ isAccountingProjectsEnabled: boolean;
21
23
  markAsNotMiscategorizedStatus: FetchStateAndError;
24
+ projectList: ProjectListSelectorView;
22
25
  refreshStatus: FetchStateAndError;
23
26
  saveStatus: FetchStateAndError;
24
27
  selectedCheckBoxTransactionIds: ID[];
@@ -12,9 +12,10 @@ const transactionHelper_1 = require("../../../entity/transaction/transactionHelp
12
12
  const transactionSelector_1 = require("../../../entity/transaction/transactionSelector");
13
13
  const accountListSelector_1 = require("../../accountList/accountListSelector");
14
14
  const classListSelector_1 = require("../../classList/classListSelector");
15
+ const projectListSelector_1 = require("../../projectList/projectListSelector");
15
16
  const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
16
17
  function getExpenseAutomationTransactionView(state) {
17
- const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState, monthEndCloseChecksViewState, } = state;
18
+ const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState, projectState, projectListState, transactionState, monthEndCloseChecksState, monthEndCloseChecksViewState, } = state;
18
19
  const { selectedTransactionCategorizationTab } = expenseAutomationTransactionsViewState;
19
20
  const { uiState, refreshStatus, saveStatus, markAsNotMiscategorizedStatus, transactionIdsBySelectedPeriod, transactionReviewLocalDataById, selectedCheckBoxTransactionIds, transactionIdsWithUnsavedData, uploadReceiptStatusById, selectedTransactionId, selectedTransactionLineId, } = expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab];
20
21
  const uncategorizedIncomeExpense = (0, accountListSelector_1.getUncategorizedAccounts)(accountState, accountListState, 'accountList');
@@ -23,6 +24,8 @@ function getExpenseAutomationTransactionView(state) {
23
24
  const allClasses = classList.classes.map((classData) => {
24
25
  return (0, omit_1.default)(classData, ['accountIds', 'key']);
25
26
  });
27
+ const projectList = (0, projectListSelector_1.getProjectList)(projectState, projectListState);
28
+ const isAccountingProjectsEnabled = (0, tenantSelector_1.getIsAccountingProjectsEnabled)(state);
26
29
  const accountsHierarchyList = (0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, 'accountList');
27
30
  const classHierarchyList = (0, classListSelector_1.getNestedClassListHierarchy)(classListState);
28
31
  const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
@@ -102,6 +105,8 @@ function getExpenseAutomationTransactionView(state) {
102
105
  classList: allClasses,
103
106
  accountsHierarchyList,
104
107
  classHierarchyList,
108
+ isAccountingProjectsEnabled,
109
+ projectList,
105
110
  transactionLocalData,
106
111
  uiState,
107
112
  refreshStatus,
@@ -7,6 +7,7 @@ import { PageToken } from '../../../commonStateTypes/viewAndReport/viewAndReport
7
7
  import { AccountBase } from '../../../entity/account/accountState';
8
8
  import { ClassBase } from '../../../entity/class/classState';
9
9
  import { CustomerBase } from '../../../entity/customer/customerState';
10
+ import { ProjectBase } from '../../../entity/project/projectState';
10
11
  import { Entity, EntityType } from '../../../entity/genericEntity/entity';
11
12
  import { TransactionID } from '../../../entity/transaction/stateTypes/transaction';
12
13
  import { BillableStatus, CategorizationStatusType, PlatformLineDetailType, ProductOrService, TransactionLineBase } from '../../../entity/transaction/stateTypes/transactionLine';
@@ -53,6 +54,7 @@ export interface TransactionCategorizationLineItemData extends TransactionLineBa
53
54
  lineTransactionType?: TransactionType;
54
55
  postingType?: TransactionCategory;
55
56
  postingTypeName?: string;
57
+ project?: ProjectBase;
56
58
  recommendationsWithCOT?: RecommendationWithCOT[];
57
59
  reviewPendingReasons?: string[];
58
60
  selectedEntityLine?: Entity;
@@ -110,6 +112,7 @@ export interface TransactionLineUpdates {
110
112
  class?: ClassBase;
111
113
  customer?: CustomerBase;
112
114
  lineDescription?: string;
115
+ project?: ProjectBase;
113
116
  recommendation?: Recommendation[];
114
117
  vendor?: VendorBase;
115
118
  }
@@ -34,7 +34,7 @@ const getDepositAccountDetail = (state, depositAccountId) => {
34
34
  const zeniAccountDetail = zeniAccountDetailState.depositAccountDetailById[depositAccountId];
35
35
  const depositAccount = (0, depositAccountSelector_1.getDepositAccountByDepositAccountId)(depositAccountState, depositAccountId);
36
36
  const zeniAccountsConfig = (0, zeniAccountsConfigSelector_1.getZeniAccountsConfigDetail)(state);
37
- const transactionListView = (0, depositAccountTransactionListSelector_1.getDepositAccountTransactionList)(state, depositAccountId, 5);
37
+ const transactionListView = (0, depositAccountTransactionListSelector_1.getDepositAccountTransactionList)(state, depositAccountId);
38
38
  let accountUpdateStatus = {
39
39
  editName: {
40
40
  fetchState: 'Not-Started',
@@ -4,7 +4,7 @@ import { AccountBase } from '../../entity/account/accountState';
4
4
  import { ClassBase } from '../../entity/class/classState';
5
5
  import { CustomerBase } from '../../entity/customer/customerState';
6
6
  import { EntityType } from '../../entity/genericEntity/entity';
7
- import { Project } from '../../entity/project/projectState';
7
+ import { ProjectBase } from '../../entity/project/projectState';
8
8
  import { Transaction, TransactionID } from '../../entity/transaction/stateTypes/transaction';
9
9
  import { VendorBase } from '../../entity/vendor/vendorState';
10
10
  import { EntityRecommendationKey } from '../recommendation/recommendationState';
@@ -53,7 +53,7 @@ export interface TransactionLineUpdates {
53
53
  class?: ClassBase;
54
54
  customer?: CustomerBase;
55
55
  lineDescription?: string;
56
- project?: Project;
56
+ project?: ProjectBase;
57
57
  recommendation?: Recommendation[];
58
58
  vendor?: VendorBase;
59
59
  }
@@ -4,7 +4,7 @@ import { AccountBase, RecommendedAccountBase } from '../../entity/account/accoun
4
4
  import { ClassBase, RecommendedClassBase } from '../../entity/class/classState';
5
5
  import { CustomerBase } from '../../entity/customer/customerState';
6
6
  import { Entity } from '../../entity/genericEntity/entity';
7
- import { Project } from '../../entity/project/projectState';
7
+ import { ProjectBase } from '../../entity/project/projectState';
8
8
  import { TransactionID } from '../../entity/transaction/stateTypes/transaction';
9
9
  import { BillableStatus, PlatformLineDetailType, ProductOrService, TransactionLineBase } from '../../entity/transaction/stateTypes/transactionLine';
10
10
  import { TransactionCategory, TransactionType } from '../../entity/transaction/stateTypes/transactionType';
@@ -30,7 +30,7 @@ export interface TransactionDetailLineItemData extends TransactionLineBase {
30
30
  linkedTransactions?: TransactionID[];
31
31
  postingType?: TransactionCategory;
32
32
  postingTypeName?: string;
33
- project?: Project;
33
+ project?: ProjectBase;
34
34
  recommendationsWithCOT?: RecommendationWithCOT[];
35
35
  recommendedAccount?: RecommendedAccountBase;
36
36
  recommendedClass?: RecommendedClassBase;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.0.49",
3
+ "version": "5.0.50-betaAS1",
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",