refactor(dockscanning): more work on the dock door scanning
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 1m47s

ref #12
This commit is contained in:
2026-06-08 07:49:41 -05:00
parent 6dd1a5b332
commit 7671172d97
18 changed files with 6040 additions and 37 deletions

View File

@@ -13,16 +13,23 @@ import AdminSidebar from "./AdminBar";
import DocBar from "./DocBar";
import MobileBar from "./MobileBar";
import TransportationBar from "./TransportationBar";
import WarehouseBar from "./Warhouse";
export function AppSidebar() {
const { data: session } = useSession();
const { data: settings, isLoading } = useSuspenseQuery(getSettings());
const { data: canRead = false } = useQuery(
const { data: canReadOpenDock = false } = useQuery(
permissionQuery({
openDock: ["read"],
}),
);
const { data: canReadWarehouse = false } = useQuery(
permissionQuery({
warehouse: ["read"],
}),
);
return (
<Sidebar
variant="sidebar"
@@ -42,7 +49,12 @@ export function AppSidebar() {
{!isLoading &&
settings.filter((n: any) => n.name === "opendock_sync")[0]
?.active &&
canRead && <TransportationBar />}
canReadOpenDock && <TransportationBar />}
{!isLoading &&
settings.filter((n: any) => n.name === "dockDoorScanning")[0]
?.active &&
canReadWarehouse && <WarehouseBar />}
{session &&
(session.user.role === "admin" ||