diff --git a/frontend/package-lock.json b/frontend/package-lock.json index b2240a8..542cb6b 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -20,6 +20,8 @@ "@radix-ui/react-select": "^2.2.6", "@radix-ui/react-separator": "^1.1.7", "@radix-ui/react-slot": "^1.2.3", + "@radix-ui/react-switch": "^1.2.6", + "@radix-ui/react-tabs": "^1.1.13", "@radix-ui/react-tooltip": "^1.2.8", "@tailwindcss/vite": "^4.1.13", "@tanstack/react-form": "^1.23.0", @@ -2258,6 +2260,65 @@ } } }, + "node_modules/@radix-ui/react-switch": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@radix-ui/react-switch/-/react-switch-1.2.6.tgz", + "integrity": "sha512-bByzr1+ep1zk4VubeEVViV592vu2lHE2BZY5OnzehZqOOgogN80+mNtCqPkhn2gklJqOpxWgPoYTSnhBCqpOXQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-use-controllable-state": "1.2.2", + "@radix-ui/react-use-previous": "1.1.1", + "@radix-ui/react-use-size": "1.1.1" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-tabs": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.1.13.tgz", + "integrity": "sha512-7xdcatg7/U+7+Udyoj2zodtI9H/IIopqo+YOIcZOq1nJwXWBZ9p8xiu5llXlekDbZkca79a/fozEYQXIA4sW6A==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-direction": "1.1.1", + "@radix-ui/react-id": "1.1.1", + "@radix-ui/react-presence": "1.1.5", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-roving-focus": "1.1.11", + "@radix-ui/react-use-controllable-state": "1.2.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-tooltip": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-1.2.8.tgz", diff --git a/frontend/package.json b/frontend/package.json index e54730c..6f14bc8 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -22,6 +22,8 @@ "@radix-ui/react-select": "^2.2.6", "@radix-ui/react-separator": "^1.1.7", "@radix-ui/react-slot": "^1.2.3", + "@radix-ui/react-switch": "^1.2.6", + "@radix-ui/react-tabs": "^1.1.13", "@radix-ui/react-tooltip": "^1.2.8", "@tailwindcss/vite": "^4.1.13", "@tanstack/react-form": "^1.23.0", diff --git a/frontend/src/components/ui/switch.tsx b/frontend/src/components/ui/switch.tsx new file mode 100644 index 0000000..b0363e3 --- /dev/null +++ b/frontend/src/components/ui/switch.tsx @@ -0,0 +1,29 @@ +import * as React from "react" +import * as SwitchPrimitive from "@radix-ui/react-switch" + +import { cn } from "@/lib/utils" + +function Switch({ + className, + ...props +}: React.ComponentProps) { + return ( + + + + ) +} + +export { Switch } diff --git a/frontend/src/components/ui/tabs.tsx b/frontend/src/components/ui/tabs.tsx new file mode 100644 index 0000000..3d6f3ac --- /dev/null +++ b/frontend/src/components/ui/tabs.tsx @@ -0,0 +1,64 @@ +import * as React from "react" +import * as TabsPrimitive from "@radix-ui/react-tabs" + +import { cn } from "@/lib/utils" + +function Tabs({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function TabsList({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function TabsTrigger({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function TabsContent({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +export { Tabs, TabsList, TabsTrigger, TabsContent } diff --git a/frontend/src/routeTree.gen.ts b/frontend/src/routeTree.gen.ts index 000556c..0bec7d4 100644 --- a/frontend/src/routeTree.gen.ts +++ b/frontend/src/routeTree.gen.ts @@ -35,9 +35,11 @@ import { Route as AppauthUserProfileRouteImport } from './routes/_app/(auth)/use import { Route as AppAdminLayoutAdminUsersRouteRouteImport } from './routes/_app/_adminLayout/admin/_users/route' import { Route as OldOldocmeCyclecountIndexRouteImport } from './routes/_old/old/(ocme)/cyclecount/index' import { Route as OldOldlogisticsSiloAdjustmentsIndexRouteImport } from './routes/_old/old/(logistics)/siloAdjustments/index' +import { Route as OldOldlogisticsMaterialHelperIndexRouteImport } from './routes/_old/old/(logistics)/materialHelper/index' import { Route as OldOldlogisticsSiloAdjustmentsHistRouteImport } from './routes/_old/old/(logistics)/siloAdjustments/$hist' import { Route as AppAdminLayoutAdminUsersUsersRouteImport } from './routes/_app/_adminLayout/admin/_users/users' import { Route as AppAdminLayoutAdminUsersProdUsersRouteImport } from './routes/_app/_adminLayout/admin/_users/prodUsers' +import { Route as OldOldlogisticsMaterialHelperConsumptionIndexRouteImport } from './routes/_old/old/(logistics)/materialHelper/consumption/index' import { Route as OldOldlogisticsSiloAdjustmentsCommentCommentRouteImport } from './routes/_old/old/(logistics)/siloAdjustments/comment/$comment' const AppAdminLayoutAdminRouteImport = createFileRoute( @@ -176,6 +178,12 @@ const OldOldlogisticsSiloAdjustmentsIndexRoute = path: '/siloAdjustments/', getParentRoute: () => OldOldRouteRoute, } as any) +const OldOldlogisticsMaterialHelperIndexRoute = + OldOldlogisticsMaterialHelperIndexRouteImport.update({ + id: '/(logistics)/materialHelper/', + path: '/materialHelper/', + getParentRoute: () => OldOldRouteRoute, + } as any) const OldOldlogisticsSiloAdjustmentsHistRoute = OldOldlogisticsSiloAdjustmentsHistRouteImport.update({ id: '/(logistics)/siloAdjustments/$hist', @@ -194,6 +202,12 @@ const AppAdminLayoutAdminUsersProdUsersRoute = path: '/prodUsers', getParentRoute: () => AppAdminLayoutAdminUsersRouteRoute, } as any) +const OldOldlogisticsMaterialHelperConsumptionIndexRoute = + OldOldlogisticsMaterialHelperConsumptionIndexRouteImport.update({ + id: '/(logistics)/materialHelper/consumption/', + path: '/materialHelper/consumption/', + getParentRoute: () => OldOldRouteRoute, + } as any) const OldOldlogisticsSiloAdjustmentsCommentCommentRoute = OldOldlogisticsSiloAdjustmentsCommentCommentRouteImport.update({ id: '/(logistics)/siloAdjustments/comment/$comment', @@ -224,9 +238,11 @@ export interface FileRoutesByFullPath { '/admin/prodUsers': typeof AppAdminLayoutAdminUsersProdUsersRoute '/admin/users': typeof AppAdminLayoutAdminUsersUsersRoute '/old/siloAdjustments/$hist': typeof OldOldlogisticsSiloAdjustmentsHistRoute + '/old/materialHelper': typeof OldOldlogisticsMaterialHelperIndexRoute '/old/siloAdjustments': typeof OldOldlogisticsSiloAdjustmentsIndexRoute '/old/cyclecount': typeof OldOldocmeCyclecountIndexRoute '/old/siloAdjustments/comment/$comment': typeof OldOldlogisticsSiloAdjustmentsCommentCommentRoute + '/old/materialHelper/consumption': typeof OldOldlogisticsMaterialHelperConsumptionIndexRoute } export interface FileRoutesByTo { '/changelog': typeof AppChangelogRoute @@ -250,9 +266,11 @@ export interface FileRoutesByTo { '/admin/prodUsers': typeof AppAdminLayoutAdminUsersProdUsersRoute '/admin/users': typeof AppAdminLayoutAdminUsersUsersRoute '/old/siloAdjustments/$hist': typeof OldOldlogisticsSiloAdjustmentsHistRoute + '/old/materialHelper': typeof OldOldlogisticsMaterialHelperIndexRoute '/old/siloAdjustments': typeof OldOldlogisticsSiloAdjustmentsIndexRoute '/old/cyclecount': typeof OldOldocmeCyclecountIndexRoute '/old/siloAdjustments/comment/$comment': typeof OldOldlogisticsSiloAdjustmentsCommentCommentRoute + '/old/materialHelper/consumption': typeof OldOldlogisticsMaterialHelperConsumptionIndexRoute } export interface FileRoutesById { __root__: typeof rootRouteImport @@ -282,9 +300,11 @@ export interface FileRoutesById { '/_app/_adminLayout/admin/_users/prodUsers': typeof AppAdminLayoutAdminUsersProdUsersRoute '/_app/_adminLayout/admin/_users/users': typeof AppAdminLayoutAdminUsersUsersRoute '/_old/old/(logistics)/siloAdjustments/$hist': typeof OldOldlogisticsSiloAdjustmentsHistRoute + '/_old/old/(logistics)/materialHelper/': typeof OldOldlogisticsMaterialHelperIndexRoute '/_old/old/(logistics)/siloAdjustments/': typeof OldOldlogisticsSiloAdjustmentsIndexRoute '/_old/old/(ocme)/cyclecount/': typeof OldOldocmeCyclecountIndexRoute '/_old/old/(logistics)/siloAdjustments/comment/$comment': typeof OldOldlogisticsSiloAdjustmentsCommentCommentRoute + '/_old/old/(logistics)/materialHelper/consumption/': typeof OldOldlogisticsMaterialHelperConsumptionIndexRoute } export interface FileRouteTypes { fileRoutesByFullPath: FileRoutesByFullPath @@ -311,9 +331,11 @@ export interface FileRouteTypes { | '/admin/prodUsers' | '/admin/users' | '/old/siloAdjustments/$hist' + | '/old/materialHelper' | '/old/siloAdjustments' | '/old/cyclecount' | '/old/siloAdjustments/comment/$comment' + | '/old/materialHelper/consumption' fileRoutesByTo: FileRoutesByTo to: | '/changelog' @@ -337,9 +359,11 @@ export interface FileRouteTypes { | '/admin/prodUsers' | '/admin/users' | '/old/siloAdjustments/$hist' + | '/old/materialHelper' | '/old/siloAdjustments' | '/old/cyclecount' | '/old/siloAdjustments/comment/$comment' + | '/old/materialHelper/consumption' id: | '__root__' | '/_app' @@ -368,9 +392,11 @@ export interface FileRouteTypes { | '/_app/_adminLayout/admin/_users/prodUsers' | '/_app/_adminLayout/admin/_users/users' | '/_old/old/(logistics)/siloAdjustments/$hist' + | '/_old/old/(logistics)/materialHelper/' | '/_old/old/(logistics)/siloAdjustments/' | '/_old/old/(ocme)/cyclecount/' | '/_old/old/(logistics)/siloAdjustments/comment/$comment' + | '/_old/old/(logistics)/materialHelper/consumption/' fileRoutesById: FileRoutesById } export interface RootRouteChildren { @@ -556,6 +582,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof OldOldlogisticsSiloAdjustmentsIndexRouteImport parentRoute: typeof OldOldRouteRoute } + '/_old/old/(logistics)/materialHelper/': { + id: '/_old/old/(logistics)/materialHelper/' + path: '/materialHelper' + fullPath: '/old/materialHelper' + preLoaderRoute: typeof OldOldlogisticsMaterialHelperIndexRouteImport + parentRoute: typeof OldOldRouteRoute + } '/_old/old/(logistics)/siloAdjustments/$hist': { id: '/_old/old/(logistics)/siloAdjustments/$hist' path: '/siloAdjustments/$hist' @@ -577,6 +610,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AppAdminLayoutAdminUsersProdUsersRouteImport parentRoute: typeof AppAdminLayoutAdminUsersRouteRoute } + '/_old/old/(logistics)/materialHelper/consumption/': { + id: '/_old/old/(logistics)/materialHelper/consumption/' + path: '/materialHelper/consumption' + fullPath: '/old/materialHelper/consumption' + preLoaderRoute: typeof OldOldlogisticsMaterialHelperConsumptionIndexRouteImport + parentRoute: typeof OldOldRouteRoute + } '/_old/old/(logistics)/siloAdjustments/comment/$comment': { id: '/_old/old/(logistics)/siloAdjustments/comment/$comment' path: '/siloAdjustments/comment/$comment' @@ -685,9 +725,11 @@ interface OldOldRouteRouteChildren { OldOldOcpIndexRoute: typeof OldOldOcpIndexRoute OldOldRfidIndexRoute: typeof OldOldRfidIndexRoute OldOldlogisticsSiloAdjustmentsHistRoute: typeof OldOldlogisticsSiloAdjustmentsHistRoute + OldOldlogisticsMaterialHelperIndexRoute: typeof OldOldlogisticsMaterialHelperIndexRoute OldOldlogisticsSiloAdjustmentsIndexRoute: typeof OldOldlogisticsSiloAdjustmentsIndexRoute OldOldocmeCyclecountIndexRoute: typeof OldOldocmeCyclecountIndexRoute OldOldlogisticsSiloAdjustmentsCommentCommentRoute: typeof OldOldlogisticsSiloAdjustmentsCommentCommentRoute + OldOldlogisticsMaterialHelperConsumptionIndexRoute: typeof OldOldlogisticsMaterialHelperConsumptionIndexRoute } const OldOldRouteRouteChildren: OldOldRouteRouteChildren = { @@ -696,11 +738,15 @@ const OldOldRouteRouteChildren: OldOldRouteRouteChildren = { OldOldRfidIndexRoute: OldOldRfidIndexRoute, OldOldlogisticsSiloAdjustmentsHistRoute: OldOldlogisticsSiloAdjustmentsHistRoute, + OldOldlogisticsMaterialHelperIndexRoute: + OldOldlogisticsMaterialHelperIndexRoute, OldOldlogisticsSiloAdjustmentsIndexRoute: OldOldlogisticsSiloAdjustmentsIndexRoute, OldOldocmeCyclecountIndexRoute: OldOldocmeCyclecountIndexRoute, OldOldlogisticsSiloAdjustmentsCommentCommentRoute: OldOldlogisticsSiloAdjustmentsCommentCommentRoute, + OldOldlogisticsMaterialHelperConsumptionIndexRoute: + OldOldlogisticsMaterialHelperConsumptionIndexRoute, } const OldOldRouteRouteWithChildren = OldOldRouteRoute._addFileChildren( diff --git a/frontend/src/routes/_old/old/(logistics)/materialHelper/consumption/index.tsx b/frontend/src/routes/_old/old/(logistics)/materialHelper/consumption/index.tsx new file mode 100644 index 0000000..6824e53 --- /dev/null +++ b/frontend/src/routes/_old/old/(logistics)/materialHelper/consumption/index.tsx @@ -0,0 +1,42 @@ +import { createFileRoute } from "@tanstack/react-router"; +import ConsumeMaterial from "../../../-components/logistics/materialHelper/consumption/ConsumeMaterial"; +import PreformReturn from "../../../-components/logistics/materialHelper/consumption/MaterialReturn"; +import TransferToNextLot from "../../../-components/logistics/materialHelper/consumption/TransferToNextLot"; + +export const Route = createFileRoute( + "/_old/old/(logistics)/materialHelper/consumption/", +)({ + component: RouteComponent, + head: () => ({ + meta: [ + { + name: "description", + content: "My App is a web application", + }, + { + title: "LST - Logistics", + }, + ], + }), +}); + +function RouteComponent() { + const url: string = window.location.host.split(":")[0]; + const auth = localStorage.getItem("auth_token"); + return ( +
+ {auth ? ( + <> + + {url === "localhost" && } + + + ) : ( + <> + + + + )} +
+ ); +} diff --git a/frontend/src/routes/_old/old/(logistics)/materialHelper/index.tsx b/frontend/src/routes/_old/old/(logistics)/materialHelper/index.tsx new file mode 100644 index 0000000..34c29bb --- /dev/null +++ b/frontend/src/routes/_old/old/(logistics)/materialHelper/index.tsx @@ -0,0 +1,25 @@ +import { createFileRoute } from "@tanstack/react-router"; +import MaterialHelperPage from "../../-components/logistics/materialHelper/materialHelperPage"; + +export const Route = createFileRoute("/_old/old/(logistics)/materialHelper/")({ + component: RouteComponent, + head: () => ({ + meta: [ + { + name: "description", + content: "My App is a web application", + }, + { + title: "LST - Logistics", + }, + ], + }), +}); + +function RouteComponent() { + return ( +
+ +
+ ); +} diff --git a/frontend/src/routes/_old/old/-components/logistics/materialHelper/consumption/ConsumeMaterial.tsx b/frontend/src/routes/_old/old/-components/logistics/materialHelper/consumption/ConsumeMaterial.tsx new file mode 100644 index 0000000..20569a8 --- /dev/null +++ b/frontend/src/routes/_old/old/-components/logistics/materialHelper/consumption/ConsumeMaterial.tsx @@ -0,0 +1,107 @@ +import axios from "axios"; +import { useState } from "react"; +import { useForm } from "react-hook-form"; +import { toast } from "sonner"; +import { Button } from "@/components/ui/button"; +import { CardHeader } from "@/components/ui/card"; +import { Input } from "@/components/ui/input"; +import { Label } from "@/components/ui/label"; +import { LstCard } from "../../../extendedUi/LstCard"; + +export default function ConsumeMaterial() { + const { register: register1, handleSubmit: handleSubmit1, reset } = useForm(); + const [submitting, setSubmitting] = useState(false); + + const handleConsume = async (data: any) => { + setSubmitting(true); + try { + // const result = await axios.post(`/api/logistics/consume`, data, { + // headers: {Authorization: `Bearer ${token}`}, + // }); + const result = await axios.post(`/lst/old/api/logistics/consume`, data); + if (result.data.success) { + toast.success(result.data.message); + setSubmitting(false); + reset(); + } + if (!result.data.success) { + //console.log(result.data); + setSubmitting(false); + + toast.error(result.data.message); + } + } catch (error: any) { + console.log(error); + setSubmitting(false); + if (error.status === 401) { + toast.error("Unauthorized to do this task."); + } else { + toast.error( + "Unexpected error if this continues please constact an admin.", + ); + } + } + }; + return ( +
+ + +

Consuming Material.

+
+
+
+ +
+
+ + +
+
+ + +
+ + +
+
+
+
+ +
+
    +
  1. + 1. Enter the running number of the material you would like + to consume +
  2. +
  3. 2. Enter the lot number you will be consuming to
  4. +
  5. 3. Press consume material
  6. +
+

+ *This process is only for barcoded material, if it is set to + auto consume you will encounter and error. +

+
+
+
+
+
+
+ ); +} diff --git a/frontend/src/routes/_old/old/-components/logistics/materialHelper/consumption/MaterialReturn.tsx b/frontend/src/routes/_old/old/-components/logistics/materialHelper/consumption/MaterialReturn.tsx new file mode 100644 index 0000000..1239365 --- /dev/null +++ b/frontend/src/routes/_old/old/-components/logistics/materialHelper/consumption/MaterialReturn.tsx @@ -0,0 +1,144 @@ +import axios from "axios"; +import { useState } from "react"; +import { useForm } from "react-hook-form"; +import { toast } from "sonner"; + +import { Button } from "@/components/ui/button"; +import { CardHeader } from "@/components/ui/card"; +import { Input } from "@/components/ui/input"; +import { Label } from "@/components/ui/label"; +import { LstCard } from "../../../extendedUi/LstCard"; + +export default function PreformReturn() { + const { register: register1, handleSubmit: handleSubmit1, reset } = useForm(); + const [submitting, setSubmitting] = useState(false); + + const handleConsume = async (data: any) => { + setSubmitting(true); + try { + const result = await axios.post( + `/lst/old/auth/api/logistics/consume`, + data, + ); + if (result.data.success) { + toast.success(result.data.message); + setSubmitting(false); + reset(); + } + if (!result.data.success) { + //console.log(result.data); + setSubmitting(false); + + toast.error(result.data.message); + } + } catch (error: any) { + //console.log(error); + setSubmitting(false); + if (error.status === 401) { + toast.error("Unauthorized to do this task."); + } else { + toast.error( + "Unexpected error if this continues please constact an admin.", + ); + } + } + }; + return ( +
+ + +

Preform Return.

+
+
+
+ +
+
+ + +
+
+ + +
+
+ + +
+ +
+ + +
+
+ + +
+ + +
+
+
+
+ +
+
    +
  1. + 1. Enter the running number of the preform cage you would + like to return +
  2. +
  3. 2. Enter the new weight of the gaylord
  4. +
  5. 3. Select the printer you would like to print to
  6. +
+

+ *As soon as you press preform return it will print a new label + and return to the staging location. +

+
+
+
+
+
+
+ ); +} diff --git a/frontend/src/routes/_old/old/-components/logistics/materialHelper/consumption/TransferToNextLot.tsx b/frontend/src/routes/_old/old/-components/logistics/materialHelper/consumption/TransferToNextLot.tsx new file mode 100644 index 0000000..18aaac5 --- /dev/null +++ b/frontend/src/routes/_old/old/-components/logistics/materialHelper/consumption/TransferToNextLot.tsx @@ -0,0 +1,348 @@ +import axios from "axios"; +import { Info } from "lucide-react"; +import { useState } from "react"; +import { toast } from "sonner"; +import { Button } from "@/components/ui/button"; +import { CardContent, CardHeader } from "@/components/ui/card"; +import { Input } from "@/components/ui/input"; +import { Switch } from "@/components/ui/switch"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; +import { + Tooltip, + TooltipContent, + TooltipTrigger, +} from "@/components/ui/tooltip"; +import { useAppForm } from "@/lib/formStuff"; +import { useSettingStore } from "@/routes/_old/old/-lib/store/useSettings"; +import { LstCard } from "../../../extendedUi/LstCard"; + +export default function TransferToNextLot() { + const [gaylordFilled, setGaylordFilled] = useState([0]); + const [actualAmount, setActualAmount] = useState(0); + const [tab, setTab] = useState("esitmate"); + const [typeSwitch, setTypeSwitch] = useState(false); + const { settings } = useSettingStore(); + + const server = settings.filter((n: any) => n.name === "plantToken"); + const form = useAppForm({ + defaultValues: { + runningNumber: "", + lotNumber: "", + originalAmount: "", + amount: "", + }, + onSubmit: async ({ value }) => { + //console.log(transferData); + //toast.success("603468: qty: 361, was transfered to lot:24897"); + try { + const res = await axios.post("/lst/old/api/ocp/materiallottransfer", { + runningNumber: Number(value.runningNumber), + lotNumber: Number(value.lotNumber), + originalAmount: Number(value.originalAmount), + level: Number( + gaylordFilled.length === 1 + ? 0.25 + : gaylordFilled.length === 2 + ? 0.5 + : gaylordFilled.length === 3 + ? 0.75 + : gaylordFilled.length === 4 && 0.95, + ), + amount: actualAmount, + type: typeSwitch ? "eom" : "lot", + }); + + if (res.data.success) { + toast.success(`${res.data.message}`); + form.reset(); + setGaylordFilled([0]); + setActualAmount(0); + } + //console.log(res.data); + + if (!res.data.success) { + toast.error(res.data.message); + } + } catch (error) { + if (error) { + console.log(error); + //toast.error(error) + } + } + }, + }); + return ( +
+ + +

Material Transfer to Next lot

+
+
+
+
+
+ + + + + Estimate Amount + + Actual Amount + + + +
+ + + + +
+
+ +
+
+ + +

Enter the total amount of the cage/gaylord

+
+ + + setActualAmount(Number(e.target.value)) + } + /> + +
+
+
+
+
+
+ +
{ + e.preventDefault(); + form.handleSubmit(); + }} + > +
+ ( + + )} + /> +
+
+ ( + + )} + /> + {tab !== "actual" && ( +
+ ( + + )} + /> +
+ )} +
+
+
+ + + {typeSwitch ? ( +
+ "EOM Transfer" + + + + + +

+ Click the toggle if you will be + transfering at EOM, NOTE: This will + trigger the delayed transfer. +

+
+
+
+ ) : ( +
+ "Lot Transfer" + + + + + +

+ Click the toggle if you will be + transferring at EOM, NOTE: This will + trigger the delayed transfer. +

+
+
+
+ )} +
+
+ + + Transfer To Lot + +
+
+
+
+
+
+
+ + +

+ Moving material to the next lot. +

+
+ {tab !== "actual" ? ( +
+
    +
  1. + 1. Grab the gaylord running number from the gaylord at + the line/next to the tschritter +
  2. +
  3. + 2. Grab the next lot number you are going to be running + (or the one that state no Main material prepared) +
  4. +
  5. + 3. Enter the total gaylord weight (this is how much the + gaylord weighed when it came in from the supplier.) +
  6. +
  7. + 4. *Click the level of the gaylord (this is just an + estimate to move to the next lot.) +
  8. +
  9. 5. type in running number on the gaylord.
  10. +
  11. 6. Type in the new lot number.
  12. +
  13. 7. Press "Transfer To Lot"
  14. +
+

+

+ * to reduce the time needed to get the lot going we will + use an estimate of how full the gaylord is. +

+

+ NOTE: This is not the return process, this process will + just get the gaylord to the next lot. +

+
+ {settings.length > 0 && ( +

+ For more in depth instructions please{" "} + + CLICK HERE + +

+ )} +
+ ) : ( +
+
    +
  1. + 1. Grab the gaylord running number from the gaylord at + the line/next to the tschritter +
  2. +
  3. + 2. Grab the next lot number you are going to be running + (or the one that state no Main material prepared) +
  4. +
  5. 3. Take the gaylord to the scale and weight it
  6. +
  7. + 4. Enter the weight of the gaylord minus the tar weight. +
  8. +
  9. 5. type in running number on the gaylord.
  10. +
  11. 6. Type in the new lot number.
  12. +
  13. 7. Press "Transfer To Lot"
  14. +
+

+ +

+ NOTE: This is not the return process, this process will + just get the gaylord to the next lot. +

+
+ {settings.length > 0 && ( +

+ For more in depth instructions please{" "} + + CLICK HERE + +

+ )} +
+ )} +
+
+
+
+
+
+ ); +}