Add review screen + Return - for 0
This commit is contained in:
parent
edc4d2689c
commit
e95f9c9f70
@ -35,7 +35,7 @@ function LeftMenu() {
|
|||||||
const generalSubItems = [
|
const generalSubItems = [
|
||||||
getItem(t`Dashboard`, '/dashboard', <AppstoreOutlined />),
|
getItem(t`Dashboard`, '/dashboard', <AppstoreOutlined />),
|
||||||
getItem(t`Reports`, '/reports', <BarChartOutlined />),
|
getItem(t`Reports`, '/reports', <BarChartOutlined />),
|
||||||
getItem(t`Review`, '/reviews', <FileSearchOutlined />),
|
// getItem(t`Review`, '/reviews', <FileSearchOutlined />),
|
||||||
getItem(t`Inference`, '/inference', <RotateRightOutlined />),
|
getItem(t`Inference`, '/inference', <RotateRightOutlined />),
|
||||||
// getItem(t`Users`, '/users', <UsergroupAddOutlined />),
|
// getItem(t`Users`, '/users', <UsergroupAddOutlined />),
|
||||||
];
|
];
|
||||||
|
@ -69,7 +69,8 @@ const columns: TableColumnsType<DataType> = [
|
|||||||
width: '130px',
|
width: '130px',
|
||||||
className: 'hide-border-right',
|
className: 'hide-border-right',
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
return <span>{record.snImeiTC + record.invoiceTC}</span>;
|
const value = record.snImeiTC + record.invoiceTC;
|
||||||
|
return <span>{value ? value : '-'}</span>;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -81,12 +82,20 @@ const columns: TableColumnsType<DataType> = [
|
|||||||
key: 'snImeiTC',
|
key: 'snImeiTC',
|
||||||
width: '50px',
|
width: '50px',
|
||||||
className: 'show-border-left',
|
className: 'show-border-left',
|
||||||
|
render: (_, record) => {
|
||||||
|
const value = record.snImeiTC;
|
||||||
|
return <span>{value ? value : '-'}</span>;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Invoice',
|
title: 'Invoice',
|
||||||
dataIndex: 'invoiceTC',
|
dataIndex: 'invoiceTC',
|
||||||
key: 'invoiceTC',
|
key: 'invoiceTC',
|
||||||
width: '50px',
|
width: '50px',
|
||||||
|
render: (_, record) => {
|
||||||
|
const value = record.invoiceTC;
|
||||||
|
return <span>{value ? value : '-'}</span>;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -1,17 +1,11 @@
|
|||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import { Button, message, Upload, Input, Table } from 'antd';
|
import { Button, message, Upload, Input, Table } from 'antd';
|
||||||
import { SbtPageHeader } from 'components/page-header';
|
import { SbtPageHeader } from 'components/page-header';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { Layout } from 'antd';
|
import { Layout } from 'antd';
|
||||||
import FileViewer from '@cyntler/react-doc-viewer';
|
import FileViewer from '@cyntler/react-doc-viewer';
|
||||||
const { Sider, Content } = Layout;
|
const { Sider, Content } = Layout;
|
||||||
|
|
||||||
const contentStyle: React.CSSProperties = {
|
|
||||||
textAlign: 'center',
|
|
||||||
color: '#fff',
|
|
||||||
backgroundColor: '#efefef',
|
|
||||||
};
|
|
||||||
|
|
||||||
const siderStyle: React.CSSProperties = {
|
const siderStyle: React.CSSProperties = {
|
||||||
backgroundColor: '#fafafa',
|
backgroundColor: '#fafafa',
|
||||||
padding: 10,
|
padding: 10,
|
||||||
@ -78,7 +72,7 @@ const FileCard = ({ file, isSelected, onClick }) => {
|
|||||||
<div style={{
|
<div style={{
|
||||||
border: '1px solid #ccc',
|
border: '1px solid #ccc',
|
||||||
width: '200px',
|
width: '200px',
|
||||||
backgroundColor: isSelected? '#d4ecff' : '#fff',
|
backgroundColor: isSelected ? '#d4ecff' : '#fff',
|
||||||
padding: '4px 8px',
|
padding: '4px 8px',
|
||||||
marginRight: '4px',
|
marginRight: '4px',
|
||||||
marginTop: '4px',
|
marginTop: '4px',
|
||||||
@ -117,16 +111,24 @@ const InferencePage = () => {
|
|||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
maxWidth: '100%',
|
maxWidth: '100%',
|
||||||
minHeight: 'calc(100vh - 200px)',
|
minHeight: 'calc(100vh - 100px)',
|
||||||
|
maxHeight: 'calc(100vh - 100px)',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
padding: '8px',
|
padding: '8px',
|
||||||
}}>
|
}}>
|
||||||
<Layout>
|
<Content style={{
|
||||||
<Content style={contentStyle}>
|
textAlign: 'center',
|
||||||
|
color: '#fff',
|
||||||
|
backgroundColor: '#efefef',
|
||||||
|
height: '100%',
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
flexGrow: 1,
|
||||||
|
}}>
|
||||||
<div style={{
|
<div style={{
|
||||||
height: "450px",
|
|
||||||
border: "1px solid #ccc",
|
border: "1px solid #ccc",
|
||||||
flexGrow: 0,
|
flexGrow: 1,
|
||||||
|
height: '500px',
|
||||||
}}>
|
}}>
|
||||||
<FileViewer documents={
|
<FileViewer documents={
|
||||||
[
|
[
|
||||||
@ -139,10 +141,6 @@ const InferencePage = () => {
|
|||||||
retainURLParams: true,
|
retainURLParams: true,
|
||||||
},
|
},
|
||||||
csvDelimiter: ",", // "," as default,
|
csvDelimiter: ",", // "," as default,
|
||||||
pdfZoom: {
|
|
||||||
defaultZoom: 1.1, // 1 as default,
|
|
||||||
zoomJump: 0.2, // 0.1 as default,
|
|
||||||
},
|
|
||||||
pdfVerticalScrollByDefault: true, // false as default
|
pdfVerticalScrollByDefault: true, // false as default
|
||||||
}} />
|
}} />
|
||||||
</div>
|
</div>
|
||||||
@ -152,30 +150,30 @@ const InferencePage = () => {
|
|||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
height: "100px",
|
height: "100px",
|
||||||
|
flexGrow: 0,
|
||||||
}}>
|
}}>
|
||||||
{fileList.map((file, index) => (
|
{fileList.map((file, index) => (
|
||||||
<FileCard key={index} file={file} isSelected={index === selectedFileId} onClick={
|
<FileCard key={index} file={file} isSelected={index === selectedFileId} onClick={
|
||||||
() => {
|
() => {
|
||||||
setSelectedFileId(index);
|
setSelectedFileId(index);
|
||||||
}
|
}
|
||||||
}/>
|
} />
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</Content>
|
</Content>
|
||||||
<Sider width="500px" style={siderStyle}>
|
<Sider width="400px" style={siderStyle}>
|
||||||
<h2 style={{margin: "0 0 10px 0"}}>Overview</h2>
|
<h2 style={{ margin: "0 0 10px 0" }}>Overview</h2>
|
||||||
<Input size='small' addonBefore="Request ID" style={{marginBottom: "4px"}} readOnly/>
|
<Input size='small' addonBefore="Request ID" style={{ marginBottom: "4px" }} readOnly />
|
||||||
<Input size='small' addonBefore="Redemption" style={{marginBottom: "4px"}} readOnly/>
|
<Input size='small' addonBefore="Redemption" style={{ marginBottom: "4px" }} readOnly />
|
||||||
<Input size='small' addonBefore="Uploaded date" style={{marginBottom: "4px"}} readOnly/>
|
<Input size='small' addonBefore="Uploaded date" style={{ marginBottom: "4px" }} readOnly />
|
||||||
<Input size='small' addonBefore="Request time" style={{marginBottom: "4px"}} readOnly/>
|
<Input size='small' addonBefore="Request time" style={{ marginBottom: "4px" }} readOnly />
|
||||||
<Input size='small' addonBefore="Processing time" style={{marginBottom: "4px"}} readOnly/>
|
<Input size='small' addonBefore="Processing time" style={{ marginBottom: "4px" }} readOnly />
|
||||||
<div style={{marginBottom: "8px", marginTop: "8px", display: "flex"}}>
|
<div style={{ marginBottom: "8px", marginTop: "8px", display: "flex" }}>
|
||||||
<Button type="primary" size='middle'>Confirm result</Button>
|
<Button type="primary" size='middle'>Confirm result</Button>
|
||||||
</div>
|
</div>
|
||||||
<Table dataSource={dataSource} columns={columns} />
|
<Table dataSource={dataSource} columns={columns} />
|
||||||
</Sider>
|
</Sider>
|
||||||
</Layout>
|
</Layout>
|
||||||
</Layout>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user