diff --git a/dashboard/15-final/app/dashboard/customers/page.tsx b/dashboard/15-final/app/dashboard/customers/page.tsx index 6752b37..531ecce 100644 --- a/dashboard/15-final/app/dashboard/customers/page.tsx +++ b/dashboard/15-final/app/dashboard/customers/page.tsx @@ -2,8 +2,8 @@ import CustomersTable from '@/app/ui/customers/table'; export default function Page() { return ( -
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut vulputate + dapibus consectetur. Duis quis eros euismod. +
+ + + +| - Profile - | -- Name - | -- Email - | -- Total Invoices - | -- Total Pending - | -- Total Paid - | -||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
-
-
- |
- - {customer.name} - | -- {customer.email} - | -- {countCustomerInvoices(invoices, customer.id)} - | -- {calculateCustomerInvoices( - invoices, - 'pending', - customer.id, - )} - | -- {calculateCustomerInvoices(invoices, 'paid', customer.id)} - | +
| + Name + | ++ Email + | ++ Total Invoices + | ++ Total Pending + | ++ Total Paid + |
|---|
{customer.name}
+{value}
-+00% since last month
); } diff --git a/dashboard/15-final/app/ui/dashboard/latest-invoices.tsx b/dashboard/15-final/app/ui/dashboard/latest-invoices.tsx index af93631..3a5e4e4 100644 --- a/dashboard/15-final/app/ui/dashboard/latest-invoices.tsx +++ b/dashboard/15-final/app/ui/dashboard/latest-invoices.tsx @@ -34,14 +34,15 @@ export default function LatestInvoices({ height={32} />{customer?.name}
++ {customer?.name} +
{customer?.email}
- +{' '} +
{(invoice.amount / 100).toLocaleString('en-US', {
style: 'currency',
currency: 'USD',
diff --git a/dashboard/15-final/app/ui/dashboard/nav-links.tsx b/dashboard/15-final/app/ui/dashboard/nav-links.tsx
new file mode 100644
index 0000000..79a2242
--- /dev/null
+++ b/dashboard/15-final/app/ui/dashboard/nav-links.tsx
@@ -0,0 +1,45 @@
+'use client';
+
+import {
+ UserGroupIcon,
+ HomeIcon,
+ InboxIcon,
+} from '@heroicons/react/24/outline';
+import Link from 'next/link';
+import { usePathname } from 'next/navigation';
+import clsx from 'clsx';
+
+// Map of links to display in the side navigation.
+// Depending on the size of the application, this would be stored in a database.
+const links = [
+ { name: 'Home', href: '/dashboard', icon: HomeIcon },
+ { name: 'Invoices', href: '/dashboard/invoices', icon: InboxIcon },
+ { name: 'Customers', href: '/dashboard/customers', icon: UserGroupIcon },
+];
+
+export default function NavLinks() {
+ const pathname = usePathname();
+
+ return (
+ <>
+ {links.map((link) => {
+ const LinkIcon = link.icon;
+ return (
+
+
{link.name}
+ + ); + })} + > + ); +} diff --git a/dashboard/15-final/app/ui/dashboard/revenue-chart.tsx b/dashboard/15-final/app/ui/dashboard/revenue-chart.tsx index 3ba6415..5e8798c 100644 --- a/dashboard/15-final/app/ui/dashboard/revenue-chart.tsx +++ b/dashboard/15-final/app/ui/dashboard/revenue-chart.tsx @@ -15,7 +15,7 @@ export default function RevenueChart({ revenue }: { revenue: Revenue[] }) { } return ( -{label}
+ {yAxisLabels.map((label) => ( +{label}
))}{tab.name}
- - ); - })} +- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut vulputate - dapibus consectetur. Duis quis eros euismod. -
- - - -
- | - # - | -- Customer - | -- Email - | -- Amount - | -- Date - | -- Status - | - -- Edit - | -||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| - {invoice.id} - | -
-
-
- {getCustomerById(invoice.customerId)?.name} - |
- - {getCustomerById(invoice.customerId)?.email} - | -- {(invoice.amount / 100).toLocaleString('en-US', { - style: 'currency', - currency: 'USD', - })} - | -- {formatDateToLocal(invoice.date)} - | -- {renderInvoiceStatus(invoice.status)} - | -
-
- |
+
| + # + | ++ Customer + | ++ Email + | ++ Amount + | ++ Date + | ++ Status + | ++ Edit + |
|---|
{getCustomerById(invoice.customerId)?.name}
+