Full CRM rebuild with Next.js 15, TypeScript, Tailwind, Drizzle ORM, PostgreSQL, Redis, BullMQ, MinIO, and Socket.io. Includes 461 source files covering clients, berths, interests/pipeline, documents/EOI, expenses/invoices, email, notifications, dashboard, admin, and client portal. CI/CD via Gitea Actions with Docker builds. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
36 lines
890 B
TypeScript
36 lines
890 B
TypeScript
'use client';
|
|
|
|
import { Loader2 } from 'lucide-react';
|
|
|
|
import { Badge } from '@/components/ui/badge';
|
|
|
|
type ReportStatus = 'queued' | 'processing' | 'ready' | 'failed';
|
|
|
|
interface ReportStatusBadgeProps {
|
|
status: ReportStatus;
|
|
}
|
|
|
|
export function ReportStatusBadge({ status }: ReportStatusBadgeProps) {
|
|
switch (status) {
|
|
case 'queued':
|
|
return <Badge variant="outline">Queued</Badge>;
|
|
case 'processing':
|
|
return (
|
|
<Badge variant="secondary" className="gap-1">
|
|
<Loader2 className="h-3 w-3 animate-spin" />
|
|
Processing
|
|
</Badge>
|
|
);
|
|
case 'ready':
|
|
return (
|
|
<Badge className="bg-green-600 text-white hover:bg-green-700">
|
|
Ready
|
|
</Badge>
|
|
);
|
|
case 'failed':
|
|
return <Badge variant="destructive">Failed</Badge>;
|
|
default:
|
|
return <Badge variant="outline">{status}</Badge>;
|
|
}
|
|
}
|