templateUrl: 'alerts.component.html',
selector: 'eg-patron-alerts'
})
-export class PatronAlertsComponent implements OnInit {
+export class PatronAlertsComponent {
constructor(
private org: OrgService,
public context: PatronContextService
) {}
- ngOnInit() {
- }
-
alerts(): PatronAlerts {
return this.context.summary ? this.context.summary.alerts : null;
}
templateUrl: 'barcodes.component.html'
})
-export class PatronBarcodesDialogComponent
- extends DialogComponent implements OnInit {
+export class PatronBarcodesDialogComponent extends DialogComponent {
@Input() patron: IdlObject;
primaryCard: number;
private context: PatronContextService
) { super(modal); }
- ngOnInit() {
- }
-
open(ops: NgbModalOptions): Observable<any> {
this.patron.cards().some(card => {
if (card.id() === this.patron.card().id()) {
<div class="col-lg-2" i18n>Renewal?</div>
<div class="col-lg-1">
<ng-container *ngIf="statement.xact.circulation()">
- <eg-bool [value]="statement.xact.circulation().parent_circ() != null">
+ <eg-bool [value]="statement.xact.circulation().parent_circ() !== null">
</eg-bool>
</ng-container>
</div>
</div>
<input type="text" class="form-control" id="barcode-input"
[placeholder]="checkoutNoncat ? '' : 'Barcode...'" i18n-placeholder
- [(ngModel)]="checkoutBarcode" [disabled]="checkoutNoncat != null"
+ [(ngModel)]="checkoutBarcode" [disabled]="checkoutNoncat !== null"
i18n-aria-label aria-label="Barcode Input" (keydown.enter)="checkout()" />
<div class="input-group-append">
<button class="btn btn-outline-dark" (keydown.enter)="checkout()"
<div class="flex-1"></div>
<div ngbDropdown>
<button ngbDropdownToggle class="btn mr-2" [ngClass]="{
- 'btn-outline-dark': dueDateOptions == 0,
+ 'btn-outline-dark': dueDateOptions === 0,
'btn-outline-success': dueDateOptions > 0
}"
i18n>Date Options</button>
<button ngbDropdownItem (click)="toggleDateOptions(1)">
<span *ngIf="dueDateOptions > 0"
class="badge badge-success">✓</span>
- <span *ngIf="dueDateOptions == 0"
+ <span *ngIf="dueDateOptions === 0"
class="badge badge-warning">✗</span>
<span class="pl-2" i18n>Specific Due Date</span>
</button>
<button ngbDropdownItem (click)="toggleDateOptions(2)">
- <span *ngIf="dueDateOptions == 2"
+ <span *ngIf="dueDateOptions === 2"
class="badge badge-success">✓</span>
<span *ngIf="dueDateOptions < 2"
class="badge badge-warning">✗</span>
</div>
</div>
<eg-datetime-select [initialIso]="dueDate"
- [readOnly]="dueDateOptions == 0" (onChangeAsIso)="setDueDate($event)">
+ [readOnly]="dueDateOptions === 0" (onChangeAsIso)="setDueDate($event)">
</eg-datetime-select>
</div>
</div>
<div class="col-lg-6">
<span class="font-weight-bold" i18n>Show:</span>
<button class="btn btn-sm btn-outline-dark ml-2"
- [disabled]="visibilityLevel == 2"
+ [disabled]="visibilityLevel === 2"
(click)="changeFields(2)" i18n>Required Fields</button>
<button class="btn btn-sm btn-outline-dark ml-2"
- [disabled]="visibilityLevel == 1"
+ [disabled]="visibilityLevel === 1"
(click)="changeFields(1)" i18n>Suggested Fields</button>
<button class="btn btn-sm btn-outline-dark ml-2"
- [disabled]="visibilityLevel == 0"
+ [disabled]="visibilityLevel === 0"
(click)="changeFields(0)" i18n>All Fields</button>
</div>
<div class="row pt-1 pb-1 mt-1"
*ngFor="let waiver of patron.waiver_entries(); let index = index">
<div class="col-lg-3">
- <span *ngIf="index == 0" i18n>Allow others to use my account</span>
+ <span *ngIf="index === 0" i18n>Allow others to use my account</span>
</div>
<div class="col-lg-3">
<input type="text" class="form-control" [ngModel]="waiver.name()"
<span class="text-danger material-icons">delete</span>
</button>
</div>
- <div class="ml-2" *ngIf="index == patron.waiver_entries().length - 1">
+ <div class="ml-2" *ngIf="index === patron.waiver_entries().length - 1">
<button class="btn btn-success material-icon-button"
(click)="addWaiver()" i18n-title title="Add Privacy Waiver">
<span class="text-success material-icons">add</span>
<div class="form-check form-check-inline mr-2">
<input class="form-check-input" type="checkbox"
name="addr-{{addr.id()}}-mailing" id="addr-{{addr.id()}}-mailing"
- [ngModel]="patron.mailing_address() && addr.id() == patron.mailing_address().id()"
+ [ngModel]="patron.mailing_address() && addr.id() === patron.mailing_address().id()"
(ngModelChange)="setAddrType('mailing', addr, $event)"/>
<label class="form-check-label"
for="addr-{{addr.id()}}-mailing" i18n>Mailing</label>
<div class="form-check form-check-inline mr-2">
<input class="form-check-input" type="checkbox"
name="addr-{{addr.id()}}-billing" id="addr-{{addr.id()}}-billing"
- [ngModel]="patron.billing_address() && addr.id() == patron.billing_address().id()"
+ [ngModel]="patron.billing_address() && addr.id() === patron.billing_address().id()"
(ngModelChange)="setAddrType('billing', addr, $event)"/>
<label class="form-check-label"
for="addr-{{addr.id()}}-billing" i18n>Physical</label>
domId="asc-{{stat.cat.id()}}-input"
name="asc-{{stat.cat.id()}}-input"
[entries]="stat.entries"
- [required]="stat.cat.required() == 1"
- [allowFreeText]="stat.cat.allow_freetext() == 1"
+ [required]="stat.cat.required() === 1"
+ [allowFreeText]="stat.cat.allow_freetext() === 1"
[(ngModel)]="userStatCats[stat.cat.id()]"
(onChange)="userStatCatChange(stat.cat, $event)">
</eg-combobox>
-import {Component, OnInit, AfterViewInit, Input, ViewChild} from '@angular/core';
+import {Component, OnInit, Input, ViewChild} from '@angular/core';
import {Router, ActivatedRoute, ParamMap} from '@angular/router';
import {empty, from} from 'rxjs';
import {concatMap, tap} from 'rxjs/operators';
selector: 'eg-patron-edit',
styleUrls: ['edit.component.css']
})
-export class EditComponent implements OnInit, AfterViewInit {
+export class EditComponent implements OnInit {
@Input() patronId: number = null;
@Input() cloneId: number = null;
this.load();
}
- ngAfterViewInit() {
- }
-
load(): Promise<any> {
this.loading = true;
this.showForm = false;
templateUrl: 'holds.component.html',
selector: 'eg-patron-holds'
})
-export class HoldsComponent implements OnInit {
+export class HoldsComponent {
constructor(
private router: Router,
public context: PatronContextService
) {}
- ngOnInit() {
- }
-
newHold() {
this.store.setLoginSessionItem(HOLD_FOR_PATRON_KEY,
-import {Component, OnInit, AfterViewInit, Input, ViewChild} from '@angular/core';
+import {Component, OnInit, Input, ViewChild} from '@angular/core';
import {Router, ActivatedRoute, ParamMap} from '@angular/router';
import {Observable, empty, of, from} from 'rxjs';
import {tap, switchMap} from 'rxjs/operators';
templateUrl: 'items.component.html',
selector: 'eg-patron-items'
})
-export class ItemsComponent implements OnInit, AfterViewInit {
+export class ItemsComponent implements OnInit {
// Note we can get the patron id from this.context.patron.id(), but
// on a new page load, this requires us to wait for the arrival of
this.load(true);
}
- ngAfterViewInit() {
- }
-
load(firstLoad?: boolean): Promise<any> {
this.loading = true;
-import {Component, ViewChild, OnInit, AfterViewInit, HostListener} from '@angular/core';
+import {Component, ViewChild, OnInit, HostListener} from '@angular/core';
import {Router, ActivatedRoute, ParamMap, RoutesRecognized} from '@angular/router';
import {Location} from '@angular/common';
import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap';
templateUrl: 'patron.component.html',
styleUrls: ['patron.component.css']
})
-export class PatronComponent implements OnInit, AfterViewInit {
+export class PatronComponent implements OnInit {
patronId: number;
patronTab = 'search';
});
}
- ngAfterViewInit() {
- }
-
// Navigate, opening new tabs when requested via control-click.
// NOTE: The nav items have routerLinks, but for some reason,
// control-click on the links does not open them in a new tab.
-import {Component, Input, OnInit, AfterViewInit, ViewChild} from '@angular/core';
+import {Component, Input, OnInit, ViewChild} from '@angular/core';
import {Router, ActivatedRoute, ParamMap} from '@angular/router';
import {from, empty, range} from 'rxjs';
import {concatMap, tap, takeLast} from 'rxjs/operators';
templateUrl: 'surveys.component.html',
selector: 'eg-patron-survey-responses'
})
-export class PatronSurveyResponsesComponent implements OnInit, AfterViewInit {
+export class PatronSurveyResponsesComponent implements OnInit {
@Input() patronId: number;
surveys: IdlObject[] = [];
}
);
}
-
- ngAfterViewInit() {
- }
}
-import {Component, Input, Output, OnInit, ViewChild} from '@angular/core';
+import {Component, Input, Output, ViewChild} from '@angular/core';
import {Observable} from 'rxjs';
import {map, mergeMap} from 'rxjs/operators';
import {IdlObject} from '@eg/core/idl.service';
templateUrl: './barcode-select.component.html',
})
-export class BarcodeSelectComponent extends DialogComponent implements OnInit {
+export class BarcodeSelectComponent extends DialogComponent {
matches: BarcodeSelectResult[];
selected: BarcodeSelectResult;
private auth: AuthService
) { super(modal); }
- ngOnInit() {
- }
-
selectionChanged() {
const id = Object.keys(this.inputs).map(i => Number(i))
.filter(i => this.inputs[i] === true)[0];
</select>
</div>
</div>
- <ng-container *ngIf="args.where_process == 1">
+ <ng-container *ngIf="args.where_process === 1">
<div class="row mt-2">
<div class="col-lg-4"><label i18n>Credit Card Number</label></div>
<div class="col-lg-8">
</div>
</div>
</ng-container>
- <ng-container *ngIf="args.where_process == 0">
+ <ng-container *ngIf="args.where_process === 0">
<div class="row mt-2">
<div class="col-lg-4"><label i18n>Expire Month</label></div>
<div class="col-lg-8">
</div>
</div>
- <ng-container *ngIf="args.where_process == 0">
+ <ng-container *ngIf="args.where_process === 0">
<div class="row mt-2">
<div class="col-lg-4"><label i18n>Address</label></div>
<div class="col-lg-8">
templateUrl: 'open-circ-dialog.component.html'
})
-export class OpenCircDialogComponent
- extends DialogComponent implements OnInit {
+export class OpenCircDialogComponent extends DialogComponent {
@Input() sameUser: boolean;
@Input() circDate: string; // iso
private auth: AuthService) {
super(modal); // required for subclassing
}
-
- ngOnInit() {}
}
*ngIf="mode === 'checkin' && nextStatuses.length > 0; let index = index">
<div class="col-lg-4" i18n>Next item status:</div>
<div class="col-lg-5">
- <ng-container *ngIf="nextStatuses.length == 1">
+ <ng-container *ngIf="nextStatuses.length === 1">
{{nextStatuses[0].name()}}
</ng-container>
<ng-container *ngIf="nextStatuses.length > 1">
styles: ['.acknowledged {text-decoration: line-through }']
})
-export class CopyAlertManagerDialogComponent
- extends DialogComponent implements OnInit {
+export class CopyAlertManagerDialogComponent extends DialogComponent {
mode: string;
alerts: IdlObject[];
private holdings: HoldingsService
) { super(modal); }
- ngOnInit() {}
-
open(ops?: NgbModalOptions): Observable<any> {
this.nextStatus = null;
[showDeclaredFieldsOnly]="true">
<eg-grid-toolbar-button label="Add to Bucket" i18n-label
- [disabled]="getSelected().length == 0"
+ [disabled]="getSelected().length === 0"
(onClick)="addSelectedToBucket($event)"></eg-grid-toolbar-button>
<eg-grid-toolbar-button label="Merge Patrons" i18n-label
[disabled]="getSelected().length !== 2"