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 --- Open-ILS/src/eg2/src/app/staff/circ/patron/edit.component.html | 3 --- .../src/eg2/src/app/staff/share/patron/summary.component.html | 4 ++-- .../src/eg2/src/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 f8870d61f7..75fcc9efc7 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 4fed3473e4..11f164668c 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 87888e2e9a..749b43056d 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', -- 2.11.0