Merge branch 'master' of gitlab.eudat.eu:dmp/OpenAIRE-EUDAT-DMP-service-pilot
This commit is contained in:
commit
43b522ae70
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-center">
|
<div class="navbar-center">
|
||||||
<h3>Digital Management Plans</h3>
|
<h3>Data Management Plans Creator</h3>
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
<li class="dropdown" [ngClass]="{true:'invisible'}[loggedInAs == null]">
|
<li class="dropdown" [ngClass]="{true:'invisible'}[loggedInAs == null]">
|
||||||
|
|
|
@ -182,6 +182,7 @@ export class DynamicFormComponent implements OnInit {
|
||||||
|
|
||||||
private patchForm(flatList : any){
|
private patchForm(flatList : any){
|
||||||
|
|
||||||
|
debugger;
|
||||||
for (var prop in flatList) {
|
for (var prop in flatList) {
|
||||||
if (flatList.hasOwnProperty(prop)) {
|
if (flatList.hasOwnProperty(prop)) {
|
||||||
if(prop.endsWith('.id')||prop.endsWith('.answer')||prop.endsWith('.value')) continue;
|
if(prop.endsWith('.id')||prop.endsWith('.answer')||prop.endsWith('.value')) continue;
|
||||||
|
|
|
@ -72,14 +72,6 @@ export class GooggleSignInComponent implements OnInit, AfterViewInit {
|
||||||
this.googleInit();
|
this.googleInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
signOut() {
|
|
||||||
var auth2 = gapi.auth2.getAuthInstance();
|
|
||||||
auth2.signOut().then(function () {
|
|
||||||
console.log('User signed out.');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,12 @@ import {Injectable} from '@angular/core';
|
||||||
import {Observable} from 'rxjs/Observable';
|
import {Observable} from 'rxjs/Observable';
|
||||||
import {HttpEvent, HttpInterceptor, HttpHandler, HttpRequest, HttpResponse, HttpErrorResponse} from '@angular/common/http';
|
import {HttpEvent, HttpInterceptor, HttpHandler, HttpRequest, HttpResponse, HttpErrorResponse} from '@angular/common/http';
|
||||||
import { TokenService, TokenProvider } from './login/token.service';
|
import { TokenService, TokenProvider } from './login/token.service';
|
||||||
|
import {Router} from '@angular/router';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class GlobalInterceptor implements HttpInterceptor {
|
export class GlobalInterceptor implements HttpInterceptor {
|
||||||
|
|
||||||
constructor(public tokenService: TokenService) {}
|
constructor(public tokenService: TokenService, private router : Router) {}
|
||||||
|
|
||||||
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ export class GlobalInterceptor implements HttpInterceptor {
|
||||||
if (err instanceof HttpErrorResponse) {
|
if (err instanceof HttpErrorResponse) {
|
||||||
if (err.status === 401) {
|
if (err.status === 401) {
|
||||||
this.tokenService.logout();
|
this.tokenService.logout();
|
||||||
|
this.router.navigate(['/dmps'], { queryParams: { /*returnUrl: this.state.url*/ }});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Digital Management Plans Creator APP</title>
|
<title>Data Management Plans Creator</title>
|
||||||
<base href="/">
|
<base href="/">
|
||||||
<meta name="csrf-token" content="2c64def7de30197c40276fe1a7ea874ca8871f70be7d7dc3305465a4d5c565e4">
|
<meta name="csrf-token" content="2c64def7de30197c40276fe1a7ea874ca8871f70be7d7dc3305465a4d5c565e4">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
Loading…
Reference in New Issue