@zeniai/client-epic-state 4.13.63 → 4.13.65
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.
|
@@ -13,8 +13,12 @@ const createAddressEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, opera
|
|
|
13
13
|
const addressData = (_a = state$.value.addressViewState.newAddressState) === null || _a === void 0 ? void 0 : _a[addressType];
|
|
14
14
|
if (addressData != null) {
|
|
15
15
|
const payload = (0, addressViewPayload_1.toAddressUpdatableInfoPayload)(addressData.addressToCreate);
|
|
16
|
+
//adding query param for custom address creation
|
|
17
|
+
const queryParam = addressType.includes('custom_shipping_')
|
|
18
|
+
? `?query=${encodeURIComponent(JSON.stringify({ is_default_namespace_sync_enabled: true }))}`
|
|
19
|
+
: '';
|
|
16
20
|
return zeniAPI
|
|
17
|
-
.postAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/addresses`, payload)
|
|
21
|
+
.postAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/addresses${queryParam}`, payload)
|
|
18
22
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
19
23
|
var _a;
|
|
20
24
|
const addresses = response.data != null ? (_a = response.data) === null || _a === void 0 ? void 0 : _a.addresses : [];
|
package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js
CHANGED
|
@@ -44,8 +44,8 @@ const refreshExpenseAutomationCurrentTabEpic = (actions$, state$) => actions$.pi
|
|
|
44
44
|
]);
|
|
45
45
|
case 'month_end_insights':
|
|
46
46
|
return (0, rxjs_1.from)([
|
|
47
|
-
(0, companyMonthEndReportViewReducer_1.fetchCompanyMonthEndReportView)(true, companyId),
|
|
48
|
-
(0, companyMonthEndReportViewReducer_1.fetchCompanyMonthEndReportTemplates)(companyId),
|
|
47
|
+
(0, companyMonthEndReportViewReducer_1.fetchCompanyMonthEndReportView)(true, companyId, currentTenant.tenantId),
|
|
48
|
+
(0, companyMonthEndReportViewReducer_1.fetchCompanyMonthEndReportTemplates)(companyId, currentTenant.tenantId),
|
|
49
49
|
]);
|
|
50
50
|
case 'transaction_categorization':
|
|
51
51
|
default:
|
|
@@ -1,33 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.getMonthEndCloseChecksViewByTenantId = exports.isMonthEndInsightDisabled = void 0;
|
|
7
|
-
const isEqual_1 = __importDefault(require("lodash/isEqual"));
|
|
8
4
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
9
5
|
const monthEndCloseChecksSelector_1 = require("../../entity/monthEndCloseChecks/monthEndCloseChecksSelector");
|
|
10
6
|
const timePeriod_1 = require("../../commonStateTypes/timePeriod");
|
|
11
7
|
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
12
8
|
const tenantSelector_1 = require("../../entity/tenant/tenantSelector");
|
|
9
|
+
const formatZeniDateFY_1 = require("../../commonStateTypes/fiscalYearHelpers/formatZeniDateFY");
|
|
13
10
|
const isMonthEndInsightDisabled = (currentTenant, selectedPeriod, userAllowedToAccessMonthEndInsights, auditSummary) => {
|
|
14
11
|
if (auditSummary != null) {
|
|
15
12
|
if (auditSummary.auditScorePercentage < 75 &&
|
|
16
13
|
userAllowedToAccessMonthEndInsights === false) {
|
|
17
14
|
return true;
|
|
18
15
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
// if the selected period is November 2024, then book close date should not be null and book close date should be 30th November 2024
|
|
17
|
+
const { bookCloseDate } = currentTenant;
|
|
18
|
+
const selectedPeriodFirstDay = (0, zeniDayJS_1.date)(`${selectedPeriod.year}-${selectedPeriod.month}-01`);
|
|
19
|
+
const selectedPeriodLastDay = selectedPeriodFirstDay.endOf('month');
|
|
20
|
+
if (bookCloseDate == null ||
|
|
21
|
+
bookCloseDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT) !==
|
|
22
|
+
selectedPeriodLastDay.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT)) {
|
|
23
|
+
return true;
|
|
23
24
|
}
|
|
24
|
-
|
|
25
|
-
const nextMonthDate = currentDate.add(1, 'month');
|
|
26
|
-
const nextMonthPeriod = {
|
|
27
|
-
month: (0, timePeriod_1.toMonth)(nextMonthDate.month() + 1),
|
|
28
|
-
year: nextMonthDate.year(),
|
|
29
|
-
};
|
|
30
|
-
return !(0, isEqual_1.default)(selectedPeriod, nextMonthPeriod);
|
|
25
|
+
return false;
|
|
31
26
|
}
|
|
32
27
|
return true;
|
|
33
28
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.65",
|
|
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",
|