From: Bill Erickson Date: Tue, 20 Apr 2021 19:20:08 +0000 (-0400) Subject: LP1904036 Checkin cancel transits; lint X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f60547d5331b86a114aa6fd0aaa703cd43f0cbc8;p=Evergreen.git LP1904036 Checkin cancel transits; lint 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/checkin/checkin.component.html b/Open-ILS/src/eg2/src/app/staff/circ/checkin/checkin.component.html index b424e80d03..7c6870f95e 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/checkin/checkin.component.html +++ b/Open-ILS/src/eg2/src/app/staff/circ/checkin/checkin.component.html @@ -7,6 +7,7 @@ +
@@ -83,6 +84,12 @@ {{r.title}} + + + {{r.copy.barcode()}} + + +
+ + @@ -110,11 +121,16 @@ + + + - - + 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 68f2a9f9df..e6273856f7 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 @@ -1,4 +1,5 @@ import {Component, ViewChild, OnInit, AfterViewInit, HostListener} from '@angular/core'; +import {Location} from '@angular/common'; import {Router, ActivatedRoute, ParamMap} from '@angular/router'; import {from} from 'rxjs'; import {concatMap} from 'rxjs/operators'; @@ -25,6 +26,9 @@ import {BucketDialogComponent import {ToastService} from '@eg/share/toast/toast.service'; import {StringComponent} from '@eg/share/string/string.component'; import {BackdateDialogComponent} from '@eg/staff/share/circ/backdate-dialog.component'; +import {CancelTransitDialogComponent + } from '@eg/staff/share/circ/cancel-transit-dialog.component'; + interface CheckinGridEntry extends CheckinResult { // May need to extend... @@ -78,10 +82,12 @@ export class CheckinComponent implements OnInit, AfterViewInit { @ViewChild('bucketDialog') private bucketDialog: BucketDialogComponent; @ViewChild('itemNeverCircedStr') private itemNeverCircedStr: StringComponent; @ViewChild('backdateDialog') private backdateDialog: BackdateDialogComponent; + @ViewChild('cancelTransitDialog') private cancelTransitDialog: CancelTransitDialogComponent; constructor( private router: Router, private route: ActivatedRoute, + private ngLocation: Location, private net: NetService, private org: OrgService, private auth: AuthService, @@ -318,5 +324,26 @@ export class CheckinComponent implements OnInit, AfterViewInit { } }); } + + markMissingPieces(rows: CheckinGridEntry[]) { + const copyId = this.getCopyIds(rows)[0]; + if (copyId) { + const url = this.ngLocation.prepareExternalUrl( + `/staff/cat/item/missing_pieces/${copyId}`); + window.open(url); + } + } + + + cancelTransits(rows: CheckinGridEntry[]) { + const ids = rows + .filter(row => Boolean(row.transit)) + .map(row => row.transit.id()); + + if (ids.length > 0) { + this.cancelTransitDialog.transitIds = ids; + this.cancelTransitDialog.open().subscribe(); + } + } } diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.ts b/Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.ts index 605606109b..b9ff5dbdf9 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.ts @@ -110,7 +110,7 @@ export class BillsComponent implements OnInit, AfterViewInit { row.paymentPending = 0; row.billingLocation = row['grocery.billing_location.shortname'] || - row['circulation.circ_lib.shortname'] + row['circulation.circ_lib.shortname']; })); }; diff --git a/Open-ILS/src/eg2/src/app/staff/share/circ/circ.module.ts b/Open-ILS/src/eg2/src/app/staff/share/circ/circ.module.ts index b712fdd7fb..3e9c13dbbd 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/circ/circ.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/circ/circ.module.ts @@ -12,6 +12,7 @@ import {CircEventsComponent} from './events-dialog.component'; import {OpenCircDialogComponent} from './open-circ-dialog.component'; import {RouteDialogComponent} from './route-dialog.component'; import {CopyInTransitDialogComponent} from './in-transit-dialog.component'; +import {CancelTransitDialogComponent} from './cancel-transit-dialog.component'; import {BackdateDialogComponent} from './backdate-dialog.component'; @NgModule({ @@ -25,6 +26,7 @@ import {BackdateDialogComponent} from './backdate-dialog.component'; RouteDialogComponent, BackdateDialogComponent, CopyInTransitDialogComponent, + CancelTransitDialogComponent, OpenCircDialogComponent ], imports: [ @@ -35,6 +37,7 @@ import {BackdateDialogComponent} from './backdate-dialog.component'; exports: [ CircGridComponent, BackdateDialogComponent, + CancelTransitDialogComponent, CircComponentsComponent ], providers: [