From 346cba8d8f4606a3fdbc356194d5b511869cebb7 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Tue, 29 Aug 2017 14:15:06 -0400 Subject: [PATCH] Reorder the tabs and adjust the default based on logged-in-ness Signed-off-by: Mike Rylander Signed-off-by: Kathy Lussier --- .../src/templates/staff/offline-interface.tt2 | 354 +++++++++--------- Open-ILS/web/js/ui/default/staff/offline.js | 16 +- 2 files changed, 189 insertions(+), 181 deletions(-) diff --git a/Open-ILS/src/templates/staff/offline-interface.tt2 b/Open-ILS/src/templates/staff/offline-interface.tt2 index 0cc81fd41b..725b7c38cf 100644 --- a/Open-ILS/src/templates/staff/offline-interface.tt2 +++ b/Open-ILS/src/templates/staff/offline-interface.tt2 @@ -67,6 +67,183 @@ + +
+ + +
+
+ +
+ + [% l('Import Transactions') %] + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[% l('Type') %][% l('Timestamp') %][% l('Patron Barcode') %][% l('Item Barcode') %][% l('Non-cataloged Type') %][% l('Checkout Date') %][% l('Due Date') %][% l('Checkin Date') %][% l('First Name') %][% l('Last Name') %]
{{xact.type}}{{createDate(xact.timestamp, true) | date:'short'}}{{xact.patron_barcode || xact.user.card.barcode}}{{xact.barcode}}{{lookupNoncatTypeName(xact.noncat_type)}}{{createDate(xact.checkout_time) | date:'short'}}{{createDate(xact.due_date) | date:'shortDate'}}{{createDate(xact.backdate) | date:'shortDate'}}{{xact.user.first_given_name}}{{xact.user.family_name}}
+
+
+
+ +
+
+ + +
+
+
+

[% l('Session List') %]

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
[% l('Organization') %][% l('Created By') %][% l('Description') %][% l('Date Created') %][% l('Upload Count') %][% l('Transactions Processed') %][% l('Date Completed') %]
{{ses.org}}{{ses.creator}}{{ses.description}}{{createDate(ses.create_time, true) | date:'short'}}{{ses.total}}{{ses.num_complete}}{{createDate(ses.end_time, true) | date:'short'}} + + +
+
+
+
+

+
+
+

[% l('Exception List') %]

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[% l('Workstation') %][% l('Type') %][% l('Timestamp') %][% l('Event Name') %][% l('Patron Barcode') %][% l('Item Barcode') %][% l('Non-cataloged Type') %][% l('Checkout Date') %][% l('Due Date') %][% l('Checkin Date') %]
{{xact.command._workstation}}{{xact.command.type}}{{createDate(xact.command.timestamp, true) | date:'short'}}{{xact.event.textcode}}{{xact.command.patron_barcode || xact.command.user.card.barcode}}{{xact.command.barcode}}{{lookupNoncatTypeName(xact.command.noncat_type)}}{{createDate(xact.command.checkout_time) | date:'short'}}{{createDate(xact.command.due_date) | date:'shortDate'}}{{createDate(xact.command.backdate) | date:'shortDate'}} + + + +
+
+
+
+
+
+
@@ -411,183 +588,6 @@
[% INCLUDE 'staff/circ/patron/t_edit.tt2' %]
- -
- - -
-
- -
- - [% l('Import Transactions') %] - - -
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[% l('Type') %][% l('Timestamp') %][% l('Patron Barcode') %][% l('Item Barcode') %][% l('Non-cataloged Type') %][% l('Checkout Date') %][% l('Due Date') %][% l('Checkin Date') %][% l('First Name') %][% l('Last Name') %]
{{xact.type}}{{createDate(xact.timestamp, true) | date:'short'}}{{xact.patron_barcode || xact.user.card.barcode}}{{xact.barcode}}{{lookupNoncatTypeName(xact.noncat_type)}}{{createDate(xact.checkout_time) | date:'short'}}{{createDate(xact.due_date) | date:'shortDate'}}{{createDate(xact.backdate) | date:'shortDate'}}{{xact.user.first_given_name}}{{xact.user.family_name}}
-
-
-
- -
-
- - -
-
-
-

[% l('Session List') %]

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
[% l('Organization') %][% l('Created By') %][% l('Description') %][% l('Date Created') %][% l('Upload Count') %][% l('Transactions Processed') %][% l('Date Completed') %]
{{ses.org}}{{ses.creator}}{{ses.description}}{{createDate(ses.create_time, true) | date:'short'}}{{ses.total}}{{ses.num_complete}}{{createDate(ses.end_time, true) | date:'short'}} - - -
-
-
-
-

-
-
-

[% l('Exception List') %]

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[% l('Workstation') %][% l('Type') %][% l('Timestamp') %][% l('Event Name') %][% l('Patron Barcode') %][% l('Item Barcode') %][% l('Non-cataloged Type') %][% l('Checkout Date') %][% l('Due Date') %][% l('Checkin Date') %]
{{xact.command._workstation}}{{xact.command.type}}{{createDate(xact.command.timestamp, true) | date:'short'}}{{xact.event.textcode}}{{xact.command.patron_barcode || xact.command.user.card.barcode}}{{xact.command.barcode}}{{lookupNoncatTypeName(xact.command.noncat_type)}}{{createDate(xact.command.checkout_time) | date:'short'}}{{createDate(xact.command.due_date) | date:'shortDate'}}{{createDate(xact.command.backdate) | date:'shortDate'}} - - - -
-
-
-
-
-
-
diff --git a/Open-ILS/web/js/ui/default/staff/offline.js b/Open-ILS/web/js/ui/default/staff/offline.js index 12cfc3fe87..276333d9f0 100644 --- a/Open-ILS/web/js/ui/default/staff/offline.js +++ b/Open-ILS/web/js/ui/default/staff/offline.js @@ -252,12 +252,12 @@ function($routeProvider , $locationProvider , $compileProvider) { .controller('OfflineCtrl', ['$q','$scope','$window','$location','$rootScope','egCore','egLovefield','$routeParams','$timeout','$http','ngToast','egConfirmDialog','egUnloadPrompt', function($q , $scope , $window , $location , $rootScope , egCore , egLovefield , $routeParams , $timeout , $http , ngToast , egConfirmDialog , egUnloadPrompt) { - $scope.active_tab = $routeParams.tab || 'checkout'; // Immediately redirect if we're really offline if (!$window.navigator.onLine) { if ($location.path().match(/session$/)) { var path = $location.path(); + console.log('internal redirect'); return $location.path(path.replace('session','checkout')); } } @@ -325,8 +325,15 @@ function($routeProvider , $locationProvider , $compileProvider) { $scope.logged_in = egCore.auth.token() ? true : false; - if (!$scope.logged_in && $routeParams.tab == 'session') - $scope.active_tab = 'checkout'; + + $scope.active_tab = $routeParams.tab; + $timeout(function(){ + if (!$scope.logged_in) { + $scope.active_tab = 'checkout'; + } else { + $scope.active_tab = 'session'; + } + }); egCore.hatch.getItem('eg.offline.print_receipt') .then(function(setting) { @@ -457,7 +464,7 @@ function($routeProvider , $locationProvider , $compileProvider) { } $rootScope.save_offline_xacts = function () { return $scope.save() }; - $rootScope.active_tab = function (t) { $scope.active_tab = t }; + //$rootScope.active_tab = function (t) { $scope.active_tab = t }; $scope.logout = function () { egCore.auth.logout(); @@ -484,6 +491,7 @@ function($routeProvider , $locationProvider , $compileProvider) { $scope.retrieve_pending(); $scope.$watch('active_tab', function (n,o) { + console.log('watch caught change to active_tab: ' + o + ' -> ' + n); if (n != o && !$scope.do_check_changed && n != 'checkout') $scope.strict_barcode = false; if (n != o && !$scope.do_check_changed && n == 'checkout') $scope.strict_barcode = true; if (n != o && !$scope.do_print_changed && n != 'checkout') $scope.do_print = false; -- 2.43.2