Merge branch 'master' of https://bitbucket.org/sriramv18/sparqsineedge
This commit is contained in:
parent
b782311ebc
commit
6c9043eced
@ -170,6 +170,7 @@ export class UserService {
|
||||
"aws_name": aws_name,
|
||||
"first_name": users.firstName,
|
||||
"last_name": users.lastName,
|
||||
"smc_emp_code": users.smc_emp_code,
|
||||
"mobile_no": users.phone,
|
||||
"email": users.email,
|
||||
"isactive":users.isactive,
|
||||
|
||||
@ -40,6 +40,10 @@
|
||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||
<input matInput placeholder="Last Name" [formControl]="regForm.controls['lastName']" >
|
||||
<mat-error *ngIf="regForm.controls['lastName'].hasError('required') && regForm.controls['lastName'].touched" class="mat-text-warn">Last Name Required.</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||
<input matInput placeholder="Emp-Code" [formControl]="regForm.controls['smc_emp_code']">
|
||||
<!-- <mat-error *ngIf="regForm.controls['smc_emp_code'].hasError('required') && regForm.controls['smc_emp_code'].touched" class="mat-text-warn">Last Name Required.</mat-error> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field style="display: none;">
|
||||
<input matInput placeholder="User Id" [formControl]="regForm.controls['userid']">
|
||||
|
||||
@ -95,6 +95,7 @@ export class RegisterComponent implements OnInit {
|
||||
userid: [null],
|
||||
firstName: [null, Validators.compose([Validators.required, Validators.minLength(2)])],
|
||||
lastName: [''],
|
||||
smc_emp_code: [''],
|
||||
phone: [null, Validators.compose([Validators.required, Validators.minLength(10), Validators.maxLength(12)])],
|
||||
email: [null, Validators.compose([Validators.required, CustomValidators.email])],
|
||||
role: [null, Validators.compose([Validators.required])],
|
||||
@ -203,6 +204,7 @@ export class RegisterComponent implements OnInit {
|
||||
|
||||
|
||||
register(userData) {
|
||||
console.log(userData)
|
||||
if(this.regForm.invalid){
|
||||
//console.log(this.regForm.value);
|
||||
//return;
|
||||
@ -529,6 +531,7 @@ getBranch(flag?){
|
||||
this.regForm.controls['userid'].setValue(this.usersData.userid);
|
||||
this.regForm.controls['firstName'].setValue(this.usersData.user_first_name);
|
||||
this.regForm.controls['lastName'].setValue(this.usersData.user_last_name);
|
||||
this.regForm.controls['smc_emp_code'].setValue(this.usersData.smc_emp_code);
|
||||
this.regForm.controls['phone'].setValue(this.usersData.mobile_no);
|
||||
this.configForm.controls['salespd_products'].setValue(this.usersData.user_config.salespd_products);
|
||||
this.configForm.controls['rcm_state_mapping'].setValue(this.usersData.user_config.rcm_state_mapping);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user