su-fit-vut / kachna-online

Students' Club U Kachničky: Member's portal
MIT License
5 stars 5 forks source link

Existing states checks in state planning #118

Open ondryaso opened 2 years ago

ondryaso commented 2 years ago

The state planning form could be improved in several ways:

  1. Dynamically check if there's a colliding state for the selected timespan and show validation errors.
  2. Highlight days that have planned states on them in the dropdown calendar.
  3. Disable days in the past in the dropdown calendar.

For 1), an API endpoint must be added that performs the check for a given timespan and returns either true/false, or even a list of colliding states. This is a better solution than fetching a list of planned states and reimplementing the collision constraints in the frontend.

Modifications 2) and 3) are doable without API changes but they depend on the dropdown calendar control's level of extensibility.