diff --git a/src/App.tsx b/src/App.tsx index bd149ac..3fe843b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -16,6 +16,7 @@ import SupportPage from "./components/SupportPage"; import BookingManagementPage from "./components/BookingManagementPage"; import RecurringBlockPage from "./components/RecurringBlockPage"; import NotificationsPage from "./components/NotificationsPage"; +import ProfilePage from "./components/ProfilePage"; export default function App() { const [showPassword, setShowPassword] = useState(false); @@ -57,7 +58,10 @@ export default function App() { {/* Main Content with left margin for sidebar */}
{/* Header with notifications and profile */} -
setActiveNavItem("notifications")} /> +
setActiveNavItem("notifications")} + onNavigateToProfile={() => setActiveNavItem("profile")} + /> } {activeNavItem === "support" && } {activeNavItem === "notifications" && } + {activeNavItem === "profile" && }
diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 40b7450..d7ce6f6 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -1,4 +1,4 @@ -import { Bell, User, Settings, LogOut, ChevronDown } from "lucide-react"; +import { Bell, User, LogOut, ChevronDown } from "lucide-react"; import { useState } from "react"; import { motion, AnimatePresence } from "motion/react"; import { Avatar, AvatarFallback, AvatarImage } from "./ui/avatar"; @@ -7,9 +7,10 @@ import { Badge } from "./ui/badge"; interface HeaderProps { onNavigateToNotifications?: () => void; + onNavigateToProfile?: () => void; } -export default function Header({ onNavigateToNotifications }: HeaderProps) { +export default function Header({ onNavigateToNotifications, onNavigateToProfile }: HeaderProps) { const [showNotifications, setShowNotifications] = useState(false); const [showProfileMenu, setShowProfileMenu] = useState(false); @@ -166,17 +167,14 @@ export default function Header({ onNavigateToNotifications }: HeaderProps) { -
+ +

{profileData.firstName} {profileData.lastName}

+

{profileData.role}

+ + {profileData.department} + + + + + + {/* Navigation Tabs */} + + + + + + {/* Main Content */} +
+ + {activeTab === "personal" && ( + + +
+
+ Personal Information + Update your personal details and contact information +
+ +
+
+ +
+
+ + setProfileData({...profileData, firstName: e.target.value})} + disabled={!isEditing} + className="bg-white" + /> +
+
+ + setProfileData({...profileData, lastName: e.target.value})} + disabled={!isEditing} + className="bg-white" + /> +
+
+ +
+ +
+ + setProfileData({...profileData, email: e.target.value})} + disabled={!isEditing} + className="pl-10 bg-white" + /> +
+
+ +
+ +
+ + setProfileData({...profileData, phone: e.target.value})} + disabled={!isEditing} + className="pl-10 bg-white" + /> +
+
+ +
+ +
+ + setProfileData({...profileData, location: e.target.value})} + disabled={!isEditing} + className="pl-10 bg-white" + /> +
+
+ +
+
+ + +
+
+ + +
+
+
+
+ )} + + {activeTab === "security" && ( + + + Security Settings + Manage your password and security preferences + + +
+

Change Password

+ +
+ +
+ setProfileData({...profileData, currentPassword: e.target.value})} + className="pr-10 bg-white" + placeholder="Enter current password" + /> + +
+
+ +
+ +
+ setProfileData({...profileData, newPassword: e.target.value})} + className="pr-10 bg-white" + placeholder="Enter new password" + /> + +
+
+ +
+ +
+ setProfileData({...profileData, confirmPassword: e.target.value})} + className="pr-10 bg-white" + placeholder="Confirm new password" + /> + +
+
+ + +
+ + + +
+

Security Information

+
+
+

Last Login

+

Today at 2:34 PM

+
+
+

Account Created

+

March 15, 2024

+
+
+
+
+
+ )} + + {activeTab === "notifications" && ( + + + Notification Preferences + Choose how you want to receive notifications + + +
+
+
+

Email Notifications

+

Receive notifications via email

+
+ setNotifications({...notifications, emailNotifications: checked})} + /> +
+ +
+
+

Push Notifications

+

Receive push notifications in browser

+
+ setNotifications({...notifications, pushNotifications: checked})} + /> +
+ +
+
+

Booking Alerts

+

Get notified about new bookings and changes

+
+ setNotifications({...notifications, bookingAlerts: checked})} + /> +
+ +
+
+

System Updates

+

Receive notifications about system updates

+
+ setNotifications({...notifications, systemUpdates: checked})} + /> +
+ +
+
+

Marketing Emails

+

Receive promotional emails and updates

+
+ setNotifications({...notifications, marketingEmails: checked})} + /> +
+
+ + + +
+ +
+
+
+ )} +
+
+ + + + ); +} \ No newline at end of file diff --git a/src/index.css b/src/index.css index 257706a..cdee59c 100644 --- a/src/index.css +++ b/src/index.css @@ -597,6 +597,10 @@ bottom: calc(var(--spacing) * 1); } + .bottom-3 { + bottom: calc(var(--spacing) * 3); + } + .bottom-\[7\.01\%\] { bottom: 7.01%; } @@ -753,6 +757,10 @@ display: none; } + .inline-block { + display: inline-block; + } + .inline-flex { display: inline-flex; } @@ -874,6 +882,10 @@ height: calc(var(--spacing) * 16); } + .h-20 { + height: calc(var(--spacing) * 20); + } + .h-32 { height: calc(var(--spacing) * 32); } @@ -1249,6 +1261,10 @@ gap: calc(var(--spacing) * 6); } + .gap-8 { + gap: calc(var(--spacing) * 8); + } + :where(.space-y-0 > :not(:last-child)) { --tw-space-y-reverse: 0; margin-block-start: calc(calc(var(--spacing) * 0) * var(--tw-space-y-reverse)); @@ -1685,6 +1701,10 @@ padding: calc(var(--spacing) * 1); } + .p-1\.5 { + padding: calc(var(--spacing) * 1.5); + } + .p-2 { padding: calc(var(--spacing) * 2); } @@ -1737,6 +1757,10 @@ padding-block: calc(var(--spacing) * 2); } + .py-2\.5 { + padding-block: calc(var(--spacing) * 2.5); + } + .py-3 { padding-block: calc(var(--spacing) * 3); } @@ -2764,6 +2788,22 @@ padding-left: calc(var(--spacing) * 8); } + .data-\[orientation\=horizontal\]\:h-px[data-orientation="horizontal"] { + height: 1px; + } + + .data-\[orientation\=horizontal\]\:w-full[data-orientation="horizontal"] { + width: 100%; + } + + .data-\[orientation\=vertical\]\:h-full[data-orientation="vertical"] { + height: 100%; + } + + .data-\[orientation\=vertical\]\:w-px[data-orientation="vertical"] { + width: 1px; + } + .data-\[placeholder\]\:text-muted-foreground[data-placeholder] { color: var(--muted-foreground); } @@ -2968,12 +3008,30 @@ } } + @media (width >= 64rem) { + .lg\:col-span-1 { + grid-column: span 1 / span 1; + } + } + + @media (width >= 64rem) { + .lg\:col-span-3 { + grid-column: span 3 / span 3; + } + } + @media (width >= 64rem) { .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } } + @media (width >= 64rem) { + .lg\:grid-cols-4 { + grid-template-columns: repeat(4, minmax(0, 1fr)); + } + } + .dark\:border-input:is(.dark *) { border-color: var(--input); } diff --git a/src/main.tsx b/src/main.tsx index d96f8d8..23d3462 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,6 +1,6 @@ import { createRoot } from "react-dom/client"; - import App from "./App.tsx"; + import App from "./App"; import "./index.css"; createRoot(document.getElementById("root")!).render(); diff --git a/src/styles/globals.css b/src/styles/globals.css index f91c16b..b835a3f 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -1,4 +1,3 @@ -@import "tailwindcss"; @custom-variant dark (&:is(.dark *)); :root { diff --git a/vite.config.ts b/vite.config.ts index 406fefe..bcafad4 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react-swc'; - import path from 'path'; +import * as path from 'path'; export default defineConfig({ plugins: [react()], @@ -56,7 +56,7 @@ outDir: 'build', }, server: { - port: 3000, + port: 4001, open: true, }, }); \ No newline at end of file