From 446147d4d5a73012198ffcd87b5d9692c08e8713 Mon Sep 17 00:00:00 2001 From: csawatzky Date: Thu, 8 May 2025 15:56:38 -0600 Subject: [PATCH] fixed the temp and humidity on the bin cards in the drawer on the map, also fixed the drawer loading bins not in the yard --- src/bin/BinSVGV2.tsx | 1 - src/bin/BinyardDisplay.tsx | 23 ++++++----------------- src/maps/mapDrawers/BinYardDrawer.tsx | 1 + src/providers/pond/binAPI.tsx | 2 ++ 4 files changed, 9 insertions(+), 18 deletions(-) diff --git a/src/bin/BinSVGV2.tsx b/src/bin/BinSVGV2.tsx index ea1b00d..d53d15c 100644 --- a/src/bin/BinSVGV2.tsx +++ b/src/bin/BinSVGV2.tsx @@ -832,7 +832,6 @@ export default function BinSVGV2(props: Props) { cableGrainEndY = cableGrainStartY; } if (cableEstimate && cables.length > 0 && cableGrainPathPoints.length === cables.length) { - console.log("calc cable path"); let cablePath = cableGrainEstimate( cableGrainPathPoints, spacingX, diff --git a/src/bin/BinyardDisplay.tsx b/src/bin/BinyardDisplay.tsx index 2e5ba40..3b8f01b 100644 --- a/src/bin/BinyardDisplay.tsx +++ b/src/bin/BinyardDisplay.tsx @@ -123,10 +123,11 @@ export default function BinyardDisplay(props: Props) { }); const loadBins = useCallback(() => { - setBinsLoading(true); + if (yardKey === "") return //load the bins based on the yard key + setBinsLoading(true); binAPI - .listBinsAndData(maxBins, 0, "asc", "name", undefined, as, undefined, [yardKey], ["binyard"]) + .listBinsAndData(maxBins, 0, "asc", "name", undefined, undefined, undefined, [yardKey], ["binyard"]) .then(resp => { let yardBins: Bin[] = []; let grainBins: Bin[] = []; @@ -315,17 +316,10 @@ export default function BinyardDisplay(props: Props) { { - // //only triggered in the scroll view so this will never trigger in grid view - // if (yardBins.length < binTotal) { - // loadMoreBins(contentFilter); - // setScrollTranslations({ ...scrollTranslations, bins: newTranslation }); - // } - // }} /> @@ -338,16 +332,10 @@ export default function BinyardDisplay(props: Props) { { - // //only triggered in the scroll view so this will never trigger in grid view - // if (yardBins.length < binTotal) { - // loadMoreBins(contentFilter); - // setScrollTranslations({ ...scrollTranslations, fertilizer: newTranslation }); - // } - // }} /> @@ -360,6 +348,7 @@ export default function BinyardDisplay(props: Props) { { //return ; + console.log(yard.key) return ; }; diff --git a/src/providers/pond/binAPI.tsx b/src/providers/pond/binAPI.tsx index 5e9f51a..63f0fd1 100644 --- a/src/providers/pond/binAPI.tsx +++ b/src/providers/pond/binAPI.tsx @@ -388,6 +388,8 @@ export default function BinProvider(props: PropsWithChildren) { (keys ? "&keys=" + keys.join(",") : "") + (types ? "&types=" + types.join(",") : "") + console.log(url) + return new Promise>((resolve, reject)=>{ get(pondURL(url)).then(resp => { resp.data = pond.ListBinsAndDataResponse.fromObject(resp.data)