diff --git a/cope2n-fe/src/components/left-menu/index.tsx b/cope2n-fe/src/components/left-menu/index.tsx index d0390dc..4c9206e 100644 --- a/cope2n-fe/src/components/left-menu/index.tsx +++ b/cope2n-fe/src/components/left-menu/index.tsx @@ -35,7 +35,7 @@ function LeftMenu() { const generalSubItems = [ getItem(t`Dashboard`, '/dashboard', ), getItem(t`Reports`, '/reports', ), - // getItem(t`Review`, '/reviews', ), + getItem(t`Review`, '/reviews', ), getItem(t`Inference`, '/inference', ), // getItem(t`Users`, '/users', ), ]; diff --git a/cope2n-fe/src/pages/reviews/index.tsx b/cope2n-fe/src/pages/reviews/index.tsx index 616fb15..ab34816 100644 --- a/cope2n-fe/src/pages/reviews/index.tsx +++ b/cope2n-fe/src/pages/reviews/index.tsx @@ -1,9 +1,17 @@ import { t } from '@lingui/macro'; -import { Button, message, Upload, Input, Table } from 'antd'; -import { SbtPageHeader } from 'components/page-header'; +import { Button, Input, Table, Tag, DatePicker, Form, Modal, Select, Space, Checkbox } from 'antd'; import { useState } from 'react'; import { Layout } from 'antd'; +import { + EditOutlined, DownloadOutlined, CheckCircleOutlined, + ClockCircleOutlined, + ArrowLeftOutlined, + ArrowRightOutlined, + FullscreenOutlined, + FullscreenExitOutlined, +} from '@ant-design/icons'; import FileViewer from '@cyntler/react-doc-viewer'; +import styled from 'styled-components'; const { Sider, Content } = Layout; const siderStyle: React.CSSProperties = { @@ -13,6 +21,24 @@ const siderStyle: React.CSSProperties = { }; +const StyledTable = styled(Table)` + & .sbt-table-cell { + padding: 4px!important; + } +`; + + +const StyledEditOutlined = styled(EditOutlined)` + & { + color: #6666ff; + margin-left: 8px; + } + &:hover { + color: #0000ff; + } +`; + + const fileList = [ { name: "invoice.pdf", @@ -30,7 +56,7 @@ const fileList = [ const dataSource = [ { - key: '1', + key: 'retailer_name', value: 'Mike', }, { @@ -41,6 +67,34 @@ const dataSource = [ key: '3', value: 'Mike', }, + { + key: '3', + value: 'Mike', + }, + { + key: '3', + value: 'Mike', + }, + { + key: '3', + value: 'Mike', + }, + { + key: '3', + value: 'Mike', + }, + { + key: '3', + value: 'Mike', + }, + { + key: '3', + value: 'Mike', + }, + { + key: '3', + value: 'Mike', + }, ]; const columns = [ @@ -49,6 +103,14 @@ const columns = [ dataIndex: 'key', key: 'key', }, + { + title: 'Accuracy', + dataIndex: 'acc', + key: 'acc', + render: (text, record) => { + return
100%
; + }, + }, { title: 'Predicted', dataIndex: 'value', @@ -63,6 +125,18 @@ const columns = [ title: 'Revised', dataIndex: 'value', key: 'value', + render: (text, record) => { + return ( +
+ {text} + +
+ ) + }, + }, ]; @@ -75,7 +149,9 @@ const FileCard = ({ file, isSelected, onClick }) => { backgroundColor: isSelected ? '#d4ecff' : '#fff', padding: '4px 8px', marginRight: '4px', - marginTop: '4px', + marginTop: '2px', + position: 'relative', + height: '100px', }} onClick={onClick}>
{ color: '#333', fontWeight: 'bold', padding: '4px 8px', + cursor: 'default', }}>{file.type.toUpperCase()} {file.name}
+
+ + +
); }; -const InferencePage = () => { +const ReviewPage = () => { + const [fullscreen, setFullscreen] = useState(false); + const [isModalOpen, setIsModalOpen] = useState(false); const [selectedFileId, setSelectedFileId] = useState(0); const selectFileByIndex = (index) => { setSelectedFileId(index); }; + const [filterDateRange, setFilterDateRange] = useState(null); + const [filterSubsidiaries, setFilterSubsidiaries] = useState(''); + const [filterReviewState, setFilterReviewState] = useState(''); return ( - <> - {/* */} +
+ - -
+
- -
-
- {fileList.map((file, index) => ( - { - setSelectedFileId(index); - } - } /> - ))} + color: "#333", + padding: 10, + fontWeight: 'bold' + }} + >Files ({fileList.length}) + {fileList.map((file, index) => ( + { + setSelectedFileId(index); + } + } /> + ))} +
+
+ +
+ + + + + + +
+
+ + +
- - -

Overview

- - - - - -
- -
- - - - + +

Request Review

+ + + + + +
+ + {/* } color="warning" style={{ padding: "4px 16px", marginLeft: 8 }}> + Not Reviewed + */} + } color="success" style={{ padding: "4px 16px", marginLeft: 8 }}> + Reviewed + +
+ + + { + setIsModalOpen(false); + } + } + onCancel={ + () => { + setIsModalOpen(false); + } + } + > +
+ + { + console.log(value); + setFilterDateRange(value); + }} + style={{ width: 200 }} + /> + +
+ + + +
+ +
+
+ +
+ ); }; -export default InferencePage; +export default ReviewPage;