setNotificationsOpen(false)}
className="block w-full text-center text-sm font-medium text-rose-600 hover:text-rose-700 hover:underline transition-colors"
>
@@ -181,7 +181,7 @@ export function Header() {
variant="ghost"
onClick={() => {
setUserMenuOpen(false);
- // Add settings navigation here
+ router.push("/admin/settings");
}}
className="w-full flex items-center gap-3 px-4 py-3 justify-start hover:bg-gray-50 transition-colors cursor-pointer"
>
diff --git a/app/(admin)/_components/side-nav.tsx b/app/(admin)/_components/side-nav.tsx
index 47fade1..f512a8e 100644
--- a/app/(admin)/_components/side-nav.tsx
+++ b/app/(admin)/_components/side-nav.tsx
@@ -15,8 +15,8 @@ import {
} from "lucide-react";
const navItems = [
- { label: "Dashboard", icon: LayoutGrid, href: "/dashboard" },
- { label: "Book Appointment", icon: Calendar, href: "/booking" },
+ { label: "Dashboard", icon: LayoutGrid, href: "/admin/dashboard" },
+ { label: "Book Appointment", icon: Calendar, href: "/admin/booking" },
];
export default function SideNav() {
@@ -132,16 +132,37 @@ export default function SideNav() {
{/* Bottom Actions */}
-
setOpen(false)}
- className="group flex items-center gap-2 py-2.5 pl-3 md:pl-3 pr-3 md:pr-3 transition-colors duration-200 w-[90%] md:w-[90%] ml-1 md:ml-2 cursor-pointer justify-start text-gray-600 hover:bg-gray-50 hover:text-gray-900 rounded-lg"
- >
-
-
- Settings
-
-
+
+ {pathname === "/admin/settings" && (
+
+ )}
+ setOpen(false)}
+ className={`group flex items-center gap-2 py-2.5 pl-3 md:pl-3 pr-3 md:pr-3 transition-colors duration-200 w-[90%] md:w-[90%] ml-1 md:ml-2 cursor-pointer justify-start rounded-lg ${
+ pathname === "/admin/settings"
+ ? "bg-linear-to-r from-rose-500 to-pink-600 text-white border border-rose-500 rounded-[5px] shadow-sm"
+ : "text-gray-600 hover:bg-gray-50 hover:text-gray-900"
+ }`}
+ style={pathname === "/admin/settings" ? { height: 40 } : {}}
+ >
+
+
+ Settings
+
+
+
-
-
-
- Book Appointment
-
-
+
+
+
+
+ Settings
+
+
+
+
+
+ Book Appointment
+
+
+
{loading ? (
diff --git a/app/(user)/user/settings/page.tsx b/app/(user)/user/settings/page.tsx
new file mode 100644
index 0000000..face2da
--- /dev/null
+++ b/app/(user)/user/settings/page.tsx
@@ -0,0 +1,310 @@
+"use client";
+
+import { useState } from "react";
+import { Button } from "@/components/ui/button";
+import { Input } from "@/components/ui/input";
+import { Card, CardHeader, CardTitle, CardDescription, CardContent } from "@/components/ui/card";
+import {
+ User,
+ Mail,
+ Phone,
+ Save,
+ ArrowLeft,
+ Lock,
+ Eye,
+ EyeOff,
+} from "lucide-react";
+import Link from "next/link";
+import { Navbar } from "@/components/Navbar";
+
+export default function SettingsPage() {
+ const [loading, setLoading] = useState(false);
+ const [formData, setFormData] = useState({
+ fullName: "John Doe",
+ email: "john.doe@example.com",
+ phone: "+1 (555) 123-4567",
+ });
+ const [passwordData, setPasswordData] = useState({
+ currentPassword: "",
+ newPassword: "",
+ confirmPassword: "",
+ });
+ const [showPasswords, setShowPasswords] = useState({
+ current: false,
+ new: false,
+ confirm: false,
+ });
+
+ const handleInputChange = (field: string, value: string) => {
+ setFormData((prev) => ({
+ ...prev,
+ [field]: value,
+ }));
+ };
+
+ const handlePasswordChange = (field: string, value: string) => {
+ setPasswordData((prev) => ({
+ ...prev,
+ [field]: value,
+ }));
+ };
+
+ const togglePasswordVisibility = (field: "current" | "new" | "confirm") => {
+ setShowPasswords((prev) => ({
+ ...prev,
+ [field]: !prev[field],
+ }));
+ };
+
+ const handleSave = async () => {
+ setLoading(true);
+ // Simulate API call
+ await new Promise((resolve) => setTimeout(resolve, 1000));
+ setLoading(false);
+ // In a real app, you would show a success message here
+ };
+
+ const handlePasswordSave = async () => {
+ if (passwordData.newPassword !== passwordData.confirmPassword) {
+ // In a real app, you would show an error message here
+ alert("New passwords do not match");
+ return;
+ }
+ if (passwordData.newPassword.length < 8) {
+ // In a real app, you would show an error message here
+ alert("Password must be at least 8 characters long");
+ return;
+ }
+ setLoading(true);
+ // Simulate API call
+ await new Promise((resolve) => setTimeout(resolve, 1000));
+ setLoading(false);
+ // Reset password fields
+ setPasswordData({
+ currentPassword: "",
+ newPassword: "",
+ confirmPassword: "",
+ });
+ // In a real app, you would show a success message here
+ };
+
+ return (
+