import { Progress, Button } from "antd" import { download, notify } from "../../components/factory" export const getReportFile = async (fileInfo) => { try { await download(`/api/well/${fileInfo.idWell}/files/${fileInfo.id}`) } catch (error) { notify(`Не удалось скачать отчет ${fileInfo.name} по скважине (${fileInfo.idWell})`, 'error') console.log(error) } } export const ReportCreationNotify = ({progressData}) => { progressData = progressData ?? {progress: 0.0, operation: 'Создание отчета'} let downloadButton = null if (progressData.file) downloadButton = const progressText = `${progressData.operation} стр ${progressData.currentPage} из ${progressData.totalPages}` return ( <>
{progressText} {downloadButton} ) }