Skip to content

Commit

Permalink
Step deletion failures are politely reported
Browse files Browse the repository at this point in the history
When trying to delete an in-use step, this is rejected with a polite
error message.

I did this by adding a `catch` clause to our fork of
`<EntryWrapper>`. Some day, I should probably make some kind of effort
to merge this back into stripes-smart-components.

Fixes last part of UIHAADM-9.
  • Loading branch information
MikeTaylor committed Jan 17, 2024
1 parent 6a1d505 commit 8c8d197
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Improve DatePicker setup. Fixes UIHAADM-69.
* Display `<Datepicker>` in full view by using `usePortal`. Fixes UIHAADM-98.
* Full display of a job now includes start time in header instead of current time. Fixes UIHAADM-103.
* When trying to delete an in-use step, this is rejected with a polite error message. Fixes last part of UIHAADM-9.

## [2.0.0](https://github.com/folio-org/ui-harvester-admin/tree/v2.0.0) (2023-10-13)

Expand Down
2 changes: 1 addition & 1 deletion src/smart-components/lib/EntryManager/EntryWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default class EntryWrapper extends React.Component {
return this.props.parentMutator[rk].DELETE(entry).then(() => {
this.showCalloutMessage(entry[this.props.nameKey]);
this.hideLayer();
});
}).catch(this.handleSaveError);
}

onSave(entry) {
Expand Down

0 comments on commit 8c8d197

Please sign in to comment.