From: Bill Erickson Date: Mon, 23 Aug 2021 15:06:32 +0000 (-0400) Subject: LP1904036 Patron holds uncancel option; display title X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f94c4fdd2356c6b7328a33ecc99f869954727c3f;p=Evergreen.git LP1904036 Patron holds uncancel option; display title Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/holds.component.html b/Open-ILS/src/eg2/src/app/staff/circ/patron/holds.component.html index bd3f24568d..758cb78355 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/patron/holds.component.html +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/holds.component.html @@ -9,6 +9,7 @@ printTemplate="holds_for_patron" persistKey="circ.patron.holds" (placeHoldRequested)="newHold()" + [patronFocused]="true" [noLoadProgress]="true" [showPlaceHoldButton]="true" [hidePickupLibFilter]="true" @@ -23,6 +24,7 @@ + @@ -102,7 +107,7 @@ i18n-label label="Show Last Few Circulations" group="Item" i18n-group (onClick)="showRecentCircs($event)"> - @@ -131,9 +136,14 @@ i18n-group group="Hold" i18n-label label="Find Another Target" (onClick)="showRetargetDialog($event)"> - + (onClick)="showUncancelDialog($event)"> + + + r.id).filter(id => Boolean(id)); + if (holdIds.length === 0) { return; } + this.uncancelHoldCount = holdIds.length; + + this.uncancelDialog.open().subscribe(confirmed => { + if (!confirmed) { return; } + this.progressDialog.open(); + + from(holdIds).pipe(concatMap(holdId => { + return this.net.request( + 'open-ils.circ', + 'open-ils.circ.hold.uncancel', + this.auth.token(), holdId + ) + })).subscribe( + resp => { + if (Number(resp) !== 1) { + console.error('Failed uncanceling hold', resp); + } + }, + null, + () => { + this.progressDialog.close(); + this.holdsGrid.reload(); + } + ); + }); + } + printHolds() { // Request a page with no limit to get all of the wide holds for // printing. Call requestPage() directly instead of grid.reload()