Skip to content

Commit 43a9a5b

Browse files
committed
Fix site filter category after change to EMSA compound sites AtlasOfLivingAustralia/ecodata#941
1 parent 9d9c43c commit 43a9a5b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

grails-app/assets/javascripts/sites.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -996,14 +996,15 @@ var SitesViewModel = function(sites, map, mapFeatures, isUserEditor, projectId)
996996
}
997997
site.filterType = 'P';
998998
site.filterTypeLabel = 'Planning site';
999-
if (site.type === 'compound') {
1000-
site.filterType = 'R';
1001-
site.filterTypeLabel = 'Reporting site';
1002-
}
1003-
else if (site.externalIds && site.externalIds[0] && site.externalIds[0].idType == 'MONITOR_PLOT_GUID') {
999+
1000+
if (site.externalIds && site.externalIds[0] && site.externalIds[0].idType == 'MONITOR_PLOT_GUID') {
10041001
site.filterType = 'E';
10051002
site.filterTypeLabel = 'Site created via EMSA protocol using the Monitor App';
10061003
}
1004+
else if (site.type === 'compound') {
1005+
site.filterType = 'R';
1006+
site.filterTypeLabel = 'Reporting site';
1007+
}
10071008

10081009
site.readOnly = site.type == 'compound' || PublicationStatus.isReadOnly(site.publicationStatus);
10091010
return site;

0 commit comments

Comments
 (0)