Skip to content

Commit a4711d8

Browse files
committed
Make more facets available to officers #3440
1 parent 6be628e commit a4711d8

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

src/main/scripts/releases/4.2/addServiceFacet.js

-5
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
let hub = db.hub.findOne({urlPath:'merit'});
2+
let servicesFacetIndex = hub.availableFacets.indexOf('services');
3+
if (servicesFacetIndex < 0) {
4+
hub.availableFacets.push('services');
5+
}
6+
hub.officerFacets = ['muFacet', 'projectElectFacet', 'services'];
7+
8+
servicesFacetIndex = hub.adminFacets.indexOf('services');
9+
if (servicesFacetIndex >= 0) {
10+
hub.adminFacets.splice(servicesFacetIndex, 1);
11+
}
12+
let muFacetIndex = hub.adminFacets.indexOf('muFacet');
13+
if (muFacetIndex >= 0) {
14+
hub.adminFacets.splice(muFacetIndex, 1);
15+
}
16+
17+
db.hub.replaceOne({urlPath:'merit'}, hub);

0 commit comments

Comments
 (0)