@zeniai/client-epic-state 4.9.6 → 4.9.8
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/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.d.ts +0 -1
- package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.js +1 -2
- package/lib/entity/userRole/userRoleType.d.ts +1 -0
- package/lib/entity/userRole/userRoleType.js +8 -1
- package/lib/epic.d.ts +6 -8
- package/lib/epic.js +6 -8
- package/lib/index.d.ts +11 -10
- package/lib/index.js +20 -22
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewPayload.d.ts +0 -16
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.d.ts +1 -21
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.js +3 -77
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewSelector.d.ts +1 -9
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewSelector.js +1 -42
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewState.d.ts +3 -15
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewState.js +1 -18
- package/lib/view/companyMonthEndReportView/{epics/fetchCompanyMonthEndReportViewEpic.d.ts → fetchCompanyMonthEndReportViewEpic.d.ts} +4 -4
- package/lib/view/companyMonthEndReportView/{epics/fetchCompanyMonthEndReportViewEpic.js → fetchCompanyMonthEndReportViewEpic.js} +2 -4
- package/lib/view/companyMonthEndReportView/{epics/improveUsingZeniGPTEpic.d.ts → improveUsingZeniGPTEpic.d.ts} +3 -3
- package/lib/view/companyMonthEndReportView/{epics/improveUsingZeniGPTEpic.js → improveUsingZeniGPTEpic.js} +2 -2
- package/lib/view/companyMonthEndReportView/{epics/saveCompanyMonthEndReportEpic.d.ts → saveCompanyMonthEndReportEpic.d.ts} +5 -5
- package/lib/view/companyMonthEndReportView/{epics/saveCompanyMonthEndReportEpic.js → saveCompanyMonthEndReportEpic.js} +7 -9
- package/lib/view/companyMonthEndReportView/{epics/sendCompanyMonthEndReportEpic.d.ts → sendCompanyMonthEndReportEpic.d.ts} +5 -5
- package/lib/view/companyMonthEndReportView/{epics/sendCompanyMonthEndReportEpic.js → sendCompanyMonthEndReportEpic.js} +7 -9
- package/lib/view/recommendation/fetchRecommendationByEntityIdEpic.js +2 -2
- package/lib/view/recommendation/fetchRecommendationByEntityQboIdEpic.d.ts +10 -0
- package/lib/view/recommendation/{fetchEntityRecommendationsByTransactionIdEpic.js → fetchRecommendationByEntityQboIdEpic.js} +6 -13
- package/lib/view/recommendation/recommendationHelper.d.ts +0 -3
- package/lib/view/recommendation/recommendationHelper.js +21 -37
- package/lib/view/recommendation/recommendationReducer.d.ts +1 -1
- package/lib/view/recommendation/recommendationReducer.js +3 -3
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.d.ts +0 -1
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +13 -17
- package/lib/view/spendManagement/reimbursement/reimbursementConfig/reimbursementConfigState.d.ts +0 -1
- package/lib/view/spendManagement/reimbursement/reimbursementConfig/reimbursementConfigState.js +1 -2
- package/lib/view/spendManagement/reimbursement/remiDetailView/epics/fetchRemiDetailEpic.d.ts +1 -2
- package/lib/view/spendManagement/reimbursement/remiDetailView/epics/fetchRemiDetailEpic.js +2 -8
- package/lib/view/spendManagement/reimbursement/remiDetailView/remiDetailViewSelector.d.ts +1 -2
- package/lib/view/spendManagement/reimbursement/remiDetailView/remiDetailViewSelector.js +14 -23
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.d.ts +1 -2
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +2 -3
- package/lib/view/transactionDetail/transactionDetailReducer.d.ts +3 -3
- package/lib/view/transactionDetail/transactionDetailReducer.js +4 -4
- package/lib/view/transactionDetail/transactionDetailState.d.ts +0 -7
- package/lib/view/transactionDetail/transactionDetailState.js +3 -4
- package/package.json +1 -1
- package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportHistoricDataEpic.d.ts +0 -8
- package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportHistoricDataEpic.js +0 -66
- package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportHistoricDatesEpic.d.ts +0 -7
- package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportHistoricDatesEpic.js +0 -54
- package/lib/view/recommendation/fetchEntityRecommendationsByTransactionIdEpic.d.ts +0 -10
package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportHistoricDataEpic.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchCompanyMonthEndReportHistoricDataEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const responsePayload_1 = require("../../../responsePayload");
|
|
7
|
-
const companyMonthEndReportViewReducer_1 = require("../companyMonthEndReportViewReducer");
|
|
8
|
-
const formatZeniDateFY_1 = require("../../../commonStateTypes/fiscalYearHelpers/formatZeniDateFY");
|
|
9
|
-
const fileReducer_1 = require("../../../entity/file/fileReducer");
|
|
10
|
-
const fetchCompanyMonthEndReportHistoricDataEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyMonthEndReportViewReducer_1.fetchCompanyMonthEndReportHistoricData.match), (0, operators_1.switchMap)((action) => {
|
|
11
|
-
const { companyId, reportSentDate } = action.payload;
|
|
12
|
-
const state = state$.value;
|
|
13
|
-
const tenantId = state.companyState.companiesById[companyId].companyInfo.tenantId;
|
|
14
|
-
const queryParam = {
|
|
15
|
-
history: true,
|
|
16
|
-
month_year: reportSentDate.format(formatZeniDateFY_1.FULL_MONTH_FULL_YEAR_FORMAT),
|
|
17
|
-
};
|
|
18
|
-
if (tenantId != null) {
|
|
19
|
-
return zeniAPI
|
|
20
|
-
.getJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}/emails/month-end?query=${encodeURIComponent(JSON.stringify(queryParam))}`, {
|
|
21
|
-
'zeni-tenant-id': tenantId,
|
|
22
|
-
})
|
|
23
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
24
|
-
var _a;
|
|
25
|
-
if ((0, responsePayload_1.isSuccessResponse)(response) &&
|
|
26
|
-
((_a = response.data) === null || _a === void 0 ? void 0 : _a.history) != null &&
|
|
27
|
-
response.data.history.length > 0) {
|
|
28
|
-
const actions = [
|
|
29
|
-
(0, companyMonthEndReportViewReducer_1.updateCompanyMonthEndReportHistoricDataOnSuccess)({
|
|
30
|
-
companyId,
|
|
31
|
-
reportSentDate,
|
|
32
|
-
data: response.data,
|
|
33
|
-
}),
|
|
34
|
-
(0, fileReducer_1.updateAttachmentFiles)({
|
|
35
|
-
files: response.data.history[0].files,
|
|
36
|
-
}),
|
|
37
|
-
];
|
|
38
|
-
return (0, rxjs_1.from)(actions);
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
const actions = [
|
|
42
|
-
(0, companyMonthEndReportViewReducer_1.updateCompanyMonthEndReportHistoricDataOnFailure)({
|
|
43
|
-
companyId,
|
|
44
|
-
reportSentDate,
|
|
45
|
-
error: response.status,
|
|
46
|
-
}),
|
|
47
|
-
];
|
|
48
|
-
return (0, rxjs_1.from)(actions);
|
|
49
|
-
}
|
|
50
|
-
}), (0, operators_1.catchError)((error) => {
|
|
51
|
-
const actions = [
|
|
52
|
-
(0, companyMonthEndReportViewReducer_1.updateCompanyMonthEndReportHistoricDataOnFailure)({
|
|
53
|
-
companyId,
|
|
54
|
-
reportSentDate,
|
|
55
|
-
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'Company Month End Report Historic Data errored out' +
|
|
56
|
-
JSON.stringify(error)),
|
|
57
|
-
}),
|
|
58
|
-
];
|
|
59
|
-
return (0, rxjs_1.from)(actions);
|
|
60
|
-
}));
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
return (0, rxjs_1.from)([]);
|
|
64
|
-
}
|
|
65
|
-
}));
|
|
66
|
-
exports.fetchCompanyMonthEndReportHistoricDataEpic = fetchCompanyMonthEndReportHistoricDataEpic;
|
package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportHistoricDatesEpic.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
3
|
-
import { ZeniAPI } from '../../../zeniAPI';
|
|
4
|
-
import { RootState } from '../../../reducer';
|
|
5
|
-
import { fetchCompanyMonthEndReportHistoricDates, updateCompanyMonthEndReportHistoricDatesOnSuccess, updateCompanyMonthEndReportHistoricDatesOnFailure } from '../companyMonthEndReportViewReducer';
|
|
6
|
-
export declare type ActionType = ReturnType<typeof fetchCompanyMonthEndReportHistoricDates> | ReturnType<typeof updateCompanyMonthEndReportHistoricDatesOnSuccess> | ReturnType<typeof updateCompanyMonthEndReportHistoricDatesOnFailure>;
|
|
7
|
-
export declare const fetchCompanyMonthEndReportHistoricDatesEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportHistoricDatesEpic.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchCompanyMonthEndReportHistoricDatesEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const responsePayload_1 = require("../../../responsePayload");
|
|
7
|
-
const companyMonthEndReportViewReducer_1 = require("../companyMonthEndReportViewReducer");
|
|
8
|
-
const fetchCompanyMonthEndReportHistoricDatesEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyMonthEndReportViewReducer_1.fetchCompanyMonthEndReportHistoricDates.match), (0, operators_1.switchMap)((action) => {
|
|
9
|
-
const { companyId } = action.payload;
|
|
10
|
-
const state = state$.value;
|
|
11
|
-
const tenantId = state.companyState.companiesById[companyId].companyInfo.tenantId;
|
|
12
|
-
const queryParam = {
|
|
13
|
-
history_dates: true,
|
|
14
|
-
};
|
|
15
|
-
if (tenantId != null) {
|
|
16
|
-
return zeniAPI
|
|
17
|
-
.getJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}/emails/month-end?query=${encodeURIComponent(JSON.stringify(queryParam))}`, {
|
|
18
|
-
'zeni-tenant-id': tenantId,
|
|
19
|
-
})
|
|
20
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
21
|
-
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
22
|
-
const actions = [
|
|
23
|
-
(0, companyMonthEndReportViewReducer_1.updateCompanyMonthEndReportHistoricDatesOnSuccess)({
|
|
24
|
-
companyId,
|
|
25
|
-
data: response.data,
|
|
26
|
-
}),
|
|
27
|
-
];
|
|
28
|
-
return (0, rxjs_1.from)(actions);
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
const actions = [
|
|
32
|
-
(0, companyMonthEndReportViewReducer_1.updateCompanyMonthEndReportHistoricDatesOnFailure)({
|
|
33
|
-
companyId,
|
|
34
|
-
error: response.status,
|
|
35
|
-
}),
|
|
36
|
-
];
|
|
37
|
-
return (0, rxjs_1.from)(actions);
|
|
38
|
-
}
|
|
39
|
-
}), (0, operators_1.catchError)((error) => {
|
|
40
|
-
const actions = [
|
|
41
|
-
(0, companyMonthEndReportViewReducer_1.updateCompanyMonthEndReportHistoricDatesOnFailure)({
|
|
42
|
-
companyId,
|
|
43
|
-
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'Company Month End Report Historic Dates errored out' +
|
|
44
|
-
JSON.stringify(error)),
|
|
45
|
-
}),
|
|
46
|
-
];
|
|
47
|
-
return (0, rxjs_1.from)(actions);
|
|
48
|
-
}));
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
return (0, rxjs_1.from)([]);
|
|
52
|
-
}
|
|
53
|
-
}));
|
|
54
|
-
exports.fetchCompanyMonthEndReportHistoricDatesEpic = fetchCompanyMonthEndReportHistoricDatesEpic;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { RootState } from '../../reducer';
|
|
4
|
-
import { ZeniAPI } from '../../zeniAPI';
|
|
5
|
-
import { EntityType } from '../../entity/genericEntity/entity';
|
|
6
|
-
import { fetchEntityRecommendationsByTransactionId, updateRecommendationForEntity, updateRecommendationForEntityFailure } from './recommendationReducer';
|
|
7
|
-
import { setEntityRecommendationForLineIdsForTransactionDetail } from '../transactionDetail/transactionDetailReducer';
|
|
8
|
-
export declare type ActionType = ReturnType<typeof updateRecommendationForEntity> | ReturnType<typeof fetchEntityRecommendationsByTransactionId> | ReturnType<typeof updateRecommendationForEntityFailure> | ReturnType<typeof setEntityRecommendationForLineIdsForTransactionDetail>;
|
|
9
|
-
export declare const fetchEntityRecommendationsByTransactionIdEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
10
|
-
export declare const toEntityTypeURL: (entityType: EntityType) => string;
|