Skip to content

Build out new reservation flow for members#2059

Merged
jim merged 13 commits intomainfrom
jim-member-reservation-ui
Mar 31, 2026
Merged

Build out new reservation flow for members#2059
jim merged 13 commits intomainfrom
jim-member-reservation-ui

Conversation

@jim
Copy link
Copy Markdown
Member

@jim jim commented Dec 18, 2025

What it does

  • Renames "group lending" throughout the system to "reservable items" to better reflect the use cases.
  • Provides the UI for members to reserve items and associate them with appointments. This includes the concept of a "current reservation" which we'll probably want to tweak the language on. But it provides a cart-like interface for adding items to a reservation and then requesting them. The existing system tests for reservations were updated to cover these changes.
  • Updates the dev data to have reservable items, etc. to make it easier to develop these features.

@jim jim force-pushed the jim-member-reservation-ui branch from 75b2cc8 to 007bf93 Compare February 4, 2026 03:06
@jim jim marked this pull request as ready for review March 4, 2026 00:52
@jim jim requested a review from crismali March 7, 2026 15:33
Copy link
Copy Markdown
Contributor

@crismali crismali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few little things but I think it looks good. 🔥

The main thing is that there is some nil handling after ActiveRecord finds which I think raise errors if the record can't be found.


assert_text reservation.name
assert_text reservation.status
assert_text formatted_date_only(reservation.started_at)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI fails on this assertion because it's looking for "March 01" but the page contains "March 1" which means that formatted_date_only helper function likely needs to be tweaked.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have a :month_day_year option that removes the leading zero it turns out!

@@ -0,0 +1,6 @@
<ul class="tab">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is only used in the one place it might make sense to just put it inline in the index.html.erb for now.

module Account
class ReservationHoldsController < BaseController
def create
@reservation = current_member.reservations.find(reservation_hold_params[:reservation_id])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will raise if it can't find the reservation, so the if on the next few lines may not be necessary. Maybe a rescue_from is more appropriate? Or a find_by(id: reservation_hold_params[:reservation_id])

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. I think I was trying to have some of the error handling redirect the user to different places, but it's really just a safeguard and shouldn't really be hit anyway. I'll simplify it using rescue_from.

@jim jim linked an issue Mar 31, 2026 that may be closed by this pull request
@jim jim merged commit add508b into main Mar 31, 2026
10 checks passed
@jim jim deleted the jim-member-reservation-ui branch March 31, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rework reservable item listing and reservation building.

2 participants