feat(silo attached detach): added in silo attach detach setup in the silo card

This commit is contained in:
2025-06-23 12:00:28 -05:00
parent d6d19f8e5b
commit 2ac48138cb
22 changed files with 1362 additions and 598 deletions

View File

@@ -19,6 +19,8 @@ import { CircleAlert } from "lucide-react";
import { useState } from "react";
import { toast } from "sonner";
import ChartData from "./ChartData";
import { AttachSilo } from "./AttachSilo";
import { DetachSilo } from "./DetachSilo";
export default function SiloCard(data: any) {
const token = localStorage.getItem("auth_token");
@@ -151,6 +153,7 @@ export default function SiloCard(data: any) {
/>
<Button
className="ml-1"
variant="outline"
type="submit"
onClick={
form.handleSubmit
@@ -188,13 +191,17 @@ export default function SiloCard(data: any) {
<div className="grow max-w-[600px]">
<ChartData laneId={silo.LocationID} />
<div className="flex justify-end m-1">
<Link
to={"/siloAdjustments/$hist"}
params={{ hist: silo.LocationID }}
>
Historical Data
</Link>
<div className="flex justify-end m-1 gap-3">
<AttachSilo silo={silo} />
<DetachSilo silo={silo} />
<Button variant="outline">
<Link
to={"/siloAdjustments/$hist"}
params={{ hist: silo.LocationID }}
>
Historical Data
</Link>
</Button>
</div>
</div>
</div>