From 0d9aecd956398a24c0863ff039e57881080cb5d3 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 15 May 2014 20:23:51 -0400 Subject: [PATCH] item status UI continued Signed-off-by: Bill Erickson --- Open-ILS/src/templates/staff/cat/item/index.tt2 | 4 +- .../src/templates/staff/cat/item/t_circs_pane.tt2 | 243 ++++++++++----------- .../src/templates/staff/cat/item/t_holds_pane.tt2 | 126 ++++++++++- Open-ILS/web/js/ui/default/staff/cat/item/app.js | 66 +++++- 4 files changed, 302 insertions(+), 137 deletions(-) diff --git a/Open-ILS/src/templates/staff/cat/item/index.tt2 b/Open-ILS/src/templates/staff/cat/item/index.tt2 index 9e1a5408de..0ad87d7b38 100644 --- a/Open-ILS/src/templates/staff/cat/item/index.tt2 +++ b/Open-ILS/src/templates/staff/cat/item/index.tt2 @@ -16,9 +16,7 @@ /* FIXME: MOVE ME */ #item-status-barcode {width: 16em;} #item-status-form { - padding-bottom: 10px; - margin-bottom: 10px; - /*border-bottom: 1px solid #CCC; */ + margin-bottom: 20px; } diff --git a/Open-ILS/src/templates/staff/cat/item/t_circs_pane.tt2 b/Open-ILS/src/templates/staff/cat/item/t_circs_pane.tt2 index c61397bb01..bfad35b600 100644 --- a/Open-ILS/src/templates/staff/cat/item/t_circs_pane.tt2 +++ b/Open-ILS/src/templates/staff/cat/item/t_circs_pane.tt2 @@ -1,149 +1,146 @@
- -
-
- [% l('Previous Circ Group') %] -
-
- [% l('Most Recent Circ Group') %] -
+
+
+ [% l('Previous Circ Group') %]
- - -
-
[% l('Total Circs') %]
-
- {{prev_circ_summary.num_circs()}} -
-
[% l('Total Circs') %]
-
- {{circ_summary.num_circs()}} -
+
+
[% l('Patron') %]
+ - -
-
[% l('Checkout Date') %]
-
- {{prev_circ_summary.start_time() | date:'short'}} -
-
[% l('Checkout Date') %]
-
- {{circ.xact_start() | date:'short'}} -
+
[% l('Patron') %]
+ +
-
-
[% l('Checkout Workstation') %]
-
- {{prev_circ_summary.checkout_workstation()}} -
-
[% l('Checkout Workstation') %]
-
- {{circ.workstation().name()}} -
+
+
[% l('Total Circs') %]
+
+ {{prev_circ_summary.num_circs()}} +
+
[% l('Total Circs') %]
+
+ {{circ_summary.num_circs()}}
+
-
-
[% l('Last Renewed On') %]
-
- {{prev_circ_summary.last_renewal_time() | date:'short'}} -
-
[% l('Last Renewed On') %]
-
- {{circ_summary.last_renewal_time() | date:'short'}} -
+
+
[% l('Checkout Date') %]
+
+ {{prev_circ_summary.start_time() | date:'short'}}
+
[% l('Checkout Date') %]
+
+ {{circ.xact_start() | date:'short'}} +
+
-
-
[% l('Renewal Workstation') %]
-
- {{prev_circ_summary.last_renewal_workstation()}} -
-
[% l('Renewal Workstation') %]
-
- {{circ_summary.last_renewal_workstation()}} -
+
+
[% l('Checkout Workstation') %]
+
+ {{prev_circ_summary.checkout_workstation()}} +
+
[% l('Checkout Workstation') %]
+
+ {{circ.workstation().name()}}
+
-
-
[% l('Stop Fines Reason') %]
-
- {{prev_circ_summary.last_stop_fines()}} -
-
[% l('Stop Fines Reason') %]
-
- {{circ.stop_fines()}} -
+
+
[% l('Last Renewed On') %]
+
+ {{prev_circ_summary.last_renewal_time() | date:'short'}}
+
[% l('Last Renewed On') %]
+
+ {{circ_summary.last_renewal_time() | date:'short'}} +
+
-
-
[% l('Stop Fines Time') %]
-
- {{prev_circ_summary.last_stop_fines_time() | date:'short'}} -
-
[% l('Stop Fines Time') %]
-
- {{circ.stop_fines_time() | date:'short'}} -
+
+
[% l('Renewal Workstation') %]
+
+ {{prev_circ_summary.last_renewal_workstation()}} +
+
[% l('Renewal Workstation') %]
+
+ {{circ_summary.last_renewal_workstation()}}
+
-
-
[% l('Checkin Time') %]
-
- {{prev_circ_summary.last_checkin_time() | date:'short'}} -
-
[% l('Checkin Time') %]
-
- {{circ.checkin_time() | date:'short'}} -
+
+
[% l('Stop Fines Reason') %]
+
+ {{prev_circ_summary.last_stop_fines()}}
+
[% l('Stop Fines Reason') %]
+
+ {{circ.stop_fines()}} +
+
-
-
[% l('Checkin Scan Time') %]
-
- {{prev_circ_summary.last_checkin_scan_time() | date:'short'}} -
-
[% l('Checkin Scan Time') %]
-
- {{circ.checkin_scan_time() | date:'short'}} -
+
+
[% l('Stop Fines Time') %]
+
+ {{prev_circ_summary.last_stop_fines_time() | date:'short'}} +
+
[% l('Stop Fines Time') %]
+
+ {{circ.stop_fines_time() | date:'short'}}
+
-
-
[% l('Checkin Workstation') %]
-
- {{prev_circ_summary.last_checkin_workstation()}} -
-
[% l('Checkin Workstation') %]
-
- {{circ.checkin_workstation.name()}} -
+
+
[% l('Checkin Time') %]
+
+ {{prev_circ_summary.last_checkin_time() | date:'short'}}
+
[% l('Checkin Time') %]
+
+ {{circ.checkin_time() | date:'short'}} +
+
+
+
[% l('Checkin Scan Time') %]
+
+ {{prev_circ_summary.last_checkin_scan_time() | date:'short'}} +
+
[% l('Checkin Scan Time') %]
+
+ {{circ.checkin_scan_time() | date:'short'}} +
+
+
+
[% l('Checkin Workstation') %]
+
+ {{prev_circ_summary.last_checkin_workstation()}} +
+
[% l('Checkin Workstation') %]
+
+ {{circ.checkin_workstation.name()}} +
+
diff --git a/Open-ILS/src/templates/staff/cat/item/t_holds_pane.tt2 b/Open-ILS/src/templates/staff/cat/item/t_holds_pane.tt2 index f4cbcacaca..a5f7e507b6 100644 --- a/Open-ILS/src/templates/staff/cat/item/t_holds_pane.tt2 +++ b/Open-ILS/src/templates/staff/cat/item/t_holds_pane.tt2 @@ -1 +1,125 @@ -

summary

+
+
+ [% l('Item is not captured for a hold') %] +
+
+
+
+
+ [% l('Captured Hold Info') %] +
+
+ + +
+
[% l('Pickup Lib') %]
+
+ {{hold.pickup_lib().shortname()}} +
+
+
+
[% l('Current Shelf Lib') %]
+
+ {{hold.current_shelf_lib().shortname()}} +
+
+
+
[% l('Request Date') %]
+
+ {{hold.request_time() | date:'short'}} +
+
+
+
[% l('Capture Date') %]
+
+ {{hold.capture_time() | date:'short'}} +
+
+
+
[% l('Shelf Time') %]
+
+ {{hold.shelf_time() | date:'short'}} +
+
+
+
[% l('Shelf Expire Time') %]
+
+ {{hold.shelf_expire_time() | date:'short'}} +
+
+
+
[% l('Hold Expire Time') %]
+
+ {{hold.expire_time() | date:'short'}} +
+
+
+
[% l('Behind Desk') %]
+
+ {{hold.behind_desk()}} +
+
+
+ +
+
+ [% l('Item has not transited') %] +
+
+ +
+
+
+ [% l('Most Recent Transit') %] +
+
+
+
[% l('Transit Source') %]
+
+ {{transit.source().shortname()}} +
+
+
+
[% l('Transit Destination') %]
+
+ {{transit.dest().shortname()}} +
+
+
+
[% l('Transit Send Time') %]
+
+ {{transit.source_send_time() | date:'short'}} +
+
+
+
[% l('Transit Receive Time') %]
+
+ {{transit.source_recv_time() | date:'short'}} +
+
+
+ diff --git a/Open-ILS/web/js/ui/default/staff/cat/item/app.js b/Open-ILS/web/js/ui/default/staff/cat/item/app.js index 065215848d..b229f78c92 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/item/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/item/app.js @@ -207,9 +207,7 @@ function($scope , $location , $routeParams , egCore , itemSvc) { limit : 1 } - ).then(function(circ) { - if (!circ) return; - + ).then(null, null, function(circ) { $scope.circ = circ; // load the chain for this circ @@ -228,14 +226,16 @@ function($scope , $location , $routeParams , egCore , itemSvc) { 'open-ils.circ', 'open-ils.circ.prev_renewal_chain.retrieve_by_circ.summary', egCore.auth.token(), $scope.circ.id() - ).then(function(summary) { + + ).then(null, null, function(summary) { $scope.prev_circ_summary = summary.summary; - return summary.usr; - }).then(function(user_id) { - return egCore.pcrud.retrieve('au', user_id, - {flesh : 1, flesh_fields : {au : ['card']}}); - }).then(function(user) { - $scope.prev_circ_usr = user; + + egCore.pcrud.retrieve('au', summary.usr, + {flesh : 1, flesh_fields : {au : ['card']}}) + + .then(function(user) { + $scope.prev_circ_usr = user; + }); }); }); } @@ -274,6 +274,47 @@ function($scope , $location , $routeParams , egCore , itemSvc) { }); } + function loadHolds() { + delete $scope.hold; + + egCore.pcrud.search('ahr', + { current_copy : copyId, + cancel_time : null, + fulfillment_time : null, + capture_time : {'<>' : null} + }, { + flesh : 2, + flesh_fields : { + ahr : ['requestor', 'usr'], + au : ['card'] + } + } + ).then(null, null, function(hold) { + $scope.hold = hold; + hold.pickup_lib(egCore.org.get(hold.pickup_lib())); + if (hold.current_shelf_lib()) { + hold.current_shelf_lib( + egCore.org.get(hold.current_shelf_lib())); + } + hold.behind_desk(Boolean(hold.behind_desk() == 't')); + }); + } + + function loadTransits() { + delete $scope.transit; + delete $scope.hold_transit; + + egCore.pcrud.search('atc', + {target_copy : copyId}, + {order_by : {atc : 'source_send_time DESC'}} + + ).then(null, null, function(transit) { + $scope.transit = transit; + transit.source(egCore.org.get(transit.source())); + transit.dest(egCore.org.get(transit.dest())); + }) + } + // we don't need all data on all tabs, so fetch what's needed when needed. function loadTabData() { @@ -286,6 +327,11 @@ function($scope , $location , $routeParams , egCore , itemSvc) { case 'circs': loadCurrentCirc(true); break; + + case 'holds': + loadHolds() + loadTransits(); + break; } } -- 2.11.0