LP#1811710: (follow-up) fix lint issues user/gmcharlt/lp1811710_hopeless_holds_rebased_2020-01-03
authorGalen Charlton <gmc@equinoxinitiative.org>
Fri, 3 Jan 2020 19:28:15 +0000 (14:28 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Fri, 3 Jan 2020 19:28:15 +0000 (14:28 -0500)
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.ts

index 8ae18a5..e456bb2 100644 (file)
@@ -303,9 +303,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;
            }
         });
@@ -313,9 +313,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;
            }
         });
@@ -370,10 +370,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';
@@ -383,7 +383,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);
         });
@@ -392,7 +392,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');
         });
@@ -413,7 +413,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(