AW-3489 Initialen ( avatar) missen bij profiel
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Willem Dantuma 2022-02-03 18:09:32 +01:00
parent 97142bc986
commit f5b312a888
2 changed files with 4 additions and 4 deletions

2
package-lock.json generated
View File

@ -4054,7 +4054,7 @@
"@farmmaps/common": { "@farmmaps/common": {
"version": "file:dist/common", "version": "file:dist/common",
"requires": { "requires": {
"tslib": "^2.0.0" "tslib": "^2.2.0"
} }
}, },
"@farmmaps/common-map": { "@farmmaps/common-map": {

View File

@ -58,13 +58,13 @@ export function reducer(state = initialState, action: appCommonActions.Actions )
case appCommonActions.INITUSERSUCCESS: { case appCommonActions.INITUSERSUCCESS: {
let a = action as appCommonActions.InitUserSuccess; let a = action as appCommonActions.InitUserSuccess;
let claims = {} let claims = {}
Object.getOwnPropertyNames(a.userinfo).forEach((k) => { Object.getOwnPropertyNames(a.userinfo.info).forEach((k) => {
claims[k] = a.userinfo[k]; claims[k] = a.userinfo[k];
}); });
var user:IUser = { var user:IUser = {
code:a.user.code, code:a.user.code,
email:a.userinfo["email"], email:claims["email"]!== undefined ? claims["email"] : a.user.name,
name:a.userinfo["name"], name:claims["name"]!== undefined?claims["name"] : a.user.email,
claims:claims, claims:claims,
searchable: false searchable: false
}; };