Repository navigation
Visible cancel booking button - #170
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
To cancel a booking, a user had to click the coloured status button (e.g. Pending) to reveal a hidden Cancel option. Nothing on the page hinted at this, so users didn't know they could cancel. Cancelling also happened instantly, with no confirmation.
What changed
In the user's bookings table (admin table unchanged):
screenshot
Where to look
booking-status-button.tsx: new user-view branch (label, Cancel button, confirm popup). It reuses the existingcancelButtonandonUpdateStatus, so the cancel request, toast and store update are unchanged. A wrapper stops click propagation so the row's expand handler doesn't fire. React passes popup clicks up to the parent, so this covers the popup too.booking-base-table.tsx: builds the "venue · time" line with the existingdisplayDateTimeRangeand passes it as a new optionaldetailsprop.booking-user-table.tsx: Status column width.booking-status-button.module.scss: layout and popup styles.Testing
tsc --noEmitand eslint pass.