fix: update reject/delete dialog title, body copy, and button text (#2043)

This commit is contained in:
Danny Brown 2020-09-16 22:45:13 -04:00 committed by GitHub
parent 5a66920d1d
commit 3911d74cf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -434,21 +434,21 @@ function _mapDisplaySets(
showOverlay: true, showOverlay: true,
content: Dialog, content: Dialog,
contentProps: { contentProps: {
title: 'Reject Report', title: 'Delete Report',
body: () => ( body: () => (
<div className="p-4 text-white bg-primary-dark"> <div className="p-4 text-white bg-primary-dark">
<p>This is a destructive action.</p> <p>Are you sure you want to delete this report?</p>
<p>Are you sure you want to continue?</p> <p>This action cannot be undone.</p>
</div> </div>
), ),
actions: [ actions: [
{ id: 'cancel', text: 'Cancel', type: 'secondary' }, { id: 'cancel', text: 'Cancel', type: 'secondary' },
{ id: 'save', text: 'Save', type: 'primary' }, { id: 'yes', text: 'Yes', type: 'primary' },
], ],
onClose: () => UIDialogService.dismiss({ id: 'ds-reject-sr' }), onClose: () => UIDialogService.dismiss({ id: 'ds-reject-sr' }),
onSubmit: async ({ action }) => { onSubmit: async ({ action }) => {
switch (action.id) { switch (action.id) {
case 'save': case 'yes':
try { try {
await dataSource.reject.series( await dataSource.reject.series(
ds.StudyInstanceUID, ds.StudyInstanceUID,
@ -457,15 +457,15 @@ function _mapDisplaySets(
DisplaySetService.deleteDisplaySet(displaySetInstanceUID); DisplaySetService.deleteDisplaySet(displaySetInstanceUID);
UIDialogService.dismiss({ id: 'ds-reject-sr' }); UIDialogService.dismiss({ id: 'ds-reject-sr' });
UINotificationService.show({ UINotificationService.show({
title: 'Reject Report', title: 'Delete Report',
message: 'Report rejected successfully', message: 'Report deleted successfully',
type: 'success', type: 'success',
}); });
} catch (error) { } catch (error) {
UIDialogService.dismiss({ id: 'ds-reject-sr' }); UIDialogService.dismiss({ id: 'ds-reject-sr' });
UINotificationService.show({ UINotificationService.show({
title: 'Reject Report', title: 'Delete Report',
message: 'Failed to reject report', message: 'Failed to delete report',
type: 'error', type: 'error',
}); });
} }