Minor UI improvements
This commit is contained in:
parent
c0ddb950ce
commit
458dfe66c2
@ -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>
|
||||||
);
|
);
|
||||||
|
@ -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