File tree 2 files changed +8
-5
lines changed
components/InfoViewer/formatters
containers/Tenant/ObjectSummary
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 1
1
import type { TDirEntry } from '../../../types/api/schema' ;
2
+ import { EMPTY_DATA_PLACEHOLDER } from '../../../utils/constants' ;
2
3
import { formatDateTime } from '../../../utils/dataFormatters/dataFormatters' ;
3
4
import i18n from '../i18n' ;
4
5
import { createInfoFormatter } from '../utils' ;
5
6
6
7
export const formatCommonItem = createInfoFormatter < TDirEntry > ( {
7
8
values : {
8
9
PathType : ( value ) => value ?. substring ( 'EPathType' . length ) ,
9
- CreateStep : formatDateTime ,
10
+ CreateStep : ( value ) => ( Number ( value ) ? formatDateTime ( value ) : EMPTY_DATA_PLACEHOLDER ) ,
10
11
} ,
11
12
labels : {
12
13
PathType : i18n ( 'common.type' ) ,
Original file line number Diff line number Diff line change @@ -167,10 +167,12 @@ export function ObjectSummary({
167
167
168
168
overview . push ( { name : i18n ( 'field_version' ) , content : PathVersion } ) ;
169
169
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
+ }
174
176
175
177
const { PathDescription} = currentObjectData ;
176
178
You can’t perform that action at this time.
0 commit comments