@zeniai/client-epic-state 4.19.1-betaVR1 → 4.19.2-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/recommendation/fetchEntityRecommendationsByTransactionIdEpic.js +5 -3
- package/lib/view/spendManagement/reimbursement/remiListView/fetchRemiListPerTabEpic.js +5 -16
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +2 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.js +5 -5
- package/package.json +1 -1
|
@@ -19,14 +19,16 @@ const fetchEntityRecommendationsByTransactionIdEpic = (actions$, state$, zeniAPI
|
|
|
19
19
|
transaction_id: (0, transactionDetailState_1.getActualTransactionID)(transactionDetails.transactionId.id),
|
|
20
20
|
transaction_type: transactionDetails.transaction.type,
|
|
21
21
|
line_ids: transactionDetails.lineIds,
|
|
22
|
-
entity_name: entity.name,
|
|
23
|
-
entity_type: entity.type,
|
|
24
22
|
};
|
|
25
23
|
if (isFetchCOT === true) {
|
|
26
24
|
query.include_cot = true;
|
|
27
25
|
}
|
|
26
|
+
const entityQuery = {
|
|
27
|
+
entity_name: entity.name,
|
|
28
|
+
entity_type: entity.type,
|
|
29
|
+
};
|
|
28
30
|
const recommendationUrl = entity.qboId === entity.name // eneity id null case handle here
|
|
29
|
-
? `${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/recommendations?query=${encodeURIComponent(JSON.stringify(
|
|
31
|
+
? `${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/recommendations?query=${encodeURIComponent(JSON.stringify(entityQuery))}`
|
|
30
32
|
: `${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/${(0, exports.toEntityTypeURL)(entity.type)}/${entity.qboId}/recommendations?query=${encodeURIComponent(JSON.stringify(query))}`;
|
|
31
33
|
return zeniAPI
|
|
32
34
|
.getJSON(recommendationUrl)
|
|
@@ -10,23 +10,12 @@ 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;
|
|
14
|
-
const queryParam = {
|
|
15
|
-
start_date: (0, timePeriod_1.toString)(period.start),
|
|
16
|
-
end_date: (0, timePeriod_1.toString)(period.end),
|
|
17
|
-
sort_by: 'reimbursement_date',
|
|
18
|
-
sort_order: 'desc',
|
|
19
|
-
reimbursement_provider: 'zeni',
|
|
20
|
-
reimbursement_stage_code: tab,
|
|
21
|
-
is_include_reimbursee_users_info: true,
|
|
22
|
-
is_include_approval_info: tab === 'pending_approval',
|
|
23
|
-
is_include_pending_approval_transaction_ids_for_user: tab === 'pending_approval',
|
|
24
|
-
transaction_type: 'reimbursement',
|
|
25
|
-
is_include_deleted: isShowDeletedReimbursementEnabled
|
|
13
|
+
const { period, tab, isShowDeletedReimbursementEnabled, isIncludeLineItems, isRefreshAccountAndAccountingClass, } = action.payload;
|
|
14
|
+
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
|
|
26
15
|
? tab !== 'draft'
|
|
27
|
-
: false,
|
|
28
|
-
|
|
29
|
-
};
|
|
16
|
+
: false, is_include_line_items: isIncludeLineItems ? tab !== 'draft' : false }, (isRefreshAccountAndAccountingClass === false && {
|
|
17
|
+
is_refresh_account_and_accounting_class: false,
|
|
18
|
+
}));
|
|
30
19
|
return zeniAPI
|
|
31
20
|
.getJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/reimbursements/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
32
21
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
@@ -10,7 +10,8 @@ export declare const fetchRemiList: import("@reduxjs/toolkit").ActionCreatorWith
|
|
|
10
10
|
isShowDeletedReimbursementEnabled: boolean;
|
|
11
11
|
isIncludeLineItems: boolean;
|
|
12
12
|
isBulkActionCompleteRefresh: any;
|
|
13
|
-
}, "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, isRefreshAccountAndAccountingClass?: boolean | undefined], {
|
|
14
|
+
isRefreshAccountAndAccountingClass?: boolean | undefined;
|
|
14
15
|
period: TimePeriod;
|
|
15
16
|
tab: "paid" | "pending_approval" | "scheduled" | "draft";
|
|
16
17
|
isShowDeletedReimbursementEnabled: boolean;
|
|
@@ -34,14 +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) {
|
|
38
38
|
return {
|
|
39
|
-
payload: {
|
|
40
|
-
period,
|
|
39
|
+
payload: Object.assign({ period,
|
|
41
40
|
tab,
|
|
42
41
|
isShowDeletedReimbursementEnabled,
|
|
43
|
-
isIncludeLineItems,
|
|
44
|
-
|
|
42
|
+
isIncludeLineItems }, (isRefreshAccountAndAccountingClass !== undefined && {
|
|
43
|
+
isRefreshAccountAndAccountingClass,
|
|
44
|
+
})),
|
|
45
45
|
};
|
|
46
46
|
},
|
|
47
47
|
},
|
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.2-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",
|