mirror of
https://github.com/soconnor0919/hristudio.git
synced 2025-12-11 22:54:45 -05:00
- Remove outdated root-level documentation files - Delete IMPLEMENTATION_STATUS.md, WORK_IN_PROGRESS.md, UI_IMPROVEMENTS_SUMMARY.md, CLAUDE.md - Reorganize documentation into docs/ folder - Move UNIFIED_EDITOR_EXPERIENCES.md → docs/unified-editor-experiences.md - Move DATATABLE_MIGRATION_PROGRESS.md → docs/datatable-migration-progress.md - Move SEED_SCRIPT_README.md → docs/seed-script-readme.md - Create comprehensive new documentation - Add docs/implementation-status.md with production readiness assessment - Add docs/work-in-progress.md with active development tracking - Add docs/development-achievements.md consolidating all major accomplishments - Update documentation hub - Enhance docs/README.md with complete 13-document structure - Organize into logical categories: Core, Status, Achievements - Provide clear navigation and purpose for each document Features: - 73% code reduction achievement through unified editor experiences - Complete DataTable migration with enterprise features - Comprehensive seed database with realistic research scenarios - Production-ready status with 100% backend, 95% frontend completion - Clean documentation architecture supporting future development Breaking Changes: None - documentation restructuring only Migration: Documentation moved to docs/ folder, no code changes required
126 lines
2.8 KiB
TypeScript
126 lines
2.8 KiB
TypeScript
"use client";
|
|
|
|
import { Activity, Calendar, CheckCircle, FlaskConical } from "lucide-react";
|
|
import { DashboardOverviewLayout } from "~/components/ui/page-layout";
|
|
|
|
interface DashboardContentProps {
|
|
userName: string;
|
|
userRole: string;
|
|
totalStudies: number;
|
|
activeTrials: number;
|
|
scheduledTrials: number;
|
|
completedToday: number;
|
|
canControl: boolean;
|
|
canManage: boolean;
|
|
recentTrials: any[];
|
|
}
|
|
|
|
export function DashboardContent({
|
|
userName,
|
|
userRole,
|
|
totalStudies,
|
|
activeTrials,
|
|
scheduledTrials,
|
|
completedToday,
|
|
canControl,
|
|
canManage,
|
|
recentTrials,
|
|
}: DashboardContentProps) {
|
|
const getWelcomeMessage = () => {
|
|
switch (userRole) {
|
|
case "wizard":
|
|
return "Ready to control trials";
|
|
case "researcher":
|
|
return "Your research platform awaits";
|
|
case "administrator":
|
|
return "System management dashboard";
|
|
default:
|
|
return "Welcome to HRIStudio";
|
|
}
|
|
};
|
|
|
|
const quickActions = [
|
|
...(canManage
|
|
? [
|
|
{
|
|
title: "Create Study",
|
|
description: "Start a new research study",
|
|
icon: FlaskConical,
|
|
href: "/studies/new",
|
|
variant: "primary" as const,
|
|
},
|
|
]
|
|
: []),
|
|
...(canControl
|
|
? [
|
|
{
|
|
title: "Schedule Trial",
|
|
description: "Plan a new trial session",
|
|
icon: Calendar,
|
|
href: "/trials/new",
|
|
variant: "default" as const,
|
|
},
|
|
]
|
|
: []),
|
|
];
|
|
|
|
const stats = [
|
|
{
|
|
title: "Studies",
|
|
value: totalStudies,
|
|
description: "Research studies",
|
|
icon: FlaskConical,
|
|
variant: "primary" as const,
|
|
action: {
|
|
label: "View All",
|
|
href: "/studies",
|
|
},
|
|
},
|
|
{
|
|
title: "Active Trials",
|
|
value: activeTrials,
|
|
description: "Currently running",
|
|
icon: Activity,
|
|
variant: "success" as const,
|
|
...(canControl && {
|
|
action: {
|
|
label: "Control",
|
|
href: "/trials?status=in_progress",
|
|
},
|
|
}),
|
|
},
|
|
{
|
|
title: "Scheduled",
|
|
value: scheduledTrials,
|
|
description: "Upcoming trials",
|
|
icon: Calendar,
|
|
variant: "default" as const,
|
|
},
|
|
{
|
|
title: "Completed Today",
|
|
value: completedToday,
|
|
description: "Finished trials",
|
|
icon: CheckCircle,
|
|
variant: "success" as const,
|
|
},
|
|
];
|
|
|
|
const alerts: any[] = [];
|
|
|
|
const recentActivity = null;
|
|
|
|
return (
|
|
<DashboardOverviewLayout
|
|
title={`${getWelcomeMessage()}, ${userName}`}
|
|
description="Monitor your HRI research activities and manage ongoing studies"
|
|
userName={userName}
|
|
userRole={userRole}
|
|
breadcrumb={[{ label: "Dashboard" }]}
|
|
quickActions={quickActions}
|
|
stats={stats}
|
|
alerts={alerts}
|
|
recentActivity={recentActivity}
|
|
/>
|
|
);
|
|
}
|