|
|
@@ -50,65 +50,60 @@ export default function RecordsCard({
|
|
|
}
|
|
|
|
|
|
return (
|
|
|
- <Card className="group hover:shadow-xl transition-all duration-300 border-0 bg-gradient-to-br from-card to-muted/50 overflow-hidden relative">
|
|
|
- {/* Gradient border */}
|
|
|
- <div className="absolute inset-0 bg-gradient-to-r from-primary via-secondary to-primary opacity-0 group-hover:opacity-100 transition-opacity duration-300"></div>
|
|
|
- <div className="absolute inset-[1px] bg-card rounded-lg"></div>
|
|
|
-
|
|
|
- <div className="relative">
|
|
|
- <CardHeader className="pb-4">
|
|
|
- <div className="flex items-center justify-between mb-3">
|
|
|
- <div className="flex items-center space-x-3">
|
|
|
- <div className="w-12 h-12 bg-gradient-to-br from-primary to-secondary rounded-xl flex items-center justify-center shadow-lg">
|
|
|
- <FileText className="w-6 h-6 text-white" />
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <CardTitle className="text-xl font-bold text-foreground">
|
|
|
- Reporte #{record.id.slice(-8)}
|
|
|
- </CardTitle>
|
|
|
- <div className="flex items-center text-xs text-muted-foreground mt-1">
|
|
|
- <Tag className="w-3 h-3 mr-1" />
|
|
|
- {record.id.slice(0, 8)}...
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <Card className="group hover:shadow-lg transition-all duration-300 border overflow-hidden">
|
|
|
+ <CardHeader className="pb-4">
|
|
|
+ <div className="flex items-center justify-between mb-3">
|
|
|
+ <div className="flex items-center space-x-3">
|
|
|
+ <div className="w-12 h-12 bg-primary rounded-xl flex items-center justify-center shadow-sm">
|
|
|
+ <FileText className="w-6 h-6 text-primary-foreground" />
|
|
|
</div>
|
|
|
- <div className="flex space-x-1">
|
|
|
- <Button
|
|
|
- variant="ghost"
|
|
|
- size="sm"
|
|
|
- onClick={() => onViewRecord(record)}
|
|
|
- className="h-9 w-9 p-0 hover:bg-primary/5"
|
|
|
- >
|
|
|
- <Eye className="w-4 h-4 text-muted-foreground" />
|
|
|
- </Button>
|
|
|
- <Button
|
|
|
- variant="ghost"
|
|
|
- size="sm"
|
|
|
- onClick={() => onCopyContent(record.content)}
|
|
|
- className="h-9 w-9 p-0 hover:bg-primary/5"
|
|
|
- >
|
|
|
- <Copy className="w-4 h-4 text-muted-foreground" />
|
|
|
- </Button>
|
|
|
+ <div>
|
|
|
+ <CardTitle className="text-xl font-bold text-foreground">
|
|
|
+ Reporte #{record.id.slice(-8)}
|
|
|
+ </CardTitle>
|
|
|
+ <div className="flex items-center text-xs text-muted-foreground mt-1">
|
|
|
+ <Tag className="w-3 h-3 mr-1" />
|
|
|
+ {record.id.slice(0, 8)}...
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
- <div className="grid grid-cols-1 gap-2 text-sm">
|
|
|
- <div className="flex items-center text-muted-foreground bg-primary/5 px-3 py-2 rounded-lg">
|
|
|
- <Calendar className="w-4 h-4 mr-2 text-primary" />
|
|
|
- <span className="font-medium">{formatRelativeDate(record.createdAt)}</span>
|
|
|
- </div>
|
|
|
- {userRole === "DOCTOR" && (
|
|
|
- <div className="flex items-center text-muted-foreground bg-success/5 px-3 py-2 rounded-lg">
|
|
|
- <User className="w-4 h-4 mr-2 text-success" />
|
|
|
- <span className="font-medium truncate">{record.user.name} {record.user.lastname}</span>
|
|
|
- </div>
|
|
|
- )}
|
|
|
+ <div className="flex space-x-1">
|
|
|
+ <Button
|
|
|
+ variant="ghost"
|
|
|
+ size="sm"
|
|
|
+ onClick={() => onViewRecord(record)}
|
|
|
+ className="h-9 w-9 p-0"
|
|
|
+ >
|
|
|
+ <Eye className="w-4 h-4 text-muted-foreground" />
|
|
|
+ </Button>
|
|
|
+ <Button
|
|
|
+ variant="ghost"
|
|
|
+ size="sm"
|
|
|
+ onClick={() => onCopyContent(record.content)}
|
|
|
+ className="h-9 w-9 p-0"
|
|
|
+ >
|
|
|
+ <Copy className="w-4 h-4 text-muted-foreground" />
|
|
|
+ </Button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div className="grid grid-cols-1 gap-2 text-sm">
|
|
|
+ <div className="flex items-center text-muted-foreground bg-muted px-3 py-2 rounded-lg">
|
|
|
+ <Calendar className="w-4 h-4 mr-2 text-primary" />
|
|
|
+ <span className="font-medium">{formatRelativeDate(record.createdAt)}</span>
|
|
|
+ </div>
|
|
|
+ {userRole === "DOCTOR" && (
|
|
|
<div className="flex items-center text-muted-foreground bg-muted px-3 py-2 rounded-lg">
|
|
|
- <Clock className="w-4 h-4 mr-2 text-muted-foreground" />
|
|
|
- <span className="font-medium">{formatDate(record.createdAt)}</span>
|
|
|
+ <User className="w-4 h-4 mr-2 text-primary" />
|
|
|
+ <span className="font-medium truncate">{record.user.name} {record.user.lastname}</span>
|
|
|
</div>
|
|
|
+ )}
|
|
|
+ <div className="flex items-center text-muted-foreground bg-muted px-3 py-2 rounded-lg">
|
|
|
+ <Clock className="w-4 h-4 mr-2 text-muted-foreground" />
|
|
|
+ <span className="font-medium">{formatDate(record.createdAt)}</span>
|
|
|
</div>
|
|
|
- </CardHeader>
|
|
|
+ </div>
|
|
|
+ </CardHeader>
|
|
|
|
|
|
<CardContent className="pt-0">
|
|
|
<div className="mb-6">
|
|
|
@@ -146,14 +141,13 @@ export default function RecordsCard({
|
|
|
variant="default"
|
|
|
size="sm"
|
|
|
onClick={() => onViewRecord(record)}
|
|
|
- className="flex-1 bg-gradient-to-r from-blue-500 to-blue-600 hover:from-blue-600 hover:to-blue-700 shadow-md"
|
|
|
+ className="flex-1"
|
|
|
>
|
|
|
<Eye className="w-4 h-4 mr-2" />
|
|
|
Ver
|
|
|
</Button>
|
|
|
</div>
|
|
|
</CardContent>
|
|
|
- </div>
|
|
|
- </Card>
|
|
|
- )
|
|
|
-}
|
|
|
+ </Card>
|
|
|
+ )
|
|
|
+ }
|