fix(admin-portal): show the CalendarDays icon for the Events menu

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
This commit is contained in:
ngqileandClaude Opus 5.5 committed 2026-11-27 02:32:50 +08:00
1 parent b6671280fa
commit 82d47f4023
2 files changed
+16 -1

No files matched your search

@@ -0,0 +1,13 @@
import { render } from "@testing-library/react";
import { describe, it, expect } from "vitest";
import { iconFor } from "./icon-map";
// add-admin-events: BO_EVENTS seed icon_name = 'CalendarDays'.
describe("iconFor — Events", () => {
it("resolves CalendarDays to a real (non-fallback) icon", () => {
const Icon = iconFor("CalendarDays");
const { container } = render(<Icon aria-hidden="true" />);
expect(container.querySelector("svg")).not.toBeNull();
expect(container.querySelector("svg.lucide-circle")).toBeNull();
});
});
@@ -1,4 +1,4 @@
import { Activity, ArrowDownToLine, ArrowLeftRight, BarChart2, Bell, Box, Calendar, Circle, ClipboardList, Coins, CreditCard, FileText, GalleryHorizontalEnd, Gift, History, LayoutDashboard, Languages, Layers, Mail, Megaphone, Menu, MessagesSquare, Network, Package, Settings, Shield, ShieldCheck, ShoppingCart, SlidersHorizontal, Star, Store, Tags, ScrollText, Undo2, UserCheck, UserCog, Users, Wallet, Warehouse, Wrench } from "lucide-react";
import { Activity, ArrowDownToLine, ArrowLeftRight, BarChart2, Bell, Box, Calendar, CalendarDays, Circle, ClipboardList, Coins, CreditCard, FileText, GalleryHorizontalEnd, Gift, History, LayoutDashboard, Languages, Layers, Mail, Megaphone, Menu, MessagesSquare, Network, Package, Settings, Shield, ShieldCheck, ShoppingCart, SlidersHorizontal, Star, Store, Tags, ScrollText, Undo2, UserCheck, UserCog, Users, Wallet, Warehouse, Wrench } from "lucide-react";
import type { LucideIcon } from "lucide-react";
// Maps the aclMenu tree's `iconName` (a plain string served by
@@ -43,6 +43,8 @@ const ICONS: Record<string, LucideIcon> = {
// Events module (add-event-module-pickup-e1, E1):
// Events page seed icon.
Calendar,
// add-admin-events: BO_EVENTS seed icon_name = 'CalendarDays'.
CalendarDays,
// POS counter-sales module (add-event-pos-counter-sales):
// POS page seed icon (sql/02-seed-bo-module-pos.sql icon_name = 'ShoppingCart').
ShoppingCart,