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
This commit is contained in:
parent
5f9d39e26d
commit
446147d4d5
4 changed files with 9 additions and 18 deletions
|
|
@ -832,7 +832,6 @@ export default function BinSVGV2(props: Props) {
|
||||||
cableGrainEndY = cableGrainStartY;
|
cableGrainEndY = cableGrainStartY;
|
||||||
}
|
}
|
||||||
if (cableEstimate && cables.length > 0 && cableGrainPathPoints.length === cables.length) {
|
if (cableEstimate && cables.length > 0 && cableGrainPathPoints.length === cables.length) {
|
||||||
console.log("calc cable path");
|
|
||||||
let cablePath = cableGrainEstimate(
|
let cablePath = cableGrainEstimate(
|
||||||
cableGrainPathPoints,
|
cableGrainPathPoints,
|
||||||
spacingX,
|
spacingX,
|
||||||
|
|
|
||||||
|
|
@ -123,10 +123,11 @@ export default function BinyardDisplay(props: Props) {
|
||||||
});
|
});
|
||||||
|
|
||||||
const loadBins = useCallback(() => {
|
const loadBins = useCallback(() => {
|
||||||
setBinsLoading(true);
|
if (yardKey === "") return
|
||||||
//load the bins based on the yard key
|
//load the bins based on the yard key
|
||||||
|
setBinsLoading(true);
|
||||||
binAPI
|
binAPI
|
||||||
.listBinsAndData(maxBins, 0, "asc", "name", undefined, as, undefined, [yardKey], ["binyard"])
|
.listBinsAndData(maxBins, 0, "asc", "name", undefined, undefined, undefined, [yardKey], ["binyard"])
|
||||||
.then(resp => {
|
.then(resp => {
|
||||||
let yardBins: Bin[] = [];
|
let yardBins: Bin[] = [];
|
||||||
let grainBins: Bin[] = [];
|
let grainBins: Bin[] = [];
|
||||||
|
|
@ -315,17 +316,10 @@ export default function BinyardDisplay(props: Props) {
|
||||||
<Grid size={12}>
|
<Grid size={12}>
|
||||||
<BinsList
|
<BinsList
|
||||||
gridView
|
gridView
|
||||||
|
valDisplay="average"
|
||||||
bins={grainBins}
|
bins={grainBins}
|
||||||
duplicateBin={duplicateBin}
|
duplicateBin={duplicateBin}
|
||||||
title={"Grain Bins"}
|
title={"Grain Bins"}
|
||||||
// because this only triggers in scroll view it is no longer necessary as we dont do the scroll here
|
|
||||||
// loadMore={newTranslation => {
|
|
||||||
// //only triggered in the scroll view so this will never trigger in grid view
|
|
||||||
// if (yardBins.length < binTotal) {
|
|
||||||
// loadMoreBins(contentFilter);
|
|
||||||
// setScrollTranslations({ ...scrollTranslations, bins: newTranslation });
|
|
||||||
// }
|
|
||||||
// }}
|
|
||||||
/>
|
/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
|
|
@ -338,16 +332,10 @@ export default function BinyardDisplay(props: Props) {
|
||||||
<Grid size={12}>
|
<Grid size={12}>
|
||||||
<BinsList
|
<BinsList
|
||||||
gridView
|
gridView
|
||||||
|
valDisplay="average"
|
||||||
bins={fertBins}
|
bins={fertBins}
|
||||||
duplicateBin={duplicateBin}
|
duplicateBin={duplicateBin}
|
||||||
title={"Fertilizer Bins"}
|
title={"Fertilizer Bins"}
|
||||||
// loadMore={newTranslation => {
|
|
||||||
// //only triggered in the scroll view so this will never trigger in grid view
|
|
||||||
// if (yardBins.length < binTotal) {
|
|
||||||
// loadMoreBins(contentFilter);
|
|
||||||
// setScrollTranslations({ ...scrollTranslations, fertilizer: newTranslation });
|
|
||||||
// }
|
|
||||||
// }}
|
|
||||||
/>
|
/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
|
|
@ -360,6 +348,7 @@ export default function BinyardDisplay(props: Props) {
|
||||||
<Grid size={12}>
|
<Grid size={12}>
|
||||||
<BinsList
|
<BinsList
|
||||||
gridView
|
gridView
|
||||||
|
valDisplay="average"
|
||||||
bins={emptyBins}
|
bins={emptyBins}
|
||||||
duplicateBin={duplicateBin}
|
duplicateBin={duplicateBin}
|
||||||
title={"Empty Bins"}
|
title={"Empty Bins"}
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@ export default function BinYardDrawer(props: Props) {
|
||||||
|
|
||||||
const drawerBody = () => {
|
const drawerBody = () => {
|
||||||
//return <Bins insert yardFilter={yard.key} />;
|
//return <Bins insert yardFilter={yard.key} />;
|
||||||
|
console.log(yard.key)
|
||||||
return <BinyardDisplay insert yardKey={yard.key} />;
|
return <BinyardDisplay insert yardKey={yard.key} />;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -388,6 +388,8 @@ export default function BinProvider(props: PropsWithChildren<Props>) {
|
||||||
(keys ? "&keys=" + keys.join(",") : "") +
|
(keys ? "&keys=" + keys.join(",") : "") +
|
||||||
(types ? "&types=" + types.join(",") : "")
|
(types ? "&types=" + types.join(",") : "")
|
||||||
|
|
||||||
|
console.log(url)
|
||||||
|
|
||||||
return new Promise<AxiosResponse<pond.ListBinsAndDataResponse>>((resolve, reject)=>{
|
return new Promise<AxiosResponse<pond.ListBinsAndDataResponse>>((resolve, reject)=>{
|
||||||
get<pond.ListBinsAndDataResponse>(pondURL(url)).then(resp => {
|
get<pond.ListBinsAndDataResponse>(pondURL(url)).then(resp => {
|
||||||
resp.data = pond.ListBinsAndDataResponse.fromObject(resp.data)
|
resp.data = pond.ListBinsAndDataResponse.fromObject(resp.data)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue