+
{statusArray.map((statusObject, index) => {
const { statusLabel, statusIcon } = statusObject
const border = index !== statusArray.length - 1 ? 'border-end' : ''
diff --git a/src/compounds/Document/Document.jsx b/src/compounds/Document/Document.jsx
index dba368b..50e03f9 100644
--- a/src/compounds/Document/Document.jsx
+++ b/src/compounds/Document/Document.jsx
@@ -5,10 +5,11 @@ import LineItemsTable from '../../components/LineItemsTable/LineItemsTable'
import './document.scss'
const Document = ({ document, addClass }) => {
- const { identifier, date, documentStatusColor, documentType,
- documentTypeColor, documentStatus, lineItems, requestIdentifier,
- shippingPrice, shipTo, shipFrom, subtotalPrice,
- taxAmount, terms, totalPrice } = document
+ const {
+ adPO, date, documentStatusColor, documentType, documentTypeColor, documentStatus, identifier, lineItems, poNumber,
+ relatedSOWIdentifier, requestIdentifier, shippingPrice, shipTo, shipFrom, subtotalPrice, taxAmount, terms, totalPrice,
+ turnaroundTime,
+ } = document
const [show, setShow] = useState(false)
const handleClose = () => setShow(false)
const handleShow = () => setShow(true)
@@ -21,14 +22,14 @@ const Document = ({ document, addClass }) => {
{documentType}
- {identifier}: {subtotalPrice}
+ {(documentType === 'SOW') ? identifier : poNumber}: {subtotalPrice}
{date}
-
@@ -52,8 +53,12 @@ const Document = ({ document, addClass }) => {
-
Details:
-
Proposal: {identifier}
+
Details:
+ {poNumber && <>
PO: {poNumber}
>}
+ {adPO && <>
AD PO: {identifier}
>}
+ {documentType === 'SOW'
+ ? <>
Proposal: {identifier}>
+ : <>
Related SOW: {relatedSOWIdentifier}>}
Amount: {subtotalPrice}
Request: {requestIdentifier}
Date: {date}
@@ -71,8 +76,7 @@ const Document = ({ document, addClass }) => {
{shipFrom.text}
- {lineItems
- && (
+ {lineItems && (
{
totalPrice={totalPrice}
/>
)}
+ {turnaroundTime && Turnaround Time: {turnaroundTime}
}
>
@@ -91,6 +96,7 @@ const Document = ({ document, addClass }) => {
Document.propTypes = {
addClass: PropTypes.string,
document: PropTypes.shape({
+ adPO: PropTypes.string,
identifier: PropTypes.string.isRequired,
date: PropTypes.string.isRequired,
documentStatus: PropTypes.string.isRequired,
@@ -98,6 +104,8 @@ Document.propTypes = {
documentType: PropTypes.string.isRequired,
documentTypeColor: PropTypes.string,
lineItems: PropTypes.arrayOf(PropTypes.shape({})).isRequired,
+ poNumber: PropTypes.string,
+ relatedSOWIdentifier: PropTypes.string,
requestIdentifier: PropTypes.string.isRequired,
shippingPrice: PropTypes.string.isRequired,
shipTo: PropTypes.shape({
@@ -112,6 +120,7 @@ Document.propTypes = {
taxAmount: PropTypes.string.isRequired,
terms: PropTypes.string.isRequired,
totalPrice: PropTypes.string.isRequired,
+ turnaroundTime: PropTypes.string,
}),
}