From 9edca8e80a71a7937a2aa124563abd4c95100671 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 28 Oct 2013 17:26:03 -0400 Subject: [PATCH] ff ui : on-shelf tab; push status tab right Signed-off-by: Bill Erickson --- Open-ILS/src/templates/staff/fulfillment/t_ill.tt2 | 9 +++- .../templates/staff/fulfillment/t_item_table.tt2 | 4 ++ .../src/templates/staff/fulfillment/t_onshelf.tt2 | 22 ++++++++ .../web/js/ui/default/staff/fulfillment/app.js | 61 +++++++++++++++++++++- 4 files changed, 93 insertions(+), 3 deletions(-) create mode 100644 Open-ILS/src/templates/staff/fulfillment/t_onshelf.tt2 diff --git a/Open-ILS/src/templates/staff/fulfillment/t_ill.tt2 b/Open-ILS/src/templates/staff/fulfillment/t_ill.tt2 index 44bbdcc40c..266887de55 100644 --- a/Open-ILS/src/templates/staff/fulfillment/t_ill.tt2 +++ b/Open-ILS/src/templates/staff/fulfillment/t_ill.tt2 @@ -6,9 +6,11 @@
  • [% l('Outbound Transits') %]
  • +
  • + [% l('On Shelf') %]
  • [% l('Currently Circulating') %]
  • -
  • +
  • [% l('Item Status') %]
  • @@ -27,6 +29,11 @@
    +
    +
    +
    +
    +
    diff --git a/Open-ILS/src/templates/staff/fulfillment/t_item_table.tt2 b/Open-ILS/src/templates/staff/fulfillment/t_item_table.tt2 index db74bf2fa7..c457a59b37 100644 --- a/Open-ILS/src/templates/staff/fulfillment/t_item_table.tt2 +++ b/Open-ILS/src/templates/staff/fulfillment/t_item_table.tt2 @@ -17,6 +17,9 @@ [% l('Transit Source') %] [% l('Transit Destination') %] + + [% l('Shelf Date') %] + [% l('Checkout Date') %] [% l('Due Date') %] @@ -39,6 +42,7 @@ {{item.transit_time | date}} {{item.transit_source}} {{item.transit_dest}} + {{item.hold_shelf_time | date}} {{item.circ_xact_start | date}} {{item.due_date | date}} {{item.circ_circ_lib}} diff --git a/Open-ILS/src/templates/staff/fulfillment/t_onshelf.tt2 b/Open-ILS/src/templates/staff/fulfillment/t_onshelf.tt2 new file mode 100644 index 0000000000..63fe41c06a --- /dev/null +++ b/Open-ILS/src/templates/staff/fulfillment/t_onshelf.tt2 @@ -0,0 +1,22 @@ +
    +
    +
    + +
    +
    +
    +
    + +
    + +
    +
    diff --git a/Open-ILS/web/js/ui/default/staff/fulfillment/app.js b/Open-ILS/web/js/ui/default/staff/fulfillment/app.js index d77093349a..57f3d024eb 100644 --- a/Open-ILS/web/js/ui/default/staff/fulfillment/app.js +++ b/Open-ILS/web/js/ui/default/staff/fulfillment/app.js @@ -283,6 +283,7 @@ function ($scope, $q, $compile, $timeout, $rootScope, $location, item.hold_pickup_lib = egOrg.get(hold.pickup_lib()).shortname(); item.hold_request_time = hold.request_time(); item.hold_capture_time = hold.capture_time(); + item.hold_shelf_time = hold.shelf_time(); if (hold.cancel_time()) { item.hold_cancel_time = hold.cancel_time(); if (hold.cancel_cause()) { @@ -536,7 +537,6 @@ function ($scope, $q, $compile, $timeout, $rootScope, $location, function ($scope, $q, egPCRUD, orgSelector) { $scope.setCollector(function() { - var deferred = $q.defer(); $scope.itemList.items = []; var fullPath = orgSelector.relatedOrgs(); @@ -587,12 +587,69 @@ function ($scope, $q, egPCRUD, orgSelector) { return $scope.collector(); }]) +.controller('OnShelfCtrl', + ['$scope','$q','egPCRUD','orgSelector', +function ($scope, $q, egPCRUD, orgSelector) { + + $scope.setCollector(function() { + $scope.itemList.items = []; + + var fullPath = orgSelector.relatedOrgs(); + + var copy_lib = {'not in' : fullPath}; // not our copy + var shelf_lib = fullPath; // on our shelf + + if ($scope.orientation_lender) { + shelf_lib = {'not in' : fullPath}; + copy_lib = fullPath; + } + + var query = { + frozen : 'f', + cancel_time : null, + fulfillment_time : null, + shelf_time : {'!=' : null}, + current_shelf_lib : shelf_lib, + current_copy : { + 'in' : { + select: {acp : ['id']}, + from : 'acp', + where : { + deleted : 'f', + id : {'=' : {'+ahr' : 'current_copy'}}, + circ_lib : copy_lib, + status : 8 // On Holds Shelf + } + } + } + }; + + return egPCRUD.search('ahr', query, + { limit : $scope.itemList.limit, + offset : $scope.itemList.offset, + flesh : 1, + flesh_fields : {ahr : ['current_copy']}, + order_by : {ahr : 'request_time, id'} + }, {atomic : true} + ).then(function(holds) { + angular.forEach(holds, function(hold) { + $scope.itemList.addItem( + {barcode : hold.current_copy().barcode()}); + }); + }); + }); + + // outbound tab defaults to lender view + return $scope.collector(); +}]) + + + .controller('CircCtrl', ['$scope','$q','egPCRUD','orgSelector', function ($scope, $q, egPCRUD, orgSelector) { $scope.setCollector(function() { - var deferred = $q.defer(); $scope.itemList.items = []; var fullPath = orgSelector.relatedOrgs(); -- 2.11.0