2026-03-16 23:20:54 +01:00
|
|
|
import { A, useLocation } from '@solidjs/router';
|
feat: phase 1+2 — shell redesign + drag-and-drop dashboard
Shell (AdminShell + AdminSidebar):
- Logo moved to header-left section, width syncs with sidebar collapse state
- Global search bar with debounced multi-module API calls and grouped dropdown
- Bell notification icon with badge, gear → /admin/settings, user dropdown with logout
- Sidebar: 7 grouped nav sections with dividers, orange left-border active state,
removed "Active" badge pill, user info (avatar + name + role) pinned to bottom
- Fixed all sidebar labels to match Figma (Employee Management, External Onboarding
Management, Users Management, Verification Management)
- Added missing sidebar items: Verification, Fitness Trainers, Graphic Designers,
Social Media, Video Editors, Catering Services, Applications, Responses
Dashboard (admin/index):
- Rebuilt to match Figma: "Dashboard Overview" title, Export Report button
- 4 stat cards (Total Users, Active Companies, Open Leads, Credits Purchased)
with real API fetch, orange icons, delta badges, graceful — fallback
- ApexCharts: Leads Trend (orange gradient line) + Revenue Overview (navy bars)
- Drag-and-drop widget system via @thisbeyond/solid-dnd — sortable stat cards
and chart cards with handles and remove buttons in Customise mode
- Add Widget panel shows all available widgets not on dashboard
- 8 stat widgets + 3 chart widgets available; layout persists in localStorage
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 19:21:54 +01:00
|
|
|
import { For, Show } from 'solid-js';
|
2026-03-24 02:36:40 +01:00
|
|
|
import {
|
ui(step-0): rewrite sidebar/shell to match reference admin panel
- AdminSidebar: flat nav list, orange right-border active indicator,
ACTIVE pill badge, ChevronLeft collapse (rotates 180° when collapsed)
- AdminShell: h-16 header with logo+title left, Bell+avatar+logout right,
sidebar collapse state, bg-gray-50 main area
- app.css: shared classes — data-table (navy header), table-card,
btn-primary (navy), btn-secondary, search-input, action-btn,
status-badge variants, page-title
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 04:25:17 +01:00
|
|
|
LayoutGrid, Building2, Briefcase, Users, ShieldCheck, FileText,
|
|
|
|
|
LayoutDashboard, ClipboardList, UserRoundSearch, UserCircle,
|
|
|
|
|
Camera, Palette, BookOpen, Code2, BriefcaseBusiness, HandHelping,
|
|
|
|
|
WalletCards, CreditCard, Tag, Percent, Receipt, ShoppingCart,
|
|
|
|
|
FileCheck, Star, HeadphonesIcon, BarChart3, BookMarked, Bell,
|
feat: phase 1+2 — shell redesign + drag-and-drop dashboard
Shell (AdminShell + AdminSidebar):
- Logo moved to header-left section, width syncs with sidebar collapse state
- Global search bar with debounced multi-module API calls and grouped dropdown
- Bell notification icon with badge, gear → /admin/settings, user dropdown with logout
- Sidebar: 7 grouped nav sections with dividers, orange left-border active state,
removed "Active" badge pill, user info (avatar + name + role) pinned to bottom
- Fixed all sidebar labels to match Figma (Employee Management, External Onboarding
Management, Users Management, Verification Management)
- Added missing sidebar items: Verification, Fitness Trainers, Graphic Designers,
Social Media, Video Editors, Catering Services, Applications, Responses
Dashboard (admin/index):
- Rebuilt to match Figma: "Dashboard Overview" title, Export Report button
- 4 stat cards (Total Users, Active Companies, Open Leads, Credits Purchased)
with real API fetch, orange icons, delta badges, graceful — fallback
- ApexCharts: Leads Trend (orange gradient line) + Revenue Overview (navy bars)
- Drag-and-drop widget system via @thisbeyond/solid-dnd — sortable stat cards
and chart cards with handles and remove buttons in Customise mode
- Add Widget panel shows all available widgets not on dashboard
- 8 stat widgets + 3 chart widgets available; layout persists in localStorage
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 19:21:54 +01:00
|
|
|
ChevronLeft, BadgeCheck, Activity, Film, Utensils, PenTool,
|
|
|
|
|
MessageSquare, Megaphone,
|
2026-03-24 02:36:40 +01:00
|
|
|
} from 'lucide-solid';
|
|
|
|
|
|
feat: phase 1+2 — shell redesign + drag-and-drop dashboard
Shell (AdminShell + AdminSidebar):
- Logo moved to header-left section, width syncs with sidebar collapse state
- Global search bar with debounced multi-module API calls and grouped dropdown
- Bell notification icon with badge, gear → /admin/settings, user dropdown with logout
- Sidebar: 7 grouped nav sections with dividers, orange left-border active state,
removed "Active" badge pill, user info (avatar + name + role) pinned to bottom
- Fixed all sidebar labels to match Figma (Employee Management, External Onboarding
Management, Users Management, Verification Management)
- Added missing sidebar items: Verification, Fitness Trainers, Graphic Designers,
Social Media, Video Editors, Catering Services, Applications, Responses
Dashboard (admin/index):
- Rebuilt to match Figma: "Dashboard Overview" title, Export Report button
- 4 stat cards (Total Users, Active Companies, Open Leads, Credits Purchased)
with real API fetch, orange icons, delta badges, graceful — fallback
- ApexCharts: Leads Trend (orange gradient line) + Revenue Overview (navy bars)
- Drag-and-drop widget system via @thisbeyond/solid-dnd — sortable stat cards
and chart cards with handles and remove buttons in Customise mode
- Add Widget panel shows all available widgets not on dashboard
- 8 stat widgets + 3 chart widgets available; layout persists in localStorage
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 19:21:54 +01:00
|
|
|
type NavItem = {
|
feat(admin): Phase 0 — Tailwind v4 foundation, shell rewrite, modern dashboard
- Install Tailwind CSS v4 via @tailwindcss/vite; configure vite.config.ts
- Rewrite app.css: Tailwind base, Exo 2 font, brand tokens (orange #fd6216, navy #050026), scrollbar utility; fix @import order
- Rewrite AdminShell.tsx: fixed header, fixed inset body grid (sidebar + main), session check, sub-tab system, logout, admin avatar/name/role
- Rewrite AdminSidebar.tsx: collapsible w-64/w-20, orange active rail + badge/dot, CSS filter for SVG icon tinting, min-h-0 flex fix
- Replace 84 route stub CSS classes (page-title, card, btn, table-wrap, etc.) with Tailwind equivalents via safe class-attr-only regex script
- Rewrite admin dashboard: Lucide icons in colored chip backgrounds, 4-col KPI grid, Control Plane 6-module grid, hover lift animations
- Disable SSR (ssr: false) to fix Vinxi dev manifest error; clear stale .vinxi cache
- Add lucide-solid icon library
- Add scripts/cleanup-css.mjs for class migration
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 23:00:21 +01:00
|
|
|
href: string;
|
|
|
|
|
label: string;
|
ui(step-0): rewrite sidebar/shell to match reference admin panel
- AdminSidebar: flat nav list, orange right-border active indicator,
ACTIVE pill badge, ChevronLeft collapse (rotates 180° when collapsed)
- AdminShell: h-16 header with logo+title left, Bell+avatar+logout right,
sidebar collapse state, bg-gray-50 main area
- app.css: shared classes — data-table (navy header), table-card,
btn-primary (navy), btn-secondary, search-input, action-btn,
status-badge variants, page-title
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 04:25:17 +01:00
|
|
|
icon: any;
|
feat(admin): Phase 0 — Tailwind v4 foundation, shell rewrite, modern dashboard
- Install Tailwind CSS v4 via @tailwindcss/vite; configure vite.config.ts
- Rewrite app.css: Tailwind base, Exo 2 font, brand tokens (orange #fd6216, navy #050026), scrollbar utility; fix @import order
- Rewrite AdminShell.tsx: fixed header, fixed inset body grid (sidebar + main), session check, sub-tab system, logout, admin avatar/name/role
- Rewrite AdminSidebar.tsx: collapsible w-64/w-20, orange active rail + badge/dot, CSS filter for SVG icon tinting, min-h-0 flex fix
- Replace 84 route stub CSS classes (page-title, card, btn, table-wrap, etc.) with Tailwind equivalents via safe class-attr-only regex script
- Rewrite admin dashboard: Lucide icons in colored chip backgrounds, 4-col KPI grid, Control Plane 6-module grid, hover lift animations
- Disable SSR (ssr: false) to fix Vinxi dev manifest error; clear stale .vinxi cache
- Add lucide-solid icon library
- Add scripts/cleanup-css.mjs for class migration
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 23:00:21 +01:00
|
|
|
aliasPrefix?: string;
|
|
|
|
|
};
|
2026-03-19 03:36:46 +01:00
|
|
|
|
feat: phase 1+2 — shell redesign + drag-and-drop dashboard
Shell (AdminShell + AdminSidebar):
- Logo moved to header-left section, width syncs with sidebar collapse state
- Global search bar with debounced multi-module API calls and grouped dropdown
- Bell notification icon with badge, gear → /admin/settings, user dropdown with logout
- Sidebar: 7 grouped nav sections with dividers, orange left-border active state,
removed "Active" badge pill, user info (avatar + name + role) pinned to bottom
- Fixed all sidebar labels to match Figma (Employee Management, External Onboarding
Management, Users Management, Verification Management)
- Added missing sidebar items: Verification, Fitness Trainers, Graphic Designers,
Social Media, Video Editors, Catering Services, Applications, Responses
Dashboard (admin/index):
- Rebuilt to match Figma: "Dashboard Overview" title, Export Report button
- 4 stat cards (Total Users, Active Companies, Open Leads, Credits Purchased)
with real API fetch, orange icons, delta badges, graceful — fallback
- ApexCharts: Leads Trend (orange gradient line) + Revenue Overview (navy bars)
- Drag-and-drop widget system via @thisbeyond/solid-dnd — sortable stat cards
and chart cards with handles and remove buttons in Customise mode
- Add Widget panel shows all available widgets not on dashboard
- 8 stat widgets + 3 chart widgets available; layout persists in localStorage
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 19:21:54 +01:00
|
|
|
// Groups match Figma sidebar order with dividers between sections
|
|
|
|
|
const GROUPS: NavItem[][] = [
|
|
|
|
|
// ── Internal management ──────────────────────────────────────────────────
|
|
|
|
|
[
|
|
|
|
|
{ href: '/admin', label: 'Dashboard', icon: LayoutGrid },
|
|
|
|
|
{ href: '/admin/department', label: 'Department Management', icon: Building2 },
|
|
|
|
|
{ href: '/admin/designation', label: 'Designation Management', icon: Briefcase },
|
|
|
|
|
{ href: '/admin/internal-role-management', label: 'Internal Role Management', icon: ShieldCheck },
|
|
|
|
|
{ href: '/admin/employees', label: 'Employee Management', icon: Users },
|
|
|
|
|
],
|
|
|
|
|
// ── External configuration ───────────────────────────────────────────────
|
|
|
|
|
[
|
|
|
|
|
{ href: '/admin/runtime-roles', label: 'External Role Management', icon: ShieldCheck, aliasPrefix: '/admin/external-role-management' },
|
|
|
|
|
{ href: '/admin/onboarding-management', label: 'External Onboarding Management', icon: FileText, aliasPrefix: '/admin/onboarding-schemas' },
|
|
|
|
|
{ href: '/admin/internal-dashboard-management', label: 'Internal Dashboard Management', icon: LayoutDashboard },
|
|
|
|
|
{ href: '/admin/external-dashboard-management', label: 'External Dashboard Management', icon: LayoutDashboard, aliasPrefix: '/admin/role-ui-configs' },
|
|
|
|
|
],
|
|
|
|
|
// ── Compliance ───────────────────────────────────────────────────────────
|
|
|
|
|
[
|
|
|
|
|
{ href: '/admin/verification-status', label: 'Verification Management', icon: BadgeCheck },
|
|
|
|
|
{ href: '/admin/approval', label: 'Approval Management', icon: ClipboardList },
|
|
|
|
|
],
|
|
|
|
|
// ── External users ───────────────────────────────────────────────────────
|
|
|
|
|
[
|
|
|
|
|
{ href: '/admin/users', label: 'Users Management', icon: UserRoundSearch },
|
|
|
|
|
{ href: '/admin/company', label: 'Company Management', icon: Building2 },
|
|
|
|
|
{ href: '/admin/candidate', label: 'Candidate Management', icon: UserCircle },
|
|
|
|
|
{ href: '/admin/customer', label: 'Customer Management', icon: UserCircle },
|
|
|
|
|
{ href: '/admin/photographer', label: 'Photographer Management', icon: Camera },
|
|
|
|
|
{ href: '/admin/makeup-artist', label: 'Makeup Artist Management', icon: Palette },
|
|
|
|
|
{ href: '/admin/tutors', label: 'Tutor Management', icon: BookOpen },
|
|
|
|
|
{ href: '/admin/developers', label: 'Developer Management', icon: Code2 },
|
|
|
|
|
{ href: '/admin/fitness-trainers', label: 'Fitness Trainer Management', icon: Activity },
|
|
|
|
|
{ href: '/admin/graphic-designers', label: 'Graphic Designer Management', icon: PenTool },
|
|
|
|
|
{ href: '/admin/social-media-managers', label: 'Social Media Management', icon: Megaphone },
|
|
|
|
|
{ href: '/admin/video-editors', label: 'Video Editor Management', icon: Film },
|
|
|
|
|
{ href: '/admin/catering-services', label: 'Catering Services Management', icon: Utensils },
|
|
|
|
|
],
|
|
|
|
|
// ── Business operations ──────────────────────────────────────────────────
|
|
|
|
|
[
|
|
|
|
|
{ href: '/admin/jobs', label: 'Jobs Management', icon: BriefcaseBusiness },
|
|
|
|
|
{ href: '/admin/leads', label: 'Leads Management', icon: HandHelping },
|
|
|
|
|
{ href: '/admin/applications', label: 'Applications Management', icon: ClipboardList },
|
|
|
|
|
{ href: '/admin/responses', label: 'Responses Management', icon: MessageSquare },
|
|
|
|
|
{ href: '/admin/review', label: 'Review Management', icon: Star },
|
|
|
|
|
],
|
|
|
|
|
// ── Finance ──────────────────────────────────────────────────────────────
|
|
|
|
|
[
|
|
|
|
|
{ href: '/admin/pricing', label: 'Pricing Management', icon: WalletCards },
|
|
|
|
|
{ href: '/admin/credit', label: 'Credit Management', icon: CreditCard },
|
|
|
|
|
{ href: '/admin/coupon', label: 'Coupon Management', icon: Tag },
|
|
|
|
|
{ href: '/admin/discount', label: 'Discount Management', icon: Percent },
|
|
|
|
|
{ href: '/admin/tax', label: 'Tax Management', icon: Receipt },
|
|
|
|
|
{ href: '/admin/order', label: 'Order Management', icon: ShoppingCart },
|
|
|
|
|
{ href: '/admin/invoice', label: 'Invoice Management', icon: FileCheck },
|
|
|
|
|
{ href: '/admin/ledger', label: 'Ledger Management', icon: Receipt },
|
|
|
|
|
],
|
|
|
|
|
// ── Platform operations ──────────────────────────────────────────────────
|
|
|
|
|
[
|
|
|
|
|
{ href: '/admin/kb', label: 'Knowledge Base Management', icon: BookMarked },
|
|
|
|
|
{ href: '/admin/notifications', label: 'Notifications', icon: Bell },
|
|
|
|
|
{ href: '/admin/support', label: 'Support Management', icon: HeadphonesIcon },
|
|
|
|
|
{ href: '/admin/report', label: 'Report Management', icon: BarChart3 },
|
|
|
|
|
],
|
2026-03-16 23:20:54 +01:00
|
|
|
];
|
|
|
|
|
|
ui(step-0): rewrite sidebar/shell to match reference admin panel
- AdminSidebar: flat nav list, orange right-border active indicator,
ACTIVE pill badge, ChevronLeft collapse (rotates 180° when collapsed)
- AdminShell: h-16 header with logo+title left, Bell+avatar+logout right,
sidebar collapse state, bg-gray-50 main area
- app.css: shared classes — data-table (navy header), table-card,
btn-primary (navy), btn-secondary, search-input, action-btn,
status-badge variants, page-title
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 04:25:17 +01:00
|
|
|
export default function AdminSidebar(props: {
|
|
|
|
|
collapsed: boolean;
|
|
|
|
|
onToggle: () => void;
|
|
|
|
|
onNavigate?: () => void;
|
feat: phase 1+2 — shell redesign + drag-and-drop dashboard
Shell (AdminShell + AdminSidebar):
- Logo moved to header-left section, width syncs with sidebar collapse state
- Global search bar with debounced multi-module API calls and grouped dropdown
- Bell notification icon with badge, gear → /admin/settings, user dropdown with logout
- Sidebar: 7 grouped nav sections with dividers, orange left-border active state,
removed "Active" badge pill, user info (avatar + name + role) pinned to bottom
- Fixed all sidebar labels to match Figma (Employee Management, External Onboarding
Management, Users Management, Verification Management)
- Added missing sidebar items: Verification, Fitness Trainers, Graphic Designers,
Social Media, Video Editors, Catering Services, Applications, Responses
Dashboard (admin/index):
- Rebuilt to match Figma: "Dashboard Overview" title, Export Report button
- 4 stat cards (Total Users, Active Companies, Open Leads, Credits Purchased)
with real API fetch, orange icons, delta badges, graceful — fallback
- ApexCharts: Leads Trend (orange gradient line) + Revenue Overview (navy bars)
- Drag-and-drop widget system via @thisbeyond/solid-dnd — sortable stat cards
and chart cards with handles and remove buttons in Customise mode
- Add Widget panel shows all available widgets not on dashboard
- 8 stat widgets + 3 chart widgets available; layout persists in localStorage
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 19:21:54 +01:00
|
|
|
adminName: string;
|
|
|
|
|
adminInitials: string;
|
ui(step-0): rewrite sidebar/shell to match reference admin panel
- AdminSidebar: flat nav list, orange right-border active indicator,
ACTIVE pill badge, ChevronLeft collapse (rotates 180° when collapsed)
- AdminShell: h-16 header with logo+title left, Bell+avatar+logout right,
sidebar collapse state, bg-gray-50 main area
- app.css: shared classes — data-table (navy header), table-card,
btn-primary (navy), btn-secondary, search-input, action-btn,
status-badge variants, page-title
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 04:25:17 +01:00
|
|
|
}) {
|
2026-03-24 02:36:40 +01:00
|
|
|
const location = useLocation();
|
2026-03-16 23:20:54 +01:00
|
|
|
|
feat: phase 1+2 — shell redesign + drag-and-drop dashboard
Shell (AdminShell + AdminSidebar):
- Logo moved to header-left section, width syncs with sidebar collapse state
- Global search bar with debounced multi-module API calls and grouped dropdown
- Bell notification icon with badge, gear → /admin/settings, user dropdown with logout
- Sidebar: 7 grouped nav sections with dividers, orange left-border active state,
removed "Active" badge pill, user info (avatar + name + role) pinned to bottom
- Fixed all sidebar labels to match Figma (Employee Management, External Onboarding
Management, Users Management, Verification Management)
- Added missing sidebar items: Verification, Fitness Trainers, Graphic Designers,
Social Media, Video Editors, Catering Services, Applications, Responses
Dashboard (admin/index):
- Rebuilt to match Figma: "Dashboard Overview" title, Export Report button
- 4 stat cards (Total Users, Active Companies, Open Leads, Credits Purchased)
with real API fetch, orange icons, delta badges, graceful — fallback
- ApexCharts: Leads Trend (orange gradient line) + Revenue Overview (navy bars)
- Drag-and-drop widget system via @thisbeyond/solid-dnd — sortable stat cards
and chart cards with handles and remove buttons in Customise mode
- Add Widget panel shows all available widgets not on dashboard
- 8 stat widgets + 3 chart widgets available; layout persists in localStorage
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 19:21:54 +01:00
|
|
|
const isActive = (item: NavItem) => {
|
2026-03-24 02:36:40 +01:00
|
|
|
if (item.href === '/admin') return location.pathname === '/admin';
|
|
|
|
|
if (item.aliasPrefix && location.pathname.startsWith(item.aliasPrefix)) return true;
|
|
|
|
|
return location.pathname === item.href || location.pathname.startsWith(`${item.href}/`);
|
feat(ui): apply stitch design system — left-accent KPI cards, Intelligence Hub, glassmorphism header
- app.css: Exo 2 font, #0a1d37 navy + #fd6216 orange tokens, #f9f9fd background
- AdminShell: backdrop-blur-xl glassmorphism header, centered search bar, settings icon,
name + bordered avatar, ambient shadow-[0_4px_24px_rgba(10,29,55,0.04)]
- AdminSidebar: white bg, left orange 4px pill accent on active (before: pseudo),
bg-slate-50 active state, MANAGEMENT/FINANCE/PLATFORM group labels, user card at bottom
- Dashboard: KPI cards with absolute left-0 accent bar + ambient shadows, big font-black numbers,
System Activity bar chart, Intelligence Hub dark navy panel with quick-action buttons,
Pipeline Status cards with progress bars, Control Plane 3-col grid
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 23:34:33 +01:00
|
|
|
};
|
|
|
|
|
|
2026-03-16 23:20:54 +01:00
|
|
|
return (
|
feat: phase 1+2 — shell redesign + drag-and-drop dashboard
Shell (AdminShell + AdminSidebar):
- Logo moved to header-left section, width syncs with sidebar collapse state
- Global search bar with debounced multi-module API calls and grouped dropdown
- Bell notification icon with badge, gear → /admin/settings, user dropdown with logout
- Sidebar: 7 grouped nav sections with dividers, orange left-border active state,
removed "Active" badge pill, user info (avatar + name + role) pinned to bottom
- Fixed all sidebar labels to match Figma (Employee Management, External Onboarding
Management, Users Management, Verification Management)
- Added missing sidebar items: Verification, Fitness Trainers, Graphic Designers,
Social Media, Video Editors, Catering Services, Applications, Responses
Dashboard (admin/index):
- Rebuilt to match Figma: "Dashboard Overview" title, Export Report button
- 4 stat cards (Total Users, Active Companies, Open Leads, Credits Purchased)
with real API fetch, orange icons, delta badges, graceful — fallback
- ApexCharts: Leads Trend (orange gradient line) + Revenue Overview (navy bars)
- Drag-and-drop widget system via @thisbeyond/solid-dnd — sortable stat cards
and chart cards with handles and remove buttons in Customise mode
- Add Widget panel shows all available widgets not on dashboard
- 8 stat widgets + 3 chart widgets available; layout persists in localStorage
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 19:21:54 +01:00
|
|
|
<aside
|
|
|
|
|
class={`flex h-full flex-col border-r border-gray-200 bg-white transition-all duration-300 ${
|
|
|
|
|
props.collapsed ? 'w-[72px]' : 'w-64'
|
|
|
|
|
}`}
|
|
|
|
|
>
|
|
|
|
|
{/* ── Collapse toggle ── */}
|
|
|
|
|
<div
|
|
|
|
|
class={`flex shrink-0 items-center border-b border-gray-100 px-3 py-3 ${
|
|
|
|
|
props.collapsed ? 'justify-center' : 'justify-end'
|
|
|
|
|
}`}
|
|
|
|
|
>
|
ui(step-0): rewrite sidebar/shell to match reference admin panel
- AdminSidebar: flat nav list, orange right-border active indicator,
ACTIVE pill badge, ChevronLeft collapse (rotates 180° when collapsed)
- AdminShell: h-16 header with logo+title left, Bell+avatar+logout right,
sidebar collapse state, bg-gray-50 main area
- app.css: shared classes — data-table (navy header), table-card,
btn-primary (navy), btn-secondary, search-input, action-btn,
status-badge variants, page-title
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 04:25:17 +01:00
|
|
|
<button
|
|
|
|
|
type="button"
|
feat: phase 1+2 — shell redesign + drag-and-drop dashboard
Shell (AdminShell + AdminSidebar):
- Logo moved to header-left section, width syncs with sidebar collapse state
- Global search bar with debounced multi-module API calls and grouped dropdown
- Bell notification icon with badge, gear → /admin/settings, user dropdown with logout
- Sidebar: 7 grouped nav sections with dividers, orange left-border active state,
removed "Active" badge pill, user info (avatar + name + role) pinned to bottom
- Fixed all sidebar labels to match Figma (Employee Management, External Onboarding
Management, Users Management, Verification Management)
- Added missing sidebar items: Verification, Fitness Trainers, Graphic Designers,
Social Media, Video Editors, Catering Services, Applications, Responses
Dashboard (admin/index):
- Rebuilt to match Figma: "Dashboard Overview" title, Export Report button
- 4 stat cards (Total Users, Active Companies, Open Leads, Credits Purchased)
with real API fetch, orange icons, delta badges, graceful — fallback
- ApexCharts: Leads Trend (orange gradient line) + Revenue Overview (navy bars)
- Drag-and-drop widget system via @thisbeyond/solid-dnd — sortable stat cards
and chart cards with handles and remove buttons in Customise mode
- Add Widget panel shows all available widgets not on dashboard
- 8 stat widgets + 3 chart widgets available; layout persists in localStorage
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 19:21:54 +01:00
|
|
|
onClick={props.onToggle}
|
|
|
|
|
title={props.collapsed ? 'Expand sidebar' : 'Collapse sidebar'}
|
|
|
|
|
class="flex h-7 w-7 items-center justify-center rounded-lg text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600"
|
ui(step-0): rewrite sidebar/shell to match reference admin panel
- AdminSidebar: flat nav list, orange right-border active indicator,
ACTIVE pill badge, ChevronLeft collapse (rotates 180° when collapsed)
- AdminShell: h-16 header with logo+title left, Bell+avatar+logout right,
sidebar collapse state, bg-gray-50 main area
- app.css: shared classes — data-table (navy header), table-card,
btn-primary (navy), btn-secondary, search-input, action-btn,
status-badge variants, page-title
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 04:25:17 +01:00
|
|
|
>
|
|
|
|
|
<ChevronLeft
|
|
|
|
|
size={16}
|
|
|
|
|
class={`transition-transform duration-300 ${props.collapsed ? 'rotate-180' : ''}`}
|
|
|
|
|
/>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
feat: phase 1+2 — shell redesign + drag-and-drop dashboard
Shell (AdminShell + AdminSidebar):
- Logo moved to header-left section, width syncs with sidebar collapse state
- Global search bar with debounced multi-module API calls and grouped dropdown
- Bell notification icon with badge, gear → /admin/settings, user dropdown with logout
- Sidebar: 7 grouped nav sections with dividers, orange left-border active state,
removed "Active" badge pill, user info (avatar + name + role) pinned to bottom
- Fixed all sidebar labels to match Figma (Employee Management, External Onboarding
Management, Users Management, Verification Management)
- Added missing sidebar items: Verification, Fitness Trainers, Graphic Designers,
Social Media, Video Editors, Catering Services, Applications, Responses
Dashboard (admin/index):
- Rebuilt to match Figma: "Dashboard Overview" title, Export Report button
- 4 stat cards (Total Users, Active Companies, Open Leads, Credits Purchased)
with real API fetch, orange icons, delta badges, graceful — fallback
- ApexCharts: Leads Trend (orange gradient line) + Revenue Overview (navy bars)
- Drag-and-drop widget system via @thisbeyond/solid-dnd — sortable stat cards
and chart cards with handles and remove buttons in Customise mode
- Add Widget panel shows all available widgets not on dashboard
- 8 stat widgets + 3 chart widgets available; layout persists in localStorage
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 19:21:54 +01:00
|
|
|
{/* ── Navigation ── */}
|
|
|
|
|
<nav class="scrollbar min-h-0 flex-1 overflow-y-auto py-2">
|
|
|
|
|
<For each={GROUPS}>
|
|
|
|
|
{(group, gi) => (
|
|
|
|
|
<>
|
|
|
|
|
{/* Divider between groups */}
|
|
|
|
|
<Show when={gi() > 0}>
|
|
|
|
|
<div class="mx-3 my-2 border-t border-gray-100" />
|
|
|
|
|
</Show>
|
ui: match stitch design system — navy accents, tighter rounding, sidebar groups
- AdminSidebar: group labels (Management/Organisation/Service Providers/Operations),
navy active state (bg-[#e8edf5] + [#0a1d37] left bar + navy icon), width 268px,
13.5px font, 40px item height, lucide-solid icons only (no img fallback), min-w-0
truncation fix, tighter py spacing
- AdminShell: header height 64px (was 86px), compact search bar 40px/rounded-lg,
navy avatar square (was orange gradient), tab indicator navy (was orange), sidebar
width 268px, main bg #f3f4f8
- Dashboard: rounded-xl→rounded-lg cards, rounded-2xl→rounded-xl sections, navy
accent bars on KPI cards, tabular-nums on values, navy pipeline progress bars
- app.css: table thead now navy (#0a1d37) with white text matching reference screenshot,
focus rings navy, admin-segment/admin-link-tabs active state navy, reduced border
radii on segmented controls and list items
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 02:49:09 +01:00
|
|
|
|
feat: phase 1+2 — shell redesign + drag-and-drop dashboard
Shell (AdminShell + AdminSidebar):
- Logo moved to header-left section, width syncs with sidebar collapse state
- Global search bar with debounced multi-module API calls and grouped dropdown
- Bell notification icon with badge, gear → /admin/settings, user dropdown with logout
- Sidebar: 7 grouped nav sections with dividers, orange left-border active state,
removed "Active" badge pill, user info (avatar + name + role) pinned to bottom
- Fixed all sidebar labels to match Figma (Employee Management, External Onboarding
Management, Users Management, Verification Management)
- Added missing sidebar items: Verification, Fitness Trainers, Graphic Designers,
Social Media, Video Editors, Catering Services, Applications, Responses
Dashboard (admin/index):
- Rebuilt to match Figma: "Dashboard Overview" title, Export Report button
- 4 stat cards (Total Users, Active Companies, Open Leads, Credits Purchased)
with real API fetch, orange icons, delta badges, graceful — fallback
- ApexCharts: Leads Trend (orange gradient line) + Revenue Overview (navy bars)
- Drag-and-drop widget system via @thisbeyond/solid-dnd — sortable stat cards
and chart cards with handles and remove buttons in Customise mode
- Add Widget panel shows all available widgets not on dashboard
- 8 stat widgets + 3 chart widgets available; layout persists in localStorage
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 19:21:54 +01:00
|
|
|
<div class="px-2">
|
|
|
|
|
<For each={group}>
|
|
|
|
|
{(item) => {
|
|
|
|
|
const active = () => isActive(item);
|
|
|
|
|
const Icon = item.icon;
|
|
|
|
|
return (
|
|
|
|
|
<A
|
|
|
|
|
href={item.href}
|
|
|
|
|
onClick={props.onNavigate}
|
|
|
|
|
title={props.collapsed ? item.label : undefined}
|
|
|
|
|
aria-current={active() ? 'page' : undefined}
|
|
|
|
|
class={`relative mb-0.5 flex items-center gap-3 rounded-lg py-2.5 text-[13px] font-medium leading-5 transition-all duration-150 ${
|
|
|
|
|
props.collapsed ? 'justify-center px-2' : 'px-3'
|
|
|
|
|
} ${
|
|
|
|
|
active()
|
|
|
|
|
? 'bg-orange-50 text-gray-900'
|
|
|
|
|
: 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'
|
|
|
|
|
}`}
|
|
|
|
|
>
|
|
|
|
|
{/* Left orange accent bar on active */}
|
|
|
|
|
<Show when={active()}>
|
|
|
|
|
<span class="absolute left-0 top-1.5 bottom-1.5 w-[3px] rounded-r-full bg-orange-500" />
|
|
|
|
|
</Show>
|
ui(step-0): rewrite sidebar/shell to match reference admin panel
- AdminSidebar: flat nav list, orange right-border active indicator,
ACTIVE pill badge, ChevronLeft collapse (rotates 180° when collapsed)
- AdminShell: h-16 header with logo+title left, Bell+avatar+logout right,
sidebar collapse state, bg-gray-50 main area
- app.css: shared classes — data-table (navy header), table-card,
btn-primary (navy), btn-secondary, search-input, action-btn,
status-badge variants, page-title
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 04:25:17 +01:00
|
|
|
|
feat: phase 1+2 — shell redesign + drag-and-drop dashboard
Shell (AdminShell + AdminSidebar):
- Logo moved to header-left section, width syncs with sidebar collapse state
- Global search bar with debounced multi-module API calls and grouped dropdown
- Bell notification icon with badge, gear → /admin/settings, user dropdown with logout
- Sidebar: 7 grouped nav sections with dividers, orange left-border active state,
removed "Active" badge pill, user info (avatar + name + role) pinned to bottom
- Fixed all sidebar labels to match Figma (Employee Management, External Onboarding
Management, Users Management, Verification Management)
- Added missing sidebar items: Verification, Fitness Trainers, Graphic Designers,
Social Media, Video Editors, Catering Services, Applications, Responses
Dashboard (admin/index):
- Rebuilt to match Figma: "Dashboard Overview" title, Export Report button
- 4 stat cards (Total Users, Active Companies, Open Leads, Credits Purchased)
with real API fetch, orange icons, delta badges, graceful — fallback
- ApexCharts: Leads Trend (orange gradient line) + Revenue Overview (navy bars)
- Drag-and-drop widget system via @thisbeyond/solid-dnd — sortable stat cards
and chart cards with handles and remove buttons in Customise mode
- Add Widget panel shows all available widgets not on dashboard
- 8 stat widgets + 3 chart widgets available; layout persists in localStorage
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 19:21:54 +01:00
|
|
|
<Icon
|
|
|
|
|
size={17}
|
|
|
|
|
class={`shrink-0 ${active() ? 'text-orange-500' : 'text-gray-400'}`}
|
|
|
|
|
/>
|
ui(step-0): rewrite sidebar/shell to match reference admin panel
- AdminSidebar: flat nav list, orange right-border active indicator,
ACTIVE pill badge, ChevronLeft collapse (rotates 180° when collapsed)
- AdminShell: h-16 header with logo+title left, Bell+avatar+logout right,
sidebar collapse state, bg-gray-50 main area
- app.css: shared classes — data-table (navy header), table-card,
btn-primary (navy), btn-secondary, search-input, action-btn,
status-badge variants, page-title
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 04:25:17 +01:00
|
|
|
|
feat: phase 1+2 — shell redesign + drag-and-drop dashboard
Shell (AdminShell + AdminSidebar):
- Logo moved to header-left section, width syncs with sidebar collapse state
- Global search bar with debounced multi-module API calls and grouped dropdown
- Bell notification icon with badge, gear → /admin/settings, user dropdown with logout
- Sidebar: 7 grouped nav sections with dividers, orange left-border active state,
removed "Active" badge pill, user info (avatar + name + role) pinned to bottom
- Fixed all sidebar labels to match Figma (Employee Management, External Onboarding
Management, Users Management, Verification Management)
- Added missing sidebar items: Verification, Fitness Trainers, Graphic Designers,
Social Media, Video Editors, Catering Services, Applications, Responses
Dashboard (admin/index):
- Rebuilt to match Figma: "Dashboard Overview" title, Export Report button
- 4 stat cards (Total Users, Active Companies, Open Leads, Credits Purchased)
with real API fetch, orange icons, delta badges, graceful — fallback
- ApexCharts: Leads Trend (orange gradient line) + Revenue Overview (navy bars)
- Drag-and-drop widget system via @thisbeyond/solid-dnd — sortable stat cards
and chart cards with handles and remove buttons in Customise mode
- Add Widget panel shows all available widgets not on dashboard
- 8 stat widgets + 3 chart widgets available; layout persists in localStorage
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 19:21:54 +01:00
|
|
|
<Show when={!props.collapsed}>
|
|
|
|
|
<span class="min-w-0 flex-1 truncate">{item.label}</span>
|
|
|
|
|
</Show>
|
|
|
|
|
</A>
|
|
|
|
|
);
|
|
|
|
|
}}
|
|
|
|
|
</For>
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
2026-03-24 02:36:40 +01:00
|
|
|
</For>
|
|
|
|
|
</nav>
|
feat: phase 1+2 — shell redesign + drag-and-drop dashboard
Shell (AdminShell + AdminSidebar):
- Logo moved to header-left section, width syncs with sidebar collapse state
- Global search bar with debounced multi-module API calls and grouped dropdown
- Bell notification icon with badge, gear → /admin/settings, user dropdown with logout
- Sidebar: 7 grouped nav sections with dividers, orange left-border active state,
removed "Active" badge pill, user info (avatar + name + role) pinned to bottom
- Fixed all sidebar labels to match Figma (Employee Management, External Onboarding
Management, Users Management, Verification Management)
- Added missing sidebar items: Verification, Fitness Trainers, Graphic Designers,
Social Media, Video Editors, Catering Services, Applications, Responses
Dashboard (admin/index):
- Rebuilt to match Figma: "Dashboard Overview" title, Export Report button
- 4 stat cards (Total Users, Active Companies, Open Leads, Credits Purchased)
with real API fetch, orange icons, delta badges, graceful — fallback
- ApexCharts: Leads Trend (orange gradient line) + Revenue Overview (navy bars)
- Drag-and-drop widget system via @thisbeyond/solid-dnd — sortable stat cards
and chart cards with handles and remove buttons in Customise mode
- Add Widget panel shows all available widgets not on dashboard
- 8 stat widgets + 3 chart widgets available; layout persists in localStorage
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 19:21:54 +01:00
|
|
|
|
|
|
|
|
{/* ── User info pinned at bottom ── */}
|
|
|
|
|
<div class="shrink-0 border-t border-gray-100 p-3">
|
|
|
|
|
<div
|
|
|
|
|
class={`flex items-center gap-3 rounded-lg px-2 py-2 ${
|
|
|
|
|
props.collapsed ? 'justify-center' : ''
|
|
|
|
|
}`}
|
|
|
|
|
>
|
|
|
|
|
<div class="flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-orange-500 text-sm font-bold text-white">
|
|
|
|
|
{props.adminInitials}
|
|
|
|
|
</div>
|
|
|
|
|
<Show when={!props.collapsed}>
|
|
|
|
|
<div class="min-w-0 flex-1">
|
|
|
|
|
<p class="truncate text-[13px] font-semibold text-gray-800">{props.adminName}</p>
|
|
|
|
|
<p class="text-[11px] text-gray-500">Super Admin</p>
|
|
|
|
|
</div>
|
|
|
|
|
</Show>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-03-16 23:20:54 +01:00
|
|
|
</aside>
|
|
|
|
|
);
|
|
|
|
|
}
|