From c317211830718f58690f9bdfca1bca84e52e08e4 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 9 Apr 2021 17:02:59 -0400 Subject: [PATCH] LP1904036 checkin; hold dialg Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- .../app/staff/circ/checkin/checkin.component.ts | 3 +- .../eg2/src/app/staff/share/circ/circ.service.ts | 6 +- .../staff/share/circ/route-dialog.component.html | 99 ++++++++++++++++++++-- .../app/staff/share/circ/route-dialog.component.ts | 9 +- 4 files changed, 107 insertions(+), 10 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/circ/checkin/checkin.component.ts b/Open-ILS/src/eg2/src/app/staff/circ/checkin/checkin.component.ts index 6ad1c8f679..e3acc3c3b1 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/checkin/checkin.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/circ/checkin/checkin.component.ts @@ -21,7 +21,8 @@ interface CheckinGridEntry extends CheckinResult { } @Component({ - templateUrl: 'checkin.component.html' + templateUrl: 'checkin.component.html', + styleUrls: ['checkin.component.css'] }) export class CheckinComponent implements OnInit, AfterViewInit { checkins: CheckinGridEntry[] = []; 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 c8a31c1d4e..f667fc1e69 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 @@ -553,7 +553,8 @@ export class CircService { copy: payload.copy, volume: payload.volume, record: payload.record, - transit: payload.transit + transit: payload.transit, + hold: payload.hold }; const copy = result.copy; @@ -683,7 +684,7 @@ export class CircService { if (hold) { - if (hold.pickup_lib() === this.auth.user().ws_ou()) { + if (Number(hold.pickup_lib()) === Number(this.auth.user().ws_ou())) { result.routeTo = 'Holds Shelf'; // TODO this.components.routeDialog.checkin = result; return this.components.routeDialog.open().toPromise() @@ -697,6 +698,7 @@ export class CircService { } else { console.warn('API Returned insufficient info on holds'); } + break; case 11: /* CATALOGING */ this.audio.play('info.checkin.cataloging'); diff --git a/Open-ILS/src/eg2/src/app/staff/share/circ/route-dialog.component.html b/Open-ILS/src/eg2/src/app/staff/share/circ/route-dialog.component.html index a8d85ebb16..f2486a334e 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/circ/route-dialog.component.html +++ b/Open-ILS/src/eg2/src/app/staff/share/circ/route-dialog.component.html @@ -1,17 +1,106 @@ + + + + +
+ This item should be routed to the Private Holds Shelf +
+
+ This item should be routed to the Public Holds Shelf +
+ +
+
+ Item Barcode: + {{checkin.copy.barcode()}} +
+
+ Title: + {{checkin.record.title()}} +
+
+ Author: + {{checkin.record.author()}} +
+
+ Call Number: + {{checkin.volume.prefix().label()}} {{checkin.volume.label()}} {{checkin.volume.suffix().label()}} +
+
+ +
+ Hold for patron {{checkin.patron.alias()}} +
+
+ Hold for patron {{checkin.patron.family_name()}}, + {{checkin.patron.first_given_name()}} {{checkin.patron.second_given_name()}} +
+
+
+ Preferred name: + {{checkin.patron.pref_family_name || checkin.patron.family_name}}, + {{checkin.patron.pref_first_given_name || checkin.patron.first_given_name}} + {{checkin.patron.pref_second_given_name}} +
+
+
+ Patron Barcode: + {{checkin.patron.card().barcode()}} +
+
Notify by phone: {{checkin.hold.phone_notify()}}
+
Notify by text: {{checkin.hold.sms_notify()}}
+
Notify by email: {{checkin.patron.email()}}
+
+
+ Request Date: + {{checkin.hold.request_time() | date:'short'}} +
+
+ Request Notes: +
    +
  • + {{note.title()}}: {{note.body()}} + [Patron-visible] +
  • +
+
+
+ Slip Date: + {{today | date:'short'}} +
+
+ + + + + + 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 7972bed974..9204bfcacc 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 @@ -28,6 +28,7 @@ export class RouteDialogComponent extends DialogComponent { orgAddress: IdlObject; destCourierCode: string; destOrg: IdlObject; + today = new Date(); constructor( private modal: NgbModal, @@ -45,9 +46,11 @@ export class RouteDialogComponent extends DialogComponent { // But in some cases we still have to collect the data // for printing. +console.warn('ROUTE DIALOG OPEN'); return from(this.applySettings()) .pipe(concatMap(exit => { +console.warn('ROUTE DIALOG 2'); if (exit) { return of(exit); } else { @@ -56,9 +59,11 @@ export class RouteDialogComponent extends DialogComponent { })) .pipe(concatMap(exit => { +console.warn('ROUTE DIALOG 3'); if (exit) { return of(exit); } else { +console.warn('ROUTE DIALOG 4'); return super.open(ops); } })); @@ -105,10 +110,10 @@ export class RouteDialogComponent extends DialogComponent { if (this.checkin.params.auto_print_hold_transits || this.circ.suppressCheckinPopups) { // Print and exit. - return this.printTransit().then(_ => false); + return this.printTransit().then(_ => true); // exit } - return promise; + return promise.then(_ => false); // keep going } applySettings(): Promise { -- 2.11.0