Skip to content

Commit

Permalink
Remove sitewide settings configuration. (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathangreen authored Feb 7, 2024
1 parent 2f3f3fa commit 51ee64b
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 611 deletions.
29 changes: 0 additions & 29 deletions src/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
CollectionsData,
IndividualAdminsData,
PatronAuthServicesData,
SitewideSettingsData,
MetadataServicesData,
DiscoveryServicesData,
LibraryRegistrationsData,
Expand Down Expand Up @@ -79,9 +78,6 @@ export default class ActionCreator extends BaseActionCreator {
static readonly DELETE_PATRON_AUTH_SERVICE = "DELETE_PATRON_AUTH_SERVICE";
static readonly SITEWIDE_ANNOUNCEMENTS = "SITEWIDE_ANNOUNCEMENTS";
static readonly EDIT_SITEWIDE_ANNOUNCEMENTS = "EDIT_SITEWIDE_ANNOUNCEMENTS";
static readonly SITEWIDE_SETTINGS = "SITEWIDE_SETTINGS";
static readonly EDIT_SITEWIDE_SETTING = "EDIT_SITEWIDE_SETTING";
static readonly DELETE_SITEWIDE_SETTING = "DELETE_SITEWIDE_SETTING";
static readonly METADATA_SERVICES = "METADATA_SERVICES";
static readonly EDIT_METADATA_SERVICE = "EDIT_METADATA_SERVICE";
static readonly DELETE_METADATA_SERVICE = "DELETE_METADATA_SERVICE";
Expand Down Expand Up @@ -545,31 +541,6 @@ export default class ActionCreator extends BaseActionCreator {
).bind(this);
}

fetchSitewideSettings() {
const url = "/admin/sitewide_settings";
return this.fetchJSON<SitewideSettingsData>(
ActionCreator.SITEWIDE_SETTINGS,
url
).bind(this);
}

editSitewideSetting(data: FormData) {
const url = "/admin/sitewide_settings";
return this.postForm(ActionCreator.EDIT_SITEWIDE_SETTING, url, data).bind(
this
);
}

deleteSitewideSetting(identifier: string | number) {
const url = "/admin/sitewide_setting/" + identifier;
return this.postForm(
ActionCreator.DELETE_SITEWIDE_SETTING,
url,
null,
"DELETE"
).bind(this);
}

fetchMetadataServices() {
const url = "/admin/metadata_services";
return this.fetchJSON<MetadataServicesData>(
Expand Down
3 changes: 0 additions & 3 deletions src/components/ConfigTabContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import Collections from "./Collections";
import IndividualAdmins from "./IndividualAdmins";
import PatronAuthServices from "./PatronAuthServices";
import SitewideAnnouncements from "./SitewideAnnouncements";
import SitewideSettings from "./SitewideSettings";
import MetadataServices from "./MetadataServices";
import CatalogServices from "./CatalogServices";
import DiscoveryServices from "./DiscoveryServices";
Expand Down Expand Up @@ -43,7 +42,6 @@ export default class ConfigTabContainer extends TabContainer<
individualAdmins: IndividualAdmins,
collections: Collections,
patronAuth: PatronAuthServices,
sitewideSettings: SitewideSettings,
metadata: MetadataServices,
catalogServices: CatalogServices,
discovery: DiscoveryServices,
Expand All @@ -58,7 +56,6 @@ export default class ConfigTabContainer extends TabContainer<
individualAdmins: "Admins",
patronAuth: "Patron Authentication",
sitewideAnnouncements: "Sitewide Announcements",
sitewideSettings: "Sitewide Settings",
catalogServices: "External Catalogs",
};

Expand Down
184 changes: 0 additions & 184 deletions src/components/SitewideSettingEditForm.tsx

This file was deleted.

70 changes: 0 additions & 70 deletions src/components/SitewideSettings.tsx

This file was deleted.

6 changes: 0 additions & 6 deletions src/components/__tests__/ConfigTabContainer-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import Libraries from "../Libraries";
import Collections from "../Collections";
import IndividualAdmins from "../IndividualAdmins";
import PatronAuthServices from "../PatronAuthServices";
import SitewideSettings from "../SitewideSettings";
import MetadataServices from "../MetadataServices";
import CatalogServices from "../CatalogServices";
import DiscoveryServices from "../DiscoveryServices";
Expand Down Expand Up @@ -53,7 +52,6 @@ describe("ConfigTabContainer", () => {
expect(linkTexts).to.contain("Admins");
expect(linkTexts).to.contain("Collections");
expect(linkTexts).to.contain("Patron Authentication");
expect(linkTexts).to.contain("Sitewide Settings");
expect(linkTexts).to.contain("Metadata");
expect(linkTexts).to.contain("External Catalogs");
expect(linkTexts).to.contain("Sitewide Announcements");
Expand All @@ -65,7 +63,6 @@ describe("ConfigTabContainer", () => {
IndividualAdmins,
Collections,
PatronAuthServices,
SitewideSettings,
MetadataServices,
CatalogServices,
DiscoveryServices,
Expand Down Expand Up @@ -114,7 +111,6 @@ describe("ConfigTabContainer", () => {
expect(linkTexts).to.contain("Admins");
expect(linkTexts).not.to.contain("Collections");
expect(linkTexts).not.to.contain("Patron Authentication");
expect(linkTexts).not.to.contain("Sitewide Settings");
expect(linkTexts).not.to.contain("Metadata");
expect(linkTexts).not.to.contain("External Catalogs");
});
Expand All @@ -131,7 +127,6 @@ describe("ConfigTabContainer", () => {
const hiddenComponentClasses = [
Collections,
PatronAuthServices,
SitewideSettings,
MetadataServices,
CatalogServices,
DiscoveryServices,
Expand Down Expand Up @@ -181,7 +176,6 @@ describe("ConfigTabContainer", () => {
Collections,
IndividualAdmins,
PatronAuthServices,
SitewideSettings,
MetadataServices,
CatalogServices,
DiscoveryServices,
Expand Down
Loading

0 comments on commit 51ee64b

Please sign in to comment.