Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
salomon-j committed Jun 27, 2024
2 parents 7a6873e + 5746941 commit 98c5cdf
Show file tree
Hide file tree
Showing 3 changed files with 135 additions and 74 deletions.
5 changes: 4 additions & 1 deletion grails-app/assets/javascripts/sites.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,9 @@ var PidLocation = function (l) {
url: fcConfig.featuresService + '?layerId=' +self.chosenLayer(),
dataType:'json'
}).done(function(data) {
data = _.sortBy(data, function(item) {
return item && item.name;
});
self.layerObjects(data);
// During initialisation of the object list, any existing value for the chosen layer will have
// been set to undefined because it can't match a value in the list.
Expand Down Expand Up @@ -415,7 +418,7 @@ var PidLocation = function (l) {
if (l.fid == USER_UPLOAD_FID) {
self.layers().push({id:USER_UPLOAD_FID, name:'User Uploaded'});
}
else if ($.inArray(l.fid,OLD_NRM_LAYER_FIDS)) {
else if (_.contains(OLD_NRM_LAYER_FIDS, l.fid)) {
self.layers().push({id: l.fid, name:'NRM Regions - pre 2023'});
}

Expand Down
190 changes: 117 additions & 73 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions src/main/scripts/releases/3.4/addOrganisationToActivity.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
load('../../utils/audit.js');
const adminUserId = 'system';

let reports = db.report.find({status: {$ne: 'deleted'}, organisationId: {$exists: true}, category:'Regional Capacity Services Reporting'});
while (reports.hasNext()) {
let report = reports.next();
let activities = db.activity.find({activityId:report.activityId, type:'Regional Capacity Services Report'});
while (activities.hasNext()) {
let activity = activities.next();
activity.organisationId = report.organisationId;
db.activity.replaceOne({activityId:activity.activityId}, activity);
audit(activity, activity.activityId, 'au.org.ala.ecodata.Activity', adminUserId, activity.organisationId);
}
}

0 comments on commit 98c5cdf

Please sign in to comment.