From 21942edd72935f67e6d99c8de82acfc7a672dd5c Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 26 Jul 2017 15:42:36 -0400 Subject: [PATCH] JBAS-1728 SCKO btype; pickup lib display Show last billing type for circ fines. Display pickup library for ready-for-pickup holds. Signed-off-by: Bill Erickson --- .../var/templates_kcls/circ/selfcheck/fines.tt2 | 3 ++- .../templates_kcls/circ/selfcheck/holds_page.tt2 | 3 +++ Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js | 21 +++++++++++++++++---- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/KCLS/openils/var/templates_kcls/circ/selfcheck/fines.tt2 b/KCLS/openils/var/templates_kcls/circ/selfcheck/fines.tt2 index 931efcce99..b1e92856db 100644 --- a/KCLS/openils/var/templates_kcls/circ/selfcheck/fines.tt2 +++ b/KCLS/openils/var/templates_kcls/circ/selfcheck/fines.tt2 @@ -17,6 +17,7 @@ TITLE: DUE DATE: DATE RETURN: + LAST CHARGE: BALANCE OWED:$ @@ -24,4 +25,4 @@ - \ No newline at end of file + diff --git a/KCLS/openils/var/templates_kcls/circ/selfcheck/holds_page.tt2 b/KCLS/openils/var/templates_kcls/circ/selfcheck/holds_page.tt2 index 03c70cfc5c..e58a00265e 100644 --- a/KCLS/openils/var/templates_kcls/circ/selfcheck/holds_page.tt2 +++ b/KCLS/openils/var/templates_kcls/circ/selfcheck/holds_page.tt2 @@ -28,6 +28,9 @@ TITLE: AUTHOR: STATUS: + LOCATION: + + diff --git a/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js b/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js index 03aae1df24..847631be8d 100644 --- a/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js +++ b/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js @@ -917,6 +917,9 @@ SelfCheckManager.prototype.drawHolds = function(holds) { this.byName(row2, 'title').innerHTML = readyHolds[hold].mvr.title(); this.byName(row2, 'author').innerHTML = readyHolds[hold].mvr.author(); this.byName(row2, 'status').innerHTML = "Ready for pickup"; + this.byName(row2, 'pickup_lib').innerHTML = + fieldmapper.aou.findOrgUnit( + readyHolds[hold].hold.pickup_lib()).name(); // TODO this.readyTbody.appendChild(row2); } } else { @@ -981,6 +984,12 @@ SelfCheckManager.prototype.drawFinesPage = function() { } } + function stringifyBtype(btype) { + // avoid confusion around "grocery". TODO i18n + return btype ? + ("Miscellaneous - " + btype) : "Miscellaneous"; + } + for(var fine = 0; fine < outstandingFines.length; fine++) { var row = self.finesTemplate.cloneNode(true); var data = outstandingFines[fine]; @@ -999,11 +1008,12 @@ SelfCheckManager.prototype.drawFinesPage = function() { {selector: 'date', fullYear: true} ) : ""; + self.byName(row, 'btype').innerHTML = + stringifyBtype(data.transaction.last_billing_type()); + } else if(type == 'grocery') { - self.byName(row, 'title').innerHTML = - (data.transaction.last_billing_type()) ? - ("Miscellaneous - " + data.transaction.last_billing_type()) : - "Miscellaneous"; // Go ahead and head off any confusion around "grocery". TODO i18n + self.byName(row, 'title').innerHTML = + stringifyBtype(data.transaction.last_billing_type()); } self.byName(row, 'balance').innerHTML = data.transaction.balance_owed(); @@ -1014,6 +1024,9 @@ SelfCheckManager.prototype.drawFinesPage = function() { if(!self.byName(row,'date_return').innerHTML) { document.getElementsByClassName('dateReturn')[fine].style.display = 'none'; } + if(!self.byName(row,'btype').innerHTML) { + document.getElementsByClassName('billingType')[fine].style.display = 'none'; + } } } -- 2.11.0