회사코드 고정

This commit is contained in:
leejinho 2019-12-15 14:49:04 +09:00
parent 43f071319e
commit 438cb519b4
3 changed files with 8 additions and 1 deletions

View File

@ -2,6 +2,7 @@
<div class="login-wrapper" fxLayout="column" fxLayoutAlign="center center">
<ucap-account-login
[companyList]="companyList$ | async"
curCompanyCode="GUC100"
[loginBtnEnable]="loginBtnEnable"
[loginBtnText]="loginBtnText"
(login)="onLogin($event)"

View File

@ -2,7 +2,7 @@
<div class="mat-title">LOGIN TO YOUR ACCOUNT</div>
<form name="loginForm" [formGroup]="loginForm" novalidate>
<mat-form-field>
<mat-form-field [style.display]="!!curCompanyCode ? 'none' : 'block'">
<mat-label>Company</mat-label>
<mat-select formControlName="companyCode" required>
<mat-option

View File

@ -22,6 +22,8 @@ export class LoginComponent implements OnInit {
@Input()
companyList?: Company[];
@Input()
curCompanyCode?: string;
@Input()
loginBtnText?: string;
@Input()
loginBtnEnable: boolean;
@ -56,6 +58,10 @@ export class LoginComponent implements OnInit {
remember: [false]
});
if (!!this.curCompanyCode) {
this.loginForm.get('companyCode').setValue(this.curCompanyCode);
}
if (loginInfo && loginInfo.companyCode && loginInfo.loginId) {
this.loginForm.get('companyCode').setValue(loginInfo.companyCode);
this.loginForm.get('loginId').setValue(loginInfo.loginId);