-
Notifications
You must be signed in to change notification settings - Fork 5
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 scanner #465
base: develop
Are you sure you want to change the base?
Qr code scanner #465
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see the comments above
"get_user_name", | ||
"sign_in", | ||
"lunch1", | ||
"dinner1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can make this as dynamic by setting it to the variable in the setting file.
|
||
{% if get_messages(request) %} | ||
{% for message in get_messages(request) %} | ||
<p id="submitMessage" class="banner banner{{ message.tags }}"> {{ message }} </p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Leo6Leo you need to compile the scss, run yarn run scss
in the hackthon_site directory and python manage.py collectstatic
</tr> | ||
{% for event in sign_in_times %} | ||
<tr> | ||
<td> {{ event.description }} </td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be more intuitive to show which event is happening right now by changing the color of the column or add one more column called status, and show the emoji to indicate the status of the event.
console.log(oldData.split(';')) | ||
}); | ||
|
||
const qrScanner = new QrScanner( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we able to have a button to disable the camera / QR scanner if we want to use the real scanner instead of the camera.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain this more? What is a "real scanner" I thought QR codes can only be scanned through camera/images.
{% extends "event/base.html" %} | ||
|
||
{% block nav_links %} | ||
<li><a href="{{ url("event:dashboard") }}" class="active">Dashboard</a></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the class=active
def get_template_names(self): | ||
if self.request.user.is_staff: | ||
return "event/admin_qr_scanner.html" | ||
return Exception("You do not have permission to view this page.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No that's right, that's the exception page. But now that I'm thinking about it, I should try to return a 401 unauthorized error (or 403). I didn't want to make a whole new html page for an error so I just went with an Exception.
|
||
try: | ||
user_activity = UserActivity.objects.get(user__exact=user) | ||
setattr(user_activity, sign_in_event, now) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to add the check that if the user has already checked in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the user has already signed-in it'll just update the time in the table. I didn't see a problem with that so I left it this way.
|
||
<br/> | ||
|
||
<h2 class="formH2">Export Data to Google Sheets</h2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should hide these to all our volunteers. We don't want everyone to see our sensitive data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, they're dsiabled for now
</div> | ||
|
||
<div class="borderTopDiv z-depth-3"> | ||
<h1 class="formH1">Analytics</h1> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should hide these to all our volunteers. We don't want everyone to see our sensitive data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
smae as comment above
if review.status == "Accepted": | ||
if settings.RSVP and application.rsvp is None: | ||
raise forms.ValidationError( | ||
_(f"User {email} has not RSVP'd to the hackathon") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And one more thing is that we should disable user's ability to cancel RSVP when the hackathon has started. Otherwise, that will cause many issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is already implemented in the RSVP feature, but I'll leave this validation check in.
Overview
Unit Tests Created
Steps to QA