LP#1956986: fix and refactor item alert handing in Angular editor user/gmcharlt/lp1956986_ang_item_alerts
authorGalen Charlton <gmc@equinoxOLI.org>
Mon, 11 Jul 2022 16:31:36 +0000 (12:31 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Mon, 11 Jul 2022 16:38:02 +0000 (12:38 -0400)
commit4f1271f83e1e7f1de3b2b92c96f234ba6b510109
tree0a0b482b3e1d0c0dfde3018001ee43599cd95458
parentcc9ad2c58039243f1519a57c40852ac365773f04
LP#1956986: fix and refactor item alert handing in Angular editor

This patch changes the handling of item alerts in the Angular
Holdings View and Item Attributes editor to be more like how
item notes and item tags are handled.

In particular:

- The separate 'Add Item Alert' and 'Edit Item Alerts' context menu
  items in Holdings View are consolidated to a 'Add/Manage Item Alerts'
  action.
- Pending new alerts are displayed in separate area of the modal
- The 'Apply Changes' and 'Add New' buttons now work the same way as
  item notes and item tags

To test
-------
[1] Apply patch.
[2] Create a new item with one or more item alerts. Verify that they are
    properly saved.
[3] Edit an existing item and add, modify, and clear alerts. Verify that
    the changes are saved.
[4] From Holdings View, choose 'Add/Manage Item Alerts' with a single
    item selected. Verify that changes are saved.
[5] From Holdings View, choose 'Add/Manage Item Alerts' with multiple
    items selected. Verify that you are only given the option to add
    new alerts. Verify that new alerts are saved.

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts
Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.component.ts
Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.html
Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.ts
Open-ILS/src/eg2/src/app/staff/share/holdings/copy-alerts-dialog.component.html
Open-ILS/src/eg2/src/app/staff/share/holdings/copy-alerts-dialog.component.ts