LP#1901893: (follow-up) add cellTextGenerator
authorGalen Charlton <gmc@equinoxOLI.org>
Fri, 4 Jun 2021 14:07:40 +0000 (10:07 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 4 Jun 2021 14:07:40 +0000 (10:07 -0400)
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/admin/local/admin-carousel.component.html
Open-ILS/src/eg2/src/app/staff/admin/local/admin-carousel.component.ts

index fde0f1e..45867e9 100644 (file)
@@ -42,6 +42,7 @@
 
 <eg-grid #grid idlClass="{{idlClass}}" [dataSource]="dataSource" 
     [sortable]="true" persistKey="{{persistKey}}"
+    [cellTextGenerator]="cellTextGenerator"
     [stickyHeader]="true">
   <eg-grid-toolbar-button [disabled]="!canCreate" 
     label="New {{idlClassDef.label}}" i18n-label [action]="createNew">
index 2de2d8e..f48f3ef 100644 (file)
@@ -10,6 +10,7 @@ import {OrgService} from '@eg/core/org.service';
 import {PermService} from '@eg/core/perm.service';
 import {AuthService} from '@eg/core/auth.service';
 import {NetService} from '@eg/core/net.service';
+import {GridCellTextGenerator} from '@eg/share/grid/grid';
 import {StringComponent} from '@eg/share/string/string.component';
 import {FmRecordEditorComponent} from '@eg/share/fm-editor/fm-editor.component';
 
@@ -25,6 +26,7 @@ export class AdminCarouselComponent extends AdminPageComponent implements OnInit
     refreshSelected: (idlThings: IdlObject[]) => void;
     createNew: () => void;
     deleteSelected: (idlThings: IdlObject[]) => void;
+    cellTextGenerator: GridCellTextGenerator;
 
     @ViewChild('refreshString', { static: true }) refreshString: StringComponent;
     @ViewChild('refreshErrString', { static: true }) refreshErrString: StringComponent;
@@ -49,7 +51,9 @@ export class AdminCarouselComponent extends AdminPageComponent implements OnInit
 
         this.classLabel = this.idlClassDef.label;
         this.includeOrgDescendants = true;
-
+        this.cellTextGenerator = {
+            bucket: row => row.bucket().name()
+        };
 
         this.createNew = () => {
             super.createNew();