From a9ae6549573cdfaf698998dc815dd1e47b9486aa Mon Sep 17 00:00:00 2001 From: phanphan Date: Thu, 6 Jun 2024 11:05:05 +0700 Subject: [PATCH] improve some ui --- cope2n-fe/package.json | 1 + cope2n-fe/src/pages/reviews2/FileCard.tsx | 40 +++++++++++++--------- cope2n-fe/src/pages/reviews2/api.ts | 2 +- cope2n-fe/src/pages/reviews2/index.tsx | 41 ++++++++++++++--------- 4 files changed, 51 insertions(+), 33 deletions(-) diff --git a/cope2n-fe/package.json b/cope2n-fe/package.json index 9cfce13..06c2cfc 100644 --- a/cope2n-fe/package.json +++ b/cope2n-fe/package.json @@ -41,6 +41,7 @@ "history": "^5.3.0", "lodash-es": "^4.17.21", "mousetrap": "^1.6.5", + "openseadragon": "^4.1.1", "pdfjs-dist": "^3.11.174", "process": "^0.11.10", "react": "^18.3.1", diff --git a/cope2n-fe/src/pages/reviews2/FileCard.tsx b/cope2n-fe/src/pages/reviews2/FileCard.tsx index 7156e9d..79efa76 100644 --- a/cope2n-fe/src/pages/reviews2/FileCard.tsx +++ b/cope2n-fe/src/pages/reviews2/FileCard.tsx @@ -8,10 +8,9 @@ import { Button, Tag } from 'antd'; const FileCard = ({ file, isSelected, onClick }) => { const fileName = file['File Name']; const extensionType = fileName.split('.').pop(); - let status = true; - if (file['Is Required'] && !file['Is Reviewed']) { - status = false; - } + const isRequired = file['Is Required']; + const isReviewd = file['Is Reviewed']; + return (
{ > {fileName ? fileName.substring(0, 25).replace('temp_', '') - : fileName} - {' '}({extensionType}) + : fileName}{' '} + ({extensionType})
- : - } - style={{ display: 'inline-block', fontWeight: 'bold' }} - // bordered={false} - > - {status ? 'Good' : 'Warning'}{' '} - +
+ + Required: {isRequired.toString()} + + + + + Reviewed: {isReviewd.toString()} + + +
@@ -721,7 +730,7 @@ const ReviewPage = () => { } } catch (error) {} return ( -
+
{ }} onClick={submitRevisedData} > - Update File + (U) Update File