standardized nullish grid cells to display hyphens i nnstead of nothing or (none)
authorLisa Knox <lisaknox83@gmail.com>
Wed, 30 Nov 2022 16:21:50 +0000 (11:21 -0500)
committerLisa Knox <lisaknox83@gmail.com>
Wed, 30 Nov 2022 16:21:50 +0000 (11:21 -0500)
Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox@curii.com>

src/common/formatters.ts
src/views-components/data-explorer/renderers.tsx

index b4b9bc41381085bb1691a1a4908c14c58ec471b8..3cacc6c83bd18519eaa7f1af01d63bd56ef44eb3 100644 (file)
@@ -20,7 +20,7 @@ export const formatDate = (isoDate?: string | null, utc: boolean = false) => {
     }
     return text === 'Invalid Date' ? '(none)' : text;
   }
-  return '(none)';
+  return '-';
 };
 
 export const formatFileSize = (size?: number | string) => {
@@ -36,7 +36,7 @@ export const formatFileSize = (size?: number | string) => {
     }
   }
   if ((typeof size === 'string' && size === '') || size === undefined) {
-    return '';
+    return '-';
   }
   return '0 B';
 };
index 17bd3f2a884c3f25b25c170cec7363fd58695fde..9c24a677bbe7c67e7b16a48bd1cf417569744ba1 100644 (file)
@@ -665,7 +665,7 @@ export const ResourceWorkflowStatus = connect(
         };
     })((props: { ownerUuid?: string, uuidPrefix: string }) => renderWorkflowStatus(props.uuidPrefix, props.ownerUuid));
 
-const renderProcessState = (processState: string) => <Typography>{processState}</Typography>
+const renderProcessState = (processState: string) => <Typography>{processState || '-'}</Typography>
 
 export const ResourceProcessState = connect(
     (state: RootState, props: { uuid: string }) => {
@@ -715,7 +715,7 @@ export const ResourceFileSize = connect(
 
 const renderOwner = (owner: string) =>
     <Typography noWrap>
-        {owner}
+        {owner || '-'}
     </Typography>;
 
 export const ResourceOwner = connect(