$scope.focusMe = true;
$scope.precatArgs = {
copy_barcode : copy_barcode,
- circ_modifier : circMods.length ? circMods[0].code() : ''
+ circ_modifier : circMods.length ? circMods[0].code() : null
};
$scope.circModifiers = circMods;
$scope.ok = function(args) { $modalInstance.close(args) }
function fetchItemsOut() {
var newlist = [];
+ $scope.loading = true;
egNet.request('open-ils.actor',
'open-ils.actor.user.checked_out.authoritative',
egAuth.token(), $scope.patron_id)
.concat(outs.lost)
.concat(outs.claims_returned)
+ if (!newlist.length) {
+ $scope.loading = false;
+ return;
+ }
+
// TODO: Websockets means 1 streaming request instead of
// multiple singles. As is, one response may be too large
// to wait on.
// note that fleshed fields are explicitly selected.
select : { bre : ['id'] }
}).then(function(circ) {
+ $scope.loading = false;
// local fleshing
circ.circ_lib(egOrg.get(circ.circ_lib()));
}
function fetchPatronHolds() {
+ $scope.loading = true;
egNet.request(
'open-ils.circ',
egAuth.token(), $scope.patron_id
).then(function(hold_ids) {
+
+ if (!hold_ids.length) {
+ $scope.loading = false;
+ return;
+ }
+
angular.forEach(hold_ids, function(id) {
egNet.request(
egAuth.token(), id
).then(function(hold_data) {
+ $scope.loading = false;
var hold = hold_data.hold;
hold_data.id = hold.id();