-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UI: overridden: Acquisition: Override OrderLineMiddleColumn in OrderLine
- Loading branch information
1 parent
76a5e0a
commit 222741a
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
{line.copies_ordered} | ||
</Item.Description> | ||
<Item.Description> | ||
<label>Copies received: </label> | ||
{line.copies_received || "-"} | ||
</Item.Description> | ||
<Item.Description> | ||
<label>Payment mode: </label> | ||
{line.payment_mode || "-"} | ||
</Item.Description> | ||
<Item.Description> | ||
<label>TID ID: </label> | ||
{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, | ||
}); |