Commit ffc75fd8e039199d9977bd75ba79f36fe245df41
1 parent
da4e43c2
fixed new bug forUAT
Showing
2 changed files
with
14 additions
and
22 deletions
400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs
... | ... | @@ -168,7 +168,7 @@ namespace AIAHTML5.ADMIN.API.Models |
168 | 168 | LicenseObj.TotalRenewals = result[0].TotalRenewals; |
169 | 169 | LicenseObj.SubscriptionStartDate = (result[0].SubscriptionStartDate == null ? DateTime.MinValue : result[0].SubscriptionStartDate.Value); |
170 | 170 | LicenseObj.SubscriptionEndDate = (result[0].SubscriptionEndDate == null ? DateTime.MinValue : result[0].SubscriptionEndDate.Value); |
171 | - LicenseObj.RenewDate = (result[0].RenewalDate == null ? DateTime.Now.Date : result[0].RenewalDate.Value); | |
171 | + LicenseObj.RenewDate = DateTime.Now.Date;// (result[0].RenewalDate == null ? DateTime.Now.Date : result[0].RenewalDate.Value); | |
172 | 172 | } |
173 | 173 | } |
174 | 174 | catch (Exception ex) { } | ... | ... |
400-SOURCECODE/Admin/src/app/components/LicenseEntity/addlicense.component.ts
... | ... | @@ -342,11 +342,7 @@ export class AddLicense implements OnInit { |
342 | 342 | if (Date.parse(this.insertUpdateLicenseFrm.controls['subscriptionStartDate'].value) > |
343 | 343 | Date.parse(this.insertUpdateLicenseFrm.controls['subscriptionEndDate'].value)) { |
344 | 344 | this.alerts += '<span>Subscription start date must be less than the subscription end date</span><br/>'; |
345 | - } | |
346 | - // if (Date.parse(this.insertUpdateLicenseFrm.controls['subscriptionStartDate'].value) > | |
347 | - // Date.parse(this.insertUpdateLicenseFrm.controls['renewDate'].value)) { | |
348 | - // this.alerts += '<span>Subscription start date must be less than the subscription renew date</span><br/>'; | |
349 | - //} | |
345 | + } | |
350 | 346 | } |
351 | 347 | } |
352 | 348 | } |
... | ... | @@ -439,14 +435,14 @@ export class AddLicense implements OnInit { |
439 | 435 | this.insertUpdateLicenseFrm.controls['isActive'].setValue('false'); |
440 | 436 | } |
441 | 437 | |
442 | - this.insertUpdateLicenseFrm.controls['phone'].clearValidators(); | |
443 | - if (this.lstCountry.find(C => C.Id == this.license.CountryId).CountryName != "United States") { | |
444 | - this.insertUpdateLicenseFrm.controls['phone'].setValidators([Validators.required,this.noWhitespaceValidator]); | |
445 | - } | |
446 | - else { | |
447 | - this.insertUpdateLicenseFrm.controls['phone'].setValidators([Validators.required, Validators.pattern('^([0-9]{3})-([0-9]{3})-([0-9]{4})$'),this.noWhitespaceValidator]); | |
448 | - } | |
449 | - this.insertUpdateLicenseFrm.controls['phone'].updateValueAndValidity(); | |
438 | + // this.insertUpdateLicenseFrm.controls['phone'].clearValidators(); | |
439 | + // if (this.lstCountry.find(C => C.Id == this.license.CountryId).CountryName != "United States") { | |
440 | + // this.insertUpdateLicenseFrm.controls['phone'].setValidators([Validators.required,this.noWhitespaceValidator]); | |
441 | + // } | |
442 | + // else { | |
443 | + // this.insertUpdateLicenseFrm.controls['phone'].setValidators([Validators.required, Validators.pattern('^([0-9]{3})-([0-9]{3})-([0-9]{4})$'),this.noWhitespaceValidator]); | |
444 | + // } | |
445 | + // this.insertUpdateLicenseFrm.controls['phone'].updateValueAndValidity(); | |
450 | 446 | this.insertUpdateLicenseFrm.controls['phone'].setValue(this.license.Phone); |
451 | 447 | |
452 | 448 | if (this.license.EditionLogins == null) return; |
... | ... | @@ -500,9 +496,7 @@ export class AddLicense implements OnInit { |
500 | 496 | else{ |
501 | 497 | this._confirmService.activate("License saved successfully.", "alertMsg"); |
502 | 498 | } |
503 | - | |
504 | - //this.modalAlerts = "<p>License saved successfully.</p>"; | |
505 | - // this.modalRef = this.modalService.show(template); | |
499 | + | |
506 | 500 | } |
507 | 501 | } |
508 | 502 | |
... | ... | @@ -511,8 +505,7 @@ export class AddLicense implements OnInit { |
511 | 505 | this.alerts = "<span>License update unsuccessfull.</span>"; |
512 | 506 | } else { |
513 | 507 | this._confirmService.activate("License updated successfully.", "alertMsg"); |
514 | - // this.modalAlerts = "<p>License updated successfully.</p>"; | |
515 | - //this.modalRef = this.modalService.show(template); | |
508 | + | |
516 | 509 | } |
517 | 510 | } |
518 | 511 | |
... | ... | @@ -661,7 +654,7 @@ export class AddLicense implements OnInit { |
661 | 654 | if (this.insertUpdateLicenseFrm.controls['renew'].value == true){ |
662 | 655 | if (Date.parse(this.insertUpdateLicenseFrm.controls['subscriptionStartDate'].value) < |
663 | 656 | Date.parse(this.license.SubscriptionEndDate.toString())) { |
664 | - this.alerts += '<span>The new subscription start date should be greater than the previous subscription end date</span>'; | |
657 | + this.alerts += '<span>The new subscription start date should be greater than the previous subscription end date('+this.datePipe.transform(this.license.SubscriptionEndDate, 'MM/dd/yyyy')+')</span>'; | |
665 | 658 | } |
666 | 659 | } |
667 | 660 | this.editionLoginsText = ''; |
... | ... | @@ -671,8 +664,7 @@ export class AddLicense implements OnInit { |
671 | 664 | this.editionLoginsText += element.Id.toString() + '-' + element.Login + '|'; |
672 | 665 | } |
673 | 666 | }); |
674 | - } | |
675 | - | |
667 | + } | |
676 | 668 | else { |
677 | 669 | this.insertUpdateLicenseFrm.controls['editionLoginArr'].value.forEach(element => { |
678 | 670 | if (element.Login > 0) { | ... | ... |