chicago-tool-library / circulate

A lending library management system
Other
82 stars 66 forks source link

Add pick-up and drop-off times to reservations for admins and members #1652

Closed crismali closed 2 months ago

crismali commented 2 months ago

What it does

This allows admins to select pick-up and drop-off times when creating or updating a reservation and adds a requirement that the pick-up time must be selected before a reservation becomes "requested"

Members can also add these times when creating a reservation but at the moment there doesn't seem to be a way for them to edit a reservation without typing in the url.

Why it is important

Implements #1526

UI Change Screenshot

New reservation selecting a pickup time: Screenshot 2024-08-25 at 12 01 06 PM

New reservation selected pickup time: Screenshot 2024-08-25 at 12 01 16 PM

New reservation validation errors: Screenshot 2024-08-25 at 12 01 47 PM

Show reservation with pickup/dropoff times Screenshot 2024-08-25 at 12 02 10 PM

Requesting a reservation without a pickup time: Screenshot 2024-08-25 at 12 12 25 PM

Member reservation show with pickup/dropoff times: Screenshot 2024-08-25 at 12 17 30 PM

Implementation notes

The reservation now belongs to a pickup event and dropoff event (both optionally). Moving the reservation from "pending" to "requested" (but really basically any other status) requires the pickup event. This will probably need to be updated once canceling or duplicating or other reservation features are implemented.

If someone goes to edit a reservation where the pickup or dropoff events have already passed they'll still appear in the edit dropdowns.