2021-10-29 17:49:06 +05:00
|
|
|
import { Progress, Button } from 'antd'
|
2022-01-24 17:32:45 +05:00
|
|
|
|
|
|
|
import { downloadFile } from '@components/factory'
|
2021-08-18 10:35:39 +05:00
|
|
|
|
2021-10-29 17:49:06 +05:00
|
|
|
export const ReportCreationNotify = ({ progressData }) => (
|
|
|
|
<>
|
|
|
|
<Progress percent={ Number(progressData.progress?.toFixed(2)) } />
|
|
|
|
<br/>
|
|
|
|
<span>{progressData.operation} стр {progressData.currentPage} из {progressData.totalPages}</span>
|
|
|
|
{progressData.file && (
|
|
|
|
<Button
|
|
|
|
type={'link'}
|
|
|
|
onClick={() => {downloadFile(progressData.file)}}
|
|
|
|
download={progressData.file.name}
|
|
|
|
>
|
2021-09-23 14:18:46 +05:00
|
|
|
{progressData.file.name}
|
|
|
|
</Button>
|
2021-10-29 17:49:06 +05:00
|
|
|
)}
|
2021-08-18 10:35:39 +05:00
|
|
|
</>
|
2021-10-29 17:49:06 +05:00
|
|
|
)
|
|
|
|
|
|
|
|
ReportCreationNotify.defaultProps = {
|
|
|
|
progressData: {
|
|
|
|
progress: 0.0,
|
|
|
|
operation: 'Создание отчета',
|
|
|
|
currentPage: 0,
|
|
|
|
totalPages: 0,
|
|
|
|
file: null
|
|
|
|
}
|
|
|
|
}
|