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

Add Qr code scanner code #26

Merged
merged 7 commits into from
Oct 25, 2024
Merged

Add Qr code scanner code #26

merged 7 commits into from
Oct 25, 2024

Conversation

Mustaballer
Copy link
Contributor

Overview

  • Resolves #
  • add QR code scanner support
  • admins can scan QR codes, and participants that have accepted and rsvped can view thier QR codes

Unit Tests Created

  • n/a

Steps to QA

  • run migrations with python manage.py migrate
  • create an admin user and log in to localhost:8000 --> you should be able to view admin dashboard
    • click on qr code scanning, this should take you to qr scanning page
    • currently there is no active event, in order for scanning to be active you need to update the EVENT_START_DATE = datetime(2024, 10, 26, 8, 0, 0, tzinfo=TZ_INFO) to earlier so you can test it and adjust one of these sign in event start dates to your current time so its active following in settings/__init__.py

SIGN_IN_TIMES = [
{
"name": "sign_in",
"description": "Hackathon Sign In",
"time": datetime(2023, 11, 4, 10, 0, 0, tzinfo=TZ_INFO), # Nov 4th @ 9am
},
{
"name": "lunch1",
"description": "Lunch Day 1",
"time": datetime(2023, 11, 4, 12, 30, 0, tzinfo=TZ_INFO), # Nov 4th @ 12:30pm
},
{
"name": "dinner1",
"description": "Dinner Day 1",
"time": datetime(2023, 11, 4, 18, 0, 0, tzinfo=TZ_INFO), # Nov 4th @ 6pm
},
{
"name": "breakfast2",
"description": "Breakfast Day 2",
"time": datetime(2023, 11, 5, 8, 0, 0, tzinfo=TZ_INFO), # Nov 5th @ 8am
},
{
"name": "lunch2",
"description": "Lunch Day 2",
"time": datetime(2023, 11, 5, 11, 45, 0, tzinfo=TZ_INFO), # Nov 5th @ 11:45pm
},
]```

  • In order to test scanning a QR code you need a QR code --> first create a user with an application who has been accepted and has rsvp(ask me if you don't know how to do this), sign in to dashboard and it should have QR code
  • then just go to admin site and show off this QR code(i made a screenshot of the QR code and then showed to the scanner)
  • it should work and give details of your dietary requirements and t shirt size

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SIGN_IN_TIMES needs to be updated with the correct times

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@carmen-chau double check if these intervals work
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might be better
image

Copy link
Contributor

@carmen-chau carmen-chau Oct 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UPDATE: From logistics, I think the only time slot we need to adjust is Lunch Day 2

In __init__.py, around line 354, replacing the line with this should work:

"time": datetime(2024, 10, 26, 11, 45, 0, tzinfo=TZ_INFO), # Oct 26th @ 11:45 pm

Basically the table should look like this now, lmk if there any differences on your end:

image


# Return the information need, and each information will start on a new line

return_string = (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried adding the additional dietary restriction info on my end, you can try doing this:

return_string = ( (user.first_name).capitalize() + " successfully signed in. 👕T-shirt: " + application.tshirt_size + " 🍉 Dietary Restrictions: " + application.dietary_restrictions + " 🍉 Extra dietary notes: " + application.free_response_dietary_restrictions )

application.free_response_dietary_restrictions is not blank only if the user has either allergies or has written "Other" in application.dietary_restrictions

Another note: one thing I'm slightly concerned about is spacing (100 char max for application.free_response_dietary_restrictions)

@Mustaballer Mustaballer merged commit ffb0a36 into develop Oct 25, 2024
2 of 3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants