LP#1811710: (follow-up) fix lint issues
authorGalen Charlton <gmc@equinoxinitiative.org>
Fri, 3 Jan 2020 19:28:15 +0000 (14:28 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Tue, 15 Sep 2020 15:13:15 +0000 (11:13 -0400)
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.ts

index c2e5b10..92a2538 100644 (file)
@@ -321,9 +321,9 @@ export class HoldsGridComponent implements OnInit {
     }
 
     metaRecordHoldsSelected(rows: IdlObject[]) {
-        var found = false;
+        let found = false;
         rows.forEach( row => {
-           if (row.hold_type == 'M') {
+           if (row.hold_type === 'M') {
              found = true;
            }
         });
@@ -331,9 +331,9 @@ export class HoldsGridComponent implements OnInit {
     }
 
     nonTitleHoldsSelected(rows: IdlObject[]) {
-        var found = false;
+        let found = false;
         rows.forEach( row => {
-           if (row.hold_type != 'T') {
+           if (row.hold_type !== 'T') {
              found = true;
            }
         });
@@ -388,10 +388,10 @@ export class HoldsGridComponent implements OnInit {
     }
 
     showOrder(rows: any[]) {
-        //Doesn't work in Typescript currently without compiler option:
+        // Doesn't work in Typescript currently without compiler option:
         //   const bibIds = [...new Set( rows.map(r => r.record_id) )];
         const bibIds = Array.from(
-          new Set( rows.filter(r => r.hold_type!='M').map(r => r.record_id) ));
+          new Set( rows.filter(r => r.hold_type !== 'M').map(r => r.record_id) ));
         bibIds.forEach( bibId => {
           const url =
               '/eg/staff/acq/legacy/lineitem/related/' + bibId + '?target=bib';
@@ -401,7 +401,7 @@ export class HoldsGridComponent implements OnInit {
 
     addVolume(rows: any[]) {
         const bibIds = Array.from(
-          new Set( rows.filter(r => r.hold_type!='M').map(r => r.record_id) ));
+          new Set( rows.filter(r => r.hold_type !== 'M').map(r => r.record_id) ));
         bibIds.forEach( bibId => {
           this.holdings.spawnAddHoldingsUi(bibId);
         });
@@ -410,7 +410,7 @@ export class HoldsGridComponent implements OnInit {
     showTitle(rows: any[]) {
         const bibIds = Array.from(new Set( rows.map(r => r.record_id) ));
         bibIds.forEach( bibId => {
-          //const url = '/eg/staff/cat/catalog/record/' + bibId;
+          // const url = '/eg/staff/cat/catalog/record/' + bibId;
           const url = '/eg2/staff/catalog/record/' + bibId;
           window.open(url, '_blank');
         });
@@ -431,7 +431,7 @@ export class HoldsGridComponent implements OnInit {
     }
 
     showTransferDialog(rows: any[]) {
-        const holdIds = rows.filter(r => r.hold_type=='T').map(r => r.id).filter(id => Boolean(id));
+        const holdIds = rows.filter(r => r.hold_type === 'T').map(r => r.id).filter(id => Boolean(id));
         if (holdIds.length > 0) {
             this.transferDialog.holdIds = holdIds;
             this.transferDialog.open({}).subscribe(