From bddd67fd0016747d989bba2e14bb44052fb3a141 Mon Sep 17 00:00:00 2001 From: goodm2ice Date: Thu, 24 Feb 2022 15:22:03 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A1=D1=82=D0=B0=D1=82=D1=83=D1=81=20=D0=BF?= =?UTF-8?q?=D1=80=D0=BE=D0=B3=D1=80=D0=B0=D0=BC=D0=BC=D1=8B=20=D0=B1=D1=83?= =?UTF-8?q?=D1=80=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80?= =?UTF-8?q?=D0=B0=D0=B6=D0=B0=D0=B5=D1=82=D1=81=D1=8F=20=D0=B2=D0=BD=D1=83?= =?UTF-8?q?=D1=82=D1=80=D0=B8=20=D0=B1=D0=BB=D0=BE=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/DrillingProgram/index.jsx | 34 ++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/src/pages/DrillingProgram/index.jsx b/src/pages/DrillingProgram/index.jsx index b42020a..a7ad506 100644 --- a/src/pages/DrillingProgram/index.jsx +++ b/src/pages/DrillingProgram/index.jsx @@ -1,5 +1,5 @@ import { Button, Layout } from 'antd' -import { FileWordOutlined } from '@ant-design/icons' +import { CloseOutlined, FileWordOutlined, LoadingOutlined } from '@ant-design/icons' import { memo, useCallback, useEffect, useState } from 'react' import { Flex } from '@components/Grid' @@ -15,6 +15,13 @@ import CategoryHistory from './CategoryHistory' import '@styles/drilling_program.less' +const stateString = { + 0: 'Не настроена', + 1: 'Согласовывается', + 2: 'Формируется', + [-1]: 'Неизвестно', +} + export const DrillingProgram = memo(({ idWell }) => { const [selectedCategory, setSelectedCategory] = useState() const [historyVisible, setHistoryVisible] = useState(false) @@ -60,12 +67,27 @@ export const DrillingProgram = memo(({ idWell }) => { {data && ( -
-
Программа бурения
+
+
+

Программа бурения

+
- -
Размер: {data.size}
-
Загружен: {formatDate(data.uploadDate)}
+ {data?.idState === 3 ? ( + <> + +
Размер: {data.program.size}
+
Загружен: {formatDate(data.program.uploadDate)}
+ + ) : ( +

+ {data?.idState <= 0 ? ( + + ) : ( + + )} + {stateString[data?.idState ?? -1]} +

+ )}
)}