-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Max min values #1396
base: development
Are you sure you want to change the base?
Max min values #1396
Changes from 1 commit
92afc55
8953030
4edc46d
c29b70c
a9380c9
e72f18e
fb0b593
99f5de5
55a44d8
500c00e
d162834
1b3a182
b4f9431
ca4f316
788a59e
057b53f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -334,8 +334,8 @@ const LocaleTranslationData = { | |
"meter.enabled": "Updates:", | ||
"meter.endOnlyTime": "Only End Times:", | ||
"meter.endTimeStamp": "End Time Stamp:", | ||
"meter.minVal": "Minimum Reading Value Check", | ||
"meter.maxVal": "Maximum Reading Value Check", | ||
"minVal": "Minimum Reading Value Check", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be placed alphabetically in all languages. Also, it does not follow the key naming conventions. I know the old value was something similar to this but lets use |
||
"maxVal": "Maximum Reading Value Check", | ||
"meter.minDate": "Minimum Reading Date Check", | ||
"meter.maxDate": "Maximum Reading Date Check", | ||
"meter.maxError": "Maximum Number of Errors Check", | ||
|
@@ -846,8 +846,8 @@ const LocaleTranslationData = { | |
"meter.enabled": "Mises à Jour du Mèters", | ||
"meter.endOnlyTime": "End Only Time:\u{26A1}", | ||
"meter.endTimeStamp": "End Time Stamp:\u{26A1}", | ||
"meter.minVal": "Minimum Reading Value Check\u{26A1}", | ||
"meter.maxVal": "Maximum Reading Value Check\u{26A1}", | ||
"minVal": "Minimum Reading Value Check\u{26A1}", | ||
"maxVal": "Maximum Reading Value Check\u{26A1}", | ||
"meter.minDate": "Minimum Reading Date Check\u{26A1}", | ||
"meter.maxDate": "Maximum Reading Date Check\u{26A1}", | ||
"meter.maxError": "Maximum Number of Errors Check\u{26A1}", | ||
|
@@ -1359,8 +1359,8 @@ const LocaleTranslationData = { | |
"meter.enabled": "Medidor activado", | ||
"meter.endOnlyTime": "Solo tiempos finales.", | ||
"meter.endTimeStamp": "Marca de tiempo al final:", | ||
"meter.minVal": "Revisión del valor mínimo de lectura", | ||
"meter.maxVal": "Revisión del valor máximo de lectura", | ||
"minVal": "Revisión del valor mínimo de lectura", | ||
"maxVal": "Revisión del valor máximo de lectura", | ||
"meter.minDate": "Revisión de la fecha mínima de lectura", | ||
"meter.maxDate": "Revisión de la fecha máxima de lectura", | ||
"meter.maxError": "Revisión del número máximo de errores", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,7 +82,9 @@ export const NoUnit: UnitData = { | |
suffix: '', | ||
displayable: DisplayableType.none, | ||
preferredDisplay: false, | ||
note: '' | ||
note: '', | ||
minVal: -Infinity, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Other places use |
||
maxVal: Infinity | ||
}; | ||
|
||
/** | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -189,8 +189,8 @@ async function uploadReadings(req, res, filepath, conn) { | |
const mapRowToModel = row => { return row; }; // STUB function to satisfy the parameter of loadCsvInput. | ||
|
||
const conditionSet = { | ||
minVal: meter.minVal, | ||
maxVal: meter.maxVal, | ||
minVal: minVal, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See other comment. minVal & maxVal are undefined. |
||
maxVal: maxVal, | ||
minDate: meter.minDate, | ||
maxDate: meter.maxDate, | ||
threshold: meter.readingGap, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,8 +43,8 @@ async function readEgaugeData(meter, conn) { | |
isEndOnly = false, //true | ||
shouldUpdate = false, | ||
conditionSet = { | ||
minVal: meter.minVal, | ||
maxVal: meter.maxVal, | ||
minVal: minVal, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another place min/maxVal not set. |
||
maxVal: maxVal, | ||
minDate: meter.minDate, | ||
maxDate: meter.maxDate, | ||
threshold: readingGap, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,8 +113,8 @@ async function loadLogfileToReadings(serialNumber, ipAddress, logfile, conn) { | |
// Unsure if previous values should not change but going to assume want the latest one sent. | ||
shouldUpdate = true, | ||
conditionSet = { | ||
minVal: meter.minVal, | ||
maxVal: meter.maxVal, | ||
minVal: minVal, | ||
maxVal: maxVal, | ||
minDate: meter.minDate, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another place where min/maxVal is not set. |
||
maxDate: meter.maxDate, | ||
threshold: readingGap, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,8 +106,8 @@ async function readMamacData(meter, conn) { | |
// Previous Mamac values should not change. | ||
shouldUpdate = false, | ||
conditionSet = { | ||
minVal: meter.minVal, | ||
maxVal: meter.maxVal, | ||
minVal: minVal, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another place min/maxVal not set. |
||
maxVal: maxVal, | ||
minDate: meter.minDate, | ||
maxDate: meter.maxDate, | ||
threshold: readingGap, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -427,8 +427,8 @@ async function insertMeters(metersToInsert, conn) { | |
await conn.none(query); | ||
} | ||
const conditionSet = { | ||
minVal: meter.minVal, | ||
maxVal: meter.maxVal, | ||
minVal: minVal, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure what this is supposed to be but minVal & maxVal variables are not defined. |
||
maxVal: maxVal, | ||
minDate: meter.minDate, | ||
maxDate: meter.maxDate, | ||
threshold: meter.readingGap, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unclear on the relationship of this useEffect and handleUnitChange. They seem to do similar work. I tried commenting this out and it did not seem to matter. It is not in create unit. I may be missing something so let me know.
Also, a comment on what this is doing would be nice. For example, it is getting the min/max reading value from the unit to make that the starting value for the meter when a unit is selected.