-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make more facets available to officers #3440
- Loading branch information
Showing
2 changed files
with
17 additions
and
5 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
src/main/scripts/releases/4.2/addServiceFacetAndModifyOfficerFacets.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
let hub = db.hub.findOne({urlPath:'merit'}); | ||
let servicesFacetIndex = hub.availableFacets.indexOf('services'); | ||
if (servicesFacetIndex < 0) { | ||
hub.availableFacets.push('services'); | ||
} | ||
hub.officerFacets = ['muFacet', 'projectElectFacet', 'services']; | ||
|
||
servicesFacetIndex = hub.adminFacets.indexOf('services'); | ||
if (servicesFacetIndex >= 0) { | ||
hub.adminFacets.splice(servicesFacetIndex, 1); | ||
} | ||
let muFacetIndex = hub.adminFacets.indexOf('muFacet'); | ||
if (muFacetIndex >= 0) { | ||
hub.adminFacets.splice(muFacetIndex, 1); | ||
} | ||
|
||
db.hub.replaceOne({urlPath:'merit'}, hub); |