From 25012147398175ef10ebd09ae8cd17ebb4ee1942 Mon Sep 17 00:00:00 2001 From: goodmice Date: Wed, 17 Nov 2021 12:07:33 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=D0=BD=D1=83=D0=B6=D0=BD=D1=8B?= =?UTF-8?q?=D0=B9=20=D1=84=D0=B0=D0=B9=D0=BB=20=D1=83=D0=B4=D0=B0=D0=BB?= =?UTF-8?q?=D1=91=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Measure/MeasureTableOld.jsx | 54 --------------------------- 1 file changed, 54 deletions(-) delete mode 100644 src/pages/Measure/MeasureTableOld.jsx diff --git a/src/pages/Measure/MeasureTableOld.jsx b/src/pages/Measure/MeasureTableOld.jsx deleted file mode 100644 index 7aab0f0..0000000 --- a/src/pages/Measure/MeasureTableOld.jsx +++ /dev/null @@ -1,54 +0,0 @@ -import { useState, useEffect } from 'react' -import { Table, Button, Modal } from 'antd' -import { HourglassOutlined } from '@ant-design/icons' -import LoaderPortal from '../../components/LoaderPortal' -import { invokeWebApiWrapperAsync } from '../../components/factory' -import { MeasureService } from '../../services/api' -import { Editor } from './Editor' - -export const MeasureTable = ({idWell, idCategory, title, columns}) => { - const [showLoader, setShowLoader] = useState(false) - const [showEditor, setShowEditor] = useState(false) - const [lastData, setLastData] = useState({}) - - const update = ()=>invokeWebApiWrapperAsync(async()=>{ - const data = await MeasureService.getLast(idWell, idCategory) - setLastData(data) - } - , setShowLoader - , "не удалось загрузить") - - useEffect(update, [idWell, idCategory]) - - const timestamp = lastData ? new Date(lastData?.timestamp).toLocaleString() : '-' - - return -

{title}

- Дата: {timestamp} -   - - - setShowEditor(false)} - onCancel={() => setShowEditor(false)} - width="95%" - footer={null} - > - - - -} \ No newline at end of file