@zeniai/client-epic-state 5.2.35-beta5MM → 5.2.35-beta7MM
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/index.js +3 -3
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/matchAndReverseAccrualsEpic.js +29 -9
- package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +5 -9
- package/lib/esm/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +1 -9
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +13 -3
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/prefetchOtherJeSchedulesTabEpic.js +35 -16
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +0 -5
- package/lib/esm/view/expenseAutomationView/expenseAutomationViewReducer.js +2 -1
- package/lib/esm/view/expenseAutomationView/reducers/actualMatchingViewReducer.js +8 -3
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -1
- package/lib/esm/view/expenseAutomationView/selectors/actualMatchingViewSelector.js +3 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.js +20 -18
- package/lib/view/expenseAutomationView/epics/actualMatching/matchAndReverseAccrualsEpic.js +29 -9
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.d.ts +1 -2
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +5 -9
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.d.ts +1 -2
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +1 -9
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.d.ts +2 -1
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +13 -3
- package/lib/view/expenseAutomationView/epics/jeSchedule/prefetchOtherJeSchedulesTabEpic.d.ts +5 -1
- package/lib/view/expenseAutomationView/epics/jeSchedule/prefetchOtherJeSchedulesTabEpic.js +34 -15
- package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.d.ts +1 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +0 -5
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +2 -1
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +2 -1
- package/lib/view/expenseAutomationView/reducers/actualMatchingViewReducer.d.ts +1 -1
- package/lib/view/expenseAutomationView/reducers/actualMatchingViewReducer.js +9 -4
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -1
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -1
- package/lib/view/expenseAutomationView/selectors/actualMatchingViewSelector.d.ts +2 -2
- package/lib/view/expenseAutomationView/selectors/actualMatchingViewSelector.js +4 -1
- package/lib/view/expenseAutomationView/types/actualMatchingViewState.d.ts +1 -1
- package/package.json +1 -1
|
@@ -2,9 +2,10 @@ import { ID } from '../../commonStateTypes/common';
|
|
|
2
2
|
import { MonthYearPeriod } from '../../commonStateTypes/timePeriod';
|
|
3
3
|
import { ExpenseAutomationViewState } from './expenseAutomationViewState';
|
|
4
4
|
export declare const initialState: ExpenseAutomationViewState;
|
|
5
|
-
export declare const fetchAllExpenseAutomationTabs: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cacheOverride?: boolean | undefined, refreshViewInBackground?: boolean | undefined], {
|
|
5
|
+
export declare const fetchAllExpenseAutomationTabs: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cacheOverride?: boolean | undefined, refreshViewInBackground?: boolean | undefined, isAccrualEnabled?: boolean | undefined], {
|
|
6
6
|
cacheOverride: boolean;
|
|
7
7
|
refreshViewInBackground: boolean;
|
|
8
|
+
isAccrualEnabled: boolean;
|
|
8
9
|
}, "expenseAutomationView/fetchAllExpenseAutomationTabs", never, never>, updateCurrentSelectedPeriod: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, newSelectedPeriod: MonthYearPeriod], {
|
|
9
10
|
newSelectedPeriod: MonthYearPeriod;
|
|
10
11
|
tenantId: string;
|
|
@@ -23,11 +23,12 @@ const expenseAutomationView = (0, toolkit_1.createSlice)({
|
|
|
23
23
|
reducer() {
|
|
24
24
|
//do nothing
|
|
25
25
|
},
|
|
26
|
-
prepare(cacheOverride = false, refreshViewInBackground = false) {
|
|
26
|
+
prepare(cacheOverride = false, refreshViewInBackground = false, isAccrualEnabled = false) {
|
|
27
27
|
return {
|
|
28
28
|
payload: {
|
|
29
29
|
cacheOverride,
|
|
30
30
|
refreshViewInBackground,
|
|
31
|
+
isAccrualEnabled,
|
|
31
32
|
},
|
|
32
33
|
};
|
|
33
34
|
},
|
|
@@ -7,7 +7,7 @@ export declare const initialTransactionSearchState: ActualMatchingTransactionSea
|
|
|
7
7
|
export declare const initialAccrualSearchState: ActualMatchingAccrualSearchState;
|
|
8
8
|
export declare const initialMatchModalState: ActualMatchingMatchModalState;
|
|
9
9
|
export declare const initialState: ActualMatchingViewState;
|
|
10
|
-
export declare const clearActualMatchingView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationActualMatchingView/clearActualMatchingView">, clearMatchNewModal: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationActualMatchingView/clearMatchNewModal">, closeMatchNewModal: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationActualMatchingView/closeMatchNewModal">, fetchActualMatching: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any], {
|
|
10
|
+
export declare const ackCloseMatchAfterUndo: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationActualMatchingView/ackCloseMatchAfterUndo">, clearActualMatchingView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationActualMatchingView/clearActualMatchingView">, clearMatchNewModal: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationActualMatchingView/clearMatchNewModal">, closeMatchNewModal: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationActualMatchingView/closeMatchNewModal">, fetchActualMatching: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any], {
|
|
11
11
|
period: TimePeriod;
|
|
12
12
|
refreshViewInBackground: any;
|
|
13
13
|
}, "expenseAutomationActualMatchingView/fetchActualMatching", never, never>, fetchActualMatchingFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.updateActualMatchingUIState = exports.undoReversalAccrualsSuccess = exports.undoReversalAccrualsFailure = exports.undoReversalAccruals = exports.searchMatchTransactionsSuccess = exports.searchMatchTransactionsFailure = exports.searchMatchTransactions = exports.searchMatchAccrualsSuccess = exports.searchMatchAccrualsFailure = exports.searchMatchAccruals = exports.openMatchNewModal = exports.matchAndReverseAccrualsSuccess = exports.matchAndReverseAccrualsFailure = exports.matchAndReverseAccruals = exports.fetchActualMatchingSuccess = exports.fetchActualMatchingPage = exports.fetchActualMatchingMatchSuccess = exports.fetchActualMatchingMatchFailure = exports.fetchActualMatchingMatch = exports.fetchActualMatchingFailure = exports.fetchActualMatching = exports.closeMatchNewModal = exports.clearMatchNewModal = exports.clearActualMatchingView = exports.initialState = exports.initialMatchModalState = exports.initialAccrualSearchState = exports.initialTransactionSearchState = void 0;
|
|
4
|
+
exports.updateActualMatchingUIState = exports.undoReversalAccrualsSuccess = exports.undoReversalAccrualsFailure = exports.undoReversalAccruals = exports.searchMatchTransactionsSuccess = exports.searchMatchTransactionsFailure = exports.searchMatchTransactions = exports.searchMatchAccrualsSuccess = exports.searchMatchAccrualsFailure = exports.searchMatchAccruals = exports.openMatchNewModal = exports.matchAndReverseAccrualsSuccess = exports.matchAndReverseAccrualsFailure = exports.matchAndReverseAccruals = exports.fetchActualMatchingSuccess = exports.fetchActualMatchingPage = exports.fetchActualMatchingMatchSuccess = exports.fetchActualMatchingMatchFailure = exports.fetchActualMatchingMatch = exports.fetchActualMatchingFailure = exports.fetchActualMatching = exports.closeMatchNewModal = exports.clearMatchNewModal = exports.clearActualMatchingView = exports.ackCloseMatchAfterUndo = exports.initialState = exports.initialMatchModalState = exports.initialAccrualSearchState = exports.initialTransactionSearchState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
7
7
|
const jeScheduleHelper_1 = require("../../../entity/jeSchedules/jeScheduleHelper");
|
|
@@ -49,7 +49,7 @@ exports.initialState = {
|
|
|
49
49
|
},
|
|
50
50
|
matchModal: exports.initialMatchModalState,
|
|
51
51
|
undoReversalStatusByMatchId: {},
|
|
52
|
-
|
|
52
|
+
closeMatchAfterUndo: false,
|
|
53
53
|
lastMatchResultsByMatchId: {},
|
|
54
54
|
hasValidState() {
|
|
55
55
|
return this.fetchState == 'Completed';
|
|
@@ -367,12 +367,17 @@ const expenseAutomationActualMatchingView = (0, toolkit_1.createSlice)({
|
|
|
367
367
|
fetchState: 'Completed',
|
|
368
368
|
error: undefined,
|
|
369
369
|
};
|
|
370
|
-
draft.
|
|
370
|
+
draft.closeMatchAfterUndo =
|
|
371
|
+
results.length > 0 &&
|
|
372
|
+
results.every((result) => result.status === 'undone');
|
|
371
373
|
},
|
|
372
374
|
prepare(matchId, results) {
|
|
373
375
|
return { payload: { matchId, results } };
|
|
374
376
|
},
|
|
375
377
|
},
|
|
378
|
+
ackCloseMatchAfterUndo(draft) {
|
|
379
|
+
draft.closeMatchAfterUndo = false;
|
|
380
|
+
},
|
|
376
381
|
undoReversalAccrualsFailure(draft, action) {
|
|
377
382
|
draft.undoReversalStatusByMatchId[action.payload.matchId] = {
|
|
378
383
|
fetchState: 'Error',
|
|
@@ -389,5 +394,5 @@ const expenseAutomationActualMatchingView = (0, toolkit_1.createSlice)({
|
|
|
389
394
|
});
|
|
390
395
|
},
|
|
391
396
|
});
|
|
392
|
-
_a = expenseAutomationActualMatchingView.actions, exports.clearActualMatchingView = _a.clearActualMatchingView, exports.clearMatchNewModal = _a.clearMatchNewModal, exports.closeMatchNewModal = _a.closeMatchNewModal, exports.fetchActualMatching = _a.fetchActualMatching, exports.fetchActualMatchingFailure = _a.fetchActualMatchingFailure, exports.fetchActualMatchingMatch = _a.fetchActualMatchingMatch, exports.fetchActualMatchingMatchFailure = _a.fetchActualMatchingMatchFailure, exports.fetchActualMatchingMatchSuccess = _a.fetchActualMatchingMatchSuccess, exports.fetchActualMatchingPage = _a.fetchActualMatchingPage, exports.fetchActualMatchingSuccess = _a.fetchActualMatchingSuccess, exports.matchAndReverseAccruals = _a.matchAndReverseAccruals, exports.matchAndReverseAccrualsFailure = _a.matchAndReverseAccrualsFailure, exports.matchAndReverseAccrualsSuccess = _a.matchAndReverseAccrualsSuccess, exports.openMatchNewModal = _a.openMatchNewModal, exports.searchMatchAccruals = _a.searchMatchAccruals, exports.searchMatchAccrualsFailure = _a.searchMatchAccrualsFailure, exports.searchMatchAccrualsSuccess = _a.searchMatchAccrualsSuccess, exports.searchMatchTransactions = _a.searchMatchTransactions, exports.searchMatchTransactionsFailure = _a.searchMatchTransactionsFailure, exports.searchMatchTransactionsSuccess = _a.searchMatchTransactionsSuccess, exports.undoReversalAccruals = _a.undoReversalAccruals, exports.undoReversalAccrualsFailure = _a.undoReversalAccrualsFailure, exports.undoReversalAccrualsSuccess = _a.undoReversalAccrualsSuccess, exports.updateActualMatchingUIState = _a.updateActualMatchingUIState;
|
|
397
|
+
_a = expenseAutomationActualMatchingView.actions, exports.ackCloseMatchAfterUndo = _a.ackCloseMatchAfterUndo, exports.clearActualMatchingView = _a.clearActualMatchingView, exports.clearMatchNewModal = _a.clearMatchNewModal, exports.closeMatchNewModal = _a.closeMatchNewModal, exports.fetchActualMatching = _a.fetchActualMatching, exports.fetchActualMatchingFailure = _a.fetchActualMatchingFailure, exports.fetchActualMatchingMatch = _a.fetchActualMatchingMatch, exports.fetchActualMatchingMatchFailure = _a.fetchActualMatchingMatchFailure, exports.fetchActualMatchingMatchSuccess = _a.fetchActualMatchingMatchSuccess, exports.fetchActualMatchingPage = _a.fetchActualMatchingPage, exports.fetchActualMatchingSuccess = _a.fetchActualMatchingSuccess, exports.matchAndReverseAccruals = _a.matchAndReverseAccruals, exports.matchAndReverseAccrualsFailure = _a.matchAndReverseAccrualsFailure, exports.matchAndReverseAccrualsSuccess = _a.matchAndReverseAccrualsSuccess, exports.openMatchNewModal = _a.openMatchNewModal, exports.searchMatchAccruals = _a.searchMatchAccruals, exports.searchMatchAccrualsFailure = _a.searchMatchAccrualsFailure, exports.searchMatchAccrualsSuccess = _a.searchMatchAccrualsSuccess, exports.searchMatchTransactions = _a.searchMatchTransactions, exports.searchMatchTransactionsFailure = _a.searchMatchTransactionsFailure, exports.searchMatchTransactionsSuccess = _a.searchMatchTransactionsSuccess, exports.undoReversalAccruals = _a.undoReversalAccruals, exports.undoReversalAccrualsFailure = _a.undoReversalAccrualsFailure, exports.undoReversalAccrualsSuccess = _a.undoReversalAccrualsSuccess, exports.updateActualMatchingUIState = _a.updateActualMatchingUIState;
|
|
393
398
|
exports.default = expenseAutomationActualMatchingView.reducer;
|
|
@@ -51,9 +51,10 @@ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/too
|
|
|
51
51
|
selectedPageTab: JEPageTab;
|
|
52
52
|
selectedPeriod: MonthYearPeriod;
|
|
53
53
|
status: ZeniAPIStatus;
|
|
54
|
-
}, "expenseAutomationJESchedulesView/fetchJeSchedulesFailure">, fetchJeSchedulesPage: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any], {
|
|
54
|
+
}, "expenseAutomationJESchedulesView/fetchJeSchedulesFailure">, fetchJeSchedulesPage: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any, isAccrualEnabled?: any], {
|
|
55
55
|
period: TimePeriod;
|
|
56
56
|
refreshViewInBackground: any;
|
|
57
|
+
isAccrualEnabled: any;
|
|
57
58
|
}, "expenseAutomationJESchedulesView/fetchJeSchedulesPage", never, never>, fetchJeSchedulesSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
58
59
|
accruedJeSchedules: JEAccruedScheduledTransactionPayload[];
|
|
59
60
|
failedJeSchedules: JEScheduledTransactionPayload[];
|
|
@@ -111,11 +111,12 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
|
|
|
111
111
|
initialState: exports.initialState,
|
|
112
112
|
reducers: {
|
|
113
113
|
fetchJeSchedulesPage: {
|
|
114
|
-
prepare(period, refreshViewInBackground = false) {
|
|
114
|
+
prepare(period, refreshViewInBackground = false, isAccrualEnabled = false) {
|
|
115
115
|
return {
|
|
116
116
|
payload: {
|
|
117
117
|
period,
|
|
118
118
|
refreshViewInBackground,
|
|
119
|
+
isAccrualEnabled,
|
|
119
120
|
},
|
|
120
121
|
};
|
|
121
122
|
},
|
|
@@ -8,7 +8,7 @@ import { JEOneTimeAccrualMatchSuggestion } from '../../../entity/jeSchedules/jeS
|
|
|
8
8
|
import { RootState } from '../../../rootStateTypes';
|
|
9
9
|
import { ZeniDate } from '../../../zeniDayJS';
|
|
10
10
|
import { ActualMatchingKpiSummary, ActualMatchingRow, ActualMatchingRowKind, ExpenseAutomationActualMatchingViewSelector } from '../selectorTypes/actualMatchingViewSelectorTypes';
|
|
11
|
-
import { MatchAndReverseResult
|
|
11
|
+
import { MatchAndReverseResult } from '../types/actualMatchingViewState';
|
|
12
12
|
export declare function getSelectedMonthYearForCurrentTenant(state: RootState): MonthYearPeriod | undefined;
|
|
13
13
|
export declare function getTenantDisplayCurrency(state: RootState): DisplayCurrencyFallback | undefined;
|
|
14
14
|
export declare function parseActualMatchingMatchId(matchId: string): {
|
|
@@ -30,8 +30,8 @@ export interface ExpenseAutomationActualMatchingMatchView {
|
|
|
30
30
|
refreshStatus: FetchStateAndError;
|
|
31
31
|
undoReversalStatus: FetchStateAndError;
|
|
32
32
|
lastMatchResults?: MatchAndReverseResult[];
|
|
33
|
-
lastUndoResults?: UndoReversalResult[];
|
|
34
33
|
match?: ActualMatchingMatch;
|
|
35
34
|
}
|
|
36
35
|
export declare function getExpenseAutomationActualMatchingMatchView(state: RootState, matchId: ActualMatchingMatchId): ExpenseAutomationActualMatchingMatchView;
|
|
36
|
+
export declare function getCloseMatchAfterUndo(state: RootState): boolean;
|
|
37
37
|
export declare function getExpenseAutomationActualMatchingView(state: RootState): ExpenseAutomationActualMatchingViewSelector;
|
|
@@ -15,6 +15,7 @@ exports.getActualMatchingAmount = getActualMatchingAmount;
|
|
|
15
15
|
exports.getActualMatchingReversalDate = getActualMatchingReversalDate;
|
|
16
16
|
exports.buildActualMatchingKpiSummary = buildActualMatchingKpiSummary;
|
|
17
17
|
exports.getExpenseAutomationActualMatchingMatchView = getExpenseAutomationActualMatchingMatchView;
|
|
18
|
+
exports.getCloseMatchAfterUndo = getCloseMatchAfterUndo;
|
|
18
19
|
exports.getExpenseAutomationActualMatchingView = getExpenseAutomationActualMatchingView;
|
|
19
20
|
const orderBy_1 = __importDefault(require("lodash/orderBy"));
|
|
20
21
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
@@ -331,10 +332,12 @@ function getExpenseAutomationActualMatchingMatchView(state, matchId) {
|
|
|
331
332
|
detailFetchState: view.detailFetchStateByMatchId[matchId] ?? NOT_STARTED,
|
|
332
333
|
refreshStatus: view.detailRefreshStatusByMatchId[matchId] ?? NOT_STARTED,
|
|
333
334
|
undoReversalStatus: view.undoReversalStatusByMatchId[matchId] ?? NOT_STARTED,
|
|
334
|
-
lastUndoResults: view.lastUndoResultsByMatchId[matchId],
|
|
335
335
|
lastMatchResults: view.lastMatchResultsByMatchId?.[matchId],
|
|
336
336
|
};
|
|
337
337
|
}
|
|
338
|
+
function getCloseMatchAfterUndo(state) {
|
|
339
|
+
return state.expenseAutomationActualMatchingViewState.closeMatchAfterUndo;
|
|
340
|
+
}
|
|
338
341
|
function getExpenseAutomationActualMatchingView(state) {
|
|
339
342
|
const { expenseAutomationActualMatchingViewState } = state;
|
|
340
343
|
const { matchIdsByPeriod, fetchState, error, refreshStatus, uiState, matchModal, } = expenseAutomationActualMatchingViewState;
|
|
@@ -91,10 +91,10 @@ export interface ActualMatchingMatchModalState {
|
|
|
91
91
|
}
|
|
92
92
|
export declare function actualMatchingTransactionLineKey(transactionType: string, transactionIntegrationId: string, lineId: string): string;
|
|
93
93
|
export interface ActualMatchingViewState extends FetchedState {
|
|
94
|
+
closeMatchAfterUndo: boolean;
|
|
94
95
|
detailFetchStateByMatchId: Record<ActualMatchingMatchId, FetchStateAndError>;
|
|
95
96
|
detailRefreshStatusByMatchId: Record<ActualMatchingMatchId, FetchStateAndError>;
|
|
96
97
|
lastMatchResultsByMatchId: Record<ActualMatchingMatchId, MatchAndReverseResult[]>;
|
|
97
|
-
lastUndoResultsByMatchId: Record<ActualMatchingMatchId, UndoReversalResult[]>;
|
|
98
98
|
matchIdsByPeriod: Record<MonthYearPeriodId, ActualMatchingMatchId[]>;
|
|
99
99
|
matchModal: ActualMatchingMatchModalState;
|
|
100
100
|
refreshStatus: FetchStateAndError;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.2.35-
|
|
3
|
+
"version": "5.2.35-beta7MM",
|
|
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",
|