Skip to content

Commit

Permalink
UI: overridden: Acquisition: Override OrderLineMiddleColumn in OrderLine
Browse files Browse the repository at this point in the history
  • Loading branch information
sakshamarora1 committed Jan 16, 2024
1 parent 76a5e0a commit 222741a
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ui/src/overridableMapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { Identifiers } from "./overridden/frontsite/Document/DocumentDetails/Doc
import { DocumentConference } from "./overridden/frontsite/Document/DocumentDetails/DocumentMetadataTabs/DocumentConference";
import { DocumentItemsHeader } from "./overridden/frontsite/Document/DocumentDetails/DocumentItemsHeader";
import { PaymentInformationGrid } from "./overridden/backoffice/PaymentInformation/PaymentInformation";
import { OrderDetailsLine } from "./overridden/backoffice/Acquisition/OrderDetails";

export const overriddenCmps = {
"Backoffice.PatronDetails.Metadata": PatronMetadata,
Expand Down Expand Up @@ -52,4 +53,5 @@ export const overriddenCmps = {
"DocumentConference.layout": DocumentConference,
"DocumentDetails.DocumentItems.header": DocumentItemsHeader,
"Backoffice.PaymentInformation": PaymentInformationGrid,
"Acquisition.OrderLine": OrderDetailsLine,
};
40 changes: 40 additions & 0 deletions ui/src/overridden/backoffice/Acquisition/OrderDetails.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { OrderLine } from "@inveniosoftware/react-invenio-app-ils";
import PropTypes from "prop-types";
import React from "react";
import { Icon, Item, Popup } from "semantic-ui-react";
import { parametrize } from "react-overridable";

export const OrderDetailsMiddleColumn = ({ line }) => {
return (
<>
<Item.Description>
<label>Copies ordered: </label>

Check failure on line 11 in ui/src/overridden/backoffice/Acquisition/OrderDetails.js

View workflow job for this annotation

GitHub Actions / Node_Tests

A form label must be associated with a control
{line.copies_ordered}
</Item.Description>
<Item.Description>
<label>Copies received: </label>

Check failure on line 15 in ui/src/overridden/backoffice/Acquisition/OrderDetails.js

View workflow job for this annotation

GitHub Actions / Node_Tests

A form label must be associated with a control
{line.copies_received || "-"}
</Item.Description>
<Item.Description>
<label>Payment mode: </label>

Check failure on line 19 in ui/src/overridden/backoffice/Acquisition/OrderDetails.js

View workflow job for this annotation

GitHub Actions / Node_Tests

A form label must be associated with a control
{line.payment_mode || "-"}
</Item.Description>
<Item.Description>
<label>TID ID: </label>

Check failure on line 23 in ui/src/overridden/backoffice/Acquisition/OrderDetails.js

View workflow job for this annotation

GitHub Actions / Node_Tests

A form label must be associated with a control
{line.inter_departmental_transaction_id || "-"}{" "}
<Popup
content="Inter departmental transaction ID"
trigger={<Icon name="info circle" />}
/>
</Item.Description>
</>
);
};

OrderDetailsMiddleColumn.propTypes = {
line: PropTypes.object.isRequired,
};

export const OrderDetailsLine = parametrize(OrderLine, {
MiddleColumn: OrderDetailsMiddleColumn,
});

0 comments on commit 222741a

Please sign in to comment.