diff --git a/app/mobile/layout.tsx b/app/mobile/layout.tsx index 72cf233..1e5a4fe 100644 --- a/app/mobile/layout.tsx +++ b/app/mobile/layout.tsx @@ -2,7 +2,7 @@ import Link from 'next/link'; import { usePathname } from 'next/navigation'; -import { LayoutDashboard, Ticket, DollarSign } from 'lucide-react'; +import { LayoutDashboard, Ticket, DollarSign, Menu } from 'lucide-react'; const NAV = [ { href: '/mobile/dashboard', label: 'Dashboard', icon: LayoutDashboard }, @@ -17,8 +17,10 @@ export default function MobileLayout({ children }: { children: React.ReactNode }
{/* Top bar */}
- Pulse - Wulf Consulting + Pulse + + +
{/* Page content */} diff --git a/app/mobile/nav/page.tsx b/app/mobile/nav/page.tsx new file mode 100644 index 0000000..7a70dc5 --- /dev/null +++ b/app/mobile/nav/page.tsx @@ -0,0 +1,91 @@ +'use client'; + +import Link from 'next/link'; +import { useRouter } from 'next/navigation'; +import { + LayoutDashboard, Ticket, DollarSign, ArrowLeft, + ExternalLink, Settings, LogOut, ChevronRight, + FileText, Server, HardDrive, Users, BarChart3, +} from 'lucide-react'; +import { signOut } from '@/lib/auth-client'; + +const MAIN_SECTIONS = [ + { href: '/mobile/dashboard', label: 'Dashboard', icon: LayoutDashboard, description: 'Overview & stats', color: 'bg-blue-500/10 text-blue-600 dark:text-blue-400' }, + { href: '/mobile/tickets', label: 'Tickets', icon: Ticket, description: 'Open service tickets', color: 'bg-emerald-500/10 text-emerald-600 dark:text-emerald-400' }, + { href: '/mobile/finance', label: 'Finance', icon: DollarSign, description: 'AR, invoices & payments', color: 'bg-violet-500/10 text-violet-600 dark:text-violet-400' }, +]; + +const DESKTOP_LINKS = [ + { href: '/quotes', label: 'Quotes', icon: FileText }, + { href: '/configuration-items', label: 'Configuration Items', icon: Server }, + { href: '/backup-status', label: 'Backup Status', icon: HardDrive }, + { href: '/engagement', label: 'Engagement', icon: Users }, + { href: '/admin/ticket-digest', label: 'Ticket Digest', icon: BarChart3 }, + { href: '/admin/sync', label: 'Admin / Sync', icon: Settings }, +]; + +export default function MobileNav() { + const router = useRouter(); + + return ( +
+ {/* Header */} +
+ +

Navigation

+
+ + {/* Main mobile sections */} +
+

Mobile Views

+
+ {MAIN_SECTIONS.map(({ href, label, icon: Icon, description, color }) => ( + +
+ +
+
+

{label}

+

{description}

+
+ + + ))} +
+
+ + {/* Desktop links */} +
+

Full Site

+
+ {DESKTOP_LINKS.map(({ href, label, icon: Icon }) => ( + + + {label} + + + ))} +
+
+ + {/* Sign out */} +
+ +
+
+ ); +} diff --git a/components/navigation/app-navigation.tsx b/components/navigation/app-navigation.tsx index 18bd85b..a86eca1 100644 --- a/components/navigation/app-navigation.tsx +++ b/components/navigation/app-navigation.tsx @@ -195,6 +195,9 @@ export function AppNavigation() { const userRole = (session?.user as any)?.role || 'user'; const isSuperAdmin = userRole === 'super-admin'; + // Mobile routes have their own nav — suppress desktop header + if (pathname.startsWith('/mobile')) return null; + const isActive = (href?: string) => { if (!href) return false; return pathname === href || pathname.startsWith(href + '/');