Discount Code | -Percentage | -Start Date | -End Date | -Status | -Total License | +Discount Code | +Percentage | +Start Date | +End Date | +Status | +Total License | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{item.DiscountCode}} | {{item.Percentage}}% | -{{item.StartDate}} | -{{item.EndDate}} | +{{item.StartDate | date: 'MM/dd/yyyy'}} | +{{item.EndDate | date: 'MM/dd/yyyy'}} | {{item.DiscountStatus}} | {{item.TotalLicenses}} |
Account Number | -Licensee Name | -License Type | -Institution Name | -Account Type | - -Start Date | -End Date | -Original Entry Date | -Subscription Price | -Time Period | -Credit Card Number | +Account Number | +Licensee Name | +License Type | +Institution Name | +Account Type | +Start Date | +End Date | +Original Entry Date | +Subscription Price | +Time Period | +Card Number | {{esr.LicenseeName}} | {{esr.LicenseType}} | {{esr.InstitutionName}} | -{{esr.AccountType}} | - -{{esr.StartDate}} | -{{esr.EndDate}} | -{{esr.LicenseCreationDate}} | +{{esr.AccountType}} | +{{esr.StartDate | date: 'MM/dd/yyyy'}} | +{{esr.EndDate | date: 'MM/dd/yyyy'}} | +{{esr.LicenseCreationDate | date: 'MM/dd/yyyy'}} | {{esr.SubscriptionPrice}} | {{esr.DaysRemaining}} | {{esr.CardNumber}} | 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 7d3086d..8287bf1 100644 --- a/400-SOURCECODE/Admin/src/app/components/Reports/expiringsubscriptionreport.component.ts +++ b/400-SOURCECODE/Admin/src/app/components/Reports/expiringsubscriptionreport.component.ts @@ -58,10 +58,25 @@ export class ExpiringSubscriptionReport implements OnInit, AfterViewChecked { recordCount: number; pageNo: number; pageLength: number; - key: string = 'AccountNumber'; //set default - reverse: boolean = false; - ExpiringSubscription = new ExpiringSubscriptionReports(); + actualPageNo: number; + actualPageLength: number; + SearchField:any={ + sFromDate:new Date(), + sToDate:new Date(), + iLicenseTypeId:0, + iAccountTypeId:0, + sZip:'', + iStateId:0, + iCountryId:0, + iStartPrice:0, + iEndPrice:-1, + sortColumn:'AccountNumber', + sortOrder:'asc', + pageNo:1, + pageLength:10 + }; + // Declare height and width variables scrHeight:any; scrWidth:any; @@ -76,6 +91,9 @@ export class ExpiringSubscriptionReport implements OnInit, AfterViewChecked { { this.scrHeight = window.innerHeight-480; } + if(this.scrHeight<=360) this.scrHeight=360; + + $(".ft_container").css("height",this.scrHeight); } constructor(private router: Router, private reportservice: ReportService, @@ -87,16 +105,15 @@ export class ExpiringSubscriptionReport implements OnInit, AfterViewChecked { this.ExportingStart = false; this.bsConfig = Object.assign({}, { containerClass: 'theme-dark-blue' }); this.NoRecord = this.global.NoRecords; - let ExpiringSubscriptionReport = new ExpiringSubscriptionReports(); this.previousdate.setDate(this.previousdate.getDate()); this.ExpiringSubscriptionReportForm = this.fb.group({ - sFromDate: [this.previousdate], - sToDate: [this.date], + sFromDate: [this.previousdate,[Validators.required]], + sToDate: [this.date,[Validators.required]], sZip: [''], iLicenseTypeId: [0], iAccountTypeId: [0], iStateId: [0], - iStartPrice: [0.00], + iStartPrice: [''], iEndPrice: [''], iCountryId: [0] }); @@ -116,38 +133,71 @@ export class ExpiringSubscriptionReport implements OnInit, AfterViewChecked { width: "100%", height: this.scrHeight, colModal: [ - { width: 160, align: 'center' }, + { width: 150, align: 'center' }, { width: 180, align: 'center' }, { width: 150, align: 'Center' }, { width: 250, align: 'Center' }, { width: 160, align: 'Center' }, { width: 130, align: 'Center' }, { width: 130, align: 'Center' }, - { width: 150, align: 'center' }, + { width: 160, align: 'center' }, { width: 160, align: 'Center' }, { width: 150, align: 'center' }, - { width: 160, align: 'center' }, - // { width: 170, align: 'center' }, - // { width: 80, align: 'center' }, - // { width: 150, align: 'center' }, - // { width: 150, align: 'center' }, - // { width: 180, align: 'Center' }, - //{ width: 400, align: 'Center' }, - //{ width: 150, align: 'center' }, - //{ width: 110, align: 'center' }, + { width: 140, align: 'center' }, + ], sort: true }); - if(document.getElementById("fixed_table_rc") != null){ - document.getElementById("fixed_table_rc").remove(); - var testScript = document.createElement("script"); - testScript.setAttribute("id", "fixed_table_rc"); - testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); - testScript.setAttribute("type", "text/javascript"); - document.body.appendChild(testScript); - } + var thisObject=this;//class object + $(".ft_rwrapper table thead tr th").on("click",function(event){ + + if(event.currentTarget.id!=undefined && event.currentTarget.id!="" && event.currentTarget.id!=null) + { + var fieldName=event.currentTarget.id; + var sortType='' + var isAscSort = $(".ft_rwrapper table thead tr #"+fieldName).hasClass('fx_sort_asc'); + $(".ft_rwrapper table thead tr th").removeClass('fx_sort_asc fx_sort_desc'); + + if (isAscSort) { + $(".ft_rwrapper table thead tr #"+fieldName).addClass('fx_sort_desc').removeClass('fx_sort_asc'); + sortType="desc"; + } else { + $(".ft_rwrapper table thead tr #"+fieldName).addClass('fx_sort_asc').removeClass('fx_sort_desc'); + sortType="asc"; + } + + thisObject.SortTableRecords(fieldName,sortType); + + } + + }); + } + + FromDateChange(dateValue: any){ + this.alerts = ''; + this.global.compareTwoDates(this.ExpiringSubscriptionReportForm.controls['sToDate'].value, dateValue._bsValue); + if (this.global.ValidationMsg != '') { + this.alerts = this.global.ValidationMsg; + } + } + + ToDateChange(dateValue: any){ + this.alerts = ''; + this.global.compareTwoDates(dateValue._bsValue, this.ExpiringSubscriptionReportForm.controls['sFromDate'].value); + if (this.global.ValidationMsg != '') { + this.alerts = this.global.ValidationMsg; + } + } + + SortTableRecords(fieldName:string,sortType:string) { + this.SearchField.sortColumn=fieldName; + this.SearchField.sortOrder=sortType; + + this.GetExpiringSubscriptionReportList(); + } + ngAfterViewChecked() { $('#fixed_hdr2 thead').css('width', $('#fixed_hdr2 tbody tr:eq(0)').width()); } @@ -168,58 +218,84 @@ export class ExpiringSubscriptionReport implements OnInit, AfterViewChecked { } GetExpiringSubscriptionReport(evt: any) { - var tempArr = evt.split(','); - this.pageNo = parseInt(tempArr[0]); - var actulalength=this.pageLength; + this.actualPageNo = this.pageNo; + this.actualPageLength =this.pageLength; + + var tempArr = evt.split(','); + this.pageNo = parseInt(tempArr[0]); this.pageLength = parseInt(tempArr[1]); - this.alerts = ''; - this.global.compareTwoDates(this.ExpiringSubscriptionReportForm.controls['sToDate'].value, this.ExpiringSubscriptionReportForm.controls['sFromDate'].value); - if (this.global.ValidationMsg != '') { - this.alerts = this.global.ValidationMsg - } - if (this.alerts == '') { - this._loadingService.ShowLoading("global-loading"); - this.ExpiringSubscription = this.ExpiringSubscriptionReportForm.value; - var obj = this.ExpiringSubscription; - if (this.ExportingStart) { - this.reportservice.GetExpiringSubscriptionReport(obj, this.pageNo, this.pageLength).subscribe((ExpiringSubscriptionReports: ExpiringSubscriptionReports[]) => { - //reset length after csvexport - this.pageLength=actulalength; - this.ExportService(ExpiringSubscriptionReports); }, error => this.error =
---|
License Type | -Account Type | -Institution Name | -Original Entry Date | -Total Active Subscriptions | -Total Renew Subscriptions | -No. of Cancelled Subscription | -Net Ads | +License Type | +Account Type | +Institution Name | +Original Entry Date | +Total Active Subscriptions | +Total Renew Subscriptions | +No. of Cancelled Subscription | +Net Ads | {{item.LicenseType}} | {{item.AccountType}} | {{item.InstitutionName}} | -{{item.LicenseCreationDate=='01/01/9999'?'':item.LicenseCreationDate| date: 'MM/dd/yyyy'}} | +{{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 688bdc4..b05918e 100644 --- a/400-SOURCECODE/Admin/src/app/components/Reports/netadsubscriptionreport.component.ts +++ b/400-SOURCECODE/Admin/src/app/components/Reports/netadsubscriptionreport.component.ts @@ -54,6 +54,19 @@ export class NetAdSubscriptionReport implements OnInit { recordCount: number; pageNo: number; pageLength: number; + actualPageNo: number; + actualPageLength: number; + SearchField:any={ + sFromDate:new Date(), + sToDate:new Date(), + iLicenseTypeId:0, + iStartPrice:0, + iEndPrice:-1, + sortColumn:'LicenseCreationDate', + sortOrder:'asc', + pageNo:1, + pageLength:10 + }; // Declare height and width variables scrHeight:any; scrWidth:any; @@ -68,6 +81,9 @@ export class NetAdSubscriptionReport implements OnInit { { this.scrHeight = window.innerHeight-405; } + if(this.scrHeight<=360) this.scrHeight=360; + + $(".ft_container").css("height",this.scrHeight); } constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, private modalService: BsModalService, public global: GlobalService, @@ -84,7 +100,7 @@ export class NetAdSubscriptionReport implements OnInit { sFromDate: [this.previousdate], sToDate: [this.date], iLicenseTypeId: [0], - iStartPrice: [0], + iStartPrice: [''], iEndPrice: [''], }); this.alerts = ''; @@ -101,67 +117,121 @@ export class NetAdSubscriptionReport implements OnInit { colModal: [ { width: 180, align: 'center' }, { width: 230, align: 'center' }, - { width: 250, align: 'Center' }, - { width: 150, align: 'Center' }, - { width: 350, align: 'Center' }, + { width: 300, align: 'Center' }, + { width: 200, align: 'Center' }, + { width: 300, align: 'Center' }, { width: 200, align: 'Center' }, { width: 250, align: 'Center' }, - { width: 120, align: 'center' }, - // { width: 280, align: 'Center' }, - // { width: 180, align: 'center' }, - // { width: 200, align: 'center' }, - // { width: 170, align: 'center' }, - // { width: 80, align: 'center' }, - // { width: 150, align: 'center' }, - // { width: 150, align: 'center' }, - // { width: 180, align: 'Center' }, + { width: 130, align: 'center' } ], sort: true }); - if(document.getElementById("fixed_table_rc") != null){ - document.getElementById("fixed_table_rc").remove(); - var testScript = document.createElement("script"); - testScript.setAttribute("id", "fixed_table_rc"); - testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); - testScript.setAttribute("type", "text/javascript"); - document.body.appendChild(testScript); - } + + var thisObject=this;//class object + $(".ft_rwrapper table thead tr th").on("click",function(event){ + + if(event.currentTarget.id!=undefined && event.currentTarget.id!="" && event.currentTarget.id!=null) + { + var fieldName=event.currentTarget.id; + var sortType='' + var isAscSort = $(".ft_rwrapper table thead tr #"+fieldName).hasClass('fx_sort_asc'); + $(".ft_rwrapper table thead tr th").removeClass('fx_sort_asc fx_sort_desc'); + + if (isAscSort) { + $(".ft_rwrapper table thead tr #"+fieldName).addClass('fx_sort_desc').removeClass('fx_sort_asc'); + sortType="desc"; + } else { + $(".ft_rwrapper table thead tr #"+fieldName).addClass('fx_sort_asc').removeClass('fx_sort_desc'); + sortType="asc"; + } + + thisObject.SortTableRecords(fieldName,sortType); + + } + + }); } + + FromDateChange(dateValue: any){ + this.alerts = ''; + this.global.compareTwoDates(this.NetAdSubscriptionReportForm.controls['sToDate'].value, dateValue._bsValue); + if (this.global.ValidationMsg != '') { + this.alerts = this.global.ValidationMsg; + } + } + + ToDateChange(dateValue: any){ + this.alerts = ''; + this.global.compareTwoDates(dateValue._bsValue, this.NetAdSubscriptionReportForm.controls['sFromDate'].value); + if (this.global.ValidationMsg != '') { + this.alerts = this.global.ValidationMsg; + } + } + + SortTableRecords(fieldName:string,sortType:string) { + this.SearchField.sortColumn=fieldName; + this.SearchField.sortOrder=sortType; + + this.GetNetAdSummaryReportList(); + } GetLicenceType() { this.reportservice.GetLicenceType().subscribe(st => { this.lstLicenceType = st; }, error => this.error =
---|
Account Number | -Edition | -Institution Name | -Original Entry Date | -Referel URL | -Total Login | -Last Login Date | +Account Number | +Edition | +Institution Name | +Original Entry Date | +Referel URL | +Total Login | +Last Login Date | {{item.AccountNumber}} | {{item.EditionTitle}} | {{item.InstitutionName}} | -{{item.LicenseCreationDate}} | +{{item.LicenseCreationDate | date: 'MM/dd/yyyy'}} | {{item.ReferalUrl}} | {{item.TotalLogins}} | -{{item.LastLogin}} | +{{item.LastLogin | date: 'MM/dd/yyyy'}} |
---|
Account Number | -Licensee Name | -License Type | -Institution Name | -Account Type | -Edition | -Start Date | -Original Entry Date | -End Date | -Subscription Price | -Credit Card Number | +Account Number | +Licensee Name | +License Type | +Institution Name | +Account Type | +Edition | +Start Date | +Original Entry Date | +End Date | +Subscription Price | +Card Number | {{sr.InstitutionName}} | {{sr.AccountType}} | {{sr.Edition}} | -{{sr.StartDate}} | -{{sr.LicenseCreationDate}} | -{{sr.EndDate}} | +{{sr.StartDate | date: 'MM/dd/yyyy'}} | +{{sr.LicenseCreationDate | date: 'MM/dd/yyyy'}} | +{{sr.EndDate | date: 'MM/dd/yyyy'}} | {{sr.SubscriptionPrice | number:'1.2'}} | {{sr.CardNumber}} | diff --git a/400-SOURCECODE/Admin/src/app/components/Reports/subscriptioncancellationreport.component.ts b/400-SOURCECODE/Admin/src/app/components/Reports/subscriptioncancellationreport.component.ts index 19de678..f3101fd 100644 --- a/400-SOURCECODE/Admin/src/app/components/Reports/subscriptioncancellationreport.component.ts +++ b/400-SOURCECODE/Admin/src/app/components/Reports/subscriptioncancellationreport.component.ts @@ -56,6 +56,23 @@ export class SubscriptionCancellationReport implements OnInit { pageNo: number; pageLength: number; NewSubscription = new SubscriptionCancellationReports(); + actualPageNo: number; + actualPageLength: number; + SearchField:any={ + sFromDate:new Date(), + sToDate:new Date(), + iLicenseTypeId:0, + iAccountTypeId:0, + sZip:'', + iStateId:0, + iCountryId:0, + icStartPrice:0, + icEndPrice:-1, + sortColumn:'AccountNumber', + sortOrder:'asc', + pageNo:1, + pageLength:10 + }; // Declare height and width variables scrHeight:any; scrWidth:any; @@ -70,6 +87,9 @@ export class SubscriptionCancellationReport implements OnInit { { this.scrHeight = window.innerHeight-490; } + if(this.scrHeight<=360) this.scrHeight=360; + + $(".ft_container").css("height",this.scrHeight); } constructor(private router: Router, private reportservice: ReportService, @@ -84,13 +104,13 @@ export class SubscriptionCancellationReport implements OnInit { let SubscriptionCancellationReport = new SubscriptionCancellationReports(); this.previousdate.setDate(this.previousdate.getDate()); this.SubscriptionCancellationReportForm = this.fb.group({ - sFromDate: [this.previousdate], - sToDate: [this.date], + sFromDate: [this.previousdate,[Validators.required]], + sToDate: [this.date,[Validators.required]], sZip: [''], iLicenseTypeId: [0], iAccountTypeId: [0], iStateId: [0], - icStartPrice: [0], + icStartPrice: [''], icEndPrice: [''], iCountryId: [0], }); @@ -111,36 +131,66 @@ export class SubscriptionCancellationReport implements OnInit { { width: 140, align: 'center' }, { width: 170, align: 'center' }, { width: 150, align: 'Center' }, - { width: 160, align: 'Center' }, + { width: 150, align: 'Center' }, { width: 130, align: 'Center' }, - { width: 400, align: 'Center' }, - { width: 100, align: 'Center' }, - { width: 140, align: 'center' }, - { width: 100, align: 'Center' }, - { width: 140, align: 'center' }, + { width: 350, align: 'Center' }, + { width: 110, align: 'Center' }, { width: 150, align: 'center' }, - // { width: 170, align: 'center' }, - // { width: 80, align: 'center' }, - // { width: 150, align: 'center' }, - // { width: 150, align: 'center' }, - // { width: 180, align: 'Center' }, - //{ width: 400, align: 'Center' }, - //{ width: 150, align: 'center' }, - //{ width: 110, align: 'center' }, + { width: 110, align: 'Center' }, + { width: 140, align: 'center' }, + { width: 130, align: 'center' }, + ], sort: true }); - if(document.getElementById("fixed_table_rc") != null){ - document.getElementById("fixed_table_rc").remove(); - var testScript = document.createElement("script"); - testScript.setAttribute("id", "fixed_table_rc"); - testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); - testScript.setAttribute("type", "text/javascript"); - document.body.appendChild(testScript); - } + var thisObject=this;//class object + $(".ft_rwrapper table thead tr th").on("click",function(event){ + + if(event.currentTarget.id!=undefined && event.currentTarget.id!="" && event.currentTarget.id!=null) + { + var fieldName=event.currentTarget.id; + var sortType='' + var isAscSort = $(".ft_rwrapper table thead tr #"+fieldName).hasClass('fx_sort_asc'); + $(".ft_rwrapper table thead tr th").removeClass('fx_sort_asc fx_sort_desc'); + + if (isAscSort) { + $(".ft_rwrapper table thead tr #"+fieldName).addClass('fx_sort_desc').removeClass('fx_sort_asc'); + sortType="desc"; + } else { + $(".ft_rwrapper table thead tr #"+fieldName).addClass('fx_sort_asc').removeClass('fx_sort_desc'); + sortType="asc"; + } + + thisObject.SortTableRecords(fieldName,sortType); + + } + + }); } + FromDateChange(dateValue: any){ + this.alerts = ''; + this.global.compareTwoDates(this.SubscriptionCancellationReportForm.controls['sToDate'].value, dateValue._bsValue); + if (this.global.ValidationMsg != '') { + this.alerts = this.global.ValidationMsg; + } + } + + ToDateChange(dateValue: any){ + this.alerts = ''; + this.global.compareTwoDates(dateValue._bsValue, this.SubscriptionCancellationReportForm.controls['sFromDate'].value); + if (this.global.ValidationMsg != '') { + this.alerts = this.global.ValidationMsg; + } + } + + SortTableRecords(fieldName:string,sortType:string) { + this.SearchField.sortColumn=fieldName; + this.SearchField.sortOrder=sortType; + + this.GetCancellationReportList(); + } GetCountry() { this.reportservice.GetCountry().subscribe(y => { this.lstCountry = y; }, error => this.error =
---|