Commit 0938bfa70a33ecee8a06f357681657e5996adee9
1 parent
38f76376
bug fixed
Showing
2 changed files
with
15 additions
and
2 deletions
400-SOURCECODE/Admin/src/app/components/LicenseEntity/addlicense.component.ts
@@ -95,7 +95,8 @@ export class AddLicense implements OnInit { | @@ -95,7 +95,8 @@ export class AddLicense implements OnInit { | ||
95 | testLicenseEditionId: [1], | 95 | testLicenseEditionId: [1], |
96 | creatorId: [this.globalService.loggedInUser.Id], | 96 | creatorId: [this.globalService.loggedInUser.Id], |
97 | renew: [false], | 97 | renew: [false], |
98 | - renewDate: ['', Validators.required], | 98 | + renewDate: [''], |
99 | + //renewDate: ['', Validators.required], | ||
99 | totalRenewals: [0], | 100 | totalRenewals: [0], |
100 | isActive: ['false'] | 101 | isActive: ['false'] |
101 | }); | 102 | }); |
@@ -231,6 +232,18 @@ export class AddLicense implements OnInit { | @@ -231,6 +232,18 @@ export class AddLicense implements OnInit { | ||
231 | { | 232 | { |
232 | this.alerts = ''; | 233 | this.alerts = ''; |
233 | this.NumberOfRows=0; | 234 | this.NumberOfRows=0; |
235 | + //renew date | ||
236 | + if(isChecked) | ||
237 | + { | ||
238 | + this.insertUpdateLicenseFrm.controls['renewDate'].clearValidators(); | ||
239 | + this.insertUpdateLicenseFrm.controls['renewDate'].setValidators(Validators.required); | ||
240 | + } | ||
241 | + else | ||
242 | + { | ||
243 | + this.insertUpdateLicenseFrm.controls['renewDate'].clearValidators(); | ||
244 | + } | ||
245 | + this.insertUpdateLicenseFrm.controls['renewDate'].updateValueAndValidity(); | ||
246 | + | ||
234 | if (this.insertUpdateLicenseFrm.controls['licenseTypeId'].value == 2) { | 247 | if (this.insertUpdateLicenseFrm.controls['licenseTypeId'].value == 2) { |
235 | this.insertUpdateLicenseFrm.controls['editionLoginArr'].value.forEach(element => { | 248 | this.insertUpdateLicenseFrm.controls['editionLoginArr'].value.forEach(element => { |
236 | if(this.NumberOfRows >1) | 249 | if(this.NumberOfRows >1) |
400-SOURCECODE/Admin/src/app/components/LicenseEntity/searchlicense.component.ts
@@ -177,7 +177,7 @@ export class SearchLicense implements OnInit, AfterViewChecked { | @@ -177,7 +177,7 @@ export class SearchLicense implements OnInit, AfterViewChecked { | ||
177 | this.license = this.licenses[0]; | 177 | this.license = this.licenses[0]; |
178 | this.searchLicenseFrm.setControl('licenses', this.fb.array(this.licenses)); | 178 | this.searchLicenseFrm.setControl('licenses', this.fb.array(this.licenses)); |
179 | if(this.selectedId > -1){ | 179 | if(this.selectedId > -1){ |
180 | - this.license = this.searchLicenseFrm.controls['licenses'].value.find(C => C.LicenseId = this.selectedId); | 180 | + this.license = this.searchLicenseFrm.controls['licenses'].value.find(C => C.LicenseId == this.selectedId); |
181 | } | 181 | } |
182 | if (this.licenses.length > 0) { | 182 | if (this.licenses.length > 0) { |
183 | this.NoRecord = ''; | 183 | this.NoRecord = ''; |