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]} +

+ )}
)}