Availabilities - maar35/film-festival-planner GitHub Wiki
Responsibilities of the Availabilities page
The Availabilities page allows maintenance of fan availabilities during the current festival.
Features
Input fields
Below are the fields that can be entered by the user. All input is through pick-lists.
- Fan.
- Start day.
- Time within start day.
- End day.
- Time within end day.
Notes on dates and times:
- Only days within the festival can be picked.
- Only a pre-set range of times can be picked.
- A festival day starts and ends at fixed times, named day start time and day break time.
- Currently, festival day start time is 08:00 and day break time is 06:00.
- For comparison, times in the period between 23:59 and day break are converted to the next calendar date.
- This means that for the last festival day, 06:00 will be interpreted as 06:00 the next date, which is not within the festival day range.
Procedure
If the user has selected a fan, a start day and time, and an end day and time, the following situations are handled in this order:
- New: Given period has no overlap with existing periods.
- Error: Given end time is earlier than start time.
- Partly delete: Given period is within an existing period.
- Merge: Given period overlaps one or more existing periods.
New period
A new period with correct start-end sequence will be added to the availability of the given fan when submitted.
Error
A given period with end time earlier than start time cannot be submitted.
Partly delete
When a period is submitted that lies within an existing period, the submitted period will be deleted out of the existing period.
So generally two periods remain: the part of the existing period before the given period and the part after the given period.
If a bound of the existing period equals a bound the given period, no period remains at that bound.
This means that if the given period coincides with an existing period, the entire existing period will be deleted.
Merge
If the given period is not entirely within an existing period, it will be merged with any overlapping existing period when committed.
The result will be one new period, replacing the existing period or periods.
Confirmation
Before any commit, the commit button is disabled, and two new buttons are displayed, a cancel button and a confirm button.
In the cases where existing periods will be effected (partly deleted, deleted, or replaced), a warning is displayed on top of the page, indicating the consequence of submitting the new period.
Also a log will be displayed with details of the to be submitted actions and, if applicable, the actions following a submit.
List of fan availabilities
In the lower part of the page, a list of existing availabilities is displayed.
The list can be filtered as to display only the availability of one film fan.