Status: Closed (View Workflow)
ERM Sprint 86, ERM Sprint 87, ERM Sprint 88
It should be possible to delete agreements from the UI.
The option should be added to the Actions menu dropdown in the Agreement view pane, as shown in the mockup.
- The option should be named "Delete" and have a trashcan icon.
- "Delete" should be displayed last in the list of options.
The user should receive a confirmation prompt before deleting an agreement, as shown in the below mockup:
- The modal header should read "Delete agreement"
- The body text should read "Agreement [name] will be deleted".
- [name] is the name of the agreement.
- The agreement name and the word "deleted" should be in bold.
- The Delete button should have a red background.
Scenario: Agreement has agreement lines, or Agreement is linked to one or more licenses
It should not be possible to delete an Agreement that
- has Agreement lines
- is linked to one or more Licenses
- is linked to one or more other Agreements
If the user tries to delete an agreement with ALs or which is linked to a license or agreement they should receive a warning that this is not possible with the reason(s) given.
- The error messages are displayed in error-style callouts, as shown in the mockups.
- If more than one error applies the callouts should be stacked on top of each other.
- A callout should not disappear until the user dismisses it.
- The text of the callout should read:
- "Agreement was not deleted because it has one or more agreement lines."
- "Agreement was not deleted because it has one or more licenses attached."
- "Agreement was not deleted because it has one or more related agreements."
- The text "Agreement was not deleted" should be displayed in bold.
Scenario: Agreement is successfully deleted
If an Agreement is deleted any linked documents, and supplementary information values should also be deleted.
When an agreement is successfully deleted, display a success-style callout message with:
- A success icon
- The text: "Agreement deleted: [name]", where name is the name of the agreement.
- A close icon.
See the mockup for an example.
For examples of the callout see:
- The FOLIO UX guide: https://ux.folio.org/docs/guidelines/components/callout/
- Storybook: https://ux.folio.org/storybook/?selectedKind=Callout&selectedStory=Basic%20Usage&full=0&addons=1&stories=1&panelRight=0&addonPanel=REACT_STORYBOOK%2Freadme%2Fpanel
For an example of the deletion confirmation modal and success callout see Amendment deletion.
ERM-748 Add ability to Delete license
UXPROD-2345 Agreements | Deletion