if (hold.current_copy()) {
entry.item = hold.current_copy().barcode();
}
- deferred.notify(entry);
}
);
}
).then(
function(usr) {
entry.user = usr.family_name();
- deferred.notify(entry);
}
);
}
entries.forEach(
function(el,idx) {
el.id = idx;
+ // notify right away and in order; fetch_* will
+ // fill in entry later if necessary
+ promises.push($timeout(function() { deferred.notify(el) }));
if (el.action == 'requested_hold') {
promises.push(fetch_hold(deferred,el));
} else if (el.action == 'registered_patron') {
promises.push(fetch_patron(deferred,el));
} else if (el.action == 'paid_bill') {
promises.push(fetch_patron(deferred,el));
- } else {
- promises.push($timeout(function() { deferred.notify(el) }));
}
}
);
log_entries.patron_log.forEach(
function(el,idx) {
el.id = idx;
+ // notify right away and in order; fetch_* will
+ // fill in entry later if necessary
+ promises.push($timeout(function() { deferred.notify(el) }));
if (el.action == 'requested_hold') {
promises.push(fetch_hold(deferred,el));
} else if (el.action == 'registered_patron') {
promises.push(fetch_patron(deferred,el));
} else if (el.action == 'paid_bill') {
promises.push(fetch_patron(deferred,el));
- } else {
- promises.push($timeout(function() { deferred.notify(el) }));
}
}
);