From: Bill Erickson Date: Thu, 15 Jul 2021 20:36:04 +0000 (-0400) Subject: LP1904036 Circ service refactor; renewal failures X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8c3f6436ea18d2bce6d0c165b333480bb105ac78;p=evergreen%2Fpines.git LP1904036 Circ service refactor; renewal failures 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/share/circ/circ.service.ts b/Open-ILS/src/eg2/src/app/staff/share/circ/circ.service.ts index 40ce831a38..422dddadd4 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 @@ -292,11 +292,18 @@ export class CircService { // NOTE: result.transit may exist, but it's not necessarily // the transit we want, since a transit close + open in the API // returns the closed transit. + return this.findCopyTransitById(result.copy.id()) + .then(transit => { + result.transit = transit; + return transit; + }); + } - return this.pcrud.search('atc', { + findCopyTransitById(copyId: number): Promise { + return this.pcrud.search('atc', { dest_recv_time : null, cancel_time : null, - target_copy: result.copy.id() + target_copy: copyId }, { limit : 1, order_by : {atc : 'source_send_time desc'}, @@ -305,7 +312,6 @@ export class CircService { if (transit) { transit.source(this.org.get(transit.source())); transit.dest(this.org.get(transit.dest())); - result.transit = transit; return transit; } @@ -487,6 +493,7 @@ export class CircService { case 'PATRON_INACTIVE': case 'PATRON_ACCOUNT_EXPIRED': case 'CIRC_CLAIMS_RETURNED': + case 'ACTOR_USER_NOT_FOUND': this.audio.play(`warning.${key}`); return this.exitAlert({ textcode: result.firstEvent.textcode, diff --git a/Open-ILS/src/eg2/src/app/staff/share/circ/components.component.html b/Open-ILS/src/eg2/src/app/staff/share/circ/components.component.html index 691e91792f..3a445e7322 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/circ/components.component.html +++ b/Open-ILS/src/eg2/src/app/staff/share/circ/components.component.html @@ -53,6 +53,10 @@ + + + Item "{{barcode}}" is marked as Claims Returned