Add back button
This commit is contained in:
parent
2fcff26a7e
commit
a01ea01d7e
@ -148,7 +148,7 @@ const ReportTable: React.FC = () => {
|
||||
title: 'Actions',
|
||||
dataIndex: 'actions',
|
||||
key: 'actions',
|
||||
width: 200,
|
||||
width: 210,
|
||||
render: (_, record) => {
|
||||
return (
|
||||
<div style={{ flexDirection: 'row' }}>
|
||||
@ -158,7 +158,7 @@ const ReportTable: React.FC = () => {
|
||||
}}
|
||||
style={{ marginRight: 10 }}
|
||||
>
|
||||
Detail
|
||||
Details
|
||||
</Button>
|
||||
<Button onClick={() => handleDownloadReport(record.report_id)}>
|
||||
Download
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { DownloadOutlined } from '@ant-design/icons';
|
||||
import { DownloadOutlined, ArrowLeftOutlined } from '@ant-design/icons';
|
||||
import { t } from '@lingui/macro';
|
||||
import {
|
||||
Button,
|
||||
@ -271,14 +271,32 @@ const ReportDetail = () => {
|
||||
URL.revokeObjectURL(anchorElement.href);
|
||||
};
|
||||
|
||||
const handleBack = () => {
|
||||
window.history.back();
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<SbtPageHeader
|
||||
title={
|
||||
<Tooltip
|
||||
title={id}
|
||||
style={{ cursor: 'pointer' }}
|
||||
>{t`Report ${id.slice(0, 16)}...`}</Tooltip>
|
||||
<>
|
||||
<Tooltip title={t`Back`}>
|
||||
<Button
|
||||
size='middle'
|
||||
type='default'
|
||||
icon={<ArrowLeftOutlined />}
|
||||
onClick={() => handleBack()}
|
||||
style={{
|
||||
marginRight: 10,
|
||||
lineHeight: '1.8',
|
||||
height: 38
|
||||
}}
|
||||
>
|
||||
{t`Back`}
|
||||
</Button>
|
||||
</Tooltip>
|
||||
{t`Report Details`}
|
||||
</>
|
||||
}
|
||||
extra={
|
||||
<Button
|
||||
@ -298,7 +316,6 @@ const ReportDetail = () => {
|
||||
{report_data?.metadata?.subsidiary}
|
||||
</span>
|
||||
</Typography.Title>
|
||||
|
||||
<Typography.Title level={5}>
|
||||
Start date:{' '}
|
||||
<span style={{ fontWeight: '400' }}>
|
||||
|
Loading…
Reference in New Issue
Block a user