@zeniai/client-epic-state 4.19.4-betaAS3 → 4.19.4
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 -4
- package/lib/view/spendManagement/reimbursement/remiListView/fetchRemiListPerTabEpic.js +1 -2
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +2 -4
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.js +2 -13
- package/package.json +1 -1
|
@@ -13,8 +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,
|
|
17
|
-
console.log('________ action.payload ________', action.payload);
|
|
16
|
+
const { period, cacheOverride, isShowDeletedReimbursementEnabled, isIncludeLineItems, } = action.payload;
|
|
18
17
|
const tabIds = [
|
|
19
18
|
'draft',
|
|
20
19
|
'pending_approval',
|
|
@@ -23,7 +22,7 @@ const fetchRemiListEpic = (actions$, state$) => actions$.pipe((0, operators_1.fi
|
|
|
23
22
|
];
|
|
24
23
|
if (cacheOverride === true) {
|
|
25
24
|
fetchRemiListActions.push((0, reimbursementConfigReducer_1.fetchReimbursementConfig)());
|
|
26
|
-
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)));
|
|
27
26
|
}
|
|
28
27
|
else {
|
|
29
28
|
if (state.reimbursementConfigState.fetchState !== 'Completed' &&
|
|
@@ -34,7 +33,7 @@ const fetchRemiListEpic = (actions$, state$) => actions$.pipe((0, operators_1.fi
|
|
|
34
33
|
const key = (0, remiListState_1.getRemiListKey)(period, tab);
|
|
35
34
|
const remis = (0, get_1.default)(state.remiListState.byRemiListKey, key, undefined);
|
|
36
35
|
if (remis == null || remis.hasValidState() === false) {
|
|
37
|
-
fetchRemiListActions.push((0, remiListReducer_1.fetchRemiListPerTab)(period, tab, isShowDeletedReimbursementEnabled, isIncludeLineItems
|
|
36
|
+
fetchRemiListActions.push((0, remiListReducer_1.fetchRemiListPerTab)(period, tab, isShowDeletedReimbursementEnabled, isIncludeLineItems));
|
|
38
37
|
}
|
|
39
38
|
});
|
|
40
39
|
}
|
|
@@ -10,7 +10,7 @@ const userReducer_1 = require("../../../../entity/user/userReducer");
|
|
|
10
10
|
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
|
-
const { period, tab, isShowDeletedReimbursementEnabled, isIncludeLineItems,
|
|
13
|
+
const { period, tab, isShowDeletedReimbursementEnabled, isIncludeLineItems, } = action.payload;
|
|
14
14
|
const queryParam = {
|
|
15
15
|
start_date: (0, timePeriod_1.toString)(period.start),
|
|
16
16
|
end_date: (0, timePeriod_1.toString)(period.end),
|
|
@@ -26,7 +26,6 @@ const fetchRemiListPerTabEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0
|
|
|
26
26
|
? tab !== 'draft'
|
|
27
27
|
: false,
|
|
28
28
|
is_include_line_items: isIncludeLineItems ? tab !== 'draft' : false,
|
|
29
|
-
is_refresh_account_and_accounting_class: isRefreshAccountAndAccountingClass,
|
|
30
29
|
};
|
|
31
30
|
return zeniAPI
|
|
32
31
|
.getJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/reimbursements/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
@@ -4,19 +4,17 @@ 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,
|
|
7
|
+
export declare const fetchRemiList: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, cacheOverride: any, isShowDeletedReimbursementEnabled: boolean, isIncludeLineItems: boolean, isBulkActionCompleteRefresh?: any], {
|
|
8
8
|
period: TimePeriod;
|
|
9
9
|
cacheOverride: any;
|
|
10
10
|
isShowDeletedReimbursementEnabled: boolean;
|
|
11
11
|
isIncludeLineItems: boolean;
|
|
12
|
-
isRefreshAccountAndAccountingClass: boolean;
|
|
13
12
|
isBulkActionCompleteRefresh: any;
|
|
14
|
-
}, "remiList/fetchRemiList", never, never>, fetchRemiListPerTab: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, tab: "paid" | "pending_approval" | "scheduled" | "draft", isShowDeletedReimbursementEnabled: boolean, isIncludeLineItems: boolean
|
|
13
|
+
}, "remiList/fetchRemiList", never, never>, fetchRemiListPerTab: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, tab: "paid" | "pending_approval" | "scheduled" | "draft", isShowDeletedReimbursementEnabled: boolean, isIncludeLineItems: boolean], {
|
|
15
14
|
period: TimePeriod;
|
|
16
15
|
tab: "paid" | "pending_approval" | "scheduled" | "draft";
|
|
17
16
|
isShowDeletedReimbursementEnabled: boolean;
|
|
18
17
|
isIncludeLineItems: boolean;
|
|
19
|
-
isRefreshAccountAndAccountingClass: any;
|
|
20
18
|
}, "remiList/fetchRemiListPerTab", never, never>, updateRemiListByStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
21
19
|
remiList: RemiListPayload;
|
|
22
20
|
tab: RemiTabType;
|
|
@@ -34,15 +34,13 @@ const remiList = (0, toolkit_1.createSlice)({
|
|
|
34
34
|
reducer() {
|
|
35
35
|
//do nothing
|
|
36
36
|
},
|
|
37
|
-
prepare(period, tab, isShowDeletedReimbursementEnabled, isIncludeLineItems
|
|
38
|
-
console.log('*************** fetchRemiListPerTab --- isRefreshAccountAndAccountingClass *****************', isRefreshAccountAndAccountingClass);
|
|
37
|
+
prepare(period, tab, isShowDeletedReimbursementEnabled, isIncludeLineItems) {
|
|
39
38
|
return {
|
|
40
39
|
payload: {
|
|
41
40
|
period,
|
|
42
41
|
tab,
|
|
43
42
|
isShowDeletedReimbursementEnabled,
|
|
44
43
|
isIncludeLineItems,
|
|
45
|
-
isRefreshAccountAndAccountingClass,
|
|
46
44
|
},
|
|
47
45
|
};
|
|
48
46
|
},
|
|
@@ -71,22 +69,13 @@ const remiList = (0, toolkit_1.createSlice)({
|
|
|
71
69
|
: 'In-Progress', error: undefined });
|
|
72
70
|
});
|
|
73
71
|
},
|
|
74
|
-
prepare(period, cacheOverride = false, isShowDeletedReimbursementEnabled, isIncludeLineItems,
|
|
75
|
-
console.log('*************** fetchRemiList ---- ALL ARGUMENTS *****************', {
|
|
76
|
-
period,
|
|
77
|
-
cacheOverride,
|
|
78
|
-
isShowDeletedReimbursementEnabled,
|
|
79
|
-
isIncludeLineItems,
|
|
80
|
-
isRefreshAccountAndAccountingClass,
|
|
81
|
-
isBulkActionCompleteRefresh,
|
|
82
|
-
});
|
|
72
|
+
prepare(period, cacheOverride = false, isShowDeletedReimbursementEnabled, isIncludeLineItems, isBulkActionCompleteRefresh = false) {
|
|
83
73
|
return {
|
|
84
74
|
payload: {
|
|
85
75
|
period,
|
|
86
76
|
cacheOverride,
|
|
87
77
|
isShowDeletedReimbursementEnabled,
|
|
88
78
|
isIncludeLineItems,
|
|
89
|
-
isRefreshAccountAndAccountingClass,
|
|
90
79
|
isBulkActionCompleteRefresh,
|
|
91
80
|
},
|
|
92
81
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.19.4
|
|
3
|
+
"version": "4.19.4",
|
|
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",
|