From 0b18324a47d257071f7ca8fe07cad197755d0ac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A4=D1=80=D0=BE=D0=BB=D0=BE=D0=B2?= Date: Wed, 1 Sep 2021 10:32:47 +0500 Subject: [PATCH] =?UTF-8?q?CF2-60=20DrillingProgram=20>=20DocumentsTemplat?= =?UTF-8?q?e=20>=20UploadForm=20=D0=B7=D0=B0=D0=B4=D0=B0=D0=B2=D0=B0=D1=82?= =?UTF-8?q?=D1=8C=20=D1=84=D0=B8=D0=BB=D1=8C=D1=82=D1=80=20=D0=B4=D0=BE?= =?UTF-8?q?=D0=BF=D1=83=D1=81=D1=82=D0=B8=D0=BC=D1=8B=D1=85=20=D1=84=D0=BE?= =?UTF-8?q?=D1=80=D0=BC=D0=B0=D1=82=D0=BE=D0=B2=20=D1=84=D0=B0=D0=B9=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/UploadForm.jsx | 3 ++- src/pages/Documents/DocumentsTemplate.jsx | 3 ++- src/pages/Documents/DrillingProgram.jsx | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/UploadForm.jsx b/src/components/UploadForm.jsx index 7f1e437..95a3055 100644 --- a/src/components/UploadForm.jsx +++ b/src/components/UploadForm.jsx @@ -3,7 +3,7 @@ import { UploadOutlined } from '@ant-design/icons' import { useState } from 'react' import { upload } from './factory' -export default function UploadForm({url, onUploadStart, onUploadComplete, onUploadError}) { +export default function UploadForm({url, accept, onUploadStart, onUploadComplete, onUploadError}) { const [fileList, setfileList] = useState([]) const handleFileSend = async (values) => { @@ -31,6 +31,7 @@ export default function UploadForm({url, onUploadStart, onUploadComplete, onUplo setfileList(props.fileList)}> diff --git a/src/pages/Documents/DocumentsTemplate.jsx b/src/pages/Documents/DocumentsTemplate.jsx index 18bc372..4a998a1 100644 --- a/src/pages/Documents/DocumentsTemplate.jsx +++ b/src/pages/Documents/DocumentsTemplate.jsx @@ -17,7 +17,7 @@ const pageSize = 12 const { RangePicker } = DatePicker const { Search } = Input -export default function DocumentsTemplate({ idCategory, idWell }) { +export default function DocumentsTemplate({ idCategory, idWell, accept }) { const [page, setPage] = useState(1) const [filterDataRange, setFilterDataRange] = useState([]) const [filterCompanyName, setFilterCompanyName] = useState([]) @@ -175,6 +175,7 @@ export default function DocumentsTemplate({ idCategory, idWell }) { Загрузка setShowLoader(true)} onUploadComplete={handleUploadComplete}/> diff --git a/src/pages/Documents/DrillingProgram.jsx b/src/pages/Documents/DrillingProgram.jsx index 3235d07..1a43a23 100644 --- a/src/pages/Documents/DrillingProgram.jsx +++ b/src/pages/Documents/DrillingProgram.jsx @@ -9,7 +9,7 @@ const idFileCategoryDrillingProgramItems = 13; export default function DrillingProgram({idWell}) { const [showLoader, setShowLoader] = useState(false) - const urlDownloadProgram =`api/well/${idWell}/drillingProgram` + const urlDownloadProgram =`/api/well/${idWell}/drillingProgram` const downloadProgram = () => invokeWebApiWrapperAsync(async()=>{ await download(urlDownloadProgram) @@ -21,6 +21,7 @@ export default function DrillingProgram({idWell}) { + idCategory={idFileCategoryDrillingProgramItems} + accept='.xlsx'/> ) } \ No newline at end of file