webstaff: Use the record id to fetch the summary record data in item status
authorMike Rylander <mrylander@gmail.com>
Thu, 22 Oct 2015 20:03:26 +0000 (16:03 -0400)
committerKathy Lussier <klussier@masslnc.org>
Tue, 2 Feb 2016 19:58:53 +0000 (14:58 -0500)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>

Open-ILS/src/templates/staff/cat/item/t_view.tt2
Open-ILS/web/js/ui/default/staff/cat/item/app.js

index 82920b4..1859865 100644 (file)
@@ -1,4 +1,4 @@
-<eg-record-summary record="summaryRecord"></eg-record-summary>
+<eg-record-summary record-id="recordId" record="summaryRecord"></eg-record-summary>
 
 <!-- tabbed copy data view -->
 
index aafea2e..b3ba37b 100644 (file)
@@ -242,6 +242,7 @@ function($scope , $q , $location , $routeParams , $timeout , $window , egCore ,
     var copyId = $routeParams.id;
     $scope.tab = $routeParams.tab || 'summary';
     $scope.context.page = 'detail';
+    $scope.summaryRecord = null;
 
     $scope.edit = false;
     if ($scope.tab == 'edit') {
@@ -252,7 +253,7 @@ function($scope , $q , $location , $routeParams , $timeout , $window , egCore ,
 
     // use the cached record info
     if (itemSvc.copy)
-        $scope.summaryRecord = itemSvc.copy.call_number().record();
+        $scope.recordId = itemSvc.copy.call_number().record().id();
 
     function loadCopy(barcode) {
         $scope.context.itemNotFound = false;
@@ -289,7 +290,6 @@ function($scope , $q , $location , $routeParams , $timeout , $window , egCore ,
 
             $scope.copy = copy;
             $scope.recordId = copy.call_number().record().id();
-            $scope.summaryRecord = itemSvc.copy.call_number().record();
             $scope.args.barcode = '';
 
             // locally flesh org units