diff --git a/src/components/layout/app-shell.tsx b/src/components/layout/app-shell.tsx index 85ce909..5f0a928 100644 --- a/src/components/layout/app-shell.tsx +++ b/src/components/layout/app-shell.tsx @@ -8,7 +8,6 @@ import { useSip } from '@/providers/sip-provider'; import { CallWidget } from '@/components/call-desk/call-widget'; import { MaintOtpModal } from '@/components/modals/maint-otp-modal'; import { AgentStatusToggle } from '@/components/call-desk/agent-status-toggle'; -import { NotificationBell } from './notification-bell'; import { ResumeSetupBanner } from '@/components/setup/resume-setup-banner'; import { Badge } from '@/components/base/badges/badges'; import { useAuth } from '@/providers/auth-provider'; @@ -25,7 +24,7 @@ interface AppShellProps { export const AppShell = ({ children }: AppShellProps) => { const { pathname } = useLocation(); - const { isCCAgent, isAdmin } = useAuth(); + const { isCCAgent } = useAuth(); const { isOpen, activeAction, close } = useMaintShortcuts(); const { connectionStatus, isRegistered } = useSip(); const networkQuality = useNetworkStatus(); @@ -118,35 +117,25 @@ export const AppShell = ({ children }: AppShellProps) => {
- {/* Persistent top bar — visible on all pages */} - {(hasAgentConfig || isAdmin) && ( + {/* Agent top bar — network indicator + status toggle (agents only) */} + {hasAgentConfig && (
- {/* GlobalSearch hidden — navigation on result click - routes to Patient 360 with stale appointment state - from the call desk. Revisit when the Patient 360 - route properly resets context on mount. (#4) */} - {/* */}
- {isAdmin && } - {hasAgentConfig && ( - <> -
- - {networkQuality === 'good' ? 'Connected' : networkQuality === 'offline' ? 'No connection' : 'Unstable'} -
- - - )} +
+ + {networkQuality === 'good' ? 'Connected' : networkQuality === 'offline' ? 'No connection' : 'Unstable'} +
+
)} diff --git a/src/components/layout/page-header.tsx b/src/components/layout/page-header.tsx index 9a33608..51d3d3a 100644 --- a/src/components/layout/page-header.tsx +++ b/src/components/layout/page-header.tsx @@ -20,6 +20,8 @@ import { useState, useRef, useEffect, type ReactNode } from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faCircleInfo } from '@fortawesome/pro-duotone-svg-icons'; +import { NotificationBell } from './notification-bell'; +import { useAuth } from '@/providers/auth-provider'; interface PageHeaderProps { title: string; @@ -65,7 +67,9 @@ const InfoTooltip = ({ text }: { text: string }) => { ); }; -export const PageHeader = ({ title, badge, subtitle, infoText, controls, tabs }: PageHeaderProps) => ( +export const PageHeader = ({ title, badge, subtitle, infoText, controls, tabs }: PageHeaderProps) => { + const { isAdmin } = useAuth(); + return (
{/* Row 1: title + controls */}
@@ -81,11 +85,10 @@ export const PageHeader = ({ title, badge, subtitle, infoText, controls, tabs }: )} {infoText && }
- {controls && ( -
- {controls} -
- )} +
+ {controls} + {isAdmin && } +
{/* Row 2: optional tabs — no container border, tab underline is the separator */} @@ -95,4 +98,5 @@ export const PageHeader = ({ title, badge, subtitle, infoText, controls, tabs }:
)}
-); + ); +}; diff --git a/src/pages/call-recordings.tsx b/src/pages/call-recordings.tsx index b8f7a8e..5f7ebc6 100644 --- a/src/pages/call-recordings.tsx +++ b/src/pages/call-recordings.tsx @@ -9,7 +9,7 @@ import { Badge } from '@/components/base/badges/badges'; import { Input } from '@/components/base/input/input'; import { Table } from '@/components/application/table/table'; import { PaginationPageDefault } from '@/components/application/pagination/pagination'; -import { TopBar } from '@/components/layout/top-bar'; +import { PageHeader } from '@/components/layout/page-header'; import { ColumnToggle, useColumnVisibility } from '@/components/application/table/column-toggle'; import { PhoneActionCell } from '@/components/call-desk/phone-action-cell'; import { RecordingAnalysisSlideout } from '@/components/call-desk/recording-analysis'; @@ -239,18 +239,19 @@ export const CallRecordingsPage = () => { return ( <> - -
- {/* Toolbar */} -
- {filtered.length} recordings -
+
-
-
+ + } + /> {/* Table */}
diff --git a/src/pages/live-monitor.tsx b/src/pages/live-monitor.tsx index 8fd437c..109e9ba 100644 --- a/src/pages/live-monitor.tsx +++ b/src/pages/live-monitor.tsx @@ -1,7 +1,7 @@ import { useEffect, useMemo, useState } from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faHeadset, faPhoneVolume, faPause, faClock, faSparkles, faCalendarCheck, faClockRotateLeft } from '@fortawesome/pro-duotone-svg-icons'; -import { TopBar } from '@/components/layout/top-bar'; +import { PageHeader } from '@/components/layout/page-header'; import { Badge } from '@/components/base/badges/badges'; import { Table } from '@/components/application/table/table'; import { BargeControls } from '@/components/call-desk/barge-controls'; @@ -182,7 +182,11 @@ export const LiveMonitorPage = () => { return ( <> - +
{/* Left panel — KPIs + call list */} diff --git a/src/pages/missed-calls.tsx b/src/pages/missed-calls.tsx index e3dfe03..fd68e95 100644 --- a/src/pages/missed-calls.tsx +++ b/src/pages/missed-calls.tsx @@ -7,7 +7,6 @@ const SearchLg = faIcon(faMagnifyingGlass); import { Badge } from '@/components/base/badges/badges'; import { Input } from '@/components/base/input/input'; import { Table } from '@/components/application/table/table'; -import { Tabs, TabList, Tab } from '@/components/application/tabs/tabs'; import { PaginationPageDefault } from '@/components/application/pagination/pagination'; import { PageHeader } from '@/components/layout/page-header'; import { ColumnToggle, useColumnVisibility } from '@/components/application/table/column-toggle'; @@ -253,11 +252,22 @@ export const MissedCallsPage = () => { } tabs={ - handleTab(key as StatusTab)}> - - {(item) => } - - +
+ {tabItems.map((item) => ( + + ))} +
} /> diff --git a/src/pages/settings.tsx b/src/pages/settings.tsx index 8a6105c..5393841 100644 --- a/src/pages/settings.tsx +++ b/src/pages/settings.tsx @@ -9,7 +9,7 @@ import { faPalette, faShieldHalved, } from '@fortawesome/pro-duotone-svg-icons'; -import { TopBar } from '@/components/layout/top-bar'; +import { PageHeader } from '@/components/layout/page-header'; import { SectionCard } from '@/components/setup/section-card'; import { SETUP_STEP_NAMES, @@ -50,7 +50,7 @@ export const SettingsPage = () => { return (
- +
diff --git a/src/pages/team-performance.tsx b/src/pages/team-performance.tsx index 35978ed..41036b6 100644 --- a/src/pages/team-performance.tsx +++ b/src/pages/team-performance.tsx @@ -5,7 +5,7 @@ import { faUsers, faPhoneVolume, faCalendarCheck, faPhoneMissed, faPercent, faTriangleExclamation, } from '@fortawesome/pro-duotone-svg-icons'; -import { TopBar } from '@/components/layout/top-bar'; +import { PageHeader } from '@/components/layout/page-header'; import { Badge } from '@/components/base/badges/badges'; import { Table } from '@/components/application/table/table'; import { apiClient } from '@/lib/api-client'; @@ -292,7 +292,7 @@ export const TeamPerformancePage = () => { if (loading) { return ( <> - +

Loading team performance...

@@ -302,7 +302,7 @@ export const TeamPerformancePage = () => { return ( <> - +
{/* Section 1: Key Metrics */}