@@ -175,23 +175,18 @@ const ReimbursementRequestDetailsView: React.FC<ReimbursementRequestDetailsViewP
175175 const ReceiptsView = ( ) => {
176176 return (
177177 < Box sx = { { maxHeight : `250px` , overflow : reimbursementRequest . receiptPictures . length > 0 ? 'auto' : 'none' } } >
178- < Typography variant = "h5" > Receipts</ Typography >
179- { reimbursementRequest . receiptPictures . map ( ( receipt , index , arr ) => {
178+ < Box sx = { { position : 'sticky' , top : 0 , background : theme . palette . background . default , pb : 1 , zIndex : 1 } } >
179+ < Typography variant = "h5" > Receipts</ Typography >
180+ </ Box >
181+ { reimbursementRequest . receiptPictures . map ( ( receipt ) => {
180182 return (
181- < Box sx = { { mb : arr . length !== index + 1 ? 5 : 0 } } >
182- < Box sx = { { width : '50%' , display : 'flex' , justifyContent : 'space-between' , alignItems : 'flex-end' } } >
183- < Link href = { imageFileUrl ( receipt . googleFileId ) } target = "_blank" underline = "hover" >
184- { receipt . name }
185- </ Link >
186- < IconButton href = { imageDownloadUrl ( receipt . googleFileId ) } >
187- < DownloadIcon />
188- </ IconButton >
189- </ Box >
190- < iframe
191- style = { { height : `200px` , width : '50%' } }
192- src = { imagePreviewUrl ( receipt . googleFileId ) }
193- title = { receipt . name }
194- />
183+ < Box sx = { { display : 'flex' , justifyContent : 'space-between' , alignItems : 'center' } } >
184+ < Link href = { imageFileUrl ( receipt . googleFileId ) } target = "_blank" underline = "hover" sx = { { mr : 1 , fontSize : 30 } } >
185+ { receipt . name }
186+ </ Link >
187+ < IconButton href = { imageDownloadUrl ( receipt . googleFileId ) } >
188+ < DownloadIcon sx = { { fontSize : 30 } } />
189+ </ IconButton >
195190 </ Box >
196191 ) ;
197192 } ) }
0 commit comments