Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into feature/issue3169
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed Jan 10, 2025
2 parents 3d279b9 + 9700487 commit 9b6463b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
8 changes: 5 additions & 3 deletions grails-app/assets/javascripts/my-projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ var ProjectReportsViewModel = function (project) {
var reportService = new ReportService({});

self.projectId = project.projectId;
self.organisationId = project.orgIdSvcProvider || project.organisationId;
self.organisationName = project.serviceProviderName || project.organisationName;
self.name = project.name;
self.grantId = project.grantId || '';
self.associatedProgram = project.associatedProgram;
self.associatedSubProgram = project.associatedSubProgram;
self.submittedReportCount = 0;
self.recommendAsCaseStudy = ko.observable(project.promoteOnHomepage);
self.activityCount = project.activityCount || 0;

self.currentAssociatedOrgs = _.filter(project.associatedOrgs, function(org) {
var toDate = ko.utils.unwrapObservable(org.toDate);
var fromDate = ko.utils.unwrapObservable(org.fromDate);
return (!toDate || toDate >= new Date().toISOStringNoMillis()) && (!fromDate || fromDate <= new Date().toISOStringNoMillis());
});
self.reports = [];
self.extendedStatus = [];
var reportingTimeSum = 0;
Expand Down
10 changes: 7 additions & 3 deletions grails-app/views/shared/_reports.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@
<td data-bind="text:associatedSubProgram"></td>
<td><a data-bind="attr:{href:fcConfig.projectViewUrl+'/'+projectId}"><span data-bind="text:name"></span></a></td>
<td>
<a data-bind="if:organisationId, attr:{href:fcConfig.organisationViewUrl+'/'+organisationId}"><span data-bind="text:organisationName"></span></a>
<!-- ko if:!organisationId -->
<span data-bind="text:organisationName"></span>
<!-- ko foreach:currentAssociatedOrgs -->
<div class="organisationName">
<a data-bind="visible:ko.utils.unwrapObservable($data.organisationId),attr:{href:fcConfig.organisationLinkBaseUrl+'/'+ko.utils.unwrapObservable($data.organisationId)}">
<span data-bind="text:$data.name"></span>
</a>
<span data-bind="visible:!ko.utils.unwrapObservable($data.organisationId),text:$data.name"></span>
</div>
<!-- /ko -->
</td>
<td>
Expand Down

0 comments on commit 9b6463b

Please sign in to comment.