@zeniai/client-epic-state 4.18.80 → 4.18.82
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/entity/chargeCard/chargeCard.d.ts +2 -1
- package/lib/entity/chargeCard/chargeCard.js +2 -0
- package/lib/entity/chargeCard/chargeCardPayload.d.ts +2 -1
- package/lib/entity/chargeCard/chargeCardPayload.js +10 -9
- package/lib/entity/chargeCardTransaction/chargeCardTransaction.d.ts +1 -1
- package/lib/entity/chargeCardTransaction/chargeCardTransactionPayload.d.ts +1 -2
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.d.ts +8 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +14 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +8 -0
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +12 -0
- package/lib/epic.d.ts +12 -1
- package/lib/epic.js +12 -1
- package/lib/index.d.ts +11 -9
- package/lib/index.js +51 -30
- package/lib/responsePayload.d.ts +3 -0
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.d.ts +2 -1
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.js +10 -2
- package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportViewEpic.js +2 -4
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +1 -1
- package/lib/view/expenseAutomationView/epics/transactionCategorization/markTransactionAsNotMiscategorizedEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/markTransactionAsNotMiscategorizedEpic.js +13 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/saveTransactionCategorizationEpic.js +2 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +2 -2
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +6 -3
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +6 -3
- package/lib/view/monthEndCloseChecksView/epics/fetchMonthClosePerformanceTrendEpic.d.ts +7 -0
- package/lib/view/monthEndCloseChecksView/epics/fetchMonthClosePerformanceTrendEpic.js +47 -0
- package/lib/view/monthEndCloseChecksView/epics/fetchMonthEndCloseChecksEpic.js +1 -1
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewPayload.d.ts +8 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.d.ts +11 -1
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.js +47 -3
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.d.ts +2 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.js +13 -6
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewState.d.ts +7 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +17 -2
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.js +38 -3
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailPayload.d.ts +11 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +40 -4
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +189 -26
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.d.ts +19 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.js +87 -12
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/closeChargeCardEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/closeChargeCardEpic.js +71 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardsRecurringExpensesEpic.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardsRecurringExpensesEpic.js +44 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchDepositAccountLimitEpic.js +4 -4
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/lockChargeCardEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/lockChargeCardEpic.js +78 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/unlockChargeCardEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/unlockChargeCardEpic.js +75 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/updateChargeCardNameEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/updateChargeCardNameEpic.js +83 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListPayload.d.ts +1 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +34 -4
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +142 -3
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +46 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +198 -4
- package/lib/view/spendManagement/chargeCards/chargeCardList/closeChargeCardsEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/closeChargeCardsEpic.js +69 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.d.ts +3 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.js +18 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/lockChargeCardsEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/lockChargeCardsEpic.js +69 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/revokeChargeCardsInviteEpic.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/revokeChargeCardsInviteEpic.js +71 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/unlockChargeCardsEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/unlockChargeCardsEpic.js +68 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/updateChargeCardsLimitEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/updateChargeCardsLimitEpic.js +76 -0
- package/package.json +1 -1
|
@@ -51,24 +51,27 @@ export declare const fetchTransactionCategorization: import("@reduxjs/toolkit").
|
|
|
51
51
|
selectedPeriod: MonthYearPeriod;
|
|
52
52
|
selectedTab: TransactionsTab;
|
|
53
53
|
status: ZeniAPIStatus;
|
|
54
|
-
}, "expenseAutomationTransactionsView/fetchTransactionCategorizationFailure">, saveTransactionCategorization: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", transactionIds: string[], cotTrackingByTransactionId: COTTransactionTrackingByTransactionId], {
|
|
54
|
+
}, "expenseAutomationTransactionsView/fetchTransactionCategorizationFailure">, saveTransactionCategorization: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", transactionIds: string[], cotTrackingByTransactionId: COTTransactionTrackingByTransactionId, isUncategorizedExpenseCategoryEnabled?: boolean | undefined], {
|
|
55
55
|
selectedTab: "review" | "autoCategorized";
|
|
56
56
|
transactionIds: string[];
|
|
57
57
|
cotTrackingByTransactionId: COTTransactionTrackingByTransactionId;
|
|
58
|
-
|
|
58
|
+
isUncategorizedExpenseCategoryEnabled: boolean | undefined;
|
|
59
|
+
}, "expenseAutomationTransactionsView/saveTransactionCategorization", never, never>, updateTransactionCategorization: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", transactionIds: string[], transactionSaveUpdates: TransactionSaveUpdates[], cotTrackingByTransactionId: COTTransactionTrackingByTransactionId, isUncategorizedExpenseCategoryEnabled?: boolean | undefined], {
|
|
59
60
|
selectedTab: "review" | "autoCategorized";
|
|
60
61
|
transactionIds: string[];
|
|
61
62
|
transactionSaveUpdates: TransactionSaveUpdates[];
|
|
62
63
|
cotTrackingByTransactionId: COTTransactionTrackingByTransactionId;
|
|
64
|
+
isUncategorizedExpenseCategoryEnabled: boolean | undefined;
|
|
63
65
|
}, "expenseAutomationTransactionsView/updateTransactionCategorization", never, never>, updateCurrentSelectedTransactionCategorizationTab: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[newSelectedTab: "review" | "autoCategorized"], {
|
|
64
66
|
newSelectedTab: "review" | "autoCategorized";
|
|
65
67
|
}, "expenseAutomationTransactionsView/updateCurrentSelectedTransactionCategorizationTab", never, never>, updateTransactionCategorizationSaveStatus: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", fetchState: FetchState, error?: ZeniAPIStatus<Record<string, unknown>> | undefined], {
|
|
66
68
|
selectedTab: "review" | "autoCategorized";
|
|
67
69
|
fetchState: FetchState;
|
|
68
70
|
error: ZeniAPIStatus<Record<string, unknown>> | undefined;
|
|
69
|
-
}, "expenseAutomationTransactionsView/updateTransactionCategorizationSaveStatus", never, never>, markTransactionAsNotMiscategorized: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", transactionsInReview: UpdateTransactionCategorizationResponsePayload], {
|
|
71
|
+
}, "expenseAutomationTransactionsView/updateTransactionCategorizationSaveStatus", never, never>, markTransactionAsNotMiscategorized: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", transactionsInReview: UpdateTransactionCategorizationResponsePayload, isUncategorizedExpenseCategoryEnabled?: boolean | undefined], {
|
|
70
72
|
selectedTab: "review" | "autoCategorized";
|
|
71
73
|
transactionsInReview: UpdateTransactionCategorizationResponsePayload;
|
|
74
|
+
isUncategorizedExpenseCategoryEnabled: boolean | undefined;
|
|
72
75
|
}, "expenseAutomationTransactionsView/markTransactionAsNotMiscategorized", never, never>, updateStatusForTransactionNotMiscategorizedUpdateForCategorization: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", uncheckTransactionIds: string[], removeTransactionIdsFromSelectedPeriod: string[], selectedPeriod: MonthYearPeriod, fetchState: FetchState, error?: ZeniAPIStatus<Record<string, unknown>> | undefined, updateLineItemsByTransactionId?: Record<string, string[]> | undefined], {
|
|
73
76
|
removeTransactionIdsFromSelectedPeriod: string[];
|
|
74
77
|
selectedPeriod: MonthYearPeriod;
|
|
@@ -228,12 +228,13 @@ const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
|
|
|
228
228
|
}
|
|
229
229
|
},
|
|
230
230
|
saveTransactionCategorization: {
|
|
231
|
-
prepare(selectedTab, transactionIds, cotTrackingByTransactionId) {
|
|
231
|
+
prepare(selectedTab, transactionIds, cotTrackingByTransactionId, isUncategorizedExpenseCategoryEnabled) {
|
|
232
232
|
return {
|
|
233
233
|
payload: {
|
|
234
234
|
selectedTab,
|
|
235
235
|
transactionIds,
|
|
236
236
|
cotTrackingByTransactionId,
|
|
237
|
+
isUncategorizedExpenseCategoryEnabled,
|
|
237
238
|
},
|
|
238
239
|
};
|
|
239
240
|
},
|
|
@@ -258,13 +259,14 @@ const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
|
|
|
258
259
|
fetchState: 'In-Progress',
|
|
259
260
|
};
|
|
260
261
|
},
|
|
261
|
-
prepare(selectedTab, transactionIds, transactionSaveUpdates, cotTrackingByTransactionId) {
|
|
262
|
+
prepare(selectedTab, transactionIds, transactionSaveUpdates, cotTrackingByTransactionId, isUncategorizedExpenseCategoryEnabled) {
|
|
262
263
|
return {
|
|
263
264
|
payload: {
|
|
264
265
|
selectedTab,
|
|
265
266
|
transactionIds,
|
|
266
267
|
transactionSaveUpdates,
|
|
267
268
|
cotTrackingByTransactionId,
|
|
269
|
+
isUncategorizedExpenseCategoryEnabled,
|
|
268
270
|
},
|
|
269
271
|
};
|
|
270
272
|
},
|
|
@@ -535,11 +537,12 @@ const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
|
|
|
535
537
|
error: undefined,
|
|
536
538
|
};
|
|
537
539
|
},
|
|
538
|
-
prepare(selectedTab, transactionsInReview) {
|
|
540
|
+
prepare(selectedTab, transactionsInReview, isUncategorizedExpenseCategoryEnabled) {
|
|
539
541
|
return {
|
|
540
542
|
payload: {
|
|
541
543
|
selectedTab,
|
|
542
544
|
transactionsInReview,
|
|
545
|
+
isUncategorizedExpenseCategoryEnabled,
|
|
543
546
|
},
|
|
544
547
|
};
|
|
545
548
|
},
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { RootState } from '../../../reducer';
|
|
4
|
+
import { ZeniAPI } from '../../../zeniAPI';
|
|
5
|
+
import { fetchMonthClosePerformanceTrend, updateMonthClosePerformanceTrend, updateMonthClosePerformanceTrendFetchStatus } from '../monthEndCloseChecksViewReducer';
|
|
6
|
+
export type ActionType = ReturnType<typeof fetchMonthClosePerformanceTrend> | ReturnType<typeof updateMonthClosePerformanceTrendFetchStatus> | ReturnType<typeof updateMonthClosePerformanceTrend>;
|
|
7
|
+
export declare const fetchMonthClosePerformanceTrendEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchMonthClosePerformanceTrendEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../responsePayload");
|
|
7
|
+
const monthEndCloseChecksViewReducer_1 = require("../monthEndCloseChecksViewReducer");
|
|
8
|
+
const fetchMonthClosePerformanceTrendEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(monthEndCloseChecksViewReducer_1.fetchMonthClosePerformanceTrend.match), (0, operators_1.switchMap)((action) => {
|
|
9
|
+
const { period } = action.payload;
|
|
10
|
+
const month = String(period.month).padStart(2, '0');
|
|
11
|
+
const queryParam = {
|
|
12
|
+
month_and_year: `${month}-${period.year}`,
|
|
13
|
+
};
|
|
14
|
+
return zeniAPI
|
|
15
|
+
.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/month-close/performance-trend?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
16
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
17
|
+
if (response.data != null) {
|
|
18
|
+
const actions = [
|
|
19
|
+
(0, monthEndCloseChecksViewReducer_1.updateMonthClosePerformanceTrend)({
|
|
20
|
+
performanceTrend: response.data.performance_trend,
|
|
21
|
+
period,
|
|
22
|
+
}),
|
|
23
|
+
];
|
|
24
|
+
return (0, rxjs_1.from)(actions);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
const actions = [
|
|
28
|
+
(0, monthEndCloseChecksViewReducer_1.updateMonthClosePerformanceTrendFetchStatus)({
|
|
29
|
+
period,
|
|
30
|
+
fetchState: 'Error',
|
|
31
|
+
error: response.status,
|
|
32
|
+
}),
|
|
33
|
+
];
|
|
34
|
+
return (0, rxjs_1.from)(actions);
|
|
35
|
+
}
|
|
36
|
+
}), (0, operators_1.catchError)((error) => {
|
|
37
|
+
const actions = [
|
|
38
|
+
(0, monthEndCloseChecksViewReducer_1.updateMonthClosePerformanceTrendFetchStatus)({
|
|
39
|
+
period,
|
|
40
|
+
fetchState: 'Error',
|
|
41
|
+
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected error', `Fetch Month close performance trend REST API call errored out: ${JSON.stringify(error)}`),
|
|
42
|
+
}),
|
|
43
|
+
];
|
|
44
|
+
return (0, rxjs_1.from)(actions);
|
|
45
|
+
}));
|
|
46
|
+
}));
|
|
47
|
+
exports.fetchMonthClosePerformanceTrendEpic = fetchMonthClosePerformanceTrendEpic;
|
|
@@ -8,7 +8,7 @@ const responsePayload_1 = require("../../../responsePayload");
|
|
|
8
8
|
const monthEndCloseChecksViewReducer_1 = require("../monthEndCloseChecksViewReducer");
|
|
9
9
|
const fetchMonthEndCloseChecksEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(monthEndCloseChecksViewReducer_1.fetchMonthEndCloseChecks.match), (0, operators_1.switchMap)((action) => {
|
|
10
10
|
const { period, tenantId, refreshViewInBackground } = action.payload;
|
|
11
|
-
const month = period.month
|
|
11
|
+
const month = String(period.month).padStart(2, '0');
|
|
12
12
|
const queryParam = {
|
|
13
13
|
month_and_year: `${month}-${period.year}`,
|
|
14
14
|
history_month_and_year_flag: true,
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import { MonthEndCloseChecksPayload } from '../../entity/monthEndCloseChecks/monthEndCloseChecksPayload';
|
|
2
2
|
import { ZeniAPIResponse } from '../../responsePayload';
|
|
3
3
|
export type FetchMonthEndCloseChecksResponse = ZeniAPIResponse<MonthEndCloseChecksPayload>;
|
|
4
|
+
export type MonthClosePerformanceTrendPayload = {
|
|
5
|
+
audit_score_percentage: number;
|
|
6
|
+
month_and_year: string;
|
|
7
|
+
};
|
|
8
|
+
export interface MonthClosePerformanceTrendResponsePayload {
|
|
9
|
+
performance_trend: MonthClosePerformanceTrendPayload[];
|
|
10
|
+
}
|
|
11
|
+
export type FetchMonthClosePerformanceTrendResponse = ZeniAPIResponse<MonthClosePerformanceTrendResponsePayload>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FetchState, ID } from '../../commonStateTypes/common';
|
|
2
2
|
import { MonthYearPeriod } from '../../commonStateTypes/timePeriod';
|
|
3
3
|
import { ZeniAPIStatus } from '../../responsePayload';
|
|
4
|
+
import { MonthClosePerformanceTrendPayload } from './monthEndCloseChecksViewPayload';
|
|
4
5
|
import { MonthEndCloseChecksViewState } from './monthEndCloseChecksViewState';
|
|
5
6
|
export declare const initialState: MonthEndCloseChecksViewState;
|
|
6
7
|
export declare const fetchMonthEndCloseChecks: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -13,6 +14,15 @@ export declare const fetchMonthEndCloseChecks: import("@reduxjs/toolkit").Action
|
|
|
13
14
|
refreshViewInBackground: boolean;
|
|
14
15
|
tenantId: ID;
|
|
15
16
|
error?: ZeniAPIStatus;
|
|
16
|
-
}, "monthEndCloseChecksView/updateMonthEndCloseChecksView">, clearAllMonthEndCloseChecksView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"monthEndCloseChecksView/clearAllMonthEndCloseChecksView"
|
|
17
|
+
}, "monthEndCloseChecksView/updateMonthEndCloseChecksView">, clearAllMonthEndCloseChecksView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"monthEndCloseChecksView/clearAllMonthEndCloseChecksView">, fetchMonthClosePerformanceTrend: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: MonthYearPeriod], {
|
|
18
|
+
period: MonthYearPeriod;
|
|
19
|
+
}, "monthEndCloseChecksView/fetchMonthClosePerformanceTrend", never, never>, updateMonthClosePerformanceTrend: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
20
|
+
performanceTrend: MonthClosePerformanceTrendPayload[];
|
|
21
|
+
period: MonthYearPeriod;
|
|
22
|
+
}, "monthEndCloseChecksView/updateMonthClosePerformanceTrend">, updateMonthClosePerformanceTrendFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
23
|
+
fetchState: FetchState;
|
|
24
|
+
period: MonthYearPeriod;
|
|
25
|
+
error?: ZeniAPIStatus;
|
|
26
|
+
}, "monthEndCloseChecksView/updateMonthClosePerformanceTrendFetchStatus">;
|
|
17
27
|
declare const _default: import("redux").Reducer<MonthEndCloseChecksViewState>;
|
|
18
28
|
export default _default;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clearAllMonthEndCloseChecksView = exports.updateMonthEndCloseChecksView = exports.fetchMonthEndCloseChecks = exports.initialState = void 0;
|
|
4
|
+
exports.updateMonthClosePerformanceTrendFetchStatus = exports.updateMonthClosePerformanceTrend = exports.fetchMonthClosePerformanceTrend = exports.clearAllMonthEndCloseChecksView = exports.updateMonthEndCloseChecksView = exports.fetchMonthEndCloseChecks = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const formatZeniDateFY_1 = require("../../commonStateTypes/fiscalYearHelpers/formatZeniDateFY");
|
|
6
7
|
const timePeriod_1 = require("../../commonStateTypes/timePeriod");
|
|
8
|
+
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
7
9
|
exports.initialState = {
|
|
8
10
|
monthEndCloseChecksViewByTenantId: {},
|
|
9
11
|
refreshStatus: {
|
|
10
12
|
fetchState: 'Not-Started',
|
|
11
13
|
},
|
|
14
|
+
monthClosePerformanceTrend: {},
|
|
15
|
+
monthClosePerformanceTrendFetchStatus: {},
|
|
12
16
|
};
|
|
13
17
|
const monthEndCloseChecksView = (0, toolkit_1.createSlice)({
|
|
14
18
|
name: 'monthEndCloseChecksView',
|
|
@@ -40,10 +44,50 @@ const monthEndCloseChecksView = (0, toolkit_1.createSlice)({
|
|
|
40
44
|
draft.refreshStatus.fetchState = 'Completed';
|
|
41
45
|
}
|
|
42
46
|
},
|
|
47
|
+
fetchMonthClosePerformanceTrend: {
|
|
48
|
+
prepare(period) {
|
|
49
|
+
return { payload: { period } };
|
|
50
|
+
},
|
|
51
|
+
reducer(draft, action) {
|
|
52
|
+
const { period } = action.payload;
|
|
53
|
+
draft.monthClosePerformanceTrendFetchStatus[(0, timePeriod_1.toMonthYearPeriodId)(period)] = {
|
|
54
|
+
fetchState: 'In-Progress',
|
|
55
|
+
error: undefined,
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
updateMonthClosePerformanceTrend(draft, action) {
|
|
60
|
+
const { performanceTrend, period } = action.payload;
|
|
61
|
+
draft.monthClosePerformanceTrend[(0, timePeriod_1.toMonthYearPeriodId)(period)] = [];
|
|
62
|
+
performanceTrend.forEach((curr) => {
|
|
63
|
+
const parsedDate = (0, zeniDayJS_1.date)(curr.month_and_year, formatZeniDateFY_1.MM_YYYY_FORMAT);
|
|
64
|
+
const parsedPeriod = {
|
|
65
|
+
month: (0, timePeriod_1.toMonth)(parsedDate.month() + 1),
|
|
66
|
+
year: parsedDate.year(),
|
|
67
|
+
};
|
|
68
|
+
draft.monthClosePerformanceTrend[(0, timePeriod_1.toMonthYearPeriodId)(period)].push({
|
|
69
|
+
auditScore: curr.audit_score_percentage,
|
|
70
|
+
period: parsedPeriod,
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
draft.monthClosePerformanceTrendFetchStatus[(0, timePeriod_1.toMonthYearPeriodId)(period)] =
|
|
74
|
+
{
|
|
75
|
+
fetchState: 'Completed',
|
|
76
|
+
error: undefined,
|
|
77
|
+
};
|
|
78
|
+
},
|
|
79
|
+
updateMonthClosePerformanceTrendFetchStatus(draft, action) {
|
|
80
|
+
const { period, fetchState, error } = action.payload;
|
|
81
|
+
draft.monthClosePerformanceTrendFetchStatus[(0, timePeriod_1.toMonthYearPeriodId)(period)] =
|
|
82
|
+
{
|
|
83
|
+
fetchState,
|
|
84
|
+
error,
|
|
85
|
+
};
|
|
86
|
+
},
|
|
43
87
|
clearAllMonthEndCloseChecksView(draft) {
|
|
44
|
-
draft.
|
|
88
|
+
Object.assign(draft, exports.initialState);
|
|
45
89
|
},
|
|
46
90
|
},
|
|
47
91
|
});
|
|
48
|
-
_a = monthEndCloseChecksView.actions, exports.fetchMonthEndCloseChecks = _a.fetchMonthEndCloseChecks, exports.updateMonthEndCloseChecksView = _a.updateMonthEndCloseChecksView, exports.clearAllMonthEndCloseChecksView = _a.clearAllMonthEndCloseChecksView;
|
|
92
|
+
_a = monthEndCloseChecksView.actions, exports.fetchMonthEndCloseChecks = _a.fetchMonthEndCloseChecks, exports.updateMonthEndCloseChecksView = _a.updateMonthEndCloseChecksView, exports.clearAllMonthEndCloseChecksView = _a.clearAllMonthEndCloseChecksView, exports.fetchMonthClosePerformanceTrend = _a.fetchMonthClosePerformanceTrend, exports.updateMonthClosePerformanceTrend = _a.updateMonthClosePerformanceTrend, exports.updateMonthClosePerformanceTrendFetchStatus = _a.updateMonthClosePerformanceTrendFetchStatus;
|
|
49
93
|
exports.default = monthEndCloseChecksView.reducer;
|
|
@@ -4,7 +4,9 @@ import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport
|
|
|
4
4
|
import { MonthEndAuditSummary, MonthEndCloseChecksInfo } from '../../entity/monthEndCloseChecks/monthEndCloseChecksState';
|
|
5
5
|
import { CurrentTenant } from '../../entity/tenant/tenantSelector';
|
|
6
6
|
import { RootState } from '../../reducer';
|
|
7
|
+
import { MonthClosePerformanceTrend } from './monthEndCloseChecksViewState';
|
|
7
8
|
export interface MonthEndCloseChecksView extends SelectorView {
|
|
9
|
+
monthClosePerformanceTrend: MonthClosePerformanceTrend[];
|
|
8
10
|
refreshStatus: FetchStateAndError;
|
|
9
11
|
selectedPeriod: MonthYearPeriod;
|
|
10
12
|
monthEndCloseChecks?: MonthEndCloseChecksInfo;
|
|
@@ -7,6 +7,7 @@ exports.getMonthEndCloseChecksViewByTenantId = exports.isMonthEndInsightDisabled
|
|
|
7
7
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
8
8
|
const isEqual_1 = __importDefault(require("lodash/isEqual"));
|
|
9
9
|
const formatZeniDateFY_1 = require("../../commonStateTypes/fiscalYearHelpers/formatZeniDateFY");
|
|
10
|
+
const reduceFetchState_1 = require("../../commonStateTypes/reduceFetchState");
|
|
10
11
|
const timePeriod_1 = require("../../commonStateTypes/timePeriod");
|
|
11
12
|
const monthEndCloseChecksSelector_1 = require("../../entity/monthEndCloseChecks/monthEndCloseChecksSelector");
|
|
12
13
|
const fetchAllTenantsEpic_1 = require("../../entity/tenant/epic/fetchAllTenantsEpic");
|
|
@@ -40,14 +41,15 @@ const isMonthEndInsightDisabled = (currentTenant, selectedPeriod, userAllowedToA
|
|
|
40
41
|
};
|
|
41
42
|
exports.isMonthEndInsightDisabled = isMonthEndInsightDisabled;
|
|
42
43
|
exports.getMonthEndCloseChecksViewByTenantId = (0, toolkit_1.createSelector)((state) => state.monthEndCloseChecksState, (state) => state.monthEndCloseChecksViewState, (state) => state.expenseAutomationViewState, (state) => (0, tenantSelector_1.getCurrentTenant)(state), (state) => state.companyState, (state) => state.tenantState, (_state, tenantId) => tenantId, (monthEndCloseChecksState, monthEndCloseChecksViewState, expenseAutomationViewState, currentTenant, companyState, tenantState, tenantId) => {
|
|
43
|
-
var _a, _b, _c;
|
|
44
|
+
var _a, _b, _c, _d, _e;
|
|
44
45
|
const { refreshStatus } = monthEndCloseChecksViewState;
|
|
45
46
|
const { loggedInUser } = tenantState;
|
|
46
47
|
const selectedPeriod = (_a = expenseAutomationViewState.selectedPeriodByTenantId[tenantId]) !== null && _a !== void 0 ? _a : fetchAllTenantsEpic_1.defaultMonthYearPeriod;
|
|
47
|
-
const { monthEndCloseChecksViewByTenantId } = monthEndCloseChecksViewState;
|
|
48
|
+
const { monthEndCloseChecksViewByTenantId, monthClosePerformanceTrend, monthClosePerformanceTrendFetchStatus, } = monthEndCloseChecksViewState;
|
|
49
|
+
const monthClosePerformanceTrendForSelectedPeriod = (_b = monthClosePerformanceTrend[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)]) !== null && _b !== void 0 ? _b : [];
|
|
48
50
|
const monthYearPeriodId = selectedPeriod != null ? (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod) : null;
|
|
49
51
|
const monthEndCloseChecksView = monthYearPeriodId != null
|
|
50
|
-
? (
|
|
52
|
+
? (_c = monthEndCloseChecksViewByTenantId[tenantId]) === null || _c === void 0 ? void 0 : _c[monthYearPeriodId]
|
|
51
53
|
: undefined;
|
|
52
54
|
const monthEndCloseChecks = monthYearPeriodId != null
|
|
53
55
|
? (0, monthEndCloseChecksSelector_1.getMonthEndCloseChecksByTenantId)(monthEndCloseChecksState, tenantId, monthYearPeriodId)
|
|
@@ -59,7 +61,7 @@ exports.getMonthEndCloseChecksViewByTenantId = (0, toolkit_1.createSelector)((st
|
|
|
59
61
|
const currentCompany = companyState.companiesById[currentTenant.companyId];
|
|
60
62
|
const managementInfo = currentCompany === null || currentCompany === void 0 ? void 0 : currentCompany.managementInfo;
|
|
61
63
|
const preparerUserIds = managementInfo != null ? managementInfo.preparerUserIds : [];
|
|
62
|
-
const isZeniUser = Boolean((
|
|
64
|
+
const isZeniUser = Boolean((_d = loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.userEmail) === null || _d === void 0 ? void 0 : _d.includes('zeni.ai'));
|
|
63
65
|
const isPreparer = loggedInUser != null && preparerUserIds.includes(loggedInUser.userId);
|
|
64
66
|
const userAllowedToAccessMonthEndInsights = isZeniUser === false || isPreparer === false;
|
|
65
67
|
const monthEndCloseCheckListWithDisabledState = sortedMonthEndCloseCheckList.map((check) => {
|
|
@@ -71,8 +73,12 @@ exports.getMonthEndCloseChecksViewByTenantId = (0, toolkit_1.createSelector)((st
|
|
|
71
73
|
}
|
|
72
74
|
return check;
|
|
73
75
|
});
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
const combinedFetchState = (0, reduceFetchState_1.reduceAnyFetchState)([
|
|
77
|
+
monthEndCloseChecksView,
|
|
78
|
+
(_e = monthClosePerformanceTrendFetchStatus[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)]) !== null && _e !== void 0 ? _e : { fetchState: 'Not-Started' },
|
|
79
|
+
]);
|
|
80
|
+
return Object.assign(Object.assign({}, monthEndCloseChecksView), { fetchState: combinedFetchState.fetchState, error: combinedFetchState.error, monthEndCloseChecks: Object.assign(Object.assign({}, monthEndCloseChecks), { monthEndCloseCheckList: monthEndCloseCheckListWithDisabledState }), reportId: 'expense_automation_card', selectedPeriod,
|
|
81
|
+
refreshStatus, monthClosePerformanceTrend: monthClosePerformanceTrendForSelectedPeriod });
|
|
76
82
|
}
|
|
77
83
|
return {
|
|
78
84
|
fetchState: 'Not-Started',
|
|
@@ -80,5 +86,6 @@ exports.getMonthEndCloseChecksViewByTenantId = (0, toolkit_1.createSelector)((st
|
|
|
80
86
|
reportId: 'expense_automation_card',
|
|
81
87
|
selectedPeriod,
|
|
82
88
|
refreshStatus,
|
|
89
|
+
monthClosePerformanceTrend: monthClosePerformanceTrendForSelectedPeriod,
|
|
83
90
|
};
|
|
84
91
|
});
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { FetchStateAndError, ID } from '../../commonStateTypes/common';
|
|
2
|
-
import { MonthYearPeriodId } from '../../commonStateTypes/timePeriod';
|
|
2
|
+
import { MonthYearPeriod, MonthYearPeriodId } from '../../commonStateTypes/timePeriod';
|
|
3
|
+
export interface MonthClosePerformanceTrend {
|
|
4
|
+
auditScore: number;
|
|
5
|
+
period: MonthYearPeriod;
|
|
6
|
+
}
|
|
3
7
|
export interface MonthEndCloseChecksViewState {
|
|
8
|
+
monthClosePerformanceTrend: Record<MonthYearPeriodId, MonthClosePerformanceTrend[]>;
|
|
9
|
+
monthClosePerformanceTrendFetchStatus: Record<MonthYearPeriodId, FetchStateAndError>;
|
|
4
10
|
monthEndCloseChecksViewByTenantId: Record<ID, Record<MonthYearPeriodId, FetchStateAndError>>;
|
|
5
11
|
refreshStatus: FetchStateAndError;
|
|
6
12
|
}
|
|
@@ -1,22 +1,36 @@
|
|
|
1
|
+
import { Amount } from '../../../../commonStateTypes/amount';
|
|
1
2
|
import { FetchStateAndError, FetchedState, ID } from '../../../../commonStateTypes/common';
|
|
2
3
|
import { SortOrder } from '../../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
3
4
|
import { PageToken } from '../../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
5
|
+
import { ChargeCardMerchant } from '../../../../entity/chargeCardTransaction/chargeCardTransaction';
|
|
4
6
|
import { Attachment } from '../../../../entity/transaction/stateTypes/attachment';
|
|
5
|
-
import {
|
|
7
|
+
import { ZeniDate } from '../../../../zeniDayJS';
|
|
8
|
+
import { ChargeCardTransactionStatisticsPayload, RecurringExpensePayload } from './chargeCardDetailPayload';
|
|
6
9
|
export declare const VISA_EOD_CORRECTION_TRANSACTION_TYPE_NAME = "Card Transaction";
|
|
7
10
|
export interface ChargeCardDetailState {
|
|
11
|
+
depositAccountLimitFetchStateByDepositAccountId: Record<ID, FetchStateAndError>;
|
|
8
12
|
detailById: Record<ID, ChargeCardDetail>;
|
|
13
|
+
recurringExpensesByChargeCardId: Record<ID, RecurringExpense[]>;
|
|
14
|
+
recurringExpensesFetchState: FetchStateAndError;
|
|
15
|
+
}
|
|
16
|
+
export interface RecurringExpense {
|
|
17
|
+
amount: Amount;
|
|
18
|
+
merchant: ChargeCardMerchant;
|
|
19
|
+
nextPaymentDate: ZeniDate;
|
|
9
20
|
}
|
|
10
21
|
interface ChargeCardDetail extends FetchedState {
|
|
22
|
+
closeChargeCardFetchState: FetchStateAndError;
|
|
11
23
|
cvvActivationWaitStatus: FetchStateAndError;
|
|
12
24
|
debitCardSetPinWaitStatus: FetchStateAndError;
|
|
13
|
-
depositAccountLimitFetchState: FetchStateAndError;
|
|
14
25
|
id: ID;
|
|
15
26
|
isRefreshingViewInBackground: boolean;
|
|
27
|
+
lockChargeCardFetchState: FetchStateAndError;
|
|
16
28
|
transactionList: ChargeCardDetailTransactionList;
|
|
17
29
|
transactionStatistics: TransactionStatistics;
|
|
18
30
|
twoFAState: TwoFAState;
|
|
31
|
+
unlockChargeCardFetchState: FetchStateAndError;
|
|
19
32
|
updateChargeCardLimitFetchState: FetchStateAndError;
|
|
33
|
+
updateChargeCardNameFetchState: FetchStateAndError;
|
|
20
34
|
updateDebitCardPinAttemptFetchState: FetchStateAndError;
|
|
21
35
|
updatePhysicalChargeCardAttemptFetchState: FetchStateAndError;
|
|
22
36
|
updateStatus: FetchStateAndError;
|
|
@@ -68,4 +82,5 @@ export interface ChargeCardTransactionStatistics {
|
|
|
68
82
|
totalNumberOfTransactionsWithReceipts: number;
|
|
69
83
|
}
|
|
70
84
|
export declare const mapChargeCardTransactionStatisticsPayloadToChargeCardTransactionStatistics: (statistics: ChargeCardTransactionStatisticsPayload) => ChargeCardTransactionStatistics;
|
|
85
|
+
export declare const mapRecurringExpensePayloadToRecurringExpense: (recurringExpense: RecurringExpensePayload) => RecurringExpense;
|
|
71
86
|
export {};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mapChargeCardTransactionStatisticsPayloadToChargeCardTransactionStatistics = exports.emptyChargeCardDetail = exports.initialTransactionStatistics = exports.initialTransactionAttachments = exports.toChargeCardTransactionSortKeyType = exports.VISA_EOD_CORRECTION_TRANSACTION_TYPE_NAME = void 0;
|
|
3
|
+
exports.mapRecurringExpensePayloadToRecurringExpense = exports.mapChargeCardTransactionStatisticsPayloadToChargeCardTransactionStatistics = exports.emptyChargeCardDetail = exports.initialTransactionStatistics = exports.initialTransactionAttachments = exports.toChargeCardTransactionSortKeyType = exports.VISA_EOD_CORRECTION_TRANSACTION_TYPE_NAME = void 0;
|
|
4
|
+
const urlPayload_1 = require("../../../../commonPayloadTypes/urlPayload");
|
|
5
|
+
const amount_1 = require("../../../../commonStateTypes/amount");
|
|
4
6
|
const stringToUnion_1 = require("../../../../commonStateTypes/stringToUnion");
|
|
7
|
+
const zeniDayJS_1 = require("../../../../zeniDayJS");
|
|
5
8
|
exports.VISA_EOD_CORRECTION_TRANSACTION_TYPE_NAME = 'Card Transaction';
|
|
6
9
|
const ALL_CHARGE_CARD_TRANSACTION_SORT_KEYS = [
|
|
7
10
|
'merchant',
|
|
@@ -48,12 +51,20 @@ exports.emptyChargeCardDetail = {
|
|
|
48
51
|
otpChallenge: undefined,
|
|
49
52
|
},
|
|
50
53
|
isRefreshingViewInBackground: false,
|
|
51
|
-
|
|
54
|
+
id: '',
|
|
55
|
+
updateChargeCardNameFetchState: {
|
|
56
|
+
fetchState: 'Not-Started',
|
|
57
|
+
error: undefined,
|
|
58
|
+
},
|
|
59
|
+
lockChargeCardFetchState: {
|
|
52
60
|
fetchState: 'Not-Started',
|
|
53
61
|
error: undefined,
|
|
54
62
|
},
|
|
55
|
-
id: '',
|
|
56
63
|
fetchState: 'Not-Started',
|
|
64
|
+
closeChargeCardFetchState: {
|
|
65
|
+
fetchState: 'Not-Started',
|
|
66
|
+
error: undefined,
|
|
67
|
+
},
|
|
57
68
|
cvvActivationWaitStatus: {
|
|
58
69
|
fetchState: 'Not-Started',
|
|
59
70
|
error: undefined,
|
|
@@ -100,6 +111,10 @@ exports.emptyChargeCardDetail = {
|
|
|
100
111
|
error: undefined,
|
|
101
112
|
},
|
|
102
113
|
transactionStatistics: exports.initialTransactionStatistics,
|
|
114
|
+
unlockChargeCardFetchState: {
|
|
115
|
+
fetchState: 'Not-Started',
|
|
116
|
+
error: undefined,
|
|
117
|
+
},
|
|
103
118
|
};
|
|
104
119
|
const mapChargeCardTransactionStatisticsPayloadToChargeCardTransactionStatistics = (statistics) => {
|
|
105
120
|
return {
|
|
@@ -116,3 +131,23 @@ const mapChargeCardTransactionStatisticsPayloadToChargeCardTransactionStatistics
|
|
|
116
131
|
};
|
|
117
132
|
};
|
|
118
133
|
exports.mapChargeCardTransactionStatisticsPayloadToChargeCardTransactionStatistics = mapChargeCardTransactionStatisticsPayloadToChargeCardTransactionStatistics;
|
|
134
|
+
const mapRecurringExpensePayloadToRecurringExpense = (recurringExpense) => {
|
|
135
|
+
var _a;
|
|
136
|
+
return {
|
|
137
|
+
amount: (0, amount_1.toAmount)(recurringExpense.amount, recurringExpense.currency_code, recurringExpense.currency_symbol),
|
|
138
|
+
nextPaymentDate: (0, zeniDayJS_1.date)(recurringExpense.next_payment_date),
|
|
139
|
+
merchant: {
|
|
140
|
+
name: recurringExpense.merchant.name,
|
|
141
|
+
brandName: recurringExpense.merchant.brand_name != null
|
|
142
|
+
? recurringExpense.merchant.brand_name
|
|
143
|
+
: undefined,
|
|
144
|
+
logo: recurringExpense.merchant.logo != null
|
|
145
|
+
? {
|
|
146
|
+
url: (0, urlPayload_1.toURL)(recurringExpense.merchant.logo),
|
|
147
|
+
base64: (_a = recurringExpense.merchant.logo.base64) !== null && _a !== void 0 ? _a : undefined,
|
|
148
|
+
}
|
|
149
|
+
: undefined,
|
|
150
|
+
},
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
exports.mapRecurringExpensePayloadToRecurringExpense = mapRecurringExpensePayloadToRecurringExpense;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AddressPayload } from '../../../../entity/address/addressPayload';
|
|
2
2
|
import { ChargeCardPayload } from '../../../../entity/chargeCard/chargeCardPayload';
|
|
3
|
-
import { ChargeCardTransactionPayload } from '../../../../entity/chargeCardTransaction/chargeCardTransactionPayload';
|
|
3
|
+
import { ChargeCardMerchantPayload, ChargeCardTransactionPayload } from '../../../../entity/chargeCardTransaction/chargeCardTransactionPayload';
|
|
4
4
|
import { ConnectedAccountPayload } from '../../../../entity/connectedAccount/connectedAccountPayload';
|
|
5
|
+
import { AmountPayload } from '../../../../entity/reimbursement/reimbursementPayload';
|
|
5
6
|
import { AttachmentPayload } from '../../../../entity/transaction/payloadTypes/attachmentPayload';
|
|
6
7
|
import { UserPayload } from '../../../../entity/user/userPayload';
|
|
7
8
|
import { UserRolePayload } from '../../../../entity/userRole/userRolePayload';
|
|
@@ -45,4 +46,13 @@ export interface ChargeCardTransactionStatisticsPayload {
|
|
|
45
46
|
total_number_of_paid_transactions: number;
|
|
46
47
|
total_number_of_transactions_with_receipts: number;
|
|
47
48
|
}
|
|
49
|
+
export interface RecurringExpensePayload extends AmountPayload {
|
|
50
|
+
merchant: ChargeCardMerchantPayload;
|
|
51
|
+
next_payment_date: string;
|
|
52
|
+
}
|
|
53
|
+
interface ChargeCardRecurringExpensePayload {
|
|
54
|
+
card_id: string;
|
|
55
|
+
expenses: RecurringExpensePayload[];
|
|
56
|
+
}
|
|
57
|
+
export type FetchChargeCardRecurringExpensesResponse = ZeniAPIResponse<ChargeCardRecurringExpensePayload[]>;
|
|
48
58
|
export {};
|
|
@@ -3,7 +3,7 @@ import { FetchState, ID } from '../../../../commonStateTypes/common';
|
|
|
3
3
|
import { PageToken } from '../../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
4
4
|
import { AttachmentPayload } from '../../../../entity/transaction/payloadTypes/attachmentPayload';
|
|
5
5
|
import { ZeniAPIStatus } from '../../../../responsePayload';
|
|
6
|
-
import { ChargeCardDetailState, ChargeCardDetailUiState } from './chargeCardDetail';
|
|
6
|
+
import { ChargeCardDetailState, ChargeCardDetailUiState, RecurringExpense } from './chargeCardDetail';
|
|
7
7
|
import { ChargeCardTransactionListPayload, ChargeCardTransactionStatisticsPayload } from './chargeCardDetailPayload';
|
|
8
8
|
export declare const initialState: ChargeCardDetailState;
|
|
9
9
|
export declare const fetchChargeCardDetailPage: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[chargeCardId: string, doFetchCreditAccounts: boolean, isCreditCardEnabled: boolean, cacheOverride?: any], {
|
|
@@ -97,11 +97,40 @@ export declare const fetchChargeCardDetailPage: import("@reduxjs/toolkit").Actio
|
|
|
97
97
|
chargeCardId: ID;
|
|
98
98
|
fetchState: FetchState;
|
|
99
99
|
error?: ZeniAPIStatus;
|
|
100
|
-
}, "chargeCardDetail/updateChargeCardSpendLimitSuccessOrFailure">,
|
|
100
|
+
}, "chargeCardDetail/updateChargeCardSpendLimitSuccessOrFailure">, updateChargeCardName: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[isChargeCardAdmin: boolean, chargeCardId: string, name: string], {
|
|
101
|
+
isChargeCardAdmin: boolean;
|
|
102
|
+
chargeCardId: string;
|
|
103
|
+
name: string;
|
|
104
|
+
}, "chargeCardDetail/updateChargeCardName", never, never>, updateChargeCardNameSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
105
|
+
chargeCardId: ID;
|
|
106
|
+
fetchState: FetchState;
|
|
107
|
+
error?: ZeniAPIStatus;
|
|
108
|
+
}, "chargeCardDetail/updateChargeCardNameSuccessOrFailure">, lockChargeCard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[isChargeCardAdmin: boolean, chargeCardId: string, reason?: string | undefined], {
|
|
109
|
+
isChargeCardAdmin: boolean;
|
|
110
|
+
chargeCardId: string;
|
|
111
|
+
reason: string | undefined;
|
|
112
|
+
}, "chargeCardDetail/lockChargeCard", never, never>, lockChargeCardSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
101
113
|
chargeCardId: ID;
|
|
114
|
+
fetchState: FetchState;
|
|
115
|
+
error?: ZeniAPIStatus;
|
|
116
|
+
}, "chargeCardDetail/lockChargeCardSuccessOrFailure">, unlockChargeCard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[isChargeCardAdmin: boolean, chargeCardId: string], {
|
|
117
|
+
chargeCardId: string;
|
|
118
|
+
isChargeCardAdmin: boolean;
|
|
119
|
+
}, "chargeCardDetail/unlockChargeCard", never, never>, unlockChargeCardSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
120
|
+
chargeCardId: ID;
|
|
121
|
+
fetchState: FetchState;
|
|
122
|
+
error?: ZeniAPIStatus;
|
|
123
|
+
}, "chargeCardDetail/unlockChargeCardSuccessOrFailure">, closeChargeCard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[chargeCardId: string, reason?: string | undefined], {
|
|
124
|
+
chargeCardId: string;
|
|
125
|
+
reason: string | undefined;
|
|
126
|
+
}, "chargeCardDetail/closeChargeCard", never, never>, closeChargeCardSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
127
|
+
chargeCardId: ID;
|
|
128
|
+
fetchState: FetchState;
|
|
129
|
+
error?: ZeniAPIStatus;
|
|
130
|
+
}, "chargeCardDetail/closeChargeCardSuccessOrFailure">, fetchDepositAccountLimit: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
102
131
|
depositAccountId: ID;
|
|
103
132
|
}, "chargeCardDetail/fetchDepositAccountLimit">, updateDepositAccountLimitFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
104
|
-
|
|
133
|
+
depositAccountId: ID;
|
|
105
134
|
fetchState: FetchState;
|
|
106
135
|
error?: ZeniAPIStatus;
|
|
107
136
|
}, "chargeCardDetail/updateDepositAccountLimitFetchStatus">, fetchChargeCardTransactionStatistics: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -113,7 +142,14 @@ export declare const fetchChargeCardDetailPage: import("@reduxjs/toolkit").Actio
|
|
|
113
142
|
chargeCardId: ID;
|
|
114
143
|
fetchState: FetchState;
|
|
115
144
|
error?: ZeniAPIStatus;
|
|
116
|
-
}, "chargeCardDetail/updateChargeCardTransactionStatisticsFetchState">,
|
|
145
|
+
}, "chargeCardDetail/updateChargeCardTransactionStatisticsFetchState">, fetchChargeCardsRecurringExpenses: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cardIds: string[]], {
|
|
146
|
+
cardIds: string[];
|
|
147
|
+
}, "chargeCardDetail/fetchChargeCardsRecurringExpenses", never, never>, updateChargeCardsRecurringExpenses: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
148
|
+
recurringExpensesByChargeCardId: Record<ID, RecurringExpense[]>;
|
|
149
|
+
}, "chargeCardDetail/updateChargeCardsRecurringExpenses">, updateChargeCardsRecurringExpensesFetchState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
150
|
+
fetchState: FetchState;
|
|
151
|
+
error?: ZeniAPIStatus;
|
|
152
|
+
}, "chargeCardDetail/updateChargeCardsRecurringExpensesFetchState">, sendOtpCardHolder: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
117
153
|
chargeCardId: ID;
|
|
118
154
|
phone: string;
|
|
119
155
|
}, "chargeCardDetail/sendOtpCardHolder">, resendOtpCardHolder: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|