LP1898114: Add org selector to holds pull list
authorJane Sandberg <sandbej@linnbenton.edu>
Wed, 17 Mar 2021 02:37:00 +0000 (19:37 -0700)
committerGalen Charlton <gmc@equinoxOLI.org>
Wed, 26 May 2021 19:49:32 +0000 (15:49 -0400)
To test:
1) Go to the Holds Pull List
2) Try looking at the hold lists for all libraries where
you have the VIEW_HOLD permission.

Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Jennifer Bruch <jbruch@sparkpa.org>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/templates/staff/circ/holds/t_pull_list.tt2
Open-ILS/web/js/ui/default/staff/circ/holds/app.js
docs/RELEASE_NOTES_NEXT/Circulation/holds_pull_list_selector.adoc [new file with mode: 0644]

index eda5f05..0245a4e 100644 (file)
@@ -1,3 +1,13 @@
+<div class="row">
+  <div class="col-md-4">
+    <div class="form-group">
+      <label>[% l('View pull list for: ') %]&nbsp; </label>
+      <eg-org-selector id="org_unit" selected="org_unit"
+        onchange="update_org_unit" disable-test="cant_have_volumes">
+      </eg-org-selector>
+    </div>
+  </div>
+</div>
 <eg-grid
   id-field="id"
   idl-class="ahopl"
index 08701c2..9f4e1ce 100644 (file)
@@ -334,10 +334,14 @@ function($scope , $q , $routeParams , $window , $location , egCore ,
 
     egCore.strings.setPageTitle(egCore.strings['PULL_LIST_TITLE']);
 
+    function current_query() {
+        var org_id = $scope.org_unit ? $scope.org_unit.id() :
+            egCore.auth.user().ws_ou();
+        return {'copy_circ_lib_id' : org_id};
+    }
+
     $scope.gridControls = {
-        setQuery : function() {
-            return {'copy_circ_lib_id' : egCore.auth.user().ws_ou()}
-        },
+        setQuery : current_query,
         setSort : function() {
             return ['copy_location_order_position','call_number_sort_key']
         },
@@ -471,5 +475,14 @@ function($scope , $q , $routeParams , $window , $location , egCore ,
         ).finally(egProgressDialog.close);
     }
 
+    $scope.update_org_unit = function (org) {
+        $scope.org_unit = org;
+        $scope.gridControls.setQuery(current_query());
+        $scope.gridControls.refresh();
+    };
+
+    $scope.cant_have_volumes =
+        function (id) { return !egCore.org.CanHaveVolumes(id); };
+
 }])
 
diff --git a/docs/RELEASE_NOTES_NEXT/Circulation/holds_pull_list_selector.adoc b/docs/RELEASE_NOTES_NEXT/Circulation/holds_pull_list_selector.adoc
new file mode 100644 (file)
index 0000000..489e270
--- /dev/null
@@ -0,0 +1,7 @@
+Library selector on the holds pull list
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The holds pull list screen now includes a library/org unit selector.
+This allows staff to view the pull list of any library where they have
+VIEW_HOLDS permissions, rather than having to log in to a workstation
+at that library.