Minor UI improvements
This commit is contained in:
parent
c0ddb950ce
commit
458dfe66c2
@ -48,7 +48,7 @@ const columns: TableColumnsType<DataType> = [
|
||||
title: 'OCR extraction date',
|
||||
dataIndex: 'extractionDate',
|
||||
key: 'extractionDate',
|
||||
width: '130px',
|
||||
width: 180,
|
||||
render: (_, record) => {
|
||||
if (record.extractionDate.includes('Subtotal'))
|
||||
return (
|
||||
@ -262,6 +262,7 @@ const ReportOverViewTable: React.FC<ReportOverViewTableProps> = ({
|
||||
bordered
|
||||
size='small'
|
||||
scroll={{ x: 2000 }}
|
||||
pagination={false}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
@ -107,12 +107,6 @@ const Dashboard = () => {
|
||||
}}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item>
|
||||
<Button type='primary' style={{ height: 38 }}
|
||||
>
|
||||
View
|
||||
</Button>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
<ReportOverViewTable
|
||||
isLoading={isLoading}
|
||||
|
@ -14,7 +14,7 @@ import { useEffect, useState } from 'react';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { downloadReport } from 'request/report';
|
||||
import styled from 'styled-components';
|
||||
import { SheetViewer } from "react-office-viewer"
|
||||
import { SheetViewer } from "react-office-viewer";
|
||||
|
||||
export interface ReportFormValues {
|
||||
dateRange: [Dayjs, Dayjs];
|
||||
@ -138,9 +138,21 @@ const ReportDetail = () => {
|
||||
</Typography.Title>
|
||||
</HeaderContainer>
|
||||
<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>}
|
||||
{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>
|
||||
</>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user