@zeniai/client-epic-state 4.19.3 → 4.19.4-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.
- package/lib/view/spendManagement/reimbursement/remiListView/fetchRemiListEpic.js +3 -3
- package/lib/view/spendManagement/reimbursement/remiListView/fetchRemiListPerTabEpic.js +2 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +4 -2
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.js +4 -2
- 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
|
}
|
|
@@ -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, } = action.payload;
|
|
13
|
+
const { period, tab, isShowDeletedReimbursementEnabled, isIncludeLineItems, isRefreshAccountAndAccountingClass, } = 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,6 +26,7 @@ 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,
|
|
29
30
|
};
|
|
30
31
|
return zeniAPI
|
|
31
32
|
.getJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/reimbursements/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
@@ -4,17 +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?: any], {
|
|
7
|
+
export declare const fetchRemiList: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, cacheOverride: any, isShowDeletedReimbursementEnabled: boolean, isIncludeLineItems: boolean, isBulkActionCompleteRefresh?: any, isRefreshAccountAndAccountingClass?: any], {
|
|
8
8
|
period: TimePeriod;
|
|
9
9
|
cacheOverride: any;
|
|
10
10
|
isShowDeletedReimbursementEnabled: boolean;
|
|
11
11
|
isIncludeLineItems: boolean;
|
|
12
12
|
isBulkActionCompleteRefresh: any;
|
|
13
|
-
|
|
13
|
+
isRefreshAccountAndAccountingClass: any;
|
|
14
|
+
}, "remiList/fetchRemiList", never, never>, fetchRemiListPerTab: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, tab: "paid" | "pending_approval" | "scheduled" | "draft", isShowDeletedReimbursementEnabled: boolean, isIncludeLineItems: boolean, isRefreshAccountAndAccountingClass?: any], {
|
|
14
15
|
period: TimePeriod;
|
|
15
16
|
tab: "paid" | "pending_approval" | "scheduled" | "draft";
|
|
16
17
|
isShowDeletedReimbursementEnabled: boolean;
|
|
17
18
|
isIncludeLineItems: boolean;
|
|
19
|
+
isRefreshAccountAndAccountingClass: any;
|
|
18
20
|
}, "remiList/fetchRemiListPerTab", never, never>, updateRemiListByStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
19
21
|
remiList: RemiListPayload;
|
|
20
22
|
tab: RemiTabType;
|
|
@@ -34,13 +34,14 @@ const remiList = (0, toolkit_1.createSlice)({
|
|
|
34
34
|
reducer() {
|
|
35
35
|
//do nothing
|
|
36
36
|
},
|
|
37
|
-
prepare(period, tab, isShowDeletedReimbursementEnabled, isIncludeLineItems) {
|
|
37
|
+
prepare(period, tab, isShowDeletedReimbursementEnabled, isIncludeLineItems, isRefreshAccountAndAccountingClass = true) {
|
|
38
38
|
return {
|
|
39
39
|
payload: {
|
|
40
40
|
period,
|
|
41
41
|
tab,
|
|
42
42
|
isShowDeletedReimbursementEnabled,
|
|
43
43
|
isIncludeLineItems,
|
|
44
|
+
isRefreshAccountAndAccountingClass,
|
|
44
45
|
},
|
|
45
46
|
};
|
|
46
47
|
},
|
|
@@ -69,7 +70,7 @@ const remiList = (0, toolkit_1.createSlice)({
|
|
|
69
70
|
: 'In-Progress', error: undefined });
|
|
70
71
|
});
|
|
71
72
|
},
|
|
72
|
-
prepare(period, cacheOverride = false, isShowDeletedReimbursementEnabled, isIncludeLineItems, isBulkActionCompleteRefresh = false) {
|
|
73
|
+
prepare(period, cacheOverride = false, isShowDeletedReimbursementEnabled, isIncludeLineItems, isBulkActionCompleteRefresh = false, isRefreshAccountAndAccountingClass = true) {
|
|
73
74
|
return {
|
|
74
75
|
payload: {
|
|
75
76
|
period,
|
|
@@ -77,6 +78,7 @@ const remiList = (0, toolkit_1.createSlice)({
|
|
|
77
78
|
isShowDeletedReimbursementEnabled,
|
|
78
79
|
isIncludeLineItems,
|
|
79
80
|
isBulkActionCompleteRefresh,
|
|
81
|
+
isRefreshAccountAndAccountingClass,
|
|
80
82
|
},
|
|
81
83
|
};
|
|
82
84
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.19.
|
|
3
|
+
"version": "4.19.4-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
|
"types": "lib/index.d.ts",
|