Lock Vehicle button shouldn't vanish when booking time period ends #74
Labels
bug
Something isn't working
Difficulty: Medium
A mid-range ticket - some size or complexity but not really complex
p2
Priority 2 (highly frustrating but workarounds exist)
At the moment the "lock" / "unlock" buttons in the bookings UI for customers only appear
if booking_start_time < now() < booking_end_time
. This means if you are late returning a vehicle you can't look it from within the web app.The current logic is correct for the
unlock
button, however, it needs to be changed for thelock
button to be the same as the logic checking whether you can lock a vehicle with a card tap works, which is essentially:The
hardware.box
object stores the currently active booking as part of it's state. To avoid duplication of code, there is probably already a function somewhere that checks this case and handles it properly for card taps. If possible, we should use the same logic to check whether to show/accept the "ulock" action in the bookings UI so that it always stays consistent.The text was updated successfully, but these errors were encountered: