@zeniai/client-epic-state 4.7.68 → 4.7.70
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/view/accountList/accountListReducer.js +2 -1
- package/lib/view/accountList/accountListState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +2 -2
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +4 -4
- package/lib/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.js +3 -3
- package/lib/view/spendManagement/billPay/editBillView/epics/initializeBillToLocalStoreEpic.js +1 -1
- package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.js +1 -1
- package/package.json +1 -1
|
@@ -27,6 +27,7 @@ exports.initialState = {
|
|
|
27
27
|
byReportId: {
|
|
28
28
|
accountList: exports.initialAccountList,
|
|
29
29
|
reimbursementAccountList: exports.initialAccountList,
|
|
30
|
+
billPayAccountList: exports.initialAccountList,
|
|
30
31
|
},
|
|
31
32
|
};
|
|
32
33
|
const accountList = (0, toolkit_1.createSlice)({
|
|
@@ -40,7 +41,7 @@ const accountList = (0, toolkit_1.createSlice)({
|
|
|
40
41
|
const existingData = draft.byReportId[action.payload.accountListKey];
|
|
41
42
|
draft.byReportId[action.payload.accountListKey] = Object.assign(Object.assign({}, existingData), { fetchState: 'In-Progress', error: undefined });
|
|
42
43
|
},
|
|
43
|
-
prepare(accountListKey, fetchFullResponse = false, excludeAccountPayableAccounts =
|
|
44
|
+
prepare(accountListKey, fetchFullResponse = false, excludeAccountPayableAccounts = false, excludeAccountReceivableAccounts = false, isLimitedCategoryEnabled = false) {
|
|
44
45
|
return {
|
|
45
46
|
payload: {
|
|
46
47
|
accountListKey,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NestedAccountHeirarchyForReport } from '../../commonStateTypes/accountView/nestedAccountID';
|
|
2
2
|
import { FetchedState, ID } from '../../commonStateTypes/common';
|
|
3
3
|
import { AccountLabel } from '../../entity/account/accountState';
|
|
4
|
-
export declare type AccountListKeyType = 'accountList' | 'reimbursementAccountList';
|
|
4
|
+
export declare type AccountListKeyType = 'accountList' | 'reimbursementAccountList' | 'billPayAccountList';
|
|
5
5
|
export interface AccountList extends FetchedState {
|
|
6
6
|
accountIds: ID[];
|
|
7
7
|
accountIdsByLabel: Record<AccountLabel, ID[]>;
|
|
@@ -49,7 +49,7 @@ const getReviewPageBillDetail = (state, billId) => {
|
|
|
49
49
|
const withdrawFromList = (0, paymentAccountSelector_1.getPaymentAccountsByPaymentAccountIds)(paymentAccountState, setupViewState.accountDetails.paymentAccountIds);
|
|
50
50
|
let fetchState = 'Not-Started';
|
|
51
51
|
let sourceBillDetailFetchState = 'Not-Started';
|
|
52
|
-
const accountList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, '
|
|
52
|
+
const accountList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, 'billPayAccountList');
|
|
53
53
|
let toAccountVendorEmail = undefined;
|
|
54
54
|
let isCollectToAccountInfoFromVendorContact = false;
|
|
55
55
|
let isRecurring = false;
|
|
@@ -73,7 +73,7 @@ const getReviewPageBillDetail = (state, billId) => {
|
|
|
73
73
|
if (sourceBillDetail != null) {
|
|
74
74
|
sourceBillDetailFetchState = (0, reduceFetchState_1.reduceFetchState)([
|
|
75
75
|
sourceBillDetail.fetchStatus,
|
|
76
|
-
accountListState.byReportId['
|
|
76
|
+
accountListState.byReportId['billPayAccountList'],
|
|
77
77
|
classListState,
|
|
78
78
|
]).fetchState;
|
|
79
79
|
}
|
|
@@ -85,7 +85,7 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, billId)
|
|
|
85
85
|
paymentDetailsSection: getPaymentSection(state, withdrawFromList, {}),
|
|
86
86
|
totalAmount: sourceBillDetail === null || sourceBillDetail === void 0 ? void 0 : sourceBillDetail.billDetailLocalData.totalAmount,
|
|
87
87
|
};
|
|
88
|
-
const accountList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, '
|
|
88
|
+
const accountList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, 'billPayAccountList');
|
|
89
89
|
let billPayInfo = undefined;
|
|
90
90
|
let toAccountVendorEmail = undefined;
|
|
91
91
|
let isCollectToAccountInfoFromVendorContact = false;
|
|
@@ -150,7 +150,7 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, billId)
|
|
|
150
150
|
if (billViewState != null) {
|
|
151
151
|
fetchState = (0, reduceFetchState_1.reduceFetchState)([
|
|
152
152
|
billViewState,
|
|
153
|
-
accountListState.byReportId.
|
|
153
|
+
accountListState.byReportId.billPayAccountList,
|
|
154
154
|
classListState,
|
|
155
155
|
]).fetchState;
|
|
156
156
|
deleteStatus = billViewState.deleteStatus;
|
|
@@ -167,7 +167,7 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, billId)
|
|
|
167
167
|
}
|
|
168
168
|
else {
|
|
169
169
|
fetchState = (0, reduceFetchState_1.reduceFetchState)([
|
|
170
|
-
accountListState.byReportId
|
|
170
|
+
accountListState.byReportId.billPayAccountList,
|
|
171
171
|
classListState,
|
|
172
172
|
]).fetchState;
|
|
173
173
|
}
|
|
@@ -277,7 +277,7 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, billId)
|
|
|
277
277
|
});
|
|
278
278
|
}
|
|
279
279
|
const billHistory = (0, commonHistorySelector_1.getActivityHistory)(commonHistoryState, billId !== null && billId !== void 0 ? billId : '', 'bill_pay');
|
|
280
|
-
const accountsHeirarchyList = (0, accountListSelector_1.getNestedAccountListHeirarchy)(accountListState, '
|
|
280
|
+
const accountsHeirarchyList = (0, accountListSelector_1.getNestedAccountListHeirarchy)(accountListState, 'billPayAccountList');
|
|
281
281
|
const classHeirarchyList = (0, classListSelector_1.getNestedClassListHeirarchy)(classListState);
|
|
282
282
|
const duplicateBills = (0, billPayReviewSelector_1.getDuplicateBills)(state, billId);
|
|
283
283
|
return {
|
|
@@ -16,7 +16,7 @@ const fetchEditBillDetailPageEpic = (actions$, state$) => actions$.pipe((0, oper
|
|
|
16
16
|
const billDetailActions = [];
|
|
17
17
|
const state = state$.value;
|
|
18
18
|
if (cacheOverride == true) {
|
|
19
|
-
billDetailActions.push((0, accountListReducer_1.fetchAccountList)('
|
|
19
|
+
billDetailActions.push((0, accountListReducer_1.fetchAccountList)('billPayAccountList', true, true, true));
|
|
20
20
|
billDetailActions.push((0, classListReducer_1.fetchClassList)());
|
|
21
21
|
billDetailActions.push((0, vendorTypeListReducer_1.fetchVendorTypeList)());
|
|
22
22
|
billDetailActions.push((0, ownerListReducer_1.fetchOwnerList)());
|
|
@@ -35,10 +35,10 @@ const fetchEditBillDetailPageEpic = (actions$, state$) => actions$.pipe((0, oper
|
|
|
35
35
|
state.ownerListState.hasValidState() === false) {
|
|
36
36
|
billDetailActions.push((0, ownerListReducer_1.fetchOwnerList)());
|
|
37
37
|
}
|
|
38
|
-
const accountList = state.accountListState.byReportId
|
|
38
|
+
const accountList = state.accountListState.byReportId['billPayAccountList'];
|
|
39
39
|
if (accountList.hasValidState() === false &&
|
|
40
40
|
accountList.fetchState !== 'In-Progress') {
|
|
41
|
-
billDetailActions.push((0, accountListReducer_1.fetchAccountList)('
|
|
41
|
+
billDetailActions.push((0, accountListReducer_1.fetchAccountList)('billPayAccountList', true, true, true));
|
|
42
42
|
}
|
|
43
43
|
const classList = state.classListState;
|
|
44
44
|
if (classList.hasValidState() === false &&
|
package/lib/view/spendManagement/billPay/editBillView/epics/initializeBillToLocalStoreEpic.js
CHANGED
|
@@ -95,7 +95,7 @@ const initializeBillToLocalStoreEpic = (actions$, state$) => actions$.pipe((0, o
|
|
|
95
95
|
const billDetail = (0, get_1.default)(state.billDetailViewState.billDetailById, detailKey, undefined);
|
|
96
96
|
const transaction = (0, get_1.default)(state.billTransactionState.transactionById, billId, undefined);
|
|
97
97
|
const { accountListState, accountState, classListState, classState, recurringBillState, } = state;
|
|
98
|
-
const accountList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, '
|
|
98
|
+
const accountList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, 'billPayAccountList');
|
|
99
99
|
const classList = (0, classListSelector_1.getClassList)(classState, classListState);
|
|
100
100
|
const recommendations = transaction === null || transaction === void 0 ? void 0 : transaction.recommendations;
|
|
101
101
|
/* check vendor info is present in local store or not.
|
|
@@ -147,7 +147,7 @@ const toBillDetailLocalData = (state, billPayload, vendor, recommendedVendorId)
|
|
|
147
147
|
const lineState = (0, transactionLinePayload_1.toTransactionWithAccountAndClassLine)(line, currency);
|
|
148
148
|
const { accountListState, accountState, classListState, classState } = state;
|
|
149
149
|
const classList = (0, classListSelector_1.getClassList)(classState, classListState);
|
|
150
|
-
const accountList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, '
|
|
150
|
+
const accountList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, 'billPayAccountList');
|
|
151
151
|
const lineWithRecommendations = (0, initializeBillToLocalStoreEpic_1.getLineRecommendationsLocalData)(line.line_id, lineState, recommendations, accountList, classList, vendor);
|
|
152
152
|
linesById[line.line_id] = Object.assign(Object.assign({}, lineWithRecommendations), { account: ((_b = lineWithRecommendations.account) === null || _b === void 0 ? void 0 : _b.accountId) === '' &&
|
|
153
153
|
vendorCategory != null
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.70",
|
|
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",
|