Skip to content

Commit

Permalink
ui: overridden: Monograph->Multipart and add acronyms in orders schema
Browse files Browse the repository at this point in the history
  • Loading branch information
sakshamarora1 authored and kpsherva committed Apr 4, 2024
1 parent b92c89a commit e3030a1
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 1 deletion.
22 changes: 22 additions & 0 deletions ui/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
},
},
},
},
},
};
6 changes: 5 additions & 1 deletion ui/src/overridableMapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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,
Expand Down
40 changes: 40 additions & 0 deletions ui/src/overridden/backoffice/Sidebar/SideBarMenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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 (
<Menu.Item>
<Menu.Header>Catalogue</Menu.Header>
<Menu.Menu>
<Menu.Item
as={Link}
active={documentsActive}
to={BackOfficeRoutes.documentsList}
>
Books / Articles
</Menu.Item>
<Menu.Item as={Link} active={seriesActive} to={BackOfficeRoutes.seriesList}>
Series / Multiparts
</Menu.Item>
<Menu.Item as={Link} active={itemsActive} to={BackOfficeRoutes.itemsList}>
Physical Copies
</Menu.Item>
<Menu.Item as={Link} active={eitemsActive} to={BackOfficeRoutes.eitemsList}>
E-Items
</Menu.Item>
</Menu.Menu>
</Menu.Item>
);
}
}

SideBarCatalogueItem.propTypes = {
activePath: PropTypes.string.isRequired,
};

0 comments on commit e3030a1

Please sign in to comment.