added bintransactions component and function for the transaction api to get transaction involving a given object

This commit is contained in:
csawatzky 2025-05-22 13:16:47 -06:00
parent 353b1cb6b9
commit 554fd0c228
4 changed files with 73 additions and 2 deletions

View file

@ -67,6 +67,7 @@ import { useNavigate, useParams } from "react-router-dom";
import { Controller } from "models/Controller";
import TaskViewer from "tasks/TaskViewer";
import ButtonGroup from "common/ButtonGroup";
import BinTransactions from "bin/BinTransactions";
interface TabPanelProps {
children?: React.ReactNode;
@ -195,7 +196,7 @@ export default function Bin(props: Props) {
const [heaters, setHeaters] = useState<Controller[]>([]);
const [fans, setFans] = useState<Controller[]>([]);
const [detail, setDetail] = useState<
"inventory" | "sensors" | "analytics" | "presets" | "alerts"
"inventory" | "sensors" | "analytics" | "presets" | "alerts" | "transactions"
>("inventory");
const [mobileTab, setMobileTab] = useState(0);
const componentAPI = useComponentAPI();
@ -886,6 +887,10 @@ export default function Bin(props: Props) {
{
title: "Presets",
function: () => setDetail("presets")
},
{
title: "Transactions",
function: () => setDetail("transactions")
}
]}
/>
@ -963,6 +968,9 @@ export default function Bin(props: Props) {
compositionNameMap={compositionNameMap}
/>
)}
{detail === "transactions" &&
<BinTransactions bin={bin}/>
}
</Grid>
</Grid>
</Card>