회사코드 고정
This commit is contained in:
parent
43f071319e
commit
438cb519b4
|
@ -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)"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user