Skip to content

Commit

Permalink
Fix site filter category after change to EMSA compound sites AtlasOfL…
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed May 15, 2024
1 parent 9d9c43c commit 43a9a5b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions grails-app/assets/javascripts/sites.js
Original file line number Diff line number Diff line change
Expand Up @@ -996,14 +996,15 @@ var SitesViewModel = function(sites, map, mapFeatures, isUserEditor, projectId)
}
site.filterType = 'P';
site.filterTypeLabel = 'Planning site';
if (site.type === 'compound') {
site.filterType = 'R';
site.filterTypeLabel = 'Reporting site';
}
else if (site.externalIds && site.externalIds[0] && site.externalIds[0].idType == 'MONITOR_PLOT_GUID') {

if (site.externalIds && site.externalIds[0] && site.externalIds[0].idType == 'MONITOR_PLOT_GUID') {
site.filterType = 'E';
site.filterTypeLabel = 'Site created via EMSA protocol using the Monitor App';
}
else if (site.type === 'compound') {
site.filterType = 'R';
site.filterTypeLabel = 'Reporting site';
}

site.readOnly = site.type == 'compound' || PublicationStatus.isReadOnly(site.publicationStatus);
return site;
Expand Down

1 comment on commit 43a9a5b

@temi
Copy link
Contributor

@temi temi commented on 43a9a5b May 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

Please sign in to comment.