@zeniai/client-epic-state 5.0.16-betaJK1 → 5.0.16-betaJK2
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.
|
@@ -7,6 +7,7 @@ import { getCurrentTenant, } from '../../entity/tenant/tenantSelector';
|
|
|
7
7
|
import { date } from '../../zeniDayJS';
|
|
8
8
|
export const isMonthEndInsightDisabled = (currentTenant, selectedPeriod, userAllowedToAccessMonthEndInsights, auditSummary) => {
|
|
9
9
|
console.log('jklogs ~ isMonthEndInsightDisabled ~ selectedPeriod:', selectedPeriod);
|
|
10
|
+
console.log('jklogs ~ isMonthEndInsightDisabled ~ userAllowedToAccessMonthEndInsights:', userAllowedToAccessMonthEndInsights);
|
|
10
11
|
if (auditSummary != null) {
|
|
11
12
|
if (auditSummary.auditScorePercentage < 75 &&
|
|
12
13
|
userAllowedToAccessMonthEndInsights === false) {
|
|
@@ -51,7 +52,7 @@ export const getMonthEndCloseChecksViewByTenantId = createSelector((state) => st
|
|
|
51
52
|
if (check.id === 'month_end_insights') {
|
|
52
53
|
const isDisabled = monthEndCloseChecks.reportEmailSentDate == null
|
|
53
54
|
? isMonthEndInsightDisabled(currentTenant, selectedPeriod, userAllowedToAccessMonthEndInsights, monthEndCloseChecks.auditSummary)
|
|
54
|
-
:
|
|
55
|
+
: true;
|
|
55
56
|
return {
|
|
56
57
|
...check,
|
|
57
58
|
isDisabled,
|
|
@@ -10,6 +10,7 @@ const tenantSelector_1 = require("../../entity/tenant/tenantSelector");
|
|
|
10
10
|
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
11
11
|
const isMonthEndInsightDisabled = (currentTenant, selectedPeriod, userAllowedToAccessMonthEndInsights, auditSummary) => {
|
|
12
12
|
console.log('jklogs ~ isMonthEndInsightDisabled ~ selectedPeriod:', selectedPeriod);
|
|
13
|
+
console.log('jklogs ~ isMonthEndInsightDisabled ~ userAllowedToAccessMonthEndInsights:', userAllowedToAccessMonthEndInsights);
|
|
13
14
|
if (auditSummary != null) {
|
|
14
15
|
if (auditSummary.auditScorePercentage < 75 &&
|
|
15
16
|
userAllowedToAccessMonthEndInsights === false) {
|
|
@@ -55,7 +56,7 @@ exports.getMonthEndCloseChecksViewByTenantId = (0, toolkit_1.createSelector)((st
|
|
|
55
56
|
if (check.id === 'month_end_insights') {
|
|
56
57
|
const isDisabled = monthEndCloseChecks.reportEmailSentDate == null
|
|
57
58
|
? (0, exports.isMonthEndInsightDisabled)(currentTenant, selectedPeriod, userAllowedToAccessMonthEndInsights, monthEndCloseChecks.auditSummary)
|
|
58
|
-
:
|
|
59
|
+
: true;
|
|
59
60
|
return {
|
|
60
61
|
...check,
|
|
61
62
|
isDisabled,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.0.16-
|
|
3
|
+
"version": "5.0.16-betaJK2",
|
|
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",
|