CF2-49: Added 'no data' display if no measures are uploaded

This commit is contained in:
KharchenkoVV 2021-10-07 15:34:59 +05:00
parent 61049d6b8b
commit 11650fea46
5 changed files with 1 additions and 7 deletions

View File

@ -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>
)} )}

View File

@ -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,

View File

@ -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

View File

@ -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,

View File

@ -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,