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 <berickxx@gmail.com>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
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':
applySettings(): Promise<boolean> {
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';