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 office filter to leaderboard #48

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

amitskatti
Copy link

Add office filter to leaderboard

@amitskatti
Copy link
Author

Copy link
Member

@rockdog rockdog left a comment

Choose a reason for hiding this comment

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

Thanks for your pull request.

Overall this looks great. Just added a question regarding org_title and a suggestion to DRY up the if statement for the leaderboard.

Any chance you could add a screenshot of the UI changes?

selected_dept=department,
selected_timespan=timespan,
selected_timespan=timespan, selected_office=office,
org_title=config.ORG_TITLE,
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if org_title is still being used? If not it should be removed here and in the config.

@@ -32,6 +32,15 @@ <h1>Lovers of the Week</h1>
{% endfor %}
</select>
</div>
<div class="form-group">
<label class="sr-only" for="office">Department</label>
Copy link
Member

Choose a reason for hiding this comment

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

I assume this should be Office not Department?

lovers.append((employee_key, c.sent_count))
else:
employee = employee_key.get()
if (
Copy link
Member

Choose a reason for hiding this comment

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

Not blocking but I think this could need a comment saying what condition we are looking for to append an employee to the list.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe even better to extract this into a function with a little docstring to keep things DRY. Thoughts?

lovees.append((employee_key, c.received_count))
else:
employee = employee_key.get()
if (
Copy link
Member

Choose a reason for hiding this comment

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

Not blocking but I think this could need a comment saying what condition we are looking for to append en employee to the list.

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