diff --git a/app/components/layout/Sidebar.tsx b/app/components/layout/Sidebar.tsx
index 8a379ae..dccf45b 100644
--- a/app/components/layout/Sidebar.tsx
+++ b/app/components/layout/Sidebar.tsx
@@ -7,8 +7,7 @@ import { getStoredUser } from "@/src/lib/auth";
import Logo from "@/src/utils/logo";
import BrandIcon from "@/src/utils/brandIcon";
-
- //ــــــــــــــ Drawer Context
+//ــــــــــــــ Drawer Context
const DrawerCtx = createContext<{
open: boolean;
@@ -35,26 +34,82 @@ const navSections = [
{
label: "الرئيسية",
items: [
- { href: "/dashboard", label: "Dashboard", icon: "ti-layout-dashboard", permission: "read-dashboard" },
- { href: "/dashboard/users", label: "Users", icon: "ti-users", permission: "read-user" },
+ {
+ href: "/dashboard",
+ label: "لوحة التحكم",
+ icon: "ti-layout-dashboard",
+ permission: "read-dashboard",
+ },
+ {
+ href: "/dashboard/users",
+ label: "المستخدمون",
+ icon: "ti-users",
+ permission: "read-user",
+ },
],
},
{
label: "الأسطول",
items: [
- { href: "/dashboard/cars", label: "Cars", icon: "ti-car", permission: "read-car" },
- { href: "/dashboard/drivers", label: "Drivers", icon: "ti-steering-wheel", permission: "read-driver" },
- { href: "/dashboard/trips", label: "Trips", icon: "ti-route", permission: "read-trip" },
+ {
+ href: "/dashboard/cars",
+ label: "السيارات",
+ icon: "ti-car",
+ permission: "read-car",
+ },
+ {
+ href: "/dashboard/cars_maintenance",
+ label: "صيانة السيارات",
+ icon: "ti-tool",
+ permission: "read-maintenance",
+ },
+ {
+ href: "/dashboard/drivers",
+ label: "السائقون",
+ icon: "ti-steering-wheel",
+ permission: "read-driver",
+ },
+ {
+ href: "/dashboard/trips",
+ label: "الرحلات",
+ icon: "ti-route",
+ permission: "read-trip",
+ },
],
},
{
label: "العمليات",
items: [
- { href: "/dashboard/orders", label: "Orders", icon: "ti-package", permission: "read-order" },
- { href: "/dashboard/clients", label: "Clients", icon: "ti-users-group", permission: "read-client" },
- { href: "/dashboard/branches", label: "Branches", icon: "ti-building", permission: "read-branch" },
- { href: "/dashboard/roles", label: "Roles", icon: "ti-shield", permission: "read-role" },
- { href: "/dashboard/audit", label: "Audit", icon: "ti-clipboard-list", permission: "read-audit" },
+ {
+ href: "/dashboard/orders",
+ label: "الطلبات",
+ icon: "ti-package",
+ permission: "read-order",
+ },
+ {
+ href: "/dashboard/clients",
+ label: "العملاء",
+ icon: "ti-users-group",
+ permission: "read-client",
+ },
+ {
+ href: "/dashboard/branches",
+ label: "الفروع",
+ icon: "ti-building",
+ permission: "read-branch",
+ },
+ {
+ href: "/dashboard/roles",
+ label: "الادوار",
+ icon: "ti-shield",
+ permission: "read-role",
+ },
+ {
+ href: "/dashboard/audit",
+ label: "سجل العمليات",
+ icon: "ti-clipboard-list",
+ permission: "read-audit",
+ },
],
},
];
@@ -63,7 +118,6 @@ const navSections = [
Brand Icon
══════════════════════════════════════════ */
-
export function BrandIconButton({ onClick }: { onClick: () => void }) {
return (
-
+
>
);
@@ -219,7 +310,10 @@ export function Sidebar() {
SidebarContent
══════════════════════════════════════════ */
function SidebarContent({
- pathname, permissions, user, compact,
+ pathname,
+ permissions,
+ user,
+ compact,
}: {
pathname: string;
permissions: string[];
@@ -228,28 +322,52 @@ function SidebarContent({
}) {
return (
<>
-
+
{compact ? : }
-