Open orenyk opened 8 years ago
Note that we'll need to find a timepicker to go along with the jQuery UI Datepicker we already use - a quick Google search found a few options so we should investigate.
I'll try to take a stab at it, will dive into it over the weekend
I'm looking at the issue, and I'm trying to find which controller is involved and I quickly realized that I don't understand the issue completely. @orenyk as the person who opened the issue could you shed some light ion it?
Sure. Steps to replicate:
/reservations/:id/edit
)Expected: there is a field that allows for the checkout date and time to be edited Actual: no such field
We'd have another field to edit the checkin date/time as well, although these fields would only show up if the reservation has already been checked out and/or checked in. Part of the issue is that our jQuery datepicker only supports dates, but not times as well, so we'd have to figure out how to input times.
Hope that helps!
@orenyk - As mentioned at the scrum meeting, the functionality is up and running. I've been trying to write the specs for this functionality (i.e. changing the checkout/checkin times) regardless of the timepicker.
I'm trying to build off the existing reservation controller but I've experienced some difficulties. The reservation that is used in the specs doesn't have a checkout time (even in the spec that says: 'with checked out equipment item').
Any ideas on how to go about it? my initial idea is to create a reservation with a checkout and checkin time and then try to change them.
Edit - @orenyk any ideas?
You should be able to set the initial checkout / checkin time directly (e.g. @reservation.update_attributes(checked_out: Time.zone.now, checked_in: Time.zone.now + 1.day)
) and then test that they change to some new values once you execute the request. Does that help?
Yup! done creating a pull request
It's been requested that the check-in / check-out time be modifiable for cases where the staff don't process equipment in Reservations immediately after it's been handed out or returned. Not sure the best way to handle this, let's discuss and figure it out.