refactor(rfid): ratio resets implemeneted

This commit is contained in:
2025-07-14 12:36:36 -05:00
parent 4923b3c698
commit a7f8e39bac
5 changed files with 159 additions and 29 deletions

View File

@@ -1,4 +1,4 @@
import { Printer } from "lucide-react";
import { Printer, Tag } from "lucide-react";
import {
SidebarGroup,
SidebarGroupContent,
@@ -10,34 +10,6 @@ import {
import { hasPageAccess } from "@/utils/userAccess";
import { User } from "@/types/users";
const items = [
{
title: "One Click Print",
url: "/ocp",
icon: Printer,
role: ["viewer"],
module: "ocp",
active: true,
},
{
title: "RFID",
moduleName: "prodcution",
description: "RFID stuff",
url: "/rfid",
icon: "Tags",
active: true,
roles: [
"viewer",
"technician",
"supervisor",
"manager",
"admin",
"systemAdmin",
],
subSubModule: [],
},
];
export function ProductionSideBar({
user,
moduleID,
@@ -45,6 +17,26 @@ export function ProductionSideBar({
user: User | null;
moduleID: string;
}) {
const url: string = window.location.host.split(":")[0];
const items = [
{
title: "One Click Print",
url: "/ocp",
icon: Printer,
role: ["viewer"],
module: "ocp",
active: true,
},
{
title: "Rfid Readers",
url: "/rfid",
icon: Tag,
role: ["viewer"],
module: "production",
active:
url === "usday1vms006" || url === "localhost" ? true : false,
},
];
return (
<SidebarGroup>
<SidebarGroupLabel>Production</SidebarGroupLabel>