LP#1849370 Mark items as damaged - changing fee usability issues user/dbriem/lp1849370_mark_damaged_usability_issues
authorDan Briem <dbriem@wlsmail.org>
Fri, 1 Nov 2019 00:21:17 +0000 (20:21 -0400)
committerDan Briem <dbriem@wlsmail.org>
Fri, 1 Nov 2019 00:21:17 +0000 (20:21 -0400)
commiteb633c4c51b009ca4111cb2a93277ae908b23e17
tree85995157b1d2ce6bd2c252f226fe1141612d9dee
parentb95f1be9bf361d772e4aadc3f6c6af8ac9a4163b
LP#1849370 Mark items as damaged - changing fee usability issues

On the mark copy damaged modal the null condition of the fee is used to toggle
the fee interface. But, an empty number input with ng-model binds as null, so
if it's cleared it removes itself from the DOM.

Also, open-ils.circ.mark_item_damaged charges full copy price if the fee param
is falsy and the submit button is only disabled if the fee is null (allows $0).

This branch removes the billing interface only if the previous circ info is
present (no reason to bill) and won't submit the fee if falsy.

To test:
1. Set the org unit setting "charge item price when damaged" to true
2. Checkout an item to a patron
3. Go the item status screen and scan the item
4. Select the item and, under actions, select mark damaged
5. Click confirm, clear the fee input, & note the billing interface disappears
6. Apply patch
7. Repeat steps, note clearing the fee doesn't hide the billing interface

Signed-off-by: Dan Briem <dbriem@wlsmail.org>
Open-ILS/src/templates/staff/circ/share/t_mark_damaged.tt2