limited hint handling for other ways to check-in
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 25 Jul 2005 14:36:29 +0000 (14:36 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 25 Jul 2005 14:36:29 +0000 (14:36 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1419 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/staff_client/chrome/content/evergreen/patron/patron_display.js

index 1a7ec25..1a72385 100755 (executable)
@@ -211,7 +211,12 @@ function patron_display_patron_items_init(p) {
                                                try {
                                                        var idx = patron_items[i].getAttribute('record_id'); 
                                                        var copy = p._patron.checkouts()[ idx ].copy;
-                                                       checkin_by_copy_barcode( copy.barcode(), null );
+                                                       var check = checkin_by_copy_barcode( copy.barcode(), null );
+                                                       if (check.status == 0) {
+                                                               alert('Check In: ' + check.text + '  Route To: ' + check.route_to);
+                                                       } else {
+                                                               alert('Check In: ' + check.text + '  Route To: ' + mw.G.org_tree_hash[check.route_to].shortname());
+                                                       }
                                                        p.refresh();
                                                } catch(E) {
                                                        alert(E);
@@ -377,12 +382,16 @@ function patron_display_patron_checkout_items_init(p) {
                                                try {
                                                        var idx = patron_checkout_items[i].getAttribute('record_id'); 
                                                        var copy = checkouts[ idx ].copy;
-                                                       var status = checkin_by_copy_barcode( copy.barcode(), null );
-                                                       if (status == null) { // change this to whatever it takes
+                                                       var check = checkin_by_copy_barcode( copy.barcode(), null );
+                                                       if (check == null) { // change this to whatever it takes
                                                                keep_these.push( checkouts[ idx ] );    
                                                        }
                                                        checkouts = keep_these;
-                                                       alert( js2JSON( status ) );
+                                                       if (check.status == 0) {
+                                                               alert('Check In: ' + check.text + '  Route To: ' + check.route_to);
+                                                       } else {
+                                                               alert('Check In: ' + check.text + '  Route To: ' + mw.G.org_tree_hash[check.route_to].shortname());
+                                                       }
                                                        p.refresh();
                                                } catch(E) {
                                                        alert(E);