fix(date formatting): Show study date as a fallback for an empty series date and show 'No Study Date' as a back up for both (#3483)

This commit is contained in:
Joe Boccanfuso authored and GitHub committed 2023-06-29 10:43:56 -04:00
1 parent fa37593696
commit 15ad8f29cd
4 files changed
+11 -4

No files matched your search

@@ -1,4 +1,5 @@
import React, { useState, useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import PropTypes from 'prop-types';
import { utils } from '@ohif/core';
import {
@@ -31,6 +32,8 @@ function PanelStudyBrowserTracking({
uiNotificationService,
} = servicesManager.services;
const { t } = useTranslation('Common');
// Normally you nest the components so the tree isn't so deep, and the data
// doesn't have to have such an intense shape. This works well enough for now.
// Tabs --> Studies --> DisplaySets --> Thumbnails
@@ -134,7 +137,7 @@ function PanelStudyBrowserTracking({
const actuallyMappedStudies = mappedStudies.map(qidoStudy => {
return {
studyInstanceUid: qidoStudy.StudyInstanceUID,
date: formatDate(qidoStudy.StudyDate),
date: formatDate(qidoStudy.StudyDate) || t('NoStudyDate'),
description: qidoStudy.StudyDescription,
modalities: qidoStudy.ModalitiesInStudy,
numInstances: qidoStudy.NumInstances,