shift-org / shift-docs

Shift2Bikes: website and calendar for shift and pedalpalooza
https://shift2bikes.org
Other
22 stars 17 forks source link

Consolidate enum labels and default values for front-end #607

Closed carrythebanner closed 9 months ago

carrythebanner commented 9 months ago

The front-end was defining enum values & labels in multiple places (e.g. area 'P' = 'Portland'). This consolidates those in one place, and separates the UI-building logic from the specific values.

carrythebanner commented 9 months ago

This also encapsulates the code building the time options into its own function.

Eventually we may want to replace the drop-down menu of times with a basic <input type="time">, but I ran into a couple of issues when I attempted. For now, this just streamlines populateEditForm() by encapsulating the existing time logic.