Skip to content

Commit

Permalink
3835: Data table UI: hide E flag to null value cells (#3836)
Browse files Browse the repository at this point in the history
  • Loading branch information
minotogna committed Jun 5, 2024
1 parent 6a6d756 commit b009f88
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import './Flags.scss'
import React from 'react'
import { useTranslation } from 'react-i18next'

import { Objects } from 'utils/objects'

import { Col, NodeValue, Row } from 'meta/assessment'
import { Authorizer } from 'meta/user'

Expand Down Expand Up @@ -33,7 +35,7 @@ const Flags: React.FC<Props> = (props) => {

const canEditData = Authorizer.canEditData({ country, cycle, section, user })
const linkedNode = col.props.linkedNodes?.[cycle.uuid]
const withEstimation = canEditData && nodeValue?.estimationUuid && !linkedNode
const withEstimation = canEditData && nodeValue?.estimationUuid && !Objects.isEmpty(nodeValue?.raw) && !linkedNode

if (!withEstimation && !linkedNode) {
return null
Expand Down

0 comments on commit b009f88

Please sign in to comment.