LP1904036 Patron UI shows pref name for summary/banner
authorBill Erickson <berickxx@gmail.com>
Tue, 17 Aug 2021 20:56:14 +0000 (16:56 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 28 Oct 2022 00:13:36 +0000 (20:13 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/circ/patron/edit.component.ts
Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.html
Open-ILS/src/eg2/src/app/staff/share/patron/summary.component.html

index 64c2531..c95260d 100644 (file)
@@ -813,7 +813,9 @@ export class EditComponent implements OnInit, AfterViewInit {
                 && !this.groupEditForbidden()
             );
 
-            this.toolbar.disableSaveStateChanged.emit(!canSave);
+            if (this.toolbar) {
+                this.toolbar.disableSaveStateChanged.emit(!canSave);
+            }
         });
     }
 
index 9dfc6b3..823af65 100644 (file)
@@ -43,9 +43,9 @@
 
 <ng-container *ngIf="context.summary">
   <eg-staff-banner i18n-bannerText bannerText="Patron: 
-    {{context.summary.patron.family_name()}}, 
-    {{context.summary.patron.first_given_name()}} 
-    {{context.summary.patron.second_given_name()}}">
+    {{patronService.namePart(context.summary.patron, 'family_name')}}, 
+    {{patronService.namePart(context.summary.patron, 'first_given_name')}} 
+    {{patronService.namePart(context.summary.patron, 'second_given_name')}}">
   </eg-staff-banner>
 </ng-container>
 
index e127bc2..3746f9f 100644 (file)
@@ -4,25 +4,11 @@
   <div class="row d-flex patron-status-color rounded {{patronStatusColor()}}">
     <div class="flex-1 pt-1 {{patronStatusColor()}}">
       <h4 class="font-weight-bold" i18n>
-        {{p().family_name()}}, 
-        {{p().first_given_name()}} 
-        {{p().second_given_name()}}
-      </h4>
-    </div>
-    <ng-container *ngIf="hasPrefName()">
-      <div class="mr-2 ml-2 text-info font-italic" i18n>account</div>
-    </ng-container>
-  </div>
-
-  <div class="row d-flex border-top" *ngIf="hasPrefName()">
-    <div class="flex-1 pt-1">
-      <h4 class="font-weight-bold" i18n>
         {{patronService.namePart(p(), 'family_name')}}, 
         {{patronService.namePart(p(), 'first_given_name')}} 
         {{patronService.namePart(p(), 'second_given_name')}}
       </h4>
     </div>
-    <div class="mr-2 ml-2 text-info font-italic" i18n>preferred</div>
   </div>
 
   <div class="row mb-1 alert alert-danger p-0"