From: Bill Erickson Date: Thu, 27 Oct 2016 21:57:31 +0000 (-0400) Subject: Angular selfcheck WIP : fines list X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=890d1ec7ee04e89e2f0df0ecb02a5583d8d62a5d;p=working%2FEvergreen.git Angular selfcheck WIP : fines list Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/templates/staff/circ/selfcheck/t_fines.tt2 b/Open-ILS/src/templates/staff/circ/selfcheck/t_fines.tt2 new file mode 100644 index 0000000000..231a792542 --- /dev/null +++ b/Open-ILS/src/templates/staff/circ/selfcheck/t_fines.tt2 @@ -0,0 +1,29 @@ + +
+
+
[% l('Type') %]
+
[% l('Details') %]
+
[% l('Total Billed') %]
+
[% l('Total Paid') %]
+
[% l('Balance Owed') %]
+
+ +
+
+
+ + [% l('Miscellaneous') %] + + [% l('Circulation') %] +
+
+ + {{xact.transaction.last_billing_type()}} + + {{xact.record.title()}} +
+
{{xact.transaction.total_owed() | currency}}
+
{{xact.transaction.total_paid() | currency}}
+
{{xact.transaction.balance_owed() | currency}}
+
+ diff --git a/Open-ILS/web/js/ui/default/staff/circ/selfcheck/app.js b/Open-ILS/web/js/ui/default/staff/circ/selfcheck/app.js index 347039b40b..64ac90d617 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/selfcheck/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/selfcheck/app.js @@ -78,6 +78,12 @@ angular.module('egSelfCheckApp', resolve : resolver }); + $routeProvider.when('/circ/selfcheck/fines', { + templateUrl: './circ/selfcheck/t_fines', + controller: 'FinesCtrl', + resolve : resolver + }); + $routeProvider.otherwise({redirectTo : '/circ/selfcheck/login'}); }) @@ -270,6 +276,17 @@ function($q , $timeout , $window , $location , $timeout , egCore , egConfirmDial return deferred.promise; } + /* + * Returns an array of results (non-streaming) + */ + service.get_fines = function() { + return egCore.net.request( + 'open-ils.actor', + 'open-ils.actor.user.transactions.have_balance.fleshed', + egCore.auth.token(), service.patron.id() + ); + } + return service; }]) @@ -380,3 +397,17 @@ function($scope, $q, $location , egCore, scSvc) { }]) +.controller('FinesCtrl', + ['$scope','$q','$location','egCore','scSvc', +function($scope, $q, $location , egCore, scSvc) { + scSvc.new_path_init(); + $scope.scanbox.focus = true; + $scope.xacts = []; + + scSvc.get_fines().then(function(xacts) { + console.log('here with ' + xacts.length) + $scope.xacts = xacts; + }); + +}]) +