fix(ObjectSummary): do not display CreateTime if CreateStep is 0#2018
fix(ObjectSummary): do not display CreateTime if CreateStep is 0#2018artemmufazalov merged 2 commits intomainfrom
Conversation
cdcf675 to
549e848
Compare
| values: { | ||
| PathType: (value) => value?.substring('EPathType'.length), | ||
| CreateStep: formatDateTime, | ||
| CreateStep: (value) => (Number(value) ? formatDateTime(value) : EMPTY_DATA_PLACEHOLDER), |
There was a problem hiding this comment.
maybe it would be better to handle zero values in formatDateTime and to pass EMPTY_DATA_PLACEHOLDER as defaultValue ?
Can't imagine anyone would need 1970-01-01 03:00 value (that is returned for formatDateTime(0)) anywhere accross the project
| }, | ||
| ]; | ||
|
|
||
| if (Number(CreateStep)) { |
There was a problem hiding this comment.
Mb it would be more consistent to display EMPTY_DATA_PLACEHOLDER (via date formatter and defaultValue) everywhere?
There was a problem hiding this comment.
I don't think so. Normally, we have 0 CreateStep for certain list of entities - Domain, databases, system tables. So in your case there will be always placeholder there. I added placeholder in formatCommonItem just as fallback, but you are right - it's better to check correctness inside formatDateTime
Closes #1886
Prevent
1970-01-01 03:00in created timeCI Results
Test Status: ✅ PASSED
📊 Full Report
Test Changes Summary ⏭️1
⏭️ Skipped Tests (1)
Bundle Size: ✅
Current: 83.22 MB | Main: 83.22 MB
Diff: +1.21 KB (0.00%)
✅ Bundle size unchanged.
ℹ️ CI Information