Skip to content

Commit

Permalink
client: don't show esitmated times on recent load chart
Browse files Browse the repository at this point in the history
  • Loading branch information
wuzzeb committed Dec 24, 2024
1 parent ead6d06 commit ce8137c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ export function RecentStationCycleChart({ ty }: { ty: CycleType }) {
});
}
}, [cycles, ty, selectedPart, selectedPallet, selectedOperation, showGraph]);
const curOperation = selectedPart ? selectedOperation ?? points.allMachineOperations[0] : undefined;
const curOperation = selectedPart ? (selectedOperation ?? points.allMachineOperations[0]) : undefined;
const plannedMinutes = useMemo(() => {
if (curOperation) {
if (curOperation && ty === "machine") {
return plannedOperationMinutes(points, false);
} else {
return undefined;
}
}, [points, curOperation]);
}, [points, ty, curOperation]);

return (
<Box paddingLeft="24px" paddingRight="24px" paddingTop="10px">
Expand Down Expand Up @@ -290,7 +290,7 @@ export function RecentStationCycleChart({ ty }: { ty: CycleType }) {
set_date_zoom_range={setChartZoom}
yZoom={yZoom}
setYZoom={setYZoom}
stats={curOperation ? estimatedCycleTimes.get(curOperation) : undefined}
stats={curOperation && ty === "machine" ? estimatedCycleTimes.get(curOperation) : undefined}
partCntPerPoint={
curOperation ? LazySeq.of(points.data).head()?.[1]?.[0]?.material?.length : undefined
}
Expand Down

0 comments on commit ce8137c

Please sign in to comment.