commit
7b61c09c23
@ -45,29 +45,22 @@ function LeftMenu() {
|
|||||||
style={{
|
style={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
justifyContent: 'space-between',
|
|
||||||
height: '100%',
|
height: '100%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
<div style={{
|
||||||
|
padding: '16px 8px 8px 8px',
|
||||||
|
fontWeight: 600,
|
||||||
|
color: '#555',
|
||||||
|
}}>
|
||||||
|
Menu
|
||||||
|
</div>
|
||||||
<Menu
|
<Menu
|
||||||
mode='vertical'
|
mode='vertical'
|
||||||
selectedKeys={[location.pathname]}
|
selectedKeys={[location.pathname]}
|
||||||
style={{ borderRight: 'none' }}
|
style={{ borderRight: 'none' }}
|
||||||
items={generalSubItems}
|
items={generalSubItems}
|
||||||
/>
|
/>
|
||||||
{/* <div
|
|
||||||
style={{
|
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
|
||||||
marginLeft: '20px',
|
|
||||||
marginBottom: '20px',
|
|
||||||
gap: '10px',
|
|
||||||
cursor: 'pointer',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<QuestionCircleOutlined />
|
|
||||||
<span>Help</span>
|
|
||||||
</div> */}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ const columns: TableColumnsType<DataType> = [
|
|||||||
title: 'OCR extraction date',
|
title: 'OCR extraction date',
|
||||||
dataIndex: 'extractionDate',
|
dataIndex: 'extractionDate',
|
||||||
key: 'extractionDate',
|
key: 'extractionDate',
|
||||||
width: '130px',
|
width: 180,
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
if (record.extractionDate.includes('Subtotal'))
|
if (record.extractionDate.includes('Subtotal'))
|
||||||
return (
|
return (
|
||||||
@ -262,6 +262,7 @@ const ReportOverViewTable: React.FC<ReportOverViewTableProps> = ({
|
|||||||
bordered
|
bordered
|
||||||
size='small'
|
size='small'
|
||||||
scroll={{ x: 2000 }}
|
scroll={{ x: 2000 }}
|
||||||
|
pagination={false}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -14,7 +14,7 @@ const ReportTable: React.FC = () => {
|
|||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const [pagination, setPagination] = useState(() => ({
|
const [pagination, setPagination] = useState(() => ({
|
||||||
page: report_data?.page.total_pages || 1,
|
page: 1,
|
||||||
page_size: 10,
|
page_size: 10,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -107,12 +107,6 @@ const Dashboard = () => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item>
|
|
||||||
<Button type='primary' style={{ height: 38 }}
|
|
||||||
>
|
|
||||||
View
|
|
||||||
</Button>
|
|
||||||
</Form.Item>
|
|
||||||
</Form>
|
</Form>
|
||||||
<ReportOverViewTable
|
<ReportOverViewTable
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
|
@ -14,7 +14,7 @@ import { useEffect, useState } from 'react';
|
|||||||
import { useParams } from 'react-router-dom';
|
import { useParams } from 'react-router-dom';
|
||||||
import { downloadReport } from 'request/report';
|
import { downloadReport } from 'request/report';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { SheetViewer } from "react-office-viewer"
|
import { SheetViewer } from "react-office-viewer";
|
||||||
|
|
||||||
export interface ReportFormValues {
|
export interface ReportFormValues {
|
||||||
dateRange: [Dayjs, Dayjs];
|
dateRange: [Dayjs, Dayjs];
|
||||||
@ -138,9 +138,21 @@ const ReportDetail = () => {
|
|||||||
</Typography.Title>
|
</Typography.Title>
|
||||||
</HeaderContainer>
|
</HeaderContainer>
|
||||||
<ReportContainer>
|
<ReportContainer>
|
||||||
{(fileObject && !error) && <SheetViewer file={fileObject} />}
|
{(fileObject && !error) && <>
|
||||||
|
<div style={{ width: '100%', marginBottom: '10px' }}>
|
||||||
|
<b>Note: </b><i>All changes here will not be saved into server.</i>
|
||||||
|
</div>
|
||||||
|
<SheetViewer file={fileObject} />
|
||||||
|
</>}
|
||||||
{(!fileObject && !error) && <Typography.Title level={5}>Loading...</Typography.Title>}
|
{(!fileObject && !error) && <Typography.Title level={5}>Loading...</Typography.Title>}
|
||||||
{error && <Typography.Title level={5}>{error}</Typography.Title>}
|
{error && <>
|
||||||
|
<Typography.Title level={5}>
|
||||||
|
{error}</Typography.Title>
|
||||||
|
<div>Try downloading the file:</div>
|
||||||
|
<a href={fileObject.url} download={fileObject.name}>
|
||||||
|
{fileObject.name}
|
||||||
|
</a>
|
||||||
|
</>}
|
||||||
</ReportContainer>
|
</ReportContainer>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user