Purpose: To support deletion of locations. Looks like this is already partly done at the time of writing this (thanks, zburke!) but I need to get a story in with details and for tracking and testing.
As a user who has created a location record that is incorrect or a mistake
I want to be able to delete it
- Given the Location edit form for a location that hasn't been assigned as a permanent or temporary location on any items or holdings
- When displayed
- Then a Delete button should display in upper right next to the Save and close button
- Given the Delete button
- When clicked
- Then a delete confirmation should appear reading:
- Header: Delete location?
- Body: <locationName> will be removed
- Buttons: Cancel, Delete
- Given the delete button on the delete confirmation
- When clicked
- Location will be deleted
- Location will no longer display in Settings > Organization > Locations
- Location will no longer appear as an option when assigning a permanent or temporary location to an item or holding
- Green toast confirmation will appear reading "<locationName> was successfully deleted."
- Given a location has been assigned as a permanent or temporary location on one or more item or holding
- When it is displayed in edit mode
- The Delete button should display per usual (UX for this will change in the future - UX-212 is tracking the design work for this)
- Clicking delete should generate the delete confirmation per scenario 2
- Upon confirming delete, another popup will display:
- Header: Cannot delete Location
- Body: This Location cannot be deleted, as it is in use by one or more records.
- Button: Okay (button closes popup and delete has been prevented)
- relates to
UIIN-199 Filter by the effective location
UX-212 UX: Pattern for Delete (Including for Undeletable Records)
UXPROD-114 Location hierarchy CRUD via UI