Skip to content

Commit

Permalink
show submission only to needed folks (#8684)
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc authored Mar 25, 2021
1 parent 5de8993 commit 210bafd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
12 changes: 12 additions & 0 deletions app/assets/v2/js/pages/bounty_details2.js
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,18 @@ Vue.mixin({
vm.fulfillment_context.active_step = 'payout_amount';
break;
}
},
showWorkSubmitted: function(handle) {
let vm = this;

if (
vm.contxt.is_staff ||
vm.isOwner ||
(handle && handle == vm.contxt.github_handle)
) {
return true;
}
return false;
}
},
computed: {
Expand Down
12 changes: 7 additions & 5 deletions app/dashboard/templates/bounty/details2.html
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,13 @@ <h5 class="font-body font-weight-semibold">{% trans "SUBMISSIONS" %}</h5>
</div>
<div class="col-12">
<div class="bg-lightblue py-3 px-4 rounded mt-3 mb-0 w-100 overflow-auto">
<i class="far fa-link mr-1"></i>
<span class="font-weight-bold mb-2">PR:</span>
<a :href="fulfillment.fulfiller_github_url" target="_blank">
[[ fulfillment.fulfiller_github_url ]]
</a>
<template v-if="showWorkSubmitted(fulfillment.fulfiller_github_username)">
<i class="far fa-link mr-1"></i>
<span class="font-weight-bold mb-2">PR:</span>
<a :href="fulfillment.fulfiller_github_url" target="_blank">
[[ fulfillment.fulfiller_github_url ]]
</a>
</template>
<p class="mb-0" v-if="fulfillment.fulfiller_metadata.data.payload.fulfiller && fulfillment.fulfiller_metadata.data.payload.fulfiller.hoursWorked">
<i class="far fa-clock font-caption mr-1"></i>
<span class="font-weight-bold">Hours worked:</span>
Expand Down

0 comments on commit 210bafd

Please sign in to comment.