|
@@ -2,19 +2,24 @@
|
|
|
|
|
|
|
|
import { useSession } from "next-auth/react"
|
|
import { useSession } from "next-auth/react"
|
|
|
import AuthenticatedLayout from "@/components/AuthenticatedLayout"
|
|
import AuthenticatedLayout from "@/components/AuthenticatedLayout"
|
|
|
-import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
|
|
|
|
|
|
+import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
|
|
|
import { Button } from "@/components/ui/button"
|
|
import { Button } from "@/components/ui/button"
|
|
|
|
|
+import { Badge } from "@/components/ui/badge"
|
|
|
|
|
+import { Separator } from "@/components/ui/separator"
|
|
|
import {
|
|
import {
|
|
|
MessageSquare,
|
|
MessageSquare,
|
|
|
FileText,
|
|
FileText,
|
|
|
Users,
|
|
Users,
|
|
|
Activity,
|
|
Activity,
|
|
|
Calendar,
|
|
Calendar,
|
|
|
- User,
|
|
|
|
|
Shield,
|
|
Shield,
|
|
|
- TrendingUp
|
|
|
|
|
|
|
+ TrendingUp,
|
|
|
|
|
+ ArrowRight,
|
|
|
|
|
+ Clock,
|
|
|
|
|
+ ChevronRight
|
|
|
} from "lucide-react"
|
|
} from "lucide-react"
|
|
|
import Link from "next/link"
|
|
import Link from "next/link"
|
|
|
|
|
+import { cn } from "@/lib/utils"
|
|
|
|
|
|
|
|
export default function DashboardPage() {
|
|
export default function DashboardPage() {
|
|
|
const { data: session } = useSession()
|
|
const { data: session } = useSession()
|
|
@@ -27,255 +32,386 @@ export default function DashboardPage() {
|
|
|
const isAdmin = session.user.role === "ADMIN"
|
|
const isAdmin = session.user.role === "ADMIN"
|
|
|
const isPatient = session.user.role === "PATIENT"
|
|
const isPatient = session.user.role === "PATIENT"
|
|
|
|
|
|
|
|
- // Mensaje de bienvenida según el rol
|
|
|
|
|
- const welcomeMessage = isAdmin
|
|
|
|
|
- ? "Panel de administración del sistema - Control total de la plataforma"
|
|
|
|
|
- : isDoctor
|
|
|
|
|
- ? "Panel médico - Gestiona pacientes y reportes"
|
|
|
|
|
- : "Tu asistente médico virtual personal - Consulta y obtén reportes médicos"
|
|
|
|
|
|
|
+ const roleConfig = {
|
|
|
|
|
+ ADMIN: {
|
|
|
|
|
+ badge: "Admin",
|
|
|
|
|
+ badgeVariant: "default" as const,
|
|
|
|
|
+ description: "Gestión completa del sistema"
|
|
|
|
|
+ },
|
|
|
|
|
+ DOCTOR: {
|
|
|
|
|
+ badge: "Doctor",
|
|
|
|
|
+ badgeVariant: "secondary" as const,
|
|
|
|
|
+ description: "Panel de gestión médica"
|
|
|
|
|
+ },
|
|
|
|
|
+ PATIENT: {
|
|
|
|
|
+ badge: "Paciente",
|
|
|
|
|
+ badgeVariant: "outline" as const,
|
|
|
|
|
+ description: "Tu asistente médico personal"
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const config = roleConfig[session.user.role as keyof typeof roleConfig]
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
<AuthenticatedLayout>
|
|
<AuthenticatedLayout>
|
|
|
- <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
|
|
|
|
|
- {/* Welcome Section */}
|
|
|
|
|
- <div className="mb-8">
|
|
|
|
|
- <h1 className="text-3xl font-bold text-gray-900 mb-2">
|
|
|
|
|
- ¡Bienvenido, {session.user.name}!
|
|
|
|
|
- </h1>
|
|
|
|
|
- <p className="text-gray-600">
|
|
|
|
|
- {welcomeMessage}
|
|
|
|
|
- </p>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- {/* Quick Stats */}
|
|
|
|
|
- <div className="grid md:grid-cols-4 gap-6 mb-8">
|
|
|
|
|
- <Card>
|
|
|
|
|
- <CardContent className="p-6">
|
|
|
|
|
- <div className="flex items-center">
|
|
|
|
|
- <div className="w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center mr-4">
|
|
|
|
|
- <MessageSquare className="w-6 h-6 text-blue-600" />
|
|
|
|
|
|
|
+ <div className="flex-1 space-y-6 p-8 pt-6">
|
|
|
|
|
+ {/* Header Section */}
|
|
|
|
|
+ <Card>
|
|
|
|
|
+ <CardContent className="p-6">
|
|
|
|
|
+ <div className="flex items-center justify-between">
|
|
|
|
|
+ <div className="flex items-center gap-4">
|
|
|
|
|
+ <div className="w-12 h-12 bg-primary rounded-lg flex items-center justify-center shadow-sm">
|
|
|
|
|
+ <Activity className="w-6 h-6 text-primary-foreground" />
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
- <p className="text-sm font-medium text-gray-600">Consultas</p>
|
|
|
|
|
- <p className="text-2xl font-bold text-gray-900">
|
|
|
|
|
- {isPatient ? "Disponibles" : "Total"}
|
|
|
|
|
|
|
+ <div className="flex items-center gap-3">
|
|
|
|
|
+ <h2 className="text-2xl font-bold tracking-tight">Dashboard</h2>
|
|
|
|
|
+ <Badge variant={config.badgeVariant}>{config.badge}</Badge>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <p className="text-sm text-muted-foreground mt-1">
|
|
|
|
|
+ {config.description}
|
|
|
</p>
|
|
</p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </CardContent>
|
|
|
|
|
- </Card>
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </CardContent>
|
|
|
|
|
+ </Card>
|
|
|
|
|
|
|
|
|
|
+ {/* Stats Grid */}
|
|
|
|
|
+ <div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
|
|
|
<Card>
|
|
<Card>
|
|
|
- <CardContent className="p-6">
|
|
|
|
|
- <div className="flex items-center">
|
|
|
|
|
- <div className="w-12 h-12 bg-green-100 rounded-lg flex items-center justify-center mr-4">
|
|
|
|
|
- <FileText className="w-6 h-6 text-green-600" />
|
|
|
|
|
- </div>
|
|
|
|
|
- <div>
|
|
|
|
|
- <p className="text-sm font-medium text-gray-600">Reportes</p>
|
|
|
|
|
- <p className="text-2xl font-bold text-gray-900">
|
|
|
|
|
- {isPatient ? "Mis Reportes" : "Generados"}
|
|
|
|
|
- </p>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
|
|
|
|
+ <CardTitle className="text-sm font-medium">
|
|
|
|
|
+ Consultas
|
|
|
|
|
+ </CardTitle>
|
|
|
|
|
+ <MessageSquare className="h-4 w-4 text-muted-foreground" />
|
|
|
|
|
+ </CardHeader>
|
|
|
|
|
+ <CardContent>
|
|
|
|
|
+ <div className="text-2xl font-bold">
|
|
|
|
|
+ {isPatient ? "Disponible" : "24"}
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <p className="text-xs text-muted-foreground">
|
|
|
|
|
+ {isPatient ? "3 consultas por sesión" : "+12% desde el mes pasado"}
|
|
|
|
|
+ </p>
|
|
|
</CardContent>
|
|
</CardContent>
|
|
|
</Card>
|
|
</Card>
|
|
|
|
|
|
|
|
<Card>
|
|
<Card>
|
|
|
- <CardContent className="p-6">
|
|
|
|
|
- <div className="flex items-center">
|
|
|
|
|
- <div className="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center mr-4">
|
|
|
|
|
- <Activity className="w-6 h-6 text-purple-600" />
|
|
|
|
|
- </div>
|
|
|
|
|
- <div>
|
|
|
|
|
- <p className="text-sm font-medium text-gray-600">Estado</p>
|
|
|
|
|
- <p className="text-2xl font-bold text-gray-900">
|
|
|
|
|
- {isDoctor ? "Activo" : "Saludable"}
|
|
|
|
|
- </p>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
|
|
|
|
+ <CardTitle className="text-sm font-medium">
|
|
|
|
|
+ Reportes
|
|
|
|
|
+ </CardTitle>
|
|
|
|
|
+ <FileText className="h-4 w-4 text-muted-foreground" />
|
|
|
|
|
+ </CardHeader>
|
|
|
|
|
+ <CardContent>
|
|
|
|
|
+ <div className="text-2xl font-bold">
|
|
|
|
|
+ {isPatient ? "15" : "128"}
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <p className="text-xs text-muted-foreground">
|
|
|
|
|
+ {isPatient ? "Reportes generados" : "+8 esta semana"}
|
|
|
|
|
+ </p>
|
|
|
</CardContent>
|
|
</CardContent>
|
|
|
</Card>
|
|
</Card>
|
|
|
|
|
|
|
|
<Card>
|
|
<Card>
|
|
|
- <CardContent className="p-6">
|
|
|
|
|
- <div className="flex items-center">
|
|
|
|
|
- <div className="w-12 h-12 bg-orange-100 rounded-lg flex items-center justify-center mr-4">
|
|
|
|
|
- <Calendar className="w-6 h-6 text-orange-600" />
|
|
|
|
|
- </div>
|
|
|
|
|
- <div>
|
|
|
|
|
- <p className="text-sm font-medium text-gray-600">Última Actividad</p>
|
|
|
|
|
- <p className="text-2xl font-bold text-gray-900">Hoy</p>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
|
|
|
|
+ <CardTitle className="text-sm font-medium">
|
|
|
|
|
+ {isDoctor || isAdmin ? "Pacientes" : "Citas"}
|
|
|
|
|
+ </CardTitle>
|
|
|
|
|
+ {isDoctor || isAdmin ? (
|
|
|
|
|
+ <Users className="h-4 w-4 text-muted-foreground" />
|
|
|
|
|
+ ) : (
|
|
|
|
|
+ <Calendar className="h-4 w-4 text-muted-foreground" />
|
|
|
|
|
+ )}
|
|
|
|
|
+ </CardHeader>
|
|
|
|
|
+ <CardContent>
|
|
|
|
|
+ <div className="text-2xl font-bold">
|
|
|
|
|
+ {isDoctor || isAdmin ? "45" : "2"}
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <p className="text-xs text-muted-foreground">
|
|
|
|
|
+ {isDoctor || isAdmin ? "Activos en el sistema" : "Próximas citas"}
|
|
|
|
|
+ </p>
|
|
|
</CardContent>
|
|
</CardContent>
|
|
|
</Card>
|
|
</Card>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- {/* Main Actions */}
|
|
|
|
|
- <div className="grid md:grid-cols-2 gap-8">
|
|
|
|
|
- {isAdmin ? (
|
|
|
|
|
- // Admin Dashboard
|
|
|
|
|
- <>
|
|
|
|
|
- <Card className="hover:shadow-lg transition-shadow">
|
|
|
|
|
- <CardHeader>
|
|
|
|
|
- <CardTitle className="flex items-center">
|
|
|
|
|
- <Shield className="w-5 h-5 mr-2 text-purple-600" />
|
|
|
|
|
- Panel de Administración
|
|
|
|
|
- </CardTitle>
|
|
|
|
|
- </CardHeader>
|
|
|
|
|
- <CardContent>
|
|
|
|
|
- <p className="text-gray-600 mb-4">
|
|
|
|
|
- Control total del sistema: gestiona usuarios, doctores, pacientes
|
|
|
|
|
- y todas las configuraciones de la plataforma.
|
|
|
|
|
- </p>
|
|
|
|
|
- <Link href="/admin">
|
|
|
|
|
- <Button className="w-full">
|
|
|
|
|
- Ir a Administración
|
|
|
|
|
- </Button>
|
|
|
|
|
- </Link>
|
|
|
|
|
- </CardContent>
|
|
|
|
|
- </Card>
|
|
|
|
|
|
|
+ {/* Main Content Grid */}
|
|
|
|
|
+ <div className="grid gap-4 md:grid-cols-2 lg:grid-cols-7">
|
|
|
|
|
+ {/* Quick Actions */}
|
|
|
|
|
+ <Card className="col-span-4">
|
|
|
|
|
+ <CardHeader>
|
|
|
|
|
+ <CardTitle>Acciones Rápidas</CardTitle>
|
|
|
|
|
+ <CardDescription>
|
|
|
|
|
+ Accede a las funciones principales del sistema
|
|
|
|
|
+ </CardDescription>
|
|
|
|
|
+ </CardHeader>
|
|
|
|
|
+ <CardContent className="space-y-4">
|
|
|
|
|
+ {isAdmin ? (
|
|
|
|
|
+ <>
|
|
|
|
|
+ <QuickActionItem
|
|
|
|
|
+ icon={Shield}
|
|
|
|
|
+ title="Panel de Administración"
|
|
|
|
|
+ description="Gestiona usuarios, doctores y configuración"
|
|
|
|
|
+ href="/admin"
|
|
|
|
|
+ iconBg="bg-violet-100 dark:bg-violet-900/20"
|
|
|
|
|
+ iconColor="text-violet-600 dark:text-violet-400"
|
|
|
|
|
+ />
|
|
|
|
|
+ <Separator />
|
|
|
|
|
+ <QuickActionItem
|
|
|
|
|
+ icon={FileText}
|
|
|
|
|
+ title="Todos los Reportes"
|
|
|
|
|
+ description="Accede al historial completo del sistema"
|
|
|
|
|
+ href="/records"
|
|
|
|
|
+ iconBg="bg-emerald-100 dark:bg-emerald-900/20"
|
|
|
|
|
+ iconColor="text-emerald-600 dark:text-emerald-400"
|
|
|
|
|
+ />
|
|
|
|
|
+ <Separator />
|
|
|
|
|
+ <QuickActionItem
|
|
|
|
|
+ icon={Users}
|
|
|
|
|
+ title="Gestión de Usuarios"
|
|
|
|
|
+ description="Administra pacientes y personal médico"
|
|
|
|
|
+ href="/admin/patients"
|
|
|
|
|
+ iconBg="bg-blue-100 dark:bg-blue-900/20"
|
|
|
|
|
+ iconColor="text-blue-600 dark:text-blue-400"
|
|
|
|
|
+ />
|
|
|
|
|
+ </>
|
|
|
|
|
+ ) : isDoctor ? (
|
|
|
|
|
+ <>
|
|
|
|
|
+ <QuickActionItem
|
|
|
|
|
+ icon={Users}
|
|
|
|
|
+ title="Mis Pacientes"
|
|
|
|
|
+ description="Revisa y gestiona tus pacientes asignados"
|
|
|
|
|
+ href="/admin"
|
|
|
|
|
+ iconBg="bg-blue-100 dark:bg-blue-900/20"
|
|
|
|
|
+ iconColor="text-blue-600 dark:text-blue-400"
|
|
|
|
|
+ />
|
|
|
|
|
+ <Separator />
|
|
|
|
|
+ <QuickActionItem
|
|
|
|
|
+ icon={FileText}
|
|
|
|
|
+ title="Reportes Médicos"
|
|
|
|
|
+ description="Historial de consultas y diagnósticos"
|
|
|
|
|
+ href="/records"
|
|
|
|
|
+ iconBg="bg-emerald-100 dark:bg-emerald-900/20"
|
|
|
|
|
+ iconColor="text-emerald-600 dark:text-emerald-400"
|
|
|
|
|
+ />
|
|
|
|
|
+ <Separator />
|
|
|
|
|
+ <QuickActionItem
|
|
|
|
|
+ icon={Calendar}
|
|
|
|
|
+ title="Agenda de Citas"
|
|
|
|
|
+ description="Visualiza tu calendario de consultas"
|
|
|
|
|
+ href="/appointments/doctor"
|
|
|
|
|
+ iconBg="bg-amber-100 dark:bg-amber-900/20"
|
|
|
|
|
+ iconColor="text-amber-600 dark:text-amber-400"
|
|
|
|
|
+ />
|
|
|
|
|
+ </>
|
|
|
|
|
+ ) : (
|
|
|
|
|
+ <>
|
|
|
|
|
+ <QuickActionItem
|
|
|
|
|
+ icon={MessageSquare}
|
|
|
|
|
+ title="Chat Médico"
|
|
|
|
|
+ description="Consulta con el asistente virtual"
|
|
|
|
|
+ href="/chat"
|
|
|
|
|
+ iconBg="bg-blue-100 dark:bg-blue-900/20"
|
|
|
|
|
+ iconColor="text-blue-600 dark:text-blue-400"
|
|
|
|
|
+ badge="3 disponibles"
|
|
|
|
|
+ />
|
|
|
|
|
+ <Separator />
|
|
|
|
|
+ <QuickActionItem
|
|
|
|
|
+ icon={FileText}
|
|
|
|
|
+ title="Mis Reportes"
|
|
|
|
|
+ description="Historial de reportes médicos"
|
|
|
|
|
+ href="/records"
|
|
|
|
|
+ iconBg="bg-emerald-100 dark:bg-emerald-900/20"
|
|
|
|
|
+ iconColor="text-emerald-600 dark:text-emerald-400"
|
|
|
|
|
+ />
|
|
|
|
|
+ <Separator />
|
|
|
|
|
+ <QuickActionItem
|
|
|
|
|
+ icon={Calendar}
|
|
|
|
|
+ title="Mis Citas"
|
|
|
|
|
+ description="Próximas consultas programadas"
|
|
|
|
|
+ href="/appointments"
|
|
|
|
|
+ iconBg="bg-amber-100 dark:bg-amber-900/20"
|
|
|
|
|
+ iconColor="text-amber-600 dark:text-amber-400"
|
|
|
|
|
+ />
|
|
|
|
|
+ </>
|
|
|
|
|
+ )}
|
|
|
|
|
+ </CardContent>
|
|
|
|
|
+ </Card>
|
|
|
|
|
|
|
|
- <Card className="hover:shadow-lg transition-shadow">
|
|
|
|
|
- <CardHeader>
|
|
|
|
|
- <CardTitle className="flex items-center">
|
|
|
|
|
- <FileText className="w-5 h-5 mr-2 text-green-600" />
|
|
|
|
|
- Todos los Reportes
|
|
|
|
|
- </CardTitle>
|
|
|
|
|
- </CardHeader>
|
|
|
|
|
- <CardContent>
|
|
|
|
|
- <p className="text-gray-600 mb-4">
|
|
|
|
|
- Accede a todos los reportes médicos del sistema y
|
|
|
|
|
- mantén un registro completo de todas las consultas.
|
|
|
|
|
- </p>
|
|
|
|
|
- <Link href="/records">
|
|
|
|
|
- <Button className="w-full">
|
|
|
|
|
- Ver Reportes
|
|
|
|
|
- </Button>
|
|
|
|
|
- </Link>
|
|
|
|
|
- </CardContent>
|
|
|
|
|
- </Card>
|
|
|
|
|
- </>
|
|
|
|
|
- ) : isDoctor ? (
|
|
|
|
|
- // Doctor Dashboard
|
|
|
|
|
- <>
|
|
|
|
|
- <Card className="hover:shadow-lg transition-shadow">
|
|
|
|
|
- <CardHeader>
|
|
|
|
|
- <CardTitle className="flex items-center">
|
|
|
|
|
- <Users className="w-5 h-5 mr-2 text-blue-600" />
|
|
|
|
|
- Mis Pacientes
|
|
|
|
|
- </CardTitle>
|
|
|
|
|
- </CardHeader>
|
|
|
|
|
- <CardContent>
|
|
|
|
|
- <p className="text-gray-600 mb-4">
|
|
|
|
|
- Visualiza la lista de pacientes asignados,
|
|
|
|
|
- revisa sus reportes y mantén seguimiento de sus consultas.
|
|
|
|
|
- </p>
|
|
|
|
|
- <Link href="/admin">
|
|
|
|
|
- <Button className="w-full">
|
|
|
|
|
- Ver Pacientes
|
|
|
|
|
- </Button>
|
|
|
|
|
- </Link>
|
|
|
|
|
- </CardContent>
|
|
|
|
|
- </Card>
|
|
|
|
|
|
|
+ {/* Recent Activity / Info Panel */}
|
|
|
|
|
+ <Card className="col-span-3">
|
|
|
|
|
+ <CardHeader>
|
|
|
|
|
+ <CardTitle>Información del Sistema</CardTitle>
|
|
|
|
|
+ <CardDescription>
|
|
|
|
|
+ Seguridad y privacidad
|
|
|
|
|
+ </CardDescription>
|
|
|
|
|
+ </CardHeader>
|
|
|
|
|
+ <CardContent className="space-y-6">
|
|
|
|
|
+ <div className="space-y-2">
|
|
|
|
|
+ <div className="flex items-start gap-3">
|
|
|
|
|
+ <div className="rounded-lg bg-green-100 dark:bg-green-900/20 p-2">
|
|
|
|
|
+ <Shield className="h-4 w-4 text-green-600 dark:text-green-400" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div className="space-y-1">
|
|
|
|
|
+ <p className="text-sm font-medium leading-none">
|
|
|
|
|
+ Seguridad Garantizada
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p className="text-sm text-muted-foreground">
|
|
|
|
|
+ Encriptación de nivel bancario protege tus datos médicos
|
|
|
|
|
+ </p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
- <Card className="hover:shadow-lg transition-shadow">
|
|
|
|
|
- <CardHeader>
|
|
|
|
|
- <CardTitle className="flex items-center">
|
|
|
|
|
- <FileText className="w-5 h-5 mr-2 text-green-600" />
|
|
|
|
|
- Reportes Médicos
|
|
|
|
|
- </CardTitle>
|
|
|
|
|
- </CardHeader>
|
|
|
|
|
- <CardContent>
|
|
|
|
|
- <p className="text-gray-600 mb-4">
|
|
|
|
|
- Accede a los reportes médicos de tus pacientes y
|
|
|
|
|
- mantén un registro de las consultas realizadas.
|
|
|
|
|
- </p>
|
|
|
|
|
- <Link href="/records">
|
|
|
|
|
- <Button className="w-full">
|
|
|
|
|
- Ver Reportes
|
|
|
|
|
- </Button>
|
|
|
|
|
- </Link>
|
|
|
|
|
- </CardContent>
|
|
|
|
|
- </Card>
|
|
|
|
|
- </>
|
|
|
|
|
- ) : (
|
|
|
|
|
- // Patient Dashboard
|
|
|
|
|
- <>
|
|
|
|
|
- <Card className="hover:shadow-lg transition-shadow">
|
|
|
|
|
- <CardHeader>
|
|
|
|
|
- <CardTitle className="flex items-center">
|
|
|
|
|
- <MessageSquare className="w-5 h-5 mr-2 text-blue-600" />
|
|
|
|
|
- Chat Médico
|
|
|
|
|
- </CardTitle>
|
|
|
|
|
- </CardHeader>
|
|
|
|
|
- <CardContent>
|
|
|
|
|
- <p className="text-gray-600 mb-4">
|
|
|
|
|
- Consulta con nuestro asistente médico virtual.
|
|
|
|
|
- Puedes hacer hasta 3 consultas por sesión.
|
|
|
|
|
- </p>
|
|
|
|
|
- <Link href="/chat">
|
|
|
|
|
- <Button className="w-full">
|
|
|
|
|
- Iniciar Consulta
|
|
|
|
|
- </Button>
|
|
|
|
|
- </Link>
|
|
|
|
|
- </CardContent>
|
|
|
|
|
- </Card>
|
|
|
|
|
|
|
+ <Separator />
|
|
|
|
|
|
|
|
- <Card className="hover:shadow-lg transition-shadow">
|
|
|
|
|
- <CardHeader>
|
|
|
|
|
- <CardTitle className="flex items-center">
|
|
|
|
|
- <FileText className="w-5 h-5 mr-2 text-green-600" />
|
|
|
|
|
- Mis Reportes
|
|
|
|
|
- </CardTitle>
|
|
|
|
|
- </CardHeader>
|
|
|
|
|
- <CardContent>
|
|
|
|
|
- <p className="text-gray-600 mb-4">
|
|
|
|
|
- Revisa tu historial de reportes médicos generados
|
|
|
|
|
- automáticamente después de cada consulta.
|
|
|
|
|
- </p>
|
|
|
|
|
- <Link href="/records">
|
|
|
|
|
- <Button className="w-full">
|
|
|
|
|
- Ver Mis Reportes
|
|
|
|
|
|
|
+ <div className="space-y-2">
|
|
|
|
|
+ <div className="flex items-start gap-3">
|
|
|
|
|
+ <div className="rounded-lg bg-blue-100 dark:bg-blue-900/20 p-2">
|
|
|
|
|
+ <Shield className="h-4 w-4 text-blue-600 dark:text-blue-400" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div className="space-y-1">
|
|
|
|
|
+ <p className="text-sm font-medium leading-none">
|
|
|
|
|
+ Privacidad Médica
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p className="text-sm text-muted-foreground">
|
|
|
|
|
+ Cumplimiento de estándares internacionales HIPAA
|
|
|
|
|
+ </p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <Separator />
|
|
|
|
|
+
|
|
|
|
|
+ <div className="space-y-2">
|
|
|
|
|
+ <div className="flex items-start gap-3">
|
|
|
|
|
+ <div className="rounded-lg bg-violet-100 dark:bg-violet-900/20 p-2">
|
|
|
|
|
+ <Activity className="h-4 w-4 text-violet-600 dark:text-violet-400" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div className="space-y-1">
|
|
|
|
|
+ <p className="text-sm font-medium leading-none">
|
|
|
|
|
+ Disponibilidad 24/7
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p className="text-sm text-muted-foreground">
|
|
|
|
|
+ Asistencia médica virtual disponible en todo momento
|
|
|
|
|
+ </p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ {isPatient && (
|
|
|
|
|
+ <>
|
|
|
|
|
+ <Separator />
|
|
|
|
|
+ <div className="pt-2">
|
|
|
|
|
+ <Button className="w-full" asChild>
|
|
|
|
|
+ <Link href="/chat">
|
|
|
|
|
+ Iniciar Consulta
|
|
|
|
|
+ <ArrowRight className="ml-2 h-4 w-4" />
|
|
|
|
|
+ </Link>
|
|
|
</Button>
|
|
</Button>
|
|
|
- </Link>
|
|
|
|
|
- </CardContent>
|
|
|
|
|
- </Card>
|
|
|
|
|
- </>
|
|
|
|
|
- )}
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </>
|
|
|
|
|
+ )}
|
|
|
|
|
+ </CardContent>
|
|
|
|
|
+ </Card>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- {/* Additional Info */}
|
|
|
|
|
- <div className="mt-8">
|
|
|
|
|
|
|
+ {/* Additional Information */}
|
|
|
|
|
+ {(isDoctor || isAdmin) && (
|
|
|
<Card>
|
|
<Card>
|
|
|
<CardHeader>
|
|
<CardHeader>
|
|
|
- <CardTitle className="flex items-center">
|
|
|
|
|
- <Shield className="w-5 h-5 mr-2 text-purple-600" />
|
|
|
|
|
- Información Importante
|
|
|
|
|
- </CardTitle>
|
|
|
|
|
|
|
+ <CardTitle>Resumen de Actividad</CardTitle>
|
|
|
|
|
+ <CardDescription>
|
|
|
|
|
+ Estadísticas del sistema en tiempo real
|
|
|
|
|
+ </CardDescription>
|
|
|
</CardHeader>
|
|
</CardHeader>
|
|
|
<CardContent>
|
|
<CardContent>
|
|
|
- <div className="grid md:grid-cols-2 gap-6">
|
|
|
|
|
- <div>
|
|
|
|
|
- <h4 className="font-semibold text-gray-900 mb-2">Seguridad</h4>
|
|
|
|
|
- <p className="text-sm text-gray-600">
|
|
|
|
|
- Todos tus datos médicos están protegidos con encriptación de nivel bancario
|
|
|
|
|
- y solo tú y tu médico autorizado pueden acceder a esta información.
|
|
|
|
|
- </p>
|
|
|
|
|
|
|
+ <div className="grid gap-4 md:grid-cols-3">
|
|
|
|
|
+ <div className="flex items-center gap-4">
|
|
|
|
|
+ <div className="rounded-full bg-blue-100 dark:bg-blue-900/20 p-3">
|
|
|
|
|
+ <TrendingUp className="h-5 w-5 text-blue-600 dark:text-blue-400" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <p className="text-sm font-medium text-muted-foreground">
|
|
|
|
|
+ Consultas Hoy
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p className="text-2xl font-bold">12</p>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div>
|
|
|
|
|
- <h4 className="font-semibold text-gray-900 mb-2">Privacidad</h4>
|
|
|
|
|
- <p className="text-sm text-gray-600">
|
|
|
|
|
- Cumplimos con los más altos estándares de privacidad médica.
|
|
|
|
|
- Tu información nunca será compartida sin tu consentimiento explícito.
|
|
|
|
|
- </p>
|
|
|
|
|
|
|
+ <div className="flex items-center gap-4">
|
|
|
|
|
+ <div className="rounded-full bg-emerald-100 dark:bg-emerald-900/20 p-3">
|
|
|
|
|
+ <FileText className="h-5 w-5 text-emerald-600 dark:text-emerald-400" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <p className="text-sm font-medium text-muted-foreground">
|
|
|
|
|
+ Reportes Generados
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p className="text-2xl font-bold">8</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div className="flex items-center gap-4">
|
|
|
|
|
+ <div className="rounded-full bg-amber-100 dark:bg-amber-900/20 p-3">
|
|
|
|
|
+ <Users className="h-5 w-5 text-amber-600 dark:text-amber-400" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <p className="text-sm font-medium text-muted-foreground">
|
|
|
|
|
+ Pacientes Activos
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p className="text-2xl font-bold">45</p>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</CardContent>
|
|
</CardContent>
|
|
|
</Card>
|
|
</Card>
|
|
|
- </div>
|
|
|
|
|
|
|
+ )}
|
|
|
</div>
|
|
</div>
|
|
|
</AuthenticatedLayout>
|
|
</AuthenticatedLayout>
|
|
|
)
|
|
)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+interface QuickActionItemProps {
|
|
|
|
|
+ icon: React.ElementType
|
|
|
|
|
+ title: string
|
|
|
|
|
+ description: string
|
|
|
|
|
+ href: string
|
|
|
|
|
+ iconBg: string
|
|
|
|
|
+ iconColor: string
|
|
|
|
|
+ badge?: string
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+function QuickActionItem({
|
|
|
|
|
+ icon: Icon,
|
|
|
|
|
+ title,
|
|
|
|
|
+ description,
|
|
|
|
|
+ href,
|
|
|
|
|
+ iconBg,
|
|
|
|
|
+ iconColor,
|
|
|
|
|
+ badge
|
|
|
|
|
+}: QuickActionItemProps) {
|
|
|
|
|
+ return (
|
|
|
|
|
+ <Link
|
|
|
|
|
+ href={href}
|
|
|
|
|
+ className="group flex items-center justify-between rounded-lg transition-colors hover:bg-accent"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div className="flex items-center gap-4 flex-1 py-2">
|
|
|
|
|
+ <div className={cn("rounded-lg p-2.5", iconBg)}>
|
|
|
|
|
+ <Icon className={cn("h-5 w-5", iconColor)} />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div className="flex-1 space-y-1">
|
|
|
|
|
+ <div className="flex items-center gap-2">
|
|
|
|
|
+ <p className="text-sm font-medium leading-none">{title}</p>
|
|
|
|
|
+ {badge && (
|
|
|
|
|
+ <Badge variant="secondary" className="text-xs">
|
|
|
|
|
+ {badge}
|
|
|
|
|
+ </Badge>
|
|
|
|
|
+ )}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <p className="text-sm text-muted-foreground line-clamp-1">
|
|
|
|
|
+ {description}
|
|
|
|
|
+ </p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <ChevronRight className="h-5 w-5 text-muted-foreground transition-transform group-hover:translate-x-1" />
|
|
|
|
|
+ </Link>
|
|
|
|
|
+ )
|
|
|
}
|
|
}
|