Loading packages/admin-web-angular/src/app/pages/+profile/edit/account/account.component.ts +4 −7 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ import { } from '@angular/forms'; import Admin from '@modules/server.common/entities/Admin'; import { AdminsService } from '../../../../@core/data/admins.service'; import { first, takeUntil } from 'rxjs/operators'; import { first, takeUntil, debounceTime } from 'rxjs/operators'; import { ToasterService } from 'angular2-toaster'; import { Router } from '@angular/router'; import { Subject } from 'rxjs'; Loading Loading @@ -133,8 +133,7 @@ export class AccountComponent implements OnInit, OnDestroy { private validations = { oldPasswordControl: () => { this.oldPassword.valueChanges .debounceTime(500) .pipe(takeUntil(this.ngDestroy$)) .pipe(debounceTime(500), takeUntil(this.ngDestroy$)) .subscribe((value) => { this.oldPasswordErrorMsg = (this.oldPassword.touched || this.oldPassword.dirty) && Loading @@ -145,8 +144,7 @@ export class AccountComponent implements OnInit, OnDestroy { }, passwordControl: () => { this.password.valueChanges .debounceTime(500) .pipe(takeUntil(this.ngDestroy$)) .pipe(debounceTime(500), takeUntil(this.ngDestroy$)) .subscribe((value) => { this.passwordErrorMsg = (this.password.touched || this.password.dirty) && Loading @@ -157,8 +155,7 @@ export class AccountComponent implements OnInit, OnDestroy { }, repeatPasswordControl: () => { this.repeatPassword.valueChanges .debounceTime(500) .pipe(takeUntil(this.ngDestroy$)) .pipe(debounceTime(500), takeUntil(this.ngDestroy$)) .subscribe((value) => { this.repeatPasswordErrorMsg = (this.repeatPassword.touched || Loading packages/admin-web-angular/src/app/pages/+profile/edit/basic-info/basic-info.component.ts +5 −9 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ import { Validators, } from '@angular/forms'; import Admin from '@modules/server.common/entities/Admin'; import { takeUntil, first } from 'rxjs/operators'; import { takeUntil, first, debounceTime } from 'rxjs/operators'; import { Subject } from 'rxjs'; import { IAdminUpdateObject } from '@modules/server.common/interfaces/IAdmin'; import { AdminsService } from '../../../../@core/data/admins.service'; Loading Loading @@ -154,8 +154,7 @@ export class BasicInfoComponent implements OnChanges, OnDestroy { private validations = { usernameControl: () => { this.username.valueChanges .debounceTime(500) .pipe(takeUntil(this.ngDestroy$)) .pipe(debounceTime(500), takeUntil(this.ngDestroy$)) .subscribe((value) => { this.usernameErrorMsg = this.hasError(this.username) ? Object.keys(this.username.errors)[0] Loading @@ -164,8 +163,7 @@ export class BasicInfoComponent implements OnChanges, OnDestroy { }, emailControl: () => { this.email.valueChanges .debounceTime(500) .pipe(takeUntil(this.ngDestroy$)) .pipe(debounceTime(500), takeUntil(this.ngDestroy$)) .subscribe((value) => { this.emailErrorMsg = this.hasError(this.email) ? this.email.errors.email Loading @@ -176,8 +174,7 @@ export class BasicInfoComponent implements OnChanges, OnDestroy { }, firstNameControl: () => { this.firstName.valueChanges .debounceTime(500) .pipe(takeUntil(this.ngDestroy$)) .pipe(debounceTime(500), takeUntil(this.ngDestroy$)) .subscribe((value) => { this.firstNameErrorMsg = this.hasError(this.firstName) ? this.firstName.errors.pattern Loading @@ -188,8 +185,7 @@ export class BasicInfoComponent implements OnChanges, OnDestroy { }, lastNameControl: () => { this.lastName.valueChanges .debounceTime(500) .pipe(takeUntil(this.ngDestroy$)) .pipe(debounceTime(500), takeUntil(this.ngDestroy$)) .subscribe((value) => { this.lastNameErrorMsg = this.hasError(this.lastName) ? this.lastName.errors.pattern Loading Loading
packages/admin-web-angular/src/app/pages/+profile/edit/account/account.component.ts +4 −7 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ import { } from '@angular/forms'; import Admin from '@modules/server.common/entities/Admin'; import { AdminsService } from '../../../../@core/data/admins.service'; import { first, takeUntil } from 'rxjs/operators'; import { first, takeUntil, debounceTime } from 'rxjs/operators'; import { ToasterService } from 'angular2-toaster'; import { Router } from '@angular/router'; import { Subject } from 'rxjs'; Loading Loading @@ -133,8 +133,7 @@ export class AccountComponent implements OnInit, OnDestroy { private validations = { oldPasswordControl: () => { this.oldPassword.valueChanges .debounceTime(500) .pipe(takeUntil(this.ngDestroy$)) .pipe(debounceTime(500), takeUntil(this.ngDestroy$)) .subscribe((value) => { this.oldPasswordErrorMsg = (this.oldPassword.touched || this.oldPassword.dirty) && Loading @@ -145,8 +144,7 @@ export class AccountComponent implements OnInit, OnDestroy { }, passwordControl: () => { this.password.valueChanges .debounceTime(500) .pipe(takeUntil(this.ngDestroy$)) .pipe(debounceTime(500), takeUntil(this.ngDestroy$)) .subscribe((value) => { this.passwordErrorMsg = (this.password.touched || this.password.dirty) && Loading @@ -157,8 +155,7 @@ export class AccountComponent implements OnInit, OnDestroy { }, repeatPasswordControl: () => { this.repeatPassword.valueChanges .debounceTime(500) .pipe(takeUntil(this.ngDestroy$)) .pipe(debounceTime(500), takeUntil(this.ngDestroy$)) .subscribe((value) => { this.repeatPasswordErrorMsg = (this.repeatPassword.touched || Loading
packages/admin-web-angular/src/app/pages/+profile/edit/basic-info/basic-info.component.ts +5 −9 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ import { Validators, } from '@angular/forms'; import Admin from '@modules/server.common/entities/Admin'; import { takeUntil, first } from 'rxjs/operators'; import { takeUntil, first, debounceTime } from 'rxjs/operators'; import { Subject } from 'rxjs'; import { IAdminUpdateObject } from '@modules/server.common/interfaces/IAdmin'; import { AdminsService } from '../../../../@core/data/admins.service'; Loading Loading @@ -154,8 +154,7 @@ export class BasicInfoComponent implements OnChanges, OnDestroy { private validations = { usernameControl: () => { this.username.valueChanges .debounceTime(500) .pipe(takeUntil(this.ngDestroy$)) .pipe(debounceTime(500), takeUntil(this.ngDestroy$)) .subscribe((value) => { this.usernameErrorMsg = this.hasError(this.username) ? Object.keys(this.username.errors)[0] Loading @@ -164,8 +163,7 @@ export class BasicInfoComponent implements OnChanges, OnDestroy { }, emailControl: () => { this.email.valueChanges .debounceTime(500) .pipe(takeUntil(this.ngDestroy$)) .pipe(debounceTime(500), takeUntil(this.ngDestroy$)) .subscribe((value) => { this.emailErrorMsg = this.hasError(this.email) ? this.email.errors.email Loading @@ -176,8 +174,7 @@ export class BasicInfoComponent implements OnChanges, OnDestroy { }, firstNameControl: () => { this.firstName.valueChanges .debounceTime(500) .pipe(takeUntil(this.ngDestroy$)) .pipe(debounceTime(500), takeUntil(this.ngDestroy$)) .subscribe((value) => { this.firstNameErrorMsg = this.hasError(this.firstName) ? this.firstName.errors.pattern Loading @@ -188,8 +185,7 @@ export class BasicInfoComponent implements OnChanges, OnDestroy { }, lastNameControl: () => { this.lastName.valueChanges .debounceTime(500) .pipe(takeUntil(this.ngDestroy$)) .pipe(debounceTime(500), takeUntil(this.ngDestroy$)) .subscribe((value) => { this.lastNameErrorMsg = this.hasError(this.lastName) ? this.lastName.errors.pattern Loading