LP1840773 SCKO Angular
authorBill Erickson <berickxx@gmail.com>
Wed, 22 Jun 2022 22:24:36 +0000 (18:24 -0400)
committerBill Erickson <berickxx@gmail.com>
Wed, 22 Jun 2022 22:24:36 +0000 (18:24 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/scko/fines.component.html
Open-ILS/src/eg2/src/app/scko/fines.component.ts

index 4ff46b0..9a4223c 100644 (file)
@@ -21,7 +21,7 @@
         </td>
         <td>
           <ng-container *ngIf="xact.summary().xact_type() == 'circulation'" i18n>
-            {{displayValue(xact, 'title')}}
+            {{getTitle(xact)}}
           </ng-container>
           <ng-container *ngIf="xact.summary().xact_type() != 'circulation'" i18n>
             {{xact.summary().last_billing_type()}}
index c69d089..ab79855 100644 (file)
@@ -63,5 +63,15 @@ export class SckoFinesComponent implements OnInit {
         return entry ? entry.value() : '';
     }
 
+    getTitle(xact: IdlObject): string {
+        const copy = xact.circulation().target_copy();
+
+        if (Number(copy.call_number().id()) === -1) {
+            return copy.dummy_title();
+        }
+
+        return this.displayValue(xact, 'title');
+    }
+
 }