){
this.mode = 'Edit';
this.topPos = '100px';
diff --git a/400-SOURCECODE/Admin/src/app/components/Reports/discountcodereport.component.ts b/400-SOURCECODE/Admin/src/app/components/Reports/discountcodereport.component.ts
index 080bd11..c4a20b5 100644
--- a/400-SOURCECODE/Admin/src/app/components/Reports/discountcodereport.component.ts
+++ b/400-SOURCECODE/Admin/src/app/components/Reports/discountcodereport.component.ts
@@ -177,7 +177,7 @@ export class DiscountCodeReport implements OnInit {
ExportService(data: any) {
this._loadingService.HideLoading("global-loading");
- this.global.ExportToCSV(data, "DiscountReport-" + this.date.getDay() + "-" + this.date.getMonth() + "-" + this.date.getSeconds())
+ this.global.ExportToCSV(data.DiscountReportList, "DiscountReport-" + this.date.getDay() + "-" + this.date.getMonth() + "-" + this.date.getSeconds())
}
}
diff --git a/400-SOURCECODE/Admin/src/app/components/Reports/expiringsubscriptionreport.component.ts b/400-SOURCECODE/Admin/src/app/components/Reports/expiringsubscriptionreport.component.ts
index 8254e70..b69e73a 100644
--- a/400-SOURCECODE/Admin/src/app/components/Reports/expiringsubscriptionreport.component.ts
+++ b/400-SOURCECODE/Admin/src/app/components/Reports/expiringsubscriptionreport.component.ts
@@ -103,7 +103,7 @@ export class ExpiringSubscriptionReport implements OnInit, AfterViewChecked {
{ width: 350, align: 'Center' },
{ width: 500, align: 'Center' },
{ width: 130, align: 'Center' },
- { width: 120, align: 'center' },
+ { width: 150, align: 'center' },
{ width: 280, align: 'Center' },
{ width: 180, align: 'center' },
{ width: 200, align: 'center' },
@@ -179,7 +179,7 @@ export class ExpiringSubscriptionReport implements OnInit, AfterViewChecked {
}
ExportService(data: any) {
this._loadingService.HideLoading("global-loading");
- this.global.ExportToCSV(data, "ExpiringSubscriptionReport-" + this.date.getDay() + "-" + this.date.getMonth() + "-" + this.date.getSeconds())
+ this.global.ExportToCSV(data.ExpiringSubscription, "ExpiringSubscriptionReport-" + this.date.getDay() + "-" + this.date.getMonth() + "-" + this.date.getSeconds())
}
//compareTwoDates() {
diff --git a/400-SOURCECODE/Admin/src/app/components/Reports/imageexportreport.component.ts b/400-SOURCECODE/Admin/src/app/components/Reports/imageexportreport.component.ts
index 78fd2b1..a198127 100644
--- a/400-SOURCECODE/Admin/src/app/components/Reports/imageexportreport.component.ts
+++ b/400-SOURCECODE/Admin/src/app/components/Reports/imageexportreport.component.ts
@@ -159,7 +159,7 @@ export class ImageExportReport implements OnInit {
ExportService(data: any) {
this._loadingService.HideLoading("global-loading");
- this.global.ExportToCSV(data, "ImageExportReport-" + this.date.getDay() + "-" + this.date.getMonth() + "-" + this.date.getSeconds())
+ this.global.ExportToCSV(data.ImageExportList, "ImageExportReport-" + this.date.getDay() + "-" + this.date.getMonth() + "-" + this.date.getSeconds())
}
diff --git a/400-SOURCECODE/Admin/src/app/components/Reports/netadsubscriptionreport.component.html b/400-SOURCECODE/Admin/src/app/components/Reports/netadsubscriptionreport.component.html
index f8045a8..1442a19 100644
--- a/400-SOURCECODE/Admin/src/app/components/Reports/netadsubscriptionreport.component.html
+++ b/400-SOURCECODE/Admin/src/app/components/Reports/netadsubscriptionreport.component.html
@@ -131,7 +131,8 @@
{{item.LicenseType}} |
{{item.AccountType}} |
{{item.InstitutionName}} |
- {{item.LicenseCreationDate}} |
+
+ {{item.LicenseCreationDate=='01/01/9999'?'':item.LicenseCreationDate| date: 'MM/dd/yyyy'}} |
{{item.ActiveSubscription}} |
{{item.RenewSubscription}} |
{{item.InActiveSubscription}} |
diff --git a/400-SOURCECODE/Admin/src/app/components/Reports/netadsubscriptionreport.component.ts b/400-SOURCECODE/Admin/src/app/components/Reports/netadsubscriptionreport.component.ts
index 604c380..3537991 100644
--- a/400-SOURCECODE/Admin/src/app/components/Reports/netadsubscriptionreport.component.ts
+++ b/400-SOURCECODE/Admin/src/app/components/Reports/netadsubscriptionreport.component.ts
@@ -162,7 +162,7 @@ export class NetAdSubscriptionReport implements OnInit {
ExportService(data: any) {
this._loadingService.HideLoading("global-loading");
- this.global.ExportToCSV(data, "NetAdSummaryReport-" + this.date.getDay() + "-" + this.date.getMonth() + "-" + this.date.getSeconds())
+ this.global.ExportToCSV(data.NetAdSubscriptionList, "NetAdSummaryReport-" + this.date.getDay() + "-" + this.date.getMonth() + "-" + this.date.getSeconds())
}
}
diff --git a/400-SOURCECODE/Admin/src/app/components/Reports/sitelicenseusagereport.component.ts b/400-SOURCECODE/Admin/src/app/components/Reports/sitelicenseusagereport.component.ts
index 08e17f2..cec05fa 100644
--- a/400-SOURCECODE/Admin/src/app/components/Reports/sitelicenseusagereport.component.ts
+++ b/400-SOURCECODE/Admin/src/app/components/Reports/sitelicenseusagereport.component.ts
@@ -161,7 +161,7 @@ export class SiteLicenseUsageReport implements OnInit {
}
ExportService(data: any) {
this._loadingService.HideLoading("global-loading");
- this.global.ExportToCSV(data, "SiteLicenseUsageReport-" + this.date.getDay() + "-" + this.date.getMonth() + "-" + this.date.getSeconds())
+ this.global.ExportToCSV(data.SiteLicenseUsageList, "SiteLicenseUsageReport-" + this.date.getDay() + "-" + this.date.getMonth() + "-" + this.date.getSeconds())
}
}
diff --git a/400-SOURCECODE/Admin/src/app/components/SubscriptionPrice/subscriptionprice.component.ts b/400-SOURCECODE/Admin/src/app/components/SubscriptionPrice/subscriptionprice.component.ts
index 8e2b7ab..740f2b1 100644
--- a/400-SOURCECODE/Admin/src/app/components/SubscriptionPrice/subscriptionprice.component.ts
+++ b/400-SOURCECODE/Admin/src/app/components/SubscriptionPrice/subscriptionprice.component.ts
@@ -40,6 +40,7 @@ NoRecord: string;
recordCount: number;
pageNo: number;
pageLength: number;
+RecordDeleted: number[];
constructor(private subscriptionPriceService: SubscriptionPriceService, private router: Router,
private fb: FormBuilder, private modalService: BsModalService, private global: GlobalService,
@@ -62,11 +63,11 @@ pageLength: number;
});
$('#fixed_hdr2').fxdHdrCol({
fixedCols: 0,
- width: "80%",
+ width: "100%",
height: 300,
colModal: [
{ width: 150, align: 'center' },
- { width: 400, align: 'center' },
+ { width: 490, align: 'center' },
{ width: 200, align: 'Center' },
{ width: 200, align: 'Center' },
{ width: 200, align: 'Center' },
@@ -143,21 +144,27 @@ pageLength: number;
AfterInsertData(data, template) {
if (data.Status == "false") {
// this.alerts = "Subscription price save unsuccessfull";
- this._confirmService.activate("Subscription prices insert unsuccessfull", "alertMsg");
+ this.modalAlerts = "Subscription insert unsuccessfull
";
+ this.modalRef = this.modalService.show(template);
+ // this._confirmService.activate("Subscription insert unsuccessfull", "alertMsg");
} else {
- this.modalAlerts = "Subscription price saved successfully
";
+ this._confirmService.activate("Subscription saved successfull", "alertMsg");
+ //this.modalAlerts = "Subscriptions saved successfully
";
this.CancelAdd();
- this.modalRef = this.modalService.show(template);
+ //this.modalRef = this.modalService.show(template);
}
}
AfterUpdateData(data, template) {
- if (data.Status == "false") {
+ if (data.Status == "false") {
+ this.modalAlerts = "Subscription prices update unsuccessfull
";
+ this.modalRef = this.modalService.show(template);
//this.alerts = "Subscription prices update unsuccessfull\n";
- this._confirmService.activate("Subscription prices update unsuccessfull", "alertMsg");
+ //this._confirmService.activate("Subscription prices update unsuccessfull", "alertMsg");
} else {
- this.modalAlerts = "Subscription prices updated successfully
";
- this.modalRef = this.modalService.show(template);
+ this._confirmService.activate("Subscriptions updated successfully", "alertMsg");
+ //this.modalAlerts = "Subscriptions updated successfully
";
+ //this.modalRef = this.modalService.show(template);
}
}
@@ -209,15 +216,64 @@ pageLength: number;
this.modalRef.hide();
console.log(this.checkedRecords);
this.alerts = '';
+ var deletedSubscriptions = '';
+ var unDeletedSubscriptions = '';
+ let cnt = 0;
if(this.alerts == ''){
- var obj = this.checkedRecords.filter(C => C > 0);
- return this.subscriptionPriceService.DeleteSubscriptionPrices(obj)
+ this.RecordDeleted = [];
+ this.checkedRecords.filter(C => C > 0).forEach(element => {
+ this.subscriptionPriceService.CheckSubscriptionPlanForLicense(element)
.subscribe(
- data => (this.AfterDeleteData(data, template)),
+ data => {
+ if (data == "True") {
+ cnt++;
+ unDeletedSubscriptions += this.subscriptionPrices.find(C => C.Id == element).Title + ", ";
+ if(cnt == this.checkedRecords.filter(C => C > 0).length)
+ {
+ this.modalAlerts = '';
+ if(deletedSubscriptions != ''){
+ this.modalAlerts = "Subscription prices " + deletedSubscriptions.substr(0, deletedSubscriptions.length - 2) + " deleted successfully
";
+ }
+ if(unDeletedSubscriptions != ''){
+ this.modalAlerts += "Subscription prices " + unDeletedSubscriptions.substr(0, unDeletedSubscriptions.length - 2) + " are already mapped to licenses and cannot be deleted.
";
+ }
+ this.modalRef = this.modalService.show(template);
+ this.SearchRecords(this.selectedEditionId);
+ }
+ }
+ else{
+ this.subscriptionPriceService.DeleteSubscriptionPrice(element)
+ .subscribe(
+ data => {
+ if (data == "True") {
+ cnt++;
+ deletedSubscriptions += this.subscriptionPrices.find(C => C.Id == element).Title + ", ";
+ }
+ if(cnt == this.checkedRecords.filter(C => C > 0).length)
+ {
+ this.modalAlerts = '';
+ if(deletedSubscriptions != ''){
+ this.modalAlerts = "Subscription prices " + deletedSubscriptions.substr(0, deletedSubscriptions.length - 2) + " deleted successfully
";
+ }
+ if(unDeletedSubscriptions != ''){
+ this.modalAlerts += "Subscription prices " + unDeletedSubscriptions.substr(0, unDeletedSubscriptions.length - 2) + " are already mapped to licenses and cannot be deleted.
";
+ }
+ this.modalRef = this.modalService.show(template);
+ this.SearchRecords(this.selectedEditionId);
+ }
+ },
+ error => {
+ this.error = error;
+ this.alerts = "" + this.error + "";
+ })
+ }
+ },
error => {
this.error = error;
this.alerts = "" + this.error + "";
});
+ });
+
}
}
diff --git a/400-SOURCECODE/Admin/src/app/components/SubscriptionPrice/subscriptionprice.service.ts b/400-SOURCECODE/Admin/src/app/components/SubscriptionPrice/subscriptionprice.service.ts
index ef9ac5a..e455440 100644
--- a/400-SOURCECODE/Admin/src/app/components/SubscriptionPrice/subscriptionprice.service.ts
+++ b/400-SOURCECODE/Admin/src/app/components/SubscriptionPrice/subscriptionprice.service.ts
@@ -47,15 +47,21 @@ export class SubscriptionPriceService {
.catch((res: Response) => this.handleError(res));
}
- DeleteSubscriptionPrices(obj: any) {
+ DeleteSubscriptionPrice(obj: any) {
//let options = new RequestOptions({ headers: this.headers });
- var subscriptionPriceIds = obj;
- console.log(subscriptionPriceIds);
- var headers = new Headers({
+ console.log(obj);
+ let subscriptionPriceId = obj;
+ let headers = new Headers({
'Content-Type': 'application/json'
});
- return this.http.post(this.commonService.resourceBaseUrl + "SubscriptionPrice/DeleteSubscriptionPrices",
- subscriptionPriceIds, {headers: headers})
+ return this.http.get(this.commonService.resourceBaseUrl + "SubscriptionPrice/DeleteSubscriptionPrice?subscriptionPriceId=" + subscriptionPriceId)
+ .map(this.extractData)
+ .catch((res: Response) => this.handleError(res));
+ }
+ CheckSubscriptionPlanForLicense(obj: any) {
+ //let options = new RequestOptions({ headers: this.headers });
+ console.log(obj);
+ return this.http.get(this.commonService.resourceBaseUrl + "SubscriptionPrice/CheckSubscriptionPlanForLicense?subscriptionPriceId=" + obj)
.map(this.extractData)
.catch((res: Response) => this.handleError(res));
}
diff --git a/400-SOURCECODE/Admin/src/app/components/UserEntity/adduser.component.html b/400-SOURCECODE/Admin/src/app/components/UserEntity/adduser.component.html
index 91767ee..e63dd78 100644
--- a/400-SOURCECODE/Admin/src/app/components/UserEntity/adduser.component.html
+++ b/400-SOURCECODE/Admin/src/app/components/UserEntity/adduser.component.html
@@ -69,13 +69,28 @@