| 1 | import { CircleDot } from 'lucide-react' |
| 2 | import Link from 'next/link |
| 3 | |
| 4 | import { Card, CardContent |
| 5 | import type { RouteImpl |
| 6 | import TimesheetStatusBadge from '../timesheets/_components/timesheet-status-badge |
| 7 | |
| 8 | interface Report { |
| 9 | id: string |
| 10 | status: Parameters |
| 11 | title: string |
| 12 | totalMinutes: number |
| 13 | } |
| 14 | |
| 15 | export function TimesheetReportsCard({ |
| 16 | reports, |
| 17 | basePath, |
| 18 | }: { |
| 19 | reports: Report |
| 20 | basePath: string |
| 21 | }) { |
| 22 | return ( |
| 23 | <Card> |
| 24 | <CardHeader className=' |
| 25 | <CardTitle className=' |
| 26 | <CircleDot className=' |
| 27 | Timesheet Reports |
| 28 | </CardTitle> |
| 29 | <Link |
| 30 | className='text-muted-foreground text-xs hover:text-foreground' |
| 31 | href={`${basePath |
| 32 | > |
| 33 | View all |
| 34 | </Link> |
| 35 | </CardHeader> |
| 36 | <CardContent className=' |
| 37 | {reports.slice(0 |
| 38 | <div |
| 39 | className='flex items-center justify-between rounded-lg border border-border p-3' |
| 40 | key={r.id |
| 41 | > |
| 42 | <div className='min-w-0 |
| 43 | <span className='truncate font-medium text-sm |
| 44 | <p className='text-muted-foreground text-xs |
| 45 | {Math.floor(r |
| 46 | </p> |
| 47 | </div> |
| 48 | <TimesheetStatusBadge status={ |
| 49 | </div> |
| 50 | ))} |
| 51 | </CardContent> |
| 52 | </Card> |
| 53 | ) |
| 54 | } |