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/components/setup/section-card.tsx b/src/components/setup/section-card.tsx index d8cb672..7042a3b 100644 --- a/src/components/setup/section-card.tsx +++ b/src/components/setup/section-card.tsx @@ -17,6 +17,7 @@ type SectionCardProps = { href?: string; onClick?: () => void; status?: SectionStatus; + disabled?: boolean; }; // Settings hub card. Each card represents one setup-able section (Branding, @@ -30,26 +31,32 @@ export const SectionCard = ({ href, onClick, status = 'unknown', + disabled = false, }: SectionCardProps) => { const className = cx( - 'group block w-full text-left rounded-xl border border-secondary bg-primary p-5 shadow-xs transition hover:border-brand hover:shadow-md', + 'group block w-full text-left rounded-xl border border-secondary p-5 shadow-xs transition', + disabled + ? 'cursor-not-allowed opacity-50 bg-disabled_subtle' + : 'bg-primary hover:border-brand hover:shadow-md', ); const body = ( <>
- +
-

{title}

+

{title}

{description}

- + {!disabled && ( + + )}
{status !== 'unknown' && ( @@ -70,6 +77,13 @@ export const SectionCard = ({ ); + if (disabled) { + return ( +
+ {body} +
+ ); + } if (onClick) { return (