From 670747d99ca24e1f4470c2d8ed381515e5e52bba Mon Sep 17 00:00:00 2001 From: birendra.kumar Date: Thu, 16 Jan 2020 17:10:35 +0530 Subject: [PATCH] admin user update fixed --- 400-SOURCECODE/Admin/src/app/components/LicenseEntity/addlicense.component.ts | 6 +++--- 400-SOURCECODE/Admin/src/app/components/LicenseEntity/searchlicense.component.ts | 4 ++-- 400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.html | 5 ++++- 400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.ts | 20 +++++++++++--------- 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/400-SOURCECODE/Admin/src/app/components/LicenseEntity/addlicense.component.ts b/400-SOURCECODE/Admin/src/app/components/LicenseEntity/addlicense.component.ts index 13918f2..44f5f64 100644 --- a/400-SOURCECODE/Admin/src/app/components/LicenseEntity/addlicense.component.ts +++ b/400-SOURCECODE/Admin/src/app/components/LicenseEntity/addlicense.component.ts @@ -35,9 +35,9 @@ export class AddLicense implements OnInit { divClass: string = ''; topPos: string = '2000px'; datePipe: DatePipe = new DatePipe('en-US'); - bsValue1: Date = new Date(); - bsValue2: Date = new Date(); - bsValue3: Date = new Date(); + bsValue1: Date = null;//new Date(); + bsValue2: Date = null;//new Date(); + bsValue3: Date = null;//new Date(); modalRef: BsModalRef; editionLoginsText: string; rowIndex: number = 0; diff --git a/400-SOURCECODE/Admin/src/app/components/LicenseEntity/searchlicense.component.ts b/400-SOURCECODE/Admin/src/app/components/LicenseEntity/searchlicense.component.ts index ee67869..a9d2a44 100644 --- a/400-SOURCECODE/Admin/src/app/components/LicenseEntity/searchlicense.component.ts +++ b/400-SOURCECODE/Admin/src/app/components/LicenseEntity/searchlicense.component.ts @@ -36,8 +36,8 @@ export class SearchLicense implements OnInit, AfterViewChecked { topPos: string = '2000px'; selectedRow: number = 0; datePipe: DatePipe = new DatePipe('en-US'); - bsValue1: Date = new Date(); - bsValue2: Date = new Date(); + bsValue1: Date = null;//new Date(); + bsValue2: Date = null;//new Date(); selectedId: number = 0; modalRef: BsModalRef; checkedRecords: Array; diff --git a/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.html b/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.html index 1ecced3..25250dd 100644 --- a/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.html +++ b/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.html @@ -204,7 +204,10 @@
-
Confirm Password is required
+
Confirm Password is required
+
+ Password not match. +
diff --git a/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.ts b/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.ts index a824ed4..cefab55 100644 --- a/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.ts +++ b/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.ts @@ -347,29 +347,31 @@ export class UsersList implements OnInit, AfterViewChecked { } public UpdateUser() { - this.alerts = ''; - if (this.adduserFrm.value.UserName == '') { - this.alerts += 'User Name minimum 8 characters is required.'; + this.alerts = ''; + if (this.adduserFrm.value.UserName == '' ||(!this.adduserFrm.controls.UserName.valid)) + { + this.alerts += 'User Name of minimum 8 characters is required.'; } - if (this.adduserFrm.value.Password == '') { + if (this.adduserFrm.value.Password == '' ||(!this.adduserFrm.controls.Password.valid )) { this.alerts += '
Password of minimum 8 characters is required.'; } if (this.adduserFrm.value.ConfirmPassword == '') { this.alerts += '
Confirm Password is required.'; } - if (this.adduserFrm.value.EmailId == '') { + if (this.adduserFrm.value.Password != this.adduserFrm.value.ConfirmPassword) { + this.alerts += '
Password and confirm password must be same'; + } + if (this.adduserFrm.value.EmailId == '' ||(!this.adduserFrm.controls.EmailId.valid)) { this.alerts += '
Email Id is required.'; } + if (this.adduserFrm.value.FirstName == '') { this.alerts += '
First Name is required.'; } if (this.adduserFrm.value.LastName == '') { this.alerts += '
Last Name is required.'; } - if (this.adduserFrm.value.Password != this.adduserFrm.value.ConfirmPassword) { - this.alerts += '
Password and confirm password must be same'; - } - + if (this.adduserFrm.valid && this.alerts == '') { this.adduserFrm.controls['isActive'].setValue(this.adduserFrm.value.UserStatusActive) -- libgit2 0.21.4