@zeniai/client-epic-state 4.19.2-betaAS1 → 4.19.2-betaAS11
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/spendManagement/reimbursement/remiListView/fetchRemiListEpic.js +3 -3
- package/lib/view/spendManagement/reimbursement/remiListView/fetchRemiListPerTabEpic.js +1 -0
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +4 -3
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.js +16 -5
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ const remiListState_1 = require("./remiListState");
|
|
|
13
13
|
const fetchRemiListEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(remiListReducer_1.fetchRemiList.match), (0, operators_1.mergeMap)((action) => {
|
|
14
14
|
const fetchRemiListActions = [];
|
|
15
15
|
const state = state$.value;
|
|
16
|
-
const { period, cacheOverride, isShowDeletedReimbursementEnabled, isIncludeLineItems, } = action.payload;
|
|
16
|
+
const { period, cacheOverride, isShowDeletedReimbursementEnabled, isIncludeLineItems, isRefreshAccountAndAccountingClass, } = action.payload;
|
|
17
17
|
const tabIds = [
|
|
18
18
|
'draft',
|
|
19
19
|
'pending_approval',
|
|
@@ -22,7 +22,7 @@ const fetchRemiListEpic = (actions$, state$) => actions$.pipe((0, operators_1.fi
|
|
|
22
22
|
];
|
|
23
23
|
if (cacheOverride === true) {
|
|
24
24
|
fetchRemiListActions.push((0, reimbursementConfigReducer_1.fetchReimbursementConfig)());
|
|
25
|
-
tabIds.forEach((tab) => fetchRemiListActions.push((0, remiListReducer_1.fetchRemiListPerTab)(period, tab, isShowDeletedReimbursementEnabled, isIncludeLineItems)));
|
|
25
|
+
tabIds.forEach((tab) => fetchRemiListActions.push((0, remiListReducer_1.fetchRemiListPerTab)(period, tab, isShowDeletedReimbursementEnabled, isIncludeLineItems, isRefreshAccountAndAccountingClass)));
|
|
26
26
|
}
|
|
27
27
|
else {
|
|
28
28
|
if (state.reimbursementConfigState.fetchState !== 'Completed' &&
|
|
@@ -33,7 +33,7 @@ const fetchRemiListEpic = (actions$, state$) => actions$.pipe((0, operators_1.fi
|
|
|
33
33
|
const key = (0, remiListState_1.getRemiListKey)(period, tab);
|
|
34
34
|
const remis = (0, get_1.default)(state.remiListState.byRemiListKey, key, undefined);
|
|
35
35
|
if (remis == null || remis.hasValidState() === false) {
|
|
36
|
-
fetchRemiListActions.push((0, remiListReducer_1.fetchRemiListPerTab)(period, tab, isShowDeletedReimbursementEnabled, isIncludeLineItems));
|
|
36
|
+
fetchRemiListActions.push((0, remiListReducer_1.fetchRemiListPerTab)(period, tab, isShowDeletedReimbursementEnabled, isIncludeLineItems, isRefreshAccountAndAccountingClass));
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
}
|
|
@@ -11,6 +11,7 @@ const responsePayload_1 = require("../../../../responsePayload");
|
|
|
11
11
|
const remiListReducer_1 = require("./remiListReducer");
|
|
12
12
|
const fetchRemiListPerTabEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(remiListReducer_1.fetchRemiListPerTab.match), (0, operators_1.mergeMap)((action) => {
|
|
13
13
|
const { period, tab, isShowDeletedReimbursementEnabled, isIncludeLineItems, isRefreshAccountAndAccountingClass, } = action.payload;
|
|
14
|
+
console.log('*************** from epic isRefreshAccountAndAccountingClass *****************', isRefreshAccountAndAccountingClass);
|
|
14
15
|
const queryParam = Object.assign({ start_date: (0, timePeriod_1.toString)(period.start), end_date: (0, timePeriod_1.toString)(period.end), sort_by: 'reimbursement_date', sort_order: 'desc', reimbursement_provider: 'zeni', reimbursement_stage_code: tab, is_include_reimbursee_users_info: true, is_include_approval_info: tab === 'pending_approval', is_include_pending_approval_transaction_ids_for_user: tab === 'pending_approval', transaction_type: 'reimbursement', is_include_deleted: isShowDeletedReimbursementEnabled
|
|
15
16
|
? tab !== 'draft'
|
|
16
17
|
: false, is_include_line_items: isIncludeLineItems ? tab !== 'draft' : false }, (isRefreshAccountAndAccountingClass === false && {
|
|
@@ -4,18 +4,19 @@ import { ZeniAPIStatus } from '../../../../responsePayload';
|
|
|
4
4
|
import { RemiListPayload } from './remiListPayload';
|
|
5
5
|
import { ReimbursementFilters, RemiListDownloadUIState, RemiListState, RemiListUIState, RemiTabType, SaveRemiStageCode } from './remiListState';
|
|
6
6
|
export declare const initialState: RemiListState;
|
|
7
|
-
export declare const fetchRemiList: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, cacheOverride: any, isShowDeletedReimbursementEnabled: boolean, isIncludeLineItems: boolean, isBulkActionCompleteRefresh
|
|
7
|
+
export declare const fetchRemiList: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, cacheOverride: any, isShowDeletedReimbursementEnabled: boolean, isIncludeLineItems: boolean, isBulkActionCompleteRefresh: any, isRefreshAccountAndAccountingClass: boolean], {
|
|
8
8
|
period: TimePeriod;
|
|
9
9
|
cacheOverride: any;
|
|
10
10
|
isShowDeletedReimbursementEnabled: boolean;
|
|
11
11
|
isIncludeLineItems: boolean;
|
|
12
12
|
isBulkActionCompleteRefresh: any;
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
isRefreshAccountAndAccountingClass: boolean;
|
|
14
|
+
}, "remiList/fetchRemiList", never, never>, fetchRemiListPerTab: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, tab: "paid" | "pending_approval" | "scheduled" | "draft", isShowDeletedReimbursementEnabled: boolean, isIncludeLineItems: boolean, isRefreshAccountAndAccountingClass: boolean], {
|
|
15
15
|
period: TimePeriod;
|
|
16
16
|
tab: "paid" | "pending_approval" | "scheduled" | "draft";
|
|
17
17
|
isShowDeletedReimbursementEnabled: boolean;
|
|
18
18
|
isIncludeLineItems: boolean;
|
|
19
|
+
isRefreshAccountAndAccountingClass: boolean;
|
|
19
20
|
}, "remiList/fetchRemiListPerTab", never, never>, updateRemiListByStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
20
21
|
remiList: RemiListPayload;
|
|
21
22
|
tab: RemiTabType;
|
|
@@ -35,13 +35,15 @@ const remiList = (0, toolkit_1.createSlice)({
|
|
|
35
35
|
//do nothing
|
|
36
36
|
},
|
|
37
37
|
prepare(period, tab, isShowDeletedReimbursementEnabled, isIncludeLineItems, isRefreshAccountAndAccountingClass) {
|
|
38
|
+
console.log('*************** called fetchRemiListPerTab prepare isRefreshAccountAndAccountingClass *****************', isRefreshAccountAndAccountingClass);
|
|
38
39
|
return {
|
|
39
|
-
payload:
|
|
40
|
+
payload: {
|
|
41
|
+
period,
|
|
40
42
|
tab,
|
|
41
43
|
isShowDeletedReimbursementEnabled,
|
|
42
|
-
isIncludeLineItems
|
|
44
|
+
isIncludeLineItems,
|
|
43
45
|
isRefreshAccountAndAccountingClass,
|
|
44
|
-
}
|
|
46
|
+
},
|
|
45
47
|
};
|
|
46
48
|
},
|
|
47
49
|
},
|
|
@@ -69,14 +71,23 @@ const remiList = (0, toolkit_1.createSlice)({
|
|
|
69
71
|
: 'In-Progress', error: undefined });
|
|
70
72
|
});
|
|
71
73
|
},
|
|
72
|
-
prepare(period, cacheOverride = false, isShowDeletedReimbursementEnabled, isIncludeLineItems, isBulkActionCompleteRefresh = false) {
|
|
74
|
+
prepare(period, cacheOverride = false, isShowDeletedReimbursementEnabled, isIncludeLineItems, isBulkActionCompleteRefresh = false, isRefreshAccountAndAccountingClass) {
|
|
75
|
+
console.log('*************** called fetchRemiList prepare isRefreshAccountAndAccountingClass *****************', {
|
|
76
|
+
cacheOverride,
|
|
77
|
+
isBulkActionCompleteRefresh: isBulkActionCompleteRefresh !== null && isBulkActionCompleteRefresh !== void 0 ? isBulkActionCompleteRefresh : false,
|
|
78
|
+
isIncludeLineItems,
|
|
79
|
+
isShowDeletedReimbursementEnabled,
|
|
80
|
+
period,
|
|
81
|
+
isRefreshAccountAndAccountingClass,
|
|
82
|
+
});
|
|
73
83
|
return {
|
|
74
84
|
payload: {
|
|
75
85
|
period,
|
|
76
86
|
cacheOverride,
|
|
77
87
|
isShowDeletedReimbursementEnabled,
|
|
78
88
|
isIncludeLineItems,
|
|
79
|
-
isBulkActionCompleteRefresh,
|
|
89
|
+
isBulkActionCompleteRefresh: isBulkActionCompleteRefresh !== null && isBulkActionCompleteRefresh !== void 0 ? isBulkActionCompleteRefresh : false,
|
|
90
|
+
isRefreshAccountAndAccountingClass,
|
|
80
91
|
},
|
|
81
92
|
};
|
|
82
93
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.19.2-
|
|
3
|
+
"version": "4.19.2-betaAS11",
|
|
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",
|