Commit 00bac591 authored by Florent POITTEVIN's avatar Florent POITTEVIN
Browse files

feat: open user panel after orcid authentification

parent f2e29f98
...@@ -12,6 +12,7 @@ import { ...@@ -12,6 +12,7 @@ import {
} from "@angular/router"; } from "@angular/router";
import {CartDialog} from "@app/components/dialogs/cart/cart.dialog"; import {CartDialog} from "@app/components/dialogs/cart/cart.dialog";
import {UpdateVersionDialog} from "@app/components/dialogs/update-version/update-version.dialog"; import {UpdateVersionDialog} from "@app/components/dialogs/update-version/update-version.dialog";
import {UserDialog} from "@app/components/dialogs/user/user.dialog";
import {SharedAbstractPresentational} from "@app/shared/components/presentationals/shared-abstract/shared-abstract.presentational"; import {SharedAbstractPresentational} from "@app/shared/components/presentationals/shared-abstract/shared-abstract.presentational";
import {ApplicationRoleEnum} from "@app/shared/enums/application-role.enum"; import {ApplicationRoleEnum} from "@app/shared/enums/application-role.enum";
import {LanguagesEnum} from "@app/shared/enums/languages.enum"; import {LanguagesEnum} from "@app/shared/enums/languages.enum";
...@@ -48,6 +49,7 @@ import { ...@@ -48,6 +49,7 @@ import {
distinctUntilChanged, distinctUntilChanged,
filter, filter,
map, map,
take,
} from "rxjs/operators"; } from "rxjs/operators";
import { import {
isFalse, isFalse,
...@@ -180,6 +182,16 @@ export class AppComponent extends SharedAbstractPresentational { ...@@ -180,6 +182,16 @@ export class AppComponent extends SharedAbstractPresentational {
const listQuery = queryPart.split("&"); const listQuery = queryPart.split("&");
if (listQuery.includes(environment.orcidQueryParam)) { if (listQuery.includes(environment.orcidQueryParam)) {
this._notificationService.showSuccess(TRANSLATE("notification.orcid.associated")); this._notificationService.showSuccess(TRANSLATE("notification.orcid.associated"));
this.subscribe(this.currentUserObs.pipe(
filter(user => isNotNullNorUndefined(user)),
take(1),
tap(user => {
this._dialog.open(UserDialog, {
data: user,
width: "90%",
});
}),
));
} }
} }
......
Supports Markdown
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