LPXXX Missing pieces angular port WIP
authorBill Erickson <berickxx@gmail.com>
Mon, 2 Mar 2020 20:28:37 +0000 (15:28 -0500)
committerBill Erickson <berickxx@gmail.com>
Mon, 2 Mar 2020 20:28:37 +0000 (15:28 -0500)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/staff/share/patron/penalty-dialog.component.ts

index 013c2cd..12cdb5f 100644 (file)
@@ -29,13 +29,13 @@ export class PatronPenaltyDialogComponent
     extends DialogComponent implements OnInit {
 
     @Input() patronId: number;
-    @Input() penaltyNote: string = '';
+    @Input() penaltyNote = '';
 
     ALERT_NOTE = 20;
     SILENT_NOTE = 21;
     STAFF_CHR = 25;
 
-    staffInitials: string = '';
+    staffInitials: string;
     penaltyTypes: IdlObject[];
     penaltyTypeFromSelect = '';
     penaltyTypeFromButton;
@@ -62,7 +62,7 @@ export class PatronPenaltyDialogComponent
 
     ngOnInit() {
         this.onOpen$.subscribe(_ =>
-            this.init().subscribe(_ => this.dataLoaded = true));
+            this.init().subscribe(__ => this.dataLoaded = true));
     }
 
     init(): Observable<any> {
@@ -85,28 +85,28 @@ export class PatronPenaltyDialogComponent
             .pipe(tap(ptypes => {
                 this.penaltyTypes =
                     ptypes.sort((a, b) => a.label() < b.label() ? -1 : 1);
-            }))
+            }));
         }));
     }
 
     apply() {
 
-               const pen = this.idl.create('ausp');
-               pen.usr(this.patronId);
-               pen.org_unit(this.auth.user().ws_ou());
-               pen.set_date('now');
-               pen.staff(this.auth.user().id());
+        const pen = this.idl.create('ausp');
+        pen.usr(this.patronId);
+        pen.org_unit(this.auth.user().ws_ou());
+        pen.set_date('now');
+        pen.staff(this.auth.user().id());
 
-               pen.note(this.initials ?
+        pen.note(this.initials ?
             `${this.noteText} [${this.initials}]` : this.noteText);
 
         pen.standing_penalty(
             this.penaltyTypeFromSelect || this.penaltyTypeFromButton);
 
-               this.net.request(
-                       'open-ils.actor',
-                       'open-ils.actor.user.penalty.apply',
-                       this.auth.token(), pen
+        this.net.request(
+            'open-ils.actor',
+            'open-ils.actor.user.penalty.apply',
+            this.auth.token(), pen
         ).subscribe(resp => {
             const e = this.evt.parse(resp);
             if (e) {