mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage
synced 2026-04-11 18:28:15 +00:00
feat: polish all pages — tooltips, sticky headers, roles, search, AI prompts
Dashboard KPI: - Fix 1534m → 25h 34m (formatMinutes helper) - Add info icon tooltips on all KPI and metric cards - Pass role="admin" to AI panel for manager-specific prompts Settings: - Add search + pagination to employee table - Infer roles from email convention (platform roles API returns null via API key) AI Assistant: - Role-specific quick prompts: manager sees "Agent performance", "Missed risks" - Agent sees "Doctor availability", "Treatment packages" Sticky headers: - Add overflow-hidden to campaigns and all-leads pages Misc: - Fix free-brands-svg-icons → pro-duotone in integrations - Remove Follow-ups from CC agent sidebar - Remove global search from TopBar Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -19,16 +19,25 @@ type CallerContext = {
|
||||
|
||||
interface AiChatPanelProps {
|
||||
callerContext?: CallerContext;
|
||||
role?: 'cc-agent' | 'admin' | 'executive';
|
||||
}
|
||||
|
||||
const QUICK_ASK_BUTTONS = [
|
||||
const QUICK_ASK_AGENT = [
|
||||
{ label: 'Doctor availability', template: 'What are the visiting hours for all doctors?' },
|
||||
{ label: 'Clinic timings', template: 'What are the clinic locations and timings?' },
|
||||
{ label: 'Patient history', template: 'Can you summarize this patient\'s history?' },
|
||||
{ label: 'Treatment packages', template: 'What treatment packages are available?' },
|
||||
];
|
||||
|
||||
export const AiChatPanel = ({ callerContext }: AiChatPanelProps) => {
|
||||
const QUICK_ASK_MANAGER = [
|
||||
{ label: 'Agent performance', template: 'Which agents have the highest appointment conversion rates this week?' },
|
||||
{ label: 'Missed call risks', template: 'Which missed calls have been waiting the longest without a callback?' },
|
||||
{ label: 'Pending leads', template: 'How many leads are still pending first contact?' },
|
||||
{ label: 'Weekly summary', template: 'Give me a summary of this week\'s team performance — total calls, conversions, missed calls.' },
|
||||
];
|
||||
|
||||
export const AiChatPanel = ({ callerContext, role = 'cc-agent' }: AiChatPanelProps) => {
|
||||
const quickButtons = role === 'admin' ? QUICK_ASK_MANAGER : QUICK_ASK_AGENT;
|
||||
const [messages, setMessages] = useState<ChatMessage[]>([]);
|
||||
const [input, setInput] = useState('');
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
@@ -112,7 +121,7 @@ export const AiChatPanel = ({ callerContext }: AiChatPanelProps) => {
|
||||
{/* Quick ask buttons */}
|
||||
{messages.length === 0 && (
|
||||
<div className="mb-3 flex flex-wrap gap-1.5">
|
||||
{QUICK_ASK_BUTTONS.map((btn) => (
|
||||
{quickButtons.map((btn) => (
|
||||
<button
|
||||
key={btn.label}
|
||||
onClick={() => handleQuickAsk(btn.template)}
|
||||
|
||||
Reference in New Issue
Block a user