@zeniai/client-epic-state 4.9.4 → 4.9.5
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.
|
@@ -5,6 +5,7 @@ const rxjs_1 = require("rxjs");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const responsePayload_1 = require("../../../responsePayload");
|
|
7
7
|
const companyMonthEndReportViewReducer_1 = require("../companyMonthEndReportViewReducer");
|
|
8
|
+
const fileReducer_1 = require("../../../entity/file/fileReducer");
|
|
8
9
|
const fetchCompanyMonthEndReportViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyMonthEndReportViewReducer_1.fetchCompanyMonthEndReportView.match), (0, operators_1.switchMap)((action) => {
|
|
9
10
|
const { cacheOverride, companyId } = action.payload;
|
|
10
11
|
const state = state$.value;
|
|
@@ -20,6 +21,7 @@ const fetchCompanyMonthEndReportViewEpic = (actions$, state$, zeniAPI) => action
|
|
|
20
21
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
21
22
|
const actions = [
|
|
22
23
|
(0, companyMonthEndReportViewReducer_1.updateCompanyMonthEndReportViewOnSuccess)(companyId, response.data),
|
|
24
|
+
(0, fileReducer_1.updateAttachmentFiles)({ files: response.data.files }),
|
|
23
25
|
];
|
|
24
26
|
return (0, rxjs_1.from)(actions);
|
|
25
27
|
}
|
|
@@ -9,6 +9,7 @@ const zeniDayJS_1 = require("../../../zeniDayJS");
|
|
|
9
9
|
const snackbarReducer_1 = require("../../../entity/snackbar/snackbarReducer");
|
|
10
10
|
const companyReducer_1 = require("../../../entity/company/companyReducer");
|
|
11
11
|
const fileSelector_1 = require("../../../entity/file/fileSelector");
|
|
12
|
+
const formatZeniDateFY_1 = require("../../../commonStateTypes/fiscalYearHelpers/formatZeniDateFY");
|
|
12
13
|
const saveCompanyMonthEndReportEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyMonthEndReportViewReducer_1.saveCompanyMonthEndReport.match), (0, operators_1.mergeMap)((action) => {
|
|
13
14
|
const { companyId, recipientEmailList, subject, isPreview, fileId, zeniRequestsHtml, } = action.payload;
|
|
14
15
|
const state = state$.value;
|
|
@@ -33,8 +34,9 @@ const saveCompanyMonthEndReportEpic = (actions$, state$, zeniAPI) => actions$.pi
|
|
|
33
34
|
recipient_email_list: recipientEmailList,
|
|
34
35
|
tenant_receiver_email_list: state.companyMonthEndReportViewState.monthEndReportDataByCompanyId[companyId].companyMonthEndReportData.tenantReceiverEmailList,
|
|
35
36
|
last_report_sent_business_day: lastReportSentBusinessDay,
|
|
36
|
-
last_report_sent_date: lastReportSentDate.format(
|
|
37
|
+
last_report_sent_date: lastReportSentDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT),
|
|
37
38
|
zeni_requests_html: zeniRequestsHtml,
|
|
39
|
+
files: filePayload,
|
|
38
40
|
};
|
|
39
41
|
const query = { is_preview: isPreview };
|
|
40
42
|
return zeniAPI
|
|
@@ -9,6 +9,7 @@ const zeniDayJS_1 = require("../../../zeniDayJS");
|
|
|
9
9
|
const companyReducer_1 = require("../../../entity/company/companyReducer");
|
|
10
10
|
const snackbarReducer_1 = require("../../../entity/snackbar/snackbarReducer");
|
|
11
11
|
const fileSelector_1 = require("../../../entity/file/fileSelector");
|
|
12
|
+
const formatZeniDateFY_1 = require("../../../commonStateTypes/fiscalYearHelpers/formatZeniDateFY");
|
|
12
13
|
const sendCompanyMonthEndReportEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyMonthEndReportViewReducer_1.sendCompanyMonthEndReport.match), (0, operators_1.mergeMap)((action) => {
|
|
13
14
|
const { companyId, fileId } = action.payload;
|
|
14
15
|
const state = state$.value;
|
|
@@ -36,8 +37,9 @@ const sendCompanyMonthEndReportEpic = (actions$, state$, zeniAPI) => actions$.pi
|
|
|
36
37
|
recipient_email_list: recipientEmailList,
|
|
37
38
|
tenant_receiver_email_list: state.companyMonthEndReportViewState.monthEndReportDataByCompanyId[companyId].companyMonthEndReportData.tenantReceiverEmailList,
|
|
38
39
|
last_report_sent_business_day: lastReportSentBusinessDay,
|
|
39
|
-
last_report_sent_date: lastReportSentDate.format(
|
|
40
|
+
last_report_sent_date: lastReportSentDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT),
|
|
40
41
|
zeni_requests_html: zeniRequestsHtml,
|
|
42
|
+
files: filePayload,
|
|
41
43
|
};
|
|
42
44
|
return zeniAPI
|
|
43
45
|
.postAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}/emails/month-end`, payload, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.9.
|
|
3
|
+
"version": "4.9.5",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|