modified th api's for bin, contract and task to have as passed in as a prop and not get it ffrom the global state directly in the api

This commit is contained in:
csawatzky 2025-04-17 13:33:27 -06:00
parent 4bcac4e346
commit e2f5eb0557
31 changed files with 155 additions and 507 deletions

View file

@ -86,7 +86,7 @@ export default function GrainNodeInteractions(props: Props) {
const [nodeTemp, setNodeTemp] = useState<number>();
const [nodeHum, setNodeHum] = useState<number>();
const [nodeMoist, setNodeMoist] = useState<number | undefined>();
const [{ user }] = useGlobalState();
const [{ user, as }] = useGlobalState();
const tempDescriber = describeMeasurement(quack.MeasurementType.MEASUREMENT_TYPE_TEMPERATURE);
const humDescriber = describeMeasurement(quack.MeasurementType.MEASUREMENT_TYPE_PERCENT);
const moistureDescriber = describeMeasurement(quack.MeasurementType.MEASUREMENT_TYPE_GRAIN_EMC);
@ -195,7 +195,7 @@ export default function GrainNodeInteractions(props: Props) {
});
//update the bins preferences to have the new top node for the cable
binAPI
.updateComponentPreferences(binKey, cable.key(), pref)
.updateComponentPreferences(binKey, cable.key(), pref, as)
.then(resp => {
openSnack("Updated cables top node");
updateComponentCallback(cable.key());