Skip to content

Commit 052a418

Browse files
committed
add the correct properties to the document
1 parent 99d87b1 commit 052a418

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/compounds/Document/Document.jsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import LineItemsTable from '../../components/LineItemsTable/LineItemsTable'
55
import './document.scss'
66

77
const Document = ({ document, addClass }) => {
8-
const { identifier, date, documentStatusColor, documentType,
9-
documentTypeColor, documentStatus, lineItems, requestIdentifier,
8+
const { adPO, date, documentStatusColor, documentType,
9+
documentTypeColor, documentStatus, identifier, lineItems, poNumber, relatedSOWIdentifier, requestIdentifier,
1010
shippingPrice, shipTo, shipFrom, subtotalPrice,
11-
taxAmount, terms, totalPrice } = document
11+
taxAmount, terms, totalPrice, turnaroundTime } = document
1212
const [show, setShow] = useState(false)
1313
const handleClose = () => setShow(false)
1414
const handleShow = () => setShow(true)
@@ -52,8 +52,13 @@ const Document = ({ document, addClass }) => {
5252
<Offcanvas.Body>
5353
<div className='d-block d-md-flex justify-content-between'>
5454
<div className='details'>
55-
<h6>Details:</h6>
56-
<b>Proposal:</b> {identifier}<br />
55+
<h5>Details:</h5>
56+
{poNumber && <><b>PO:</b> {poNumber}<br /></>}
57+
{adPO && <><b>AD PO:</b> {identifier}<br /></>}
58+
{documentType === 'SOW' ?
59+
<><b>Proposal:</b> {identifier}</> :
60+
<><b>Related SOW:</b> {relatedSOWIdentifier}</>
61+
}<br />
5762
<b>Amount:</b> {subtotalPrice}<br />
5863
<b>Request:</b> {requestIdentifier} <br />
5964
<b>Date:</b> {date}<br />
@@ -81,6 +86,7 @@ const Document = ({ document, addClass }) => {
8186
totalPrice={totalPrice}
8287
/>
8388
)}
89+
{turnaroundTime && <><h5><b>Turnaround Time:</b> {turnaroundTime}</h5></>}
8490
</Offcanvas.Body>
8591
</Offcanvas>
8692
</>

0 commit comments

Comments
 (0)