Skip to content

Commit

Permalink
Add work plan (#4864)
Browse files Browse the repository at this point in the history
* add workplan to activity

* fix identation
  • Loading branch information
octavioamu authored and danlipert committed Jul 31, 2019
1 parent 3e10e6b commit 97e4662
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
8 changes: 8 additions & 0 deletions app/assets/v2/js/pages/bounty_details.js
Original file line number Diff line number Diff line change
Expand Up @@ -1450,6 +1450,13 @@ const process_activities = function(result, bounty_activities) {
const fulfillment = meta.fulfillment || {};
const new_bounty = meta.new_bounty || {};
const old_bounty = meta.old_bounty || {};
const issue_message = result.interested.length ?
result.interested.find(interest => {
if (interest.profile.handle === _activity.profile.handle && interest.issue_message) {
return interest.issue_message;
}
return false;
}) : false;
const has_signed_nda = result.interested.length ?
result.interested.find(interest => {
if (interest.profile.handle === _activity.profile.handle && interest.signed_nda) {
Expand Down Expand Up @@ -1491,6 +1498,7 @@ const process_activities = function(result, bounty_activities) {
activity_type: _activity.activity_type,
status: _activity.activity_type === 'work_started' ? 'started' : 'stopped',
signed_nda: has_signed_nda,
issue_message: issue_message,
uninterest_possible: uninterest_possible,
slash_possible: slash_possible,
approve_worker_url: meta.approve_worker_url,
Expand Down
2 changes: 1 addition & 1 deletion app/dashboard/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class InterestSerializer(serializers.ModelSerializer):
class Meta:
"""Define the Interest serializer metadata."""
model = Interest
fields = ('profile', 'created', 'pending', 'signed_nda')
fields = ('profile', 'created', 'pending', 'signed_nda', 'issue_message')


# Serializers define the API representation.
Expand Down
9 changes: 6 additions & 3 deletions app/dashboard/templates/bounty/details.html
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ <h5 class="bounty-heading">{% trans "Funder" %}</h5>
</div>
<div class="col-12 col-md-2">
<div class="activity-name">
<a href="https://gitcoin.co/profile/[[:name]]" target="_blank">
<a href="/profile/[[:name]]" target="_blank">
[[:name]]
</a>
</div>
Expand Down Expand Up @@ -321,7 +321,7 @@ <h5 class="bounty-heading">{% trans "Funder" %}</h5>
<div class="col-12 col-md-7 started-status-column">
<div class="activity-status">
Worker
<a href="https://gitcoin.co/profile/[[:worker_handle]]" target="_blank">
<a href="/profile/[[:worker_handle]]" target="_blank">
[[:worker_handle]]
</a>
Approved
Expand All @@ -331,7 +331,7 @@ <h5 class="bounty-heading">{% trans "Funder" %}</h5>
<div class="col-12 col-md-7 started-status-column">
<div class="activity-status">
Worker
<a href="https://gitcoin.co/profile/[[:worker_handle]]" target="_blank">
<a href="/profile/[[:worker_handle]]" target="_blank">
[[:worker_handle]]
</a>
Rejected
Expand Down Expand Up @@ -399,6 +399,9 @@ <h5 class="bounty-heading">{% trans "Funder" %}</h5>
<div class="col-12 col-md-2">
<div class="activity-time">[[:age]]</div>
</div>
[[if issue_message]]
<p class="bg-lightblue p-2 rounded mt-3 mb-0 w-100 overflow-auto" style="resize: vertical;height: 50px;word-break: break-word;white-space: pre-wrap;"><b>Work Plan:</b> [[:issue_message.issue_message]]</p>
[[/if]]
</div>
[[/if]]
</script>
Expand Down

0 comments on commit 97e4662

Please sign in to comment.