LP1904036 Lint and merge repairs
authorBill Erickson <berickxx@gmail.com>
Wed, 13 Jul 2022 20:06:02 +0000 (16:06 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 28 Oct 2022 00:13:42 +0000 (20:13 -0400)
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/circ/patron/bills.component.ts
Open-ILS/src/eg2/src/app/staff/circ/patron/edit-toolbar.component.ts
Open-ILS/src/eg2/src/app/staff/circ/patron/edit.component.ts
Open-ILS/src/eg2/src/app/staff/resolver.service.ts

index d6181e7..3f8b11d 100644 (file)
@@ -106,7 +106,7 @@ export class BillsComponent implements OnInit, AfterViewInit {
                 }
             }
             return '';
-        }
+        };
 
         this.cellTextGenerator = {
             title: row => row.title,
@@ -346,7 +346,7 @@ export class BillsComponent implements OnInit, AfterViewInit {
 
         .catch(msg => {
             this.reportError(msg);
-            console.debug('Payment Canceled or Failed:', msg)
+            console.debug('Payment Canceled or Failed:', msg);
         })
         .finally(() => {
             this.applyingPayment = false;
index 9b72101..be9a8c4 100644 (file)
@@ -1,6 +1,7 @@
 import {Component, OnInit, Input, Output, EventEmitter} from '@angular/core';
 import {Router, ActivatedRoute, ParamMap} from '@angular/router';
 import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap';
+import {tap} from 'rxjs/operators';
 import {OrgService} from '@eg/core/org.service';
 import {IdlService, IdlObject} from '@eg/core/idl.service';
 import {NetService} from '@eg/core/net.service';
@@ -67,9 +68,9 @@ export class EditToolbarComponent implements OnInit {
         return Object.values(this.searches).filter(dupe => dupe.count > 0);
     }
 
-    checkDupes(category: string, search: PatronSearchFieldSet) {
+    checkDupes(category: string, search: PatronSearchFieldSet): Promise<any> {
 
-        this.net.request(
+        return this.net.request(
             'open-ils.actor',
             'open-ils.actor.patron.search.advanced',
             this.auth.token(),
@@ -77,7 +78,7 @@ export class EditToolbarComponent implements OnInit {
             1000, // limit
             null, // sort
             true  // as id
-        ).subscribe(ids => {
+        ).pipe(tap(ids => {
             ids = ids.filter(id => Number(id) !== this.patronId);
             this.searches[category] = {
                 category: category as SearchCategory,
@@ -85,7 +86,7 @@ export class EditToolbarComponent implements OnInit {
                 search: search,
                 json: JSON.stringify(search)
             };
-        });
+        })).toPromise();
     }
 
     checkAddressAlerts(patron: IdlObject, addr: IdlObject) {
index 9949318..62ca796 100644 (file)
@@ -711,7 +711,7 @@ export class EditComponent implements OnInit, AfterViewInit {
                             // false otherwise.
                             val = Boolean((val + '').match(/^t/i));
                         }
-                        this.userSettings[stype.name()] = val
+                        this.userSettings[stype.name()] = val;
                     }
                 }
             });
@@ -1130,7 +1130,7 @@ export class EditComponent implements OnInit, AfterViewInit {
         });
     }
 
-    dupeValueChange(name: string, value: any) {
+    dupeValueChange(name: string, value: any): Promise<any> {
 
         if (name.match(/phone/)) { name = 'phone'; }
         if (name.match(/name/)) { name = 'name'; }
@@ -1171,7 +1171,7 @@ export class EditComponent implements OnInit, AfterViewInit {
                 break;
         }
 
-        this.toolbar.checkDupes(name, search);
+        return this.toolbar.checkDupes(name, search);
     }
 
     showField(field: string): boolean {
index 08c3a15..97e52d6 100644 (file)
@@ -20,7 +20,7 @@ const STAFF_LOGIN_SESSION_KEYS = [
     'eg.circ.patron_hold_target',
     'eg.catalog.recent_searches',
     'eg.circ.recent_patrons'
-]
+];
 
 /**
  * Load data used by all staff modules.