LP#1684202 - fix holdings grid refresh... bre_id array always be integers
authorCesar Velez <cesar.velez@equinoxinitiative.org>
Wed, 7 Nov 2018 16:09:10 +0000 (11:09 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Tue, 13 Nov 2018 14:36:42 +0000 (09:36 -0500)
For some strange reason the volcopy bchannel event data.records
would be an array of string integers or a array of ints depending
on whether you're adding or editing holdings. This addresses that
weirdness.

Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>

Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js

index c7150a2..406c0c0 100644 (file)
@@ -1992,7 +1992,7 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
                         $timeout(function(){
                             if (typeof BroadcastChannel != 'undefined') {
                                 var bChannel = new BroadcastChannel("eg.holdings.update");
-                                var bre_ids = cnList && cnList.length > 0 ? cnList.map(function(cn){ return cn.record() }) : [];
+                                var bre_ids = cnList && cnList.length > 0 ? cnList.map(function(cn){ return Number(cn.record()) }) : [];
                                 var cn_ids = cnList && cnList.length > 0 ? cnList.map(function(cn){ return cn.id() }) : [];
                                 bChannel.postMessage({
                                     copies : copy_ids,