From 88758b6e0d1f6e8f519b79e716a35d050e639847 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 19 Jul 2021 15:47:37 -0400 Subject: [PATCH] LP1904036 Improve checkin transit/hold handling Be sure we fetch the latest transit for ROUTE_ITEM handling. Avoid treating fulfilled holds, returned as info for a canceled hold transit, as the basis for a new hold transit. Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- Open-ILS/src/eg2/src/app/staff/share/circ/circ.service.ts | 3 ++- .../src/eg2/src/app/staff/share/circ/route-dialog.component.ts | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/share/circ/circ.service.ts b/Open-ILS/src/eg2/src/app/staff/share/circ/circ.service.ts index 1891887c8d..40ce831a38 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/circ/circ.service.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/circ/circ.service.ts @@ -912,7 +912,8 @@ export class CircService { this.audio.play(result.hold ? 'info.checkin.transit.hold' : 'info.checkin.transit'); this.components.routeDialog.checkin = result; - return this.components.routeDialog.open().toPromise() + return this.findCopyTransit(result) + .then(_ => this.components.routeDialog.open().toPromise()) .then(_ => result); case 'ASSET_COPY_NOT_FOUND': diff --git a/Open-ILS/src/eg2/src/app/staff/share/circ/route-dialog.component.ts b/Open-ILS/src/eg2/src/app/staff/share/circ/route-dialog.component.ts index 52eb795a64..55fad58859 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/circ/route-dialog.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/circ/route-dialog.component.ts @@ -104,7 +104,12 @@ export class RouteDialogComponent extends DialogComponent { applySettings(): Promise { if (this.checkin.transit) { - if (this.checkin.patron) { + if (this.checkin.patron && this.checkin.hold && + // It's possible to recieve a fulfilled hold in the + // checkin response when a checkin results in canceling + // a hold transit for a hold that was fulfilled while + // the item was in transit. + !this.checkin.hold.fulfillment_time()) { this.slip = 'hold_transit_slip'; } else { this.slip = 'transit_slip'; -- 2.11.0