diff --git a/app/assets/v2/css/bounty.css b/app/assets/v2/css/bounty.css index 6fa0e4e5cd4..6d60139212e 100644 --- a/app/assets/v2/css/bounty.css +++ b/app/assets/v2/css/bounty.css @@ -98,6 +98,20 @@ body { margin-bottom: 5px; } +.stat-card { + background: #ecf0fa; + border-radius: 4px; +} + +.stat-card h2, +.stat-card p { + color: #717171; +} + +.related-bounties { + list-style-type: none; +} + .box { padding: 14px; border: 1px solid #DBDBDB; @@ -153,10 +167,6 @@ body { color: #000000; } -/* #issue_description pre, code { - padding: 1em 0; -} */ - #bounty-info-row { margin-left: 1px; } diff --git a/app/assets/v2/js/user_popover.js b/app/assets/v2/js/user_popover.js index 103c046dfe2..ea11b93e68c 100644 --- a/app/assets/v2/js/user_popover.js +++ b/app/assets/v2/js/user_popover.js @@ -1,7 +1,7 @@ let popoverData = []; const renderPopOverData = data => { - console.log(data) + console.log(data); let contributed_to = data.contributed_to.map((_organization, index) => { if (index < 3) { return `${_organization} {

${data.handle}

- ${contributed_to.length ? 'Contributes to: ' + contributed_to : ''} +
+ ${contributed_to.length ? 'Contributes to: ' + contributed_to : ''} +
-
-
-

${data.stats.position}

-

contributor

+
+
+

+ ${data.stats.position == 0 ? '-' : '#' + data.stats.position} +

+

contributor

-
-

${data.stats.success_rate}

-

success rate

+
+

+ ${data.stats.success_rate ? data.stats.success_rate : 0} % +

+

success rate

-
-

${data.stats.earnings ? Number(data.stats.earnings).toFixed(4) : 0} ETH

-

collected from ${data.stats.completed_bounties} bounties

+
+

+ ${data.stats.earnings ? Number(data.stats.earnings).toFixed(4) : 0} ETH +

+

+ collected from + ${data.stats.completed_bounties} bounties +

-

Bounties completed related to ${data.keywords.slice(0, 3).toString()}

- ${data.related_bounties ? - '
  • // TODO: LOOP THROUGH TITLE
' + ${data.related_bounties.length == 0 ? + `

+ No bounties completed related to ${data.keywords} +

` : - '

None

' + `

+ Bounties completed related to ${data.keywords}: +

+ ` }
@@ -45,6 +62,8 @@ const renderPopOverData = data => { }; function openContributorPopOver(contributor, element) { + console.log(contributor, element); + const keywords = document.result.keywords; const contributorURL = `/api/v0.1/profile/${contributor}?keywords=${keywords}`; diff --git a/app/dashboard/views.py b/app/dashboard/views.py index 81710409207..664cd850da7 100644 --- a/app/dashboard/views.py +++ b/app/dashboard/views.py @@ -1795,9 +1795,6 @@ def profile_details(request, handle): keywords = request.GET.get('keywords') - # bounties = profile.bounties - # Prefetch('feedbacks', queryset=queryset, to_attr='feedback'), 'feedback__rating') \ - # queryset = FeedbackEntry.objects.all().filter(receiver_profile=profile) bounties = Bounty.objects.current().prefetch_related('fulfillments', 'interested', 'interested__profile', 'feedbacks') \ .filter(interested__profile=profile, network=network,) \ .filter(interested__status='okay') \ @@ -1810,11 +1807,6 @@ def profile_details(request, handle): ) \ .distinct('pk') - - - # for word in keywords: - # bounties = bounties.keyword(word) # TODO: Is this right - _bounties = [] _orgs = [] if bounties : @@ -1828,13 +1820,6 @@ def profile_details(request, handle): 'rating': [feedback.rating for feedback in bounty.feedbacks.all().distinct('bounty_id')], } _org = bounty.org_name - # try: - # # feedback = FeedbackEntry.objects.get(bounty=bounty.pk, receiver_profile=profile) - # # feedback = FeedbackEntry.objects.get() # TODO: remove after testing - # if feedback: - # _bounty['contibutor_rating'] = feedback.rating - # except FeedbackEntry.DoesNotExist: - # _bounty['contibutor_rating'] = None _orgs.append(_org) _bounties.append(_bounty)