diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs
index 034fd12..8ee87dd 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs
@@ -168,7 +168,7 @@ namespace AIAHTML5.ADMIN.API.Models
LicenseObj.TotalRenewals = result[0].TotalRenewals;
LicenseObj.SubscriptionStartDate = (result[0].SubscriptionStartDate == null ? DateTime.MinValue : result[0].SubscriptionStartDate.Value);
LicenseObj.SubscriptionEndDate = (result[0].SubscriptionEndDate == null ? DateTime.MinValue : result[0].SubscriptionEndDate.Value);
- LicenseObj.RenewDate = (result[0].RenewalDate == null ? DateTime.Now.Date : result[0].RenewalDate.Value);
+ LicenseObj.RenewDate = DateTime.Now.Date;// (result[0].RenewalDate == null ? DateTime.Now.Date : result[0].RenewalDate.Value);
}
}
catch (Exception ex) { }
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 96a41fb..22e274e 100644
--- a/400-SOURCECODE/Admin/src/app/components/LicenseEntity/addlicense.component.ts
+++ b/400-SOURCECODE/Admin/src/app/components/LicenseEntity/addlicense.component.ts
@@ -342,11 +342,7 @@ export class AddLicense implements OnInit {
if (Date.parse(this.insertUpdateLicenseFrm.controls['subscriptionStartDate'].value) >
Date.parse(this.insertUpdateLicenseFrm.controls['subscriptionEndDate'].value)) {
this.alerts += 'Subscription start date must be less than the subscription end date
';
- }
- // if (Date.parse(this.insertUpdateLicenseFrm.controls['subscriptionStartDate'].value) >
- // Date.parse(this.insertUpdateLicenseFrm.controls['renewDate'].value)) {
- // this.alerts += 'Subscription start date must be less than the subscription renew date
';
- //}
+ }
}
}
}
@@ -439,14 +435,14 @@ export class AddLicense implements OnInit {
this.insertUpdateLicenseFrm.controls['isActive'].setValue('false');
}
- this.insertUpdateLicenseFrm.controls['phone'].clearValidators();
- if (this.lstCountry.find(C => C.Id == this.license.CountryId).CountryName != "United States") {
- this.insertUpdateLicenseFrm.controls['phone'].setValidators([Validators.required,this.noWhitespaceValidator]);
- }
- else {
- this.insertUpdateLicenseFrm.controls['phone'].setValidators([Validators.required, Validators.pattern('^([0-9]{3})-([0-9]{3})-([0-9]{4})$'),this.noWhitespaceValidator]);
- }
- this.insertUpdateLicenseFrm.controls['phone'].updateValueAndValidity();
+ // this.insertUpdateLicenseFrm.controls['phone'].clearValidators();
+ // if (this.lstCountry.find(C => C.Id == this.license.CountryId).CountryName != "United States") {
+ // this.insertUpdateLicenseFrm.controls['phone'].setValidators([Validators.required,this.noWhitespaceValidator]);
+ // }
+ // else {
+ // this.insertUpdateLicenseFrm.controls['phone'].setValidators([Validators.required, Validators.pattern('^([0-9]{3})-([0-9]{3})-([0-9]{4})$'),this.noWhitespaceValidator]);
+ // }
+ // this.insertUpdateLicenseFrm.controls['phone'].updateValueAndValidity();
this.insertUpdateLicenseFrm.controls['phone'].setValue(this.license.Phone);
if (this.license.EditionLogins == null) return;
@@ -500,9 +496,7 @@ export class AddLicense implements OnInit {
else{
this._confirmService.activate("License saved successfully.", "alertMsg");
}
-
- //this.modalAlerts = "
License saved successfully.
"; - // this.modalRef = this.modalService.show(template); + } } @@ -511,8 +505,7 @@ export class AddLicense implements OnInit { this.alerts = "License update unsuccessfull."; } else { this._confirmService.activate("License updated successfully.", "alertMsg"); - // this.modalAlerts = "License updated successfully.
"; - //this.modalRef = this.modalService.show(template); + } } @@ -661,7 +654,7 @@ export class AddLicense implements OnInit { if (this.insertUpdateLicenseFrm.controls['renew'].value == true){ if (Date.parse(this.insertUpdateLicenseFrm.controls['subscriptionStartDate'].value) < Date.parse(this.license.SubscriptionEndDate.toString())) { - this.alerts += 'The new subscription start date should be greater than the previous subscription end date'; + this.alerts += 'The new subscription start date should be greater than the previous subscription end date('+this.datePipe.transform(this.license.SubscriptionEndDate, 'MM/dd/yyyy')+')'; } } this.editionLoginsText = ''; @@ -671,8 +664,7 @@ export class AddLicense implements OnInit { this.editionLoginsText += element.Id.toString() + '-' + element.Login + '|'; } }); - } - + } else { this.insertUpdateLicenseFrm.controls['editionLoginArr'].value.forEach(element => { if (element.Login > 0) {