mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage
synced 2026-04-11 18:28:15 +00:00
feat: add floating call widget with SIP controls, click-to-call, and SIP provider
Introduce a shared SipProvider context so all components use the same SIP connection. Add a floating CallWidget (idle pill, ringing, active with disposition, ended states) visible for CC agents on every page. Add a ClickToCallButton for the worklist. Wire SIP status badge and worklist into the call-desk page. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import type { ReactNode } from "react";
|
||||
import { useLocation } from "react-router";
|
||||
import { Sidebar } from "./sidebar";
|
||||
import type { ReactNode } from 'react';
|
||||
import { useLocation } from 'react-router';
|
||||
import { Sidebar } from './sidebar';
|
||||
import { SipProvider } from '@/providers/sip-provider';
|
||||
import { CallWidget } from '@/components/call-desk/call-widget';
|
||||
import { useAuth } from '@/providers/auth-provider';
|
||||
|
||||
interface AppShellProps {
|
||||
children: ReactNode;
|
||||
@@ -8,11 +11,15 @@ interface AppShellProps {
|
||||
|
||||
export const AppShell = ({ children }: AppShellProps) => {
|
||||
const { pathname } = useLocation();
|
||||
const { isCCAgent } = useAuth();
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen bg-primary">
|
||||
<Sidebar activeUrl={pathname} />
|
||||
<main className="flex flex-1 flex-col overflow-auto">{children}</main>
|
||||
</div>
|
||||
<SipProvider>
|
||||
<div className="flex min-h-screen bg-primary">
|
||||
<Sidebar activeUrl={pathname} />
|
||||
<main className="flex flex-1 flex-col overflow-auto">{children}</main>
|
||||
{isCCAgent && <CallWidget />}
|
||||
</div>
|
||||
</SipProvider>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user