Skip to content

Commit

Permalink
Merge pull request #4055 from gitcoinco/fix/nda-activity
Browse files Browse the repository at this point in the history
Fix condition for nda link
  • Loading branch information
thelostone-mc authored Mar 28, 2019
2 parents 3eca6f9 + b533071 commit a09c05e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
19 changes: 10 additions & 9 deletions app/assets/v2/js/pages/bounty_details.js
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ var attach_override_status = function() {

var show_interest_modal = function() {
var self = this;
let modals = $('#modalInterest');
var modals = $('#modalInterest');
let modalBody = $('#modalInterest .modal-content');
let modalUrl = `/interest/modal?redirect=${window.location.pathname}&pk=${document.result['pk']}`;

Expand Down Expand Up @@ -687,7 +687,7 @@ var show_interest_modal = function() {
$(self).attr('href', '/uninterested');
$(self).find('span').text(gettext('Stop Work'));
$(self).parent().attr('title', '<div class="tooltip-info tooltip-sm">' + gettext('Notify the funder that you will not be working on this project') + '</div>');
$.modal.close();
modals.bootstrapModal('hide');
}
}).catch((error) => {
if (error.responseJSON.error === 'You may only work on max of 3 issues at once.')
Expand All @@ -705,7 +705,7 @@ var show_interest_modal = function() {
$(self).attr('href', '/uninterested');
$(self).find('span').text(gettext('Stop Work'));
$(self).parent().attr('title', '<div class="tooltip-info tooltip-sm">' + gettext('Notify the funder that you will not be working on this project') + '</div>');
$.modal.close();
modals.bootstrapModal('hide');
}
}).catch((error) => {
if (error.responseJSON.error === 'You may only work on max of 3 issues at once.')
Expand Down Expand Up @@ -1422,12 +1422,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 has_signed_nda = result.interested.map(interest => {
if (interest.profile.handle === _activity.profile.handle && interest.signed_nda) {
return interest.signed_nda.doc;
}
return false;
});
const has_signed_nda = result.interested.length ?
result.interested.map(interest => {
if (interest.profile.handle === _activity.profile.handle && interest.signed_nda) {
return interest.signed_nda.doc;
}
return false;
}) : false;
const has_pending_interest = !!result.interested.find(interest =>
interest.profile.handle === _activity.profile.handle && interest.pending);
const has_interest = !!result.interested.find(interest =>
Expand Down
4 changes: 2 additions & 2 deletions app/dashboard/templates/bounty/details.html
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ <h5 class="bounty-heading">{% trans "Funder" %}</h5>
<div class="col-12 col-md-7 started-status-column d-flex">
<div class="activity-status">
[[:text]]
[[if signed_nda ]]
[[if signed_nda && signed_nda != 'false']]
<a href="[[:signed_nda]]" download class="d-flex">View signed NDA</a>
[[/if]]
</div>
Expand Down Expand Up @@ -389,7 +389,7 @@ <h5 class="bounty-heading">{% trans "Funder" %}</h5>
</div>
</div>
[[else]]
<div class="col-12 col-md-7">
<div class="col-12 col-md-7 d-flex started-status-column">
<div class="activity-status">
[[:text]]
</div>
Expand Down

0 comments on commit a09c05e

Please sign in to comment.