Fix ng lint errors
authorJane Sandberg <sandbergja@gmail.com>
Mon, 28 Mar 2022 12:53:32 +0000 (05:53 -0700)
committerJane Sandberg <sandbergja@gmail.com>
Mon, 28 Mar 2022 12:53:32 +0000 (05:53 -0700)
Signed-off-by: Jane Sandberg <sandbergja@gmail.com>
Open-ILS/src/eg2/src/app/staff/admin/local/triggers/trigger-edit.component.ts
Open-ILS/src/eg2/src/app/staff/catalog/record/actions.component.html
Open-ILS/src/eg2/src/app/staff/catalog/record/upload-jacket-image-dialog.component.ts

index f41dc02..b3de173 100644 (file)
@@ -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[]) => {
index 0b13009..810a470 100644 (file)
@@ -16,8 +16,8 @@
 <eg-add-to-carousel-dialog #recordCarouselDialog [recordIds]="[recId]">
 </eg-add-to-carousel-dialog>
 
-<upload-jacket-image-dialog #jacketImageDialog [recordId]="recId">
-</upload-jacket-image-dialog>
+<eg-upload-jacket-image-dialog #jacketImageDialog [recordId]="recId">
+</eg-upload-jacket-image-dialog>
 
 <div class="row ml-0 mr-0">
 
index d02911e..06e47db 100644 (file)
@@ -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;
                     }
                 }