FF field additions and repairs
authorBill Erickson <berick@esilibrary.com>
Thu, 5 Dec 2013 14:46:15 +0000 (09:46 -0500)
committerBill Erickson <berick@esilibrary.com>
Thu, 5 Dec 2013 14:46:15 +0000 (09:46 -0500)
* repair checkout (mis-named patron_id field)
* add shelf expire time to on-shelf and item status display
* default to short date format

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/templates/staff/fulfillment/t_item_table.tt2
Open-ILS/src/templates/staff/fulfillment/t_status.tt2
Open-ILS/web/js/ui/default/staff/fulfillment/app.js

index 481c5d1..30fb2f6 100644 (file)
 # the data between the template and the JS env.
 COLUMNS = [
     {name => 'index', label => l('#'), extra => ' + 1'},
-    {name => 'hold_id', label => l('Request ID'), tabs => 'tab_pending'},
+    {name => 'hold_id', label => l('Request ID'), tabs => 'tab_pending || tab_onshelf'},
     {name => 'transit_id', label => l('Transit ID'), tabs => 'tab_inbound || tab_outbound'},
     {name => 'circ_id', label => l('Circ ID'), tabs => 'tab_circulating'},
     {name => 'copy_barcode', label => l('Item Barcode')},
     {name => 'copy_circ_lib', label => l('Copy Library')},
-    {name => 'request_time', label => l('Request Date'), tabs => 'tab_pending', extra => '| date'},
-    {name => 'expire_time', label => l('Expire Date'), tabs => 'tab_pending', extra => '| date'},
+    {name => 'request_time', label => l('Request Date'), tabs => 'tab_pending', extra => "| date:'shortDate'"},
+    {name => 'expire_time', label => l('Expire Date'), tabs => 'tab_pending', extra => "| date:'shortDate'"},
     {name => 'hold_request_lib', label => l('Requesting Library'), tabs => 'tab_pending'},
     {name => 'hold_pickup_lib', label => l('Pickup Library'), tabs => 'tab_pending'}
-    {name => 'transit_time', label => l('Transit Date'), tabs => 'tab_inbound || tab_outbound', extra => '| date'},
+    {name => 'transit_time', label => l('Transit Date'), tabs => 'tab_inbound || tab_outbound', extra => "| date:'shortDate'"},
     {name => 'transit_source', label => l('Transit Source'), tabs => 'tab_inbound || tab_outbound'},
     {name => 'transit_dest', label => l('Transit Destination'), tabs => 'tab_inbound || tab_outbound'},
-    {name => 'hold_shelf_time', label => l('Shelf Date'), tabs => 'tab_onshelf', extra => '| date'},
+    {name => 'hold_shelf_time', label => l('Shelf Date'), tabs => 'tab_onshelf', extra => "| date:'shortDate'"},
+    {name => 'hold_shelf_expire_time', label => l('Shelf Expire Date'), tabs => 'tab_onshelf', extra => "| date:'shortDate'"},
     {name => 'patron_given_name', label => l('Patron First'), tabs => 'tab_circulating || tab_onshelf'},
     {name => 'patron_family_name', label => l('Patron Last'), tabs => 'tab_circulating || tab_onshelf'},
     {name => 'patron_barcode', label => l('Patron Barcode'), tabs => 'tab_circulating || tab_onshelf'},
-    {name => 'xact_start', label => l('Checkout Date'), tabs => 'tab_circulating', extra => '| date'},
-    {name => 'due_date',  label => l('Due Date'), tabs => 'tab_circulating', extra => '| date'},
+    {name => 'xact_start', label => l('Checkout Date'), tabs => 'tab_circulating', extra => "| date:'shortDate'"},
+    {name => 'due_date',  label => l('Due Date'), tabs => 'tab_circulating', extra => "| date:'shortDate'"},
     {name => 'circ_circ_lib', label => l('Circulating Library'), tabs => 'tab_circulating'},
     {name => 'title', label => l('Title')}
 ];
index be15b7b..75d68e8 100644 (file)
         <tbody>
           <tr ng-show='item.circ'><td>Circulating Library:</td><td>{{item.circ_circ_lib}}</td></tr>
           <tr ng-show='item.circ'><td>Circulating Patron:</td><td>{{item.patron_name}}</td></tr>
-          <tr ng-show='item.circ'><td>Checkout date:</td><td>{{item.circ_xact_start | date}}</td></tr>
-          <tr ng-show='item.circ'><td>Due Date:</td><td>{{item.due_date | date}}</td></tr>
+          <tr ng-show='item.circ'><td>Checkout date:</td><td>{{item.circ_xact_start | date:'shortDate'}}</td></tr>
+          <tr ng-show='item.circ'><td>Due Date:</td><td>{{item.due_date | date:'shortDate'}}</td></tr>
           <tr ng-show='item.circ_stop_fines'><td>Circ Status:</td>
             <td><span class="label label-warning">{{item.circ_stop_fines}}</span></td>
           </tr>
           <tr ng-show='item.hold'><td>Requesting Patron:</td><td>{{item.patron_name}}</td></tr>
           <tr ng-show='item.hold'><td>Requesting Library:</td><td>{{item.hold_request_lib}}</td></tr>
           <tr ng-show='item.hold'><td>Pickup Library:</td><td>{{item.hold_pickup_lib}}</td></tr>
-          <tr ng-show='item.hold'><td>Request Date:</td><td>{{item.hold_request_time | date}}</td></tr>
-          <tr ng-show='item.hold'><td>Capture Date:</td><td>{{item.hold_capture_time | date}}</td></tr>
+          <tr ng-show='item.hold'><td>Request Date:</td><td>{{item.hold_request_time | date:'shortDate'}}</td></tr>
+          <tr ng-show='item.hold'><td>Capture Date:</td><td>{{item.hold_capture_time | date:'shortDate'}}</td></tr>
           <tr ng-show='item.hold_cancel_time'>
               <td>Hold Cancel Date:</td>
-              <td><span class="label label-warning">{{item.hold_cancel_time | date}}</span></td>
+              <td><span class="label label-warning">{{item.hold_cancel_time | date:'shortDate'}}</span></td>
           </tr>
           <tr ng-show='item.hold_cancel_cause'>
               <td>Hold Cancel Reason:</td>
               <td><span class="label label-warning">{{item.hold_cancel_cause}}</span></td>
           </tr>
+          <tr ng-show='item.hold_shelf_time'>
+              <td>[% l('Hold Shelf Date:') %]</td>
+              <td>{{item.hold_shelf_time | date:'shortDate'}}</td>
+          </tr>
+          <tr ng-show='item.hold_shelf_expire_time'>
+              <td>[% l('Hold Shelf Expire Time:') %]</td>
+              <td>{{item.hold_shelf_expire_time | date:'shortDate'}}</td>
+          </tr>
           <tr ng-show='item.transit'><td>Transit Source:</td><td>{{item.transit_source}}</td></tr>
           <tr ng-show='item.transit'><td>Transit Destination:</td><td>{{item.transit_dest}}</td></tr>
-          <tr ng-show='item.transit'><td>Transit Send Date:</td><td>{{item.transit_time | date}}</td></tr>
-          <tr ng-show='item.transit'><td>Transit Receive Date:</td><td>{{item.transit_recv_time | date}}</td></tr>
+          <tr ng-show='item.transit'><td>Transit Send Date:</td><td>{{item.transit_time | date:'shortDate'}}</td></tr>
+          <tr ng-show='item.transit'><td>Transit Receive Date:</td><td>{{item.transit_recv_time | date:'shortDate'}}</td></tr>
         </tbody>
       </table>
     </div>
index 45467e4..e784c78 100644 (file)
@@ -171,6 +171,8 @@ function ($scope,  $q,  $compile,  $timeout,  $rootScope, $location,
             patron_family_name : 'usr.family_name',
             hold_request_lib : 'request_lib.shortname',
             hold_pickup_lib : 'pickup_lib.shortname',
+            hold_shelf_time : 'shelf_time',
+            hold_shelf_expire_time : 'shelf_expire_time',
             title : 'bib_rec.bib_record.simple_record.title',
             author : 'bib_rec.bib_record.simple_record.author',
             copy_id : 'current_copy.id',
@@ -319,7 +321,7 @@ function ($scope,  $q,  $compile,  $timeout,  $rootScope, $location,
             'open-ils.circ.checkout.full.override',
             egAuth.token(), {
                 circ_lib : orgSelector.current().id(),
-                patron_id : item.user_id,
+                patron_id : item.patron_id,
                 copy_id: item.copy_id,
                 ff_action: item.next_action
             }
@@ -745,6 +747,7 @@ function ($scope,  $q,  $route,  $location,  egPCRUD,  orgSelector,  egNet,  egA
             item.circ_xact_start = circ.xact_start();
             item.circ_stop_fines = circ.stop_fines();
             // FF patrons will all have cards, but some test logins may not
+            item.patron_id = circ.usr().id();
             item.patron_card = circ.usr().card() ? 
                 circ.usr().card().barcode() : circ.usr().usrname();
             item.patron_name = circ.usr().first_given_name() + ' ' + circ.usr().family_name() // i18n
@@ -753,6 +756,7 @@ function ($scope,  $q,  $route,  $location,  egPCRUD,  orgSelector,  egNet,  egA
 
         if (hold) {
             item.hold = hold;
+            item.patron_id = hold.usr().id();
             item.patron_card = hold.usr().card() ? 
                 hold.usr().card().barcode() : hold.usr().usrname();
             item.patron_name = hold.usr().first_given_name() + ' ' + hold.usr().family_name() // i18n
@@ -761,6 +765,7 @@ function ($scope,  $q,  $route,  $location,  egPCRUD,  orgSelector,  egNet,  egA
             item.hold_request_time = hold.request_time();
             item.hold_capture_time = hold.capture_time();
             item.hold_shelf_time = hold.shelf_time();
+            item.hold_shelf_expire_time = hold.shelf_expire_time();
             if (hold.cancel_time()) {
                 item.hold_cancel_time = hold.cancel_time();
                 if (hold.cancel_cause()) {