From 97885805462335cbf9086844d5a0ef5243176618 Mon Sep 17 00:00:00 2001 From: Jane Sandberg Date: Mon, 28 Mar 2022 05:53:32 -0700 Subject: [PATCH] Fix ng lint errors Signed-off-by: Jane Sandberg --- .../admin/local/triggers/trigger-edit.component.ts | 3 +- .../staff/catalog/record/actions.component.html | 4 +-- .../record/upload-jacket-image-dialog.component.ts | 40 +++++++++++----------- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/triggers/trigger-edit.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/local/triggers/trigger-edit.component.ts index f41dc028d0..b3de173d84 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/triggers/trigger-edit.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/triggers/trigger-edit.component.ts @@ -78,8 +78,7 @@ export class EditEventDefinitionComponent implements OnInit { this.pcrud.search('atevdef', {id: this.evtDefId}, {}).toPromise().then(rec => { this.evtReactor = rec.reactor(); - if ('ProcessTemplate SendEmail SendSMS'.indexOf(this.evtReactor) > -1) - { this.evtAltEligible = true; } + if ('ProcessTemplate SendEmail SendSMS'.indexOf(this.evtReactor) > -1) { this.evtAltEligible = true; } }); this.envDataSource.getRows = (pager: Pager, sort: any[]) => { diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/record/actions.component.html b/Open-ILS/src/eg2/src/app/staff/catalog/record/actions.component.html index 0b13009491..810a470bcd 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/record/actions.component.html +++ b/Open-ILS/src/eg2/src/app/staff/catalog/record/actions.component.html @@ -16,8 +16,8 @@ - - + +
diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/record/upload-jacket-image-dialog.component.ts b/Open-ILS/src/eg2/src/app/staff/catalog/record/upload-jacket-image-dialog.component.ts index d02911e952..06e47db737 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/record/upload-jacket-image-dialog.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/catalog/record/upload-jacket-image-dialog.component.ts @@ -12,7 +12,7 @@ import {StringComponent} from '@eg/share/string/string.component'; import {HttpClient, HttpResponse, HttpErrorResponse, HttpEventType} from '@angular/common/http'; @Component({ - selector: 'upload-jacket-image-dialog', + selector: 'eg-upload-jacket-image-dialog', templateUrl: './upload-jacket-image-dialog.component.html' }) @@ -68,9 +68,9 @@ export class UploadJacketImageDialogComponent extends DialogComponent implements } onFileSelected(event) { - console.debug('onFileSelected',event); + console.debug('onFileSelected', event); this.fileEvent = event; - const file:File = this.fileEvent.target.files[0]; + const file: File = this.fileEvent.target.files[0]; if (file) { this.noFile = false; } else { @@ -79,16 +79,16 @@ export class UploadJacketImageDialogComponent extends DialogComponent implements } uploadJacketImage() { - const file:File = this.fileEvent.target.files[0]; + const file: File = this.fileEvent.target.files[0]; if (file) { this.uploading = true; this.clearErrors(); const formData = new FormData(); - formData.append("jacket_upload", file); - formData.append("ses", this.auth.token()); - formData.append("bib_record", this.recordId.toString()); + formData.append('jacket_upload', file); + formData.append('ses', this.auth.token()); + formData.append('bib_record', this.recordId.toString()); - const upload$ = this.http.post("/jacket-upload", formData, { + const upload$ = this.http.post('/jacket-upload', formData, { reportProgress: true, observe: 'events' }); @@ -97,21 +97,21 @@ export class UploadJacketImageDialogComponent extends DialogComponent implements x => { console.debug('Jacket upload: ' , x); if (x instanceof HttpResponse) { - console.debug('yay',x.body); - if (x.body != '1') { + console.debug('yay', x.body); + if (x.body !== '1') { this.uploading = false; this.errorUploading = true; } - switch(x.body) { - case "session not found": this.errorAuthentication = true; break; - case "permission denied": this.errorAuthorization = true; break; - case "invalid compression level": this.errorCompressionConfig = true; break; - case "bib not found": this.errorNotFound = true; break; - case "jacket location not configured": this.errorLocationConfig = true; break; - case "unable to open file for writing": this.errorWritingFile = true; break; - case "file too large": this.errorSize = true; break; - case "parse error": this.errorParsing = true; break; - case "upload error": this.errorGeneric = true; break; + switch (x.body) { + case 'session not found': this.errorAuthentication = true; break; + case 'permission denied': this.errorAuthorization = true; break; + case 'invalid compression level': this.errorCompressionConfig = true; break; + case 'bib not found': this.errorNotFound = true; break; + case 'jacket location not configured': this.errorLocationConfig = true; break; + case 'unable to open file for writing': this.errorWritingFile = true; break; + case 'file too large': this.errorSize = true; break; + case 'parse error': this.errorParsing = true; break; + case 'upload error': this.errorGeneric = true; break; default: this.errorGeneric = true; break; } } -- 2.11.0