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}
|
: null}
|
||||||
>
|
>
|
||||||
<span className={item?.id === displayedValues?.id ? 'selected-timeline' : ''}>
|
<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>
|
</span>
|
||||||
</Timeline.Item>
|
</Timeline.Item>
|
||||||
)}
|
)}
|
||||||
|
@ -36,7 +36,6 @@ export const drillingFluidDefaultData = {
|
|||||||
idWell: 0,
|
idWell: 0,
|
||||||
key: 'drillingFluidDefaultData',
|
key: 'drillingFluidDefaultData',
|
||||||
idCategory: 0,
|
idCategory: 0,
|
||||||
timestamp: new Date().toISOString(),
|
|
||||||
isDefaultData: true,
|
isDefaultData: true,
|
||||||
data: {
|
data: {
|
||||||
"name": 0,
|
"name": 0,
|
||||||
|
@ -22,13 +22,10 @@ export default function Measure({idWell}){
|
|||||||
setIsMeasuresUpdating(false)
|
setIsMeasuresUpdating(false)
|
||||||
|
|
||||||
const fluids = measures.filter(el => el.idCategory === 1)
|
const fluids = measures.filter(el => el.idCategory === 1)
|
||||||
drillingFluidDefaultData.timestamp = new Date().toISOString()
|
|
||||||
setFluidValues(fluids.length ? fluids : [drillingFluidDefaultData])
|
setFluidValues(fluids.length ? fluids : [drillingFluidDefaultData])
|
||||||
const muds = measures.filter(el => el.idCategory === 2)
|
const muds = measures.filter(el => el.idCategory === 2)
|
||||||
mudDiagramDefaultData.timestamp = new Date().toISOString()
|
|
||||||
setMudValues(muds.length ? muds : [mudDiagramDefaultData])
|
setMudValues(muds.length ? muds : [mudDiagramDefaultData])
|
||||||
const nnbs = measures.filter(el => el.idCategory === 3)
|
const nnbs = measures.filter(el => el.idCategory === 3)
|
||||||
nnbDefaultData.timestamp = new Date().toISOString()
|
|
||||||
setNnbValues(nnbs.length ? nnbs : [nnbDefaultData])
|
setNnbValues(nnbs.length ? nnbs : [nnbDefaultData])
|
||||||
}
|
}
|
||||||
,setShowLoader
|
,setShowLoader
|
||||||
|
@ -30,7 +30,6 @@ export const mudDiagramDefaultData = {
|
|||||||
idWell: 0,
|
idWell: 0,
|
||||||
key: 'mudDiagramDefaultData',
|
key: 'mudDiagramDefaultData',
|
||||||
idCategory: 0,
|
idCategory: 0,
|
||||||
timestamp: new Date().toISOString(),
|
|
||||||
isDefaultData: true,
|
isDefaultData: true,
|
||||||
data: {
|
data: {
|
||||||
"probeNumber": 0,
|
"probeNumber": 0,
|
||||||
|
@ -25,7 +25,6 @@ export const nnbDefaultData = {
|
|||||||
idWell: 0,
|
idWell: 0,
|
||||||
key: 'nnbDefaultData',
|
key: 'nnbDefaultData',
|
||||||
idCategory: 0,
|
idCategory: 0,
|
||||||
timestamp: new Date().toISOString(),
|
|
||||||
isDefaultData: true,
|
isDefaultData: true,
|
||||||
data: {
|
data: {
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user