[open-ils-commits] [GIT] Evergreen ILS branch rel_2_12 updated. 9e36c70e4b56b0d2d470aac8d6a24c88da4546e5
Evergreen Git
git at git.evergreen-ils.org
Tue Jun 20 10:42:01 EDT 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_2_12 has been updated
via 9e36c70e4b56b0d2d470aac8d6a24c88da4546e5 (commit)
from 7293106cb51986fafe5f1d0636c628121052ed55 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9e36c70e4b56b0d2d470aac8d6a24c88da4546e5
Author: Bill Erickson <berickxx at gmail.com>
Date: Fri May 19 12:05:47 2017 -0400
LP#1642042 Webstaff noncat real-time display
Update non-cat counts in the patron summary side bar and show the full
set of non-cat circs in the Non-Cataloged Circulations tab as non-cat
circs occur in the patron checkout interface.
Consistent with the XUL client, avoid updating tab-level 'items out'
counts with non-cat circs.
Adds a new work log action for 'noncat_checkout' so the correct data can
be extracted. As with the XUL client, this appears in the work log as a
'checkout' with no copy.
Signed-off-by: Bill Erickson <berickxx at gmail.com>
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js b/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js
index 8fc38de..e85a3f7 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js
@@ -154,7 +154,7 @@ function($scope , $q , $routeParams , egCore , egUser , patronSvc ,
// Avoid updating checkout counts when a checkout turns
// into a renewal via auto_renew.
- if (!co_resp.auto_renew) {
+ if (!co_resp.auto_renew && !params.noncat) {
patronSvc.patron_stats.checkouts.out++;
patronSvc.patron_stats.checkouts.total_out++;
}
@@ -198,7 +198,10 @@ function($scope , $q , $routeParams , egCore , egUser , patronSvc ,
row_item.title = egCore.env.cnct.map[params.noncat_type].name();
row_item.noncat_count = params.noncat_count;
row_item.circ = new egCore.idl.circ();
- row_item.circ.due_date(co_resp.evt.payload.noncat_circ.duedate());
+ row_item.circ.due_date(co_resp.evt[0].payload.noncat_circ.duedate());
+ // Non-cat circs don't return the full list of circs.
+ // Refresh the list of non-cat circs from the server.
+ patronSvc.getUserNonCats(patronSvc.current.id());
}
}
diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js
index d669400..c217f25 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js
@@ -150,12 +150,14 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog,
return service.renew(params, options);
}
- return service.flesh_response_data('checkout', evt, params, options)
+ var action = params.noncat ? 'noncat_checkout' : 'checkout';
+
+ return service.flesh_response_data(action, evt, params, options)
.then(function() {
return service.handle_checkout_resp(evt, params, options);
})
.then(function(final_resp) {
- return service.munge_resp_data(final_resp,'checkout',method)
+ return service.munge_resp_data(final_resp,action,method)
})
});
});
@@ -288,7 +290,7 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog,
}
egWorkLog.record(
- worklog_action == 'checkout'
+ (worklog_action == 'checkout' || worklog_action == 'noncat_checkout')
? egCore.strings.EG_WORK_LOG_CHECKOUT
: (worklog_action == 'renew'
? egCore.strings.EG_WORK_LOG_RENEW
@@ -566,11 +568,16 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog,
}
// TODO: renewal responses should include the patron
- if (!payload.patron && payload.circ) {
- promises.push(
- egCore.pcrud.retrieve('au', payload.circ.usr())
- .then(function(user) {payload.patron = user})
- );
+ if (!payload.patron) {
+ var user_id;
+ if (payload.circ) user_id = payload.circ.usr();
+ if (payload.noncat_circ) user_id = payload.noncat_circ.patron();
+ if (user_id) {
+ promises.push(
+ egCore.pcrud.retrieve('au', user_id)
+ .then(function(user) {payload.patron = user})
+ );
+ }
}
// extract precat values
diff --git a/Open-ILS/web/js/ui/default/staff/services/ui.js b/Open-ILS/web/js/ui/default/staff/services/ui.js
index 8a30fca..dfa1a1a 100644
--- a/Open-ILS/web/js/ui/default/staff/services/ui.js
+++ b/Open-ILS/web/js/ui/default/staff/services/ui.js
@@ -873,6 +873,10 @@ function($window , egStrings) {
entry['item_id'] = data.response.data.acp.id();
entry['patron_id'] = data.response.data.au.id();
}
+ if (data.action == 'noncat_checkout') {
+ entry['user'] = data.response.data.au.family_name();
+ entry['patron_id'] = data.response.data.au.id();
+ }
if (data.action == 'renew') {
entry['item'] = data.response.params.copy_barcode;
entry['user'] = data.response.data.au.family_name();
-----------------------------------------------------------------------
Summary of changes:
.../js/ui/default/staff/circ/patron/checkout.js | 7 ++++-
.../web/js/ui/default/staff/circ/services/circ.js | 23 +++++++++++++-------
Open-ILS/web/js/ui/default/staff/services/ui.js | 4 +++
3 files changed, 24 insertions(+), 10 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list