|
| 1 | +'use client' |
| 2 | + |
| 3 | +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' |
| 4 | +import { faPlus } from '@fortawesome/free-solid-svg-icons' |
| 5 | +import { AdminLayout } from '@/components/admin/admin-layout' |
| 6 | +import { ActionButton, Separator } from '@/components/breadcrumbs' |
| 7 | + |
| 8 | +const timesheets = [ |
| 9 | + { |
| 10 | + date: 'November 02nd, 2024', |
| 11 | + time: '9:00 AM - 1:30 PM', |
| 12 | + hours: '4.50 hrs', |
| 13 | + user: 'Andrew Corbin', |
| 14 | + client: 'ACME Product Team', |
| 15 | + firm: 'ACME Labs LLC', |
| 16 | + description: |
| 17 | + 'Polish invoice payment UX, fix edge cases in router transition handling, and review responsive behavior.', |
| 18 | + }, |
| 19 | + { |
| 20 | + date: 'October 28th, 2024', |
| 21 | + time: '2:15 PM - 6:00 PM', |
| 22 | + hours: '3.75 hrs', |
| 23 | + user: 'Tom Goodrie', |
| 24 | + client: 'Northgrid Studio', |
| 25 | + firm: 'Northgrid Studio', |
| 26 | + description: 'Review sitemap IA, implement content page scaffolding, and prep migration notes for API transition.', |
| 27 | + }, |
| 28 | +] |
| 29 | + |
| 30 | +export default function AdminTimePage() { |
| 31 | + return ( |
| 32 | + <AdminLayout title="Timesheets" breadcrumbLabel="Timesheets"> |
| 33 | + <div className="border border-[#ececec] rounded bg-white shadow-[0_8px_24px_rgba(0,0,0,0.04)] p-6 lg:p-8"> |
| 34 | + <div className="flex flex-col gap-4 md:flex-row md:items-start md:justify-between"> |
| 35 | + <h1 className="text-[34px] font-normal leading-[1.15] text-[#2a2a2a]">Timesheets</h1> |
| 36 | + <ActionButton href="/admin/time" variant="primary"> |
| 37 | + <FontAwesomeIcon icon={faPlus} /> |
| 38 | + <span>New</span> |
| 39 | + </ActionButton> |
| 40 | + </div> |
| 41 | + <Separator /> |
| 42 | + <div className="overflow-x-auto"> |
| 43 | + <table className="w-full min-w-[880px] text-left text-[14px]"> |
| 44 | + <thead> |
| 45 | + <tr className="border-b border-[#ececec] text-[#555]"> |
| 46 | + {['Date', 'Hours', 'User', 'Client', 'Description', ''].map((header) => ( |
| 47 | + <th key={header} className="px-4 py-3"> |
| 48 | + {header} |
| 49 | + </th> |
| 50 | + ))} |
| 51 | + </tr> |
| 52 | + </thead> |
| 53 | + <tbody> |
| 54 | + {timesheets.map((row) => ( |
| 55 | + <tr key={`${row.date}-${row.user}`} className="border-b border-[#f3f3f3] text-[#666]"> |
| 56 | + <td className="px-4 py-4"> |
| 57 | + <div className="text-center"> |
| 58 | + {row.date} |
| 59 | + <br /> |
| 60 | + <small>({row.time})</small> |
| 61 | + </div> |
| 62 | + </td> |
| 63 | + <td className="px-4 py-4 font-semibold">{row.hours}</td> |
| 64 | + <td className="px-4 py-4">{row.user}</td> |
| 65 | + <td className="px-4 py-4"> |
| 66 | + {row.client} |
| 67 | + <br /> |
| 68 | + <small>{row.firm}</small> |
| 69 | + </td> |
| 70 | + <td className="px-4 py-4"> |
| 71 | + <textarea className="h-[150px] w-full rounded-[3px] border border-[#ddd] px-3 py-2 text-[13px] outline-none"> |
| 72 | + {row.description} |
| 73 | + </textarea> |
| 74 | + </td> |
| 75 | + <td className="px-4 py-4 text-center text-[#c46]">Delete</td> |
| 76 | + </tr> |
| 77 | + ))} |
| 78 | + </tbody> |
| 79 | + </table> |
| 80 | + </div> |
| 81 | + </div> |
| 82 | + </AdminLayout> |
| 83 | + ) |
| 84 | +} |
0 commit comments