diff --git a/src/pages/Documents/DocumentsTemplate.jsx b/src/pages/Documents/DocumentsTemplate.jsx index 4f8c6af..6409392 100644 --- a/src/pages/Documents/DocumentsTemplate.jsx +++ b/src/pages/Documents/DocumentsTemplate.jsx @@ -8,7 +8,7 @@ import { formatBytes, } from "../../components/factory" import { EditableTable, makePaginationObject } from "../../components/Table" -import UploadForm from "../../components/UploadForm" +import {UploadForm} from "../../components/UploadForm" import LoaderPortal from "../../components/LoaderPortal" import {UserView} from '../../components/UserView' import {CompanyView} from '../../components/CompanyView' diff --git a/src/pages/Well.jsx b/src/pages/Well.jsx index 01103e5..9da4b48 100644 --- a/src/pages/Well.jsx +++ b/src/pages/Well.jsx @@ -46,7 +46,7 @@ export default function Well() { Рапорт }> - Операции по скважине + Операции по скважине }> Архив @@ -89,7 +89,7 @@ export default function Well() { - + diff --git a/src/pages/WellOperations/ImportExportBar.jsx b/src/pages/WellOperations/ImportExportBar.jsx new file mode 100644 index 0000000..11addca --- /dev/null +++ b/src/pages/WellOperations/ImportExportBar.jsx @@ -0,0 +1,54 @@ +import { Button, Tooltip, Modal } from "antd"; +import {useState} from 'react' +import { FileOutlined, ImportOutlined, ExportOutlined } from '@ant-design/icons' +import { download } from '../../components/factory' +import { ImportOperations } from './ImportOperations' + +const style = {margin:4} + +export const ImportExportBar = ({idWell, onImported}) =>{ + const [isImportModalVisible, setIsImportModalVisible] = useState(false) + + const downloadTemplate = async () => download(`/api/well/${idWell}/wellOperations/tamplate`) + const downloadExport = async () => download(`/api/well/${idWell}/wellOperations/export`) + + const onDone = () => { + setIsImportModalVisible(false) + if(onImported) + onImported() + } + + return <> + +