# Hrm

A shadcn/ui block from the [@watermelon](https://ui.watermelon.sh) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/watermelon/hrm).

- Page, with a live preview: https://shadcn.exchange/r/watermelon/hrm
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/watermelon/hrm-light-9da146403e68c591.png
- Registry item: https://registry.watermelon.sh/r/hrm.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://registry.watermelon.sh/r/hrm.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- npm packages: `@radix-ui/react-avatar`, `@radix-ui/react-collapsible`, `@radix-ui/react-dialog`, `@radix-ui/react-dropdown-menu`, `@radix-ui/react-scroll-area`, `@radix-ui/react-select`, `@radix-ui/react-separator`, `@radix-ui/react-slot`, `@radix-ui/react-tabs`, `@radix-ui/react-tooltip`, `class-variance-authority`, `lucide-react`, `next-themes`, `recharts`
- Registry items: `avatar`, `badge`, `button`, `card`, `chart`, `collapsible`, `dropdown-menu`, `input`, `label`, `popover`, `scroll-area`, `select`, `separator`, `sheet`, `sidebar`, `skeleton`, `table`, `tabs`, `tooltip`, `utils`

## Files

### `src/components/dashboards/hrm/components/app-sidebar.tsx`

```tsx
"use client";

import {
  Home,
  Users,
  Building2,
  FolderKanban,
  SunMoon,
  Calendar,
  Clock,
  UserSearch,
  FileUser,
  MessageSquare,
  Wallet,
  BarChart3,
  Link2,
  CalendarClock,
  GraduationCap,
  TrendingUp,
  Receipt,
  FileText,
  Settings,
  HelpCircle,
  ChevronDown,
  Star,
  Bell,
  Headphones,
  X,
} from "lucide-react";

import { cn } from "@/lib/utils";
import { Button } from "@/components/ui/button";
import {
  Collapsible,
  CollapsibleContent,
  CollapsibleTrigger,
} from "@/components/ui/collapsible";
import {
  Tooltip,
  TooltipContent,
  TooltipTrigger,
} from "@/components/ui/tooltip";
import { useTheme } from "next-themes";

interface NavItem {
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  icon: any;
  label: string;
  href: string;
  isActive?: boolean;
  isDisabled?: boolean;
  bgColor?: string;
}

const mainNavItems: NavItem[] = [
  { icon: Home, label: "Dashboard", href: "/dashboard" },
  { icon: Users, label: "Employees", href: "#", isDisabled: true },
  { icon: Building2, label: "Clients", href: "#", isDisabled: true },
  { icon: FolderKanban, label: "Projects", href: "#", isDisabled: true },
];

const workforceItems: NavItem[] = [
  { icon: Calendar, label: "Calendrer", href: "#", isDisabled: true },
  { icon: Clock, label: "Attendance", href: "#", isDisabled: true },
  { icon: UserSearch, label: "Interviews", href: "#", isDisabled: true },
  { icon: FileUser, label: "Job & Applications", href: "#", isDisabled: true },
];

const communicationItems: NavItem[] = [
  { icon: MessageSquare, label: "Chat Hub", href: "#", isDisabled: true },
  { icon: Wallet, label: "Payroll & Finance", href: "#", isDisabled: true },
  { icon: BarChart3, label: "Reports & Analytics", href: "#", isDisabled: true },
  { icon: Link2, label: "Integrations", href: "#", isDisabled: true },
];

const projectItems: NavItem[] = [
  {
    icon: CalendarClock,
    label: "Shift Planner",
    href: "#",
    bgColor: "bg-orange-500",
    isDisabled: true,
  },
  {
    icon: GraduationCap,
    label: "Training Portal",
    href: "#",
    bgColor: "bg-purple-500",
    isDisabled: true,
  },
  {
    icon: TrendingUp,
    label: "Performance Hub",
    href: "#",
    bgColor: "bg-emerald-500",
    isDisabled: true,
  },
  { icon: Receipt, label: "Expense Claims", href: "#", bgColor: "bg-blue-500", isDisabled: true },
];

const adminItems: NavItem[] = [
  { icon: FileText, label: "Documents", href: "#", isDisabled: true },
  { icon: Settings, label: "Settings", href: "#", isDisabled: true },
  { icon: HelpCircle, label: "Help & Center", href: "#", isDisabled: true },
];

const iconRailItems = [
  { icon: Home, label: "Home" },
  { icon: FolderKanban, label: "Projects" },
  { icon: Bell, label: "Notifications" },
  { icon: MessageSquare, label: "Chat" },
];

const secondaryIconItems = [
  { icon: Headphones, label: "Support" },
  { icon: Settings, label: "Settings" },
  { icon: SunMoon, label: "Toggle Theme", isThemeToggle: true },
];

// Icon Rail - Panel 1 (Always visible, with toggle rail on right edge)
export function IconRail({
  onToggle,
}: {
  onToggle: () => void;
  isExpanded: boolean;
}) {

  return (
    <div className="relative flex h-full w-[60px] flex-col items-center border-r border-sidebar-border bg-sidebar py-4">
      {/* Logo */}
      <div className="mb-6">
        <div className="flex size-8 items-center justify-center rounded-lg bg-gradient-to-br from-violet-600 to-indigo-600 text-white shadow-lg border-b-2 border-neutral-400">
          <svg
            xmlns="http://www.w3.org/2000/svg"
            viewBox="0 0 24 24"
            fill="none"
            stroke="currentColor"
            strokeWidth="2"
            strokeLinecap="round"
            strokeLinejoin="round"
            className="size-4"
          >
            <path d="M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3" />
          </svg>
        </div>
      </div>

      {/* Navigation Icons */}
      <div className="flex flex-col items-center gap-1 pb-1">
        {iconRailItems.map((item) => (
          <Tooltip key={item.label}>
            <TooltipTrigger asChild>
              <Button
                variant="ghost"
                size="icon"
                className="size-10 text-neutral-500 hover:text-foreground hover:bg-muted transition-colors duration-300 cursor-pointer"
                asChild
              >
                <a href="#" onClick={(e) => e.preventDefault()}>
                  <item.icon className="size-4" />
                  <span className="sr-only">{item.label}</span>
                </a>
              </Button>
            </TooltipTrigger>
            <TooltipContent side="right">{item.label}</TooltipContent>
          </Tooltip>
        ))}
      </div>

      <div className="flex flex-col items-center gap-1 border-t border-sidebar-border py-1">
        {secondaryIconItems.map((item) => (
          <ThemeIconButton key={item.label} item={item} />
        ))}
      </div>

      <button
        onClick={onToggle}
        className="absolute inset-y-0 -right-2 w-4 cursor-e-resize hover:after:bg-sidebar-border after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] after:transition-colors z-20"
        title="Toggle Sidebar"
        aria-label="Toggle Sidebar"
      />
    </div>
  );
}

export function SecondarySidebar({
  isOpen,
  onToggle,
  onNavigate,
  currentView
}: {
  isOpen: boolean;
  onToggle: () => void;
  onNavigate?: (view: string) => void;
  currentView?: string;
}) {
  return (
    <div
      className={cn(
        "h-full flex-shrink-0 border-r border-sidebar-border bg-sidebar overflow-hidden transition-all duration-300 ease-in-out",
        isOpen ? "w-[240px]" : "w-0"
      )}
    >
      <div className="flex h-full w-[240px] flex-col">
        {/* Header */}
        <div className="h-14 border-b border-sidebar-border flex items-center justify-center p-1.5">
          <div className="w-full flex items-center gap-2 rounded-md p-1 bg-muted/60 border border-sidebar-border">
            <img
              src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?q=80&w=1480&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
              alt="Logo"
              className="size-7 rounded"
            />
            <div className="flex-1 text-left text-sm leading-tight">
              <div className="truncate font-medium text-foreground">GR8R HRM</div>
              <div className="truncate text-xs text-muted-foreground/60">Admin</div>
            </div>
            <Button
              variant="ghost"
              size="icon"
              className="size-8 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors duration-300 cursor-pointer"
              onClick={onToggle}
            >
              <X className="size-4" />
              <span className="sr-only">Close sidebar</span>
            </Button>
          </div>
        </div>

        <div className="flex-1 overflow-auto p-2 no-scrollbar">

          {/* Main Nav */}
          <div className="space-y-1 mb-4">
            {mainNavItems.map((item) => (
              <a
                key={item.label}
                href={item.href}
                onClick={(e) => {
                  if (item.isDisabled) {
                    e.preventDefault();
                    return;
                  }
                  if (onNavigate) {
                    e.preventDefault();
                    onNavigate(item.label);
                  }
                }}
                className={cn(
                  "flex items-center gap-2 rounded-md px-2.5 py-2 text-sm transition-colors duration-300 cursor-pointer",
                  (currentView ? currentView === item.label : item.isActive)
                    ? "bg-sidebar-primary text-sidebar-primary-foreground font-medium"
                    : "text-muted-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"
                )}
              >
                <item.icon className="size-4" />
                <span>{item.label}</span>
              </a>
            ))}
          </div>

          <div className="h-px bg-sidebar-border mb-3" />


          <CollapsibleSection title="Workforce" items={workforceItems} onNavigate={onNavigate} />

          <div className="h-px bg-sidebar-border mb-3" />

          <CollapsibleSection
            title="Communication"
            items={communicationItems}
            onNavigate={onNavigate}
          />

          <div className="h-px bg-sidebar-border mb-3" />

          <Collapsible defaultOpen className="group/collapsible mb-2">
            <CollapsibleTrigger className="flex w-full items-center justify-between px-2 py-1 text-sm tracking-tight text-sidebar-foreground/30">
              Projects
              <ChevronDown className="size-3 transition-transform group-data-[state=open]/collapsible:rotate-180" />
            </CollapsibleTrigger>
            <CollapsibleContent className="space-y-1 mt-1">
              {projectItems.map((item) => (
                <a
                  key={item.label}
                  href={item.href}
                  onClick={(e) => {
                    if (item.isDisabled) {
                      e.preventDefault();
                      return;
                    }
                  }}
                  className="flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors duration-300 cursor-pointer
                    text-sidebar-foreground/50 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"
                >
                  <div
                    className={cn(
                      "size-4 rounded flex items-center justify-center",
                      item.bgColor
                    )}
                  >
                    <item.icon className="size-2.5 text-white" />
                  </div>
                  <span>{item.label}</span>
                  <Star className="ml-auto size-3.5 fill-neutral-100" />
                </a>
              ))}
            </CollapsibleContent>
          </Collapsible>
          <div className="h-px bg-sidebar-border mb-3" />

          <CollapsibleSection title="Administration" items={adminItems} onNavigate={onNavigate} />
        </div>
      </div>
    </div>
  );
}

function ThemeIconButton({ item }: { item: typeof secondaryIconItems[0] }) {
  const { setTheme, theme } = useTheme();

  if (item.isThemeToggle) {
    return (
      <Tooltip key={item.label}>
        <TooltipTrigger asChild>
          <Button
            variant="ghost"
            size="icon"
            className="size-10 text-neutral-500 hover:text-foreground hover:bg-muted transition-colors duration-300 cursor-pointer"
            onClick={() => setTheme(theme === "dark" ? "light" : "dark")}
          >
            <item.icon className="size-4" />
            <span className="sr-only">{item.label}</span>
          </Button>
        </TooltipTrigger>
        <TooltipContent side="right">{item.label}</TooltipContent>
      </Tooltip>
    );
  }

  return (
    <Tooltip key={item.label}>
      <TooltipTrigger asChild>
        <Button
          variant="ghost"
          size="icon"
          className="size-10 text-neutral-500 hover:text-foreground hover:bg-muted transition-colors duration-300 cursor-pointer"
          asChild
        >
          <a href="#" onClick={(e) => e.preventDefault()}>
            <item.icon className="size-4" />
            <span className="sr-only">{item.label}</span>
          </a>
        </Button>
      </TooltipTrigger>
      <TooltipContent side="right">{item.label}</TooltipContent>
    </Tooltip>
  );
}

function CollapsibleSection({
  title,
  items,
  onNavigate,
}: {
  title: string;
  items: NavItem[];
  onNavigate?: (view: string) => void;
}) {
  return (
    <Collapsible defaultOpen className="group/collapsible mb-2">
      <CollapsibleTrigger className="flex w-full items-center justify-between px-2 py-1 text-sm tracking-tight  text-sidebar-foreground/35">
        {title}
        <ChevronDown className="size-3 transition-transform group-data-[state=open]/collapsible:rotate-180" />
      </CollapsibleTrigger>
      <CollapsibleContent className="space-y-1 mt-1">
        {items.map((item) => (
          <a
            key={item.label}
            href={item.href}
            onClick={(e) => {
              if (item.isDisabled) {
                e.preventDefault();
                return;
              }
              if (onNavigate) {
                e.preventDefault();
                onNavigate(item.label);
              }
            }}
            className="flex items-center gap-1.5 rounded-md px-2 pl-3 py-1.5 text-sm transition-colors duration-300 cursor-pointer
              text-sidebar-foreground/55 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"
          >
            <item.icon className="size-4" />
            <span>{item.label}</span>
          </a>
        ))}
      </CollapsibleContent>
    </Collapsible>
  );
}
```

### `src/components/dashboards/hrm/components/employee-table.tsx`

```tsx
"use client";

import { cn } from "@/lib/utils";
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
import { Badge } from "@/components/ui/badge";
import {
  Table,
  TableBody,
  TableCell,
  TableHead,
  TableHeader,
  TableRow,
} from "@/components/ui/table";
import { type Employee } from "../data";

interface EmployeeTableProps {
  employees: Employee[];
  selectedId?: string;
}

const statusStyles: Record<Employee["status"], string> = {
  Active: "bg-emerald-500/10 text-emerald-500 hover:bg-emerald-500/10",
  "On Leave": "bg-amber-500/10 text-amber-500 hover:bg-amber-500/10",
  Absent: "bg-rose-500/10 text-rose-500 hover:bg-rose-500/10",
};

export function EmployeeTable({ employees }: EmployeeTableProps) {
  return (
    <div className="relative overflow-x-auto no-scrollbar">
      <div className="relative min-w-max px-0.5">
        <div className="absolute inset-x-0 top-0 h-10 border rounded-md bg-muted/30 border-border pointer-events-none"></div>
        <Table>
          <TableHeader>
            <TableRow className="hover:bg-transparent border-none">
              <TableHead className="w-[80px] text-muted-foreground font-medium border-r pl-3">#ID</TableHead>
              <TableHead className="text-muted-foreground font-medium border-r ">Name</TableHead>
              <TableHead className="text-muted-foreground font-medium border-r">Email</TableHead>
              <TableHead className="text-muted-foreground font-medium border-r">Department</TableHead>
              <TableHead className="text-muted-foreground font-medium border-r">Position</TableHead>
              <TableHead className="text-muted-foreground font-medium border-r">Join Date</TableHead>
              <TableHead className="text-right text-muted-foreground font-medium pr-3">Status</TableHead>
            </TableRow>
          </TableHeader>
          <TableBody >
            {employees.map((employee) => (
              <TableRow
                key={employee.id}
                className={cn(
                  "hover:bg-muted/60 cursor-pointer transition-colors duration-300 border-none text-muted-foreground hover:text-foreground",
                )}
              >
                <TableCell className="font-medium  pl-2 py-2">
                  {employee.id}
                </TableCell>
                <TableCell>
                  <div className="flex items-center gap-3 py-1">
                    <Avatar className="size-6">
                      <AvatarImage src={`https://api.dicebear.com/7.x/avataaars/svg?seed=${employee.name}`} alt={employee.name} />
                      <AvatarFallback className="bg-muted text-xs">
                        {employee.avatar}
                      </AvatarFallback>
                    </Avatar>
                    <span className="font-medium text-muted-foreground group-hover:text-foreground">{employee.name}</span>
                  </div>
                </TableCell>
                <TableCell className="">{employee.email}</TableCell>
                <TableCell className="">{employee.department}</TableCell>
                <TableCell className="">{employee.position}</TableCell>
                <TableCell className="">{employee.joinDate}</TableCell>
                <TableCell className="text-right">
                  <Badge
                    variant="secondary"
                    className={cn(
                      "font-medium border-0",
                      statusStyles[employee.status]
                    )}
                  >
                    {employee.status}
                  </Badge>
                </TableCell>
              </TableRow>
            ))}
          </TableBody>
        </Table>
      </div>
    </div>
  );
}
```

### `src/components/dashboards/hrm/dashboardLayout.tsx`

```tsx
import { IconRail, SecondarySidebar } from "./components/app-sidebar"
import { TooltipProvider } from "@/components/ui/tooltip";
import { Button } from "@/components/ui/button";
import { Sheet, SheetContent, SheetTrigger, SheetTitle } from "@/components/ui/sheet";
import {
  DropdownMenu,
  DropdownMenuContent,
  DropdownMenuItem,
  DropdownMenuLabel,
  DropdownMenuSeparator,
  DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { Menu, User, Settings, LogOut } from "lucide-react";
import { useState } from "react";

export const DashboardLayout = ({
  children,
  onNavigate,
  currentView
}: {
  children: React.ReactNode;
  onNavigate?: (view: string) => void;
  currentView?: string
}) => {
  const [sidebarOpen, setSidebarOpen] = useState(true);
  const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);

  const handleNavigate = (view: string) => {
    setIsMobileMenuOpen(false);
    if (onNavigate) {
      onNavigate(view);
    }
  };

  return (
    <TooltipProvider delayDuration={0}>
      <div className="flex h-screen overflow-hidden bg-background">
        {/* Desktop Sidebar */}
        <div className="hidden lg:flex h-full shrink-0">
          <IconRail
            onToggle={() => setSidebarOpen(!sidebarOpen)}
            isExpanded={sidebarOpen}
          />

          <SecondarySidebar
            isOpen={sidebarOpen}
            onToggle={() => setSidebarOpen(!sidebarOpen)}
            onNavigate={handleNavigate}
            currentView={currentView}
          />
        </div>

        <div className="flex-1 flex flex-col overflow-hidden">
          <header className="flex h-14 shrink-0 items-center justify-between gap-2 border-b border-border px-4 lg:px-6">
            <div className="flex items-center gap-2 text-sm text-muted-foreground">
              {/* Mobile Navigation Trigger */}
              <Sheet open={isMobileMenuOpen} onOpenChange={setIsMobileMenuOpen}>
                <SheetTrigger asChild>
                  <Button variant="ghost" size="icon" className="lg:hidden -ml-2">
                    <Menu className="size-5" />
                    <span className="sr-only">Toggle Menu</span>
                  </Button>
                </SheetTrigger>
                <SheetContent side="left" className="p-0 w-fit flex flex-row gap-0 h-full border-none bg-transparent no-scrollbar [&>button]:hidden">
                  <SheetTitle className="sr-only">Navigation Menu</SheetTitle>
                  <IconRail onToggle={() => setIsMobileMenuOpen(false)} isExpanded={true} />
                  <SecondarySidebar
                    isOpen={true}
                    onToggle={() => setIsMobileMenuOpen(false)}
                    onNavigate={handleNavigate}
                    currentView={currentView}
                  />
                </SheetContent>
              </Sheet>
              <span>{currentView || "Dashboard"}</span>
            </div>
            <DropdownMenu>
              <DropdownMenuTrigger asChild>
                <button className="rounded-full outline-none p-1 hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 transition-all active:scale-95 duration-200">
                  <img
                    src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?q=80&w=1480&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
                    alt="User"
                    className="size-7 rounded-full object-cover shadow-sm"
                  />
                </button>
              </DropdownMenuTrigger>
              <DropdownMenuContent align="end" className="w-56 mt-1.5 rounded-xl border-sidebar-border bg-sidebar text-sidebar-foreground shadow-lg">
                <DropdownMenuLabel className="font-normal flex p-3 gap-3 pb-2">
                  <div className="flex items-center gap-2 overflow-hidden">
                    <img
                      src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?q=80&w=1480&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
                      alt="User"
                      className="size-8 rounded-lg object-cover"
                    />
                    <div className="grid flex-1 text-left text-sm leading-tight">
                      <span className="truncate font-semibold text-foreground">Admin User</span>
                      <span className="truncate text-xs text-muted-foreground">admin@gr8r.io</span>
                    </div>
                  </div>
                </DropdownMenuLabel>
                <DropdownMenuSeparator className="bg-sidebar-border" />
                <div className="p-1">
                  <DropdownMenuItem className="gap-2 cursor-pointer rounded-md focus:bg-sidebar-accent focus:text-sidebar-accent-foreground py-2 text-sm">
                    <User className="size-4 text-muted-foreground" />
                    <span>My Profile</span>
                  </DropdownMenuItem>
                  <DropdownMenuItem className="gap-2 cursor-pointer rounded-md focus:bg-sidebar-accent focus:text-sidebar-accent-foreground py-2 text-sm">
                    <Settings className="size-4 text-muted-foreground" />
                    <span>Account Settings</span>
                  </DropdownMenuItem>
                </div>
                <DropdownMenuSeparator className="bg-sidebar-border" />
                <div className="p-1">
                  <DropdownMenuItem className="gap-2 cursor-pointer text-red-500 rounded-md focus:bg-red-500/10 focus:text-red-500 py-2 text-sm">
                    <LogOut className="size-4" />
                    <span>Log out</span>
                  </DropdownMenuItem>
                </div>
              </DropdownMenuContent>
            </DropdownMenu>
          </header>

          <main className="flex-1 overflow-auto bg-background">
            {children}
          </main>
        </div>
      </div>
    </TooltipProvider>
  )
}
```

### `src/components/dashboards/hrm/dashboardView.tsx`

```tsx
"use client";

import {
  Users,
  Calendar,
  BriefcaseBusiness,
  Info,
  ScanFace,
} from "lucide-react";
import {
  ChartContainer,
  ChartTooltip,
  ChartTooltipContent,
} from "@/components/ui/chart";
import {
  Area,
  AreaChart,
  XAxis,
  YAxis,
  CartesianGrid,
  PieChart,
  Pie,
  Cell,
  Label as RechartsLabel,
} from "recharts";
import { Filter, List, LayoutGrid } from "lucide-react";
import { Button } from "@/components/ui/button";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { EmployeeTable } from "./components/employee-table";
import {
  employees,
  dashboardCards,
  attendanceData,
  attendanceChartConfig,
  workingFormatData,
  jobOverviewData,
  jobChartConfig,
  totalJobs
} from "./data";

import {
  Select,
  SelectContent,
  SelectItem,
  SelectTrigger,
  SelectValue,
} from "@/components/ui/select";
import {
  Popover,
  PopoverContent,
  PopoverTrigger,
} from "@/components/ui/popover";
import { Label } from "@/components/ui/label";
import { Input } from "@/components/ui/input";

export const DashboardView = () => {
  return (
    <div className="min-h-full w-full p-6">
      <div className="mb-6">
        <h1 className="text-2xl tracking-tight text-foreground mb-1">
          Welcome To, GR8R HRM!
        </h1>
        <p className="text-sm text-muted-foreground/40">
          Manage candidate and track application
        </p>
      </div>

      <div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-4">
        {dashboardCards.map((card) => {
          const IconComponent = card.icon;
          return (
            <div
              key={card.id}
              className="bg-card border rounded-lg border-border p-3 flex flex-col transition-colors duration-300 hover:bg-muted/50 cursor-pointer group shadow-none"
            >
              <div className="flex items-start justify-between mb-1">
                <p className="text-xs text-muted-foreground font-medium tracking">
                  {card.title}
                </p>
                <div className={`bg-muted p-1 rounded`}>
                  <IconComponent className={`size-3 ${card.iconColor}`} />
                </div>
              </div>
              <p className="text-2xl font-medium text-foreground mb-3">
                {card.value}
              </p>
              <div className="flex items-center justify-between">
                <p className="text-xs text-neutral-500 font-medium">
                  {card.subtitle}
                </p>
                <div className="size-5 border-[1.5px] border-dashed rounded-full border-neutral-500" />
              </div>
            </div>
          );
        })}
      </div>

      {/* Charts Section */}
      <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mt-6">
        {/* Attendance Overview Chart */}
        <div className="col-span-1 md:col-span-2 lg:col-span-2 bg-card border rounded-lg border-border p-4 transition-colors duration-300 shadow-none">
          <div className="flex flex-col md:flex-row md:items-center justify-between gap-4 mb-4 border-b-[1.5px] border-border border-dashed pb-4">
            <div className="flex items-center gap-2">
              <div className="bg-muted p-1 rounded">
                <Calendar className="size-4 text-orange-400" />
              </div>
              <h3 className="text-sm font-medium text-foreground">
                Attendance Overview
              </h3>
            </div>
            <Tabs defaultValue="7days" className="w-fit">
              <TabsList className="bg-neutral-300/10 border border-neutral-300/20 rounded-md p-1 h-9 items-center gap-1">
                <TabsTrigger
                  value="7days"
                  className="px-3 text-xs data-[state=active]:bg-white dark:data-[state=active]:bg-neutral-900 h-7 transition-colors duration-300 hover:bg-neutral-200/50 dark:hover:bg-neutral-700/50 dark:hover:text-foreground cursor-pointer"
                >
                  Last 7 days
                </TabsTrigger>
                <TabsTrigger
                  value="30days"
                  className="px-3 text-xs data-[state=active]:bg-white dark:data-[state=active]:bg-neutral-900 h-7 transition-colors duration-300 hover:bg-neutral-200/50 dark:hover:bg-neutral-700/50 dark:hover:text-foreground cursor-pointer"
                >
                  Last 30 days
                </TabsTrigger>
                <TabsTrigger
                  value="year"
                  className="px-3 text-xs data-[state=active]:bg-white dark:data-[state=active]:bg-neutral-900 h-7 transition-colors duration-300 hover:bg-neutral-200/50 dark:hover:bg-neutral-700/50 dark:hover:text-foreground cursor-pointer"
                >
                  Last Year
                </TabsTrigger>
              </TabsList>
            </Tabs>
          </div>

          <ChartContainer
            config={attendanceChartConfig}
            className="h-[270px] w-full"
          >
            <AreaChart
              data={attendanceData}
              margin={{ top: 10, right: 10, left: 0, bottom: 0 }}
            >
              <defs>
                <linearGradient
                  id="attendanceGradient"
                  x1="0"
                  y1="0"
                  x2="0"
                  y2="1"
                >
                  <stop offset="0%" stopColor="var(--chart-2)" stopOpacity={0.3} />
                  <stop offset="100%" stopColor="var(--chart-2)" stopOpacity={0} />
                </linearGradient>
              </defs>
              <CartesianGrid
                strokeDasharray="3 3"
                stroke="var(--border)"
                vertical={true}
                horizontal={false}
              />
              <XAxis
                dataKey="day"
                axisLine={false}
                tickLine={false}
                tick={{ fill: "#6b7280", fontSize: 12 }}
                dy={5}
                tickMargin={8}
              />
              <YAxis
                axisLine={false}
                tickLine={false}
                tick={{ fill: "#6b7280", fontSize: 12 }}
                tickFormatter={(value) => `${value}%`}
                domain={[0, 100]}
                dx={-10}
              />
              <ChartTooltip
                content={
                  <ChartTooltipContent
                    formatter={(_, name) => {
                      if (name === "attendance") {
                        return (
                          <div className="flex flex-col gap-1">
                            <div className="flex justify-between gap-4">
                              <span>Present:</span>
                              <span className="font-medium">180</span>
                            </div>
                            <div className="flex justify-between gap-4">
                              <span>Absent:</span>
                              <span className="font-medium">40</span>
                            </div>
                            <div className="flex justify-between gap-4">
                              <span>On Leave:</span>
                              <span className="font-medium">08</span>
                            </div>
                          </div>
                        );
                      }
                      return null;
                    }}
                  />
                }
              />
              <Area
                type="monotone"
                dataKey="lateArrival"
                stroke="var(--muted-foreground)"
                strokeOpacity={0.3}
                strokeDasharray="5 5"
                fill="transparent"
                strokeWidth={2}
              />
              <Area
                type="monotone"
                dataKey="attendance"
                stroke="var(--chart-2)"
                fill="url(#attendanceGradient)"
                strokeWidth={2}
              />
            </AreaChart>
          </ChartContainer>

          {/* Legend and Footer */}
          <div className="flex flex-col md:flex-row md:items-center justify-between gap-4 mt-6 border-t-[1.5px] border-border border-dashed pt-4">
            <div className="flex max-md:justify-between items-center gap-4">
              <div className="flex items-center gap-2">
                <div className="w-3 h-3 bg-chart-2 rounded-sm" />
                <span className="text-xs text-muted-foreground">Attendance</span>
              </div>
              <div className="flex items-center gap-2">
                <div className="w-3 h-3 bg-muted-foreground/30 rounded-sm" />
                <span className="text-xs text-muted-foreground">Late arrival</span>
              </div>
            </div>
            <div className="flex items-center gap-1 text-xs text-muted-foreground">
              <Info className="size-4" />
              <span>78% </span>
              <span className="text-muted-foreground/60"> Attendance Today</span>
            </div>
          </div>
        </div>

        {/* Right Side Charts */}
        <div className="col-span-1 md:col-span-2 lg:col-span-1 flex flex-col md:flex-row lg:flex-col gap-4">
          {/* Working Format */}
          <div className="flex-1 bg-card border rounded-lg border-border p-4 transition-colors duration-300 hover:bg-muted/50 cursor-pointer group shadow-none">
            <div className="flex items-center gap-2 mb-4 border-b-[1.5px] border-border border-dashed pb-4">
              <div className="bg-muted p-1 rounded">
                <Users className="size-4 text-blue-400" />
              </div>
              <h3 className="text-sm font-medium text-foreground">Working Format</h3>
            </div>

            <div className="flex items-center gap-2 mb-3">
              <span className="text-xs text-muted-foreground">TOTAL EMPLOYEES</span>
              <span className="text-lg font-semibold text-foreground">
                {workingFormatData.total}
              </span>
            </div>

            {/* Progress Bar */}
            <div className="w-full h-3 bg-muted rounded-full overflow-hidden flex">
              <div
                className="h-full bg-blue-500"
                style={{ width: `${workingFormatData.onSite.percentage}%` }}
              />
              <div
                className="h-full bg-purple-500"
                style={{ width: `${workingFormatData.hybrid.percentage}%` }}
              />
              <div
                className="h-full bg-cyan-500"
                style={{ width: `${workingFormatData.remote.percentage}%` }}
              />
            </div>

            {/* Legend */}
            <div className="flex items-center gap-4 mt-5 border-t-[1.5px] border-border border-dashed pt-3">
              <div className="flex items-center gap-2">
                <div className="w-2 h-2 bg-blue-500 rounded-full" />
                <span className="text-xs text-muted-foreground">
                  {workingFormatData.onSite.percentage}% On Site
                </span>
              </div>
              <div className="flex items-center gap-2">
                <div className="w-2 h-2 bg-purple-500 rounded-full" />
                <span className="text-xs text-muted-foreground">
                  {workingFormatData.hybrid.percentage}% Hybrid
                </span>
              </div>
            </div>
          </div>

          {/* Job Overview */}
          <div className="flex-1 bg-card border rounded-lg border-border p-4 transition-colors duration-300 hover:bg-muted/50 cursor-pointer group shadow-none">
            <div className="flex items-center gap-2 mb-4 border-b-[1.5px] border-border border-dashed pb-3">
              <div className="bg-muted p-1 rounded">
                <BriefcaseBusiness className="size-4 text-green-400" />
              </div>
              <h3 className="text-sm font-medium text-foreground">Job Overview</h3>
            </div>

            <ChartContainer
              config={jobChartConfig}
              className="!aspect-auto h-[90px] w-full"
            >
              <PieChart>
                <Pie
                  data={jobOverviewData}
                  cx="50%"
                  cy="100%"
                  innerRadius={60}
                  outerRadius={80}
                  startAngle={180}
                  endAngle={0}
                  paddingAngle={2}
                  dataKey="value"
                >
                  {jobOverviewData.map((entry, index) => (
                    <Cell key={`cell-${index}`} fill={entry.fill} />
                  ))}
                  <RechartsLabel
                    content={({ viewBox }) => {
                      if (viewBox && "cx" in viewBox && "cy" in viewBox) {
                        return (
                          <text
                            x={viewBox.cx}
                            y={(viewBox.cy || 0) - 20}
                            textAnchor="middle"
                            dominantBaseline="middle"
                          >
                            <tspan
                              x={viewBox.cx}
                              y={(viewBox.cy || 0) - 35}
                              className="fill-foreground text-2xl font-bold"
                            >
                              {totalJobs}
                            </tspan>
                            <tspan
                              x={viewBox.cx}
                              y={(viewBox.cy || 0) - 18}
                              className="fill-muted-foreground text-[10px]"
                            >
                              TOTAL JOBS
                            </tspan>
                          </text>
                        );
                      }
                    }}
                  />
                </Pie>
              </PieChart>
            </ChartContainer>

            {/* Legend */}
            <div className="flex items-center justify-center gap-6 border-t-[1.5px] border-border border-dashed pt-3 mt-4">
              <div className="flex items-center gap-2">
                <div className="w-2 h-2 bg-amber-500 rounded-full" />
                <span className="text-xs text-muted-foreground">40 Active Jobs</span>
              </div>
              <div className="flex items-center gap-2">
                <div className="w-2 h-2 bg-blue-500 rounded-full" />
                <span className="text-xs text-muted-foreground">20 Interview</span>
              </div>
            </div>
          </div>
        </div>
      </div>

      <div className="bg-muted/40 p-4 rounded-lg border border-border mt-5 transition-colors duration-300 shadow-none">
        <div className=" flex items-center justify-between">
          {/* Left - View Tabs */}
          <Tabs defaultValue="list" className="w-full gap-4">
            <div className="flex w-full flex-col sm:flex-row items-start sm:items-center justify-between gap-4">
              <div className="flex items-center gap-2">
                <div className="bg-muted p-1.5 rounded">
                  <ScanFace className="size-4 text-orange-400" />
                </div>
                <h3 className=" font-medium text-foreground">
                  Employee Activities
                </h3>
              </div>

              <div className="flex flex-wrap items-center gap-2 max-md:justify-end">
                <TabsList className="bg-neutral-300/10 border max-md:w-full max-md:h-10 border-neutral-300/20 rounded-md h-9 p-1 gap-1">
                  <TabsTrigger
                    value="list"
                    className="gap-2 data-[state=active]:bg-white dark:data-[state=active]:bg-neutral-900 h-7 max-md:h-8 transition-colors duration-300 hover:bg-neutral-200/50 dark:hover:bg-neutral-700/50 dark:hover:text-foreground cursor-pointer"
                  >
                    <List className="size-4" />
                    List View
                  </TabsTrigger>
                  <TabsTrigger
                    value="board"
                    disabled
                    className="gap-2 data-[state=active]:bg-white dark:data-[state=active]:bg-neutral-900 h-7 max-md:h-8 transition-colors duration-300 hover:bg-neutral-200/50 dark:hover:bg-neutral-700/50 dark:hover:text-foreground cursor-pointer"
                  >
                    <LayoutGrid className="size-4" />
                    Board View
                  </TabsTrigger>
                </TabsList>
                <div className="flex items-center gap-2">
                  <Select defaultValue="pipeline-value">
                    <SelectTrigger
                      size="sm"
                      className="w-fit py-[17px] text-xs bg-muted/50 transition-colors duration-300 cursor-pointer shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:border-neutral-400 dark:focus-visible:border-neutral-600 outline-none"
                    >
                      <span className="text-muted-foreground text-xs">Status</span>
                      <SelectValue placeholder="Sort by" />
                    </SelectTrigger>
                    <SelectContent className="bg-popover border-border">
                      <SelectItem value="pipeline-value" className="cursor-pointer focus:bg-neutral-100 dark:focus:bg-neutral-800">All</SelectItem>
                      <SelectItem value="name" className="cursor-pointer focus:bg-neutral-100 dark:focus:bg-neutral-800">Active</SelectItem>
                      <SelectItem value="activity" className="cursor-pointer focus:bg-neutral-100 dark:focus:bg-neutral-800">On Leave</SelectItem>
                    </SelectContent>
                  </Select>
                  <Popover>
                    <PopoverTrigger asChild>
                      <Button variant="outline" size="icon" className="!size-9 transition-colors duration-300 cursor-pointer shadow-none">
                        <Filter className="size-4" />
                      </Button>
                    </PopoverTrigger>
                    <PopoverContent className="w-80 p-4" align="end">
                      <div className="grid gap-4">
                        <div className="space-y-2">
                          <h4 className="font-medium leading-none">Filter Employees</h4>
                          <p className="text-sm text-muted-foreground">
                            Set the properties to refine the list.
                          </p>
                        </div>
                        <div className="grid gap-3">
                          <div className="grid grid-cols-3 items-center gap-4">
                            <Label htmlFor="department">Department</Label>
                            <Select defaultValue="all">
                              <SelectTrigger id="department" className="col-span-2 h-8 focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:border-neutral-400 dark:focus-visible:border-neutral-600 outline-none shadow-none">
                                <SelectValue placeholder="Select" />
                              </SelectTrigger>
                              <SelectContent>
                                <SelectItem value="all">All Departments</SelectItem>
                                <SelectItem value="engineering">Engineering</SelectItem>
                                <SelectItem value="design">Design</SelectItem>
                                <SelectItem value="marketing">Marketing</SelectItem>
                              </SelectContent>
                            </Select>
                          </div>
                          <div className="grid grid-cols-3 items-center gap-4">
                            <Label htmlFor="search">Search</Label>
                            <Input
                              id="search"
                              placeholder="Name or Email..."
                              className="col-span-2 h-8"
                            />
                          </div>
                          <Button className="w-full mt-2" size="sm">Apply Filters</Button>
                        </div>
                      </div>
                    </PopoverContent>
                  </Popover>
                </div>
              </div>
            </div>
            <TabsContent value="list">
              <EmployeeTable employees={employees} />
            </TabsContent>
          </Tabs>
        </div>
      </div>
    </div>
  );
};
```

### `src/components/dashboards/hrm/data.ts`

```ts
import {
  Users,
  CheckCircle,
  Briefcase,
  LogIn,
  Clock,
} from "lucide-react";
import { type ChartConfig } from "@/components/ui/chart";

export interface Employee {
  id: string;
  name: string;
  email: string;
  department: string;
  position: string;
  joinDate: string;
  status: "Active" | "On Leave" | "Absent";
  avatar: string;
}

export const employees: Employee[] = [
  {
    id: "#001",
    name: "John Doe",
    email: "john@example.com",
    department: "Engineering",
    position: "Senior Developer",
    joinDate: "02 Jan, 2026",
    status: "Active",
    avatar: "JD",
  },
  {
    id: "#002",
    name: "Mike Johnson",
    email: "mike@example.com",
    department: "Marketing",
    position: "Marketing Manager",
    joinDate: "04 Jan, 2026",
    status: "Active",
    avatar: "MJ",
  },
  {
    id: "#003",
    name: "David Kim",
    email: "david@example.com",
    department: "Finance",
    position: "Accountant",
    joinDate: "02 Feb, 2026",
    status: "On Leave",
    avatar: "DK",
  },
  {
    id: "#004",
    name: "Alex Turner",
    email: "alexr@example.com",
    department: "HR",
    position: "HR Specialist",
    joinDate: "08 Feb, 2026",
    status: "Active",
    avatar: "AT",
  },
  {
    id: "#005",
    name: "Ryan Pate",
    email: "ryan@example.com",
    department: "Engineering",
    position: "Frontend Developer",
    joinDate: "10 Feb, 2026",
    status: "Absent",
    avatar: "RP",
  },
  {
    id: "#006",
    name: "Mason Reed",
    email: "mason@example.com",
    department: "Sales",
    position: "Sales Representative",
    joinDate: "31 Dec, 2025",
    status: "Active",
    avatar: "MR",
  },
  {
    id: "#007",
    name: "James Smith",
    email: "james@example.com",
    department: "Sales",
    position: "Sales Representative",
    joinDate: "31 Dec, 2025",
    status: "On Leave",
    avatar: "JS",
  },
  {
    id: "#008",
    name: "Emily Johnson",
    email: "emily@example.com",
    department: "Operations",
    position: "Sales Representative",
    joinDate: "25 Nov, 2025",
    status: "Active",
    avatar: "EJ",
  },
  {
    id: "#009",
    name: "Michael Williams",
    email: "michael@example.com",
    department: "Engineering",
    position: "Data Analyst",
    joinDate: "24 Nov, 2025",
    status: "On Leave",
    avatar: "MW",
  },
  {
    id: "#010",
    name: "Sarah Brown",
    email: "sarah@example.com",
    department: "Operations",
    position: "SaaS Product Designer",
    joinDate: "20 Nov, 2025",
    status: "Active",
    avatar: "SB",
  },
  {
    id: "#011",
    name: "David Jones",
    email: "jones@example.com",
    department: "Product",
    position: "Software Developer",
    joinDate: "02 Nov, 2025",
    status: "On Leave",
    avatar: "DJ",
  },
  {
    id: "#012",
    name: "Jessica Garcia",
    email: "garcia@example.com",
    department: "Product",
    position: "UI/UX Designer",
    joinDate: "12 Oct, 2025",
    status: "Active",
    avatar: "JG",
  },
];

export const dashboardCards = [
  {
    id: 1,
    title: "TOTAL EMPLOYEES",
    value: "230",
    subtitle: "This month",
    icon: Users,
    bgColor: "bg-blue-500/20",
    iconColor: "text-blue-400",
  },
  {
    id: 2,
    title: "ATTENDANCE TODAY",
    value: "78%",
    subtitle: "228 / 248",
    icon: CheckCircle,
    bgColor: "bg-green-500/20",
    iconColor: "text-green-400",
  },
  {
    id: 3,
    title: "TOTAL PROJECT",
    value: "120",
    subtitle: "This month",
    icon: Briefcase,
    bgColor: "bg-purple-500/20",
    iconColor: "text-purple-400",
  },
  {
    id: 4,
    title: "OPEN POSITIONS",
    value: "18",
    subtitle: "5+ Urgent",
    icon: LogIn,
    bgColor: "bg-yellow-500/20",
    iconColor: "text-yellow-400",
  },
  {
    id: 5,
    title: "PENDING APPROVALS",
    value: "14",
    subtitle: "6 Leaves",
    icon: Clock,
    bgColor: "bg-red-500/20",
    iconColor: "text-red-400",
  },
];

export const attendanceData = [
  { day: "Monday", attendance: 65, lateArrival: 45 },
  { day: "Tuesday", attendance: 72, lateArrival: 38 },
  { day: "Wednesday", attendance: 68, lateArrival: 42 },
  { day: "Thursday", attendance: 78, lateArrival: 55 },
  { day: "Friday", attendance: 55, lateArrival: 48 },
  { day: "Saturday", attendance: 48, lateArrival: 35 },
  { day: "Sunday", attendance: 52, lateArrival: 40 },
];

export const attendanceChartConfig = {
  attendance: {
    label: "Attendance",
    color: "hsl(0, 0%, 100%)",
  },
  lateArrival: {
    label: "Late arrival",
    color: "hsl(0, 0%, 40%)",
  },
} satisfies ChartConfig;

export const workingFormatData = {
  total: 230,
  onSite: { percentage: 46.8, color: "#3b82f6" },
  hybrid: { percentage: 26.8, color: "#a855f7" },
  remote: { percentage: 26.4, color: "#06b6d4" },
};

export const jobOverviewData = [
  { name: "Active Jobs", value: 40, fill: "#f59e0b" },
  { name: "Interview", value: 20, fill: "#3b82f6" },
  { name: "Remaining", value: 10, fill: "#374151" },
];

export const jobChartConfig = {
  activeJobs: {
    label: "Active Jobs",
    color: "#f59e0b",
  },
  interview: {
    label: "Interview",
    color: "#3b82f6",
  },
} satisfies ChartConfig;

export const totalJobs = 70;
```

### `src/components/dashboards/hrm/demo.tsx`

```tsx
"use client";

import { useState } from "react";
import { DashboardLayout } from "./dashboardLayout";
import { DashboardView } from "./dashboardView";

export default function HrmDashboardDemo() {
    const [currentView, setCurrentView] = useState("Dashboard");

    const renderContent = () => {
        switch (currentView) {
            case "Dashboard":
                return <DashboardView />;
            default:
                return <DashboardView />;
        }
    };

    return (
        <DashboardLayout onNavigate={setCurrentView} currentView={currentView}>
            {renderContent()}
        </DashboardLayout>
    );
}
```
