LP#1929242: (follow-up) additional tweaks
authorGalen Charlton <gmc@equinoxOLI.org>
Mon, 20 Sep 2021 21:17:00 +0000 (17:17 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Mon, 20 Sep 2021 21:25:11 +0000 (17:25 -0400)
- remove console message upon deleting note
- flesh the creator and editor columns
- make notes grid filterable

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/catalog/record/notes.component.html
Open-ILS/src/eg2/src/app/staff/catalog/record/notes.component.ts

index 9c7e2e9..a405233 100644 (file)
@@ -2,6 +2,7 @@
 
   <eg-grid #notesGrid idlClass="bren" [dataSource]="gridDataSource"
       [sortable]="true" persistKey="catalog.record.notes"
+      [filterable]="true"
       showFields="value,create_date" class="mt-3">
     <eg-grid-toolbar-button [disabled]="!permissions.CREATE_RECORD_NOTE"
       label="New Record Note" i18n-label [action]="createNew">
index b489190..f15cba9 100644 (file)
@@ -71,7 +71,9 @@ export class NotesComponent implements OnInit {
             const searchOps = {
                 offset: pager.offset,
                 limit: pager.limit,
-                order_by: orderBy
+                order_by: orderBy,
+                flesh: 2,
+                flesh_fields: {bren: ['creator', 'editor']}
             };
 
             return this.pcrud.search('bren',
@@ -100,7 +102,7 @@ export class NotesComponent implements OnInit {
         this.deleteSelected = (notes: IdlObject[]) => {
             notes.forEach(note => note.isdeleted(true));
             this.pcrud.autoApply(notes).subscribe(
-                val => console.debug('deleted: ' + val),
+                val => {},
                 err => {},
                 ()  => this.notesGrid.reload()
             );