Skip to content

Commit 54453dd

Browse files
Proflie and dashboard for admin and user
1 parent 16f71c7 commit 54453dd

File tree

22 files changed

+1428
-308
lines changed

22 files changed

+1428
-308
lines changed

package-lock.json

Lines changed: 124 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
"@radix-ui/react-dialog": "^1.1.14",
2323
"@radix-ui/react-dropdown-menu": "^2.1.15",
2424
"@radix-ui/react-label": "^2.1.7",
25+
"@radix-ui/react-popover": "^1.1.14",
26+
"@radix-ui/react-scroll-area": "^1.2.9",
2527
"@radix-ui/react-select": "^2.2.5",
2628
"@radix-ui/react-separator": "^1.1.7",
2729
"@radix-ui/react-slot": "^1.2.3",
@@ -35,12 +37,16 @@
3537
"axios": "^1.9.0",
3638
"class-variance-authority": "^0.7.1",
3739
"clsx": "^2.1.1",
40+
"cmdk": "^1.1.1",
41+
"date-fns": "^4.1.0",
3842
"heroicons": "^2.2.0",
3943
"lucide-react": "^0.511.0",
4044
"next-themes": "^0.4.6",
4145
"react": "^19.0.0",
46+
"react-day-picker": "^8.10.1",
4247
"react-dom": "^19.0.0",
4348
"react-redux": "^9.2.0",
49+
"react-resizable-panels": "^3.0.2",
4450
"react-router-dom": "^7.5.1",
4551
"recharts": "^2.15.3",
4652
"redux-persist": "^6.0.0",

src/App.css

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1-
html {
2-
overflow-y: scroll;
1+
/* Add this to your global CSS (tailwind.config.js or globals.css) */
2+
.scroll-area::-webkit-scrollbar {
3+
width: 6px;
4+
}
5+
6+
.scroll-area::-webkit-scrollbar-thumb {
7+
background-color: rgba(0, 0, 0, 0.2);
8+
border-radius: 4px;
39
}

src/components/common/Sidebar/Sidebar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function Sidebar() {
3636
{/* Mobile menu toggle */}
3737
<div className="lg:hidden p-4">
3838
<button onClick={() => setMobileOpen(true)}>
39-
<Bars3Icon className="h-6 w-6 text-gray-700" />
39+
<Bars3Icon className="h-6 text-gray-700" />
4040
</button>
4141
</div>
4242

src/components/ui/alert.tsx

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
import * as React from "react"
2+
import { cva, type VariantProps } from "class-variance-authority"
3+
4+
import { cn } from "@/lib/utils"
5+
6+
const alertVariants = cva(
7+
"relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
8+
{
9+
variants: {
10+
variant: {
11+
default: "bg-background text-foreground",
12+
destructive:
13+
"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
14+
},
15+
},
16+
defaultVariants: {
17+
variant: "default",
18+
},
19+
}
20+
)
21+
22+
const Alert = React.forwardRef<
23+
HTMLDivElement,
24+
React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>
25+
>(({ className, variant, ...props }, ref) => (
26+
<div
27+
ref={ref}
28+
role="alert"
29+
className={cn(alertVariants({ variant }), className)}
30+
{...props}
31+
/>
32+
))
33+
Alert.displayName = "Alert"
34+
35+
const AlertTitle = React.forwardRef<
36+
HTMLParagraphElement,
37+
React.HTMLAttributes<HTMLHeadingElement>
38+
>(({ className, ...props }, ref) => (
39+
<h5
40+
ref={ref}
41+
className={cn("mb-1 font-medium leading-none tracking-tight", className)}
42+
{...props}
43+
/>
44+
))
45+
AlertTitle.displayName = "AlertTitle"
46+
47+
const AlertDescription = React.forwardRef<
48+
HTMLParagraphElement,
49+
React.HTMLAttributes<HTMLParagraphElement>
50+
>(({ className, ...props }, ref) => (
51+
<div
52+
ref={ref}
53+
className={cn("text-sm [&_p]:leading-relaxed", className)}
54+
{...props}
55+
/>
56+
))
57+
AlertDescription.displayName = "AlertDescription"
58+
59+
export { Alert, AlertTitle, AlertDescription }

src/components/ui/avatar.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
"use client"
2-
31
import * as React from "react"
42
import * as AvatarPrimitive from "@radix-ui/react-avatar"
53

src/components/ui/calendar.tsx

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
import * as React from "react"
2+
import { ChevronLeft, ChevronRight } from "lucide-react"
3+
import { DayPicker } from "react-day-picker"
4+
5+
import { cn } from "@/lib/utils"
6+
import { buttonVariants } from "@/components/ui/button"
7+
8+
export type CalendarProps = React.ComponentProps<typeof DayPicker>
9+
10+
function Calendar({
11+
className,
12+
classNames,
13+
showOutsideDays = true,
14+
...props
15+
}: CalendarProps) {
16+
return (
17+
<DayPicker
18+
showOutsideDays={showOutsideDays}
19+
className={cn("p-3", className)}
20+
classNames={{
21+
months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
22+
month: "space-y-4",
23+
caption: "flex justify-center pt-1 relative items-center",
24+
caption_label: "text-sm font-medium",
25+
nav: "space-x-1 flex items-center",
26+
nav_button: cn(
27+
buttonVariants({ variant: "outline" }),
28+
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"
29+
),
30+
nav_button_previous: "absolute left-1",
31+
nav_button_next: "absolute right-1",
32+
table: "w-full border-collapse space-y-1",
33+
head_row: "flex",
34+
head_cell:
35+
"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",
36+
row: "flex w-full mt-2",
37+
cell: cn(
38+
"relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",
39+
props.mode === "range"
40+
? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md"
41+
: "[&:has([aria-selected])]:rounded-md"
42+
),
43+
day: cn(
44+
buttonVariants({ variant: "ghost" }),
45+
"h-8 w-8 p-0 font-normal aria-selected:opacity-100"
46+
),
47+
day_range_start: "day-range-start",
48+
day_range_end: "day-range-end",
49+
day_selected:
50+
"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
51+
day_today: "bg-accent text-accent-foreground",
52+
day_outside:
53+
"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",
54+
day_disabled: "text-muted-foreground opacity-50",
55+
day_range_middle:
56+
"aria-selected:bg-accent aria-selected:text-accent-foreground",
57+
day_hidden: "invisible",
58+
...classNames,
59+
}}
60+
components={{
61+
IconLeft: ({ className, ...props }) => (
62+
<ChevronLeft className={cn("h-4 w-4", className)} {...props} />
63+
),
64+
IconRight: ({ className, ...props }) => (
65+
<ChevronRight className={cn("h-4 w-4", className)} {...props} />
66+
),
67+
}}
68+
{...props}
69+
/>
70+
)
71+
}
72+
Calendar.displayName = "Calendar"
73+
74+
export { Calendar }

0 commit comments

Comments
 (0)