fix(siloadjustmnets): corrected the silo adjustments to account for removed middleware

This commit is contained in:
2025-10-28 19:39:08 -05:00
parent 78a5a4a398
commit e9ff8bb4cb
6 changed files with 32 additions and 5 deletions

View File

@@ -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) {

View File

@@ -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 {