From f5b312a8880671d9446515997cc59f0ab900aa15 Mon Sep 17 00:00:00 2001 From: Willem Dantuma Date: Thu, 3 Feb 2022 18:09:32 +0100 Subject: [PATCH] AW-3489 Initialen ( avatar) missen bij profiel --- package-lock.json | 2 +- projects/common/src/fm/reducers/app-common.reducer.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0b367a5..92e42d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4054,7 +4054,7 @@ "@farmmaps/common": { "version": "file:dist/common", "requires": { - "tslib": "^2.0.0" + "tslib": "^2.2.0" } }, "@farmmaps/common-map": { diff --git a/projects/common/src/fm/reducers/app-common.reducer.ts b/projects/common/src/fm/reducers/app-common.reducer.ts index 33f8dde..600b900 100644 --- a/projects/common/src/fm/reducers/app-common.reducer.ts +++ b/projects/common/src/fm/reducers/app-common.reducer.ts @@ -58,13 +58,13 @@ export function reducer(state = initialState, action: appCommonActions.Actions ) case appCommonActions.INITUSERSUCCESS: { let a = action as appCommonActions.InitUserSuccess; let claims = {} - Object.getOwnPropertyNames(a.userinfo).forEach((k) => { + Object.getOwnPropertyNames(a.userinfo.info).forEach((k) => { claims[k] = a.userinfo[k]; }); var user:IUser = { code:a.user.code, - email:a.userinfo["email"], - name:a.userinfo["name"], + email:claims["email"]!== undefined ? claims["email"] : a.user.name, + name:claims["name"]!== undefined?claims["name"] : a.user.email, claims:claims, searchable: false };