Merge branch 'master' into field_dashboard

This commit is contained in:
csawatzky 2025-08-20 10:54:12 -06:00
commit d61fb63a7d
8 changed files with 56 additions and 9 deletions

View file

@ -82,7 +82,20 @@ export default function UserWrapper(props: Props) {
firmware: new Map()
})
}).catch(() => {
setGlobal(globalDefault)
userAPI.getUser(user_id).then(user => {
setGlobal({
user: user ? user : User.create(),
team: globalDefault.team,
as: "",
showErrors: false,
userTeamPermissions: [],
backgroundTasksComplete: false,
firmware: new Map()
})
}).catch(() => {
setGlobal(globalDefault)
})
})
.finally(() => {
setLoading(false)

View file

@ -490,7 +490,7 @@ export default function BinCard(props: Props) {
return (
<Card style={{ cursor: "pointer" }}>
{user.hasFeature("admin") && (
{user.hasFeature("installer") && (
<IconButton
style={{
height: 35,

View file

@ -184,7 +184,7 @@ export default function BinComponentGraph(props: Props) {
<UnitMeasurementSummary
component={component}
reading={UnitMeasurement.convertLastMeasurement(
component.status.lastGoodMeasurement.map(m => UnitMeasurement.create(m, user))
lastMeasurement.map(m => UnitMeasurement.create(m, user))
)}
/>
}

View file

@ -59,7 +59,7 @@ const useStyles = makeStyles((theme: Theme) => {
},
stickyHeader: {
position: "sticky",
// backgroundColor: getThemeType() === "light" ? "rgb(245, 245, 245)" : "rgb(40, 40, 40)",
backgroundColor: getThemeType() === "light" ? "rgb(245, 245, 245)" : "rgb(40, 40, 40)",
top: 0,
zIndex: 300 //giving a really high z-index to make sure nothing is in front of it
}

View file

@ -190,7 +190,7 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
[
pond.Grain.GRAIN_OATS,
{
name: "Oats",
name: "Oats a",
group: "Oats",
equation: Equation.henderson,
a: 0.000085511,
@ -203,6 +203,40 @@ export const GrainExtensions: Map<pond.Grain, GrainExtension> = new Map([
weightConversionKg: 15.4222988297197,
bushelsPerTonne: 64.842
}
],
[
pond.Grain.GRAIN_OATS_B,
{
name: "Oats b",
group: "Oats",
equation: Equation.chungPfost,
a: 442.85,
b: 0.21228,
c: 35.803,
setTempC: 32.0,
targetMC: 13.6,
img: OatImg,
colour: "#79955a",
weightConversionKg: 15.4222988297197,
bushelsPerTonne: 64.842
}
],
[
pond.Grain.GRAIN_OATS_C,
{
name: "Oats c",
group: "Oats",
equation: Equation.oswin,
a: 12.412,
b: -0.060707,
c: 2.9397,
setTempC: 32.0,
targetMC: 13.6,
img: OatImg,
colour: "#79955a",
weightConversionKg: 15.4222988297197,
bushelsPerTonne: 64.842
}
],
[
pond.Grain.GRAIN_PEANUTS,

View file

@ -472,7 +472,7 @@ export default function Devices() {
]
if (hasPlenums) {
columns.push({
title: "Plenum",
title: "Temp/Humidity",
// sortKey: "hi",
// disableSort: true,
render: (device: Device) => {