giraffe
giraffe copied to clipboard
Checkout api enhancement
Fixes #38.
Summary by Sourcery
Enhance the Eventyay search check-in component and its Pinia store to support both check-in and check-out workflows, including single and bulk check-out, with improved UI feedback via popups and badge preview
New Features:
- Add check-out mode toggle and support for exiting attendees via the check-in/redeem API
- Implement an event-wide “Checkout All Attendees” action with confirmation dialog
Enhancements:
- Show attendee info popup with countdown timer, note input, and badge generation preview using StandardButton and BadgePrintPreview components
- Unify check-in and check-out flows in processEventyayCheckIn store with new isCheckoutMode, toggleMode, and eventCheckout actions
- Resume QR camera scanning after each operation
Reviewer's Guide
This PR enhances the Eventyay check-in component and its store to support a dedicated checkout mode, including new store state and actions, dual API endpoints for entry/exit, a ‘checkout all’ feature, UI updates with a mode toggle and dynamic buttons, and a confirmation popup with countdown and badge preview.
Sequence diagram for check-in and checkout API interaction
sequenceDiagram
actor User
participant UI as EventyaySearchCheckIn.vue
participant Store as processEventyayCheckInStore
participant API as Eventyay API
User->>UI: Scan QR code / Click check-in/out
UI->>Store: checkIn(order)
alt Checkout mode
Store->>API: POST /checkin/redeem/ (type: exit)
else Check-in mode
Store->>API: POST /orderpositions/{id}/checkin/
end
API-->>Store: Response (status)
Store->>UI: showSuccessMsg/showErrorMsg
UI->>User: Show popup with result
Sequence diagram for event-wide checkout
sequenceDiagram
actor User
participant UI as EventyaySearchCheckIn.vue
participant Store as processEventyayCheckInStore
participant API as Eventyay API
User->>UI: Click 'Checkout All Attendees'
UI->>Store: eventCheckout()
Store->>API: POST /events/{eventSlug}/checkout/
API-->>Store: Response (status, checkout_count)
Store->>UI: showSuccessMsg/showErrorMsg
UI->>User: Show popup with result
Class diagram for updated processEventyayCheckInStore
classDiagram
class processEventyayCheckInStore {
+message: ref
+showSuccess: ref
+showError: ref
+badgeUrl: ref
+isGeneratingBadge: ref
+isCheckoutMode: ref
+$reset()
+toggleMode()
+showErrorMsg(msg, attendeeName)
+showSuccessMsg(msg, attendeeName)
+checkIn()
+printBadge()
+eventCheckout()
}
Class diagram for updated EventyaySearchCheckIn.vue component structure
classDiagram
class EventyaySearchCheckIn {
-searchQuery: ref
-orders: ref
-loading: ref
-showPrintPreview: ref
-countdown: ref
-timerInstance: ref
-timeoutInstance: ref
-notes: ref
+checkIn(order)
+handleToggleMode()
+handleEventCheckout()
+startCountdown()
+stopTimer()
+handleNotesInput()
+handleCancel()
+handlePrintBadge()
+handlePrintClose()
+handlePrint()
+showPopup()
+generateBadge(order)
}
File-Level Changes
| Change | Details | Files |
|---|---|---|
| Add checkout mode state and actions to processEventyayCheckIn store |
|
src/stores/processEventyayCheckIn.js |
| Implement dual check-in/check-out API logic in component and store |
|
src/components/Eventyay/EventyaySearchCheckIn.vuesrc/stores/processEventyayCheckIn.js |
| Introduce 'Checkout All Attendees' feature and button in UI |
|
src/components/Eventyay/EventyaySearchCheckIn.vuesrc/stores/processEventyayCheckIn.js |
| Add confirmation popup with countdown and badge preview |
|
src/components/Eventyay/EventyaySearchCheckIn.vue |
| Revamp component layout with mode toggle and dynamic button styles |
|
src/components/Eventyay/EventyaySearchCheckIn.vue |
| Fix minor bugs and improve QR camera handling |
|
src/components/Eventyay/EventyaySearchCheckIn.vuesrc/components/Common/QRCamera.vue |
Assessment against linked issues
| Issue | Objective | Addressed | Explanation |
|---|---|---|---|
| #38 | Create an API to enable checkout for the whole event (i.e., an endpoint to check out all attendees for an event). | ✅ | |
| #38 | Integrate the event checkout API into the checkin-app, including a toggle in the checkin staff page to activate checkin or checkout mode. | ✅ |
Possibly linked issues
- #38: The PR directly addresses issue #38 by modifying check-in/out logic for search, integrating badge printing with URL, and using BadgePrintPreview.vue.
- #38: The PR adds checkout mode and related features to the Eventyay check-in app, fulfilling part of the issue's request.
- #38: The PR implements the checkout API, adds a check-in/checkout toggle, and an event-wide checkout feature, directly addressing the issue.
Tips and commands
Interacting with Sourcery
- Trigger a new review: Comment
@sourcery-ai reviewon the pull request. - Continue discussions: Reply directly to Sourcery's review comments.
- Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with
@sourcery-ai issueto create an issue from it. - Generate a pull request title: Write
@sourcery-aianywhere in the pull request title to generate a title at any time. You can also comment@sourcery-ai titleon the pull request to (re-)generate the title at any time. - Generate a pull request summary: Write
@sourcery-ai summaryanywhere in the pull request body to generate a PR summary at any time exactly where you want it. You can also comment@sourcery-ai summaryon the pull request to (re-)generate the summary at any time. - Generate reviewer's guide: Comment
@sourcery-ai guideon the pull request to (re-)generate the reviewer's guide at any time. - Resolve all Sourcery comments: Comment
@sourcery-ai resolveon the pull request to resolve all Sourcery comments. Useful if you've already addressed all the comments and don't want to see them anymore. - Dismiss all Sourcery reviews: Comment
@sourcery-ai dismisson the pull request to dismiss all existing Sourcery reviews. Especially useful if you want to start fresh with a new review - don't forget to comment@sourcery-ai reviewto trigger a new review!
Customizing Your Experience
Access your dashboard to:
- Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others.
- Change the review language.
- Add, remove or edit custom review instructions.
- Adjust other review settings.
Getting Help
- Contact our support team for questions or feedback.
- Visit our documentation for detailed guides and information.
- Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.
Deploy Preview for eventyay-checkin ready!
| Name | Link |
|---|---|
| Latest commit | b6de8aab1ff90cde3dd70589a59ee9b9e1bba956 |
| Latest deploy log | https://app.netlify.com/projects/eventyay-checkin/deploys/6894ad18c35d0200085910cf |
| Deploy Preview | https://deploy-preview-39--eventyay-checkin.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify project configuration.
https://github.com/user-attachments/assets/ad8c6736-a832-4d7d-8283-7b133c9fdcad
https://github.com/user-attachments/assets/61e77033-e128-4fd3-a844-c62621f81567
https://github.com/user-attachments/assets/9419c0da-7e50-402f-bc6f-e2d13031ab0e
Added Pop-up feature and have made it Responsive.