mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-15 03:09:32 +02:00
Update announcement system to use production database and improve card design
Integrate PostgreSQL for announcement storage, aligning with production requirements and updating the announcement card UI for better visual consistency and user experience. Replit-Commit-Author: Agent Replit-Commit-Session-Id: e437ffed-c31b-44eb-9fd5-b6f9faa8e7ce Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/e437ffed-c31b-44eb-9fd5-b6f9faa8e7ce/DII5ZDt
This commit is contained in:
1 parent
3b180b84a4
commit
9f694d0251
3 files changed
+138
-44
No files matched your search
@@ -387,33 +387,31 @@ export default function AnnouncementCard() {
|
||||
|
||||
return (
|
||||
<div key={announcement.id} className="flex items-start justify-between p-3 rounded-lg border bg-card hover:bg-accent/50 transition-colors">
|
||||
<div className="flex items-start gap-3 flex-1 min-w-0">
|
||||
<TypeIcon className="h-4 w-4 text-blue-600 mt-0.5 flex-shrink-0" />
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="flex items-center gap-2 mb-1">
|
||||
<h4 className="font-medium text-sm truncate">
|
||||
{announcement.title}
|
||||
</h4>
|
||||
<Badge variant={priorityConfig.color} className="flex items-center gap-1 text-xs">
|
||||
{priorityConfig.label}
|
||||
</Badge>
|
||||
</div>
|
||||
|
||||
{announcement.content && (
|
||||
<p className="text-xs text-muted-foreground mb-1 line-clamp-1">
|
||||
{announcement.content}
|
||||
</p>
|
||||
)}
|
||||
|
||||
<div className="flex items-center gap-3 text-xs text-muted-foreground">
|
||||
<span>
|
||||
{safeFormat(safeDate(announcement.createdAt), 'dd/MM à HH:mm')}
|
||||
</span>
|
||||
<span>
|
||||
{announcement.author.firstName} {announcement.author.lastName}
|
||||
{announcement.group && ` • ${announcement.group.name}`}
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="flex items-center gap-2 mb-1">
|
||||
<h4 className="font-medium text-sm truncate">
|
||||
{announcement.title}
|
||||
</h4>
|
||||
<Badge variant={priorityConfig.color} className="flex items-center gap-1 text-xs">
|
||||
<TypeIcon className="w-2.5 h-2.5" />
|
||||
{priorityConfig.label}
|
||||
</Badge>
|
||||
</div>
|
||||
|
||||
{announcement.content && (
|
||||
<p className="text-xs text-muted-foreground mb-1 line-clamp-1">
|
||||
{announcement.content}
|
||||
</p>
|
||||
)}
|
||||
|
||||
<div className="flex items-center gap-3 text-xs text-muted-foreground">
|
||||
<span>
|
||||
{safeFormat(safeDate(announcement.createdAt), 'dd/MM à HH:mm')}
|
||||
</span>
|
||||
<span>
|
||||
{announcement.author.firstName} {announcement.author.lastName}
|
||||
{announcement.group && ` • ${announcement.group.name}`}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{user?.role === 'admin' && (
|
||||
|
||||
Reference in new issue
Block a user