From acbb904f7f431cbd409c08ee800bc56101e4d7ea Mon Sep 17 00:00:00 2001 From: Stefano Ricci Date: Wed, 25 Dec 2024 00:48:01 +0100 Subject: [PATCH] Records list: show "---" when owner is empty --- webapp/views/App/views/Data/Records/RecordOwnerColumn.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webapp/views/App/views/Data/Records/RecordOwnerColumn.js b/webapp/views/App/views/Data/Records/RecordOwnerColumn.js index cc8c300b23..4ab98ba75e 100644 --- a/webapp/views/App/views/Data/Records/RecordOwnerColumn.js +++ b/webapp/views/App/views/Data/Records/RecordOwnerColumn.js @@ -2,6 +2,8 @@ import React, { useCallback } from 'react' import { useDispatch } from 'react-redux' import PropTypes from 'prop-types' +import { Strings } from '@openforis/arena-core' + import * as Record from '@core/record/record' import * as User from '@core/user/user' @@ -58,7 +60,7 @@ export const RecordOwnerColumn = (props) => { canEdit={canEdit} className="record-owner-col" item={record} - renderItem={({ item }) => Record.getOwnerName(item)} + renderItem={({ item }) => Strings.defaultIfEmpty('---')(Record.getOwnerName(item))} renderItemEditing={() => } /> )