@zeniai/client-epic-state 5.1.8-betaRD1 → 5.1.8-betaRD2
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/entity/tenant/tenantSelector.d.ts +1 -1
- package/lib/entity/tenant/tenantSelector.js +11 -4
- package/lib/esm/entity/tenant/tenantSelector.js +9 -2
- package/lib/esm/view/settingsView/settingsViewHelpers.js +2 -2
- package/lib/view/settingsView/settingsViewHelpers.js +1 -1
- package/package.json +1 -1
|
@@ -85,7 +85,7 @@ export declare const getCurrentTenantExternalConnections: (tenantState: TenantSt
|
|
|
85
85
|
export declare const toTenantCoreDetailsView: (tenantsBaseView: TenantBaseView[]) => TenantCoreDetailsView[];
|
|
86
86
|
export declare const isTenantBankingOnly: (isDebitCardFlagEnabled: boolean, tenant: Tenant | undefined) => boolean;
|
|
87
87
|
export declare const isTenantCardsOnly: (tenant: Tenant | undefined) => boolean;
|
|
88
|
-
export declare const
|
|
88
|
+
export declare const isTenantUsingAccountingServices: (tenant: Tenant | undefined) => boolean;
|
|
89
89
|
export declare const getIsAccountingClassesEnabled: (state: RootState) => boolean;
|
|
90
90
|
export declare const getIsAccountingProjectsEnabled: (state: RootState) => boolean;
|
|
91
91
|
export declare const isTenantBookkeepingEnabled: (tenant: Tenant | undefined) => boolean;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.isTenantTreasuryEnabled = exports.isOtherProductsEnabledForTenant = exports.isTenantBookkeepingEnabled = exports.getIsAccountingProjectsEnabled = exports.getIsAccountingClassesEnabled = exports.
|
|
6
|
+
exports.isTenantTreasuryEnabled = exports.isOtherProductsEnabledForTenant = exports.isTenantBookkeepingEnabled = exports.getIsAccountingProjectsEnabled = exports.getIsAccountingClassesEnabled = exports.isTenantUsingAccountingServices = exports.isTenantCardsOnly = exports.isTenantBankingOnly = exports.toTenantCoreDetailsView = exports.getCurrentTenantExternalConnections = exports.isTenantUsingZeniCOA = exports.isZeniDomainTenant = exports.getTenantBaseViewForTenantView = exports.getTenantsCoreDetailsByCheckInDateSelector = exports.getTenantsBaseByCheckInDateSelector = exports.getTenantBaseById = exports.getTenantsByCheckInDateSelector = exports.getCurrentTenant = exports.getTenantBaseViewForTenantId = void 0;
|
|
7
7
|
exports.getTenant = getTenant;
|
|
8
8
|
exports.getOnboardingTenantByTenantId = getOnboardingTenantByTenantId;
|
|
9
9
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
@@ -280,10 +280,17 @@ const isTenantCardsOnly = (tenant) => {
|
|
|
280
280
|
: false;
|
|
281
281
|
};
|
|
282
282
|
exports.isTenantCardsOnly = isTenantCardsOnly;
|
|
283
|
-
const
|
|
284
|
-
|
|
283
|
+
const isTenantUsingAccountingServices = (tenant) => {
|
|
284
|
+
const settings = tenant?.productSettings;
|
|
285
|
+
if (settings == null) {
|
|
286
|
+
return false;
|
|
287
|
+
}
|
|
288
|
+
return (settings.isCfoEnabled === true ||
|
|
289
|
+
settings.isTaxEnabled === true ||
|
|
290
|
+
settings.isPayrollEnabled === true ||
|
|
291
|
+
settings.isBookkeepingEnabled === true);
|
|
285
292
|
};
|
|
286
|
-
exports.
|
|
293
|
+
exports.isTenantUsingAccountingServices = isTenantUsingAccountingServices;
|
|
287
294
|
const getIsAccountingClassesEnabled = (state) => {
|
|
288
295
|
const { currentTenantId, tenantsById } = state.tenantState;
|
|
289
296
|
if (currentTenantId == null) {
|
|
@@ -265,8 +265,15 @@ export const isTenantCardsOnly = (tenant) => {
|
|
|
265
265
|
tenant.productSettings.isSpendManagementEnabled === false
|
|
266
266
|
: false;
|
|
267
267
|
};
|
|
268
|
-
export const
|
|
269
|
-
|
|
268
|
+
export const isTenantUsingAccountingServices = (tenant) => {
|
|
269
|
+
const settings = tenant?.productSettings;
|
|
270
|
+
if (settings == null) {
|
|
271
|
+
return false;
|
|
272
|
+
}
|
|
273
|
+
return (settings.isCfoEnabled === true ||
|
|
274
|
+
settings.isTaxEnabled === true ||
|
|
275
|
+
settings.isPayrollEnabled === true ||
|
|
276
|
+
settings.isBookkeepingEnabled === true);
|
|
270
277
|
};
|
|
271
278
|
export const getIsAccountingClassesEnabled = (state) => {
|
|
272
279
|
const { currentTenantId, tenantsById } = state.tenantState;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isTenantBankingOnly, isTenantCardsOnly,
|
|
1
|
+
import { isTenantBankingOnly, isTenantCardsOnly, isTenantUsingAccountingServices, } from '../../entity/tenant/tenantSelector';
|
|
2
2
|
import { hasAnyAdminLevelAccess, hasBillPayAccessible, hasBookKeepingAdminLevelAccess, hasBookKeepingUserLevelAccess, hasChargeCardAccessible, hasFullOrAdminLevelAccess, hasInvestorBankerLevelAccess, hasReimbursementAccess, hasReimbursementAccessible, hasSuperAdminLevelAccess, hasZeniAccountsAccessible, isZeniSignedInUser, } from '../../entity/userRole/userRoleType';
|
|
3
3
|
import { isVendorsTabVisible } from '../vendorList/vendorListSelector';
|
|
4
4
|
export const isAccountingTabVisible = (userRole, isDebitCardFlagEnabled, currentTenant, userRoleMap) => {
|
|
@@ -94,7 +94,7 @@ export const isIntegrationsTabVisible = (userRole, isDebitCardFlagEnabled, curre
|
|
|
94
94
|
}
|
|
95
95
|
if (isSettingsVisible(currentTenant)) {
|
|
96
96
|
return (hasFullOrAdminLevelAccess(userRole) &&
|
|
97
|
-
(
|
|
97
|
+
(isTenantUsingAccountingServices(currentTenant) ||
|
|
98
98
|
!(isTenantBankingOnly(isDebitCardFlagEnabled, currentTenant) ||
|
|
99
99
|
isTenantCardsOnly(currentTenant))));
|
|
100
100
|
}
|
|
@@ -103,7 +103,7 @@ const isIntegrationsTabVisible = (userRole, isDebitCardFlagEnabled, currentTenan
|
|
|
103
103
|
}
|
|
104
104
|
if ((0, exports.isSettingsVisible)(currentTenant)) {
|
|
105
105
|
return ((0, userRoleType_1.hasFullOrAdminLevelAccess)(userRole) &&
|
|
106
|
-
((0, tenantSelector_1.
|
|
106
|
+
((0, tenantSelector_1.isTenantUsingAccountingServices)(currentTenant) ||
|
|
107
107
|
!((0, tenantSelector_1.isTenantBankingOnly)(isDebitCardFlagEnabled, currentTenant) ||
|
|
108
108
|
(0, tenantSelector_1.isTenantCardsOnly)(currentTenant))));
|
|
109
109
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.1.8-
|
|
3
|
+
"version": "5.1.8-betaRD2",
|
|
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",
|