@@ -4,6 +4,18 @@ import { dashboard } from '@/routes/admin';
44import { type BreadcrumbItem } from ' @/types' ;
55import { Head } from ' @inertiajs/vue3' ;
66import PlaceholderPattern from ' @/components/PlaceholderPattern.vue' ;
7+ import { useFormatters } from ' @/composables/useFormatters' ;
8+ import { Package , PhilippinePeso , ShoppingCart , Users } from ' lucide-vue-next' ;
9+
10+ interface Props {
11+ countOrders: number ;
12+ getTotalRevenue: number ;
13+ countItems: number ;
14+ countCustomers: number ;
15+ }
16+
17+ const props = defineProps <Props >();
18+ const { formatCurrency } = useFormatters ();
719
820const breadcrumbs: BreadcrumbItem [] = [
921 {
@@ -19,18 +31,65 @@ const breadcrumbs: BreadcrumbItem[] = [
1931
2032 <AppLayout :breadcrumbs =" breadcrumbs" >
2133 <div class =" flex h-full flex-1 flex-col gap-4 overflow-x-auto rounded-xl p-4" >
22- <div class =" grid auto-rows-min gap-4 md:grid-cols-3" >
23- <div
24- class =" relative aspect-video overflow-hidden rounded-xl border border-sidebar-border/70 dark:border-sidebar-border" >
25- <PlaceholderPattern />
34+ <div class =" flex justify-between items-center mb-4" >
35+ <div >
36+ <h1 class =" text-2xl font-bold" >Dashboard</h1 >
37+ <p class =" text-sm text-muted-foreground" >Welcome back <span
38+ class =" text-[#815331] font-bold" >@Admin</span >!</p >
2639 </div >
27- <div
28- class =" relative aspect-video overflow-hidden rounded-xl border border-sidebar-border/70 dark:border-sidebar-border" >
29- <PlaceholderPattern />
40+ </div >
41+
42+ <div class =" grid grid-cols-1 md:grid-cols-4 gap-4" >
43+ <!-- Total Orders Card -->
44+ <div class =" bg-white border rounded-lg p-6" >
45+ <div class =" flex items-center justify-between" >
46+ <div >
47+ <p class =" text-sm text-muted-foreground" >Total Orders</p >
48+ <p class =" text-2xl font-bold mt-1" >{{ countOrders }}</p >
49+ </div >
50+ <div class =" p-3 bg-blue-50 rounded-lg" >
51+ <ShoppingCart class =" w-6 h-6 text-blue-600" />
52+ </div >
53+ </div >
3054 </div >
31- <div
32- class =" relative aspect-video overflow-hidden rounded-xl border border-sidebar-border/70 dark:border-sidebar-border" >
33- <PlaceholderPattern />
55+
56+ <!-- Total Revenue Card -->
57+ <div class =" bg-white border rounded-lg p-6" >
58+ <div class =" flex items-center justify-between" >
59+ <div >
60+ <p class =" text-sm text-muted-foreground" >Total Revenue</p >
61+ <p class =" text-2xl font-bold mt-1" >{{ formatCurrency(getTotalRevenue) }}</p >
62+ </div >
63+ <div class =" p-3 bg-green-50 rounded-lg" >
64+ <PhilippinePeso class =" w-6 h-6 text-green-600" />
65+ </div >
66+ </div >
67+ </div >
68+
69+ <!-- Total Items Card -->
70+ <div class =" bg-white border rounded-lg p-6" >
71+ <div class =" flex items-center justify-between" >
72+ <div >
73+ <p class =" text-sm text-muted-foreground" >Total Items</p >
74+ <p class =" text-2xl font-bold mt-1" >{{ countItems }}</p >
75+ </div >
76+ <div class =" p-3 bg-purple-50 rounded-lg" >
77+ <Package class =" w-6 h-6 text-purple-600" />
78+ </div >
79+ </div >
80+ </div >
81+
82+ <!-- Total Customers Card -->
83+ <div class =" bg-white border rounded-lg p-6" >
84+ <div class =" flex items-center justify-between" >
85+ <div >
86+ <p class =" text-sm text-muted-foreground" >Total Customers</p >
87+ <p class =" text-2xl font-bold mt-1" >{{ countCustomers }}</p >
88+ </div >
89+ <div class =" p-3 bg-orange-50 rounded-lg" >
90+ <Users class =" w-6 h-6 text-orange-600" />
91+ </div >
92+ </div >
3493 </div >
3594 </div >
3695 <div
0 commit comments