@zeniai/client-epic-state 5.1.87 → 5.1.88-betaRD0
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/__testHelpers__/apiFailure.json +6 -0
- package/lib/entity/aiCfo/aiCfoState.d.ts +2 -2
- package/lib/entity/jeSchedules/jeScheduleHelper.d.ts +2 -0
- package/lib/entity/jeSchedules/jeScheduleHelper.js +7 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +34 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +68 -0
- package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +4 -2
- package/lib/entity/jeSchedules/jeSchedulesReducer.js +24 -2
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +10 -2
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +28 -3
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +41 -1
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +12 -1
- package/lib/entity/jeSchedules/jeSchedulesTypes.js +40 -1
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +2 -0
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +2 -0
- package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +2 -0
- package/lib/entity/vendor/__mocks__/vendorMock.d.ts +7 -0
- package/lib/entity/vendor/__mocks__/vendorMock.js +311 -0
- package/lib/entity/vendor/__mocks__/vendorStateMocks.d.ts +8 -0
- package/lib/entity/vendor/__mocks__/vendorStateMocks.js +415 -0
- package/lib/epic.d.ts +6 -1
- package/lib/epic.js +8 -1
- package/lib/esm/entity/jeSchedules/jeScheduleHelper.js +6 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +68 -1
- package/lib/esm/entity/jeSchedules/jeSchedulesReducer.js +24 -2
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +26 -2
- package/lib/esm/entity/jeSchedules/jeSchedulesTypes.js +34 -0
- package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +2 -0
- package/lib/esm/epic.js +8 -1
- package/lib/esm/index.js +12 -6
- package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +6 -3
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +34 -3
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +81 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +21 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +110 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +73 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +22 -0
- package/lib/esm/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +140 -0
- package/lib/esm/view/expenseAutomationView/payload/jeSchedulesPayload.js +55 -0
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +187 -28
- package/lib/esm/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +1 -0
- package/lib/esm/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +102 -0
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +260 -22
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +5 -6
- package/lib/esm/view/invoicing/invoicingDunningCaseDetailView/fetchInvoicingDunningEmailPreviewEpic.js +26 -0
- package/lib/esm/view/invoicing/invoicingDunningCaseDetailView/fetchInvoicingDunningEmailPreviewPageEpic.js +16 -0
- package/lib/esm/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewPayload.js +9 -1
- package/lib/esm/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewReducer.js +50 -1
- package/lib/esm/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector.js +14 -1
- package/lib/index.d.ts +17 -12
- package/lib/index.js +83 -49
- package/lib/view/accountMappingView/__mocks__/accountMappingSelectorMock.d.ts +11 -0
- package/lib/view/accountMappingView/__mocks__/accountMappingSelectorMock.js +4659 -0
- package/lib/view/addressView/__mocks__/addressViewMocks.d.ts +35 -0
- package/lib/view/addressView/__mocks__/addressViewMocks.js +239 -0
- package/lib/view/addressView/__mocks__/json/createAddressResponse.json +23 -0
- package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +258 -0
- package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +418 -0
- package/lib/view/addressView/__mocks__/json/fetchAddressResponse.json +24 -0
- package/lib/view/addressView/__mocks__/json/updateAddressResponse.json +24 -0
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +6 -3
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +32 -1
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +85 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +25 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.d.ts +45 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +114 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +77 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.d.ts +6 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +26 -0
- package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.d.ts +36 -0
- package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +145 -0
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +44 -2
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.js +58 -1
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +49 -10
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +189 -28
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +1 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.d.ts +40 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +34 -8
- package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.d.ts +20 -0
- package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +108 -0
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +10 -1
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +266 -21
- package/lib/view/expenseAutomationView/types/completedSubTab.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +79 -8
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +8 -8
- package/lib/view/invoicing/invoicingDunningCaseDetailView/fetchInvoicingDunningEmailPreviewEpic.d.ts +7 -0
- package/lib/view/invoicing/invoicingDunningCaseDetailView/fetchInvoicingDunningEmailPreviewEpic.js +30 -0
- package/lib/view/invoicing/invoicingDunningCaseDetailView/fetchInvoicingDunningEmailPreviewPageEpic.d.ts +6 -0
- package/lib/view/invoicing/invoicingDunningCaseDetailView/fetchInvoicingDunningEmailPreviewPageEpic.js +20 -0
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewEpics.d.ts +2 -2
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewPayload.d.ts +12 -0
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewPayload.js +11 -0
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewReducer.d.ts +21 -4
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewReducer.js +51 -2
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector.d.ts +3 -0
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector.js +16 -2
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewState.d.ts +13 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const toCompletedSubTab: (v: string) => "
|
|
1
|
+
export declare const toCompletedSubTab: (v: string) => "manual" | "all" | "ai_accountant";
|
|
2
2
|
export type CompletedSubTab = ReturnType<typeof toCompletedSubTab>;
|
|
3
3
|
/**
|
|
4
4
|
* "No sub-tab filter" sentinel — single source of truth for the default
|
|
@@ -1,22 +1,31 @@
|
|
|
1
1
|
import { NestedAccountHierarchyForReport } from '../../../commonStateTypes/accountView/nestedAccountID';
|
|
2
|
+
import { Amount } from '../../../commonStateTypes/amount';
|
|
2
3
|
import { FetchStateAndError, FetchedState, ID } from '../../../commonStateTypes/common';
|
|
3
4
|
import { Recommendation } from '../../../commonStateTypes/recommendationBase';
|
|
4
5
|
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
5
|
-
import { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
6
|
+
import { MonthYearPeriodId, ScheduleDaysOfMonth } from '../../../commonStateTypes/timePeriod';
|
|
6
7
|
import { AccountBase } from '../../../entity/account/accountState';
|
|
7
|
-
import { JEScheduleTransactionKey, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
|
|
8
|
+
import { JEOneTimeAccrualKey, JEScheduleKey, JEScheduleTransactionKey, ScheduleJournalEntryStatusCodeType, ScheduleTransactionID, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
|
|
8
9
|
import { VendorBase } from '../../../entity/vendor/vendorState';
|
|
9
|
-
|
|
10
|
+
import { ZeniDate } from '../../../zeniDayJS';
|
|
11
|
+
import { JETransactionLink } from '../../scheduleView/scheduleDetailView/scheduleDetailState';
|
|
12
|
+
export declare const toJEScheduleSortKey: (v: string) => "type" | "vendor" | "category" | "class" | "memo" | "transactionDate" | "totalAmount" | "runningBalance" | "jePostingDate" | "depCategory" | "scheduleCategory" | "startMonth" | "amortizationPeriod" | "remainingMonths";
|
|
10
13
|
export type JEScheduleSortKey = ReturnType<typeof toJEScheduleSortKey>;
|
|
11
|
-
export declare const
|
|
12
|
-
export type
|
|
14
|
+
export declare const toJEPageTab: (v: string) => "schedules" | "existing_schedules";
|
|
15
|
+
export type JEPageTab = ReturnType<typeof toJEPageTab>;
|
|
16
|
+
export declare const ALL_JE_PAGE_TABS: readonly JEPageTab[];
|
|
17
|
+
export type JESchedulePeriodTabKey = `${JEPageTab}_${MonthYearPeriodId}`;
|
|
18
|
+
export declare const getJESchedulePeriodTabKey: (selectedPageTab: JEPageTab, monthYearPeriodId: MonthYearPeriodId) => JESchedulePeriodTabKey;
|
|
13
19
|
export interface JESchedulesViewUIState {
|
|
20
|
+
createdGroupCollapsed: boolean;
|
|
21
|
+
pendingGroupCollapsed: boolean;
|
|
14
22
|
scrollPosition: {
|
|
15
23
|
scrollTop: number;
|
|
16
24
|
scrollLeft?: number;
|
|
17
25
|
} | undefined;
|
|
18
26
|
searchString: string;
|
|
19
|
-
|
|
27
|
+
selectedJETypeFilter: ScheduleTypes | null;
|
|
28
|
+
selectedPageTab: JEPageTab;
|
|
20
29
|
sortKey: JEScheduleSortKey;
|
|
21
30
|
sortOrder: SortOrder;
|
|
22
31
|
totalCount: number;
|
|
@@ -33,14 +42,76 @@ export interface JEScheduleLocalData {
|
|
|
33
42
|
}
|
|
34
43
|
export interface JESchedulesViewState extends FetchedState {
|
|
35
44
|
accountSettings: AccountSettingsState;
|
|
36
|
-
|
|
45
|
+
failedJeScheduleTransactionKeysByPeriodAndTab: Record<JESchedulePeriodTabKey, JEScheduleTransactionKey[]>;
|
|
37
46
|
ignoreStatusById: Record<JEScheduleTransactionKey, FetchStateAndError>;
|
|
47
|
+
jeScheduleAccruedKeysByPeriodAndTab: Record<JESchedulePeriodTabKey, JEScheduleKey[]>;
|
|
38
48
|
jeScheduleLocalDataById: Record<ID, JEScheduleLocalData>;
|
|
39
|
-
|
|
49
|
+
jeScheduleOneTimeAccrualKeysByPeriodAndTab: Record<JESchedulePeriodTabKey, JEOneTimeAccrualKey[]>;
|
|
50
|
+
jeScheduleTransactionKeysByPeriodAndTab: Record<JESchedulePeriodTabKey, JEScheduleTransactionKey[]>;
|
|
51
|
+
newSchedule: NewJeScheduleState;
|
|
40
52
|
postStatusById: Record<ID, FetchStateAndError>;
|
|
41
53
|
refreshStatus: FetchStateAndError;
|
|
42
54
|
uiState: JESchedulesViewUIState;
|
|
43
55
|
}
|
|
56
|
+
export interface NewJeDetailLocalData {
|
|
57
|
+
amount: Amount;
|
|
58
|
+
jeLink: JETransactionLink;
|
|
59
|
+
memo: string;
|
|
60
|
+
postingDate: ZeniDate;
|
|
61
|
+
postingStatus: ScheduleJournalEntryStatusCodeType;
|
|
62
|
+
runningBalance: Amount;
|
|
63
|
+
}
|
|
64
|
+
export interface NewScheduleLocalData {
|
|
65
|
+
jeScheduleDetails: NewJeDetailLocalData[];
|
|
66
|
+
scheduleType: ScheduleTypes;
|
|
67
|
+
lastDayOfMonth?: boolean;
|
|
68
|
+
selectedAccount?: ID;
|
|
69
|
+
selectedBaseTransactionId?: ScheduleTransactionID;
|
|
70
|
+
selectedClass?: ID;
|
|
71
|
+
selectedDate?: ZeniDate;
|
|
72
|
+
selectedDayOfMonth?: ScheduleDaysOfMonth;
|
|
73
|
+
selectedJEScheduleKey?: JEScheduleTransactionKey;
|
|
74
|
+
selectedMonths?: number;
|
|
75
|
+
selectedVendor?: VendorBase;
|
|
76
|
+
}
|
|
77
|
+
export interface NewScheduleLocalDataFixedAssets extends NewScheduleLocalData {
|
|
78
|
+
assetId?: string;
|
|
79
|
+
selectedAccumulatedDepreciationCategory?: ID;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The form values for creating a one-time accrual. Not stored in the slice — a one-time accrual is
|
|
83
|
+
* created in a single POST with no draft/resume step, so this is passed straight through the action
|
|
84
|
+
* to the payload builder.
|
|
85
|
+
*/
|
|
86
|
+
export interface NewOneTimeAccrualLocalData {
|
|
87
|
+
amount: number;
|
|
88
|
+
creditAccountId: ID;
|
|
89
|
+
debitAccountId: ID;
|
|
90
|
+
memo: string;
|
|
91
|
+
reverseNextMonth: boolean;
|
|
92
|
+
serviceMonth: ZeniDate;
|
|
93
|
+
vendorId: ID;
|
|
94
|
+
vendorName: string;
|
|
95
|
+
creditAccountName?: string;
|
|
96
|
+
debitAccountName?: string;
|
|
97
|
+
debitClassId?: ID;
|
|
98
|
+
debitClassName?: string;
|
|
99
|
+
}
|
|
100
|
+
export interface SearchTransactionsState extends FetchStateAndError {
|
|
101
|
+
searchResults: JEScheduleTransactionKey[];
|
|
102
|
+
searchString?: string;
|
|
103
|
+
}
|
|
104
|
+
export declare const MIN_NEW_SCHEDULE_SEARCH_LENGTH = 2;
|
|
105
|
+
export interface NewJeScheduleState extends FetchStateAndError {
|
|
106
|
+
createOneTimeAccrualStatus: FetchStateAndError;
|
|
107
|
+
newScheduleState: {
|
|
108
|
+
fixed_assets: NewScheduleLocalDataFixedAssets;
|
|
109
|
+
prepaid_expenses: NewScheduleLocalData;
|
|
110
|
+
};
|
|
111
|
+
saveStatus: FetchStateAndError;
|
|
112
|
+
searchTransactions: SearchTransactionsState;
|
|
113
|
+
selectedDetailScheduleType?: ScheduleTypes;
|
|
114
|
+
}
|
|
44
115
|
export interface AccountSettingsLocalData {
|
|
45
116
|
previousAccruedExpensesAccount: AccountBase[];
|
|
46
117
|
previousFixedAssetsAccount: AccountBase[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.MIN_NEW_SCHEDULE_SEARCH_LENGTH = exports.getJESchedulePeriodTabKey = exports.ALL_JE_PAGE_TABS = exports.toJEPageTab = exports.toJEScheduleSortKey = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
5
|
const JE_SCHEDULE_SORT_KEYS = [
|
|
6
6
|
'vendor',
|
|
@@ -20,10 +20,10 @@ const JE_SCHEDULE_SORT_KEYS = [
|
|
|
20
20
|
];
|
|
21
21
|
const toJEScheduleSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, JE_SCHEDULE_SORT_KEYS);
|
|
22
22
|
exports.toJEScheduleSortKey = toJEScheduleSortKey;
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
exports.
|
|
23
|
+
const JE_PAGE_TABS = ['schedules', 'existing_schedules'];
|
|
24
|
+
const toJEPageTab = (v) => (0, stringToUnion_1.stringToUnion)(v, JE_PAGE_TABS);
|
|
25
|
+
exports.toJEPageTab = toJEPageTab;
|
|
26
|
+
exports.ALL_JE_PAGE_TABS = JE_PAGE_TABS;
|
|
27
|
+
const getJESchedulePeriodTabKey = (selectedPageTab, monthYearPeriodId) => `${selectedPageTab}_${monthYearPeriodId}`;
|
|
28
|
+
exports.getJESchedulePeriodTabKey = getJESchedulePeriodTabKey;
|
|
29
|
+
exports.MIN_NEW_SCHEDULE_SEARCH_LENGTH = 2;
|
package/lib/view/invoicing/invoicingDunningCaseDetailView/fetchInvoicingDunningEmailPreviewEpic.d.ts
ADDED
|
@@ -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 { fetchInvoicingDunningEmailPreview, updateInvoicingDunningEmailPreview, updateInvoicingDunningEmailPreviewFailure } from './invoicingDunningCaseDetailViewReducer';
|
|
6
|
+
export type ActionType = ReturnType<typeof fetchInvoicingDunningEmailPreview> | ReturnType<typeof updateInvoicingDunningEmailPreview> | ReturnType<typeof updateInvoicingDunningEmailPreviewFailure>;
|
|
7
|
+
export declare const fetchInvoicingDunningEmailPreviewEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
package/lib/view/invoicing/invoicingDunningCaseDetailView/fetchInvoicingDunningEmailPreviewEpic.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchInvoicingDunningEmailPreviewEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../responsePayload");
|
|
7
|
+
const invoicingDunningCaseDetailViewPayload_1 = require("./invoicingDunningCaseDetailViewPayload");
|
|
8
|
+
const invoicingDunningCaseDetailViewReducer_1 = require("./invoicingDunningCaseDetailViewReducer");
|
|
9
|
+
const fetchInvoicingDunningEmailPreviewEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(invoicingDunningCaseDetailViewReducer_1.fetchInvoicingDunningEmailPreview.match), (0, operators_1.switchMap)((action) => {
|
|
10
|
+
const { id } = action.payload;
|
|
11
|
+
const apiUrl = `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/dunning/${encodeURIComponent(id)}/email-preview`;
|
|
12
|
+
return zeniAPI
|
|
13
|
+
.postAndGetJSON(apiUrl, {})
|
|
14
|
+
.pipe((0, operators_1.map)((response) => {
|
|
15
|
+
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
16
|
+
return (0, invoicingDunningCaseDetailViewReducer_1.updateInvoicingDunningEmailPreview)({
|
|
17
|
+
id,
|
|
18
|
+
preview: (0, invoicingDunningCaseDetailViewPayload_1.toInvoicingDunningEmailPreview)(response.data),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return (0, invoicingDunningCaseDetailViewReducer_1.updateInvoicingDunningEmailPreviewFailure)({
|
|
22
|
+
id,
|
|
23
|
+
status: response.status,
|
|
24
|
+
});
|
|
25
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, invoicingDunningCaseDetailViewReducer_1.updateInvoicingDunningEmailPreviewFailure)({
|
|
26
|
+
id,
|
|
27
|
+
status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', `Dunning email preview REST API call errored out: ${error instanceof Error ? error.message : String(error)}`),
|
|
28
|
+
}))));
|
|
29
|
+
}));
|
|
30
|
+
exports.fetchInvoicingDunningEmailPreviewEpic = fetchInvoicingDunningEmailPreviewEpic;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { RootState } from '../../../reducer';
|
|
4
|
+
import { fetchInvoicingDunningEmailPreview, fetchInvoicingDunningEmailPreviewPage } from './invoicingDunningCaseDetailViewReducer';
|
|
5
|
+
export type ActionType = ReturnType<typeof fetchInvoicingDunningEmailPreview> | ReturnType<typeof fetchInvoicingDunningEmailPreviewPage>;
|
|
6
|
+
export declare const fetchInvoicingDunningEmailPreviewPageEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchInvoicingDunningEmailPreviewPageEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const invoicingDunningCaseDetailViewReducer_1 = require("./invoicingDunningCaseDetailViewReducer");
|
|
7
|
+
const shouldFetch = (fetchStateAndError, cacheOverride) => cacheOverride ||
|
|
8
|
+
(fetchStateAndError.fetchState !== 'Completed' &&
|
|
9
|
+
fetchStateAndError.fetchState !== 'In-Progress');
|
|
10
|
+
const fetchInvoicingDunningEmailPreviewPageEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(invoicingDunningCaseDetailViewReducer_1.fetchInvoicingDunningEmailPreviewPage.match), (0, operators_1.mergeMap)((action) => {
|
|
11
|
+
const { cacheOverride, id } = action.payload;
|
|
12
|
+
const detailState = state$.value.invoicingDunningCaseDetailViewState;
|
|
13
|
+
if (detailState.id !== id) {
|
|
14
|
+
return rxjs_1.EMPTY;
|
|
15
|
+
}
|
|
16
|
+
return shouldFetch(detailState.emailPreview, cacheOverride)
|
|
17
|
+
? (0, rxjs_1.of)((0, invoicingDunningCaseDetailViewReducer_1.fetchInvoicingDunningEmailPreview)({ id }))
|
|
18
|
+
: rxjs_1.EMPTY;
|
|
19
|
+
}));
|
|
20
|
+
exports.fetchInvoicingDunningEmailPreviewPageEpic = fetchInvoicingDunningEmailPreviewPageEpic;
|
package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewEpics.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ import { Observable } from 'rxjs';
|
|
|
3
3
|
import { updateInvoicingDunningCases } from '../../../entity/invoicing/dunningCase/dunningCaseReducer';
|
|
4
4
|
import { RootState } from '../../../reducer';
|
|
5
5
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
6
|
-
import { fetchInvoicingDunningCaseDetail, updateInvoicingDunningCaseDetail, updateInvoicingDunningCaseDetailFailure } from './invoicingDunningCaseDetailViewReducer';
|
|
7
|
-
export type ActionType = ReturnType<typeof fetchInvoicingDunningCaseDetail> | ReturnType<typeof updateInvoicingDunningCaseDetail> | ReturnType<typeof updateInvoicingDunningCaseDetailFailure> | ReturnType<typeof updateInvoicingDunningCases>;
|
|
6
|
+
import { clearInvoicingDunningCaseDetailView, fetchInvoicingDunningCaseDetail, fetchInvoicingDunningEmailPreview, fetchInvoicingDunningEmailPreviewPage, invalidateInvoicingDunningEmailPreview, updateInvoicingDunningCaseDetail, updateInvoicingDunningCaseDetailFailure, updateInvoicingDunningEmailPreview, updateInvoicingDunningEmailPreviewFailure } from './invoicingDunningCaseDetailViewReducer';
|
|
7
|
+
export type ActionType = ReturnType<typeof clearInvoicingDunningCaseDetailView> | ReturnType<typeof fetchInvoicingDunningCaseDetail> | ReturnType<typeof fetchInvoicingDunningEmailPreview> | ReturnType<typeof fetchInvoicingDunningEmailPreviewPage> | ReturnType<typeof invalidateInvoicingDunningEmailPreview> | ReturnType<typeof updateInvoicingDunningCaseDetail> | ReturnType<typeof updateInvoicingDunningCaseDetailFailure> | ReturnType<typeof updateInvoicingDunningEmailPreview> | ReturnType<typeof updateInvoicingDunningEmailPreviewFailure> | ReturnType<typeof updateInvoicingDunningCases>;
|
|
8
8
|
export declare const fetchInvoicingDunningCaseDetailEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewPayload.d.ts
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
import { InvoicingDunningCasePayload } from '../../../entity/invoicing/dunningCase/dunningCasePayload';
|
|
2
2
|
import { ZeniAPIResponse } from '../../../responsePayload';
|
|
3
|
+
import { InvoicingDunningEmailPreview } from './invoicingDunningCaseDetailViewState';
|
|
3
4
|
export type InvoicingDunningCaseDetailResponse = ZeniAPIResponse<InvoicingDunningCasePayload>;
|
|
5
|
+
export interface InvoicingDunningEmailPreviewPayload {
|
|
6
|
+
body: string;
|
|
7
|
+
body_token: string;
|
|
8
|
+
cc: string;
|
|
9
|
+
rendered_html_template: string;
|
|
10
|
+
subject: string;
|
|
11
|
+
subject_token: string;
|
|
12
|
+
to: string;
|
|
13
|
+
}
|
|
14
|
+
export type InvoicingDunningEmailPreviewResponse = ZeniAPIResponse<InvoicingDunningEmailPreviewPayload>;
|
|
15
|
+
export declare const toInvoicingDunningEmailPreview: (payload: InvoicingDunningEmailPreviewPayload) => InvoicingDunningEmailPreview;
|
package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewPayload.js
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toInvoicingDunningEmailPreview = void 0;
|
|
4
|
+
const toInvoicingDunningEmailPreview = (payload) => ({
|
|
5
|
+
body: payload.body,
|
|
6
|
+
bodyToken: payload.body_token,
|
|
7
|
+
cc: payload.cc,
|
|
8
|
+
renderedHtmlTemplate: payload.rendered_html_template,
|
|
9
|
+
subject: payload.subject,
|
|
10
|
+
subjectToken: payload.subject_token,
|
|
11
|
+
to: payload.to,
|
|
12
|
+
});
|
|
13
|
+
exports.toInvoicingDunningEmailPreview = toInvoicingDunningEmailPreview;
|
package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewReducer.d.ts
CHANGED
|
@@ -1,11 +1,28 @@
|
|
|
1
1
|
import { ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
3
|
-
import { InvoicingDunningCaseDetailViewState } from './invoicingDunningCaseDetailViewState';
|
|
3
|
+
import { InvoicingDunningCaseDetailViewState, InvoicingDunningEmailPreview, InvoicingDunningEmailPreviewState } from './invoicingDunningCaseDetailViewState';
|
|
4
|
+
export declare const initialEmailPreviewState: InvoicingDunningEmailPreviewState;
|
|
4
5
|
export declare const initialState: InvoicingDunningCaseDetailViewState;
|
|
5
|
-
export declare const fetchInvoicingDunningCaseDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
6
|
+
export declare const clearInvoicingDunningCaseDetailView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingDunningCaseDetailView/clearInvoicingDunningCaseDetailView">, fetchInvoicingDunningCaseDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
6
7
|
id: ID;
|
|
7
|
-
}, "invoicingDunningCaseDetailView/fetchInvoicingDunningCaseDetail">,
|
|
8
|
+
}, "invoicingDunningCaseDetailView/fetchInvoicingDunningCaseDetail">, fetchInvoicingDunningEmailPreview: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
8
9
|
id: ID;
|
|
9
|
-
}, "invoicingDunningCaseDetailView/
|
|
10
|
+
}, "invoicingDunningCaseDetailView/fetchInvoicingDunningEmailPreview">, fetchInvoicingDunningEmailPreviewPage: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: {
|
|
11
|
+
id: ID;
|
|
12
|
+
cacheOverride?: boolean;
|
|
13
|
+
}], {
|
|
14
|
+
cacheOverride: boolean;
|
|
15
|
+
id: string;
|
|
16
|
+
}, "invoicingDunningCaseDetailView/fetchInvoicingDunningEmailPreviewPage", never, never>, invalidateInvoicingDunningEmailPreview: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
17
|
+
id: ID;
|
|
18
|
+
}, "invoicingDunningCaseDetailView/invalidateInvoicingDunningEmailPreview">, updateInvoicingDunningCaseDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
19
|
+
id: ID;
|
|
20
|
+
}, "invoicingDunningCaseDetailView/updateInvoicingDunningCaseDetail">, updateInvoicingDunningCaseDetailFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingDunningCaseDetailView/updateInvoicingDunningCaseDetailFailure">, updateInvoicingDunningEmailPreview: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
21
|
+
id: ID;
|
|
22
|
+
preview: InvoicingDunningEmailPreview;
|
|
23
|
+
}, "invoicingDunningCaseDetailView/updateInvoicingDunningEmailPreview">, updateInvoicingDunningEmailPreviewFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
24
|
+
id: ID;
|
|
25
|
+
status: ZeniAPIStatus;
|
|
26
|
+
}, "invoicingDunningCaseDetailView/updateInvoicingDunningEmailPreviewFailure">;
|
|
10
27
|
declare const _default: import("redux").Reducer<InvoicingDunningCaseDetailViewState>;
|
|
11
28
|
export default _default;
|
package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewReducer.js
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.updateInvoicingDunningEmailPreviewFailure = exports.updateInvoicingDunningEmailPreview = exports.updateInvoicingDunningCaseDetailFailure = exports.updateInvoicingDunningCaseDetail = exports.invalidateInvoicingDunningEmailPreview = exports.fetchInvoicingDunningEmailPreviewPage = exports.fetchInvoicingDunningEmailPreview = exports.fetchInvoicingDunningCaseDetail = exports.clearInvoicingDunningCaseDetailView = exports.initialState = exports.initialEmailPreviewState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const rootActions_1 = require("../../../rootActions");
|
|
7
|
+
exports.initialEmailPreviewState = {
|
|
8
|
+
fetchState: 'Not-Started',
|
|
9
|
+
error: undefined,
|
|
10
|
+
preview: undefined,
|
|
11
|
+
};
|
|
7
12
|
exports.initialState = {
|
|
8
13
|
fetchState: 'Not-Started',
|
|
9
14
|
error: undefined,
|
|
15
|
+
emailPreview: exports.initialEmailPreviewState,
|
|
10
16
|
id: undefined,
|
|
11
17
|
};
|
|
12
18
|
const invoicingDunningCaseDetailView = (0, toolkit_1.createSlice)({
|
|
@@ -14,10 +20,38 @@ const invoicingDunningCaseDetailView = (0, toolkit_1.createSlice)({
|
|
|
14
20
|
initialState: exports.initialState,
|
|
15
21
|
reducers: {
|
|
16
22
|
fetchInvoicingDunningCaseDetail(draft, action) {
|
|
23
|
+
if (draft.id !== action.payload.id) {
|
|
24
|
+
draft.emailPreview = { ...exports.initialEmailPreviewState };
|
|
25
|
+
}
|
|
17
26
|
draft.id = action.payload.id;
|
|
18
27
|
draft.fetchState = 'In-Progress';
|
|
19
28
|
draft.error = undefined;
|
|
20
29
|
},
|
|
30
|
+
fetchInvoicingDunningEmailPreview(draft, action) {
|
|
31
|
+
if (draft.id !== action.payload.id) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
draft.emailPreview.fetchState = 'In-Progress';
|
|
35
|
+
draft.emailPreview.error = undefined;
|
|
36
|
+
},
|
|
37
|
+
fetchInvoicingDunningEmailPreviewPage: {
|
|
38
|
+
reducer() {
|
|
39
|
+
// Cache-aware orchestrator trigger only.
|
|
40
|
+
},
|
|
41
|
+
prepare(payload) {
|
|
42
|
+
return {
|
|
43
|
+
payload: {
|
|
44
|
+
cacheOverride: payload.cacheOverride ?? false,
|
|
45
|
+
id: payload.id,
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
invalidateInvoicingDunningEmailPreview(draft, action) {
|
|
51
|
+
if (draft.id === action.payload.id) {
|
|
52
|
+
draft.emailPreview = { ...exports.initialEmailPreviewState };
|
|
53
|
+
}
|
|
54
|
+
},
|
|
21
55
|
updateInvoicingDunningCaseDetail(draft, action) {
|
|
22
56
|
draft.id = action.payload.id;
|
|
23
57
|
draft.fetchState = 'Completed';
|
|
@@ -27,6 +61,21 @@ const invoicingDunningCaseDetailView = (0, toolkit_1.createSlice)({
|
|
|
27
61
|
draft.fetchState = 'Error';
|
|
28
62
|
draft.error = action.payload;
|
|
29
63
|
},
|
|
64
|
+
updateInvoicingDunningEmailPreview(draft, action) {
|
|
65
|
+
if (draft.id === action.payload.id) {
|
|
66
|
+
draft.emailPreview = {
|
|
67
|
+
error: undefined,
|
|
68
|
+
fetchState: 'Completed',
|
|
69
|
+
preview: action.payload.preview,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
updateInvoicingDunningEmailPreviewFailure(draft, action) {
|
|
74
|
+
if (draft.id === action.payload.id) {
|
|
75
|
+
draft.emailPreview.fetchState = 'Error';
|
|
76
|
+
draft.emailPreview.error = action.payload.status;
|
|
77
|
+
}
|
|
78
|
+
},
|
|
30
79
|
clearInvoicingDunningCaseDetailView(draft) {
|
|
31
80
|
Object.assign(draft, exports.initialState);
|
|
32
81
|
},
|
|
@@ -37,5 +86,5 @@ const invoicingDunningCaseDetailView = (0, toolkit_1.createSlice)({
|
|
|
37
86
|
});
|
|
38
87
|
},
|
|
39
88
|
});
|
|
40
|
-
_a = invoicingDunningCaseDetailView.actions, exports.fetchInvoicingDunningCaseDetail = _a.fetchInvoicingDunningCaseDetail, exports.updateInvoicingDunningCaseDetail = _a.updateInvoicingDunningCaseDetail, exports.updateInvoicingDunningCaseDetailFailure = _a.updateInvoicingDunningCaseDetailFailure, exports.
|
|
89
|
+
_a = invoicingDunningCaseDetailView.actions, exports.clearInvoicingDunningCaseDetailView = _a.clearInvoicingDunningCaseDetailView, exports.fetchInvoicingDunningCaseDetail = _a.fetchInvoicingDunningCaseDetail, exports.fetchInvoicingDunningEmailPreview = _a.fetchInvoicingDunningEmailPreview, exports.fetchInvoicingDunningEmailPreviewPage = _a.fetchInvoicingDunningEmailPreviewPage, exports.invalidateInvoicingDunningEmailPreview = _a.invalidateInvoicingDunningEmailPreview, exports.updateInvoicingDunningCaseDetail = _a.updateInvoicingDunningCaseDetail, exports.updateInvoicingDunningCaseDetailFailure = _a.updateInvoicingDunningCaseDetailFailure, exports.updateInvoicingDunningEmailPreview = _a.updateInvoicingDunningEmailPreview, exports.updateInvoicingDunningEmailPreviewFailure = _a.updateInvoicingDunningEmailPreviewFailure;
|
|
41
90
|
exports.default = invoicingDunningCaseDetailView.reducer;
|
|
@@ -2,6 +2,7 @@ import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
3
|
import { InvoicingDunningCase } from '../../../entity/invoicing/dunningCase/dunningCaseState';
|
|
4
4
|
import { RootState } from '../../../reducer';
|
|
5
|
+
import { InvoicingDunningEmailPreviewState } from './invoicingDunningCaseDetailViewState';
|
|
5
6
|
/**
|
|
6
7
|
* Read-only view for the dunning case detail page: the dunning case entity + its
|
|
7
8
|
* fetch state, plus the per-case action run-state (pause/resume/retry) folded in
|
|
@@ -9,7 +10,9 @@ import { RootState } from '../../../reducer';
|
|
|
9
10
|
*/
|
|
10
11
|
export interface InvoicingDunningCaseDetailView extends SelectorView {
|
|
11
12
|
actionState: FetchStateAndError;
|
|
13
|
+
emailPreview: InvoicingDunningEmailPreviewState;
|
|
12
14
|
dunningCase?: InvoicingDunningCase;
|
|
13
15
|
}
|
|
14
16
|
export declare const getInvoicingDunningCaseById: (state: RootState, id: string) => InvoicingDunningCase | undefined;
|
|
15
17
|
export declare const getInvoicingDunningCaseDetail: (state: RootState, invoicingDunningCaseID: ID) => InvoicingDunningCaseDetailView;
|
|
18
|
+
export declare const getInvoicingDunningEmailPreview: (state: RootState, invoicingDunningCaseID: ID) => InvoicingDunningEmailPreviewState;
|
package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector.js
CHANGED
|
@@ -1,18 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getInvoicingDunningCaseDetail = exports.getInvoicingDunningCaseById = void 0;
|
|
3
|
+
exports.getInvoicingDunningEmailPreview = exports.getInvoicingDunningCaseDetail = exports.getInvoicingDunningCaseById = void 0;
|
|
4
4
|
const dunningCaseSelector_1 = require("../../../entity/invoicing/dunningCase/dunningCaseSelector");
|
|
5
5
|
const dunningActionSelector_1 = require("../dunningAction/dunningActionSelector");
|
|
6
|
+
const EMAIL_PREVIEW_NOT_STARTED = {
|
|
7
|
+
error: undefined,
|
|
8
|
+
fetchState: 'Not-Started',
|
|
9
|
+
preview: undefined,
|
|
10
|
+
};
|
|
6
11
|
const getInvoicingDunningCaseById = (state, id) => (0, dunningCaseSelector_1.getInvoicingDunningCaseById)(state.invoicingDunningCaseState, id);
|
|
7
12
|
exports.getInvoicingDunningCaseById = getInvoicingDunningCaseById;
|
|
8
13
|
const getInvoicingDunningCaseDetail = (state, invoicingDunningCaseID) => {
|
|
9
|
-
const { error, fetchState } = state.invoicingDunningCaseDetailViewState;
|
|
14
|
+
const { emailPreview, error, fetchState, id } = state.invoicingDunningCaseDetailViewState;
|
|
10
15
|
return {
|
|
11
16
|
actionState: (0, dunningActionSelector_1.getInvoicingDunningActionState)(invoicingDunningCaseID)(state),
|
|
12
17
|
dunningCase: (0, exports.getInvoicingDunningCaseById)(state, invoicingDunningCaseID),
|
|
18
|
+
emailPreview: id === invoicingDunningCaseID ? emailPreview : EMAIL_PREVIEW_NOT_STARTED,
|
|
13
19
|
fetchState,
|
|
14
20
|
error,
|
|
15
21
|
version: 1.0,
|
|
16
22
|
};
|
|
17
23
|
};
|
|
18
24
|
exports.getInvoicingDunningCaseDetail = getInvoicingDunningCaseDetail;
|
|
25
|
+
const getInvoicingDunningEmailPreview = (state, invoicingDunningCaseID) => {
|
|
26
|
+
const detailState = state.invoicingDunningCaseDetailViewState;
|
|
27
|
+
if (detailState.id !== invoicingDunningCaseID) {
|
|
28
|
+
return EMAIL_PREVIEW_NOT_STARTED;
|
|
29
|
+
}
|
|
30
|
+
return detailState.emailPreview;
|
|
31
|
+
};
|
|
32
|
+
exports.getInvoicingDunningEmailPreview = getInvoicingDunningEmailPreview;
|
package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewState.d.ts
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
|
+
export interface InvoicingDunningEmailPreview {
|
|
3
|
+
body: string;
|
|
4
|
+
bodyToken: string;
|
|
5
|
+
cc: string;
|
|
6
|
+
renderedHtmlTemplate: string;
|
|
7
|
+
subject: string;
|
|
8
|
+
subjectToken: string;
|
|
9
|
+
to: string;
|
|
10
|
+
}
|
|
11
|
+
export interface InvoicingDunningEmailPreviewState extends FetchStateAndError {
|
|
12
|
+
preview?: InvoicingDunningEmailPreview;
|
|
13
|
+
}
|
|
2
14
|
export interface InvoicingDunningCaseDetailViewState extends FetchStateAndError {
|
|
15
|
+
emailPreview: InvoicingDunningEmailPreviewState;
|
|
3
16
|
id?: ID;
|
|
4
17
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.88-betaRD0",
|
|
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",
|