import { hatcheryApplications, farmApplications, getStatusColor, formatStatus } from '@/data/dummyData'; import { Badge } from '@/components/ui/badge'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Button } from '@/components/ui/button'; import { ArrowRight, Fish, Warehouse } from 'lucide-react'; import { Link } from 'react-router-dom'; export function RecentApplications() { const allApplications = [ ...hatcheryApplications.map(h => ({ ...h, type: 'hatchery' as const })), ...farmApplications.map(f => ({ ...f, type: 'farm' as const })), ] .sort((a, b) => new Date(b.submittedDate).getTime() - new Date(a.submittedDate).getTime()) .slice(0, 5); return ( Recent Applications
{allApplications.map((app) => (
{app.type === 'hatchery' ? : }

{app.type === 'hatchery' ? (app as any).hatcheryName : (app as any).farmName}

{app.applicationNo}

{formatStatus(app.status)}

{app.submittedDate}

))}
); }