feat: improve disableEditing flag (#3875)
Co-authored-by: Igor Octaviano <igoroctaviano@gmail.com>
This commit is contained in:
1 parent
7d5607073d
commit
2049c0936c
5 files changed
+82
-44
No files matched your search
+18
-14
@@ -10,6 +10,7 @@ import {
|
||||
} from '@ohif/ui';
|
||||
import { DicomMetadataStore, utils } from '@ohif/core';
|
||||
import { useDebounce } from '@hooks';
|
||||
import { useAppConfig } from '@state';
|
||||
import ActionButtons from './ActionButtons';
|
||||
import { useTrackedMeasurements } from '../../getContextModule';
|
||||
import debounce from 'lodash.debounce';
|
||||
@@ -36,6 +37,7 @@ function PanelMeasurementTableTracking({ servicesManager, extensionManager }) {
|
||||
);
|
||||
const [displayMeasurements, setDisplayMeasurements] = useState([]);
|
||||
const measurementsPanelRef = useRef(null);
|
||||
const [appConfig] = useAppConfig();
|
||||
|
||||
useEffect(() => {
|
||||
const measurements = measurementService.getMeasurements();
|
||||
@@ -244,20 +246,22 @@ function PanelMeasurementTableTracking({ servicesManager, extensionManager }) {
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex justify-center p-4">
|
||||
<ActionButtons
|
||||
onExportClick={exportReport}
|
||||
onCreateReportClick={() => {
|
||||
sendTrackedMeasurementsEvent('SAVE_REPORT', {
|
||||
viewportId: viewportGrid.activeViewportId,
|
||||
isBackupSave: true,
|
||||
});
|
||||
}}
|
||||
disabled={
|
||||
additionalFindings.length === 0 && displayMeasurementsWithoutFindings.length === 0
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
{!appConfig?.disableEditing && (
|
||||
<div className="flex justify-center p-4">
|
||||
<ActionButtons
|
||||
onExportClick={exportReport}
|
||||
onCreateReportClick={() => {
|
||||
sendTrackedMeasurementsEvent('SAVE_REPORT', {
|
||||
viewportId: viewportGrid.activeViewportId,
|
||||
isBackupSave: true,
|
||||
});
|
||||
}}
|
||||
disabled={
|
||||
additionalFindings.length === 0 && displayMeasurementsWithoutFindings.length === 0
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user