From 64c9804c98292b28e89d820d1f9d98989f12446d Mon Sep 17 00:00:00 2001 From: phanphan <lh.phan@samsung.com> Date: Fri, 7 Jun 2024 08:24:58 +0700 Subject: [PATCH] change image status --- cope2n-fe/src/pages/reviews2/FileCard.tsx | 69 +++++++++++++++-------- 1 file changed, 46 insertions(+), 23 deletions(-) diff --git a/cope2n-fe/src/pages/reviews2/FileCard.tsx b/cope2n-fe/src/pages/reviews2/FileCard.tsx index 79efa76..3c7d715 100644 --- a/cope2n-fe/src/pages/reviews2/FileCard.tsx +++ b/cope2n-fe/src/pages/reviews2/FileCard.tsx @@ -1,8 +1,4 @@ -import { - CheckCircleOutlined, - DownloadOutlined, - ExclamationCircleOutlined, -} from '@ant-design/icons'; +import { DownloadOutlined } from '@ant-design/icons'; import { Button, Tag } from 'antd'; const FileCard = ({ file, isSelected, onClick }) => { @@ -55,24 +51,51 @@ const FileCard = ({ file, isSelected, onClick }) => { ({extensionType}) </span> </div> - <div style={{display: 'flex', justifyContent: 'space-between', alignItems:'center'}}> - <Tag - color={isRequired ? 'warning' : ''} - style={{ display: 'inline-block', fontWeight: 'bold' , textTransform: 'capitalize' }} - // bordered={false} - > - Required: {isRequired.toString()} - </Tag> - - - <Tag - color={isReviewd ? 'success' : 'warning'} - style={{ display: 'inline-block', fontWeight: 'bold', textTransform: 'capitalize' }} - // bordered={false} - > - Reviewed: {isReviewd.toString()} - </Tag> - + <div + style={{ + display: 'flex', + justifyContent: 'space-between', + alignItems: 'center', + }} + > + {isRequired ? ( + <> + {isReviewd ? ( + <Tag + color={'success'} + style={{ + display: 'inline-block', + fontWeight: 'bold', + textTransform: 'capitalize', + }} + > + Reviewd + </Tag> + ) : ( + <Tag + color={'warning'} + style={{ + display: 'inline-block', + fontWeight: 'bold', + textTransform: 'capitalize', + }} + > + Not reviewed + </Tag> + )} + </> + ) : ( + <Tag + style={{ + display: 'inline-block', + fontWeight: 'bold', + textTransform: 'capitalize', + }} + // bordered={false} + > + Not required + </Tag> + )} </div> </div> <Button