refactor(lst): more dashboard work
This commit is contained in:
@@ -68,12 +68,12 @@ const rolePermissions: Roles = {
|
||||
},
|
||||
};
|
||||
|
||||
const users: User[] = [
|
||||
{id: 1, username: "admin", role: "admin"},
|
||||
{id: 2, username: "manager", role: "manager"},
|
||||
{id: 3, username: "supervisor", role: "supervisor"},
|
||||
{id: 4, username: "user", role: "user"},
|
||||
];
|
||||
// const users: User[] = [
|
||||
// {id: 1, username: "admin", role: "admin"},
|
||||
// {id: 2, username: "manager", role: "manager"},
|
||||
// {id: 3, username: "supervisor", role: "supervisor"},
|
||||
// {id: 4, username: "user", role: "user"},
|
||||
// ];
|
||||
|
||||
function hasAccess(user: User, moduleName: string, feature: Feature): boolean {
|
||||
return rolePermissions[user.role]?.[moduleName]?.includes(feature) || false;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import {Link} from "@tanstack/react-router";
|
||||
import {SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem} from "../../ui/sidebar";
|
||||
|
||||
export function Header() {
|
||||
@@ -5,15 +6,18 @@ export function Header() {
|
||||
<SidebarHeader>
|
||||
<SidebarMenu>
|
||||
<SidebarMenuItem>
|
||||
<SidebarMenuButton size="lg" asChild>
|
||||
<div>
|
||||
<img src="/imgs/dkLst.png" alt="Description" className="size-8" />
|
||||
<div className="flex flex-col gap-0.5 leading-none">
|
||||
<span className="font-semibold">Logistics Support Tool</span>
|
||||
<span className="">v1.0.0</span>
|
||||
<Link to="/">
|
||||
<SidebarMenuButton size="lg" asChild>
|
||||
<div className="flex flex-row">
|
||||
<img src="/imgs/dkLst.png" alt="Description" className="size-8" />
|
||||
|
||||
<div className="flex flex-col gap-0.5 leading-none">
|
||||
<span className="font-semibold">Logistics Support Tool</span>
|
||||
<span className="">v1.0.0</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</SidebarMenuButton>
|
||||
</SidebarMenuButton>
|
||||
</Link>
|
||||
</SidebarMenuItem>
|
||||
</SidebarMenu>
|
||||
</SidebarHeader>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {Cylinder, Package, Printer, Truck} from "lucide-react";
|
||||
import {Cylinder, Package, Truck} from "lucide-react";
|
||||
import {
|
||||
SidebarGroup,
|
||||
SidebarGroupContent,
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
const items = [
|
||||
{
|
||||
title: "One Click Print",
|
||||
url: "#",
|
||||
url: "/ocp",
|
||||
icon: Printer,
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user