feat(mobile): add Home/Dashboard tab to mobile bottom nav

Prepend a Home tab (linking to /dashboard) to the bottom navigation bar
for both Manager/SuperUser and Accounts roles, giving one-tap access to
the dashboard from any mobile screen.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Hardik 2026-05-17 01:58:32 +05:30
parent 7ae1189042
commit 13b8bcd38a

View file

@ -2,18 +2,20 @@
import Link from "next/link"; import Link from "next/link";
import { usePathname } from "next/navigation"; import { usePathname } from "next/navigation";
import { CheckSquare, CreditCard, UserCircle } from "lucide-react"; import { CheckSquare, CreditCard, UserCircle, LayoutDashboard } from "lucide-react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import type { Role } from "@prisma/client"; import type { Role } from "@prisma/client";
const MANAGER_TABS = [ const MANAGER_TABS = [
{ href: "/approvals", label: "Approvals", icon: CheckSquare }, { href: "/dashboard", label: "Home", icon: LayoutDashboard },
{ href: "/profile", label: "Profile", icon: UserCircle }, { href: "/approvals", label: "Approvals", icon: CheckSquare },
{ href: "/profile", label: "Profile", icon: UserCircle },
]; ];
const ACCOUNTS_TABS = [ const ACCOUNTS_TABS = [
{ href: "/payments", label: "Payments", icon: CreditCard }, { href: "/dashboard", label: "Home", icon: LayoutDashboard },
{ href: "/profile", label: "Profile", icon: UserCircle }, { href: "/payments", label: "Payments", icon: CreditCard },
{ href: "/profile", label: "Profile", icon: UserCircle },
]; ];
function tabsForRole(role: Role) { function tabsForRole(role: Role) {