From 00815ad5e90a6919c7dae24b8dfdf46a5b592685 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Tue, 8 Sep 2015 14:42:36 -0400 Subject: [PATCH] webstaff: More default values for required fields Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton Signed-off-by: Jason Stephenson --- .../web/js/ui/default/staff/cat/volcopy/app.js | 51 ++++++++++++++++++++-- 1 file changed, 47 insertions(+), 4 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js index 27a2d360a5..fde2e068b5 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js @@ -424,7 +424,10 @@ function(egCore , $q) { '
'+ '
'+ '
'+ - ''+ + ''+ + ''+ '
'+ '', @@ -494,8 +497,22 @@ function(egCore , $q) { cn.record( $scope.full_cn.record() ); var cp = new egCore.idl.acp(); + cp.call_number( cn ); cp.id( --itemSvc.new_cp_id ); cp.isnew( true ); + + cp.deposit(0); + cp.price(0); + cp.deposit_amount(0); + cp.fine_level(2); // Normal + cp.loan_duration(2); // Normal + cp.location(1); // Stacks + cp.circulate('t'); + cp.holdable('t'); + cp.opac_visible('t'); + cp.ref('f'); + cp.mint_condition('t'); + cp.circ_lib( $scope.owning_lib.id() ); cp.call_number( cn ); @@ -865,7 +882,20 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , cp.call_number( cn ); cp.id( --itemSvc.new_cp_id ); cp.isnew( true ); - cp.circ_lib( $scope.record_id ); + cp.circ_lib( proto.owner || egCore.auth.user().ws_ou() ); + + cp.deposit(0); + cp.price(0); + cp.deposit_amount(0); + cp.fine_level(2); // Normal + cp.loan_duration(2); // Normal + cp.location(1); // Stacks + cp.circulate('t'); + cp.holdable('t'); + cp.opac_visible('t'); + cp.ref('f'); + cp.mint_condition('t'); + if (proto.barcode) cp.barcode( proto.barcode ); itemSvc.addCopy(cp) @@ -885,7 +915,20 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , cp.call_number( cn ); cp.id( --itemSvc.new_cp_id ); cp.isnew( true ); - cp.circ_lib( $scope.record_id ); + + cp.deposit(0); + cp.price(0); + cp.deposit_amount(0); + cp.fine_level(2); // Normal + cp.loan_duration(2); // Normal + cp.location(1); // Stacks + cp.circulate('t'); + cp.holdable('t'); + cp.opac_visible('t'); + cp.ref('f'); + cp.mint_condition('t'); + + cp.circ_lib( proto.owner || egCore.auth.user().ws_ou() ); if (proto.barcode) cp.barcode( proto.barcode ); itemSvc.addCopy(cp) @@ -899,12 +942,12 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , } }).then( function() { + $scope.data = itemSvc; if ($scope.add_vols_copies) { egCore.org.settings([ 'cat.default_copy_status_fast' ]).then(function(set) { $scope.fast_ccs = set['cat.default_copy_status_fast'] || 0; - $scope.data = itemSvc; angular.forEach($scope.data.copies, function (cp) { cp.status($scope.fast_ccs); }); -- 2.11.0