Skip to content
This repository was archived by the owner on Jul 24, 2020. It is now read-only.

[1243] Add equipment item notes only after reservations save #1281

Merged
merged 1 commit into from
Sep 7, 2015

Conversation

orenyk
Copy link
Contributor

@orenyk orenyk commented Jun 19, 2015

Resolves #1243

  • remove EquipmentItem#make_reservation_notes calls from Reservation
    methods
  • only add equipment item notes once the relevant reservation has been
    saved to the database
  • add specs for failed checkout / checkin to ensure that equipment item
    notes aren't saved
  • improve current_user feature spec helper method
  • fix N+1 query in the manage reservations view
  • add exception handling to ReservationsController#archive

Resolves #1243
- remove EquipmentItem#make_reservation_notes calls from Reservation
  methods
- only add equipment item notes once the relevant reservation has been
  saved to the database
- add specs for failed checkout / checkin to ensure that equipment item
  notes aren't saved
- improve current_user feature spec helper method
- fix N+1 query in the manage reservations view
- add exception handling to ReservationsController#archive
@AlanLiu96
Copy link
Contributor

Checked it out! It works as expected now. Design wise though, it might improve workflow if not checking ToS would generate an alert that blocks the form from being submitted much like how not selecting a model generates an alert, instead of clearing the form and displaying an error flash.

@orenyk
Copy link
Contributor Author

orenyk commented Sep 7, 2015

That's a good point, we could also make the ToS checkbox required for checkout requests. I'll go back into this branch and see how easy it is to implement.

@orenyk
Copy link
Contributor Author

orenyk commented Sep 7, 2015

On looking into this further, there's no simple way to make a check_box_tag required without some JS and more complex front-end hackery. Given the hopeful rewrite to come, at some point, I don't think it's worth spending the time on it right now. Great suggestion though, we should cross-reference with the existing checkout form issue (#1061 and #1222). Merging!

orenyk added a commit that referenced this pull request Sep 7, 2015
[1243] Add equipment item notes only after reservations save
@orenyk orenyk merged commit e11bdf9 into master Sep 7, 2015
@orenyk orenyk deleted the 1243_fix_ei_notes branch November 24, 2015 20:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Equipment item notes saved even if checkout fails
2 participants