--- /dev/null
+{
+ "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
-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.
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
// 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.
-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()
// 'top', and so forth.
@Input()
placement = '';
-
- constructor() { }
-
- ngOnInit() {
- }
-
}
* <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',
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) {
-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() {}
}
-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';
templateUrl: './grid-body.component.html'
})
-export class GridBodyComponent implements OnInit {
+export class GridBodyComponent {
@Input() context: GridContext;
this.contextMenus = [];
}
- ngOnInit() {}
-
// Not using @HostListener because it only works globally.
onGridKeyDown(evt: KeyboardEvent) {
switch (evt.key) {
<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">
-import {Component, OnInit, Input, Output, EventEmitter} from '@angular/core';
+import {Component, Input, Output, EventEmitter} from '@angular/core';
import {Tree, TreeNode} from './tree';
/*
templateUrl: 'tree.component.html',
styleUrls: ['tree.component.css']
})
-export class TreeComponent implements OnInit {
+export class TreeComponent {
_tree: Tree;
@Input() set tree(t: Tree) {
this.nodeClicked = new EventEmitter<TreeNode>();
}
- ngOnInit() {}
-
displayNodes(): TreeNode[] {
if (!this.tree) { return []; }
return this.tree.nodeList(true);
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>
-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';
templateUrl: './acq-provider-search-form.component.html'
})
-export class AcqProviderSearchFormComponent implements OnInit, AfterViewInit {
+export class AcqProviderSearchFormComponent implements OnInit {
@Output() searchSubmitted = new EventEmitter<AcqProviderSearch>();
providerIsActive = 'active';
constructor(
- private router: Router,
- private route: ActivatedRoute,
- private pcrud: PcrudService,
private localStore: StoreService,
- private idl: IdlService,
- private toast: ToastService,
private auth: AuthService,
) {}
this.collapsed = this.localStore.getLocalItem('eg.acq.provider.search.collapse_form') || false;
}
- ngAfterViewInit() {}
-
clearSearch() {
this.providerName = '';
this.providerCode = '';
<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>
<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>
<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>
-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';
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[] = [];
searchTerms: AcqSearchTerm[] = [];
constructor(
- private router: Router,
- private route: ActivatedRoute,
private pcrud: PcrudService,
private store: ServerStoreService,
private idl: IdlService,
});
}
- ngAfterViewInit() {}
-
ngOnChanges(changes: SimpleChanges) {
if ('initialSearchTerms' in changes && !changes.initialSearchTerms.firstChange) {
this.ngOnInit();
-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';
templateUrl: './acq-search.component.html'
})
-export class AcqSearchComponent implements OnInit, AfterViewInit, OnDestroy {
+export class AcqSearchComponent implements OnInit, OnDestroy {
searchType = '';
validSearchTypes = ['lineitems', 'purchaseorders', 'invoices', 'selectionlists'];
constructor(
private router: Router,
private route: ActivatedRoute,
- private pcrud: PcrudService,
- private idl: IdlService,
) {
this.route.queryParamMap.subscribe((params: ParamMap) => {
this.urlSearchTerms = [];
};
}
- ngAfterViewInit() {}
-
ngOnDestroy(): void {
this.destroyed.next();
this.destroyed.complete();
-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';
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',
})
export class PicklistCloneDialogComponent
- extends DialogComponent implements OnInit {
+ extends DialogComponent {
@Input() grid: any;
selectionListName: String;
super(modal);
}
- ngOnInit() {
- }
-
update() {
this.leadListName = this.grid.context.getSelectedRows()[0].name();
this.renderer.selectRootElement('#create-picklist-name').focus();
-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',
})
export class PicklistDeleteDialogComponent
- extends DialogComponent implements OnInit {
+ extends DialogComponent {
@Input() grid: any;
listNames: string[];
@ViewChild('fail', { static: true }) private fail: AlertDialogComponent;
constructor(
- private idl: IdlService,
private evt: EventService,
private net: NetService,
private auth: AuthService,
super(modal);
}
- ngOnInit() {
- }
-
update() {
this.listNames = this.grid.context.getSelectedRows().map( r => r.name() );
}
-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';
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',
})
export class PicklistMergeDialogComponent
- extends DialogComponent implements OnInit {
+ extends DialogComponent {
@Input() grid: any;
listNames: string[];
super(modal);
}
- ngOnInit() {
- }
-
update() {
this.selectedLists = this.grid.context.getSelectedRows();
this.listNames = this.selectedLists.map( r => r.name() );
-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 {
}
-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',
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);
-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',
})
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() { }
-
}
(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>
<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">
<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>
<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>
<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>
<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>
<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)">
<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>
@ViewChild('confirmCancelReservationDialog', { static: true })
private cancelReservationDialog: ConfirmDialogComponent;
- @Output() onSuccessfulCancel = new EventEmitter();
+ @Output() reservationCancelled = new EventEmitter();
open(reservations: number[]) {
this.reservations = reservations;
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();
}
}
);
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';
@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}>;
private toast: ToastService
) {
super(modal);
- this.onComplete = new EventEmitter<boolean>();
+ this.reservationRequestCompleted = new EventEmitter<boolean>();
}
ngOnInit() {
}, (fail) => {
console.warn(fail);
this.fail.open();
- }, () => this.onComplete.emit(true)
+ }, () => this.reservationRequestCompleted.emit(true)
));
};
</div>
<eg-create-reservation-dialog #createDialog
- (onComplete)="fetchData()"
+ (reservationRequestCompleted)="fetchData()"
[patronId]="patronId"
[targetResourceBarcode]="resourceBarcode"
[targetResource]="resourceId"
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';
<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>
</eg-grid>
<eg-cancel-reservation-dialog #confirmCancelReservationDialog
- (onSuccessfulCancel)="pullList.reload()">
+ (reservationCancelled)="pullList.reload()">
</eg-cancel-reservation-dialog>
[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>
@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;
{'patron_barcode': reservation.usr().card().barcode(), 'reservation': reservation})
.pipe(tap(
() => {
- this.onPickup.emit(reservation);
+ this.pickedUpResource.emit(reservation);
this.grid.reload(); },
));
};
{'patron_barcode': this.patronBarcode, 'reservation': reservation})
.pipe(tap(
() => {
- this.onReturn.emit(reservation);
+ this.returnedResource.emit(reservation);
this.grid.reload();
},
));
</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>
</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>
-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';
<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">
-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';
-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';
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;
this.newId = -1;
}
- ngOnInit() {}
-
refreshTree(): Promise<any> {
if (!this.matchSet_) { return Promise.resolve(); }
-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';
-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';
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;
};
}
- ngOnInit() {}
-
addQuality() {
const quality = this.idl.create('vmsq');
const values = this.newPoint.values;
-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';
-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';
</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">
[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">
-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({
-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';
@Component({
templateUrl: 'queue.component.html'
})
-export class QueueComponent implements OnInit, AfterViewInit {
+export class QueueComponent implements AfterViewInit {
queueId: number;
queueType: string; // bib / authority
};
}
- ngOnInit() {
- }
-
limitToMatches(checked: boolean) {
this.filters.matches = checked;
this.queueGrid.reload();
-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';
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;
return false;
}
- ngOnInit() {}
-
// This thing is a nesty beast -- clean it up
getBibMatchRows(pager: Pager): Observable<any> {
-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';
</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">
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';
</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>
-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(
}
});
}
-
- ngOnInit() {}
-
- ngAfterViewInit() {}
}
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';
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';
-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';
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';
<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"
-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';
-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';
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';
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 */
-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';
selector: 'eg-catalog-basket-actions',
templateUrl: 'basket-actions.component.html'
})
-export class BasketActionsComponent implements OnInit {
+export class BasketActionsComponent {
basketAction: string;
this.basketAction = '';
}
- ngOnInit() {
- }
-
basketCount(): number {
return this.basket.recordCount();
}
{{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">
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()}}
<!-- 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>
<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>
<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>
</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>
<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
</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>
-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';
selector: 'eg-holds-pull-list',
templateUrl: 'pull-list.component.html'
})
-export class HoldsPullListComponent implements OnInit {
+export class HoldsPullListComponent {
constructor(
private router: Router,
private store: StoreService
) {}
- ngOnInit() {
- }
-
targetOrg(): number {
return this.auth.user().ws_ou();
}
</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>
-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 {}
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';
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',
-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',
templateUrl: './sr-field-chooser.component.html'
})
-export class SRFieldChooserComponent implements OnInit {
+export class SRFieldChooserComponent {
@Input() fieldType = 'display';
@Input() allFields: IdlObject[] = [];
) {
}
- ngOnInit() {
- }
-
fieldIsSelected(field: IdlObject) {
return this.selectedFields.findIndex(el => el.name === field.name) > -1;
}
-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';
templateUrl: './sr-output-options.component.html'
})
-export class SROutputOptionsComponent implements OnInit {
+export class SROutputOptionsComponent {
@Input() templ: SRTemplate;
@Input() readyToSchedule: () => boolean;
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) {
-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',
templateUrl: './sr-sort-order.component.html'
})
-export class SRSortOrderComponent implements OnInit {
+export class SRSortOrderComponent {
@Input() fields: IdlObject[] = [];
@Output() fieldsChange = new EventEmitter<IdlObject[]>();
) {
}
- ngOnInit() {
- }
-
updateField(field: IdlObject) {
const idx = this.fields.findIndex(el => el.name === field.name);
this.fields[idx] = field;
--- /dev/null
+{
+ "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
<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)">
<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>
</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>
-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';
})
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.
constructor(
private modal: NgbModal, // required for passing to parent
private toast: ToastService,
- private net: NetService,
private idl: IdlService,
private pcrud: PcrudService,
private org: OrgService,
this.copies = [];
}
- ngOnInit() {}
-
/**
* Fetch the item/record, then open the dialog.
* Dialog promise resolves with true/false indicating whether
-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';
})
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.
super(modal); // required for subclassing
}
- ngOnInit() {
- }
-
/**
*/
open(args: NgbModalOptions): Observable<CopyNotesChanges> {
-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';
})
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.
super(modal); // required for subclassing
}
- ngOnInit() {}
-
open(args: NgbModalOptions): Observable<boolean> {
this.numCallNums = 0;
this.numCopies = 0;
-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';
})
export class MarkDamagedDialogComponent
- extends DialogComponent implements OnInit {
+ extends DialogComponent {
@Input() copyId: number;
copy: IdlObject;
this.billingTypes = [];
}
- ngOnInit() {}
-
/**
* Fetch the item/record, then open the dialog.
* Dialog promise resolves with true/false indicating whether
-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';
})
export class MarkDiscardDialogComponent
- extends DialogComponent implements OnInit {
+ extends DialogComponent {
@Input() copyIds: number[];
super(modal); // required for subclassing
}
- ngOnInit() {}
-
open(args: NgbModalOptions): Observable<boolean> {
this.numSucceeded = 0;
this.numFailed = 0;
-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';
})
export class MarkMissingDialogComponent
- extends DialogComponent implements OnInit {
+ extends DialogComponent {
@Input() copyIds: number[];
super(modal); // required for subclassing
}
- ngOnInit() {}
-
open(args: NgbModalOptions): Observable<boolean> {
this.numSucceeded = 0;
this.numFailed = 0;
-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';
})
export class ReplaceBarcodeDialogComponent
- extends DialogComponent implements OnInit {
+ extends DialogComponent {
@Input() copyIds: number[];
ids: number[]; // copy of list so we can pop()
super(modal); // required for subclassing
}
- ngOnInit() {}
-
open(args: NgbModalOptions): Observable<boolean> {
this.ids = [].concat(this.copyIds);
this.numSucceeded = 0;
-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';
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.
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> {
-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';
templateUrl: 'transfer-items.component.html'
})
-export class TransferItemsComponent implements OnInit {
+export class TransferItemsComponent {
@ViewChild('successMsg', {static: false})
private successMsg: StringComponent;
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.
-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';
})
export class HoldCancelDialogComponent
- extends DialogComponent implements OnInit {
+ extends DialogComponent {
@Input() holdIds: number[];
@ViewChild('successMsg', { static: true }) private successMsg: StringComponent;
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;
</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>
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';
<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">
-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';
})
export class HoldRetargetDialogComponent
- extends DialogComponent implements OnInit {
+ extends DialogComponent {
@Input() holdIds: number | number[];
@ViewChild('successMsg', { static: true }) private successMsg: StringComponent;
super(modal); // required for subclassing
}
- ngOnInit() {}
-
open(args: NgbModalOptions): Observable<boolean> {
this.numSucceeded = 0;
this.numFailed = 0;
-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';
})
export class HoldTransferDialogComponent
- extends DialogComponent implements OnInit {
+ extends DialogComponent {
@Input() holdIds: number | number[];
super(modal); // required for subclassing
}
- ngOnInit() {}
-
open(args: NgbModalOptions): Observable<boolean> {
this.numSucceeded = 0;
this.numFailed = 0;
</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>
-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';
})
export class MarcEditorDialogComponent
- extends DialogComponent implements OnInit {
+ extends DialogComponent {
@Input() context: MarcEditContext;
@Input() recordXml: string;
super(modal);
}
- ngOnInit() {}
-
handleRecordSaved(saved) {
this.close(saved);
}
<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>
-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';
templateUrl: './fixed-fields-editor.component.html'
})
-export class FixedFieldsEditorComponent implements OnInit {
+export class FixedFieldsEditorComponent {
@Input() context: MarcEditContext;
get record(): MarcRecord { return this.context.record; }
private org: OrgService,
private tagTable: TagTableService
) {}
-
- ngOnInit() {}
}
-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';
})
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);
-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 {
}