Repository navigation
Feature/admin venue IC telegram handle - #168
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
Venue ICs are often easiest to reach on Telegram, but a venue could only list an IC name, email and phone number. Users with a booking question had no way to find the IC's Telegram.
This PR adds an optional Venue IC Telegram Handle to each venue and shows it to users in the booking Help popup.
What changed
Admin (Admin → Venues → Create / Edit)
@handleorhandle; the@is removed before saving.Users (booking creation → Help button)
https://t.me/handle(opens in a new tab).Backend
Venuegetsic_telegram_handle(CharField, max 32, blank allowed, regex validated), migration0019.venue_to_json(full_details=True); accepted byPOST /venues/andPUT /venues/:idthroughVenueSerializer, which rejects invalid handles with a 400.test_serializer_validates_telegram_handlecovers valid, empty and invalid handles.Notes
@, so the link can be built directly and the data stays consistent. The backend rejects a leading@; the frontend removes it before sending.Testing
python manage.py test venuesin the backend container: 5/5 pass.tsc --noEmitand ESLint pass on the frontend.