\r\n {{message}}\r\n
\r\n{{message}}\r\n
\r\n\r\n {{message}}\r\n
\r\n\r\n {{message}}\r\n
\r\nDiscount code saved successfully
",this.modalRef=this.modalService.show(e))},t.prototype.AfterUpdateData=function(t,e){"false"==t.Status?this.alerts="Discount code update unsuccessfull":(this.modalAlerts="Discount code updated successfully
",this.modalRef=this.modalService.show(e))},t.prototype.BindFormFields=function(t){this.selectedRow=0,this.discountCodes=t,this.discountCode=this.discountCodes[0],this.manageDiscountCodeFrm.setControl("discountCodes",this.fb.array(this.discountCodes))},t.prototype.AddDiscountCode=function(){this.Mode="Add",this.topPos="100px",this.divClass="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3",this.insertUpdateDiscountCodeFrm.reset(),this.alerts="",this.insertUpdateDiscountCodeFrm.controls.discountId.setValue(0),this.insertUpdateDiscountCodeFrm.controls.discountCode.setValue(""),this.insertUpdateDiscountCodeFrm.controls.startDate.setValue(""),this.insertUpdateDiscountCodeFrm.controls.endDate.setValue(""),this.insertUpdateDiscountCodeFrm.controls.percentage.setValue(""),this.insertUpdateDiscountCodeFrm.controls.isActive.setValue(!0)},t.prototype.EditDiscountCode=function(){this.Mode="Edit",this.topPos="100px",this.divClass="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3",this.alerts="",this.insertUpdateDiscountCodeFrm.controls.discountId.setValue(this.discountCode.Id),this.insertUpdateDiscountCodeFrm.controls.discountCode.setValue(this.discountCode.DiscountCode),this.insertUpdateDiscountCodeFrm.controls.startDate.setValue(this.datePipe.transform(this.discountCode.StartDate,"MM/dd/yyyy")),this.insertUpdateDiscountCodeFrm.controls.endDate.setValue(this.datePipe.transform(this.discountCode.EndDate,"MM/dd/yyyy")),this.insertUpdateDiscountCodeFrm.controls.percentage.setValue(this.discountCode.Percentage),this.insertUpdateDiscountCodeFrm.controls.isActive.setValue(this.discountCode.IsActive)},t.prototype.CancelAddEdit=function(){var t=this;this.Mode="Manage",this.topPos="2000px",this.divClass="col-sm-12",this.SearchDiscountCodes(),this.selectedRow=this.discountCodes.findIndex(function(e){return e.Id==t.selectedId}),this.SetClickedRow(this.selectedRow,this.manageDiscountCodeFrm.controls.discountCodes.value.find(function(e){return e.Id==t.selectedId}))},t}();gt=vt([Object(n.Component)({template:r("2Azi")}),bt("design:paramtypes",["function"==typeof(yt=void 0!==pt&&pt)&&yt||Object,"function"==typeof(xt=void 0!==g.a&&g.a)&&xt||Object,"function"==typeof(wt=void 0!==o.a&&o.a)&&wt||Object,"function"==typeof(Ut=void 0!==ht.a&&ht.a)&&Ut||Object])],gt);var yt,xt,wt,Ut,Ct=this&&this.__decorate||function(t,e,r,n){var s,o=arguments.length,i=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,r,i):s(e,r))||i);return o>3&&i&&Object.defineProperty(e,r,i),i},Pt=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},It=function(){function t(t,e){this.http=t,this.commonService=e}return t.prototype.GetSubscriptionPrices=function(t){var e=this;return this.http.get(this.commonService.resourceBaseUrl+"SubscriptionPrice/GetSubscriptionPrices?editionId="+t.editionId).map(this.extractData).catch(function(t){return e.handleError(t)})},t.prototype.InsertSubscriptionPrice=function(t){var e=this,r={id:t.subscriptionPriceId,title:t.title,price:t.price,duration:t.duration,editionId:t.editionId,isActive:t.isActive};console.log(t);var n=new c.a({"Content-Type":"application/json"});return this.http.post(this.commonService.resourceBaseUrl+"SubscriptionPrice/InsertSubscriptionPrice",JSON.stringify(r),{headers:n}).map(this.extractData).catch(function(t){return e.handleError(t)})},t.prototype.UpdateSubscriptionPrices=function(t){var e=this,r={obj:t};console.log(t);var n=new c.a({"Content-Type":"application/json"});return this.http.post(this.commonService.resourceBaseUrl+"SubscriptionPrice/UpdateSubscriptionPrices",JSON.stringify(r),{headers:n}).map(this.extractData).catch(function(t){return e.handleError(t)})},t.prototype.DeleteSubscriptionPrices=function(t){var e=this,r=t;console.log(r);var n=new c.a({"Content-Type":"application/json"});return this.http.post(this.commonService.resourceBaseUrl+"SubscriptionPrice/DeleteSubscriptionPrices",r,{headers:n}).map(this.extractData).catch(function(t){return e.handleError(t)})},t.prototype.extractData=function(t){return t.json()},t.prototype.handleError=function(t){var e=t.message?t.message:t.status?t.status+" - "+t.statusText:"Server error";return console.error(e),u.Observable.throw(e)},t}();It=Ct([Object(n.Injectable)(),Pt("design:paramtypes",["function"==typeof(Dt=void 0!==c.b&&c.b)&&Dt||Object,"function"==typeof(St=void 0!==p&&p)&&St||Object])],It);var Dt,St,Ft=this&&this.__decorate||function(t,e,r,n){var s,o=arguments.length,i=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,r,i):s(e,r))||i);return o>3&&i&&Object.defineProperty(e,r,i),i},At=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Rt=function(){function t(t,e,r,n){this.subscriptionPriceService=t,this.router=e,this.fb=r,this.modalService=n,this.Mode="Search",this.topPos="2000px",this.datePipe=new l.DatePipe("en-US"),this.selectedEditionId=1,this.divClass=""}return t.prototype.ngOnInit=function(){this.divClass="col-sm-12",this.subscriptionPrice=new w,this.alerts="",this.subscriptionPriceFrm=this.fb.group({subscriptionPrices:this.fb.array([])}),this.insertSubscriptionPriceFrm=this.fb.group({subscriptionPriceId:[""],title:["",o.f.required],price:["",[o.f.required,o.f.pattern("[0-9.]*")]],duration:["",[o.f.required,o.f.pattern("[0-9]*")]],editionId:[""],isActive:[!1]}),this.SearchSubscriptionPrices(this.selectedEditionId)},t.prototype.SearchSubscriptionPrices=function(t){var e=this;this.selectedEditionId=t,this.subscriptionPriceService.GetSubscriptionPrices({editionId:this.selectedEditionId}).subscribe(function(t){e.BindFormFields(t)},function(t){return e.error=t})},t.prototype.openModal=function(t){0!=this.checkedRecords.filter(function(t){return t>0}).length&&(this.modalRef=this.modalService.show(t))},t.prototype.onChange=function(t,e,r){this.checkedRecords[t]=r?e:0},t.prototype.AfterDeleteData=function(t,e){"false"==t.Status?this.alerts="Subscription prices delete unsuccessfull":(this.modalAlerts="Subscription prices deleted successfully
",this.modalRef=this.modalService.show(e),this.SearchSubscriptionPrices(this.selectedEditionId))},t.prototype.AfterInsertData=function(t,e){"false"==t.Status?this.alerts="Subscription price save unsuccessfull":(this.modalAlerts="Subscription price saved successfully
",this.modalRef=this.modalService.show(e))},t.prototype.AfterUpdateData=function(t,e){"false"==t.Status?this.alerts="Subscription prices update unsuccessfull\n":(this.modalAlerts="Subscription prices updated successfully
",this.modalRef=this.modalService.show(e))},t.prototype.BindFormFields=function(t){this.subscriptionPrices=t,this.checkedRecords=new Array(this.subscriptionPrices.length),this.subscriptionPriceFrm.setControl("subscriptionPrices",this.fb.array(this.subscriptionPrices))},t.prototype.UpdateSubscriptionPrices=function(t){var e=this;if(console.log(this.subscriptionPriceFrm.value),this.alerts="",""==this.alerts){var r=this.subscriptionPriceFrm.controls.subscriptionPrices.value;this.subscriptionPriceService.UpdateSubscriptionPrices(r).subscribe(function(r){return e.AfterUpdateData(r,t)},function(t){e.error=t,e.alerts=""+e.error+""})}},t.prototype.InsertSubscriptionPrice=function(t){var e=this;if(console.log(this.insertSubscriptionPriceFrm.value),this.alerts="",""==this.alerts){var r=this.insertSubscriptionPriceFrm.value;return this.subscriptionPriceService.InsertSubscriptionPrice(r).subscribe(function(r){return e.AfterInsertData(r,t)},function(t){e.error=t,e.alerts=""+e.error+""})}},t.prototype.DeleteSubscriptionPrices=function(t){var e=this;if(console.log(this.checkedRecords),this.alerts="",""==this.alerts){var r=this.checkedRecords.filter(function(t){return t>0});return this.subscriptionPriceService.DeleteSubscriptionPrices(r).subscribe(function(r){return e.AfterDeleteData(r,t)},function(t){e.error=t,e.alerts=""+e.error+""})}},t.prototype.AddSubscriptionPrice=function(){this.Mode="Add",this.topPos="100px",this.divClass="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3",this.insertSubscriptionPriceFrm.reset(),this.alerts="",this.insertSubscriptionPriceFrm.controls.subscriptionPriceId.setValue(0),this.insertSubscriptionPriceFrm.controls.title.setValue(""),this.insertSubscriptionPriceFrm.controls.price.setValue(""),this.insertSubscriptionPriceFrm.controls.duration.setValue(""),this.insertSubscriptionPriceFrm.controls.editionId.setValue(this.selectedEditionId),this.insertSubscriptionPriceFrm.controls.isActive.setValue(!1)},t.prototype.CancelAdd=function(){this.Mode="Search",this.topPos="2000px",this.divClass="col-sm-12",this.insertSubscriptionPriceFrm.reset(),this.alerts="",this.SearchSubscriptionPrices(this.selectedEditionId)},t}();Rt=Ft([Object(n.Component)({template:r("wLgm")}),At("design:paramtypes",["function"==typeof(Et=void 0!==It&&It)&&Et||Object,"function"==typeof(Nt=void 0!==g.a&&g.a)&&Nt||Object,"function"==typeof(Ot=void 0!==o.a&&o.a)&&Ot||Object,"function"==typeof(jt=void 0!==ht.a&&ht.a)&&jt||Object])],Rt);var Et,Nt,Ot,jt,Tt=this&&this.__decorate||function(t,e,r,n){var s,o=arguments.length,i=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,r,i):s(e,r))||i);return o>3&&i&&Object.defineProperty(e,r,i),i},Mt=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},_t=function(){function t(t){this.userservice=t}return t.prototype.ngOnInit=function(){},t}();_t=Tt([Object(n.Component)({selector:"app-component",template:r("efyd"),providers:[h,pt,It]}),Mt("design:paramtypes",["function"==typeof(kt=void 0!==h&&h)&&kt||Object])],_t);var kt,Lt=this&&this.__decorate||function(t,e,r,n){var s,o=arguments.length,i=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,r,i):s(e,r))||i);return o>3&&i&&Object.defineProperty(e,r,i),i},Bt=[{path:"updateuserprofile",component:D},{path:"changeuserpassword",component:j},{path:"changeuserid",component:V},{path:"users",component:Z},{path:"managediscountcode",component:gt},{path:"subscriptionprice",component:Rt},{path:"adduser",component:nt}],Vt=function(){function t(){}return t}();Vt=Lt([Object(n.NgModule)({imports:[g.b.forRoot(Bt,{enableTracing:!0})],exports:[g.b]})],Vt);var qt=this&&this.__decorate||function(t,e,r,n){var s,o=arguments.length,i=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,r,i):s(e,r))||i);return o>3&&i&&Object.defineProperty(e,r,i),i},Gt=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},zt=function(){function t(t){this._defaults={type:"reset",message:"Do you want to cancel your changes?",cancelText:"Cancel",okText:"OK"},this.alertshow=!1,t.activate=this.activate.bind(this)}return t.prototype._setLabels=function(t,e){void 0===t&&(t=this._defaults.message),void 0===e&&(e=this._defaults.type),this.type=e,this.message=t,this.okText=this._defaults.okText,this.cancelText=this._defaults.cancelText},t.prototype.activate=function(t,e){var r=this;return void 0===t&&(t=this._defaults.message),void 0===e&&(e=this._defaults.type),this._setLabels(t,e),new Promise(function(t){r._show(t)})},t.prototype._show=function(t){var e=this;document.onkeyup=null;var r=function(e){return t(1)},n=function(e){return t(2)},s=function(e){return t(3)},o=function(e){return t(1)},i=function(e){return t(2)},a=function(e){return t(6)},l=function(e){return t(7)},c=function(e){return t(5)},d=function(e){return t(8)};if(this._cancelButton&&this._okButton)return this._cancelButton.onclick=function(t){t.preventDefault(),s()||e._hideDialog()},this._okButton.onclick=function(t){t.preventDefault(),r()||e._hideDialog()},this._noButton.onclick=function(t){t.preventDefault(),n()||e._hideDialog()},this._noResetButton.onclick=function(t){t.preventDefault(),i()||e._hideDialog()},this._yesResetButton.onclick=function(t){t.preventDefault(),o()||e._hideDialog()},this._noConfirmButton.onclick=function(t){t.preventDefault(),l()||e._hideDialog()},this._yesConfirmButton.onclick=function(t){t.preventDefault(),a()||e._hideDialog()},this._okAlert.onclick=function(t){t.preventDefault(),c()||e._hideDialog()},this._closeAlert.onclick=function(t){t.preventDefault(),d()||e._hideDialog()},"close"==this.type.toString()?void this.closeModal.open("sm"):"reset"==this.type.toString()?void this.resetModal.open("sm"):"confirmModel"==this.type.toString()?void this.confirmModel.open("sm"):"alertMsg"==this.type.toString()?(clearTimeout(this.timer),void(this.timer=setTimeout(function(){e.alertMessageModal.open("sm")},500))):"alertMsg2"==this.type.toString()?void this.alertMessageModal.open("sm"):void(document.onkeyup=function(t){if(27==t.which)return e._hideDialog(),s()})},t.prototype._hideDialog=function(){return"close"==this.type.toString()?void this.closeModal.close():"reset"==this.type.toString()?void this.resetModal.close():"confirmModel"==this.type.toString()?void this.confirmModel.close():"alertMsg"==this.type.toString()?void this.alertMessageModal.close():"alertMsg2"==this.type.toString()?void this.alertMessageModal.close():void 0},t.prototype.ngOnInit=function(){this._cancelButton=document.getElementById("cancelButton"),this._okButton=document.getElementById("okButton"),this._noButton=document.getElementById("noButton"),this._yesResetButton=document.getElementById("yesResetButton"),this._noResetButton=document.getElementById("noResetButton"),this._yesConfirmButton=document.getElementById("yesConfirmButton"),this._noConfirmButton=document.getElementById("noConfirmButton"),this._okAlert=document.getElementById("okAlert"),this._closeAlert=document.getElementById("closeAlert")},t}();qt([Object(n.ViewChild)("closeModal"),Gt("design:type","function"==typeof(Ht=void 0!==d.ModalComponent&&d.ModalComponent)&&Ht||Object)],zt.prototype,"closeModal",void 0),qt([Object(n.ViewChild)("confirmModel"),Gt("design:type","function"==typeof(Wt=void 0!==d.ModalComponent&&d.ModalComponent)&&Wt||Object)],zt.prototype,"confirmModel",void 0),qt([Object(n.ViewChild)("resetModal"),Gt("design:type","function"==typeof(Yt=void 0!==d.ModalComponent&&d.ModalComponent)&&Yt||Object)],zt.prototype,"resetModal",void 0),qt([Object(n.ViewChild)("alertMessageModal"),Gt("design:type","function"==typeof(Jt=void 0!==d.ModalComponent&&d.ModalComponent)&&Jt||Object)],zt.prototype,"alertMessageModal",void 0),zt=qt([Object(n.Component)({selector:"modal-confirm",template:r("3cDZ")}),Gt("design:paramtypes",["function"==typeof(Zt=void 0!==C&&C)&&Zt||Object])],zt);var Ht,Wt,Yt,Jt,Zt,Qt=r("bqRb"),$t=this&&this.__decorate||function(t,e,r,n){var s,o=arguments.length,i=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,r,i):s(e,r))||i);return o>3&&i&&Object.defineProperty(e,r,i),i},Kt=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Xt=function(){function t(t){this.elRef=t,this.update=new n.EventEmitter}return t.prototype.ngOnChanges=function(t){this._lastViewModel!==t.model.currentValue&&(this._lastViewModel=this.model,this._refreshView())},t.prototype.onBlur=function(){if("checkbox"==this.elRef.nativeElement.type||"radio"==this.elRef.nativeElement.type){var t=this.elRef.nativeElement.checked;this._lastViewModel=t,this.update.emit(t)}else{var t=this.elRef.nativeElement.innerText;this._lastViewModel=t,this.update.emit(t)}},t.prototype._refreshView=function(){"checkbox"==this.elRef.nativeElement.type||"radio"==this.elRef.nativeElement.type?(this.elRef.nativeElement.value=this.model,this.elRef.nativeElement.checked=this.model):this.elRef.nativeElement.innerText=this.model},t}();$t([Object(n.Input)("contenteditableModel"),Kt("design:type",Object)],Xt.prototype,"model",void 0),$t([Object(n.Output)("contenteditableModelChange"),Kt("design:type",Object)],Xt.prototype,"update",void 0),$t([Object(n.HostListener)("blur"),Kt("design:type",Function),Kt("design:paramtypes",[]),Kt("design:returntype",void 0)],Xt.prototype,"onBlur",null),Xt=$t([Object(n.Directive)({selector:"[contenteditableModel]"}),Kt("design:paramtypes",["function"==typeof(te=void 0!==n.ElementRef&&n.ElementRef)&&te||Object])],Xt);var te,ee=this&&this.__decorate||function(t,e,r,n){var s,o=arguments.length,i=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(i=(o<3?s(i):o>3?s(e,r,i):s(e,r))||i);return o>3&&i&&Object.defineProperty(e,r,i),i},re=function(){function t(){}return t}();re=ee([Object(n.NgModule)({declarations:[j,V,D,Z,gt,nt,_t,zt,Rt,gt,Xt],imports:[i.a,Vt,a.a,o.b,o.e,c.c,d.Ng2Bs3ModalModule,Qt.a.forRoot(),Qt.b.forRoot()],providers:[p,C,ht.a,{provide:l.APP_BASE_HREF,useValue:"/Admin-UI"}],bootstrap:[_t]})],re),{production:!0}.production&&Object(n.enableProdMode)(),Object(s.a)().bootstrapModule(re)},efyd:function(t,e){t.exports='\r\n\x3c!-- navigation --\x3e\r\n\r\n\r\n\x3c!-- navigation --\x3e\r\n\r\nFirst Name | \r\nLast Name | \r\nUser ID | \r\nPassword | \r\nEmail ID | \r\nUser Type | \r\nCreated Date | \r\nLast Modified Date | \r\nAccount Number | \r\nProduct Edition | \r\nStatus | \r\n
---|---|---|---|---|---|---|---|---|---|---|
{{UserEntity.FirstName}} | \r\n{{UserEntity.LastName}} | \r\n{{UserEntity.LoginId}} | \r\n{{UserEntity.Password}} | \r\n{{UserEntity.EmailId}} | \r\n{{UserEntity.UserTypeTitle}} | \r\n{{UserEntity.CreationDate| date: \'MM/dd/yyyy\'}} | \r\n{{UserEntity.ModifiedDate | date: \'MM/dd/yyyy\'}} | \r\n{{UserEntity.AccountNumber}} | \r\n{{UserEntity.EditionType}} | \r\n\r\n\r\n {{UserEntity.UserStatus}}\r\n | \r\n\r\n\r\n
Do you want to delete the selected subscription prices?
\r\n