diff --git a/app/(admin)/_components/header.tsx b/app/(admin)/_components/header.tsx index a2cae72..5f8b5fd 100644 --- a/app/(admin)/_components/header.tsx +++ b/app/(admin)/_components/header.tsx @@ -4,11 +4,7 @@ import { useState } from "react"; import Link from "next/link"; import { usePathname, useRouter } from "next/navigation"; import { Button } from "@/components/ui/button"; -import { - Popover, - PopoverContent, - PopoverTrigger, -} from "@/components/ui/popover"; +import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; import { Inbox, Calendar, @@ -19,12 +15,16 @@ import { Settings, LogOut, } from "lucide-react"; +import { useAppTheme } from "@/components/ThemeProvider"; +import { ThemeToggle } from "@/components/ThemeToggle"; export function Header() { const pathname = usePathname(); const router = useRouter(); const [notificationsOpen, setNotificationsOpen] = useState(false); const [userMenuOpen, setUserMenuOpen] = useState(false); + const { theme } = useAppTheme(); + const isDark = theme === "dark"; // Mock notifications data const notifications = [ @@ -49,15 +49,15 @@ export function Header() { const unreadCount = notifications.filter((n) => !n.read).length; return ( -
+
{/* Logo */} -
- +
+
- Attune Heart + {/* Navigation Links */} @@ -67,7 +67,9 @@ export function Header() { className={`flex items-center gap-1 sm:gap-2 px-2 sm:px-3 md:px-4 py-1.5 sm:py-2 rounded-lg text-xs sm:text-sm font-medium transition-colors ${ pathname === "/admin/dashboard" ? "bg-linear-to-r from-rose-500 to-pink-600 text-white" - : "text-gray-600 hover:bg-gray-100" + : isDark + ? "text-gray-300 hover:bg-gray-800" + : "text-gray-600 hover:bg-gray-100" }`} > @@ -78,7 +80,9 @@ export function Header() { className={`flex items-center gap-1 sm:gap-2 px-2 sm:px-3 md:px-4 py-1.5 sm:py-2 rounded-lg text-xs sm:text-sm font-medium transition-colors ${ pathname === "/admin/booking" ? "bg-linear-to-r from-rose-500 to-pink-600 text-white" - : "text-gray-600 hover:bg-gray-100" + : isDark + ? "text-gray-300 hover:bg-gray-800" + : "text-gray-600 hover:bg-gray-100" }`} > @@ -88,23 +92,24 @@ export function Header() { {/* Right Side Actions */}
+ - + {/* Thumbtack Design at Top Right */}
-
-
+
+
-
-

Notifications

+
+

Notifications

{unreadCount > 0 && ( {unreadCount} new @@ -113,24 +118,28 @@ export function Header() {
{notifications.length === 0 ? ( -
- +
+

No notifications

) : ( -
+
{notifications.map((notification) => { return (

@@ -140,10 +149,10 @@ export function Header() { )}

-

+

{notification.message}

-

+

{notification.time}

@@ -153,11 +162,11 @@ export function Header() {
)}
-
+
setNotificationsOpen(false)} - className="block w-full text-center text-sm font-medium text-rose-600 hover:text-rose-700 hover:underline transition-colors" + className={`block w-full text-center text-sm font-medium hover:underline transition-colors ${isDark ? "text-rose-300 hover:text-rose-200" : "text-rose-600 hover:text-rose-700"}`} > View all notifications @@ -166,15 +175,23 @@ export function Header() { - - + {/* Thumbtack Design at Top Right */}
-
-
+
+
)} @@ -87,8 +95,8 @@ export function Notifications({
{notifications.length === 0 ? (
- -

No notifications

+ +

No notifications

) : ( notifications.map((notification) => ( @@ -97,7 +105,7 @@ export function Notifications({ className={cn( "p-4 rounded-lg border-2 transition-all", getBgColor(notification.type), - !notification.read && "ring-2 ring-offset-2 ring-rose-300" + !notification.read && (isDark ? "ring-2 ring-offset-2 ring-rose-400 ring-offset-gray-900" : "ring-2 ring-offset-2 ring-rose-300") )} >
@@ -108,13 +116,15 @@ export function Notifications({

{notification.title}

-

{notification.message}

-
+

{notification.message}

+
{notification.time}
@@ -125,7 +135,7 @@ export function Notifications({ variant="ghost" size="icon-sm" onClick={() => onMarkAsRead(notification.id)} - className="h-7 w-7" + className={`h-7 w-7 ${isDark ? "text-gray-300 hover:bg-gray-800" : ""}`} > @@ -135,7 +145,7 @@ export function Notifications({ variant="ghost" size="icon-sm" onClick={() => onDismiss(notification.id)} - className="h-7 w-7" + className={`h-7 w-7 ${isDark ? "text-gray-300 hover:bg-gray-800" : ""}`} > diff --git a/app/(admin)/_components/side-nav.tsx b/app/(admin)/_components/side-nav.tsx index 58d21e1..676080e 100644 --- a/app/(admin)/_components/side-nav.tsx +++ b/app/(admin)/_components/side-nav.tsx @@ -13,6 +13,7 @@ import { X, Heart, } from "lucide-react"; +import { useAppTheme } from "@/components/ThemeProvider"; const navItems = [ { label: "Dashboard", icon: LayoutGrid, href: "/admin/dashboard" }, @@ -23,6 +24,8 @@ export default function SideNav() { const [open, setOpen] = useState(false); const pathname = usePathname(); const router = useRouter(); + const { theme } = useAppTheme(); + const isDark = theme === "dark"; const getActiveIndex = () => { return navItems.findIndex((item) => pathname?.includes(item.href)) ?? -1; @@ -43,12 +46,12 @@ export default function SideNav() { return ( <> {/* Mobile Top Bar */} -
+
-
- +
+
- Attune Heart Therapy + Attune Heart Therapy
{loading ? (
-
+
) : filteredBookings.length === 0 ? ( -
- -

No bookings found

-

+

+ +

No bookings found

+

{searchTerm ? "Try adjusting your search terms" : "Create a new booking to get started"}

) : ( -
+
- + - - - - - - - - + {filteredBookings.map((booking) => ( - -
+ Patient + + + Status + + + Actions
-
- +
+
-
+
{booking.user.first_name} {booking.user.last_name}
-
+ -
+
{formatDate(booking.scheduled_at)}
-
+
{formatDate(booking.scheduled_at)}
-
+
{formatTime(booking.scheduled_at)}
+ @@ -282,7 +315,7 @@ export default function Booking() { {booking.payment_status} + @@ -292,7 +325,7 @@ export default function Booking() { href={booking.jitsi_room_url} target="_blank" rel="noopener noreferrer" - className="p-1.5 sm:p-2 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors" + className={`p-1.5 sm:p-2 rounded-lg transition-colors ${isDark ? "text-gray-300 hover:text-white hover:bg-gray-700" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100"}`} title="Join Meeting" >