LP#1818576 Offline Noncataloged Checkout Preview
authorTerran McCanna <tmccanna@georgialibraries.org>
Tue, 5 Mar 2019 17:34:49 +0000 (12:34 -0500)
committerBill Erickson <berickxx@gmail.com>
Fri, 8 Mar 2019 16:04:51 +0000 (11:04 -0500)
This adds the noncataloged type and number to the right-hand
preview when doing an offline checkout. (Prior to this, the
display was blank if there was no barcode.)

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Garry Collum <gcollum@gmail.com>
Signed-off-by: Bill Erickson <berickxx@gmail.com>

Open-ILS/src/templates/staff/offline-interface.tt2
Open-ILS/web/js/ui/default/staff/offline.js

index fafc74e..dc7b56b 100644 (file)
               <tbody>
                 <tr ng-repeat="xact in xact_page.checkout track by $index">
                   <td>{{xact.patron_barcode}}</td>
-                  <td>{{xact.barcode}}</td>
+                  <td>
+                      <div ng-if="xact.barcode">{{xact.barcode}}</div>
+                      <div ng-if="!xact.barcode">{{lookupNoncatTypeName(xact.noncat_type)}} ({{xact.noncat_count}})</div>
+                  </td>
                   <td>{{xact.due_date | date:'shortDate'}}</td>
                 </tr>
               </tbody>
index 7ab361f..7d80de6 100644 (file)
@@ -330,6 +330,12 @@ function($routeProvider , $locationProvider , $compileProvider) {
             egCore.hatch.setItem('eg.offline.print_receipt', $scope.do_print)
         }
 
+        $scope.lookupNoncatTypeName = function (type) {
+            var nc =  $scope.noncats.filter(function(n){ return n.id() == type })[0];
+            if (nc) return nc.name();
+            return '';
+        }
+
         $scope.logged_in = egCore.auth.token() ? true : false;