@@ -6,11 +6,12 @@ import Notice from '../../components/Notice/Notice'
6
6
import { allowNull } from '../../resources/utilityFunctions'
7
7
import './document.scss'
8
8
9
- const Document = ( { addClass, acceptSOW, backgroundColor, document } ) => {
10
- const { identifier, date, documentStatusColor, documentType,
11
- documentTypeColor, documentStatus, lineItems, requestIdentifier,
12
- shippingPrice, shipTo, shipFrom, sowID, subtotalPrice,
13
- taxAmount, terms, totalPrice } = document
9
+ const Document = ( { document, addClass } ) => {
10
+ const {
11
+ adPO, date, documentStatusColor, documentType, documentTypeColor, documentStatus, identifier, lineItems, poNumber,
12
+ relatedSOWIdentifier, requestIdentifier, shippingPrice, shipTo, shipFrom, subtotalPrice, taxAmount, terms, totalPrice,
13
+ turnaroundTime,
14
+ } = document
14
15
const [ show , setShow ] = useState ( false )
15
16
const [ showNotice , setShowNotice ] = useState ( false )
16
17
const handleClose = ( ) => setShow ( false )
@@ -23,7 +24,7 @@ const Document = ({ addClass, acceptSOW, backgroundColor, document }) => {
23
24
{ documentType }
24
25
</ div >
25
26
< div className = 'border-end p-2' >
26
- < b > { identifier } :</ b > { subtotalPrice }
27
+ < b > { ( documentType === 'SOW' ) ? identifier : poNumber } :</ b > { subtotalPrice }
27
28
</ div >
28
29
< small className = 'text-muted fw-light p-2' >
29
30
{ date }
@@ -75,8 +76,12 @@ const Document = ({ addClass, acceptSOW, backgroundColor, document }) => {
75
76
) }
76
77
< div className = 'd-block d-md-flex justify-content-between' >
77
78
< div className = 'details' >
78
- < h6 > Details:</ h6 >
79
- < b > Proposal:</ b > { identifier } < br />
79
+ < h5 > Details:</ h5 >
80
+ { poNumber && < > < b > PO:</ b > { poNumber } < br /> </ > }
81
+ { adPO && < > < b > AD PO:</ b > { identifier } < br /> </ > }
82
+ { documentType === 'SOW'
83
+ ? < > < b > Proposal:</ b > { identifier } </ >
84
+ : < > < b > Related SOW:</ b > { relatedSOWIdentifier } </ > } < br />
80
85
< b > Amount:</ b > { subtotalPrice } < br />
81
86
< b > Request:</ b > { requestIdentifier } < br />
82
87
< b > Date:</ b > { date } < br />
@@ -103,6 +108,7 @@ const Document = ({ addClass, acceptSOW, backgroundColor, document }) => {
103
108
totalPrice = { totalPrice }
104
109
/>
105
110
) }
111
+ { turnaroundTime && < h5 > < b > Turnaround Time:</ b > { turnaroundTime } </ h5 > }
106
112
</ Offcanvas . Body >
107
113
</ Offcanvas >
108
114
</ >
@@ -116,13 +122,16 @@ Document.propTypes = {
116
122
backgroundColor : PropTypes . string ,
117
123
acceptSOW : PropTypes . func . isRequired ,
118
124
document : PropTypes . shape ( {
125
+ adPO : PropTypes . string ,
119
126
identifier : PropTypes . string . isRequired ,
120
127
date : PropTypes . string . isRequired ,
121
128
documentStatus : PropTypes . string . isRequired ,
122
129
documentStatusColor : PropTypes . string ,
123
130
documentType : PropTypes . string . isRequired ,
124
131
documentTypeColor : PropTypes . string ,
125
132
lineItems : PropTypes . arrayOf ( PropTypes . shape ( { } ) ) . isRequired ,
133
+ poNumber : PropTypes . string ,
134
+ relatedSOWIdentifier : PropTypes . string ,
126
135
requestIdentifier : PropTypes . string . isRequired ,
127
136
shippingPrice : PropTypes . string . isRequired ,
128
137
shipTo : PropTypes . shape ( {
@@ -138,6 +147,7 @@ Document.propTypes = {
138
147
taxAmount : PropTypes . string . isRequired ,
139
148
terms : PropTypes . string . isRequired ,
140
149
totalPrice : PropTypes . string . isRequired ,
150
+ turnaroundTime : PropTypes . string ,
141
151
} ) ,
142
152
}
143
153
0 commit comments