Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Ticket model * some basic untested functionality * tested routes, added view ticket count route * lint * email confirmation, qrcode, retrieve ticket * remove commented stuff * created cart model and add to cart, validate cart, and checkout from cart views * added holding expiration functionality, holding is initiated at checkout and updated when any cart is validated before checkout * lint and tests * added cart creation for a user upon adding to a cart if a cart does not yet exist * slightly changed holding updates, added update to holding status when adding to cart * atomic transactions, cleanup, and some views * holding, validation improvements, perms * some docstring stuff * rebase + pipfile lock * use master pipfile.lock * lint and pre-commit fixes * minor bugs * add to populate script * lint * rebase, fix some documentation * Update ticketing (backend) branch (#612) * Merge master into ticketing * Move ticketing migration to end * Revert "Update ticketing (backend) branch (#612)" This reverts commit 03214af. * Merge ticketing branches (#615) Merge frontend ticketing branch into main ticketing feature branch. --------- Co-authored-by: Rohan Gupta <[email protected]> Co-authored-by: dfeng678 <[email protected]> Co-authored-by: alnasir7 <[email protected]> Co-authored-by: Mohamed Abaker <[email protected]> Co-authored-by: DiiZyy <[email protected]> Co-authored-by: printer83mph <[email protected]> Co-authored-by: Avi Upadhyayula <[email protected]> Co-authored-by: cphalen <[email protected]> Co-authored-by: Alexander Kyimpopkin <[email protected]> Co-authored-by: Joy Liu <[email protected]> Co-authored-by: Rohan Moniz <[email protected]> Co-authored-by: joel8019 <[email protected]> Co-authored-by: Eunsoo Shin <[email protected]> * Merge master into ticketing * Fix TS errors * Update Links to new Next.js behavior Make TicketsTab not crash * missed merge conflict * migrations * Ticketing integrate cybersource -> ticketing (#652) * Add check on event deletion * add cybersource package * Capture context generation + local dev setup instructions (#645) * capture context view * fix populate * move capture context generation to checkout view * Optimize Django ops in cart validation * Use Q objects in cart validation * switch out nginx for local-ssl-proxy --------- Co-authored-by: aviupadhyayula <[email protected]> * fix target origin url * Closes #632 (#648) * This commit resolves #632: - Add logic to interact with the CyberSource API to validate transaction data and also confirm the payment. - Add appropriate error handling for API invocation failures causing transaction failure. - Store the transaction data in a new model `TicketTransactionRecord` for bookkeeping purposes. Each ticket is also associated with an instance of this class. - On transaction success, assign the ticket to the user, remove holds and from cart, and send out confirmation email. * Address PR comments, query opt, and others - More judicious use of `select_for_update`: only lock when updating holder/owner. - Better prefetching/bulk updating throughout the query logic - Return HTTP status codes - Refactor as per PR comments * Validate the transient token's signature - I tested the workflow from `initiate_checkout` to `complete_checkout` and was able to get it working. - Ironed out a few bugs - Add the `reconciliation_id` as a field on the transaction record; could be useful to generate reports. We'll need to figure out what else to store to interact with their reporting API. * Make reconciliation_id nullable to support free tickets * Address nit, refactor ticket count logic to SQL * merge migrations... * pipenv lock again * Pin uwsgi...2.0.25 breaks CI --------- Co-authored-by: aviupadhyayula <[email protected]> Co-authored-by: Rohan Moniz <[email protected]> * Set and enforce order limit on ticket purchases (#654) * Set & enforce order limit on ticket purchases * Add migration * Default tix order limit to 10 * Consolidate migrations * Check each carted event's order limit * Move limit validation to `add_to_cart` * Fix typo 😔 * Address nits with validation logic * Minor refactor * Check ticket holds before completing checkout (#657) * Ticketing price integration (#659) * Integrate ticket price field into ticket creation/list views, as well into ticket creation frontend. * Enforce non-negative ticket prices at creation * Add frontend checks for fractional/negative ticket count and cost. * Prevent users from entering negative/fractional ticket counts/price for now. --------- Co-authored-by: aviupadhyayula <[email protected]> * feat(events): new events page * todo remove * Add support for group discounts (#661) * Add group discount fields to ticket model * Ingest group discount info at ticket creation * Add validator for group size * Add comments * Apply discounts when checking out * Remove model-level validators * Remove validators from migration * Improve comments * Minor refactor * Default group_discount to 0 * Remove check for discount in cart calculation * Consolidate validation checks upon ticket creation * Fix typo in validation upon ticket creation * Owned Tickets Tab in Settings (#663) * Owned tickets tab skeleton code. * 🎉 Functional but suspicious code * 🧹 Fix some good practice --------- Co-authored-by: Julian Weng <[email protected]> * Ticketing backend tests (#666) * Add test cases for backend ticketing APIs Long overdue addition of tests to the ticketing backend. Tests and fixes all the APIs under the Event and Ticket models. There are more complex workflows with race conditions etc that are not tested, but should be at some point. Unmerged functionality is also not tested yet. * Don't use locked rows to groupby * Set cybersource settings in CI * Address feedback * Rm console.log on frontend * Add Group Discount to Create Ticket Flow and Auto Scroll Down (#669) * Add to cart feature (styling is borked) * 🐛 Broken code * 🐛 fixed * 🎨 Readd event preview * 🧹 Less jank way of doing group discount visibility * 🎨 Address comments and actually type things * 🎨 Address nit --------- Co-authored-by: Julian Weng <[email protected]> Co-authored-by: Eunsoo Shin <[email protected]> * Use capture context in cart checkout (#671) * Use capture context to verify transient token * Add migration * Minor changes to documentation * Add tests * Add comment explaining max char length * fix N+1 query due to attribute * Add support for ticket drop times (#672) * Add ticket drop time to event attributes * Set ticket drop time at tickets creation * Add unit tests * Minor refactor to tests * Revert unneeded changes to Pipfile.lock * Allow users to specify drop time + more guards/tests * Remove dev artifact in tests * Fix all typos with "transferred" * Add 403 to response schema * Only display tickets after they've dropped * Add ability to transfer ownership of tickets (#653) * add ability to transfer tickets * send confirmation emails on transfer * nit * address comments, add ticket creation serializer * fix migration * remove print statement 😔 * grrr * remove serializer, add tests * tests + fix * here at Penn Clubs, we love nits * lint * Ticketing Cart Pre-Checkout (#670) * Cart skeleton * Basic UI to payment. * More appropriately-sized shopping cart icon * Payment integration 1st step. * fix(move) * fix(TicketCard): extract and abstract * checkout flow ui * wip(payment) * 🎉 Add ability to remove tickets from cart * 🐛 Better backend error and remove cart logic * 🎉 Modify sold_out to return event type and count * 🎉 Add cart empty view and edit mode * 🎨 Add empty view * 🎨 Grafik design is my passion * 🎉 Modify edit success and display toast, correct e2e behavior * 🐛 Change color to make edit mode more obvious * 🎉 Toast for sold out tickets * Add frontend auth check to cart page and fix sold_out toast functionality (multiple toasts per ticket, ticket event name) * Fix backend tests for group discounts, new cart API, and more (#675) * Refactor cart summation to helper fn * Add tests for group discounts and cart totaling * Minor change to docs * Only populate `sold_out_tickets` if tickets cannot be replaced * Refactor tests to use new cart API * Make openAPI docs happy * Make `_calculate_cart_total` static method * Group discount shouldn't activate below threshold * Fix API docs & improve tests * Add minor subtest * Align tests with new API * Improve invalid ticket replacement * 🎉 Default to 1 ticket when buying smh * 🎉 Add a bunch of style and features * 🎨 Kinda responsive --------- Co-authored-by: Julian Weng <[email protected]> Co-authored-by: Eunsoo Shin <[email protected]> Co-authored-by: Avi Upadhyayula <[email protected]> Co-authored-by: aviupadhyayula <[email protected]> * Fix breaking changes introduced in #670 (#680) * Add guards on ticketed event deletion (#667) * Move guards on event deletion to the right place * Add @update_holds to destroy * Fix typo in testing docs * Test guards on event deletion * Improve test case logic * Address nit in tests * Default billing phone number to null * Basic mobile responsiveness for TicketCard * Add route for admins to issue tickets to users (#679) * Add issues_ticket route * Improve efficiency * Add tests for `issue_tickets` * Minor refactor to tests * Create transaction records after issuing * Make unit test more exhaustive * Return errors as array in response * Lock issue_tickets behind perms * Revert "Lock issue_tickets behind perms" This reverts commit 47e63b0. * Remove unnecessary holds * Change input schema naming * Auth lock issue_tickets route * Add test for perms * Add route for attendance tracking (#684) * attendance tracking * add comment * Fix ticket interface for sellers (#665) * Fix ticket interface for sellers. * Clarify type for buyersPerm. * 🎨 Yay * Frontend for admin ticket transfering and base props fix. * 🎉 Add issue ticket * Frontend for marking tickets as attended/not attended * 🎨 Split String and handle input edge case * 🧹 Hehe * 🚨 Some changes with a fake api endpoint * 🎉 Some fire UI * 🐛 Error Response not showing correctly * 🎨 Brr * Lint, improve UI language, fix items remaining in cart after deletion through button, fix updating item quantities in cart through button, fix success vs error toast for adding tickets to cart. * API integration for issuing tickets * Ticket transfer interface * Integrate attendance into frontend and add warning popup for un-attending people * 🎨 Nit * 🐛 Joy fixes everything --------- Co-authored-by: Joy Liu <[email protected]> Co-authored-by: Joy Liu <[email protected]> * ✨ feat(checkout): cybersource integration * 🎨 It's toast time * 🛠️ fix(close): handle modal close with confirm * ✨ feat(success): checkout success message * ❌ feat(handle error) * 🛠️ fix(message): more explicit message for modal close confirmation * Fix lint, min/max add to cart quantities per class * Add support for free tickets (#658) * Added support for free tickets * fix lint error * fix lint error * Added free ticket tests * Address feedback * Address feedback * Add user a parameter to _give_tickets * ⬇️ Downgrade Eslint dependency * Add ability to make tickets not buyable + disable paid tickets for beta (#685) * Add buyable field and try to enforce it. Disable tickets with payments on frontend. * Add frontend handling for no-cost cart. * Ticketing Beta branding and File Cleanup (#686) * Add beta tag everywhere and add frontend auth check for issuing tickets * Delete legacy events code * Merge master into ticketing (#687) * fix expires_at test test (#664) * Cast exception to str in management command * Move submissions from /apply to user profile (#638) * finished changes * Remove Wharton applications from user profile (and update branch) (#641) * Update main.ts * Update frontend dependencies (#616) Upgrade from Node 14 to Node 20 and bump frontend dependency versions to current. --------- Co-authored-by: Julian Weng <[email protected]> * Update README.md * Update README backend instructions and intro blurb * Fix admin page access on frontend. (#626) Add frontend check for existing pre-loaded permissions on /admin. * Removed deprecated QuestionResponse model and duplicate line (#625) * Remove deprecated QuestionResponse model * remove duplicate line: 'rank field in Club' * made migrations after deleting QuestionResponse * Streamline django storages config (#618) * Add staticfiles * Fix AWS bucket routing for boto * Try setting credentials through env vars * Try renaming env vars? * Set AWS region * add back staticfiles * Remove region and signature version * Move credentials to new API * Use env variables and remove staticfiles * Add back staticfiles * Make code look pretty --------- Co-authored-by: Rohan Moniz <[email protected]> * Add hour to displayed application deadline (#628) * Add hour for application due dates * Make linter happy * Specify Eastern time zone * Display username if name is empty (#637) * finished changes * Remove Wharton applications from user profile * Fix weird artifacts from merge --------- Co-authored-by: Joy Liu <[email protected]> Co-authored-by: Julian Weng <[email protected]> Co-authored-by: Rohan Moniz <[email protected]> Co-authored-by: Thomas Ngulube <[email protected]> Co-authored-by: Owen Lester <[email protected]> * Bump debounce timeout to 400ms (#640) * Bump debounce timeout to 400ms * Make linter happy * small changes * added type * merging * deleted file --------- Co-authored-by: Avi Upadhyayula <[email protected]> Co-authored-by: Joy Liu <[email protected]> Co-authored-by: Julian Weng <[email protected]> Co-authored-by: Rohan Moniz <[email protected]> Co-authored-by: Thomas Ngulube <[email protected]> * Add carousel (#622) * add carousel * Old react-multi-carousel * fixed npm yarn * remvoed packagelock.json * fixing issues * change height * minor changes * deleted a comment * merging? * delete one onClick * change breakpoint * Revert "Move submissions from /apply to user profile (#638)" (#673) This reverts commit 29d9a12. * Revert "Add carousel (#622)" (#674) This reverts commit fcab615. * Improve error reporting in mgmt cmds (#678) * Fix bug in Excel column names (#683) * Remove unused `tickets_count` field --------- Co-authored-by: Thomas Ngulube <[email protected]> Co-authored-by: owlester12 <[email protected]> Co-authored-by: Joy Liu <[email protected]> Co-authored-by: Julian Weng <[email protected]> Co-authored-by: Rohan Moniz <[email protected]> --------- Co-authored-by: cphalen <[email protected]> Co-authored-by: dfeng678 <[email protected]> Co-authored-by: Avi Upadhyayula <[email protected]> Co-authored-by: Julian Weng <[email protected]> Co-authored-by: alnasir7 <[email protected]> Co-authored-by: Mohamed Abaker <[email protected]> Co-authored-by: DiiZyy <[email protected]> Co-authored-by: printer83mph <[email protected]> Co-authored-by: Alexander Kyimpopkin <[email protected]> Co-authored-by: Joy Liu <[email protected]> Co-authored-by: Rohan Moniz <[email protected]> Co-authored-by: joel8019 <[email protected]> Co-authored-by: Eunsoo Shin <[email protected]> Co-authored-by: Anthony Li <[email protected]> Co-authored-by: aviupadhyayula <[email protected]> Co-authored-by: Joy Liu <[email protected]> Co-authored-by: Thomas Ngulube <[email protected]> Co-authored-by: owlester12 <[email protected]>
- Loading branch information