LP1959048: manual ng lint fixes
authorJane Sandberg <js7389@princeton.edu>
Thu, 8 Sep 2022 22:14:59 +0000 (15:14 -0700)
committerJane Sandberg <sandbergja@gmail.com>
Thu, 15 Sep 2022 14:40:36 +0000 (07:40 -0700)
Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
100 files changed:
Open-ILS/src/eg2/src/app/share/.eslintrc [new file with mode: 0644]
Open-ILS/src/eg2/src/app/share/catalog/bib-display-field.component.ts
Open-ILS/src/eg2/src/app/share/eg-help-popover/eg-help-popover.component.ts
Open-ILS/src/eg2/src/app/share/file-reader/file-reader.component.ts
Open-ILS/src/eg2/src/app/share/grid/grid-body-cell.component.ts
Open-ILS/src/eg2/src/app/share/grid/grid-body.component.ts
Open-ILS/src/eg2/src/app/share/grid/grid.component.html
Open-ILS/src/eg2/src/app/share/tree/tree.component.ts
Open-ILS/src/eg2/src/app/share/util/bool.component.ts
Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider-search-form.component.ts
Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.component.html
Open-ILS/src/eg2/src/app/staff/acq/provider/provider-holdings.component.html
Open-ILS/src/eg2/src/app/staff/acq/search/acq-search-form.component.ts
Open-ILS/src/eg2/src/app/staff/acq/search/acq-search.component.ts
Open-ILS/src/eg2/src/app/staff/acq/search/picklist-clone-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/acq/search/picklist-delete-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/acq/search/picklist-merge-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/admin/acq/claiming-admin.component.ts
Open-ILS/src/eg2/src/app/staff/admin/acq/edi_attr_set/edi-attr-set-edit-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/admin/acq/edi_attr_set/edi-attr-set-providers-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-details-dialog.component.html
Open-ILS/src/eg2/src/app/staff/admin/local/admin-carousel.component.html
Open-ILS/src/eg2/src/app/staff/admin/local/circ_limit_set/circ_limit_set_edit.component.html
Open-ILS/src/eg2/src/app/staff/admin/local/copy-loc-order/copy-loc-order.component.html
Open-ILS/src/eg2/src/app/staff/admin/local/staff_portal_page/staff-portal-page.component.html
Open-ILS/src/eg2/src/app/staff/admin/workstation/workstations/workstations.component.html
Open-ILS/src/eg2/src/app/staff/booking/cancel-reservation-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/booking/capture.component.ts
Open-ILS/src/eg2/src/app/staff/booking/create-reservation-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/booking/create-reservation.component.html
Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.ts
Open-ILS/src/eg2/src/app/staff/booking/pickup.component.html
Open-ILS/src/eg2/src/app/staff/booking/pull-list.component.html
Open-ILS/src/eg2/src/app/staff/booking/reservations-grid.component.html
Open-ILS/src/eg2/src/app/staff/booking/reservations-grid.component.ts
Open-ILS/src/eg2/src/app/staff/booking/return.component.html
Open-ILS/src/eg2/src/app/staff/cat/vandelay/display-attrs.component.ts
Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.html
Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.ts
Open-ILS/src/eg2/src/app/staff/cat/vandelay/match-set-expression.component.ts
Open-ILS/src/eg2/src/app/staff/cat/vandelay/match-set-new-point.component.ts
Open-ILS/src/eg2/src/app/staff/cat/vandelay/match-set-quality.component.ts
Open-ILS/src/eg2/src/app/staff/cat/vandelay/match-set.component.ts
Open-ILS/src/eg2/src/app/staff/cat/vandelay/queue-items.component.ts
Open-ILS/src/eg2/src/app/staff/cat/vandelay/queue-list.component.html
Open-ILS/src/eg2/src/app/staff/cat/vandelay/queue-list.component.ts
Open-ILS/src/eg2/src/app/staff/cat/vandelay/queue.component.ts
Open-ILS/src/eg2/src/app/staff/cat/vandelay/queued-record-matches.component.ts
Open-ILS/src/eg2/src/app/staff/cat/vandelay/queued-record.component.ts
Open-ILS/src/eg2/src/app/staff/cat/vandelay/recent-imports.component.html
Open-ILS/src/eg2/src/app/staff/cat/vandelay/record-items.component.ts
Open-ILS/src/eg2/src/app/staff/cat/vandelay/vandelay.component.html
Open-ILS/src/eg2/src/app/staff/cat/vandelay/vandelay.component.ts
Open-ILS/src/eg2/src/app/staff/cat/vandelay/vandelay.service.ts
Open-ILS/src/eg2/src/app/staff/cat/volcopy/config.component.ts
Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts
Open-ILS/src/eg2/src/app/staff/cat/volcopy/vol-edit.component.html
Open-ILS/src/eg2/src/app/staff/cat/volcopy/vol-edit.component.ts
Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.component.ts
Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.service.ts
Open-ILS/src/eg2/src/app/staff/catalog/basket-actions.component.ts
Open-ILS/src/eg2/src/app/staff/catalog/browse/results.component.html
Open-ILS/src/eg2/src/app/staff/catalog/hold/hold.component.html
Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.html
Open-ILS/src/eg2/src/app/staff/catalog/record/pagination.component.html
Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.html
Open-ILS/src/eg2/src/app/staff/catalog/result/pagination.component.html
Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.html
Open-ILS/src/eg2/src/app/staff/circ/holds/pull-list.component.ts
Open-ILS/src/eg2/src/app/staff/nav.component.html
Open-ILS/src/eg2/src/app/staff/reporter/simple/simple-reporter.component.ts
Open-ILS/src/eg2/src/app/staff/reporter/simple/sr-editor.component.ts
Open-ILS/src/eg2/src/app/staff/reporter/simple/sr-field-chooser.component.ts
Open-ILS/src/eg2/src/app/staff/reporter/simple/sr-output-options.component.ts
Open-ILS/src/eg2/src/app/staff/reporter/simple/sr-sort-order.component.ts
Open-ILS/src/eg2/src/app/staff/share/.eslintrc [new file with mode: 0644]
Open-ILS/src/eg2/src/app/staff/share/admin-page/admin-page.component.html
Open-ILS/src/eg2/src/app/staff/share/buckets/bucket-dialog.component.html
Open-ILS/src/eg2/src/app/staff/share/holdings/copy-alerts-dialog.component.html
Open-ILS/src/eg2/src/app/staff/share/holdings/copy-alerts-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/share/holdings/copy-notes-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/share/holdings/delete-volcopy-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/share/holdings/mark-damaged-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/share/holdings/mark-discard-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/share/holdings/mark-missing-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/share/holdings/replace-barcode-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/share/holdings/transfer-holdings.component.ts
Open-ILS/src/eg2/src/app/staff/share/holdings/transfer-items.component.ts
Open-ILS/src/eg2/src/app/staff/share/holds/cancel-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/share/holds/detail.component.html
Open-ILS/src/eg2/src/app/staff/share/holds/detail.component.ts
Open-ILS/src/eg2/src/app/staff/share/holds/manage-dialog.component.html
Open-ILS/src/eg2/src/app/staff/share/holds/retarget-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/share/holds/transfer-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/share/marc-edit/authority-linking-dialog.component.html
Open-ILS/src/eg2/src/app/staff/share/marc-edit/editor-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/share/marc-edit/editor.component.html
Open-ILS/src/eg2/src/app/staff/share/marc-edit/fixed-fields-editor.component.ts
Open-ILS/src/eg2/src/app/staff/share/patron/search-dialog.component.ts
Open-ILS/src/eg2/src/app/welcome.component.ts

diff --git a/Open-ILS/src/eg2/src/app/share/.eslintrc b/Open-ILS/src/eg2/src/app/share/.eslintrc
new file mode 100644 (file)
index 0000000..773bf77
--- /dev/null
@@ -0,0 +1,8 @@
+{
+    "rules": {
+        // Temporarily turn of this rule for this dir only, per
+        // https://bugs.launchpad.net/evergreen/+bug/1959048/comments/2
+        // TODO: eventually adhere to this rule
+        "@angular-eslint/no-output-on-prefix": "off"
+    }
+}
\ No newline at end of file
index 83176d9..f8eb571 100644 (file)
@@ -1,9 +1,5 @@
-import {Component, OnInit, Input, ViewEncapsulation} from '@angular/core';
-import {NetService} from '@eg/core/net.service';
-import {OrgService} from '@eg/core/org.service';
-import {AuthService} from '@eg/core/auth.service';
-import {BibRecordService, BibRecordSummary
-    } from '@eg/share/catalog/bib-record.service';
+import {Component, Input, ViewEncapsulation} from '@angular/core';
+import {BibRecordSummary} from '@eg/share/catalog/bib-record.service';
 
 /* Display content from a bib summary display field.  If highlight
  * data is avaialble, it will be used in lieu of the plan display string.
@@ -21,7 +17,7 @@ const PAD_SPACE = ' '; // U+2007
   styleUrls: ['bib-display-field.component.css'],
   encapsulation: ViewEncapsulation.None // required for search highlighting
 })
-export class BibDisplayFieldComponent implements OnInit {
+export class BibDisplayFieldComponent {
 
     @Input() summary: BibRecordSummary;
     @Input() field: string; // display field name
@@ -35,10 +31,6 @@ export class BibDisplayFieldComponent implements OnInit {
     // If provided, turn the display value into a link
     @Input() routerLink: string;
 
-    constructor() {}
-
-    ngOnInit() {}
-
     // Returns an array of display values which may either be
     // plain string values or strings with embedded HTML markup
     // for search results highlighting.
index ffad186..f0b61e9 100644 (file)
@@ -1,12 +1,11 @@
-import { Component, OnInit, Input } from '@angular/core';
-import {NgbPopover} from '@ng-bootstrap/ng-bootstrap';
+import { Component, Input } from '@angular/core';
 
 @Component({
     selector: 'eg-help-popover',
     templateUrl: './eg-help-popover.component.html',
     styleUrls: ['./eg-help-popover.component.css']
 })
-export class EgHelpPopoverComponent implements OnInit {
+export class EgHelpPopoverComponent {
 
     // The text to display in the popover
     @Input()
@@ -23,10 +22,4 @@ export class EgHelpPopoverComponent implements OnInit {
     // 'top', and so forth.
     @Input()
     placement = '';
-
-    constructor() { }
-
-    ngOnInit() {
-    }
-
 }
index 4cbe5de..98b0c75 100644 (file)
@@ -2,11 +2,8 @@
  * <eg-file-reader [(ngModel)]="fileContents">
  * </eg-file-reader>
  */
-import {Component, OnInit, Input, Output, ViewChild,
-    TemplateRef, EventEmitter, ElementRef, forwardRef} from '@angular/core';
+import {Component, forwardRef} from '@angular/core';
 import {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';
-import {Observable, of, Subject} from 'rxjs';
-import {map, tap, reduce, mergeMap, mapTo, debounceTime, distinctUntilChanged, merge, filter} from 'rxjs/operators';
 
 @Component({
   selector: 'eg-file-reader',
@@ -17,15 +14,12 @@ import {map, tap, reduce, mergeMap, mapTo, debounceTime, distinctUntilChanged, m
     multi: true
   }]
 })
-export class FileReaderComponent implements ControlValueAccessor, OnInit {
+export class FileReaderComponent implements ControlValueAccessor {
 
     // Stub functions required by ControlValueAccessor
     propagateChange = (_: any) => {};
     propagateTouch = () => {};
 
-    ngOnInit() {
-    }
-
     changeListener($event): void {
         const me = this;
         if ($event.target.files.length < 1) {
index d1e88ba..ee3daaa 100644 (file)
@@ -1,25 +1,17 @@
-import {Component, Input, OnInit, AfterViewInit,
-    TemplateRef, ElementRef} from '@angular/core';
-import {GridContext, GridColumn, GridRowSelector,
-    GridColumnSet, GridDataSource} from './grid';
+import {Component, Input} from '@angular/core';
+import {GridContext, GridColumn} from './grid';
 
 @Component({
   selector: 'eg-grid-body-cell',
   templateUrl: './grid-body-cell.component.html'
 })
 
-export class GridBodyCellComponent implements OnInit {
+export class GridBodyCellComponent {
 
     @Input() context: GridContext;
     @Input() row: any;
     @Input() column: GridColumn;
 
     initDone: boolean;
-
-    constructor(
-        private elm: ElementRef
-    ) {}
-
-    ngOnInit() {}
 }
 
index 918622e..2c21527 100644 (file)
@@ -1,6 +1,5 @@
-import {Component, Input, OnInit, Host} from '@angular/core';
-import {GridContext, GridColumn, GridRowSelector,
-    GridToolbarAction, GridColumnSet, GridDataSource} from './grid';
+import {Component, Input, Host} from '@angular/core';
+import {GridContext} from './grid';
 import {GridComponent} from './grid.component';
 import {NgbPopover} from '@ng-bootstrap/ng-bootstrap';
 
@@ -9,7 +8,7 @@ import {NgbPopover} from '@ng-bootstrap/ng-bootstrap';
   templateUrl: './grid-body.component.html'
 })
 
-export class GridBodyComponent implements OnInit {
+export class GridBodyComponent {
 
     @Input() context: GridContext;
 
@@ -21,8 +20,6 @@ export class GridBodyComponent implements OnInit {
         this.contextMenus = [];
     }
 
-    ngOnInit() {}
-
     // Not using @HostListener because it only works globally.
     onGridKeyDown(evt: KeyboardEvent) {
         switch (evt.key) {
index 2ab6be0..7100187 100644 (file)
@@ -18,7 +18,7 @@
   <eg-grid-print #gridPrinter [gridContext]="context">
   </eg-grid-print>
 
-  <ng-container *ngIf="dataSource.data.length == 0">
+  <ng-container *ngIf="dataSource.data.length === 0">
     <div class="row">
       <ng-container *ngIf="dataSource.requestingData">
         <div class="col-lg-6 offset-lg-3 text-center mt-3">
index 64dd298..2a60270 100644 (file)
@@ -1,4 +1,4 @@
-import {Component, OnInit, Input, Output, EventEmitter} from '@angular/core';
+import {Component, Input, Output, EventEmitter} from '@angular/core';
 import {Tree, TreeNode} from './tree';
 
 /*
@@ -35,7 +35,7 @@ nodeClicked(node: TreeNode) {
     templateUrl: 'tree.component.html',
     styleUrls: ['tree.component.css']
 })
-export class TreeComponent implements OnInit {
+export class TreeComponent {
 
     _tree: Tree;
     @Input() set tree(t: Tree) {
@@ -55,8 +55,6 @@ export class TreeComponent implements OnInit {
         this.nodeClicked = new EventEmitter<TreeNode>();
     }
 
-    ngOnInit() {}
-
     displayNodes(): TreeNode[] {
         if (!this.tree) { return []; }
         return this.tree.nodeList(true);
index bfbf054..7c886a0 100644 (file)
@@ -7,7 +7,7 @@ import {Component, Input} from '@angular/core';
     template: `
       <ng-container>
         <span *ngIf="value" class="badge badge-success p-1" i18n>Yes</span>
-        <span *ngIf="value == false" class="badge badge-secondary p-1" i18n>No</span>
+        <span *ngIf="value === false" class="badge badge-secondary p-1" i18n>No</span>
         <ng-container *ngIf="value === null">
           <span *ngIf="ternary" class="badge badge-light p-1" i18n>Unset</span>
           <span *ngIf="!ternary"> </span>
index 618cb44..e1fa6df 100644 (file)
@@ -1,11 +1,4 @@
-import {Component, OnInit, AfterViewInit, Input, Output, EventEmitter, ViewChild} from '@angular/core';
-import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap';
-import {Router, ActivatedRoute} from '@angular/router';
-import {StaffCommonModule} from '@eg/staff/common.module';
-import {IdlService, IdlObject} from '@eg/core/idl.service';
-import {PcrudService} from '@eg/core/pcrud.service';
-import {StringComponent} from '@eg/share/string/string.component';
-import {ToastService} from '@eg/share/toast/toast.service';
+import {Component, OnInit, Output, EventEmitter} from '@angular/core';
 import {AuthService} from '@eg/core/auth.service';
 import {AcqProviderSearchTerm, AcqProviderSearch} from './acq-provider-search.service';
 import {StoreService} from '@eg/core/store.service';
@@ -17,7 +10,7 @@ import {OrgFamily} from '@eg/share/org-family-select/org-family-select.component
   templateUrl: './acq-provider-search-form.component.html'
 })
 
-export class AcqProviderSearchFormComponent implements OnInit, AfterViewInit {
+export class AcqProviderSearchFormComponent implements OnInit {
 
     @Output() searchSubmitted = new EventEmitter<AcqProviderSearch>();
 
@@ -36,12 +29,7 @@ export class AcqProviderSearchFormComponent implements OnInit, AfterViewInit {
     providerIsActive = 'active';
 
     constructor(
-        private router: Router,
-        private route: ActivatedRoute,
-        private pcrud: PcrudService,
         private localStore: StoreService,
-        private idl: IdlService,
-        private toast: ToastService,
         private auth: AuthService,
     ) {}
 
@@ -51,8 +39,6 @@ export class AcqProviderSearchFormComponent implements OnInit, AfterViewInit {
         this.collapsed = this.localStore.getLocalItem('eg.acq.provider.search.collapse_form') || false;
     }
 
-    ngAfterViewInit() {}
-
     clearSearch() {
         this.providerName = '';
         this.providerCode = '';
index 7413707..d769a72 100644 (file)
@@ -50,7 +50,7 @@
         <ng-template ngbTabContent>
           <div class="row mt-3">
             <div class="col-lg-12 text-right pb-1">
-              <button class="btn btn-secondary btn-sm" [disabled]="activeTab == defaultTabType"
+              <button class="btn btn-secondary btn-sm" [disabled]="activeTab === defaultTabType"
                 (click)="setDefaultTab()" i18n>Set Default View</button>
             </div>
           </div>
@@ -61,7 +61,7 @@
         <ng-template ngbTabContent>
           <div class="row mt-3">
             <div class="col-lg-12 text-right pb-1">
-              <button class="btn btn-secondary btn-sm" [disabled]="activeTab == defaultTabType"
+              <button class="btn btn-secondary btn-sm" [disabled]="activeTab === defaultTabType"
                 (click)="setDefaultTab()" i18n>Set Default View</button>
             </div>
           </div>
@@ -72,7 +72,7 @@
         <ng-template ngbTabContent>
           <div class="row mt-3">
             <div class="col-lg-12 text-right pb-1">
-              <button class="btn btn-secondary btn-sm" [disabled]="activeTab == defaultTabType"
+              <button class="btn btn-secondary btn-sm" [disabled]="activeTab === defaultTabType"
                 (click)="setDefaultTab()" i18n>Set Default View</button>
             </div>
           </div>
@@ -83,7 +83,7 @@
         <ng-template ngbTabContent>
           <div class="row mt-3">
             <div class="col-lg-12 text-right pb-1">
-              <button class="btn btn-secondary btn-sm" [disabled]="activeTab == defaultTabType"
+              <button class="btn btn-secondary btn-sm" [disabled]="activeTab === defaultTabType"
                 (click)="setDefaultTab()" i18n>Set Default View</button>
             </div>
           </div>
@@ -94,7 +94,7 @@
         <ng-template ngbTabContent>
           <div class="row mt-3">
             <div class="col-lg-12 text-right pb-1">
-              <button class="btn btn-secondary btn-sm" [disabled]="activeTab == defaultTabType"
+              <button class="btn btn-secondary btn-sm" [disabled]="activeTab === defaultTabType"
                 (click)="setDefaultTab()" i18n>Set Default View</button>
             </div>
           </div>
         <ng-template ngbTabContent>
           <div class="row mt-3">
             <div class="col-lg-12 text-right pb-1">
-              <button class="btn btn-secondary btn-sm" [disabled]="activeTab == defaultTabType"
+              <button class="btn btn-secondary btn-sm" [disabled]="activeTab === defaultTabType"
                 (click)="setDefaultTab()" i18n>Set Default View</button>
             </div>
           </div>
         <ng-template ngbTabContent>
           <div class="row mt-3">
             <div class="col-lg-12 text-right pb-1">
-              <button class="btn btn-secondary btn-sm" [disabled]="activeTab == defaultTabType"
+              <button class="btn btn-secondary btn-sm" [disabled]="activeTab === defaultTabType"
                 (click)="setDefaultTab()" i18n>Set Default View</button>
             </div>
           </div>
         <ng-template ngbTabContent>
           <div class="row mt-3">
             <div class="col-lg-12 text-right pb-1">
-              <button class="btn btn-secondary btn-sm" [disabled]="activeTab == defaultTabType"
+              <button class="btn btn-secondary btn-sm" [disabled]="activeTab === defaultTabType"
                 (click)="setDefaultTab()" i18n>Set Default View</button>
             </div>
           </div>
index 897ddf8..889a4bd 100644 (file)
@@ -32,7 +32,7 @@
     <div class="col-auto">
       <button type="submit" class="btn btn-info"
         (click)="updateProvider($event) && holdingTagForm.markAsPristine()" 
-        [disabled]="!holdingTagForm.dirty || (provider && provider._holding_tag == provider.holding_tag())" i18n>Save</button>
+        [disabled]="!holdingTagForm.dirty || (provider && provider._holding_tag === provider.holding_tag())" i18n>Save</button>
     </div>
   </div>
 </form>
index 19d4a1f..1ddc94f 100644 (file)
@@ -1,7 +1,5 @@
-import {Component, OnInit, AfterViewInit, Input, Output, EventEmitter, ViewChild,
+import {Component, OnInit, Input, Output, EventEmitter, ViewChild,
         OnChanges, SimpleChanges} from '@angular/core';
-import {Router, ActivatedRoute} from '@angular/router';
-import {StaffCommonModule} from '@eg/staff/common.module';
 import {IdlService, IdlObject} from '@eg/core/idl.service';
 import {PcrudService} from '@eg/core/pcrud.service';
 import {StringComponent} from '@eg/share/string/string.component';
@@ -15,7 +13,7 @@ import {ServerStoreService} from '@eg/core/server-store.service';
   templateUrl: './acq-search-form.component.html'
 })
 
-export class AcqSearchFormComponent implements OnInit, AfterViewInit, OnChanges {
+export class AcqSearchFormComponent implements OnInit, OnChanges {
 
     @Input() initialSearchTerms: AcqSearchTerm[] = [];
     @Input() fallbackSearchTerms: AcqSearchTerm[] = [];
@@ -45,8 +43,6 @@ export class AcqSearchFormComponent implements OnInit, AfterViewInit, OnChanges
     searchTerms: AcqSearchTerm[] = [];
 
     constructor(
-        private router: Router,
-        private route: ActivatedRoute,
         private pcrud: PcrudService,
         private store: ServerStoreService,
         private idl: IdlService,
@@ -130,8 +126,6 @@ export class AcqSearchFormComponent implements OnInit, AfterViewInit, OnChanges
         });
     }
 
-    ngAfterViewInit() {}
-
     ngOnChanges(changes: SimpleChanges) {
         if ('initialSearchTerms' in changes && !changes.initialSearchTerms.firstChange) {
             this.ngOnInit();
index 959963f..6d0cd45 100644 (file)
@@ -1,11 +1,8 @@
-import {Component, OnInit, AfterViewInit, ViewChild, ViewChildren, QueryList, OnDestroy} from '@angular/core';
+import {Component, OnInit, ViewChild, ViewChildren, QueryList, OnDestroy} from '@angular/core';
 import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap';
 import {Router, ActivatedRoute, ParamMap, RouterEvent, NavigationEnd} from '@angular/router';
 import {filter, takeUntil} from 'rxjs/operators';
 import {Subject} from 'rxjs';
-import {StaffCommonModule} from '@eg/staff/common.module';
-import {IdlService, IdlObject} from '@eg/core/idl.service';
-import {PcrudService} from '@eg/core/pcrud.service';
 import {AcqSearchTerm} from './acq-search.service';
 import {LineitemResultsComponent} from './lineitem-results.component';
 import {PurchaseOrderResultsComponent} from './purchase-order-results.component';
@@ -16,7 +13,7 @@ import {PicklistResultsComponent} from './picklist-results.component';
   templateUrl: './acq-search.component.html'
 })
 
-export class AcqSearchComponent implements OnInit, AfterViewInit, OnDestroy {
+export class AcqSearchComponent implements OnInit, OnDestroy {
 
     searchType = '';
     validSearchTypes = ['lineitems', 'purchaseorders', 'invoices', 'selectionlists'];
@@ -37,8 +34,6 @@ export class AcqSearchComponent implements OnInit, AfterViewInit, OnDestroy {
     constructor(
         private router: Router,
         private route: ActivatedRoute,
-        private pcrud: PcrudService,
-        private idl: IdlService,
     ) {
         this.route.queryParamMap.subscribe((params: ParamMap) => {
             this.urlSearchTerms = [];
@@ -136,8 +131,6 @@ export class AcqSearchComponent implements OnInit, AfterViewInit, OnDestroy {
         };
     }
 
-    ngAfterViewInit() {}
-
     ngOnDestroy(): void {
         this.destroyed.next();
         this.destroyed.complete();
index aceca1e..91aab9a 100644 (file)
@@ -1,5 +1,4 @@
-import {Component, Input, ViewChild, TemplateRef, OnInit, Renderer2} from '@angular/core';
-import {Observable, from, empty, throwError} from 'rxjs';
+import {Component, Input, ViewChild, Renderer2} from '@angular/core';
 import {DialogComponent} from '@eg/share/dialog/dialog.component';
 import {AlertDialogComponent} from '@eg/share/dialog/alert.component';
 import {IdlService, IdlObject} from '@eg/core/idl.service';
@@ -7,7 +6,6 @@ import {EventService} from '@eg/core/event.service';
 import {NetService} from '@eg/core/net.service';
 import {AuthService} from '@eg/core/auth.service';
 import {NgbModal} from '@ng-bootstrap/ng-bootstrap';
-import {ComboboxEntry} from '@eg/share/combobox/combobox.component';
 
 @Component({
   selector: 'eg-picklist-clone-dialog',
@@ -15,7 +13,7 @@ import {ComboboxEntry} from '@eg/share/combobox/combobox.component';
 })
 
 export class PicklistCloneDialogComponent
-  extends DialogComponent implements OnInit {
+  extends DialogComponent {
 
   @Input() grid: any;
   selectionListName: String;
@@ -35,9 +33,6 @@ export class PicklistCloneDialogComponent
     super(modal);
   }
 
-  ngOnInit() {
-  }
-
   update() {
     this.leadListName = this.grid.context.getSelectedRows()[0].name();
     this.renderer.selectRootElement('#create-picklist-name').focus();
index f7cfd49..466f0c6 100644 (file)
@@ -1,13 +1,11 @@
-import {Component, Input, ViewChild, TemplateRef, OnInit} from '@angular/core';
-import {Observable, forkJoin, from, empty, throwError} from 'rxjs';
+import {Component, Input, ViewChild} from '@angular/core';
+import {forkJoin} from 'rxjs';
 import {DialogComponent} from '@eg/share/dialog/dialog.component';
 import {AlertDialogComponent} from '@eg/share/dialog/alert.component';
-import {IdlService, IdlObject} from '@eg/core/idl.service';
 import {EventService} from '@eg/core/event.service';
 import {NetService} from '@eg/core/net.service';
 import {AuthService} from '@eg/core/auth.service';
 import {NgbModal} from '@ng-bootstrap/ng-bootstrap';
-import {ComboboxEntry} from '@eg/share/combobox/combobox.component';
 
 @Component({
   selector: 'eg-picklist-delete-dialog',
@@ -15,7 +13,7 @@ import {ComboboxEntry} from '@eg/share/combobox/combobox.component';
 })
 
 export class PicklistDeleteDialogComponent
-  extends DialogComponent implements OnInit {
+  extends DialogComponent {
 
   @Input() grid: any;
   listNames: string[];
@@ -23,7 +21,6 @@ export class PicklistDeleteDialogComponent
   @ViewChild('fail', { static: true }) private fail: AlertDialogComponent;
 
   constructor(
-    private idl: IdlService,
     private evt: EventService,
     private net: NetService,
     private auth: AuthService,
@@ -32,9 +29,6 @@ export class PicklistDeleteDialogComponent
     super(modal);
   }
 
-  ngOnInit() {
-  }
-
   update() {
     this.listNames = this.grid.context.getSelectedRows().map( r => r.name() );
   }
index 60ed6d6..a4c71f5 100644 (file)
@@ -1,5 +1,4 @@
-import {Component, Input, ViewChild, TemplateRef, OnInit} from '@angular/core';
-import {Observable, forkJoin, from, empty, throwError} from 'rxjs';
+import {Component, Input, ViewChild} from '@angular/core';
 import {DialogComponent} from '@eg/share/dialog/dialog.component';
 import {AlertDialogComponent} from '@eg/share/dialog/alert.component';
 import {IdlService, IdlObject} from '@eg/core/idl.service';
@@ -7,7 +6,6 @@ import {EventService} from '@eg/core/event.service';
 import {NetService} from '@eg/core/net.service';
 import {AuthService} from '@eg/core/auth.service';
 import {NgbModal} from '@ng-bootstrap/ng-bootstrap';
-import {ComboboxEntry} from '@eg/share/combobox/combobox.component';
 
 @Component({
   selector: 'eg-picklist-merge-dialog',
@@ -15,7 +13,7 @@ import {ComboboxEntry} from '@eg/share/combobox/combobox.component';
 })
 
 export class PicklistMergeDialogComponent
-  extends DialogComponent implements OnInit {
+  extends DialogComponent {
 
   @Input() grid: any;
   listNames: string[];
@@ -34,9 +32,6 @@ export class PicklistMergeDialogComponent
     super(modal);
   }
 
-  ngOnInit() {
-  }
-
   update() {
     this.selectedLists = this.grid.context.getSelectedRows();
     this.listNames = this.selectedLists.map( r => r.name() );
index 92b9a86..3ffabaf 100644 (file)
@@ -1,10 +1,7 @@
-import {Component, OnInit, Input, ViewChild} from '@angular/core';
+import {Component} from '@angular/core';
 
 @Component({
     templateUrl: './claiming-admin.component.html'
 })
-export class ClaimingAdminComponent implements OnInit {
-
-    ngOnInit() {
-    }
+export class ClaimingAdminComponent {
 }
index 203f726..2cc0e7e 100644 (file)
@@ -1,16 +1,8 @@
-import {Component, Input, ViewChild, TemplateRef, OnInit} from '@angular/core';
+import {Component, Input, OnInit} from '@angular/core';
 import {DialogComponent} from '@eg/share/dialog/dialog.component';
-import {NgForm} from '@angular/forms';
 import {IdlService, IdlObject} from '@eg/core/idl.service';
-import {EventService} from '@eg/core/event.service';
-import {NetService} from '@eg/core/net.service';
-import {AuthService} from '@eg/core/auth.service';
 import {PcrudService} from '@eg/core/pcrud.service';
-import {Pager} from '@eg/share/util/pager';
 import {NgbModal} from '@ng-bootstrap/ng-bootstrap';
-import {StringComponent} from '@eg/share/string/string.component';
-import {ToastService} from '@eg/share/toast/toast.service';
-import {PermService} from '@eg/core/perm.service';
 
 @Component({
   selector: 'eg-edi-attr-set-edit-dialog',
@@ -29,12 +21,7 @@ export class EdiAttrSetEditDialogComponent
 
     constructor(
         private idl: IdlService,
-        private evt: EventService,
-        private net: NetService,
-        private auth: AuthService,
         private pcrud: PcrudService,
-        private perm: PermService,
-        private toast: ToastService,
         private modal: NgbModal
     ) {
         super(modal);
index fad5b63..e0e63be 100644 (file)
@@ -1,17 +1,6 @@
-import {Component, Input, ViewChild, TemplateRef, OnInit} from '@angular/core';
+import {Component, Input} from '@angular/core';
 import {DialogComponent} from '@eg/share/dialog/dialog.component';
-import {NgForm} from '@angular/forms';
-import {IdlService, IdlObject} from '@eg/core/idl.service';
-import {EventService} from '@eg/core/event.service';
-import {NetService} from '@eg/core/net.service';
-import {AuthService} from '@eg/core/auth.service';
-import {PcrudService} from '@eg/core/pcrud.service';
-import {Pager} from '@eg/share/util/pager';
 import {NgbModal} from '@ng-bootstrap/ng-bootstrap';
-import {StringComponent} from '@eg/share/string/string.component';
-import {ToastService} from '@eg/share/toast/toast.service';
-import {PermService} from '@eg/core/perm.service';
-import {EdiAttrSetProvidersComponent} from './edi-attr-set-providers.component';
 
 @Component({
   selector: 'eg-edi-attr-set-providers-dialog',
@@ -19,23 +8,13 @@ import {EdiAttrSetProvidersComponent} from './edi-attr-set-providers.component';
 })
 
 export class EdiAttrSetProvidersDialogComponent
-  extends DialogComponent implements OnInit {
+  extends DialogComponent {
 
     @Input() attrSetId: number;
 
     constructor(
-        private idl: IdlService,
-        private evt: EventService,
-        private net: NetService,
-        private auth: AuthService,
-        private pcrud: PcrudService,
-        private perm: PermService,
-        private toast: ToastService,
         private modal: NgbModal
     ) {
         super(modal);
     }
-
-    ngOnInit() { }
-
 }
index 19084cc..ed3d7bf 100644 (file)
@@ -28,7 +28,7 @@
           (click)="doTransfer()" i18n>Transfer Money</button>
       </div>
       <div class="col-lg-9 text-right pb-1">
-        <button class="btn btn-secondary btn-xs" [disabled]="activeTab == defaultTabType"
+        <button class="btn btn-secondary btn-xs" [disabled]="activeTab === defaultTabType"
           (click)="setDefaultTab()" i18n>Set Default View</button>
       </div>
     </div>
index a56294f..dfdafdd 100644 (file)
@@ -48,7 +48,7 @@
   <eg-grid-toolbar-button [disabled]="!canCreate" 
     label="New {{idlClassDef.label}}" i18n-label [action]="createNew">
   </eg-grid-toolbar-button>
-  <eg-grid-toolbar-button [disabled]="translatableFields.length == 0" 
+  <eg-grid-toolbar-button [disabled]="translatableFields.length === 0" 
     label="Apply Translations" i18n-label [action]="translate">
   </eg-grid-toolbar-button>
   <eg-grid-toolbar-action label="Edit Selected" i18n-label [action]="editSelected">
index 499b230..edeb545 100644 (file)
@@ -26,7 +26,7 @@
                         <h5 class="col-lg-3 text-center">Remove</h5>
                     </div>
                     <div *ngFor="let mod of circMods">
-                        <div class="row mt-2 mb-2" *ngIf="mod.deleted == false">
+                        <div class="row mt-2 mb-2" *ngIf="mod.deleted === false">
                             <div class="col-lg-9">
                                 {{ mod.code }} : {{ mod.name }}
                             </div>
@@ -57,7 +57,7 @@
                             <h5 class="col-lg-3 text-center">Remove</h5>
                         </div>
                     <div *ngFor="let location of locations">
-                        <div class="row mt-2 mb-2" *ngIf="location.deleted == false">
+                        <div class="row mt-2 mb-2" *ngIf="location.deleted === false">
                             <div class="col-lg-9">
                                     {{ location.shortname }} : {{ location.name }} 
                             </div>
@@ -88,7 +88,7 @@
                         <h5 class="col-lg-3">Remove</h5>
                     </div>
                     <div *ngFor="let group of limitGroups">
-                        <div class="row mt-2 mb-2" *ngIf="group.deleted == false">
+                        <div class="row mt-2 mb-2" *ngIf="group.deleted === false">
                             <div class="col-lg-7">
                                 {{ group.name }}
                             </div>
index 6c42172..378bfa3 100644 (file)
@@ -49,7 +49,7 @@
         <input type="radio" name="selected-entry" 
           [value]="entry.id()" [(ngModel)]="selectedEntry"/>
         <span class="flex-1 ml-1 p-1" i18n
-          [ngClass]="{'border border-primary rounded': selectedEntry == entry.id()}">
+          [ngClass]="{'border border-primary rounded': selectedEntry === entry.id()}">
           {{entry.location().name()}} ({{orgSn(entry.location().owning_lib())}})
         </span>
         <span *ngIf="entry.isnew()" class="ml-2 font-italic text-info">(unsaved)</span>
index 175e607..cf4e119 100644 (file)
@@ -77,7 +77,7 @@
   <eg-grid-toolbar-button [disabled]="!canCreate" 
     label="Clone a Library's Portal Page Entries" i18n-label (onClick)="cloneEntries()">
   </eg-grid-toolbar-button>
-  <eg-grid-toolbar-button [disabled]="translatableFields.length == 0" 
+  <eg-grid-toolbar-button [disabled]="translatableFields.length === 0"
     label="Apply Translations" i18n-label (onClick)="translate()">
   </eg-grid-toolbar-button>
   <eg-grid-toolbar-action label="Edit Selected" i18n-label (onClick)="editSelected($event)">
index 0ff3ce5..e853e95 100644 (file)
@@ -16,7 +16,7 @@
     <div class="alert alert-warning" *ngIf="removeWorkstation" i18n>
       Workstation {{removeWorkstation}} is no longer valid.  Removing registration.
     </div>
-    <div class="alert alert-danger" *ngIf="workstations.length == 0">
+    <div class="alert alert-danger" *ngIf="workstations.length === 0">
       <span i18n>Please register a workstation.</span>
     </div>
 
       <div class="col-lg-8">
         <select class="form-control" [(ngModel)]="selectedName">
           <option *ngFor="let ws of workstations" value="{{ws.name}}">
-            <span *ngIf="ws.name == defaultName" i18n>
+            <span *ngIf="ws.name === defaultName" i18n>
               {{ws.name}} (Default)
             </span>
-            <span *ngIf="ws.name != defaultName">
+            <span *ngIf="ws.name !== defaultName">
               {{ws.name}}
             </span>
           </option>
index 4843eff..8663637 100644 (file)
@@ -36,7 +36,7 @@ export class CancelReservationDialogComponent {
     @ViewChild('confirmCancelReservationDialog', { static: true })
         private cancelReservationDialog: ConfirmDialogComponent;
 
-    @Output() onSuccessfulCancel = new EventEmitter();
+    @Output() reservationCancelled = new EventEmitter();
 
     open(reservations: number[]) {
         this.reservations = reservations;
@@ -53,7 +53,7 @@ export class CancelReservationDialogComponent {
                         this.toast.danger('Could not cancel reservation'); // TODO: needs i18n, pluralization
                     } else {
                         this.toast.success('Reservation successfully canceled'); // TODO: needs i18n, pluralization
-                        this.onSuccessfulCancel.emit();
+                        this.reservationCancelled.emit();
                     }
                 }
             );
index 5e4b7b3..06fc8a9 100644 (file)
@@ -1,7 +1,7 @@
 import {Component, OnInit, OnDestroy, ViewChild} from '@angular/core';
 import {FormGroup, FormControl} from '@angular/forms';
 import {of, Subscription} from 'rxjs';
-import {debounceTime, single, switchMap, tap} from 'rxjs/operators';
+import {debounceTime, switchMap} from 'rxjs/operators';
 import {AuthService} from '@eg/core/auth.service';
 import {NetService} from '@eg/core/net.service';
 import {StringComponent} from '@eg/share/string/string.component';
index 2a15631..98828e7 100644 (file)
@@ -42,7 +42,7 @@ export class CreateReservationDialogComponent
     @Input() patronId: number;
     @Input() attributes: number[] = [];
     @Input() resources: IdlObject[] = [];
-    @Output() onComplete: EventEmitter<boolean>;
+    @Output() reservationRequestCompleted: EventEmitter<boolean>;
 
     create: FormGroup;
     patron$: Observable<{first_given_name: string, second_given_name: string, family_name: string}>;
@@ -69,7 +69,7 @@ export class CreateReservationDialogComponent
         private toast: ToastService
     ) {
         super(modal);
-        this.onComplete = new EventEmitter<boolean>();
+        this.reservationRequestCompleted = new EventEmitter<boolean>();
     }
 
     ngOnInit() {
@@ -127,7 +127,7 @@ export class CreateReservationDialogComponent
                 }, (fail) => {
                     console.warn(fail);
                     this.fail.open();
-                }, () => this.onComplete.emit(true)
+                }, () => this.reservationRequestCompleted.emit(true)
             ));
         };
 
index 7769d99..4dc4d89 100644 (file)
 </div>
 
 <eg-create-reservation-dialog #createDialog
-  (onComplete)="fetchData()"
+  (reservationRequestCompleted)="fetchData()"
   [patronId]="patronId"
   [targetResourceBarcode]="resourceBarcode"
   [targetResource]="resourceId"
index dd3e0ca..25ef296 100644 (file)
@@ -1,7 +1,7 @@
 import {Component, OnInit, ViewChild, OnDestroy} from '@angular/core';
 import {FormGroup, FormControl} from '@angular/forms';
 import {Router, ActivatedRoute, ParamMap} from '@angular/router';
-import {Subscription, of, from} from 'rxjs';
+import {Subscription, of} from 'rxjs';
 import {debounceTime, single, tap, switchMap} from 'rxjs/operators';
 import {NgbTabset} from '@ng-bootstrap/ng-bootstrap';
 import {AuthService} from '@eg/core/auth.service';
index 0ec465d..7cd8c40 100644 (file)
@@ -18,7 +18,7 @@
     <input class="form-check-input" type="checkbox" [checked]="onlyShowCaptured" id="only-show-captured" (change)="handleShowCapturedChange()">
     <label class="form-check-label" for="only-show-captured" i18n>Show only captured resources</label>
   </div>
-  <eg-reservations-grid #readyGrid [patron]="patronId" status="pickupReady" [onlyCaptured]="onlyShowCaptured" persistSuffix="pickup.ready" (onPickup)="this.pickedUpGrid.reloadGrid()"></eg-reservations-grid>
+  <eg-reservations-grid #readyGrid [patron]="patronId" status="pickupReady" [onlyCaptured]="onlyShowCaptured" persistSuffix="pickup.ready" (pickedUpResource)="this.pickedUpGrid.reloadGrid()"></eg-reservations-grid>
 
   <h2 class="text-center mt-2" i18n>Already picked up</h2>
   <eg-reservations-grid #pickedUpGrid [patron]="patronId" status="pickedUp" persistSuffix="pickup.picked_up"></eg-reservations-grid>
index ef66c83..233e033 100644 (file)
@@ -43,5 +43,5 @@
 </eg-grid>
 
 <eg-cancel-reservation-dialog #confirmCancelReservationDialog
-  (onSuccessfulCancel)="pullList.reload()">
+  (reservationCancelled)="pullList.reload()">
 </eg-cancel-reservation-dialog>
index 6cd90f3..1efa950 100644 (file)
@@ -59,7 +59,7 @@
   [readonlyFields]="listReadOnlyFields()">
 </eg-fm-record-editor>
 <eg-cancel-reservation-dialog #confirmCancelReservationDialog
-  (onSuccessfulCancel)="grid.reload()">
+  (reservationCancelled)="grid.reload()">
 </eg-cancel-reservation-dialog>
 <eg-no-timezone-set-dialog #noTimezoneSetDialog>
 </eg-no-timezone-set-dialog>
index 07ee97e..8344ee5 100644 (file)
@@ -35,8 +35,8 @@ export class ReservationsGridComponent implements OnChanges, OnInit {
     @Input() persistSuffix: string;
     @Input() onlyCaptured = false;
 
-    @Output() onPickup = new EventEmitter<IdlObject>();
-    @Output() onReturn = new EventEmitter<IdlObject>();
+    @Output() pickedUpResource = new EventEmitter<IdlObject>();
+    @Output() returnedResource = new EventEmitter<IdlObject>();
 
     gridSource: GridDataSource;
     patronBarcode: string;
@@ -244,7 +244,7 @@ export class ReservationsGridComponent implements OnChanges, OnInit {
                    {'patron_barcode': reservation.usr().card().barcode(), 'reservation': reservation})
                .pipe(tap(
                    () => {
-                       this.onPickup.emit(reservation);
+                       this.pickedUpResource.emit(reservation);
                        this.grid.reload(); },
                ));
         };
@@ -257,7 +257,7 @@ export class ReservationsGridComponent implements OnChanges, OnInit {
                {'patron_barcode': this.patronBarcode, 'reservation': reservation})
                .pipe(tap(
                    () => {
-                       this.onReturn.emit(reservation);
+                       this.returnedResource.emit(reservation);
                        this.grid.reload();
                    },
                ));
index 262910f..82758dd 100644 (file)
@@ -18,7 +18,7 @@
         </div>
         <div *ngIf="patronId">
           <h2 class="text-center" i18n>Ready for return</h2>
-          <eg-reservations-grid #readyGrid [patron]="patronId" status="returnReady" (onReturn)="refreshGrids()" persistSuffix="return.patron.picked_up"></eg-reservations-grid>
+          <eg-reservations-grid #readyGrid [patron]="patronId" status="returnReady" (returnedResource)="refreshGrids()" persistSuffix="return.patron.picked_up"></eg-reservations-grid>
 
           <h2 class="text-center" i18n>Returned today</h2>
           <eg-reservations-grid #returnedGrid [patron]="patronId" status="returnedToday" persistSuffix="return.patron.returned"></eg-reservations-grid>
@@ -35,7 +35,7 @@
         </div>
         <div *ngIf="patronId">
           <h2 class="text-center" i18n>Ready for return</h2>
-          <eg-reservations-grid #readyGrid [patron]="patronId" status="returnReady" (onReturn)="this.returnedGrid.reloadGrid()" persistSuffix="return.resource.picked_up"></eg-reservations-grid>
+          <eg-reservations-grid #readyGrid [patron]="patronId" status="returnReady" (returnedResource)="this.returnedGrid.reloadGrid()" persistSuffix="return.resource.picked_up"></eg-reservations-grid>
 
           <h2 class="text-center" i18n>Returned today</h2>
           <eg-reservations-grid #returnedGrid [patron]="patronId" status="returnedToday" persistSuffix="return.resource.returned"></eg-reservations-grid>
index bbd6daa..7d1eceb 100644 (file)
@@ -1,4 +1,4 @@
-import {Component, OnInit, ViewChild} from '@angular/core';
+import {Component} from '@angular/core';
 import {Router, ActivatedRoute, ParamMap} from '@angular/router';
 import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap';
 
index c017bee..d95f5a3 100644 (file)
       <label for="marc-remove-groups" i18n>Remove MARC Field Groups</label>
     </div>
     <ng-container *ngIf="recordType !== 'authority'">
-      <div class="col-lg-3" *ngIf="bibTrashGroups.length == 0">
+      <div class="col-lg-3" *ngIf="bibTrashGroups.length === 0">
         <span i18n class="font-italic">No Groups Configured</span>
       </div>
       <div class="col-lg-3" *ngIf="bibTrashGroups.length">
index 7fead95..2d83489 100644 (file)
@@ -1,6 +1,5 @@
-import {Component, OnInit, AfterViewInit, Input,
+import {Component, OnInit, AfterViewInit,
     ViewChild, OnDestroy} from '@angular/core';
-import {Subject} from 'rxjs';
 import {tap} from 'rxjs/operators';
 import {IdlObject} from '@eg/core/idl.service';
 import {NetService} from '@eg/core/net.service';
index 86c4b76..dbfdf6b 100644 (file)
@@ -1,11 +1,10 @@
-import {Component, OnInit, ViewChild, AfterViewInit, Input} from '@angular/core';
+import {Component, ViewChild, Input} from '@angular/core';
 import {IdlObject, IdlService} from '@eg/core/idl.service';
 import {PcrudService} from '@eg/core/pcrud.service';
 import {NetService} from '@eg/core/net.service';
 import {AuthService} from '@eg/core/auth.service';
 import {OrgService} from '@eg/core/org.service';
 import {Tree, TreeNode} from '@eg/share/tree/tree';
-import {ComboboxEntry} from '@eg/share/combobox/combobox.component';
 import {StringService} from '@eg/share/string/string.service';
 import {MatchSetNewPointComponent} from './match-set-new-point.component';
 
@@ -13,7 +12,7 @@ import {MatchSetNewPointComponent} from './match-set-new-point.component';
   selector: 'eg-match-set-expression',
   templateUrl: 'match-set-expression.component.html'
 })
-export class MatchSetExpressionComponent implements OnInit {
+export class MatchSetExpressionComponent {
 
     // Match set arrives from parent async.
     matchSet_: IdlObject;
@@ -48,8 +47,6 @@ export class MatchSetExpressionComponent implements OnInit {
         this.newId = -1;
     }
 
-    ngOnInit() {}
-
     refreshTree(): Promise<any> {
         if (!this.matchSet_) { return Promise.resolve(); }
 
index ff5d9a0..2584937 100644 (file)
@@ -1,4 +1,4 @@
-import {Component, OnInit, ViewChild, Output, Input} from '@angular/core';
+import {Component, OnInit, Input} from '@angular/core';
 import {IdlObject, IdlService} from '@eg/core/idl.service';
 import {PcrudService} from '@eg/core/pcrud.service';
 import {ComboboxEntry} from '@eg/share/combobox/combobox.component';
index 5abd71e..b5e2b95 100644 (file)
@@ -1,5 +1,5 @@
-import {Component, OnInit, ViewChild, AfterViewInit, Input} from '@angular/core';
-import {Observable, of} from 'rxjs';
+import {Component, ViewChild, Input} from '@angular/core';
+import {of} from 'rxjs';
 import {IdlObject, IdlService} from '@eg/core/idl.service';
 import {PcrudService} from '@eg/core/pcrud.service';
 import {NetService} from '@eg/core/net.service';
@@ -14,7 +14,7 @@ import {MatchSetNewPointComponent} from './match-set-new-point.component';
   selector: 'eg-match-set-quality',
   templateUrl: 'match-set-quality.component.html'
 })
-export class MatchSetQualityComponent implements OnInit {
+export class MatchSetQualityComponent {
 
     // Match set arrives from parent async.
     matchSet_: IdlObject;
@@ -74,8 +74,6 @@ export class MatchSetQualityComponent implements OnInit {
         };
     }
 
-    ngOnInit() {}
-
     addQuality() {
         const quality = this.idl.create('vmsq');
         const values = this.newPoint.values;
index e57f34f..64a4b35 100644 (file)
@@ -1,4 +1,4 @@
-import {Component, OnInit, ViewChild} from '@angular/core';
+import {Component, OnInit} from '@angular/core';
 import {Router, ActivatedRoute, ParamMap} from '@angular/router';
 import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap';
 import {IdlObject} from '@eg/core/idl.service';
index 4139a1f..007b499 100644 (file)
@@ -1,9 +1,6 @@
-import {Component, OnInit, ViewChild} from '@angular/core';
-import {Observable} from 'rxjs';
-import {map} from 'rxjs/operators';
+import {Component, ViewChild} from '@angular/core';
 import {Router, ActivatedRoute, ParamMap} from '@angular/router';
 import {Pager} from '@eg/share/util/pager';
-import {IdlObject} from '@eg/core/idl.service';
 import {NetService} from '@eg/core/net.service';
 import {AuthService} from '@eg/core/auth.service';
 import {GridComponent} from '@eg/share/grid/grid.component';
index 7517350..248fdba 100644 (file)
@@ -19,7 +19,7 @@
   </div>
 </div>
 
-<eg-grid *ngIf="queueType==='bib'" #bibQueueGrid 
+<eg-grid *ngIf="queueType==='bib'" #bibQueueGrid
   persistKey="cat.vandelay.queue.list.bib"
   (onRowActivate)="rowActivated($event)"
   idlClass="vbq" [dataSource]="queueSource">
@@ -27,7 +27,7 @@
     [action]="deleteSelected"></eg-grid-toolbar-action>
 </eg-grid>
 
-<eg-grid *ngIf="queueType==='auth'" #authQueueGrid 
+<eg-grid *ngIf="queueType==='auth'" #authQueueGrid
   persistKey="cat.vandelay.queue.list.auth"
   (onRowActivate)="rowActivated($event)"
   idlClass="vaq" [dataSource]="queueSource">
index 65db6d6..9a6d1d8 100644 (file)
@@ -1,13 +1,12 @@
-import {Component, OnInit, ViewChild} from '@angular/core';
+import {Component, ViewChild} from '@angular/core';
 import {Observable, of} from 'rxjs';
-import {map} from 'rxjs/operators';
 import {Router, ActivatedRoute, ParamMap} from '@angular/router';
 import {Pager} from '@eg/share/util/pager';
 import {IdlObject} from '@eg/core/idl.service';
 import {NetService} from '@eg/core/net.service';
 import {AuthService} from '@eg/core/auth.service';
 import {GridComponent} from '@eg/share/grid/grid.component';
-import {GridDataSource, GridColumn} from '@eg/share/grid/grid';
+import {GridDataSource} from '@eg/share/grid/grid';
 import {VandelayService} from './vandelay.service';
 
 @Component({
index 484e456..e7e64de 100644 (file)
@@ -1,4 +1,4 @@
-import {Component, OnInit, AfterViewInit, ViewChild} from '@angular/core';
+import {Component, AfterViewInit, ViewChild} from '@angular/core';
 import {Observable} from 'rxjs';
 import {map, filter} from 'rxjs/operators';
 import {Router, ActivatedRoute, ParamMap} from '@angular/router';
@@ -17,7 +17,7 @@ import {VandelayService, VandelayImportSelection,
 @Component({
   templateUrl: 'queue.component.html'
 })
-export class QueueComponent implements OnInit, AfterViewInit {
+export class QueueComponent implements AfterViewInit {
 
     queueId: number;
     queueType: string; // bib / authority
@@ -66,9 +66,6 @@ export class QueueComponent implements OnInit, AfterViewInit {
         };
     }
 
-    ngOnInit() {
-    }
-
     limitToMatches(checked: boolean) {
         this.filters.matches = checked;
         this.queueGrid.reload();
index 10060e0..470e7ce 100644 (file)
@@ -1,10 +1,9 @@
-import {Component, Input, OnInit, ViewChild} from '@angular/core';
-import {Router, ActivatedRoute, ParamMap} from '@angular/router';
-import {Observable, of} from 'rxjs';
-import {map} from 'rxjs/operators';
+import {Component, Input, ViewChild} from '@angular/core';
+import {Router, ActivatedRoute} from '@angular/router';
+import {Observable} from 'rxjs';
 import {Pager} from '@eg/share/util/pager';
 import {GridComponent} from '@eg/share/grid/grid.component';
-import {GridDataSource, GridColumn, GridCellTextGenerator} from '@eg/share/grid/grid';
+import {GridDataSource, GridCellTextGenerator} from '@eg/share/grid/grid';
 import {IdlObject} from '@eg/core/idl.service';
 import {EventService} from '@eg/core/event.service';
 import {NetService} from '@eg/core/net.service';
@@ -17,7 +16,7 @@ import {VandelayService, VandelayImportSelection} from './vandelay.service';
   selector: 'eg-queued-record-matches',
   templateUrl: 'queued-record-matches.component.html'
 })
-export class QueuedRecordMatchesComponent implements OnInit {
+export class QueuedRecordMatchesComponent {
 
     @Input() queueType: string;
     @Input() recordId: number;
@@ -98,8 +97,6 @@ export class QueuedRecordMatchesComponent implements OnInit {
         return false;
     }
 
-    ngOnInit() {}
-
     // This thing is a nesty beast -- clean it up
     getBibMatchRows(pager: Pager): Observable<any> {
 
index 84e7053..872f0e5 100644 (file)
@@ -1,4 +1,4 @@
-import {Component, OnInit, ViewChild} from '@angular/core';
+import {Component} from '@angular/core';
 import {Router, ActivatedRoute, ParamMap} from '@angular/router';
 import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap';
 import {PcrudService} from '@eg/core/pcrud.service';
index 1a9ae5a..c13c323 100644 (file)
@@ -12,7 +12,7 @@
   </div>
 </div>
 
-<div *ngIf="trackers.length == 0">
+<div *ngIf="trackers.length === 0">
     <div class="row">
         <div class="col-lg-6">
             <div class="alert alert-info">
index 6651197..022ee42 100644 (file)
@@ -1,6 +1,5 @@
 import {Component, Input, ViewChild} from '@angular/core';
 import {Pager} from '@eg/share/util/pager';
-import {IdlObject} from '@eg/core/idl.service';
 import {NetService} from '@eg/core/net.service';
 import {PcrudService} from '@eg/core/pcrud.service';
 import {AuthService} from '@eg/core/auth.service';
index 6228a74..5830421 100644 (file)
@@ -2,39 +2,39 @@
 </eg-staff-banner>
 <ul class="nav nav-pills nav-fill pb-4">
   <li class="nav-item">
-    <a class="nav-link" [ngClass]="{active: tab==='export'}" 
+    <a class="nav-link" [ngClass]="{active: tab==='export'}"
       routerLink="/staff/cat/vandelay/export" i18n>Export</a>
   </li>
   <li class="nav-item">
-    <a class="nav-link" [ngClass]="{active: tab==='import'}" 
+    <a class="nav-link" [ngClass]="{active: tab==='import'}"
       routerLink="/staff/cat/vandelay/import" i18n>Import</a>
   </li>
   <li class="nav-item">
-    <a class="nav-link" [ngClass]="{active: tab==='queue'}" 
+    <a class="nav-link" [ngClass]="{active: tab==='queue'}"
       routerLink="/staff/cat/vandelay/queue" i18n>Inspect Queue</a>
   </li>
   <li class="nav-item">
-    <a class="nav-link" [ngClass]="{active: tab==='display_attrs'}" 
+    <a class="nav-link" [ngClass]="{active: tab==='display_attrs'}"
       routerLink="/staff/cat/vandelay/display_attrs/bib" 
         i18n>Record Display Attributes</a>
   </li>
   <li class="nav-item">
-    <a class="nav-link" [ngClass]="{active: tab==='merge_profiles'}" 
+    <a class="nav-link" [ngClass]="{active: tab==='merge_profiles'}"
       routerLink="/staff/cat/vandelay/merge_profiles" 
         i18n>Merge / Overlay Profiles</a>
   </li>
   <li class="nav-item">
-    <a class="nav-link" [ngClass]="{active: tab==='match_sets'}" 
+    <a class="nav-link" [ngClass]="{active: tab==='match_sets'}"
       routerLink="/staff/cat/vandelay/match_sets" 
         i18n>Record Match Sets</a>
   </li>
   <li class="nav-item">
-    <a class="nav-link" [ngClass]="{active: tab==='holdings_profiles'}" 
+    <a class="nav-link" [ngClass]="{active: tab==='holdings_profiles'}"
       routerLink="/staff/cat/vandelay/holdings_profiles" 
       i18n>Holdings Import Profiles</a>
   </li>
   <li class="nav-item">
-    <a class="nav-link" [ngClass]="{active: tab==='active_imports'}" 
+    <a class="nav-link" [ngClass]="{active: tab==='active_imports'}"
       routerLink="/staff/cat/vandelay/active_imports" 
       i18n>Recent Imports</a>
   </li>
index 7a6b24d..071d785 100644 (file)
@@ -1,13 +1,12 @@
-import {Component, OnInit, AfterViewInit, ViewChild} from '@angular/core';
+import {Component} from '@angular/core';
 import {Router, ActivatedRoute, NavigationEnd} from '@angular/router';
 import {take} from 'rxjs/operators';
 import {VandelayService} from './vandelay.service';
-import {IdlObject} from '@eg/core/idl.service';
 
 @Component({
   templateUrl: 'vandelay.component.html'
 })
-export class VandelayComponent implements OnInit, AfterViewInit {
+export class VandelayComponent {
     tab: string;
 
     constructor(
@@ -26,9 +25,5 @@ export class VandelayComponent implements OnInit, AfterViewInit {
             }
         });
     }
-
-    ngOnInit() {}
-
-    ngAfterViewInit() {}
 }
 
index cd52d44..7b228b4 100644 (file)
@@ -1,6 +1,6 @@
 import {Injectable} from '@angular/core';
 import {Observable} from 'rxjs';
-import {tap, map} from 'rxjs/operators';
+import {tap} from 'rxjs/operators';
 import {HttpClient} from '@angular/common/http';
 import {saveAs} from 'file-saver';
 import {IdlService, IdlObject} from '@eg/core/idl.service';
@@ -10,7 +10,6 @@ import {AuthService} from '@eg/core/auth.service';
 import {PcrudService} from '@eg/core/pcrud.service';
 import {PermService} from '@eg/core/perm.service';
 import {EventService} from '@eg/core/event.service';
-import {ProgressDialogComponent} from '@eg/share/dialog/progress.component';
 
 export const VANDELAY_EXPORT_PATH = '/exporter';
 export const VANDELAY_UPLOAD_PATH = '/vandelay-upload';
index f5d648f..497534c 100644 (file)
@@ -1,7 +1,6 @@
-import {Component, Input, OnInit, ViewChild, DoCheck} from '@angular/core';
-import {Router, ActivatedRoute, ParamMap} from '@angular/router';
-import {tap} from 'rxjs/operators';
-import {IdlObject, IdlService} from '@eg/core/idl.service';
+import {Component, Input, OnInit, DoCheck} from '@angular/core';
+import {Router, ActivatedRoute} from '@angular/router';
+import {IdlService} from '@eg/core/idl.service';
 import {VolCopyContext} from './volcopy';
 import {VolCopyService} from './volcopy.service';
 
index e016e51..17e8c87 100644 (file)
@@ -1,8 +1,7 @@
 import {Component, Input, OnInit, AfterViewInit, ViewChild,
     EventEmitter, Output, QueryList, ViewChildren} from '@angular/core';
-import {Router, ActivatedRoute, ParamMap} from '@angular/router';
+import {Router, ActivatedRoute} from '@angular/router';
 import {SafeUrl} from '@angular/platform-browser';
-import {tap} from 'rxjs/operators';
 import {IdlObject, IdlService} from '@eg/core/idl.service';
 import {EventService} from '@eg/core/event.service';
 import {OrgService} from '@eg/core/org.service';
index 2f1cea5..e8c2b43 100644 (file)
 <ng-container *ngFor="let orgNode of context.orgNodes(); let orgIdx = index">
   <ng-container *ngFor="let volNode of orgNode.children; let volIdx = index">
     <ng-container *ngFor="let copyNode of volNode.children; let copyIdx = index">
-      <div class="row d-flex mt-1" [ngClass]="{'vol-row': copyIdx == 0}">
+      <div class="row d-flex mt-1" [ngClass]="{'vol-row': copyIdx === 0}">
         <div class="p-1" [ngStyle]="{flex: flexAt(1)}">
           <div class="d-flex">
             <div class="flex-1 pl-1">
-              <ng-container *ngIf="copyIdx == 0 && volIdx == 0">
+              <ng-container *ngIf="copyIdx === 0 && volIdx === 0">
                 <span>{{orgNode.target.shortname()}}</span>
               </ng-container>
             </div>
-            <ng-container *ngIf="copyIdx == 0 && volIdx == 0 && (
+            <ng-container *ngIf="copyIdx === 0 && volIdx === 0 && (
               context.sessionType === 'record' || context.sessionType === 'mixed')">
               <div class="pr-1">
                 <ng-template #addOrgTmpl>
                 </button>
               </div>
             </ng-container>
-            <ng-container *ngIf="copyIdx == 0">
+            <ng-container *ngIf="copyIdx === 0">
               <div class="pr-1">
                 <ng-template #editOrgTmpl>
                   <eg-org-select [limitPerms]="['CREATE_VOLUME']" 
         </div>
         <div class="p-1" [ngStyle]="{flex: flexAt(3)}">
           <ng-container *ngIf="displayColumn('classification')">
-            <ng-container *ngIf="copyIdx == 0">
+            <ng-container *ngIf="copyIdx === 0">
               <eg-combobox
                 [selectedId]="volNode.target.label_class()"
                 [smallFormControl]="true"
         </div>
         <div class="p-1" [ngStyle]="{flex: flexAt(4)}">
           <ng-container *ngIf="displayColumn('prefix')">
-            <ng-container *ngIf="copyIdx == 0">
+            <ng-container *ngIf="copyIdx === 0">
               <eg-combobox
                 [selectedId]="volNode.target.prefix()"
                 [required]="true"
           </ng-container>
         </div>
         <div class="p-1" [ngStyle]="{flex: flexAt(5)}">
-          <ng-container *ngIf="copyIdx == 0">
+          <ng-container *ngIf="copyIdx === 0">
             <input class="form-control form-control-sm" type="text"
               spellcheck="false"
               [required]="true"
         </div>
         <div class="p-1" [ngStyle]="{flex: flexAt(6)}">
           <ng-container *ngIf="displayColumn('suffix')">
-            <ng-container *ngIf="copyIdx == 0">
+            <ng-container *ngIf="copyIdx === 0">
               <eg-combobox
                 [selectedId]="volNode.target.suffix()"
                 [required]="true"
           </ng-container>
         </div>
         <div class="p-1" [ngStyle]="{flex: flexAt(7)}">
-          <ng-container *ngIf="copyIdx == 0">
+          <ng-container *ngIf="copyIdx === 0">
             <ng-container 
               *ngIf="context.sessionType === 'record' || context.sessionType === 'mixed'">
               <button class="btn btn-sm material-icon-button p-1"
index 9baf350..4fcf63e 100644 (file)
@@ -1,5 +1,4 @@
-import {Component, OnInit, AfterViewInit, ViewChild, Input, Renderer2, Output, EventEmitter} from '@angular/core';
-import {Router, ActivatedRoute, ParamMap} from '@angular/router';
+import {Component, OnInit, ViewChild, Input, Renderer2, Output, EventEmitter} from '@angular/core';
 import {tap} from 'rxjs/operators';
 import {IdlService, IdlObject} from '@eg/core/idl.service';
 import {OrgService} from '@eg/core/org.service';
index 8268967..f284a1c 100644 (file)
@@ -1,4 +1,4 @@
-import {Component, OnInit, AfterViewInit, ViewChild, HostListener} from '@angular/core';
+import {Component, OnInit, ViewChild, HostListener} from '@angular/core';
 import {Router, ActivatedRoute, ParamMap} from '@angular/router';
 import {tap} from 'rxjs/operators';
 import {IdlObject, IdlService} from '@eg/core/idl.service';
@@ -9,11 +9,10 @@ import {AuthService} from '@eg/core/auth.service';
 import {PcrudService} from '@eg/core/pcrud.service';
 import {HoldingsService, CallNumData} from '@eg/staff/share/holdings/holdings.service';
 import {VolCopyContext} from './volcopy';
-import {ProgressInlineComponent} from '@eg/share/dialog/progress-inline.component';
 import {ConfirmDialogComponent} from '@eg/share/dialog/confirm.component';
 import {AnonCacheService} from '@eg/share/util/anon-cache.service';
 import {VolCopyService} from './volcopy.service';
-import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap';
+import {NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap';
 import {BroadcastService} from '@eg/share/util/broadcast.service';
 import {CopyAttrsComponent} from './copy-attrs.component';
 
index ed023ee..2900b36 100644 (file)
@@ -1,17 +1,16 @@
 import {Injectable, EventEmitter} from '@angular/core';
-import {Observable} from 'rxjs';
-import {map, tap, mergeMap} from 'rxjs/operators';
+import {tap} from 'rxjs/operators';
 import {IdlService, IdlObject} from '@eg/core/idl.service';
 import {NetService} from '@eg/core/net.service';
 import {OrgService} from '@eg/core/org.service';
 import {PcrudService} from '@eg/core/pcrud.service';
-import {EventService, EgEvent} from '@eg/core/event.service';
+import {EventService} from '@eg/core/event.service';
 import {AuthService} from '@eg/core/auth.service';
 import {VolCopyContext} from './volcopy';
-import {HoldingsService, CallNumData} from '@eg/staff/share/holdings/holdings.service';
+import {HoldingsService} from '@eg/staff/share/holdings/holdings.service';
 import {ServerStoreService} from '@eg/core/server-store.service';
 import {StoreService} from '@eg/core/store.service';
-import {ComboboxComponent, ComboboxEntry} from '@eg/share/combobox/combobox.component';
+import {ComboboxEntry} from '@eg/share/combobox/combobox.component';
 
 /* Managing volcopy data */
 
index 50f8611..8a2e5ff 100644 (file)
@@ -1,11 +1,10 @@
-import {Component, Input, OnInit, ViewChild} from '@angular/core';
+import {Component, ViewChild} from '@angular/core';
 import {BasketService} from '@eg/share/catalog/basket.service';
 import {Router} from '@angular/router';
 import {NetService} from '@eg/core/net.service';
 import {AuthService} from '@eg/core/auth.service';
 import {PrintService} from '@eg/share/print/print.service';
 import {CatalogService} from '@eg/share/catalog/catalog.service';
-import {CatalogSearchContext, CatalogSearchState} from '@eg/share/catalog/search-context';
 import {StaffCatalogService} from './catalog.service';
 import {BucketDialogComponent
     } from '@eg/staff/share/buckets/bucket-dialog.component';
@@ -17,7 +16,7 @@ const MAX_FROM_SEARCH_RESULTS = 1000;
   selector: 'eg-catalog-basket-actions',
   templateUrl: 'basket-actions.component.html'
 })
-export class BasketActionsComponent implements OnInit {
+export class BasketActionsComponent {
 
     basketAction: string;
 
@@ -39,9 +38,6 @@ export class BasketActionsComponent implements OnInit {
         this.basketAction = '';
     }
 
-    ngOnInit() {
-    }
-
     basketCount(): number {
         return this.basket.recordCount();
     }
index 9af846f..ab4c0a3 100644 (file)
@@ -44,7 +44,7 @@
                 {{result.value}} ({{result.sources}})
             </a>
           </ng-container>
-          <ng-container *ngIf="result.sources == 0">
+          <ng-container *ngIf="result.sources === 0">
             <span>{{result.value}}</span>
           </ng-container>
           <div class="row" *ngFor="let heading of result.compiledHeadings">
index 9d40f1e..a935efc 100644 (file)
                 value="{{part.id()}}">{{part.label()}}</option>
             </select>
           </ng-container>
-          <ng-container *ngIf="ctx.holdMeta.parts.length == 0">
+          <ng-container *ngIf="ctx.holdMeta.parts.length === 0">
             <ng-container *ngIf="ctx.holdMeta.part">
               <span>{{ctx.holdMeta.part.label()}}</span>
             </ng-container>
             *ngFor="let ccvm of ctx.holdMeta.metarecord_filters.formats">
             <div class="form-check ml-3">
               <input class="form-check-input" type="checkbox"
-                [disabled]="ctx.holdMeta.metarecord_filters.formats.length == 1"
+                [disabled]="ctx.holdMeta.metarecord_filters.formats.length === 1"
                 [(ngModel)]="ctx.selectedFormats.formats[ccvm.code()]"/>
               <img class="ml-1"
                 alt="{{iconFormatLabel(ccvm.code())}}"
             *ngFor="let ccvm of ctx.holdMeta.metarecord_filters.langs">
             <div class="form-check ml-3">
               <input class="form-check-input" type="checkbox"
-                [disabled]="ctx.holdMeta.metarecord_filters.langs.length == 1"
+                [disabled]="ctx.holdMeta.metarecord_filters.langs.length === 1"
                 [(ngModel)]="ctx.selectedFormats.langs[ccvm.code()]"/>
               <label class="form-check-label ml-1">
                 {{ccvm.search_label() || ccvm.value()}}
index 966a570..63abf4f 100644 (file)
         <!--  leave the icons in place for all node types, but make them
               invisible when they are not needed. -->
         <span *ngIf="row.treeNode.expanded"
-          [ngClass]="{invisible: row.copy || row.treeNode.children.length == 0}"
+          [ngClass]="{invisible: row.copy || row.treeNode.children.length === 0}"
           class="material-icons p-0 m-0">keyboard_arrow_down</span>
         <span *ngIf="!row.treeNode.expanded"
-          [ngClass]="{invisible: row.copy || row.treeNode.children.length == 0}"
+          [ngClass]="{invisible: row.copy || row.treeNode.children.length === 0}"
           class="material-icons p-0 m-0">keyboard_arrow_right</span>
         <span>{{row.locationLabel}}</span>
       </a>
index 0edcded..be89e17 100644 (file)
@@ -1,11 +1,11 @@
 <ul class="pagination mb-0" *ngIf="index !== null">
-  <li class="page-item" [ngClass]="{disabled : index == 0}">
+  <li class="page-item" [ngClass]="{disabled : index === 0}">
     <a class="no-href page-link" 
       i18n-aria-label aria-label="Start" (click)="firstRecord()">
       <span i18n>Start</span>
     </a>
   </li>
-  <li class="page-item" [ngClass]="{disabled : index == 0}">
+  <li class="page-item" [ngClass]="{disabled : index === 0}">
     <a class="no-href page-link" 
       i18n-aria-label aria-label="Previous" (click)="prevRecord()">
       <span i18n>Previous</span>
index 3d7ee74..d4f711e 100644 (file)
@@ -32,7 +32,7 @@
     <div class="row">
       <div class="col-lg-12 text-right">
         <button class="btn btn-secondary btn-sm"
-            [disabled]="recordTab == defaultTab"
+            [disabled]="recordTab === defaultTab"
             (click)="setDefaultTab()" i18n>Set Default View</button>
       </div>
     </div>
index 7cdda00..a15e428 100644 (file)
@@ -14,7 +14,7 @@ unnecessary given we have to track paging externally anyway.
   </li>
   <li class="page-item" 
     *ngFor="let page of currentPageList()"
-    [ngClass]="{active : searchContext.pager.currentPage() == page}">
+    [ngClass]="{active : searchContext.pager.currentPage() === page}">
     <a class="page-link" (click)="setPage(page)">
       {{page}} <span class="sr-only" i18n>(current)</span></a>
   </li>
index bd1d099..e75ef48 100644 (file)
       <ngb-tab title="Keyword Search" i18n-title id="term">
         <ng-template ngbTabContent>
           <div class="row"
-            [ngClass]="{'mt-4': idx == 0, 'mt-1': idx > 0}"
+            [ngClass]="{'mt-4': idx === 0, 'mt-1': idx > 0}"
             *ngFor="let q of context.termSearch.query; let idx = index; trackBy:trackByIdx">
             <div class="col-lg-2 pr-1">
-              <div *ngIf="idx == 0">
+              <div *ngIf="idx === 0">
                 <select class="form-control" [(ngModel)]="context.termSearch.format">
                   <option i18n value=''>All Formats</option>
                   <ng-container
@@ -82,7 +82,7 @@
             </div>
             <div class="col-lg-4 pl-0 pr-2">
               <div class="form-group">
-                <div *ngIf="idx == 0">
+                <div *ngIf="idx === 0">
                   <input type="text" class="form-control"
                     id='first-query-input'
                     [(ngModel)]="context.termSearch.query[idx]"
                 i18n-title title="Remove Search Row">
                 <span class="material-icons">remove_circle_outline</span>
               </button>
-              <button *ngIf="idx == 0"
+              <button *ngIf="idx === 0"
                 class="btn btn-sm material-icon-button" 
                 type="button" (click)="toggleFilters()" 
                 title="Toggle Search Filters" i18n-title>
                 *ngFor="let q of context.marcSearch.values; let idx = index; trackBy:trackByIdx">
                 <label for="marc-tag-{{idx}}" i18n>Tag</label>
                 <input class="form-control ml-2" size="3" type="text" 
-                  name="marc-tag-{{idx}}" id="{{ idx == 0 ? 'first-marc-tag' : '' }}"
+                  name="marc-tag-{{idx}}" id="{{ idx === 0 ? 'first-marc-tag' : '' }}"
                   [(ngModel)]="context.marcSearch.tags[idx]"
                   (keyup.enter)="searchByForm()"/>
                 <label for="marc-subfield-{{idx}}" class="ml-2" i18n>Subfield</label>
index ee3e696..298325b 100644 (file)
@@ -1,8 +1,7 @@
-import {Component, OnInit, Input, ViewChild, HostListener} from '@angular/core';
+import {Component} from '@angular/core';
 import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap';
 import {Router, ActivatedRoute, ParamMap} from '@angular/router';
 import {PcrudService} from '@eg/core/pcrud.service';
-import {IdlObject} from '@eg/core/idl.service';
 import {AuthService} from '@eg/core/auth.service';
 import {StoreService} from '@eg/core/store.service';
 
@@ -10,7 +9,7 @@ import {StoreService} from '@eg/core/store.service';
   selector: 'eg-holds-pull-list',
   templateUrl: 'pull-list.component.html'
 })
-export class HoldsPullListComponent implements OnInit {
+export class HoldsPullListComponent {
 
     constructor(
         private router: Router,
@@ -20,9 +19,6 @@ export class HoldsPullListComponent implements OnInit {
         private store: StoreService
     ) {}
 
-    ngOnInit() {
-    }
-
     targetOrg(): number {
         return this.auth.user().ws_ou();
     }
index b7e0e08..cb86683 100644 (file)
         </a>
         <div class="dropdown-menu" ngbDropdownMenu>
           <a class="dropdown-item" (click)="setLocale(locale)" 
-            [ngClass]="{disabled: currentLocale.code() == locale.code()}"
+            [ngClass]="{disabled: currentLocale.code() === locale.code()}"
             *ngFor="let locale of locales">
             <span class="material-icons" aria-hidden="true">add_location</span>
             <span i18n>{{locale.name()}}</span>
index dcbc038..f5f9399 100644 (file)
@@ -1,34 +1,7 @@
-import {Component, OnInit, ViewChild} from '@angular/core';
-import {Router} from '@angular/router';
-import {NgbNav} from '@ng-bootstrap/ng-bootstrap';
-import {StaffCommonModule} from '@eg/staff/common.module';
-import {IdlService, IdlObject} from '@eg/core/idl.service';
-import {AuthService} from '@eg/core/auth.service';
-import {PcrudService} from '@eg/core/pcrud.service';
-import {SimpleReporterService} from './simple-reporter.service';
-import {SROutputsComponent} from './sr-my-outputs.component';
+import {Component} from '@angular/core';
 
 @Component({
     templateUrl: './simple-reporter.component.html',
 })
 
-export class SimpleReporterComponent implements OnInit {
-
-    @ViewChild('simpleRptTabs', { static: true }) tabs: NgbNav;
-
-    constructor(
-        private router: Router,
-        private auth: AuthService,
-        private idl: IdlService,
-        private pcrud: PcrudService,
-        private srSvc: SimpleReporterService
-    ) {
-
-    }
-
-
-    ngOnInit() {
-
-    }
-
-}
+export class SimpleReporterComponent {}
index f409b23..5c3d386 100644 (file)
@@ -3,7 +3,6 @@ import {Router, ActivatedRoute} from '@angular/router';
 import {Location} from '@angular/common';
 import {of} from 'rxjs';
 import {NgbNav} from '@ng-bootstrap/ng-bootstrap';
-import {StaffCommonModule} from '@eg/staff/common.module';
 import {EventService} from '@eg/core/event.service';
 import {ToastService} from '@eg/share/toast/toast.service';
 import {ConfirmDialogComponent} from '@eg/share/dialog/confirm.component';
@@ -11,9 +10,6 @@ import {IdlService, IdlObject} from '@eg/core/idl.service';
 import {PcrudService} from '@eg/core/pcrud.service';
 import {StringComponent} from '@eg/share/string/string.component';
 import {SimpleReporterService, SRTemplate} from './simple-reporter.service';
-import {SRFieldChooserComponent} from './sr-field-chooser.component';
-import {SRSortOrderComponent} from './sr-sort-order.component';
-import {SROutputOptionsComponent} from './sr-output-options.component';
 
 @Component({
     templateUrl: './sr-editor.component.html',
index db88650..b3c2e07 100644 (file)
@@ -1,9 +1,7 @@
-import {Component, Input, Output, EventEmitter, OnInit, ViewChild} from '@angular/core';
+import {Component, Input, Output, EventEmitter, ViewChild} from '@angular/core';
 import {NgbAccordion} from '@ng-bootstrap/ng-bootstrap';
 import {IdlService, IdlObject} from '@eg/core/idl.service';
-import {PcrudService} from '@eg/core/pcrud.service';
 import {SimpleReporterService} from './simple-reporter.service';
-import {SRFieldComponent} from './sr-field.component';
 
 @Component({
     selector: 'eg-sr-field-chooser',
@@ -11,7 +9,7 @@ import {SRFieldComponent} from './sr-field.component';
     templateUrl: './sr-field-chooser.component.html'
 })
 
-export class SRFieldChooserComponent implements OnInit {
+export class SRFieldChooserComponent {
 
     @Input() fieldType = 'display';
     @Input() allFields: IdlObject[] = [];
@@ -31,9 +29,6 @@ export class SRFieldChooserComponent implements OnInit {
     ) {
     }
 
-    ngOnInit() {
-    }
-
     fieldIsSelected(field: IdlObject) {
      return this.selectedFields.findIndex(el => el.name === field.name) > -1;
     }
index 5c2398d..110536a 100644 (file)
@@ -1,6 +1,5 @@
-import {Component, Input, Output, EventEmitter, OnInit, ViewChild} from '@angular/core';
-import {NgForm} from '@angular/forms';
-import {IdlService, IdlObject} from '@eg/core/idl.service';
+import {Component, Input} from '@angular/core';
+import {IdlService} from '@eg/core/idl.service';
 import {SimpleReporterService, SRTemplate} from './simple-reporter.service';
 import * as moment from 'moment-timezone';
 
@@ -9,7 +8,7 @@ import * as moment from 'moment-timezone';
   templateUrl: './sr-output-options.component.html'
 })
 
-export class SROutputOptionsComponent implements OnInit {
+export class SROutputOptionsComponent {
 
     @Input() templ: SRTemplate;
     @Input() readyToSchedule: () => boolean;
@@ -20,8 +19,6 @@ export class SROutputOptionsComponent implements OnInit {
         private srSvc: SimpleReporterService
     ) { }
 
-    ngOnInit() {}
-
     defaultTime() {
         // When changing to Later for the first time default minutes to the quarter hour
         if (this.templ.runNow === 'later' && this.templ.runTime === null) {
index 75b7e32..a617be0 100644 (file)
@@ -1,9 +1,7 @@
-import {Component, Input, Output, EventEmitter, OnInit, ViewChild} from '@angular/core';
+import {Component, Input, Output, EventEmitter, ViewChild} from '@angular/core';
 import {NgbAccordion} from '@ng-bootstrap/ng-bootstrap';
 import {IdlService, IdlObject} from '@eg/core/idl.service';
-import {PcrudService} from '@eg/core/pcrud.service';
 import {SimpleReporterService} from './simple-reporter.service';
-import {SRFieldComponent} from './sr-field.component';
 
 @Component({
     selector: 'eg-sr-sort-order',
@@ -11,7 +9,7 @@ import {SRFieldComponent} from './sr-field.component';
     templateUrl: './sr-sort-order.component.html'
 })
 
-export class SRSortOrderComponent implements OnInit {
+export class SRSortOrderComponent {
 
     @Input() fields: IdlObject[] = [];
     @Output() fieldsChange = new EventEmitter<IdlObject[]>();
@@ -27,9 +25,6 @@ export class SRSortOrderComponent implements OnInit {
     ) {
     }
 
-    ngOnInit() {
-    }
-
     updateField(field: IdlObject) {
         const idx = this.fields.findIndex(el => el.name === field.name);
         this.fields[idx] = field;
diff --git a/Open-ILS/src/eg2/src/app/staff/share/.eslintrc b/Open-ILS/src/eg2/src/app/staff/share/.eslintrc
new file mode 100644 (file)
index 0000000..773bf77
--- /dev/null
@@ -0,0 +1,8 @@
+{
+    "rules": {
+        // Temporarily turn of this rule for this dir only, per
+        // https://bugs.launchpad.net/evergreen/+bug/1959048/comments/2
+        // TODO: eventually adhere to this rule
+        "@angular-eslint/no-output-on-prefix": "off"
+    }
+}
\ No newline at end of file
index 58b940b..817a018 100644 (file)
@@ -59,7 +59,7 @@
   <eg-grid-toolbar-button [disabled]="!canCreate" 
     label="New {{idlClassDef.label}}" i18n-label (onClick)="createNew()">
   </eg-grid-toolbar-button>
-  <eg-grid-toolbar-button [disabled]="translatableFields.length == 0" 
+  <eg-grid-toolbar-button [disabled]="translatableFields.length === 0"
     label="Apply Translations" i18n-label (onClick)="translate()">
   </eg-grid-toolbar-button>
   <eg-grid-toolbar-action label="Edit Selected" i18n-label (onClick)="editSelected($event)">
index e02520d..fcd885f 100644 (file)
@@ -2,7 +2,7 @@
   <div class="modal-header bg-info">
     <h4 class="modal-title">
       <ng-container *ngIf="itemIds.length > 0">
-        <span *ngIf="itemIds.length == 1" i18n>
+        <span *ngIf="itemIds.length === 1" i18n>
           Add Item #{{itemIds[0]}} to Bucket</span>
         <span *ngIf="itemIds.length > 1" i18n>
           Add {{itemIds.length}} Items to Bucket</span>
index 13d9d1b..92f59ef 100644 (file)
@@ -98,7 +98,7 @@
             </div>
             <div class="form-check pt-2">
               <input class="form-check-input" type="checkbox" 
-                [ngModel]="alert.ack_time() != null" 
+                [ngModel]="alert.ack_time() !== null" 
                 (ngModelChange)="alert.ack_time($event ? 'now' : null); alert.ischanged(true)"
                 id="alert-temporary-{{alert.id()}}">
               <label class="form-check-label" for="alert-temporary-{{alert.id()}}" i18n>
index 04eb9d5..4cfce2b 100644 (file)
@@ -1,9 +1,7 @@
-import {Component, OnInit, Input, ViewChild} from '@angular/core';
+import {Component, Input, ViewChild} from '@angular/core';
 import {Observable, throwError, from} from 'rxjs';
 import {switchMap} from 'rxjs/operators';
-import {NetService} from '@eg/core/net.service';
 import {IdlService, IdlObject} from '@eg/core/idl.service';
-import {EventService} from '@eg/core/event.service';
 import {ToastService} from '@eg/share/toast/toast.service';
 import {AuthService} from '@eg/core/auth.service';
 import {PcrudService} from '@eg/core/pcrud.service';
@@ -28,7 +26,7 @@ export interface CopyAlertsChanges {
 })
 
 export class CopyAlertsDialogComponent
-    extends DialogComponent implements OnInit {
+    extends DialogComponent {
 
     // If there are multiple copyIds, only new alerts may be applied.
     // If there is only one copyId, then alerts may be applied or removed.
@@ -57,7 +55,6 @@ export class CopyAlertsDialogComponent
     constructor(
         private modal: NgbModal, // required for passing to parent
         private toast: ToastService,
-        private net: NetService,
         private idl: IdlService,
         private pcrud: PcrudService,
         private org: OrgService,
@@ -67,8 +64,6 @@ export class CopyAlertsDialogComponent
         this.copies = [];
     }
 
-    ngOnInit() {}
-
     /**
      * Fetch the item/record, then open the dialog.
      * Dialog promise resolves with true/false indicating whether
index dffa227..cf8b8ba 100644 (file)
@@ -1,9 +1,8 @@
-import {Component, OnInit, Input, ViewChild} from '@angular/core';
+import {Component, Input, ViewChild} from '@angular/core';
 import {Observable, throwError, from, empty} from 'rxjs';
-import {tap, map, switchMap} from 'rxjs/operators';
+import {switchMap} from 'rxjs/operators';
 import {NetService} from '@eg/core/net.service';
 import {IdlService, IdlObject} from '@eg/core/idl.service';
-import {EventService} from '@eg/core/event.service';
 import {ToastService} from '@eg/share/toast/toast.service';
 import {AuthService} from '@eg/core/auth.service';
 import {PcrudService} from '@eg/core/pcrud.service';
@@ -27,7 +26,7 @@ export interface CopyNotesChanges {
 })
 
 export class CopyNotesDialogComponent
-    extends DialogComponent implements OnInit {
+    extends DialogComponent {
 
     // If there are multiple copyIds, only new notes may be applied.
     // If there is only one copyId, then notes may be applied or removed.
@@ -67,9 +66,6 @@ export class CopyNotesDialogComponent
         super(modal); // required for subclassing
     }
 
-    ngOnInit() {
-    }
-
     /**
      */
     open(args: NgbModalOptions): Observable<CopyNotesChanges> {
index 76fbd58..3d7a4dc 100644 (file)
@@ -1,4 +1,4 @@
-import {Component, OnInit, Input, ViewChild, Renderer2} from '@angular/core';
+import {Component, Input, ViewChild, Renderer2} from '@angular/core';
 import {Observable, throwError} from 'rxjs';
 import {IdlObject} from '@eg/core/idl.service';
 import {NetService} from '@eg/core/net.service';
@@ -22,7 +22,7 @@ import {ConfirmDialogComponent} from '@eg/share/dialog/confirm.component';
 })
 
 export class DeleteHoldingDialogComponent
-    extends DialogComponent implements OnInit {
+    extends DialogComponent {
 
     // List of "acn" objects which may contain copies.
     // Objects of either type marked "isdeleted" will be deleted.
@@ -61,8 +61,6 @@ export class DeleteHoldingDialogComponent
         super(modal); // required for subclassing
     }
 
-    ngOnInit() {}
-
     open(args: NgbModalOptions): Observable<boolean> {
         this.numCallNums = 0;
         this.numCopies = 0;
index 9b63441..6ccea62 100644 (file)
@@ -1,4 +1,4 @@
-import {Component, OnInit, Input, ViewChild} from '@angular/core';
+import {Component, Input, ViewChild} from '@angular/core';
 import {Observable, throwError, from} from 'rxjs';
 import {switchMap} from 'rxjs/operators';
 import {NetService} from '@eg/core/net.service';
@@ -24,7 +24,7 @@ import {ComboboxEntry} from '@eg/share/combobox/combobox.component';
 })
 
 export class MarkDamagedDialogComponent
-    extends DialogComponent implements OnInit {
+    extends DialogComponent {
 
     @Input() copyId: number;
     copy: IdlObject;
@@ -57,8 +57,6 @@ export class MarkDamagedDialogComponent
         this.billingTypes = [];
     }
 
-    ngOnInit() {}
-
     /**
      * Fetch the item/record, then open the dialog.
      * Dialog promise resolves with true/false indicating whether
index 588be12..2bb8776 100644 (file)
@@ -1,5 +1,5 @@
-import {Component, OnInit, Input, ViewChild} from '@angular/core';
-import {from, Observable, throwError} from 'rxjs';
+import {Component, Input, ViewChild} from '@angular/core';
+import {from, Observable} from 'rxjs';
 import {tap, concatMap} from 'rxjs/operators';
 import {NetService} from '@eg/core/net.service';
 import {EventService} from '@eg/core/event.service';
@@ -20,7 +20,7 @@ import {StringComponent} from '@eg/share/string/string.component';
 })
 
 export class MarkDiscardDialogComponent
-    extends DialogComponent implements OnInit {
+    extends DialogComponent {
 
     @Input() copyIds: number[];
 
@@ -39,8 +39,6 @@ export class MarkDiscardDialogComponent
         super(modal); // required for subclassing
     }
 
-    ngOnInit() {}
-
     open(args: NgbModalOptions): Observable<boolean> {
         this.numSucceeded = 0;
         this.numFailed = 0;
index 079298e..df1ac12 100644 (file)
@@ -1,5 +1,5 @@
-import {Component, OnInit, Input, ViewChild} from '@angular/core';
-import {Observable, throwError} from 'rxjs';
+import {Component, Input, ViewChild} from '@angular/core';
+import {Observable} from 'rxjs';
 import {NetService} from '@eg/core/net.service';
 import {EventService} from '@eg/core/event.service';
 import {ToastService} from '@eg/share/toast/toast.service';
@@ -19,7 +19,7 @@ import {StringComponent} from '@eg/share/string/string.component';
 })
 
 export class MarkMissingDialogComponent
-    extends DialogComponent implements OnInit {
+    extends DialogComponent {
 
     @Input() copyIds: number[];
 
@@ -41,8 +41,6 @@ export class MarkMissingDialogComponent
         super(modal); // required for subclassing
     }
 
-    ngOnInit() {}
-
     open(args: NgbModalOptions): Observable<boolean> {
         this.numSucceeded = 0;
         this.numFailed = 0;
index 6f1b1a5..accc2c6 100644 (file)
@@ -1,4 +1,4 @@
-import {Component, OnInit, Input, ViewChild, Renderer2} from '@angular/core';
+import {Component, Input, ViewChild, Renderer2} from '@angular/core';
 import {Observable} from 'rxjs';
 import {switchMap, map, tap} from 'rxjs/operators';
 import {IdlObject} from '@eg/core/idl.service';
@@ -19,7 +19,7 @@ import {StringComponent} from '@eg/share/string/string.component';
 })
 
 export class ReplaceBarcodeDialogComponent
-    extends DialogComponent implements OnInit {
+    extends DialogComponent {
 
     @Input() copyIds: number[];
     ids: number[]; // copy of list so we can pop()
@@ -45,8 +45,6 @@ export class ReplaceBarcodeDialogComponent
         super(modal); // required for subclassing
     }
 
-    ngOnInit() {}
-
     open(args: NgbModalOptions): Observable<boolean> {
         this.ids = [].concat(this.copyIds);
         this.numSucceeded = 0;
index 8563e9a..40737f1 100644 (file)
@@ -1,6 +1,4 @@
-import {Component, OnInit, Input, ViewChild, Renderer2} from '@angular/core';
-import {Observable} from 'rxjs';
-import {switchMap, map, tap} from 'rxjs/operators';
+import {Component, Input, ViewChild} from '@angular/core';
 import {IdlObject} from '@eg/core/idl.service';
 import {NetService} from '@eg/core/net.service';
 import {AuthService} from '@eg/core/auth.service';
@@ -17,7 +15,7 @@ import {ProgressDialogComponent} from '@eg/share/dialog/progress.component';
   templateUrl: 'transfer-holdings.component.html'
 })
 
-export class TransferHoldingsComponent implements OnInit {
+export class TransferHoldingsComponent {
 
     // Array of 'acn' objects.
     // Assumes all acn's are children of the same bib record.
@@ -52,8 +50,6 @@ export class TransferHoldingsComponent implements OnInit {
         private auth: AuthService,
         private evt: EventService) {}
 
-    ngOnInit() {}
-
     // Resolves with true if transfer completed, false otherwise.
     // Assumes all volumes are transferred to the same bib record.
     transferHoldings(): Promise<Boolean> {
index 2fb52b0..81e24cf 100644 (file)
@@ -1,7 +1,5 @@
-import {Component, OnInit, Input, ViewChild, Renderer2} from '@angular/core';
-import {Observable} from 'rxjs';
-import {switchMap, map, tap} from 'rxjs/operators';
-import {IdlObject, IdlService} from '@eg/core/idl.service';
+import {Component, ViewChild} from '@angular/core';
+import {IdlObject} from '@eg/core/idl.service';
 import {NetService} from '@eg/core/net.service';
 import {AuthService} from '@eg/core/auth.service';
 import {EventService} from '@eg/core/event.service';
@@ -17,7 +15,7 @@ import {StringComponent} from '@eg/share/string/string.component';
   templateUrl: 'transfer-items.component.html'
 })
 
-export class TransferItemsComponent implements OnInit {
+export class TransferItemsComponent {
 
     @ViewChild('successMsg', {static: false})
         private successMsg: StringComponent;
@@ -38,13 +36,10 @@ export class TransferItemsComponent implements OnInit {
 
     constructor(
         private toast: ToastService,
-        private idl: IdlService,
         private net: NetService,
         private auth: AuthService,
         private evt: EventService) {}
 
-    ngOnInit() {}
-
     // Transfers a set of items/copies (by ID) to the selected call
     // number (by ID).
     // Resolves with true if transfer completed, false otherwise.
index f69b1b4..7927bce 100644 (file)
@@ -1,4 +1,4 @@
-import {Component, OnInit, Input, ViewChild} from '@angular/core';
+import {Component, Input, ViewChild} from '@angular/core';
 import {Observable} from 'rxjs';
 import {NetService} from '@eg/core/net.service';
 import {EventService} from '@eg/core/event.service';
@@ -20,7 +20,7 @@ import {ComboboxEntry} from '@eg/share/combobox/combobox.component';
 })
 
 export class HoldCancelDialogComponent
-    extends DialogComponent implements OnInit {
+    extends DialogComponent {
 
     @Input() holdIds: number[];
     @ViewChild('successMsg', { static: true }) private successMsg: StringComponent;
@@ -44,13 +44,9 @@ export class HoldCancelDialogComponent
         this.cancelReasons = [];
     }
 
-    ngOnInit() {
-        // Avoid fetching cancel reasons in ngOnInit becaues that causes
-        // them to load regardless of whether the dialog is ever used.
-    }
-
+    // Avoid fetching cancel reasons in ngOnInit becaues that causes
+    // them to load regardless of whether the dialog is ever used.
     open(args: NgbModalOptions): Observable<boolean> {
-
         this.numSucceeded = 0;
         this.numFailed = 0;
 
index 1356dd3..45eace5 100644 (file)
@@ -55,7 +55,7 @@
       </ng-container>
     </div>
     <div class="well-label" i18n>Behind Desk</div>
-    <div class="well-value">{{hold.behind_desk == '1'}}</div>
+    <div class="well-value">{{hold.behind_desk === '1'}}</div>
   </div>
   <div class="well-row">
     <div class="well-label" i18n>Current Shelf Lib</div>
     <div class="well-label" i18n>Current Shelving Location</div>
     <div class="well-value">{{hold.acpl_name}}</div>
     <div class="well-label" i18n>Force Item Quality</div>
-    <div class="well-value">{{hold.mint_condition == '1'}}</div>
+    <div class="well-value">{{hold.mint_condition === '1'}}</div>
   </div>
   <div class="well-row">
     <div class="well-label" i18n>Email Notify</div>
-    <div class="well-value">{{hold.email_notify == '1'}}</div>
+    <div class="well-value">{{hold.email_notify === '1'}}</div>
     <div class="well-label" i18n>Phone Notify</div>
     <div class="well-value">{{hold.phone_notify}}</div>
     <div class="well-label" i18n>SMS Notify</div>
index 45b414d..30c9c21 100644 (file)
@@ -1,5 +1,4 @@
 import {Component, OnInit, Input, Output, ViewChild, EventEmitter} from '@angular/core';
-import {Observable, Observer, of} from 'rxjs';
 import {tap} from 'rxjs/operators';
 import {IdlObject} from '@eg/core/idl.service';
 import {NetService} from '@eg/core/net.service';
index 1a8cbc3..656429c 100644 (file)
@@ -1,6 +1,6 @@
 <ng-template #dialogContent>
     <div class="modal-header bg-info">
-      <ng-container *ngIf="holdIds.length == 1">
+      <ng-container *ngIf="holdIds.length === 1">
         <h4 class="modal-title" i18n>Modify Hold (#{{holdIds[0]}})</h4>
       </ng-container>
       <ng-container *ngIf="holdIds.length > 1">
index 48a3df0..8965b5c 100644 (file)
@@ -1,4 +1,4 @@
-import {Component, OnInit, Input, ViewChild} from '@angular/core';
+import {Component, Input, ViewChild} from '@angular/core';
 import {Observable} from 'rxjs';
 import {NetService} from '@eg/core/net.service';
 import {EventService} from '@eg/core/event.service';
@@ -19,7 +19,7 @@ import {StringComponent} from '@eg/share/string/string.component';
 })
 
 export class HoldRetargetDialogComponent
-    extends DialogComponent implements OnInit {
+    extends DialogComponent {
 
     @Input() holdIds: number | number[];
     @ViewChild('successMsg', { static: true }) private successMsg: StringComponent;
@@ -38,8 +38,6 @@ export class HoldRetargetDialogComponent
         super(modal); // required for subclassing
     }
 
-    ngOnInit() {}
-
     open(args: NgbModalOptions): Observable<boolean> {
         this.numSucceeded = 0;
         this.numFailed = 0;
index 855c5ea..bf208f7 100644 (file)
@@ -1,4 +1,4 @@
-import {Component, OnInit, Input, ViewChild} from '@angular/core';
+import {Component, Input, ViewChild} from '@angular/core';
 import {Observable, throwError} from 'rxjs';
 import {NetService} from '@eg/core/net.service';
 import {StoreService} from '@eg/core/store.service';
@@ -20,7 +20,7 @@ import {StringComponent} from '@eg/share/string/string.component';
 })
 
 export class HoldTransferDialogComponent
-    extends DialogComponent implements OnInit {
+    extends DialogComponent {
 
     @Input() holdIds: number | number[];
 
@@ -43,8 +43,6 @@ export class HoldTransferDialogComponent
         super(modal); // required for subclassing
     }
 
-    ngOnInit() {}
-
     open(args: NgbModalOptions): Observable<boolean> {
         this.numSucceeded = 0;
         this.numFailed = 0;
index 817379c..a3a0df2 100644 (file)
@@ -69,7 +69,7 @@
     </div>
     <div class="row border-bottom border-secondary p-2 d-flex">
       <div class="flex-1">
-        <button class="btn btn-outline-dark" [disabled]="pager.offset == 0"
+        <button class="btn btn-outline-dark" [disabled]="pager.offset === 0"
           (click)="getPage(0)" i18n>Start</button>
         <button class="btn btn-outline-dark ml-2"
           (click)="getPage(-1)" i18n>Previous</button>
index 67e836b..a0304e1 100644 (file)
@@ -1,5 +1,4 @@
-import {Component, Input, Output, OnInit, EventEmitter} from '@angular/core';
-import {Observable} from 'rxjs';
+import {Component, Input} from '@angular/core';
 import {NetService} from '@eg/core/net.service';
 import {OrgService} from '@eg/core/org.service';
 import {AuthService} from '@eg/core/auth.service';
@@ -19,7 +18,7 @@ import {MarcEditContext} from './editor-context';
 })
 
 export class MarcEditorDialogComponent
-    extends DialogComponent implements OnInit {
+    extends DialogComponent {
 
     @Input() context: MarcEditContext;
     @Input() recordXml: string;
@@ -34,8 +33,6 @@ export class MarcEditorDialogComponent
         super(modal);
     }
 
-    ngOnInit() {}
-
     handleRecordSaved(saved) {
         this.close(saved);
     }
index 25e14c0..e92e9bc 100644 (file)
 
   <div class="pr-3 mr-3 border-right">
     <button class="btn btn-success" (click)="saveRecord()"
-      [disabled]="(record && record.deleted) || record.id == -1" i18n>Save Changes</button>
+      [disabled]="(record && record.deleted) || record.id === -1" i18n>Save Changes</button>
   </div>
 
   <ng-container *ngIf="record && record.id">
-    <button *ngIf="!record.deleted && record.id != -1" class="btn btn-warning" 
+    <button *ngIf="!record.deleted && record.id !== -1" class="btn btn-warning"
       [disabled]="inPlaceMode" (click)="deleteRecord()" i18n>Delete Record</button>
     <button *ngIf="record.deleted" class="btn btn-info" 
       [disabled]="inPlaceMode" (click)="undeleteRecord()" i18n>Undelete Record</button>
 
 <div class="row d-flex p-2 m-2 flex-row-reverse">
   <button class="btn btn-success" (click)="saveRecord()"
-    [disabled]="(record && record.deleted) || record.id == -1" i18n>Save Changes</button>
+    [disabled]="(record && record.deleted) || record.id === -1" i18n>Save Changes</button>
 </div>
 
 
index d029816..fb3de96 100644 (file)
@@ -1,5 +1,4 @@
-import {Component, Input, Output, OnInit, AfterViewInit, EventEmitter,
-    OnDestroy} from '@angular/core';
+import {Component, Input} from '@angular/core';
 import {IdlService} from '@eg/core/idl.service';
 import {OrgService} from '@eg/core/org.service';
 import {MarcRecord} from './marcrecord';
@@ -15,7 +14,7 @@ import {TagTableService} from './tagtable.service';
   templateUrl: './fixed-fields-editor.component.html'
 })
 
-export class FixedFieldsEditorComponent implements OnInit {
+export class FixedFieldsEditorComponent {
 
     @Input() context: MarcEditContext;
     get record(): MarcRecord { return this.context.record; }
@@ -25,7 +24,5 @@ export class FixedFieldsEditorComponent implements OnInit {
         private org: OrgService,
         private tagTable: TagTableService
     ) {}
-
-    ngOnInit() {}
 }
 
index 98e1c22..93c6119 100644 (file)
@@ -1,5 +1,5 @@
-import {Component, OnInit, Input, Output, ViewChild} from '@angular/core';
-import {IdlService, IdlObject} from '@eg/core/idl.service';
+import {Component, ViewChild} from '@angular/core';
+import {IdlObject} from '@eg/core/idl.service';
 import {NgbModal} from '@ng-bootstrap/ng-bootstrap';
 import {DialogComponent} from '@eg/share/dialog/dialog.component';
 import {PatronSearchComponent} from './search.component';
@@ -17,15 +17,13 @@ import {PatronSearchComponent} from './search.component';
 })
 
 export class PatronSearchDialogComponent
-    extends DialogComponent implements OnInit {
+    extends DialogComponent {
 
     @ViewChild('searchForm', {static: false})
         searchForm: PatronSearchComponent;
 
     constructor(private modal: NgbModal) { super(modal); }
 
-    ngOnInit() {}
-
     // Fired when a row in the search grid is dbl-clicked / activated
     patronsSelected(patrons: IdlObject[]) {
         this.close(patrons);
index a588661..c226a1d 100644 (file)
@@ -1,12 +1,10 @@
-import { Component, OnInit } from '@angular/core';
+import { Component } from '@angular/core';
 
 @Component({
   templateUrl : './welcome.component.html'
 })
 
-export class WelcomeComponent implements OnInit {
-    ngOnInit() {
-    }
+export class WelcomeComponent {
 }