@zeniai/client-epic-state 4.10.18 → 4.10.20

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.
@@ -73,6 +73,6 @@ export declare const isZeniDomainTenant: (currentTenant: TenantView) => boolean;
73
73
  export declare const isTenantUsingZeniCOA: (currentTenant: TenantView) => boolean;
74
74
  export declare const getCurrentTenantExternalConnections: (tenantState: TenantState, companyState: CompanyState) => TenantExternalConnections | undefined;
75
75
  export declare const toTenantCoreDetailsView: (tenantsBaseView: TenantBaseView[]) => TenantCoreDetailsView[];
76
- export declare const isTenantBankingOnly: (tenant: Tenant) => boolean;
77
- export declare const isTenantBookkeepingEnabled: (tenant: Tenant) => boolean;
76
+ export declare const isTenantBankingOnly: (tenant: Tenant | undefined) => boolean;
77
+ export declare const isTenantBookkeepingEnabled: (tenant: Tenant | undefined) => boolean;
78
78
  export {};
@@ -243,12 +243,16 @@ const toTenantCoreDetailsView = (tenantsBaseView) => {
243
243
  };
244
244
  exports.toTenantCoreDetailsView = toTenantCoreDetailsView;
245
245
  const isTenantBankingOnly = (tenant) => {
246
- return (tenant.productSettings.isBankingEnabled &&
247
- !tenant.productSettings.isBookkeepingEnabled &&
248
- !tenant.productSettings.isSpendManagementEnabled);
246
+ return tenant != null
247
+ ? tenant.productSettings.isBankingEnabled === true &&
248
+ tenant.productSettings.isBookkeepingEnabled === false &&
249
+ tenant.productSettings.isSpendManagementEnabled === false
250
+ : false;
249
251
  };
250
252
  exports.isTenantBankingOnly = isTenantBankingOnly;
251
253
  const isTenantBookkeepingEnabled = (tenant) => {
252
- return tenant.productSettings.isBookkeepingEnabled;
254
+ return tenant != null
255
+ ? tenant.productSettings.isBookkeepingEnabled === true
256
+ : true;
253
257
  };
254
258
  exports.isTenantBookkeepingEnabled = isTenantBookkeepingEnabled;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.10.18",
3
+ "version": "4.10.20",
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",