@zeniai/client-epic-state 4.15.82 → 4.15.83
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.
|
@@ -45,16 +45,17 @@ exports.getDashboard = (0, toolkit_1.createSelector)(tenantSelector, cardBalance
|
|
|
45
45
|
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
|
|
46
46
|
return (0, monthEndCloseChecksViewSelector_1.getMonthEndCloseChecksViewByTenantId)(state, currentTenant.tenantId);
|
|
47
47
|
}, (state) => state.tenantState, (_state, additionalExcludedReports) => additionalExcludedReports, (tenants, cardBalance, cashBalance, opEx, revenue, topEx, netBurnOrIncome, netBurnOrIncomeStoryCard, cashPosition, cashInCashOut, insightsView, companyPassportView, tasksCard, billPayCard, reimbursementCard, apAgingReport, arAgingReport, zeniAccountsPromoCard, rewardsPlanCard, monthEndCloseChecksView, tenantState, additionalExcludedReports) => {
|
|
48
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
48
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
49
49
|
const isReimbursementFeatureEnabled = (_a = tenants.currentTenant.company) === null || _a === void 0 ? void 0 : _a.featuresActivationInfo.isReimbursementFeatureEnabled;
|
|
50
|
-
const
|
|
50
|
+
const isBillPayFeatureEnabled = (_b = tenants.currentTenant.company) === null || _b === void 0 ? void 0 : _b.featuresActivationInfo.isBillPayFeatureEnabled;
|
|
51
|
+
const isAdmin = Boolean((_c = tenants.currentTenant) === null || _c === void 0 ? void 0 : _c.userRole) === true
|
|
51
52
|
? (0, userRoleType_1.hasAdminLevelAccess)(tenants.currentTenant.userRole)
|
|
52
53
|
: false;
|
|
53
|
-
const isInvestorBanker = Boolean((
|
|
54
|
+
const isInvestorBanker = Boolean((_d = tenants.currentTenant) === null || _d === void 0 ? void 0 : _d.userRole) === true
|
|
54
55
|
? (0, userRoleType_1.hasInvestorBankerLevelAccess)(tenants.currentTenant.userRole)
|
|
55
56
|
: false;
|
|
56
|
-
const hasTopExAccess = ((
|
|
57
|
-
const hasTasksCardAccess = ((
|
|
57
|
+
const hasTopExAccess = ((_g = (_f = (_e = tenants.currentTenant) === null || _e === void 0 ? void 0 : _e.excludedResources) === null || _f === void 0 ? void 0 : _f.resources) === null || _g === void 0 ? void 0 : _g.find((resource) => resource.resource === '/reports/top_expenses')) == null;
|
|
58
|
+
const hasTasksCardAccess = ((_k = (_j = (_h = tenants.currentTenant) === null || _h === void 0 ? void 0 : _h.excludedResources) === null || _j === void 0 ? void 0 : _j.resources) === null || _k === void 0 ? void 0 : _k.find((resource) => resource.resource === '/reports/task_card')) == null;
|
|
58
59
|
const reportsInOrder = [
|
|
59
60
|
cashBalance,
|
|
60
61
|
cardBalance,
|
|
@@ -82,7 +83,7 @@ exports.getDashboard = (0, toolkit_1.createSelector)(tenantSelector, cardBalance
|
|
|
82
83
|
if (hasTasksCardAccess) {
|
|
83
84
|
reportsInOrder.push(tasksCard);
|
|
84
85
|
}
|
|
85
|
-
if (!isInvestorBanker) {
|
|
86
|
+
if (!isInvestorBanker && isBillPayFeatureEnabled === true) {
|
|
86
87
|
reportsInOrder.push(billPayCard);
|
|
87
88
|
}
|
|
88
89
|
if (isReimbursementFeatureEnabled === true && isAdmin) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.15.
|
|
3
|
+
"version": "4.15.83",
|
|
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",
|