Compare commits

..

6 Commits

9 changed files with 2327 additions and 4 deletions

View File

@@ -18,7 +18,7 @@ const registerSchema = z.object({
.string()
.min(3)
.max(32)
.regex(/^[a-zA-Z0-9.]+$/, "Only alphanumeric + dots allowed"),
.regex(/^[a-zA-Z0-9._]+$/, "Only alphanumeric + dots allowed"),
displayUsername: z.string().min(2).max(100).optional(), // optional in your API, but supported
});

View File

@@ -8,6 +8,7 @@ import {
} from "@tanstack/react-table";
import React, { useState } from "react";
import { Button } from "@/components/ui/button";
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
import {
Table,
TableBody,
@@ -32,6 +33,7 @@ export default function TableNoExpand({
getPaginationRowModel: getPaginationRowModel(),
onSortingChange: setSorting,
getSortedRowModel: getSortedRowModel(),
//renderSubComponent: ({ row }: { row: any }) => <ExpandedRow row={row} />,
//getRowCanExpand: () => true,
state: {
@@ -40,7 +42,7 @@ export default function TableNoExpand({
});
return (
<div className="p-4">
<div className="">
<ScrollArea className="w-11/12 rounded-md border whitespace-nowrap">
<Table>
<TableHeader>
{table.getHeaderGroups().map((headerGroup) => (
@@ -106,7 +108,8 @@ export default function TableNoExpand({
Next
</Button>
</div>
</div>
<ScrollBar orientation="horizontal" />
</ScrollArea>
</div>
);
}

View File

@@ -55,7 +55,7 @@ export const labelRatioColumns: ColumnDef<Adjustmnets>[] = [
const resetReads = async () => {
setReaderReset(true);
try {
const res = await axios.post("/api/ocp/resetlabelratio", {
const res = await axios.post("/lst/old/api/ocp/resetlabelratio", {
reader: name,
});

View File

@@ -30,6 +30,7 @@ type Pallets = {
durationToMove: null;
qualityDurationToInspect: number;
returnDurationToInspect: number;
locationMovesTo: string;
locationDropOff: string;
palletStatus: number;
palletStatusText: string;
@@ -165,6 +166,26 @@ export default function QualityRequest() {
);
},
}),
columnHelper.accessor("locationMovesTo", {
header: ({ column }) => {
return (
<Button
variant="ghost"
onClick={() => column.toggleSorting(column.getIsSorted() === "asc")}
>
<span className="flex flex-row gap-2">Location At Request</span>
{column.getIsSorted() === "asc" ? (
<ArrowUp className="ml-2 h-4 w-4" />
) : (
<ArrowDown className="ml-2 h-4 w-4" />
)}
</Button>
);
},
cell: ({ getValue }) => {
return <span>{getValue() === "" ? "Pending Move" : getValue()}</span>;
},
}),
columnHelper.accessor("locationDropOff", {
header: ({ column }) => {
return (

View File

@@ -45,6 +45,12 @@ export default function RequestPallet() {
"You did not change the running number, please add a valid running number",
);
}
if (value.moveTo === "") {
return toast.error(
"Please select where you would like the pallets taken to.",
);
}
const postData = {
runningNr: Number(value.runningNr),
moveTo: value.moveTo,

View File

@@ -0,0 +1 @@
ALTER TABLE "qualityRequest" ADD COLUMN "comments" text;

File diff suppressed because it is too large Load Diff

View File

@@ -540,6 +540,13 @@
"when": 1763134709763,
"tag": "0076_stiff_champions",
"breakpoints": true
},
{
"idx": 77,
"version": "7",
"when": 1763407463567,
"tag": "0077_lucky_texas_twister",
"breakpoints": true
}
]
}

View File

@@ -36,6 +36,7 @@ export const qualityRequest = pgTable(
add_user: text("add_user").default("LST"),
upd_date: timestamp("upd_date").defaultNow(),
upd_user: text("upd_user").default("LST"),
comments: text("comments")
},
(table) => [
// uniqueIndex('emailUniqueIndex').on(sql`lower(${table.email})`),