회사코드 고정

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"> <div class="login-wrapper" fxLayout="column" fxLayoutAlign="center center">
<ucap-account-login <ucap-account-login
[companyList]="companyList$ | async" [companyList]="companyList$ | async"
curCompanyCode="GUC100"
[loginBtnEnable]="loginBtnEnable" [loginBtnEnable]="loginBtnEnable"
[loginBtnText]="loginBtnText" [loginBtnText]="loginBtnText"
(login)="onLogin($event)" (login)="onLogin($event)"

View File

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

View File

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