File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
components/InfoViewer/formatters
containers/Tenant/ObjectSummary Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 11import type { TDirEntry } from '../../../types/api/schema' ;
2+ import { EMPTY_DATA_PLACEHOLDER } from '../../../utils/constants' ;
23import { formatDateTime } from '../../../utils/dataFormatters/dataFormatters' ;
34import i18n from '../i18n' ;
45import { createInfoFormatter } from '../utils' ;
56
67export const formatCommonItem = createInfoFormatter < TDirEntry > ( {
78 values : {
89 PathType : ( value ) => value ?. substring ( 'EPathType' . length ) ,
9- CreateStep : formatDateTime ,
10+ CreateStep : ( value ) => ( Number ( value ) ? formatDateTime ( value ) : EMPTY_DATA_PLACEHOLDER ) ,
1011 } ,
1112 labels : {
1213 PathType : i18n ( 'common.type' ) ,
Original file line number Diff line number Diff line change @@ -167,10 +167,12 @@ export function ObjectSummary({
167167
168168 overview . push ( { name : i18n ( 'field_version' ) , content : PathVersion } ) ;
169169
170- overview . push ( {
171- name : i18n ( 'field_created' ) ,
172- content : formatDateTime ( CreateStep ) ,
173- } ) ;
170+ if ( Number ( CreateStep ) ) {
171+ overview . push ( {
172+ name : i18n ( 'field_created' ) ,
173+ content : formatDateTime ( CreateStep ) ,
174+ } ) ;
175+ }
174176
175177 const { PathDescription} = currentObjectData ;
176178
You can’t perform that action at this time.
0 commit comments