LP1936233 ng lint / merge repairs user/berick/lp1936233-item-status-angular-v2
authorBill Erickson <berickxx@gmail.com>
Mon, 24 Oct 2022 15:19:18 +0000 (11:19 -0400)
committerBill Erickson <berickxx@gmail.com>
Mon, 24 Oct 2022 15:19:18 +0000 (11:19 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/share/grouped-menu/grouped-menu.component.ts
Open-ILS/src/eg2/src/app/staff/cat/item/circ-history.component.html
Open-ILS/src/eg2/src/app/staff/cat/item/status.component.html
Open-ILS/src/eg2/src/app/staff/cat/item/summary.component.html
Open-ILS/src/eg2/src/app/staff/share/course.service.ts
Open-ILS/src/eg2/src/app/staff/share/holdings/mark-items-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/share/holdings/mark-missing-dialog.component.ts

index 6961c82..5e7db77 100644 (file)
@@ -1,4 +1,4 @@
-import {Component, Input, Output, EventEmitter, OnInit, AfterViewInit} from '@angular/core';
+import {Component, Input, Output, EventEmitter, AfterViewInit} from '@angular/core';
 import {Router} from '@angular/router';
 import {Location} from '@angular/common';
 
@@ -19,7 +19,7 @@ export class GroupedMenuEntry {
   templateUrl: './grouped-menu.component.html'
 })
 
-export class GroupedMenuComponent implements OnInit, AfterViewInit {
+export class GroupedMenuComponent implements AfterViewInit {
 
     static autoId = 0;
 
@@ -38,9 +38,6 @@ export class GroupedMenuComponent implements OnInit, AfterViewInit {
         private ngLocation: Location
     ) {}
 
-    ngOnInit() {
-    }
-
     ngAfterViewInit() {
         setTimeout(() => this.sortActions());
     }
index 80106ea..b2b4733 100644 (file)
@@ -53,7 +53,7 @@
       </div>
       <div class="well-label" i18n>Renewal?</div>
       <div class="well-value">
-        <eg-bool [value]="circ.parent_circ() != null"></eg-bool>
+        <eg-bool [value]="circ.parent_circ() !== null"></eg-bool>
       </div>
       <div class="well-label" i18n>Stop Fines Reason</div>
       <div class="well-value">
index c7590e8..9e1e68f 100644 (file)
 
     <div class="flex-1"></div>
 
-    <button *ngIf="tab == 'list'" 
+    <button *ngIf="tab === 'list'" 
       class="btn btn-outline-dark mr-2" (click)="showDetails()">
       Detail View
     </button>
 
-    <button *ngIf="tab != 'list'" 
+    <button *ngIf="tab !== 'list'" 
       class="btn btn-outline-dark mr-2" (click)="showList()">
       List View
     </button>
 
     <!-- ACTIONS MENU -->
-    <eg-grouped-menu i18n-label label="Actions" *ngIf="item && tab != 'list'">
+    <eg-grouped-menu i18n-label label="Actions" *ngIf="item && tab !== 'list'">
 
       <!-- Un-grouped -->
       <eg-grouped-menu-entry i18n-label label="Request Items"
 </ng-template>
 
 <ng-template #titleTemplate let-r="row">
-  <ng-container *ngIf="r.call_number().id() == -1">
+  <ng-container *ngIf="r.call_number().id() === -1">
     {{r.dummy_title()}}
   </ng-container>
   <ng-container *ngIf="r.call_number().id() > 0">
 </ng-template>
 
 
-<eg-grid *ngIf="tab == 'list'" #grid [dataSource]="dataSource" idlClass="acp"
+<eg-grid *ngIf="tab === 'list'" #grid [dataSource]="dataSource" idlClass="acp"
   (onRowActivate)="showDetails($event)" [cellTextGenerator]="cellTextGenerator"
   [useLocalSort]="true" [sortable]="true" [showDeclaredFieldsOnly]="true"
   [rowFlairIsEnabled]="true" [rowFlairCallback]="rowFlair"
 
 </eg-grid>
 
-<div *ngIf="tab != 'list' && item">
+<div *ngIf="tab !== 'list' && item">
 
-  <div class="row" *ngIf="item.deleted() == 't'">
+  <div class="row" *ngIf="item.deleted() === 't'">
     <div class="col-lg-4 offset-lg-4 alert alert-danger" i18n>
       This item has been marked as Deleted.
     </div>
index b950eb8..b4bab78 100644 (file)
 
     <div class="well-label" i18n>Loan Duration</div>
     <div class="well-value">
-      <div *ngIf="item.loan_duration() == 1" i18n>Short</div>
-      <div *ngIf="item.loan_duration() == 2" i18n>Normal</div>
-      <div *ngIf="item.loan_duration() == 3" i18n>Long</div>
+      <div *ngIf="item.loan_duration() === 1" i18n>Short</div>
+      <div *ngIf="item.loan_duration() === 2" i18n>Normal</div>
+      <div *ngIf="item.loan_duration() === 3" i18n>Long</div>
     </div>
 
     <div class="well-label" i18n>Renewal Type</div>
     <div class="well-value">
       <ng-container *ngIf="circInfo && circInfo.currentCirc">
-        <div *ngIf="circInfo.currentCirc.opac_renewal() == 't'" i18n>OPAC</div>
-        <div *ngIf="circInfo.currentCirc.desk_renewal() == 't'" i18n>Desk</div>
-        <div *ngIf="circInfo.currentCirc.phone_renewal() == 't'" i18n>Phone</div>
-        <div *ngIf="circInfo.currentCirc.auto_renewal() == 't'" i18n>Automatic</div>
+        <div *ngIf="circInfo.currentCirc.opac_renewal() === 't'" i18n>OPAC</div>
+        <div *ngIf="circInfo.currentCirc.desk_renewal() === 't'" i18n>Desk</div>
+        <div *ngIf="circInfo.currentCirc.phone_renewal() === 't'" i18n>Phone</div>
+        <div *ngIf="circInfo.currentCirc.auto_renewal() === 't'" i18n>Automatic</div>
       </ng-container>
     </div>
 
     <div class="well-value">{{item.create_date() | egDateTime}}</div>
     <div class="well-label" i18n>Fine Level</div>
     <div class="well-value">
-      <div *ngIf="item.fine_level() == 1" i18n>Low</div>
-      <div *ngIf="item.fine_level() == 2" i18n>Normal</div>
-      <div *ngIf="item.fine_level() == 3" i18n>High</div>
+      <div *ngIf="item.fine_level() === 1" i18n>Low</div>
+      <div *ngIf="item.fine_level() === 2" i18n>Normal</div>
+      <div *ngIf="item.fine_level() === 3" i18n>High</div>
     </div>
 
     <div class="well-label" i18n>Total Circs</div>
     <div class="well-label" i18n>Item Alerts</div>
     <div class="well-value" id="item-status-alert-msg">
       <button class="btn btn-outline-dark" (click)="addItemAlerts()" i18n>Add</button>
-      <button class="btn btn-outline-dark ml-2" [disabled]="item.copy_alerts().length == 0"
+      <button class="btn btn-outline-dark ml-2" [disabled]="item.copy_alerts().length === 0"
         (click)="manageItemAlerts()"  i18n>Manage</button>
     </div>
 
index 0db6c31..896ec8e 100644 (file)
@@ -171,7 +171,7 @@ export class CourseService {
                 course_library_hash[course.id()] = course.owning_lib();
             });
 
-            this.pcrud.retrieveAll('acmcm', {course: course_ids}).subscribe(material => {
+            this.pcrud.search('acmcm', {course: course_ids}).subscribe(material => {
                 deleteRequest$.push(this.net.request(
                   'open-ils.courses', 'open-ils.courses.detach_material',
                   this.auth.token(), material.id()));
index 2536d37..2e4e88b 100644 (file)
@@ -1,4 +1,4 @@
-import {Component, OnInit, Input, ViewChild} from '@angular/core';
+import {Component, Input, ViewChild} from '@angular/core';
 import {of, empty, from, Observable, throwError} from 'rxjs';
 import {concatMap, map} from 'rxjs/operators';
 import {NetService} from '@eg/core/net.service';
@@ -31,8 +31,7 @@ interface MarkItemArgs {
   templateUrl: 'mark-items-dialog.component.html'
 })
 
-export class MarkItemsDialogComponent
-    extends DialogComponent implements OnInit {
+export class MarkItemsDialogComponent extends DialogComponent {
 
     @Input() markAs: 'missing' | 'discard';
     @Input() copies: IdlObject[];
@@ -63,8 +62,6 @@ export class MarkItemsDialogComponent
         super(modal); // required for subclassing
     }
 
-    ngOnInit() {}
-
     open(args?: NgbModalOptions): Observable<boolean> {
         this.numSucceeded = 0;
         this.numFailed = 0;
index 62d50aa..9c6e406 100644 (file)
@@ -39,8 +39,6 @@ export class MarkMissingDialogComponent
         private modal: NgbModal
     ) { super(modal); }
 
-    ngOnInit() {}
-
     open(args?: NgbModalOptions): Observable<boolean> {
         let obs: Observable<IdlObject[]>;