</div>
</ng-container>
- <ng-container *ngTemplateOutlet="userSettingsCheckboxRow;
- context: {args: {settingName: 'circ.autorenew.opt_in'}}">
- </ng-container>
<ng-container *ngFor="let set of optInSettingTypes | keyvalue">
<ng-container *ngTemplateOutlet="userSettingsCheckboxRow;
context: {args: {settingName: set.key}}">
</div>
</div>
- <div class="row mb-1 alert alert-danger p-0"
+ <div class="row mb-1 alert alert-anger p-0"
*ngFor="let pen of summary.alerts.alertPenalties">
<div class="col-lg-9"
title="{{pen.standing_penalty().name()}}">
- {{pen.usr_message() || pen.standing_penalty().label()}}
+ {{penaltyLabel(pen)}}
</div>
<div class="col-lg-3">{{pen.set_date() | date:'shortDate'}}</div>
</div>
}
}
+ 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',