Admin Panel
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-09-29 14:57:37 +07:00
parent 04fbddba13
commit 8c6dad2a31
94 changed files with 4864 additions and 1151 deletions
+53 -12
View File
@@ -1,5 +1,13 @@
import { Link } from '@inertiajs/react';
import { BookOpen, FolderGit2, LayoutGrid } from 'lucide-react';
import { Link, usePage } from '@inertiajs/react';
import {
Building2,
FolderKanban,
Globe,
Inbox,
LayoutGrid,
MessageSquareQuote,
Users,
} from 'lucide-react';
import AppLogo from '@/components/app-logo';
import { NavFooter } from '@/components/nav-footer';
import { NavMain } from '@/components/nav-main';
@@ -13,7 +21,12 @@ import {
SidebarMenuButton,
SidebarMenuItem,
} from '@/components/ui/sidebar';
import { dashboard } from '@/routes';
import { dashboard, home } from '@/routes';
import { edit as companyEdit } from '@/routes/admin/company';
import { index as consultationsIndex } from '@/routes/admin/consultations';
import { index as projectsIndex } from '@/routes/admin/projects';
import { index as testimonialsIndex } from '@/routes/admin/testimonials';
import { index as usersIndex } from '@/routes/admin/users';
import type { NavItem } from '@/types';
const mainNavItems: NavItem[] = [
@@ -22,22 +35,50 @@ const mainNavItems: NavItem[] = [
href: dashboard(),
icon: LayoutGrid,
},
{
title: 'Inbox Konsultasi',
href: consultationsIndex(),
icon: Inbox,
},
{
title: 'Portofolio',
href: projectsIndex(),
icon: FolderKanban,
},
{
title: 'Info Perusahaan',
href: companyEdit(),
icon: Building2,
},
{
title: 'Testimoni',
href: testimonialsIndex(),
icon: MessageSquareQuote,
},
];
const adminNavItems: NavItem[] = [
{
title: 'Pengguna',
href: usersIndex(),
icon: Users,
},
];
const footerNavItems: NavItem[] = [
{
title: 'Repository',
href: 'https://github.com/laravel/react-starter-kit',
icon: FolderGit2,
},
{
title: 'Documentation',
href: 'https://laravel.com/docs/starter-kits#react',
icon: BookOpen,
title: 'Lihat Website',
href: home(),
icon: Globe,
},
];
export function AppSidebar() {
const { can } = usePage().props;
const navItems = can.manageUsers
? [...mainNavItems, ...adminNavItems]
: mainNavItems;
return (
<Sidebar collapsible="icon" variant="inset">
<SidebarHeader>
@@ -53,7 +94,7 @@ export function AppSidebar() {
</SidebarHeader>
<SidebarContent>
<NavMain items={mainNavItems} />
<NavMain items={navItems} />
</SidebarContent>
<SidebarFooter>