From a33c7056d234ede1149cf81f0b67d53761cf9582 Mon Sep 17 00:00:00 2001 From: Nikolaos Laskaris Date: Thu, 2 Nov 2017 10:31:08 +0200 Subject: [PATCH 1/3] - --- dmp-frontend/src/app/form/dynamic-form.component.ts | 1 + .../login/googgle-sign-in/googgle-sign-in.component.ts | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/dmp-frontend/src/app/form/dynamic-form.component.ts b/dmp-frontend/src/app/form/dynamic-form.component.ts index 491984e9e..ac4507d15 100644 --- a/dmp-frontend/src/app/form/dynamic-form.component.ts +++ b/dmp-frontend/src/app/form/dynamic-form.component.ts @@ -182,6 +182,7 @@ export class DynamicFormComponent implements OnInit { private patchForm(flatList : any){ + debugger; for (var prop in flatList) { if (flatList.hasOwnProperty(prop)) { if(prop.endsWith('.id')||prop.endsWith('.answer')||prop.endsWith('.value')) continue; diff --git a/dmp-frontend/src/app/login/googgle-sign-in/googgle-sign-in.component.ts b/dmp-frontend/src/app/login/googgle-sign-in/googgle-sign-in.component.ts index 316c22035..2879a7f37 100644 --- a/dmp-frontend/src/app/login/googgle-sign-in/googgle-sign-in.component.ts +++ b/dmp-frontend/src/app/login/googgle-sign-in/googgle-sign-in.component.ts @@ -72,14 +72,6 @@ export class GooggleSignInComponent implements OnInit, AfterViewInit { this.googleInit(); } -/* - signOut() { - var auth2 = gapi.auth2.getAuthInstance(); - auth2.signOut().then(function () { - console.log('User signed out.'); - }); - } -*/ } From 569753c030acb3c2b84fa6a71b5b4d689b96cef2 Mon Sep 17 00:00:00 2001 From: Nikolaos Laskaris Date: Thu, 2 Nov 2017 10:33:30 +0200 Subject: [PATCH 2/3] - --- dmp-frontend/src/app/services/interceptor.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dmp-frontend/src/app/services/interceptor.ts b/dmp-frontend/src/app/services/interceptor.ts index 9ac5e9d7e..79605bb69 100644 --- a/dmp-frontend/src/app/services/interceptor.ts +++ b/dmp-frontend/src/app/services/interceptor.ts @@ -2,12 +2,12 @@ import {Injectable} from '@angular/core'; import {Observable} from 'rxjs/Observable'; import {HttpEvent, HttpInterceptor, HttpHandler, HttpRequest, HttpResponse, HttpErrorResponse} from '@angular/common/http'; import { TokenService, TokenProvider } from './login/token.service'; - +import {Router} from '@angular/router'; @Injectable() export class GlobalInterceptor implements HttpInterceptor { - constructor(public tokenService: TokenService) {} + constructor(public tokenService: TokenService, private router : Router) {} intercept(req: HttpRequest, next: HttpHandler): Observable> { @@ -21,6 +21,7 @@ export class GlobalInterceptor implements HttpInterceptor { if (err instanceof HttpErrorResponse) { if (err.status === 401) { this.tokenService.logout(); + this.router.navigate(['/dmps'], { queryParams: { /*returnUrl: this.state.url*/ }}); } } }); From 6f4adf5ab32621e8e984c99d1ed72ae359214bc4 Mon Sep 17 00:00:00 2001 From: Nikolaos Laskaris Date: Thu, 2 Nov 2017 10:38:56 +0200 Subject: [PATCH 3/3] caption changes --- dmp-frontend/src/app/app.component.html | 2 +- dmp-frontend/src/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dmp-frontend/src/app/app.component.html b/dmp-frontend/src/app/app.component.html index a1039912d..ad8c4aec5 100644 --- a/dmp-frontend/src/app/app.component.html +++ b/dmp-frontend/src/app/app.component.html @@ -18,7 +18,7 @@