fix(bugs): enhancements and bug fixes (#4036)

This commit is contained in:
Ibrahim authored and GitHub committed 2024-04-16 09:01:06 -04:00
1 parent 41a8d105f1
commit e80fc6f477
58 files changed
+768 -148

No files matched your search

@@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import { Icon } from '@ohif/ui';
import { utils } from '@ohif/core';
import { PatientInfoVisibility } from '../../types';
const { formatDate, formatPN } = utils;
@@ -70,7 +71,9 @@ function usePatientInfo(servicesManager) {
}
function HeaderPatientInfo({ servicesManager, appConfig }) {
const initialExpandedState = appConfig.showPatientInfo === 'visible';
const initialExpandedState =
appConfig.showPatientInfo === PatientInfoVisibility.VISIBLE ||
appConfig.showPatientInfo === PatientInfoVisibility.VISIBLE_READONLY;
const [expanded, setExpanded] = useState(initialExpandedState);
const { patientInfo, isMixedPatients } = usePatientInfo(servicesManager);
@@ -81,7 +84,7 @@ function HeaderPatientInfo({ servicesManager, appConfig }) {
}, [isMixedPatients, expanded]);
const handleOnClick = () => {
if (!isMixedPatients) {
if (!isMixedPatients && appConfig.showPatientInfo !== PatientInfoVisibility.VISIBLE_READONLY) {
setExpanded(!expanded);
}
};