mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage
synced 2026-05-18 20:08:19 +00:00
feat(dashboard): merge Team Performance surfaces into single scrollable view
QA flagged Team Dashboard vs Team Performance as repetitive. Retire Team Performance from the sidebar; move its unique surfaces (rich agent table, time breakdown, NPS/Conversion, Performance Alerts) into Team Dashboard below the existing KPI row. - supervisor-rollup: new shared module — useSupervisorRollup hook + RichAgentTable / TimeBreakdown / NpsConversion / PerformanceAlerts - Time Breakdown rendered as a table (Agent / Active / Wrap / Idle / Break / Total + Team-average header row) — QA flagged the old stacked-bar tiles as misleading because per-agent totals varied wildly and width comparison was meaningless - team-dashboard: tabs replaced with stacked sections; everything scroll-visible so supervisors don't hunt across surfaces - sidebar: remove 'Team Performance' entry (route kept for backup) and drop the now-unused IconChartLine wiring
This commit is contained in:
@@ -15,7 +15,6 @@ import {
|
||||
faUsers,
|
||||
faArrowRightFromBracket,
|
||||
faTowerBroadcast,
|
||||
faChartLine,
|
||||
faFileAudio,
|
||||
faPhoneMissed,
|
||||
} from "@fortawesome/pro-duotone-svg-icons";
|
||||
@@ -30,6 +29,7 @@ import { NavItemBase } from "@/components/application/app-navigation/base-compon
|
||||
import type { NavItemType } from "@/components/application/app-navigation/config";
|
||||
import { Avatar } from "@/components/base/avatar/avatar";
|
||||
import { useAuth } from "@/providers/auth-provider";
|
||||
import { useUiFlags } from "@/hooks/use-ui-flags";
|
||||
import { useAgentState } from "@/hooks/use-agent-state";
|
||||
import { useThemeTokens } from "@/providers/theme-token-provider";
|
||||
import { sidebarCollapsedAtom } from "@/state/sidebar-state";
|
||||
@@ -49,7 +49,6 @@ const IconUsers = faIcon(faUsers);
|
||||
const IconHospitalUser = faIcon(faHospitalUser);
|
||||
const IconCalendarCheck = faIcon(faCalendarCheck);
|
||||
const IconTowerBroadcast = faIcon(faTowerBroadcast);
|
||||
const IconChartLine = faIcon(faChartLine);
|
||||
const IconFileAudio = faIcon(faFileAudio);
|
||||
const IconPhoneMissed = faIcon(faPhoneMissed);
|
||||
|
||||
@@ -62,8 +61,11 @@ const getNavSections = (role: string): NavSection[] => {
|
||||
if (role === 'admin') {
|
||||
return [
|
||||
{ label: 'Supervisor', items: [
|
||||
// Team Performance retired as a nav entry — its surfaces
|
||||
// (time breakdown, NPS/conversion, alerts, richer agent
|
||||
// table) are now rolled into the Dashboard. The route is
|
||||
// kept alive for reference but not linked in the sidebar.
|
||||
{ label: 'Dashboard', href: '/', icon: IconGrid2 },
|
||||
{ label: 'Team Performance', href: '/team-performance', icon: IconChartLine },
|
||||
{ label: 'Live Call Monitor', href: '/live-monitor', icon: IconTowerBroadcast },
|
||||
]},
|
||||
{ label: 'Data & Reports', items: [
|
||||
@@ -149,7 +151,16 @@ export const Sidebar = ({ activeUrl = "/" }: SidebarProps) => {
|
||||
navigate('/login');
|
||||
};
|
||||
|
||||
const navSections = getNavSections(user.role);
|
||||
const uiFlags = useUiFlags();
|
||||
const navSections = getNavSections(user.role).map((section) => ({
|
||||
...section,
|
||||
items: uiFlags.setupManaged
|
||||
// When setup is managed by the product team (per-tenant flag),
|
||||
// hide the Settings entry from the nav. The route is also
|
||||
// blocked in router-provider so a stray bookmark doesn't work.
|
||||
? section.items.filter((item) => item.href !== '/settings')
|
||||
: section.items,
|
||||
})).filter((section) => section.items.length > 0);
|
||||
|
||||
const content = (
|
||||
<aside
|
||||
|
||||
Reference in New Issue
Block a user