diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.component.ts b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.component.ts index b5d1191..fe092d2 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.component.ts +++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.component.ts @@ -4,7 +4,6 @@ import { ManageDiscountCodeService } from './components/ManageDiscountCode/manag import { SubscriptionPriceService } from './components/SubscriptionPrice/subscriptionprice.service'; import { LicenseService } from './components/LicenseEntity/license.service'; import { ReportService } from './components/Reports/report.service'; - @Component({ selector: 'app-component', templateUrl: '../app/app.component.html', diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.module.ts b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.module.ts index 94f4f25..9d310b9 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.module.ts +++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.module.ts @@ -8,7 +8,7 @@ import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; import { APP_BASE_HREF } from '@angular/common'; import { HttpModule } from '@angular/http'; import { Ng2Bs3ModalModule } from 'ng2-bs3-modal/ng2-bs3-modal'; - +import { CsvService } from "angular2-json2csv"; //import { ModalModule } from 'ngx-bootstrap/modal'; import { UpdateUserProfile } from './components/UserEntity/updateuserprofile.component'; import { ChangeUserPassword } from './components/UserEntity/changeuserpassword.component'; @@ -34,8 +34,6 @@ import { LicenseModestySettings } from './components/LicenseEntity/licensemodest import { LicenseModuleSettings } from './components/LicenseEntity/licensemodulesettings.component'; import { SiteLicenseAccount } from './components/LicenseEntity/sitelicenseaccount.component'; import { UserGroup } from './components/UserEntity/usergroup.component'; -import { PagerComponent } from './shared/Pager/pager.component'; - import { AppComponent } from './app.component'; import { AppRoutingModule } from './app.routing.module'; //import { AuthGuard } from '../app/authguard.service'; @@ -48,6 +46,7 @@ import { BsDatepickerModule, ModalModule } from 'ngx-bootstrap'; import { BsModalService } from 'ngx-bootstrap/modal'; import { ContenteditableModelDirective } from './shared/contenteditabledirective'; import { LoadingService } from './shared/loading.service'; +import { PagerComponent } from './shared/Pager/pager.component'; @NgModule({ declarations: [ @@ -55,21 +54,19 @@ import { LoadingService } from './shared/loading.service'; UpdateUserProfile, UsersList, ManageDiscountCode, AddUser, UnblockUser, AppComponent, ConfirmComponent, - SubscriptionPrice, ManageDiscountCode, ContenteditableModelDirective, - AddLicense, SearchLicense, + SubscriptionPrice, ManageDiscountCode, ContenteditableModelDirective, AddLicense, SearchLicense, UsageReport, CustomerSummaryReport, ExpiringSubscriptionReport, SubscriptionReport, SubscriptionCancellationReport, NetAdSubscriptionReport, SiteLicenseUsageReport, DiscountCodeReport, ImageExportReport, EditLicenseBasicSettings, LicenseModestySettings, - LicenseModuleSettings, SiteLicenseAccount, UserGroup, - PagerComponent + LicenseModuleSettings, SiteLicenseAccount, UserGroup, PagerComponent ], imports: [ BrowserModule, AppRoutingModule, HttpClientModule, FormsModule, ReactiveFormsModule, HttpModule, Ng2Bs3ModalModule, BsDatepickerModule.forRoot(), ModalModule.forRoot()//ModalModule.forRoot() ], - providers: [GlobalService, ConfirmService, BsModalService, LoadingService, + providers: [GlobalService, ConfirmService, BsModalService, LoadingService, CsvService, //AuthService, //AuthGuard, //{ @@ -77,8 +74,8 @@ import { LoadingService } from './shared/loading.service'; // useClass: MyInterceptor, // multi: true //} - //{ provide: APP_BASE_HREF, useValue: '/Admin-UI' } - { provide: APP_BASE_HREF, useValue: '/' } + { provide: APP_BASE_HREF, useValue: '/Admin-UI' } + //{ provide: APP_BASE_HREF, useValue: '/' } ], bootstrap: [AppComponent] diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.routing.module.ts b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.routing.module.ts index d94ec3d..896266d 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.routing.module.ts +++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.routing.module.ts @@ -24,7 +24,6 @@ import { LicenseModestySettings } from './components/LicenseEntity/licensemodest import { LicenseModuleSettings } from './components/LicenseEntity/licensemodulesettings.component'; import { SiteLicenseAccount } from './components/LicenseEntity/sitelicenseaccount.component'; import { UserGroup } from './components/UserEntity/usergroup.component'; - const appRoutes: Routes = [ //{ path: '', redirectTo:'updateuserprofile',pathMatch } { path: 'updateuserprofile', component: UpdateUserProfile }, @@ -52,7 +51,6 @@ const appRoutes: Routes = [ { path: 'licensemodulesettings', component: LicenseModuleSettings }, { path: 'sitelicenseaccount', component: SiteLicenseAccount }, { path: 'usergroup', component: UserGroup } - ]; @NgModule({ diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode/managediscountcode.component.ts b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode/managediscountcode.component.ts index 5dfb0a8..5d843b0 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode/managediscountcode.component.ts +++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode/managediscountcode.component.ts @@ -27,6 +27,7 @@ insertUpdateDiscountCodeFrm: FormGroup; error: any; alerts: string; alertmsg: string; +Searchalerts: string; modalAlerts: string; divClass: string = ''; topPos: string = '2000px'; @@ -57,6 +58,7 @@ constructor(private manageDiscountCodeService: ManageDiscountCodeService, privat this.discountCode = new DiscountCode(); this.alerts = ''; this.alertmsg = ''; + this.Searchalerts = ''; this.manageDiscountCodeFrm = this.fb.group({ searchDiscountCode: [''], searchStartDate: [''], @@ -83,7 +85,7 @@ constructor(private manageDiscountCodeService: ManageDiscountCodeService, privat DateChange(dateValue: any){ this.alerts = ''; this.alertmsg = ''; - + this.Searchalerts = ''; if(this.manageDiscountCodeFrm.dirty) { if(dateValue._datepicker._elementRef.nativeElement.id == 'searchStartDate'){ if(dateValue._bsValue == null) { @@ -166,14 +168,21 @@ constructor(private manageDiscountCodeService: ManageDiscountCodeService, privat } - public SearchDiscountCodes() { + public SearchDiscountCodes() { + debugger; + this.global.compareTwoDates(this.manageDiscountCodeFrm.controls['searchEndDate'].value, this.manageDiscountCodeFrm.controls['searchStartDate'].value); + if (this.global.ValidationMsg != '') { + this.Searchalerts = this.global.ValidationMsg + } + if (this.Searchalerts == '') { this.manageDiscountCodeService.GetDiscountCodes( - { - discountCode: this.manageDiscountCodeFrm.controls['searchDiscountCode'].value, - startDate: this.datePipe.transform(this.manageDiscountCodeFrm.controls['searchStartDate'].value, 'MM/dd/yyyy'), - endDate: this.datePipe.transform(this.manageDiscountCodeFrm.controls['searchEndDate'].value, 'MM/dd/yyyy'), - }) - .subscribe(x => { this.BindFormFields(x) }, error => this.error = error); + { + discountCode: this.manageDiscountCodeFrm.controls['searchDiscountCode'].value, + startDate: this.datePipe.transform(this.manageDiscountCodeFrm.controls['searchStartDate'].value, 'MM/dd/yyyy'), + endDate: this.datePipe.transform(this.manageDiscountCodeFrm.controls['searchEndDate'].value, 'MM/dd/yyyy'), + }) + .subscribe(x => { this.BindFormFields(x) }, error => this.error = error); + } } openModal(template: TemplateRef) { @@ -219,10 +228,11 @@ constructor(private manageDiscountCodeService: ManageDiscountCodeService, privat AfterUpdateData(data, template) { if (data.Status == "false") { //this.alerts = "Discount code update unsuccessfull"; - this._confirmService.activate("Discount code update unsuccessfull", "alertMsg"); + this._confirmService.activate("Discount code update unsuccessfull.", "alertMsg"); } else { - this.modalAlerts = "

Discount code updated successfully

"; - this.modalRef = this.modalService.show(template); + this._confirmService.activate("Discount code updated successfully.", "alertMsg"); + //this.modalAlerts = "

Discount code updated successfully

"; + //this.modalRef = this.modalService.show(template); } } diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.html b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.html index abecc3c..4e6b477 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.html +++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.html @@ -1,8 +1,7 @@
-

Subscription Price

-

{{Mode}} Subscription Price

+

{{Mode}} Subscription Price

@@ -68,7 +67,8 @@
- + +
@@ -79,19 +79,19 @@ - - - - - - - + + + + + + +
Select
- - - - {{item.Title}}{{item.Duration}}{{item.Price | number : '1.2'}} - -
+ + + + {{item.Title}}{{item.Duration}}{{item.Price | number : '1.2'}} + +
@@ -103,6 +103,7 @@ +
@@ -112,7 +113,7 @@ -
+
@@ -230,4 +231,4 @@
-
\ No newline at end of file +
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.ts b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.ts index 285b423..3cd418f 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.ts +++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.ts @@ -14,7 +14,7 @@ import { ConfirmService } from '../../Shared/Confirm/confirm.service'; //import { Global } from '../../Shared/global'; //import { DBOperation } from 'S'; //import { Observable } from 'rxjs/Observable'; - +declare var $: any; @Component({ templateUrl: './subscriptionprice.component.html' }) @@ -36,7 +36,8 @@ selectedEditionId: number = 1; divClass: string = ''; modalRef: BsModalRef; -constructor(private subscriptionPriceService: SubscriptionPriceService, private router: Router, private _confirmService: ConfirmService, private fb: FormBuilder, private modalService: BsModalService) { } + constructor(private subscriptionPriceService: SubscriptionPriceService, private router: Router, + private _confirmService: ConfirmService, private fb: FormBuilder, private modalService: BsModalService) { } ngOnInit(): void { this.divClass = 'col-sm-12'; @@ -54,6 +55,39 @@ constructor(private subscriptionPriceService: SubscriptionPriceService, private isActive: ['false'] }); this.SearchSubscriptionPrices(this.selectedEditionId); + $('#fixed_hdr2').fxdHdrCol({ + fixedCols: 0, + width: "80%", + height: 300, + colModal: [ + { width: 180, align: 'center' }, + { width: 230, align: 'center' }, + { width: 150, align: 'Center' }, + { width: 150, align: 'Center' }, + { width: 350, align: 'Center' }, + { width: 200, align: 'Center' }, + { width: 130, 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: 400, align: 'Center' }, + { width: 150, align: 'center' }, + { width: 110, align: 'center' }, + ], + sort: true + }); + 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); } public SearchSubscriptionPrices(searchEditionId: number) { @@ -184,5 +218,8 @@ constructor(private subscriptionPriceService: SubscriptionPriceService, private this.alerts = ''; this.SearchSubscriptionPrices(this.selectedEditionId); } + redirect() { + this.router.navigate(['/']); + } }