Skip to content
Snippets Groups Projects
Commit 00bac591 authored by Florent POITTEVIN's avatar Florent POITTEVIN
Browse files

feat: open user panel after orcid authentification

parent f2e29f98
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@ import {
} from "@angular/router";
import {CartDialog} from "@app/components/dialogs/cart/cart.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 {ApplicationRoleEnum} from "@app/shared/enums/application-role.enum";
import {LanguagesEnum} from "@app/shared/enums/languages.enum";
......@@ -48,6 +49,7 @@ import {
distinctUntilChanged,
filter,
map,
take,
} from "rxjs/operators";
import {
isFalse,
......@@ -180,6 +182,16 @@ export class AppComponent extends SharedAbstractPresentational {
const listQuery = queryPart.split("&");
if (listQuery.includes(environment.orcidQueryParam)) {
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%",
});
}),
));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment