LP#1848550 / LP#1835128: force redirect to AngJS login via StaffLoginComponent user/jeffdavis/lp1848550-cache-settings-no-cachedate
authorJeff Davis <jeff.davis@bc.libraries.coop>
Thu, 28 Nov 2019 21:15:48 +0000 (13:15 -0800)
committerJeff Davis <jeff.davis@bc.libraries.coop>
Thu, 28 Nov 2019 22:23:02 +0000 (14:23 -0800)
The Angular and AngularJS clients have separate login flows.  This
commit redirects the Angular login page to its AngularJS equivalent,
for two reasons:

1. It provides a more consistent user experience.
2. AngularJS login clears settings from the Lovefield-based offline
cache.  Angular login can't easily do that because the Angular client
doesn't use Lovefield.

Signed-off-by: Jeff Davis <jeff.davis@bc.libraries.coop>
Open-ILS/src/eg2/src/app/staff/login.component.ts

index de889f9..6005440 100644 (file)
@@ -33,6 +33,10 @@ export class StaffLoginComponent implements OnInit {
         // clear out any stale auth data
         this.auth.logout();
 
+        // redirect to AngularJS login (LP#1848550/LP#1835128)
+        window.location.href = '/eg/staff/login';
+
+        /*
         // Focus username
         this.renderer.selectRootElement('#username').focus();
 
@@ -40,6 +44,7 @@ export class StaffLoginComponent implements OnInit {
         this.args.workstation =
             this.store.getLocalItem('eg.workstation.default');
         this.applyWorkstation();
+        */
     }
 
     applyWorkstation() {