From d841176657f77f4c4012d7878b75dcc881cda177 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 13 Jul 2022 16:36:35 -0400 Subject: [PATCH] LP1904036 Merge repairs; penalty display; autorenew Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- .../src/app/staff/circ/patron/edit.component.html | 3 --- .../app/staff/share/patron/summary.component.html | 4 ++-- .../app/staff/share/patron/summary.component.ts | 10 ++++++++++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/edit.component.html b/Open-ILS/src/eg2/src/app/staff/circ/patron/edit.component.html index f8870d6..75fcc9e 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/patron/edit.component.html +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/edit.component.html @@ -589,9 +589,6 @@ - - diff --git a/Open-ILS/src/eg2/src/app/staff/share/patron/summary.component.html b/Open-ILS/src/eg2/src/app/staff/share/patron/summary.component.html index 4fed347..11f1646 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/patron/summary.component.html +++ b/Open-ILS/src/eg2/src/app/staff/share/patron/summary.component.html @@ -24,11 +24,11 @@ -
- {{pen.usr_message() || pen.standing_penalty().label()}} + {{penaltyLabel(pen)}}
{{pen.set_date() | date:'shortDate'}}
diff --git a/Open-ILS/src/eg2/src/app/staff/share/patron/summary.component.ts b/Open-ILS/src/eg2/src/app/staff/share/patron/summary.component.ts index 87888e2..749b430 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/patron/summary.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/patron/summary.component.ts @@ -58,6 +58,16 @@ export class PatronSummaryComponent implements OnInit { } } + penaltyLabel(pen: IdlObject): string { + if (pen.usr_message()) { + // They don't often have titles, but defaulting to + // title, assuming it will be shorter and therefore more + // appropriate for summary display. + return pen.usr_message().title() || pen.usr_message().message(); + } + return pen.standing_penalty().label(); + } + printAddress(addr: IdlObject) { this.printer.print({ templateName: 'patron_address', -- 1.7.2.5