Skip to content
Snippets Groups Projects
Unverified Commit 7e75bd87 authored by Kevin Aleman's avatar Kevin Aleman Committed by GitHub
Browse files

regression: Reports button visible when downgrading from EE to CE (#30394)

parent 2a4213ac
No related branches found
No related tags found
No related merge requests found
......@@ -13,12 +13,6 @@ export const {
i18nLabel: 'Current_Chats',
permissionGranted: (): boolean => hasPermission('view-livechat-current-chats'),
},
{
href: '/omnichannel/reports',
icon: 'file',
i18nLabel: 'Reports',
permissionGranted: (): boolean => hasPermission('view-livechat-reports'),
},
{
href: '/omnichannel/analytics',
icon: 'dashboard',
......
import { hasPermission, hasAtLeastOnePermission } from '../../../../../app/authorization/client';
import { registerOmnichannelSidebarItem } from '../../../../../client/views/omnichannel/sidebarItems';
registerOmnichannelSidebarItem({
href: '/omnichannel/reports',
icon: 'file',
i18nLabel: 'Reports',
permissionGranted: (): boolean => hasPermission('view-livechat-reports'),
});
registerOmnichannelSidebarItem({
href: '/omnichannel/monitors',
icon: 'shield-blank',
......
import { Box } from '@rocket.chat/fuselage';
import { useTranslation } from '@rocket.chat/ui-contexts';
import { usePermission, useTranslation } from '@rocket.chat/ui-contexts';
import React from 'react';
import Page from '../../../../client/components/Page';
import NotAuthorizedPage from '../../../../client/views/notAuthorized/NotAuthorizedPage';
import { useHasLicenseModule } from '../../hooks/useHasLicenseModule';
import { ResizeObserver } from './components/ResizeObserver';
import { AgentsSection, ChannelsSection, DepartmentsSection, StatusSection, TagsSection } from './sections';
const ReportsPage = () => {
const t = useTranslation();
const hasPermission = usePermission('view-livechat-reports');
const isEnterprise = useHasLicenseModule('livechat-enterprise');
if (!hasPermission || !isEnterprise) {
return <NotAuthorizedPage />;
}
return (
<Page background='tint'>
<Page.Header title={t('Reports')} />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment