LP1816475: Adding more columns to the manage reservations grid
authorJane Sandberg <sandbej@linnbenton.edu>
Mon, 1 Apr 2019 22:23:37 +0000 (15:23 -0700)
committerJane Sandberg <sandbej@linnbenton.edu>
Wed, 17 Apr 2019 20:32:12 +0000 (13:32 -0700)
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Open-ILS/src/eg2/src/app/staff/booking/reservations-grid.component.html
Open-ILS/src/eg2/src/app/staff/booking/reservations-grid.component.ts

index 5412e7c..7728702 100644 (file)
@@ -30,8 +30,9 @@
   <eg-grid-column i18n-label label="Resource Barcode" path="current_resource.barcode"></eg-grid-column>
   <eg-grid-column i18n-label label="Note" path="note"></eg-grid-column>
   <eg-grid-column i18n-label label="Resource Type" path="target_resource_type.name" [sortable]="false"></eg-grid-column>
-  <eg-grid-column label="Request library" i18n-label [hidden]="true" path="request_lib.name"></eg-grid-column>
-  <eg-grid-column label="Pickup library" i18n-label [hidden]="true" path="pickup_lib.name"></eg-grid-column>
+  <eg-grid-column label="Reservation length" i18n-label  path="length" [sortable]="false"></eg-grid-column>
+  <eg-grid-column label="Request library" i18n-label  path="request_lib.name"></eg-grid-column>
+  <eg-grid-column label="Pickup library" i18n-label path="pickup_lib.name"></eg-grid-column>
   <eg-grid-column label="Pickup library timezone" i18n-label path="timezone" [sortable]="false"></eg-grid-column>
 
 </eg-grid>
index d419c35..85855ca 100644 (file)
@@ -132,6 +132,7 @@ export class ReservationsGridComponent implements OnInit {
                     'usr', 'capture_staff', 'target_resource', 'target_resource_type', 'current_resource', 'request_lib', 'pickup_lib'
                 ], 'au': ['card'] }
             }).pipe(tap((row) => {
+                row['length'] = Moment(row['end_time']()).from(Moment(row['start_time']()), true);
                 this.org.settings('lib.timezone', row['pickup_lib']()).then((tz) => { row['timezone'] = tz['lib.timezone']; });
             }));
         };