fix(store-segmentation): storing segmentations was hitting the wrong command resulting in an undefined datasource (#4755)
[OHI-1445]
This commit is contained in:
parent
613401e043
commit
9b8e5cfd1a
@ -61,7 +61,11 @@ export default function PanelSegmentation({
|
||||
},
|
||||
|
||||
storeSegmentation: async segmentationId => {
|
||||
commandsManager.run('storeSegmentation', { segmentationId });
|
||||
commandsManager.run({
|
||||
commandName: 'storeSegmentation',
|
||||
commandOptions: { segmentationId },
|
||||
context: 'CORNERSTONE',
|
||||
});
|
||||
},
|
||||
|
||||
onSegmentationDownloadRTSS: segmentationId => {
|
||||
|
||||
@ -12,7 +12,12 @@ import {
|
||||
* The default sub-menu appearance and setup is defined here, but this can be
|
||||
* replaced by
|
||||
*/
|
||||
const getMenuItemsDefault = ({ commandsManager, items, servicesManager, ...props }) => {
|
||||
const getMenuItemsDefault = ({
|
||||
commandsManager,
|
||||
items,
|
||||
servicesManager,
|
||||
...props
|
||||
}: withAppTypes) => {
|
||||
const { customizationService } = servicesManager.services;
|
||||
|
||||
// This allows replacing the default child item for menus, whereas the entire
|
||||
@ -20,8 +25,23 @@ const getMenuItemsDefault = ({ commandsManager, items, servicesManager, ...props
|
||||
const menuContent = customizationService.getCustomization('ohif.menuContent');
|
||||
|
||||
// Default menu item component if none is provided through customization
|
||||
const DefaultMenuItem = ({ item }) => (
|
||||
<DropdownMenuItem onClick={item.onClick}>{item.label || item.title}</DropdownMenuItem>
|
||||
|
||||
const DefaultMenuItem = ({
|
||||
item,
|
||||
}: {
|
||||
item: {
|
||||
id: string;
|
||||
label: string;
|
||||
iconName: string;
|
||||
onClick: ({ ...props }: withAppTypes) => () => void;
|
||||
};
|
||||
}) => (
|
||||
<DropdownMenuItem onClick={() => item.onClick({ ...props })}>
|
||||
<div className="flex items-center gap-2">
|
||||
{item.iconName && <Icons.ByName name={item.iconName} />}
|
||||
<span>{item.label}</span>
|
||||
</div>
|
||||
</DropdownMenuItem>
|
||||
);
|
||||
|
||||
const MenuItemComponent = menuContent?.content || DefaultMenuItem;
|
||||
|
||||
@ -8,7 +8,11 @@ export default {
|
||||
id: 'tagBrowser',
|
||||
label: 'Tag Browser',
|
||||
iconName: 'DicomTagBrowser',
|
||||
commands: 'openDICOMTagViewer',
|
||||
onClick: ({ commandsManager, displaySetInstanceUID }: withAppTypes) => {
|
||||
commandsManager.runCommand('openDICOMTagViewer', {
|
||||
displaySetInstanceUID,
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
'studyBrowser.sortFunctions': [
|
||||
|
||||
Loading…
Reference in New Issue
Block a user