@zeniai/client-epic-state 5.2.95 → 5.2.97
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.
- package/lib/esm/view/accountList/accountListReducer.js +2 -0
- package/lib/esm/view/transactionDetail/createTransaction/createTransactionSelector.js +6 -2
- package/lib/view/accountList/accountListReducer.js +2 -0
- package/lib/view/accountList/accountListState.d.ts +1 -1
- package/lib/view/transactionDetail/createTransaction/createTransactionSelector.d.ts +9 -3
- package/lib/view/transactionDetail/createTransaction/createTransactionSelector.js +5 -1
- package/package.json +1 -1
|
@@ -28,6 +28,8 @@ export const initialState = {
|
|
|
28
28
|
reimbursementAccountList: initialAccountList,
|
|
29
29
|
schedulesAccountList: initialAccountList,
|
|
30
30
|
billPayAccountList: initialAccountList,
|
|
31
|
+
createTransactionLineAccountList: initialAccountList,
|
|
32
|
+
createTransactionPaymentAccountList: initialAccountList,
|
|
31
33
|
},
|
|
32
34
|
};
|
|
33
35
|
const accountList = createSlice({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createSelector } from '@reduxjs/toolkit';
|
|
2
|
-
import { getNestedAccountListHierarchy } from '../../accountList/accountListSelector';
|
|
2
|
+
import { getAccountListFetchState, getNestedAccountListHierarchy, } from '../../accountList/accountListSelector';
|
|
3
3
|
import { getNestedClassListHierarchy } from '../../classList/classListSelector';
|
|
4
4
|
import { getResolvedTransferAccounts } from '../../createTransferEntry/createTransferEntrySelector';
|
|
5
5
|
import { getRecommendationsForEntity } from '../../recommendation/recommendationSelector';
|
|
@@ -39,7 +39,11 @@ export const getCreateTransactionView = createSelector([
|
|
|
39
39
|
createStatus: createTransactionsState.createStatus,
|
|
40
40
|
createdTransactionId: createTransactionsState.createdTransactionId,
|
|
41
41
|
vendorList: Object.values(vendorByID),
|
|
42
|
-
|
|
42
|
+
accountListFetchState: getAccountListFetchState(accountListState, 'accountList'),
|
|
43
|
+
lineAccountListFetchState: getAccountListFetchState(accountListState, 'createTransactionLineAccountList'),
|
|
44
|
+
paymentAccountListFetchState: getAccountListFetchState(accountListState, 'createTransactionPaymentAccountList'),
|
|
45
|
+
accountListNestedAccountHierarchy: getNestedAccountListHierarchy(accountListState, 'createTransactionLineAccountList'),
|
|
46
|
+
paymentAccountListNestedAccountHierarchy: getNestedAccountListHierarchy(accountListState, 'createTransactionPaymentAccountList'),
|
|
43
47
|
classListNestedAccountHierarchy: getNestedClassListHierarchy(classListState),
|
|
44
48
|
transferAccountsList: transactionType === 'transfer' ? transferAccountsList : [],
|
|
45
49
|
fetchState: createTransactionsState.createStatus.fetchState,
|
|
@@ -35,6 +35,8 @@ exports.initialState = {
|
|
|
35
35
|
reimbursementAccountList: exports.initialAccountList,
|
|
36
36
|
schedulesAccountList: exports.initialAccountList,
|
|
37
37
|
billPayAccountList: exports.initialAccountList,
|
|
38
|
+
createTransactionLineAccountList: exports.initialAccountList,
|
|
39
|
+
createTransactionPaymentAccountList: exports.initialAccountList,
|
|
38
40
|
},
|
|
39
41
|
};
|
|
40
42
|
const accountList = (0, toolkit_1.createSlice)({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NestedAccountHierarchyForReport } from '../../commonStateTypes/accountView/nestedAccountID';
|
|
2
2
|
import { FetchedState, ID } from '../../commonStateTypes/common';
|
|
3
3
|
import { AccountLabel } from '../../entity/account/accountState';
|
|
4
|
-
export type AccountListKeyType = 'accountList' | 'reimbursementAccountList' | 'schedulesAccountList' | 'billPayAccountList';
|
|
4
|
+
export type AccountListKeyType = 'accountList' | 'reimbursementAccountList' | 'schedulesAccountList' | 'billPayAccountList' | 'createTransactionLineAccountList' | 'createTransactionPaymentAccountList';
|
|
5
5
|
export interface AccountList extends FetchedState {
|
|
6
6
|
accountIds: ID[];
|
|
7
7
|
accountIdsByLabel: Record<AccountLabel, ID[]>;
|
|
@@ -9,15 +9,21 @@ import { Vendor } from '../../../entity/vendor/vendorState';
|
|
|
9
9
|
import { RootState } from '../../../rootStateTypes';
|
|
10
10
|
import { CreatableTransactionType, CreateTransactionLocalData } from './createTransactionState';
|
|
11
11
|
export interface CreateTransactionView extends SelectorView {
|
|
12
|
+
/** The shared COA; on this page it only backs the transfer From/To fallback. */
|
|
13
|
+
accountListFetchState: FetchState;
|
|
12
14
|
/**
|
|
13
|
-
* COA and class trees for the
|
|
14
|
-
*
|
|
15
|
-
*
|
|
15
|
+
* COA and class trees for the line dropdowns. The hierarchies rather than flat lists, because
|
|
16
|
+
* the create page builds its grouped "Recommended" / "All" options with the same helpers the
|
|
17
|
+
* detail page uses.
|
|
16
18
|
*/
|
|
17
19
|
accountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
|
|
18
20
|
classListNestedAccountHierarchy: NestedClassHierarchyForReport[];
|
|
19
21
|
createStatus: FetchStateAndError;
|
|
22
|
+
lineAccountListFetchState: FetchState;
|
|
20
23
|
localData: CreateTransactionLocalData;
|
|
24
|
+
paymentAccountListFetchState: FetchState;
|
|
25
|
+
/** Bank, credit card and other current asset accounts for the header payment account. */
|
|
26
|
+
paymentAccountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
|
|
21
27
|
transactionType: CreatableTransactionType;
|
|
22
28
|
/** Populated for transfer only; the COA would offer ineligible accounts. */
|
|
23
29
|
transferAccountsList: AccountBase[];
|
|
@@ -45,7 +45,11 @@ exports.getCreateTransactionView = (0, toolkit_1.createSelector)([
|
|
|
45
45
|
createStatus: createTransactionsState.createStatus,
|
|
46
46
|
createdTransactionId: createTransactionsState.createdTransactionId,
|
|
47
47
|
vendorList: Object.values(vendorByID),
|
|
48
|
-
|
|
48
|
+
accountListFetchState: (0, accountListSelector_1.getAccountListFetchState)(accountListState, 'accountList'),
|
|
49
|
+
lineAccountListFetchState: (0, accountListSelector_1.getAccountListFetchState)(accountListState, 'createTransactionLineAccountList'),
|
|
50
|
+
paymentAccountListFetchState: (0, accountListSelector_1.getAccountListFetchState)(accountListState, 'createTransactionPaymentAccountList'),
|
|
51
|
+
accountListNestedAccountHierarchy: (0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, 'createTransactionLineAccountList'),
|
|
52
|
+
paymentAccountListNestedAccountHierarchy: (0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, 'createTransactionPaymentAccountList'),
|
|
49
53
|
classListNestedAccountHierarchy: (0, classListSelector_1.getNestedClassListHierarchy)(classListState),
|
|
50
54
|
transferAccountsList: transactionType === 'transfer' ? transferAccountsList : [],
|
|
51
55
|
fetchState: createTransactionsState.createStatus.fetchState,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.97",
|
|
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",
|