auto login of settings is modified

This commit is contained in:
병준 박 2019-12-17 16:29:04 +09:00
parent 99ff3eaa36
commit b5ceea129b
4 changed files with 9 additions and 6 deletions

View File

@ -46,7 +46,11 @@ export class AppAutoLoginGuard implements CanActivate {
'PERSON_LOGOUT' 'PERSON_LOGOUT'
); );
if (!!appUserInfo && appUserInfo.autoLogin && !personLogout) { if (
!!appUserInfo &&
appUserInfo.settings.general.autoLogin &&
!personLogout
) {
this.store.dispatch( this.store.dispatch(
AuthenticationStore.webLogin({ AuthenticationStore.webLogin({
loginInfo: { loginInfo: {
@ -56,7 +60,7 @@ export class AppAutoLoginGuard implements CanActivate {
loginPw: appUserInfo.loginPw loginPw: appUserInfo.loginPw
}, },
rememberMe: appUserInfo.rememberMe, rememberMe: appUserInfo.rememberMe,
autoLogin: appUserInfo.autoLogin autoLogin: true
}) })
); );
resolve(false); resolve(false);

View File

@ -9,7 +9,7 @@
[companyCode]="appUserInfo?.companyCode" [companyCode]="appUserInfo?.companyCode"
[loginId]="appUserInfo?.loginId" [loginId]="appUserInfo?.loginId"
[rememberMe]="appUserInfo?.rememberMe" [rememberMe]="appUserInfo?.rememberMe"
[autoLogin]="appUserInfo?.autoLogin" [autoLogin]="appUserInfo?.settings?.general?.autoLogin"
[useRememberMe]="useRememberMe" [useRememberMe]="useRememberMe"
[useAutoLogin]="useAutoLogin" [useAutoLogin]="useAutoLogin"
(login)="onLogin($event)" (login)="onLogin($event)"

View File

@ -74,9 +74,9 @@ export class AppAuthenticationService {
if (rememberMe || autoLogin) { if (rememberMe || autoLogin) {
appUserInfo = { appUserInfo = {
...appUserInfo, ...appUserInfo,
rememberMe, rememberMe
autoLogin
}; };
appUserInfo.settings.general.autoLogin = autoLogin;
} }
this.localStorageService.encSet<AppUserInfo>( this.localStorageService.encSet<AppUserInfo>(

View File

@ -7,7 +7,6 @@ export interface AppUserInfo {
loginId?: string; loginId?: string;
loginPw?: string; loginPw?: string;
rememberMe?: boolean; rememberMe?: boolean;
autoLogin?: boolean;
companyCode?: string; companyCode?: string;
companyGroupType?: string; companyGroupType?: string;
localeCode?: LocaleCode; localeCode?: LocaleCode;