forked from ddrilling/asb_cloud_front
CF2-49: Added 'no data' display if no measures are uploaded
This commit is contained in:
parent
61049d6b8b
commit
11650fea46
@ -170,7 +170,7 @@ export const MeasureTable = ({idWell, idCategory, title, columns, values, update
|
||||
: null}
|
||||
>
|
||||
<span className={item?.id === displayedValues?.id ? 'selected-timeline' : ''}>
|
||||
{moment.utc(item.timestamp).local().format(format)}
|
||||
{item.timestamp ? moment.utc(item.timestamp).local().format(format) : 'Нет данных'}
|
||||
</span>
|
||||
</Timeline.Item>
|
||||
)}
|
||||
|
@ -36,7 +36,6 @@ export const drillingFluidDefaultData = {
|
||||
idWell: 0,
|
||||
key: 'drillingFluidDefaultData',
|
||||
idCategory: 0,
|
||||
timestamp: new Date().toISOString(),
|
||||
isDefaultData: true,
|
||||
data: {
|
||||
"name": 0,
|
||||
|
@ -22,13 +22,10 @@ export default function Measure({idWell}){
|
||||
setIsMeasuresUpdating(false)
|
||||
|
||||
const fluids = measures.filter(el => el.idCategory === 1)
|
||||
drillingFluidDefaultData.timestamp = new Date().toISOString()
|
||||
setFluidValues(fluids.length ? fluids : [drillingFluidDefaultData])
|
||||
const muds = measures.filter(el => el.idCategory === 2)
|
||||
mudDiagramDefaultData.timestamp = new Date().toISOString()
|
||||
setMudValues(muds.length ? muds : [mudDiagramDefaultData])
|
||||
const nnbs = measures.filter(el => el.idCategory === 3)
|
||||
nnbDefaultData.timestamp = new Date().toISOString()
|
||||
setNnbValues(nnbs.length ? nnbs : [nnbDefaultData])
|
||||
}
|
||||
,setShowLoader
|
||||
|
@ -30,7 +30,6 @@ export const mudDiagramDefaultData = {
|
||||
idWell: 0,
|
||||
key: 'mudDiagramDefaultData',
|
||||
idCategory: 0,
|
||||
timestamp: new Date().toISOString(),
|
||||
isDefaultData: true,
|
||||
data: {
|
||||
"probeNumber": 0,
|
||||
|
@ -25,7 +25,6 @@ export const nnbDefaultData = {
|
||||
idWell: 0,
|
||||
key: 'nnbDefaultData',
|
||||
idCategory: 0,
|
||||
timestamp: new Date().toISOString(),
|
||||
isDefaultData: true,
|
||||
data: {
|
||||
"depth": 0,
|
||||
|
Loading…
Reference in New Issue
Block a user