From 691b3be1f9e9797ad006b672ab6a671da6e00587 Mon Sep 17 00:00:00 2001 From: csawatzky Date: Wed, 4 Jun 2025 15:20:46 -0600 Subject: [PATCH] approval of transactions works, is also now requires a matching transaction if the bin selected also uses hybrid control, rejection still needs to be implemented --- src/bin/BinSettings.tsx | 2 + src/bin/BinTransactions.tsx | 105 ++++++++++++++++++++------ src/providers/pond/transactionAPI.tsx | 4 +- 3 files changed, 85 insertions(+), 26 deletions(-) diff --git a/src/bin/BinSettings.tsx b/src/bin/BinSettings.tsx index 832c39b..a793dd5 100644 --- a/src/bin/BinSettings.tsx +++ b/src/bin/BinSettings.tsx @@ -712,6 +712,8 @@ export default function BinSettings(props: Props) { return "Auto (lidar)" case pond.BinInventoryControl.BIN_INVENTORY_CONTROL_AUTOMATIC: return "Auto (cable)" + case pond.BinInventoryControl.BIN_INVENTORY_CONTROL_HYBRID_LIDAR: + return "Hybrid (lidar)" default: return "Manual" } diff --git a/src/bin/BinTransactions.tsx b/src/bin/BinTransactions.tsx index 6b06fe8..f690248 100644 --- a/src/bin/BinTransactions.tsx +++ b/src/bin/BinTransactions.tsx @@ -34,7 +34,11 @@ export default function BinTransactions(props: Props){ const [tablePageSize, setTablePageSize] = useState(10) const { openSnack } = useSnackbar(); const [total, setTotal] = useState(0) + const [grainMessage, setGrainMessage] = useState("") + //only need to do this for the bins since if a bin is picked for the secondary we need to check its inventory control type, + //if it is also hybrid a matching transaction must be selected + const [bins, setBins] = useState>(new Map()) const [binOptions, setBinOptions] = useState([]) const [grainBagOptions, setGrainBagOptions] = useState([]) @@ -53,18 +57,21 @@ export default function BinTransactions(props: Props){ const [toType, setToType] = useState(pond.ObjectType.OBJECT_TYPE_UNKNOWN) const [toOption, setToOption] = useState