[OHIF-309] - Users should be able to delete an SR from the side panel when the behavior is supported by the data source (#1952)
* Remove trailing zeroes from patient age * WIP reject + remove displaySet. * ohif-316: Update DICOM SR thumbnail design to include a delete action (#1948) * add "supportsReject" to netlify config Co-authored-by: Igor Octaviano <igoroctaviano@gmail.com> Co-authored-by: Danny Brown <danny.ri.brown@gmail.com>
This commit is contained in:
15 files changed
+236
-41
No files matched your search
@@ -5,14 +5,13 @@ import PropTypes from 'prop-types';
|
||||
import { Typography, Icon } from '..';
|
||||
|
||||
const CloseButton = ({ onClick }) => {
|
||||
const theme = 'bg-transparent fill-primary-active';
|
||||
const outline = 'outline-none focus:outline-none';
|
||||
const flex = 'flex h-full';
|
||||
|
||||
return (
|
||||
<button className={classNames(flex, theme, 'border-0')} onClick={onClick}>
|
||||
<Icon name="close" className={classNames(theme, outline, 'h-3 w-3')} />
|
||||
</button>
|
||||
<Icon
|
||||
data-cy="close-button"
|
||||
onClick={onClick}
|
||||
name="close"
|
||||
className="cursor-pointer text-primary-active w-6 h-6"
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@ const ThumbnailList = ({
|
||||
seriesDate,
|
||||
viewportIdentificator,
|
||||
isTracked,
|
||||
canReject,
|
||||
onReject,
|
||||
imageSrc,
|
||||
imageAltText,
|
||||
}) => {
|
||||
@@ -82,6 +84,8 @@ const ThumbnailList = ({
|
||||
modalityTooltip={_getModalityTooltip(modality)}
|
||||
seriesDate={seriesDate}
|
||||
description={description}
|
||||
canReject={canReject}
|
||||
onReject={onReject}
|
||||
onClick={() => onThumbnailClick(displaySetInstanceUID)}
|
||||
onDoubleClick={() =>
|
||||
onThumbnailDoubleClick(displaySetInstanceUID)
|
||||
@@ -113,7 +117,10 @@ ThumbnailList.propTypes = {
|
||||
'thumbnailTracked',
|
||||
'thumbnailNoImage',
|
||||
]).isRequired,
|
||||
viewportIdentificator: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
|
||||
viewportIdentificator: PropTypes.oneOfType([
|
||||
PropTypes.string,
|
||||
PropTypes.array,
|
||||
]),
|
||||
isTracked: PropTypes.bool,
|
||||
/**
|
||||
* Data the thumbnail should expose to a receiving drop target. Use a matching
|
||||
|
||||
@@ -12,12 +12,14 @@ const ThumbnailNoImage = ({
|
||||
modalityTooltip,
|
||||
onClick,
|
||||
onDoubleClick,
|
||||
canReject,
|
||||
onReject,
|
||||
dragData,
|
||||
isActive,
|
||||
}) => {
|
||||
const [collectedProps, drag, dragPreview] = useDrag({
|
||||
item: { ...dragData },
|
||||
canDrag: function(monitor) {
|
||||
canDrag: function (monitor) {
|
||||
return Object.keys(dragData).length !== 0;
|
||||
},
|
||||
});
|
||||
@@ -51,8 +53,11 @@ const ThumbnailNoImage = ({
|
||||
</Tooltip>
|
||||
<span className="ml-4 text-base text-blue-300">{seriesDate}</span>
|
||||
</div>
|
||||
<div className="ml-12 text-base text-white break-all">
|
||||
{description}
|
||||
<div className="flex flex-row">
|
||||
{canReject && <Icon name="old-trash" className="ml-4 w-3 text-red-500" onClick={onReject} />}
|
||||
<div className="ml-4 text-base text-white break-all">
|
||||
{description}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user