-
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
Added warnings to admin preferences component #1393
Conversation
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.
Thanks to @hinyan17 for doing this improvement. Review and testing found it works fine. I've made a couple of comment to consider.
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.
Thanks to @hinyan17 for addressing the comment. I'm sorry this sat so long - somehow I missed the update. I've made a couple of comments to consider.
1764b12
to
8395239
Compare
While I was going through CreateMeterModalComponent I noticed that all of the invalid functions are called anonymously and inline. Also, the final check if the whole form is valid is done with a redux selector, isValidCreateMeter. Should I implement something similar for PreferencesComponent? It looks a lot cleaner than my current solution and is probably better for consistency. |
That seems fine if you want to do it. |
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.
Thanks to @hinyan17 for the quick update. I responded to your two questions and made one small comment.
…check to submit button
8395239
to
11a2adf
Compare
- Put braces around implicit functions as preferred by OED. - Reorder two functions so same as shown to user. - Add file size limit to check functions and form feedback. - Minor formatting.
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.
Everything now looks good. Thanks to @hinyan17 for another accepted contribution to OED.
Description
Added input validation and warnings for fields on the admin preferences form. Everything that wasn't multiple choice or drop down menu was checked. These fields are: meter reading frequency, min and max reading value, min and max date, reading gap, number of errors, warning file size, and file size limit.
Fixes the TODO associated with PreferencesComponent. (36 on the TODO list)
Type of change
Checklist
Limitations
none