@zeniai/client-epic-state 4.19.96-betaJK4 → 4.19.96-betaJK5
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/esm/view/expenseAutomationView/epics/accountRecon/fetchReconExcludedAccountsEpic.js +2 -7
- package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +5 -12
- package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconExcludedAccountsEpic.js +2 -7
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +1 -4
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +5 -12
- package/package.json +1 -1
package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconExcludedAccountsEpic.js
CHANGED
|
@@ -2,14 +2,9 @@ import { of } from 'rxjs';
|
|
|
2
2
|
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
3
3
|
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
|
|
4
4
|
import { fetchReconExcludedAccounts, fetchReconExcludedAccountsFailure, fetchReconExcludedAccountsSuccess, } from '../../reducers/reconciliationViewReducer';
|
|
5
|
-
export const fetchReconExcludedAccountsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchReconExcludedAccounts.match), mergeMap((
|
|
6
|
-
const { accountId, exclusionReason } = action.payload;
|
|
7
|
-
const requestPayload = {
|
|
8
|
-
account_id: accountId,
|
|
9
|
-
exclusion_reason: exclusionReason,
|
|
10
|
-
};
|
|
5
|
+
export const fetchReconExcludedAccountsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchReconExcludedAccounts.match), mergeMap(() => {
|
|
11
6
|
return zeniAPI
|
|
12
|
-
.
|
|
7
|
+
.getJSON(`${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/1.0/reconciliation/excluded-accounts`)
|
|
13
8
|
.pipe(mergeMap((response) => {
|
|
14
9
|
if (isSuccessResponse(response) && response.data != null) {
|
|
15
10
|
return of(fetchReconExcludedAccountsSuccess({
|
|
@@ -427,18 +427,11 @@ const expenseAutomationReconciliationView = createSlice({
|
|
|
427
427
|
updateStatementUploadChosen: (draft, action) => {
|
|
428
428
|
draft.statementUploadChosen = action.payload.statementUploadChosen;
|
|
429
429
|
},
|
|
430
|
-
fetchReconExcludedAccounts: {
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
};
|
|
436
|
-
},
|
|
437
|
-
prepare(accountId, exclusionReason) {
|
|
438
|
-
return {
|
|
439
|
-
payload: { accountId, exclusionReason },
|
|
440
|
-
};
|
|
441
|
-
},
|
|
430
|
+
fetchReconExcludedAccounts: (draft) => {
|
|
431
|
+
draft.excludedAccountsFetchState = {
|
|
432
|
+
fetchState: 'In-Progress',
|
|
433
|
+
error: undefined,
|
|
434
|
+
};
|
|
442
435
|
},
|
|
443
436
|
fetchReconExcludedAccountsSuccess: (draft, action) => {
|
|
444
437
|
draft.excludedAccountsFetchState = {
|
|
@@ -5,14 +5,9 @@ const rxjs_1 = require("rxjs");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const responsePayload_1 = require("../../../../responsePayload");
|
|
7
7
|
const reconciliationViewReducer_1 = require("../../reducers/reconciliationViewReducer");
|
|
8
|
-
const fetchReconExcludedAccountsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(reconciliationViewReducer_1.fetchReconExcludedAccounts.match), (0, operators_1.mergeMap)((
|
|
9
|
-
const { accountId, exclusionReason } = action.payload;
|
|
10
|
-
const requestPayload = {
|
|
11
|
-
account_id: accountId,
|
|
12
|
-
exclusion_reason: exclusionReason,
|
|
13
|
-
};
|
|
8
|
+
const fetchReconExcludedAccountsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(reconciliationViewReducer_1.fetchReconExcludedAccounts.match), (0, operators_1.mergeMap)(() => {
|
|
14
9
|
return zeniAPI
|
|
15
|
-
.
|
|
10
|
+
.getJSON(`${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/1.0/reconciliation/excluded-accounts`)
|
|
16
11
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
17
12
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
18
13
|
return (0, rxjs_1.of)((0, reconciliationViewReducer_1.fetchReconExcludedAccountsSuccess)({
|
|
@@ -99,10 +99,7 @@ export declare const fetchReconciliation: import("@reduxjs/toolkit").ActionCreat
|
|
|
99
99
|
selectedPeriod: MonthYearPeriod;
|
|
100
100
|
}, "expenseAutomationReconciliationView/uploadAccountStatementFailure">, updateStatementUploadChosen: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
101
101
|
statementUploadChosen: boolean;
|
|
102
|
-
}, "expenseAutomationReconciliationView/updateStatementUploadChosen">, fetchReconExcludedAccounts: import("@reduxjs/toolkit").
|
|
103
|
-
accountId: string;
|
|
104
|
-
exclusionReason: string;
|
|
105
|
-
}, "expenseAutomationReconciliationView/fetchReconExcludedAccounts", never, never>, fetchReconExcludedAccountsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
102
|
+
}, "expenseAutomationReconciliationView/updateStatementUploadChosen">, fetchReconExcludedAccounts: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationReconciliationView/fetchReconExcludedAccounts">, fetchReconExcludedAccountsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
106
103
|
excludedAccounts: ExcludedAccountPayload[];
|
|
107
104
|
}, "expenseAutomationReconciliationView/fetchReconExcludedAccountsSuccess">, fetchReconExcludedAccountsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
108
105
|
error: ZeniAPIStatus;
|
|
@@ -431,18 +431,11 @@ const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
|
|
|
431
431
|
updateStatementUploadChosen: (draft, action) => {
|
|
432
432
|
draft.statementUploadChosen = action.payload.statementUploadChosen;
|
|
433
433
|
},
|
|
434
|
-
fetchReconExcludedAccounts: {
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
};
|
|
440
|
-
},
|
|
441
|
-
prepare(accountId, exclusionReason) {
|
|
442
|
-
return {
|
|
443
|
-
payload: { accountId, exclusionReason },
|
|
444
|
-
};
|
|
445
|
-
},
|
|
434
|
+
fetchReconExcludedAccounts: (draft) => {
|
|
435
|
+
draft.excludedAccountsFetchState = {
|
|
436
|
+
fetchState: 'In-Progress',
|
|
437
|
+
error: undefined,
|
|
438
|
+
};
|
|
446
439
|
},
|
|
447
440
|
fetchReconExcludedAccountsSuccess: (draft, action) => {
|
|
448
441
|
draft.excludedAccountsFetchState = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.19.96-
|
|
3
|
+
"version": "4.19.96-betaJK5",
|
|
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
|
"module": "lib/esm/index.js",
|