lp1775286 Color Indication of Overdue on Items Out
authorKyle Huckins <khuckins@catalyte.io>
Thu, 23 May 2019 21:47:02 +0000 (21:47 +0000)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 20 Jul 2020 21:23:51 +0000 (17:23 -0400)
- Overdue items are highlighted in red in the Items Out UI.
- Ensure overdue-row and lost-row classes handle visited links

Signed-off-by: Kyle Huckins <khuckins@catalyte.io>
Signed-off-by: Jennifer Pringle <jennifer.pringle@bc.libraries.coop>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>

Open-ILS/src/templates/staff/circ/patron/t_items_out.tt2
Open-ILS/src/templates/staff/css/style.css.tt2
Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js

index b7857aa..37235ed 100644 (file)
@@ -49,7 +49,8 @@
   features="clientsort,allowAll"
   items-provider="gridDataProvider"
   persist-key="circ.patron.items_out"
-  dateformat="{{$root.egDateAndTimeFormat}}">
+  dateformat="{{$root.egDateAndTimeFormat}}"
+  row-class="colorizeItemsOutList">
 
   <eg-grid-action handler="print_receipt"
     label="[% l('Print Item Receipt') %]"></eg-grid-action>
@@ -84,7 +85,7 @@
       {{item.target_copy().barcode()}}
     </a>
   </eg-grid-field>
-  <eg-grid-field label="[% l('Due Date') %]" path='due_date' datefilter="egDueDate" dateonlyinterval="duration" datecontext="circ_lib" datatype="timestamp"></eg-grid-field>
+  <eg-grid-field label="[% l('Due Date') %]" path='due_date' datefilter="egDueDate" dateonlyinterval="duration" datecontext="circ_lib" datatype="timestamp" required></eg-grid-field>
   <eg-grid-field label="[% l('Workstation') %]" path='workstation.name'></eg-grid-field>
   <eg-grid-field label="[% l('Checkin Workstation') %]" path='checkin_workstation.name'></eg-grid-field>
   <eg-grid-field label="[% l('Checkout / Renewal Library') %]" path='circ_lib.shortname'></eg-grid-field>
index 5db43ef..684cf3d 100644 (file)
@@ -353,7 +353,7 @@ table.list tr.selected td { /* deprecated? */
   color: #FFF;
   background-color: #EB0000 !important;
 }
-.overdue-row a:link, .lost-row a:link {
+.overdue-row a:link, .overdue-row a:visited, .lost-row a:link, .lost-row a:visited {
   color: #B8ECFF;
 }
 
index b17702f..522a08d 100644 (file)
@@ -89,6 +89,15 @@ function($scope , $q , $routeParams , $timeout , egCore , egUser , patronSvc ,
         // noncat_list always involves instantiating a new grid.
     }
 
+    $scope.colorizeItemsOutList = {
+        apply: function(item) {
+            var duedate = item.due_date();
+            if (duedate && duedate < new Date().toISOString()) {
+                return 'overdue-row';
+            }
+        }
+    }
+
     // Reload the user to pick up changes in items out, fines, etc.
     // Reload circs since the contents of the main vs. alt list may
     // have changed.