diff --git a/CHANGELOG.md b/CHANGELOG.md index 423fe261..88fbcaa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Change history for ui-tenant-settings -## IN PROGRESS +## 8.0.1 (IN PROGRESS) + +* [UITEN-266](https://issues.folio.org/browse/UITEN-266) No longer displays non-working inventory-related pages when the inventory interfaces are not present. ## [8.0.0](https://github.com/folio-org/ui-tenant-settings/tree/v8.0.0)(2023-10-13) [Full Changelog](https://github.com/folio-org/ui-tenant-settings/compare/v7.4.0...v8.0.0) diff --git a/package.json b/package.json index cb445cdc..8bb5ae01 100644 --- a/package.json +++ b/package.json @@ -17,15 +17,15 @@ "route": "/tenant-settings", "okapiInterfaces": { "configuration": "2.0", - "location-units": "2.0", - "locations": "3.0", "login-saml": "2.0", - "service-points": "3.0", "users": "15.0 16.0" }, "optionalOkapiInterfaces": { + "location-units": "2.0", + "locations": "3.0", "remote-storage-configurations": "1.0", - "remote-storage-mappings": "1.0 2.0" + "remote-storage-mappings": "1.0 2.0", + "service-points": "3.0" }, "permissionSets": [ { diff --git a/src/settings/index.js b/src/settings/index.js index 593ccabb..dbec672e 100644 --- a/src/settings/index.js +++ b/src/settings/index.js @@ -61,6 +61,7 @@ class Organization extends React.Component { label: , component: ServicePoints, perm: 'ui-tenant-settings.settings.servicepoints.view', + iface: 'service-points', }, ], }, @@ -72,24 +73,28 @@ class Organization extends React.Component { label: , component: LocationInstitutions, perm: 'ui-tenant-settings.settings.location.view', + iface: 'location-units', }, { route: 'location-campuses', label: , component: LocationCampuses, perm: 'ui-tenant-settings.settings.location.view', + iface: 'location-units', }, { route: 'location-libraries', label: , component: LocationLibraries, perm: 'ui-tenant-settings.settings.location.view', + iface: 'location-units', }, { route: 'location-locations', label: , component: LocationLocations, perm: 'ui-tenant-settings.settings.location.view', + iface: 'location-units', }, ], } @@ -109,10 +114,18 @@ class Organization extends React.Component { */ render() { + // If this PR is accepted, we will not need to do this filtering by hand: + // https://github.com/folio-org/stripes-smart-components/pull/1401#issuecomment-1771334495 + // But for now ... + const sections = this.sections.map(section => ({ + label: section.label, + pages: section.pages.filter(page => !page.iface || this.props.stripes.hasInterface(page.iface)), + })); + return ( } /> );