File tree Expand file tree Collapse file tree
ProjectDetailPage/ProjectViewContainer/BOM Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,4 +81,4 @@ const CreateReimbursementRequestPage: React.FC = () => {
8181 ) ;
8282} ;
8383
84- export default CreateReimbursementRequestPage ;
84+ export default CreateReimbursementRequestPage ;
Original file line number Diff line number Diff line change @@ -220,25 +220,27 @@ const BOMTableWrapper: React.FC<BOMTableWrapperProps> = ({
220220 if ( ! material ) return null ;
221221
222222 const reimbursementRequest = material . reimbursementRequest ;
223-
223+
224224 // case 1 (if reimbursement request exists): link to the reimbursement request page
225225 if ( reimbursementRequest ) {
226226 return (
227- < Link
228- component = { RouterLink }
229- to = { `${ routes . REIMBURSEMENT_REQUESTS } /view/${ reimbursementRequest . reimbursementRequestId } ` }
230- underline = "hover"
231- sx = { { color : '#dd514c' , fontWeight : 'bold' , cursor : 'pointer' } }
232- onClick = { ( e ) => e . stopPropagation ( ) }
233- >
234- { reimbursementRequest . identifier }
235- </ Link >
227+ < Link
228+ component = { RouterLink }
229+ to = { `${ routes . REIMBURSEMENT_REQUESTS } /view/${ reimbursementRequest . reimbursementRequestId } ` }
230+ underline = "hover"
231+ sx = { { color : '#dd514c' , fontWeight : 'bold' , cursor : 'pointer' } }
232+ onClick = { ( e ) => e . stopPropagation ( ) }
233+ >
234+ { reimbursementRequest . identifier }
235+ </ Link >
236236 ) ;
237237 }
238-
238+
239239 // case 2 (if reimbursement request does not exist): link to the create reimbursement request page with pre-filled info
240- const qty = material . quantity != null ? Number ( material . quantity ) : undefined ;
241- const unitPrice = material . price != null ? Number ( material . price ) : undefined ;
240+ const { quantity, price } = material ;
241+
242+ const qty = quantity != null ? Number ( quantity ) : undefined ;
243+ const unitPrice = price != null ? Number ( price ) : undefined ;
242244
243245 const prefillCost = qty != null && unitPrice != null ? qty * unitPrice : undefined ;
244246
You can’t perform that action at this time.
0 commit comments