-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
Fix/dashboard prizes #7162
Fix/dashboard prizes #7162
Conversation
Codecov Report
@@ Coverage Diff @@
## stable #7162 +/- ##
=======================================
Coverage 26.21% 26.21%
=======================================
Files 296 296
Lines 29258 29284 +26
Branches 4321 4325 +4
=======================================
+ Hits 7669 7677 +8
- Misses 21318 21336 +18
Partials 271 271
Continue to review full report at Codecov.
|
app/dashboard/views.py
Outdated
query_prizes = Bounty.objects.filter(event=hackathon_event) | ||
elif is_sponsor_member.exists(): | ||
sponsor = is_sponsor_member.first() | ||
query_prizes = Bounty.objects.filter(event=hackathon_event, bounty_owner_profile=sponsor) |
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 wonder if bounty_owner_profile will the org name? or is always a user profile (not org) ?
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.
I added one more commit to manage this scenario:
- Will check if you are a member of one sponsor, if so it will display all prizes related to the sponsor.
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.
Good catch! 👍
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 really need to add bounty org profile and populate it, asap.
@@ -266,6 +266,7 @@ | |||
document.hackathon_id = "{{ hackathon.id | safe }}"; | |||
document.hackathonObj = JSON.parse(document.getElementById('hackathon-object').textContent); | |||
document.activePanel = parseInt({{panel | safe}}); | |||
document.is_sponsor = {{ is_sponsor|yesno:'true,false' }} |
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.
@octavioamu side note -> do wanna attach this to the DOM ?
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 yes because then is handled with vuejs to show/hide the dashboard link
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.
Removed, thanks!
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.
ohh I see I got confused with isSponsor
Description
@octavioamu asked me to work based on stable
https://www.loom.com/share/d4b7a39bb65f4ffea692aaa927824119
Refers/Fixes
#7158
Testing