LP1904036 Transit audio timing repair
authorBill Erickson <berickxx@gmail.com>
Tue, 27 Apr 2021 17:45:40 +0000 (13:45 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 28 Oct 2022 00:13:33 +0000 (20:13 -0400)
Ensure the ROUTE_ITEM audio alert happens regardless of whether the
route dialog will be displayed.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/share/circ/circ.service.ts
Open-ILS/src/eg2/src/app/staff/share/circ/route-dialog.component.ts

index 1a70461..bb233c3 100644 (file)
@@ -859,6 +859,8 @@ export class CircService {
                 return this.showPrecatAlert().then(_ => result);
 
             case 'ROUTE_ITEM':
+                this.audio.play(result.hold ?
+                    'info.checkin.transit.hold' : 'info.checkin.transit');
                 this.components.routeDialog.checkin = result;
                 return this.components.routeDialog.open().toPromise()
                 .then(_ => result);
index 4f04892..3cafd9d 100644 (file)
@@ -11,7 +11,6 @@ import {NgbModal, NgbModalOptions} from '@ng-bootstrap/ng-bootstrap';
 import {DialogComponent} from '@eg/share/dialog/dialog.component';
 import {CheckinResult} from './circ.service';
 import {ServerStoreService} from '@eg/core/server-store.service';
-import {AudioService} from '@eg/share/util/audio.service';
 import {PrintService} from '@eg/share/print/print.service';
 
 /** Route Item Dialog */
@@ -32,7 +31,6 @@ export class RouteDialogComponent extends DialogComponent {
         private pcrud: PcrudService,
         private org: OrgService,
         private circ: CircService,
-        private audio: AudioService,
         private printer: PrintService,
         private serverStore: ServerStoreService) {
         super(modal);
@@ -94,9 +92,6 @@ export class RouteDialogComponent extends DialogComponent {
             });
         }
 
-        this.audio.play(hold ?
-            'info.checkin.transit.hold' : 'info.checkin.transit');
-
         if (this.checkin.params.auto_print_hold_transits
             || this.circ.suppressCheckinPopups) {
             // Print and exit.