Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove sitewide settings configuration (PP-494) #101

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading