From: Bill Erickson Date: Fri, 28 Jan 2022 21:48:18 +0000 (-0500) Subject: LP1904036 Items out grid sorts by next due by default X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8518ce36f716b2c200f0e9a2f27537b6e77b84d3;p=Evergreen.git LP1904036 Items out grid sorts by next due by default Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/items.component.html b/Open-ILS/src/eg2/src/app/staff/circ/patron/items.component.html index e1abe90783..58a5e3f402 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/patron/items.component.html +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/items.component.html @@ -15,7 +15,7 @@ - @@ -28,7 +28,7 @@ - @@ -48,7 +48,8 @@ + sortField="due_date" menuStyle="none" (reloadRequested)="load()" + [pageSize]="25"> diff --git a/Open-ILS/src/eg2/src/app/staff/share/circ/grid.component.ts b/Open-ILS/src/eg2/src/app/staff/share/circ/grid.component.ts index b6d831b10e..aaebf8095c 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/circ/grid.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/circ/grid.component.ts @@ -75,6 +75,11 @@ export class CircGridComponent implements OnInit { @Input() printTemplate: string; // defaults to items_out @Input() menuStyle: 'full' | 'slim' | 'none' = 'full'; + @Input() sortField: string; // e.g. "due_date", "due_date DESC" + + // Override default grid page size + @Input() pageSize: number = null; + // Emitted when a grid action modified data in a way that could // affect which cirulcations should appear in the grid. Caller // should then refresh their data and call the load() or @@ -194,7 +199,7 @@ export class CircGridComponent implements OnInit { return this.pcrud.search('circ', {id: circIds}, { flesh: CIRC_FLESH_DEPTH, flesh_fields: CIRC_FLESH_FIELDS, - order_by : {circ : ['xact_start']}, + order_by : {circ: this.sortField ? this.sortField : 'xact_start'}, // Avoid fetching the MARC blob by specifying which // fields on the bre to select. More may be needed.