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 scanner #465

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open

Qr code scanner #465

wants to merge 9 commits into from

Conversation

YuYing-Liang
Copy link
Member

Overview

  • Resolves #

Unit Tests Created

Steps to QA

Copy link
Contributor

@Leo6Leo Leo6Leo left a 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",
Copy link
Contributor

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>
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need to change the design a bit. It is not clear right now.
CleanShot 2023-02-03 at 17 26 49@2x

Copy link
Member Author

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>
Copy link
Contributor

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(
Copy link
Contributor

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.

Copy link
Member Author

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>
Copy link
Contributor

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.")
Copy link
Contributor

Choose a reason for hiding this comment

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

seems like exception is not working properly.
CleanShot 2023-02-03 at 17 45 03@2x

Copy link
Member Author

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)
Copy link
Contributor

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

Copy link
Member Author

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>
Copy link
Contributor

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.

Copy link
Member Author

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>
Copy link
Contributor

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.

Copy link
Member Author

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")
Copy link
Contributor

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.

Copy link
Member Author

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.

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.

3 participants