fix(siloadjustmnets): corrected the silo adjustments to account for removed middleware
This commit is contained in:
@@ -7,10 +7,11 @@ import { Button } from "@/components/ui/button";
|
||||
import { CardContent, CardFooter, CardHeader } from "@/components/ui/card";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { Textarea } from "@/components/ui/textarea";
|
||||
import { useAuth } from "@/lib/authClient";
|
||||
import { LstCard } from "../../extendedUi/LstCard";
|
||||
|
||||
export default function Comment(data: any) {
|
||||
const token = localStorage.getItem("auth_token");
|
||||
const { session } = useAuth();
|
||||
const [isSubmitting, setIsSubmitting] = useState(false);
|
||||
const router = useRouter();
|
||||
|
||||
@@ -27,8 +28,8 @@ export default function Comment(data: any) {
|
||||
{
|
||||
comment: value.comment,
|
||||
key: data.id.split("&")[1].replace("amp;", ""),
|
||||
username: session?.user.username,
|
||||
},
|
||||
{ headers: { Authorization: `Bearer ${token}` } },
|
||||
);
|
||||
|
||||
if (res.data.success) {
|
||||
|
||||
@@ -43,6 +43,7 @@ export default function SiloCard(data: any) {
|
||||
quantity: parseFloat(value.newLevel),
|
||||
warehouseId: silo.WarehouseID,
|
||||
laneId: silo.LocationID,
|
||||
username: session?.user.username,
|
||||
};
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user