WIP: adjusting director view to SSO CAS login

parent 140d97e2
langcode: el
status: true
dependencies: { }
id: epal
label: epal
weight: 4
is_admin: null
permissions:
- 'add epal student course field entities'
- 'add epal student epal chosen entities'
- 'add epal student sector field entities'
- 'add epal users entities'
- 'delete epal student course field entities'
- 'delete epal student epal chosen entities'
- 'delete epal student sector field entities'
- 'delete epal users entities'
- 'edit epal class limits entities'
- 'edit epal student course field entities'
- 'edit epal student epal chosen entities'
- 'edit epal student sector field entities'
- 'edit epal users entities'
- 'view published epal student course field entities'
- 'view published epal student epal chosen entities'
- 'view published epal student sector field entities'
- 'view published epal users entities'
- 'view unpublished epal student course field entities'
- 'view unpublished epal student epal chosen entities'
- 'view unpublished epal student sector field entities'
- 'view unpublished epal users entities'
- 'view published eepal admin area entities'
- 'view published eepal prefecture entities'
- 'view published eepal region entities'
- 'view published eepal school entities'
- 'view published eepal sectors entities'
- 'view published eepal sectors in epal entities'
- 'view published eepal specialties in epal entities'
- 'view published eepal specialty entities'
- 'view unpublished eepal admin area entities'
- 'view unpublished eepal prefecture entities'
- 'view unpublished eepal region entities'
- 'view unpublished eepal school entities'
- 'view unpublished eepal sectors entities'
- 'view unpublished eepal sectors in epal entities'
- 'view unpublished eepal specialties in epal entities'
- 'view unpublished eepal specialty entities'
...@@ -80,5 +80,5 @@ class MyLocalization extends NgLocalization { ...@@ -80,5 +80,5 @@ class MyLocalization extends NgLocalization {
}) })
class AppModule {} class AppModule {}
enableProdMode(); // enableProdMode();
platformBrowserDynamic().bootstrapModule(AppModule); platformBrowserDynamic().bootstrapModule(AppModule);
...@@ -65,7 +65,7 @@ export default class SchoolHome implements OnInit { ...@@ -65,7 +65,7 @@ export default class SchoolHome implements OnInit {
this.authToken = loginInfoToken.auth_token; this.authToken = loginInfoToken.auth_token;
this.authRole = loginInfoToken.auth_role; this.authRole = loginInfoToken.auth_role;
if (this.authToken && this.authToken.length > 0) if (this.authToken && this.authToken.length > 0)
this.router.navigate(['/submited-preview']); this.router.navigate(['/director-view']);
return loginInfoToken; return loginInfoToken;
}, {}); }, {});
} }
......
...@@ -83,7 +83,7 @@ export default class Main { ...@@ -83,7 +83,7 @@ export default class Main {
{}, {},
middleware, middleware,
// tools ? [ ...enhancers, tools ] : enhancers); // tools ? [ ...enhancers, tools ] : enhancers);
// tools); tools);
); // );
} }
} }
...@@ -521,9 +521,16 @@ export class HelperDataService implements OnInit, OnDestroy{ ...@@ -521,9 +521,16 @@ export class HelperDataService implements OnInit, OnDestroy{
{ {
let SchoolIdNew = SchoolId.toString(); let SchoolIdNew = SchoolId.toString();
let SelectIdNew = SelectId.toString(); let SelectIdNew = SelectId.toString();
this.loginInfo$.forEach(loginInfoToken => {
this.authToken = loginInfoToken.get(0).auth_token;
}); this.loginInfo$.getValue().forEach(loginInfoToken => {
this.authToken = loginInfoToken.auth_token;
this.authRole = loginInfoToken.auth_role;
});
console.log("authToken=" + this.authToken);
console.log("authRole=" + this.authRole);
let headers = new Headers({ let headers = new Headers({
"Content-Type": "application/json", "Content-Type": "application/json",
}); });
...@@ -559,7 +566,7 @@ export class HelperDataService implements OnInit, OnDestroy{ ...@@ -559,7 +566,7 @@ export class HelperDataService implements OnInit, OnDestroy{
() => console.log("Saving Profile")); () => console.log("Saving Profile"));
}); });
} }
...@@ -588,7 +595,7 @@ export class HelperDataService implements OnInit, OnDestroy{ ...@@ -588,7 +595,7 @@ export class HelperDataService implements OnInit, OnDestroy{
() => console.log("Saving Capacity")); () => console.log("Saving Capacity"));
}); });
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment