Make timeline and deadline dates fully data driven #168
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changed the Settings to add a second exclusion so the main config page can ignore the timeline dates (they begin with 'config.timelineDates.') and to add a tab for Timeline Dates filtering on the same. The config values are meant all to be dates. As code and value are both 100 characters and the database doesn't care I use the code as the label to display. Finally added an entry to the configuration to read the config.timelineDates values and add an array of label and date entries.
Created a CutoffDateWarning component that takes a date key (i.e. the label) and if the date value of that is in the past it shows a warning not to register without first contacting registration by email to the email in ContactEmail configuration. If that date is in the future it shows nothing.
Created a TimelineList component that takes the array of lable/date values, and an optional ignore before date. Again, it's a label of any of the dates. It takes the array, filters out any dates before the date with that label, sorts it in ascending order on the dates and displays them. If the date is in the past it uses the class deadlineExpired, otherwise deadline.
Changed the class deadlineExpired from red (error.main) to a 700 gray with strike through.
In use it cleans up the Welcome page.
ACUS' is now:
More imortantly, the cutoff date warning doesn't require reading and interpreting, but shows as needed.
And the timeline dates are easily maintained in settings and ones can be added/removed, or, for this year, left out, by leaving their value set to last year's.
Resolves: #166, #167