Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QR code check-in (Admin + Volunteer side view) #38

Open
NwinNwin opened this issue Jan 30, 2024 · 1 comment
Open

QR code check-in (Admin + Volunteer side view) #38

NwinNwin opened this issue Jan 30, 2024 · 1 comment
Assignees

Comments

@NwinNwin
Copy link
Collaborator

NwinNwin commented Jan 30, 2024

Goal

  • The goal of this task is to allow Admin to checkin Volunteer via QR code
  • Create a backend endpoint to checkin volunteer based on eventId and volunteerId
  • Work on DummyVolunteerQR and DummyAdminQR components

NOTE:

  • There is an Axios instance already created for you in the utils folder in the frontend
  • To use it, call import Backend from '../utils/utils';
  • Use this to hit any backend routes you wish to use (You will be hitting the routes in the /data router)

Instruction

Backend

  • Create a backend route GET /data/checkin/:eventId/:volunteerId
    • NOTE: We do GET instead of PUT to make admin QR code scanning easier.
  • This route will update a row in event_data table that matches eventId & volunteerId by changing is_checked_in column to true

Frontend (Volunteer side)

  • We access the Volunteer QR page through /volunteer-qr/:eventId/:volunteerId (useParams to extract eventId & volunteerId)
    • Use react-qr-code library to generate a QR code based on this format localhost:3001/[eventId]/[volunteerId]

Frontend (Admin side)

  • Access the admin QR page through /admin-qr
  • Make a button to access the camera feature
  • implement react-qr-scanner library for admin to scan volunteer's QR code.
  • The scan will call the backend route GET /data/checkin/:eventId/:volunteerId to mark volunteer as checked in.
  • When done scanning, make a pop up that says "checked in".

Resources

As always, feel free to pm Dang or Ostend on Slack for support

@KevinWu098
Copy link
Member

Holy moly @Jaslavie ‼️‼️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants