From 6a0a07ce378514126b30498db65d99b06e3c3d93 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 2 Mar 2020 15:28:37 -0500 Subject: [PATCH] LPXXX Missing pieces angular port WIP Signed-off-by: Bill Erickson --- .../staff/share/patron/penalty-dialog.component.ts | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/share/patron/penalty-dialog.component.ts b/Open-ILS/src/eg2/src/app/staff/share/patron/penalty-dialog.component.ts index 013c2cd3b4..12cdb5f559 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/patron/penalty-dialog.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/patron/penalty-dialog.component.ts @@ -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 { @@ -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) { -- 2.11.0