[open-ils-commits] [GIT] Evergreen ILS branch master updated. 473688892df7ee175d44930c5cea438d44d01992

Evergreen Git git at git.evergreen-ils.org
Fri Feb 21 15:34:14 EST 2020


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  473688892df7ee175d44930c5cea438d44d01992 (commit)
       via  2800d58f7e37181355050f042f221fb65f2c4829 (commit)
      from  4d1cb47c383e1686f4b2a55c1f3e906db1d8c4a4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 473688892df7ee175d44930c5cea438d44d01992
Author: Jane Sandberg <sandbej at linnbenton.edu>
Date:   Wed Feb 5 19:44:52 2020 -0800

    LP#1845706 (follow-up): Fix callback
    
    Signed-off-by: Jane Sandberg <sandbej at linnbenton.edu>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Dawn Dale <ddale at georgialibraries.org>

diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js b/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js
index a10874e5cc..26341c1844 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js
@@ -424,7 +424,7 @@ function($scope , $q , $routeParams , $timeout , egCore , egUser , patronSvc ,
                 id: circ.target_copy().id(),
                 barcode: circ.target_copy().barcode(),
                 circ_lib: circ.target_copy().circ_lib().id()
-            }).then($timeout(reset_page,1000)) // reset after each, because rejecting one stops the $q.all() chain
+            }).then(() => $timeout(reset_page,1000)) // reset after each, because rejecting one stops the $q.all() chain
         });
     }
     $scope.mark_missing = function(items) {

commit 2800d58f7e37181355050f042f221fb65f2c4829
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Aug 21 11:41:29 2019 -0400

    LP#1845706: Missing/Damaged from Items Out
    
    Marking items Missing or Damaged from the patron Items Out interface
    is sometimes necessary.  This commit adds that ability.
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Jane Sandberg <sandbej at linnbenton.edu>
    Signed-off-by: Dawn Dale <ddale at georgialibraries.org>

diff --git a/Open-ILS/src/templates/staff/circ/patron/t_items_out.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_items_out.tt2
index 8dc89022e1..b7857aa151 100644
--- a/Open-ILS/src/templates/staff/circ/patron/t_items_out.tt2
+++ b/Open-ILS/src/templates/staff/circ/patron/t_items_out.tt2
@@ -55,6 +55,10 @@
     label="[% l('Print Item Receipt') %]"></eg-grid-action>
   <eg-grid-action handler="edit_due_date"
     label="[% l('Edit Due Date') %]"></eg-grid-action>
+  <eg-grid-action handler="mark_damaged"
+    label="[% l('Mark Damaged') %]"></eg-grid-action>
+  <eg-grid-action handler="mark_missing"
+    label="[% l('Mark Missing') %]"></eg-grid-action>
   <eg-grid-action handler="mark_lost"
     label="[% l('Mark Lost (By Patron)') %]"></eg-grid-action>
   <eg-grid-action handler="mark_claims_returned"
diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js b/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js
index 96cc65cd6b..a10874e5cc 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js
@@ -404,12 +404,32 @@ function($scope , $q , $routeParams , $timeout , egCore , egUser , patronSvc ,
         });
     }
 
+    function batch_action_with_flat_copies(items, action) {
+        if (!items.length) return;
+        var copies = items.map(function(circ) 
+            { return egCore.idl.toHash(circ.target_copy()) });
+        action(copies).then(reset_page);
+    }
     function batch_action_with_barcodes(items, action) {
         if (!items.length) return;
         var barcodes = items.map(function(circ) 
             { return circ.target_copy().barcode() });
         action(barcodes).then(reset_page);
     }
+    $scope.mark_damaged = function(items) {
+        if (items.length == 0) return;
+
+        angular.forEach(items, function(circ) {
+            egCirc.mark_damaged({
+                id: circ.target_copy().id(),
+                barcode: circ.target_copy().barcode(),
+                circ_lib: circ.target_copy().circ_lib().id()
+            }).then($timeout(reset_page,1000)) // reset after each, because rejecting one stops the $q.all() chain
+        });
+    }
+    $scope.mark_missing = function(items) {
+        batch_action_with_flat_copies(items, egCirc.mark_missing);
+    }
     $scope.mark_lost = function(items) {
         batch_action_with_barcodes(items, egCirc.mark_lost);
     }

-----------------------------------------------------------------------

Summary of changes:
 .../src/templates/staff/circ/patron/t_items_out.tt2  |  4 ++++
 .../web/js/ui/default/staff/circ/patron/items_out.js | 20 ++++++++++++++++++++
 2 files changed, 24 insertions(+)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list