@zeniai/client-epic-state 4.17.42 → 4.17.43
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CurrentTenant } from '../../entity/tenant/tenantSelector';
|
|
2
|
+
import { LoggedInUser } from '../../entity/tenant/tenantState';
|
|
2
3
|
import { RoleMap, UserRoleType } from '../../entity/userRole/userRoleType';
|
|
3
4
|
import { MonthEndInsightsNotificationSettingsData, NotificationSettingsData, ReminderNotificationSettingsData } from './settingsViewState';
|
|
4
5
|
export declare const isAccountingTabVisible: (userRole: UserRoleType[], currentTenant: CurrentTenant | undefined, userRoleMap?: RoleMap) => boolean;
|
|
@@ -10,7 +11,7 @@ export declare const isCompanyDetailsTabVisible: (userRole: UserRoleType[], curr
|
|
|
10
11
|
export declare const isIntegrationsTabVisible: (userRole: UserRoleType[], currentTenant: CurrentTenant | undefined) => boolean;
|
|
11
12
|
export declare const isSettingsVisible: (currentTenant: CurrentTenant | undefined) => boolean;
|
|
12
13
|
export declare const isMyBankConnectionsTabVisible: (currentTenant: CurrentTenant | undefined, userRoleMap?: RoleMap) => boolean;
|
|
13
|
-
export declare const isPerformanceTabVisible: (userRole: UserRoleType[],
|
|
14
|
+
export declare const isPerformanceTabVisible: (userRole: UserRoleType[], loggedInUser?: LoggedInUser) => boolean;
|
|
14
15
|
export declare const isRemindersSectionVisibleOnSettingsPage: (reminderNotificationSettings: ReminderNotificationSettingsData) => boolean;
|
|
15
16
|
export declare const isMonthEndNotificationsSectionVisibleOnSettingsPage: (monthEndInsightsNotificationSettings: MonthEndInsightsNotificationSettingsData, signedInUseEmail: string) => boolean;
|
|
16
17
|
export declare const isNotificationsTabVisible: (notificationSettings: NotificationSettingsData, signedInUseEmail: string, currentTenant: CurrentTenant | undefined) => boolean;
|
|
@@ -132,13 +132,14 @@ const isMyBankConnectionsTabVisible = (currentTenant, userRoleMap) => {
|
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
134
|
exports.isMyBankConnectionsTabVisible = isMyBankConnectionsTabVisible;
|
|
135
|
-
const isPerformanceTabVisible = (userRole,
|
|
136
|
-
if (userRole == null
|
|
135
|
+
const isPerformanceTabVisible = (userRole, loggedInUser) => {
|
|
136
|
+
if (userRole == null) {
|
|
137
137
|
return false;
|
|
138
138
|
}
|
|
139
139
|
const isSuperAdminLevelAccess = (0, userRoleType_1.hasSuperAdminLevelAccess)(userRole);
|
|
140
140
|
const isBookkeepingAdmin = (0, userRoleType_1.hasBookKeepingAdminLevelAccess)(userRole);
|
|
141
|
-
|
|
141
|
+
const isZeniUser = (0, userRoleType_1.isZeniSignedInUser)(loggedInUser);
|
|
142
|
+
return isSuperAdminLevelAccess || isBookkeepingAdmin || isZeniUser;
|
|
142
143
|
};
|
|
143
144
|
exports.isPerformanceTabVisible = isPerformanceTabVisible;
|
|
144
145
|
const isRemindersSectionVisibleOnSettingsPage = (reminderNotificationSettings) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.17.
|
|
3
|
+
"version": "4.17.43",
|
|
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",
|