diff --git a/frontend/src/routes/_old/old/-components/logistics/helperCommands/commands/Relocate.tsx b/frontend/src/routes/_old/old/-components/logistics/helperCommands/commands/Relocate.tsx
index f7736d3..ef73ca1 100644
--- a/frontend/src/routes/_old/old/-components/logistics/helperCommands/commands/Relocate.tsx
+++ b/frontend/src/routes/_old/old/-components/logistics/helperCommands/commands/Relocate.tsx
@@ -12,14 +12,15 @@ import { LstCard } from "../../../extendedUi/LstCard";
export default function Relocate() {
const [bookingIn, setBookingIn] = useState(false);
const form = useForm({
- defaultValues: { runningNr: " ", lane: "" },
+ defaultValues: { runningNr: " ", laneID: "" },
onSubmit: async ({ value }) => {
// Do something with form data
setBookingIn(true);
try {
- const res = await axios.post("/lst/old/api/ocp/bookin", {
+ const res = await axios.post("/lst/old/api/logistics/relocate", {
runningNr: parseInt(value.runningNr),
+ laneID: parseInt(value.laneID),
});
if (res.data.success) {
@@ -27,15 +28,15 @@ export default function Relocate() {
form.reset();
setBookingIn(false);
} else {
- console.log(res.data.data.errors);
- toast.error(res.data.data.errors[0]?.message);
- form.reset();
+ console.log(res.data.message);
+ toast.error(res.data.message);
+ //form.reset();
setBookingIn(false);
}
} catch (error) {
console.log(error);
toast.error(
- "There was an error booking in pallet please validate you entered the correct info and try again.",
+ "There was an error relocating the pallet please validate the data.",
);
setBookingIn(false);
}
@@ -83,19 +84,17 @@ export default function Relocate() {
}}
/>
- value.length > 2
- ? undefined
- : "Please enter a valid running number",
+ value.length > 2 ? undefined : "Please enter a valid lane ID",
}}
children={(field) => {
return (
-