1
1
import React from "react" ;
2
2
import Link from "next/link" ;
3
- import { Flex , ProgressBar , Text } from "@tremor/react" ;
3
+ import { ProgressBar } from "@tremor/react" ;
4
4
5
5
import { CardTitle , CardHeader , CardContent , Card } from "@/components/ui/card" ;
6
6
import OrderIcon from "@/assets/svg/OrderIcon" ;
@@ -14,34 +14,52 @@ import SalesGraph from "@/assets/svg/SalesGraph";
14
14
import IncomeIcon from "@/assets/svg/IncomeIcon" ;
15
15
import IncomeGraph from "@/assets/svg/IncomeGraph" ;
16
16
import CustomBarChart from "../others/CustomBarChart" ;
17
- import { BarChartGraph } from "../others/BarChartGraph" ;
18
17
import OrdersTable from "../others/OrdersTable" ;
19
18
20
19
const Dashboard = ( ) => {
21
20
return (
22
- < main className = "flex flex-1 flex-col gap-4 p-4 md:gap-8 md:p-6 z-10" >
21
+ < main className = "fle flex-1 flex-co gap-4 p-4 md:gap-8 md:p-6 z-10" >
23
22
< div className = "space-y-6" >
24
23
{ /* charts */ }
25
- < div className = "lg:flex gap-6" >
24
+ < div className = "lg:flex gap-6 space-y-6 lg:space-y-0 " >
26
25
< Card className = "flex flex-1 flex-col " >
27
26
{ /* max-w-[50rem] */ }
28
27
< CardHeader >
29
- < CardTitle > Sales Trends</ CardTitle >
28
+ < CardTitle className = "text-lg font-semibold text-[#26282C] dark:text-gray-50 flex justify-between" >
29
+ Sales Trends
30
+ < span className = "space-x-2 text-sm font-medium" >
31
+ < label for = "period" > Sort by:</ label >
32
+ < select
33
+ name = "period"
34
+ id = "period"
35
+ className = "bg-transparent border border-[#E1DFDF] dark:border-gray-100 rounded-3xl px-3 py-1 text-sm font-medium"
36
+ >
37
+ < option value = "weekly" className = "dark:bg-gray-800" >
38
+ Weekly
39
+ </ option >
40
+ < option value = "monthly" className = "dark:bg-gray-800" >
41
+ Monthly
42
+ </ option >
43
+ < option value = "yearly" className = "dark:bg-gray-800" >
44
+ Yearly
45
+ </ option >
46
+ </ select >
47
+ </ span >
48
+ </ CardTitle >
30
49
</ CardHeader >
31
50
< CardContent >
32
- { /* <BarChartGraph className="aspect-[4/3]" /> */ }
33
51
< CustomBarChart />
34
52
</ CardContent >
35
53
</ Card >
36
54
37
- < div className = "flex-none grid md: grid-cols-2 gap-6" >
55
+ < div className = "flex-none lg:mt-0 grid grid-cols-2 gap-6" >
38
56
{ /* order */ }
39
57
< div className = "space-y-2 max-w-[16rem] bg-white dark:bg-black/50 border border-[#EDF2F7] dark:border-[#EDF2F7]/50 p-4 rounded-[0.875rem]" >
40
58
< span className = "flex gap-4 justify-between" >
41
59
< OrderIcon className = "w-5 h-5" />
42
60
< OrderGraph />
43
61
</ span >
44
- < p className = "text-[#898989] dark:text-gray-20 font-medium text-lg" >
62
+ < p className = "text-[#898989] dark:text-gray-200 font-medium text-lg" >
45
63
Total Order
46
64
</ p >
47
65
< p className = "text-[#3A3F51] dark:text-gray-50 font-semibold text-2xl" >
@@ -61,7 +79,7 @@ const Dashboard = () => {
61
79
< RefundIcon className = "w-5 h-5" />
62
80
< RefundGraph />
63
81
</ span >
64
- < p className = "text-[#898989] dark:text-gray-20 font-medium text-lg" >
82
+ < p className = "text-[#898989] dark:text-gray-200 font-medium text-lg" >
65
83
Total Refund
66
84
</ p >
67
85
< p className = "text-[#3A3F51] dark:text-gray-50 font-semibold text-2xl" >
@@ -81,7 +99,7 @@ const Dashboard = () => {
81
99
< SalesIcon className = "w-5 h-5" />
82
100
< SalesGraph />
83
101
</ span >
84
- < p className = "text-[#898989] dark:text-gray-20 font-medium text-lg" >
102
+ < p className = "text-[#898989] dark:text-gray-200 font-medium text-lg" >
85
103
Average Sales
86
104
</ p >
87
105
< p className = "text-[#3A3F51] dark:text-gray-50 font-semibold text-2xl" >
@@ -101,7 +119,7 @@ const Dashboard = () => {
101
119
< IncomeIcon className = "w-5 h-5" />
102
120
< IncomeGraph />
103
121
</ span >
104
- < p className = "text-[#898989] dark:text-gray-20 font-medium text-lg" >
122
+ < p className = "text-[#898989] dark:text-gray-200 font-medium text-lg" >
105
123
Total Income
106
124
</ p >
107
125
< p className = "text-[#3A3F51] dark:text-gray-50 font-semibold text-2xl" >
@@ -117,7 +135,7 @@ const Dashboard = () => {
117
135
</ div >
118
136
</ div >
119
137
120
- < div className = "lg:flex gap-6" >
138
+ < div className = "lg:flex gap-6 space-y-6 lg:space-y-0 " >
121
139
< Card className = "flex flex-1 flex-col" >
122
140
{ /* w-[50rem] */ }
123
141
< CardHeader >
@@ -211,7 +229,7 @@ const Dashboard = () => {
211
229
</ div >
212
230
213
231
{ /* footer */ }
214
- < div className = "" >
232
+ < div className = "pt-4 " >
215
233
< p className = "text-center text-[#26282C] dark:text-gray-50" >
216
234
Geegpay ©{ new Date ( ) . getFullYear ( ) } Created by{ " " }
217
235
< Link
0 commit comments