diff --git a/ui/src/config.js b/ui/src/config.js index 8d2bfca35..425c258c1 100644 --- a/ui/src/config.js +++ b/ui/src/config.js @@ -244,4 +244,26 @@ export const config = { ], fetchTaskStatusIntervalSecs: 5000, }, + ACQ_ORDERS: { + editorSchema: { + definitions: { + "order-line": { + properties: { + inter_departmental_transaction_id: { + title: "ID of inter-departmental transaction (TID)", + type: "string", + }, + }, + }, + "payment": { + properties: { + internal_purchase_requisition_id: { + title: "Internal purchase requisition ID (DAI)", + type: "string", + }, + }, + }, + }, + }, + }, }; diff --git a/ui/src/overridableMapping.js b/ui/src/overridableMapping.js index 81f487d5a..42a27e31d 100644 --- a/ui/src/overridableMapping.js +++ b/ui/src/overridableMapping.js @@ -16,7 +16,10 @@ import { StandardNumber } from "./overridden/frontsite/Document/DocumentDetails/ import { HomeContent, HomeHeadline } from "./overridden/frontsite/Home/HomeContent"; import { LegacyRecordRoute } from "./overridden/frontsite/Routes/LegacyRoute"; import { Slogan } from "./overridden/frontsite/Home/Slogan"; -import { SideBarMenuItem } from "./overridden/backoffice/Sidebar/SideBarMenuItem"; +import { + SideBarMenuItem, + SideBarCatalogueItem, +} from "./overridden/backoffice/Sidebar/SideBarMenuItem"; import { ImporterRoute } from "./overridden/routes/ImporterRoute"; import { overriddenSearchAppCmps } from "./overridden/frontsite/LiteratureSearch/LiteratureSearch"; import { StandardCardView } from "./overridden/frontsite/DocumentSearch/StandardCardView"; @@ -49,6 +52,7 @@ export const overriddenCmps = { "LiteratureSearch": overriddenSearchAppCmps, "BackOfficeRoutesSwitch.CustomRoute": ImporterRoute, "Backoffice.Sidebar.CustomMenuItem": SideBarMenuItem, + "Backoffice.Sidebar.Menu.Catalogue": SideBarCatalogueItem, "LiteratureKeywords.layout": LiteratureKeyword, "DocumentMetadataTabs.Identifiers": Identifiers, "DocumentConference.layout": DocumentConference, diff --git a/ui/src/overridden/backoffice/Sidebar/SideBarMenuItem.js b/ui/src/overridden/backoffice/Sidebar/SideBarMenuItem.js index 4969c7f49..f01908318 100644 --- a/ui/src/overridden/backoffice/Sidebar/SideBarMenuItem.js +++ b/ui/src/overridden/backoffice/Sidebar/SideBarMenuItem.js @@ -3,6 +3,7 @@ import { Menu } from "semantic-ui-react"; import { CdsBackOfficeRoutes } from "../../routes/BackofficeUrls"; import PropTypes from "prop-types"; import { Link } from "react-router-dom"; +import { BackOfficeRoutes } from "@inveniosoftware/react-invenio-app-ils"; export class SideBarMenuItem extends React.Component { render() { @@ -29,3 +30,42 @@ export class SideBarMenuItem extends React.Component { SideBarMenuItem.propTypes = { activePath: PropTypes.string.isRequired, }; + +export class SideBarCatalogueItem extends React.Component { + render() { + const { activePath } = this.props; + + const documentsActive = activePath.includes(BackOfficeRoutes.documentsList); + const seriesActive = activePath.includes(BackOfficeRoutes.seriesList); + const itemsActive = activePath.includes(BackOfficeRoutes.itemsList); + const eitemsActive = activePath.includes(BackOfficeRoutes.eitemsList); + + return ( + + Catalogue + + + Books / Articles + + + Series / Multiparts + + + Physical Copies + + + E-Items + + + + ); + } +} + +SideBarCatalogueItem.propTypes = { + activePath: PropTypes.string.isRequired, +};