test(ocme): cycle count intital improvements

This commit is contained in:
2025-03-19 21:45:10 -05:00
parent e17b8e7bbe
commit 7a22b52c91
19 changed files with 709 additions and 33 deletions

View File

@@ -51,6 +51,14 @@ const items = [
module: "logistics",
active: true,
},
{
title: "Ocme Cyclecount",
url: "/cyclecount",
icon: Package,
role: ["technician", "supervisor", "manager", "admin", "systemAdmin"],
module: "logistics",
active: true,
},
];
export function LogisticsSideBar({user, moduleID}: {user: User | null; moduleID: string}) {

View File

@@ -15,7 +15,7 @@ const items = [
title: "One Click Print",
url: "/ocp",
icon: Printer,
role: [],
role: ["viewer"],
module: "ocp",
active: true,
},

View File

@@ -0,0 +1,22 @@
import {LstCard} from "../extendedUI/LstCard";
import {CardContent, CardHeader} from "../ui/card";
import {Skeleton} from "../ui/skeleton";
export default function CycleCountLog() {
return (
<LstCard className="w-48">
<CardHeader className="flex justify-center">
<span>Cycle Count logs</span>
</CardHeader>
<CardContent>
{Array(10)
.fill(0)
.map((_, i) => (
<div key={i}>
<Skeleton className="m-2 h-4" />
</div>
))}
</CardContent>
</LstCard>
);
}

View File

@@ -0,0 +1,81 @@
import {toast} from "sonner";
import {LstCard} from "../extendedUI/LstCard";
import {Button} from "../ui/button";
import {Input} from "../ui/input";
import {Table, TableBody, TableCell, TableHead, TableHeader, TableRow} from "../ui/table";
import {Skeleton} from "../ui/skeleton";
import CycleCountLog from "./CycleCountLog";
export default function OcmeCycleCount() {
return (
<div className="flex flex-row w-fill">
<div className="m-2 w-5/6">
<LstCard>
<div>
<form>
<div className="flex justify-between">
<div className="m-2">
<Input placeholder="enter lane: L064" />
</div>
<Button className="m-2" onClick={() => toast.success("Cycle Count completed")}>
CycleCount
</Button>
</div>
</form>
</div>
<div>
<Table>
<TableHeader>
<TableRow>
<TableHead>LaneID</TableHead>
<TableHead>Lane</TableHead>
<TableHead>AV</TableHead>
<TableHead>Description</TableHead>
<TableHead>Running Number</TableHead>
<TableHead>In Ocme</TableHead>
<TableHead>In Stock</TableHead>
<TableHead>Result</TableHead>
</TableRow>
</TableHeader>
<TableBody>
{Array(10)
.fill(0)
.map((_, i) => (
<TableRow key={i}>
<TableCell className="font-medium">
<Skeleton className="h-4" />
</TableCell>
<TableCell>
<Skeleton className="h-4" />
</TableCell>
<TableCell>
<Skeleton className="h-4" />
</TableCell>
<TableCell>
<Skeleton className="h-4" />
</TableCell>
<TableCell>
<Skeleton className="h-4" />
</TableCell>
<TableCell>
<Skeleton className="h-4" />
</TableCell>
<TableCell>
<Skeleton className="h-4" />
</TableCell>
<TableCell>
<Skeleton className="h-4" />
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</div>
</LstCard>
</div>
<div className="m-2">
<CycleCountLog />
</div>
</div>
);
}