Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
wwwroot
:
14-es2015.9d8b1429aa34b5eaeb78.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{"2F+d":function(t,e,o){"use strict";o.r(e),o.d(e,"ClarinsreportsModule",function(){return pe});var n=o("iInd"),i=o("pLZG"),r=o("8Y7J"),a=o("cUpR");const s=function(){return["WeeklyBeautyCoachSales"]},l=function(){return["GBWeeklyTargets"]},c=function(){return["NIWeeklyTargets"]},d=function(){return["Weeklyconsultantsales"]},b=function(){return["WeeklyCounterSales"]},p=function(){return["ClarinsMissingSales"]},g=function(){return["ClarinsDuplicateRecords"]},h=function(){return["ClarinsFlashReportByWeek"]},u=function(){return["ClarinsFlashReportBYGroup"]},m=function(){return["Clarins-MonthlyReports"]},f=function(){return["Clarins-ClarinsYear"]},S=function(){return["Clarins-FiscalYear"]},R=function(){return["Clarins-HistoricReports"]},C=function(){return["Clarins-GeneratorReports"]};let v=(()=>{class t{constructor(t,e,o){this.router=t,this.activatedRoute=e,this.titleService=o}ngOnInit(){this.router.events.pipe(Object(i.a)(t=>t instanceof n.b)).subscribe(()=>{this.getChild(this.activatedRoute).data.subscribe(t=>{this.titleService.setTitle(t.title)})})}getChild(t){return t.firstChild?this.getChild(t.firstChild):t}}return t.\u0275fac=function(e){return new(e||t)(r.Mb(n.e),r.Mb(n.a),r.Mb(a.c))},t.\u0275cmp=r.Gb({type:t,selectors:[["app-clarinsreports"]],decls:60,vars:28,consts:[[1,"row"],[1,"col-md-12","col-sm-12","col-xs-12"],[1,"shadow-sm","card","no-padding","h-100"],[1,"card-body","no-padding"],[1,"mega-ul"],[1,"dropdown","custom-dropdown",2,"width","175px"],["data-toggle","dropdown",1,"dropdown-toggle"],[1,"caret"],[1,"dropdown-menu","fontsize","position"],[3,"routerLink"],[1,"dropdown","custom-dropdown",2,"width","210px","text-align","center"],[1,"dropdown-menu","fontsize","position_Business"],[1,"dropdown","custom-dropdown",2,"width","165px"],[1,"dropdown","custom-dropdown",2,"width","155px"],[1,"d-flex","justify-content-center"],[1,"col-md-6"]],template:function(t,e){1&t&&(r.Sb(0,"div",0),r.Sb(1,"div",1),r.Sb(2,"div",2),r.Sb(3,"div",3),r.Sb(4,"ul",4),r.Sb(5,"li",5),r.Sb(6,"a",6),r.Kc(7,"Live Report"),r.Nb(8,"span",7),r.Rb(),r.Sb(9,"ul",8),r.Sb(10,"li"),r.Sb(11,"a",9),r.Kc(12,"Weekly Beauty Coach Sales"),r.Rb(),r.Rb(),r.Sb(13,"li"),r.Sb(14,"a",9),r.Kc(15,"GB Weekly Targets"),r.Rb(),r.Rb(),r.Sb(16,"li"),r.Sb(17,"a",9),r.Kc(18,"NI Weekly Targets"),r.Rb(),r.Rb(),r.Sb(19,"li"),r.Sb(20,"a",9),r.Kc(21,"Weekly Consultant Sales"),r.Rb(),r.Rb(),r.Sb(22,"li"),r.Sb(23,"a",9),r.Kc(24,"Weekly Counter Sales"),r.Rb(),r.Rb(),r.Sb(25,"li"),r.Sb(26,"a",9),r.Kc(27,"Clarins Missing Figures"),r.Rb(),r.Rb(),r.Sb(28,"li"),r.Sb(29,"a",9),r.Kc(30,"Clarins Duplicate Records"),r.Rb(),r.Rb(),r.Sb(31,"li"),r.Sb(32,"a",9),r.Kc(33,"Clarins Flash Report By Week"),r.Rb(),r.Rb(),r.Sb(34,"li"),r.Sb(35,"a",9),r.Kc(36,"Clarins Flash Report By Group"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(37,"li",10),r.Sb(38,"a",9),r.Kc(39,"Monthly/Periodic Reports"),r.Rb(),r.Rb(),r.Sb(40,"li",10),r.Sb(41,"a",6),r.Kc(42,"Group Business Reports"),r.Nb(43,"span",7),r.Rb(),r.Sb(44,"ul",11),r.Sb(45,"li"),r.Sb(46,"a",9),r.Kc(47,"Clarins Year"),r.Rb(),r.Rb(),r.Sb(48,"li"),r.Sb(49,"a",9),r.Kc(50,"Fiscal Year"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(51,"li",12),r.Sb(52,"a",9),r.Kc(53,"Historic Reports"),r.Rb(),r.Rb(),r.Sb(54,"li",13),r.Sb(55,"a",9),r.Kc(56,"Generator Reports"),r.Rb(),r.Rb(),r.Rb(),r.Sb(57,"div",14),r.Sb(58,"div",15),r.Nb(59,"router-outlet"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb()),2&t&&(r.yb(11),r.mc("routerLink",r.pc(14,s)),r.yb(3),r.mc("routerLink",r.pc(15,l)),r.yb(3),r.mc("routerLink",r.pc(16,c)),r.yb(3),r.mc("routerLink",r.pc(17,d)),r.yb(3),r.mc("routerLink",r.pc(18,b)),r.yb(3),r.mc("routerLink",r.pc(19,p)),r.yb(3),r.mc("routerLink",r.pc(20,g)),r.yb(3),r.mc("routerLink",r.pc(21,h)),r.yb(3),r.mc("routerLink",r.pc(22,u)),r.yb(3),r.mc("routerLink",r.pc(23,m)),r.yb(8),r.mc("routerLink",r.pc(24,f)),r.yb(3),r.mc("routerLink",r.pc(25,S)),r.yb(3),r.mc("routerLink",r.pc(26,R)),r.yb(3),r.mc("routerLink",r.pc(27,C)))},directives:[n.g,n.i],styles:['.card-body[_ngcontent-%COMP%]{flex:1 1 auto;min-height:525px;max-height:525px;padding-left:5px;padding-right:5px;padding-bottom:4px}.mega-ul[_ngcontent-%COMP%]{background:#bc1135;padding:1px;font-weight:600;font-family:Century Gothic}.row[_ngcontent-%COMP%]{margin-right:10px;margin-left:10px;margin-top:4px}.h-100[_ngcontent-%COMP%]{border:1px dotted #c22}.custom-dropdown[_ngcontent-%COMP%]{display:inline-block;padding:10px;margin-right:10px;border-radius:10px;font-size:15px}.custom-dropdown[_ngcontent-%COMP%] .dropdown-toggle[_ngcontent-%COMP%]{cursor:pointer;color:#fff}.dropdown-menu[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{color:#cc0b0b;font-size:18px;font-weight:600;text-decoration:none;font-family:Century Gothic;padding:5px 10px}.dropdown-menu[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]:hover{background-color:#cc0b0b;color:#fff;display:block}.custom-dropdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#fff;text-decoration:none;font-family:Century Gothic}.custom-dropdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:bisque;text-decoration:none}.custom-dropdown[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%]{left:-1px;top:41px}.dropdown-menu[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:first-of-type:before{position:absolute;display:block;margin-top:-8px;margin-left:40px;width:0;height:0;border-right:8px solid transparent;border-bottom:8px solid #fff;border-left:8px solid transparent;content:""}.dropdown-menu[_ngcontent-%COMP%]{border:1px solid #cc0b0a;padding:3px}.fontsize[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-size:18px!important;font-weight:700!important;line-height:32px;font-family:Century Gothic}.position[_ngcontent-%COMP%]{width:300px}.position[_ngcontent-%COMP%], .position_Business[_ngcontent-%COMP%]{position:absolute;transform:translate3d(0,31px,0)!important;top:0;left:0;will-change:transform;margin-top:12px}.position_Business[_ngcontent-%COMP%]{width:200px}']}),t})();var x=o("mrSG"),O=o("LRne"),y=o("Cfvw"),M=o("dufq"),A=o("6+wN"),P=o("s7LF"),w=o("+CKi"),N=o("OUGR"),E=o("SVse"),F=o("frZy"),k=o("JqCM"),_=o("dbUT");function G(t,e){if(1&t&&(r.Sb(0,"option",29),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function T(t,e){if(1&t&&(r.Sb(0,"option",29),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function I(t,e){if(1&t&&(r.Sb(0,"option",29),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function L(t,e){if(1&t&&(r.Sb(0,"option",29),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}let W=(()=>{class t{constructor(t,e,o,n,i,r,a,s){this.fb=t,this.router=e,this.activatedRoute=o,this.sharedService=n,this.clarinsreportservice=i,this.datePipe=r,this.pdfService=a,this.spinner=s,this.YEARS=this.sharedService.YEAR.asObservable(),this.MONTHS=this.sharedService.MONTH.asObservable(),this.STOGRPCODES=this.sharedService.STOGRPCODE.asObservable(),this.placeholder="Enter Search String",this.keyword="Name",this.REPORTTYPES=Object(O.a)([{Value:"All",Name:"All"},{Value:"STORES",Name:"STORES"},{Value:"WEBS",Name:"WEBS"}]),this.CreateClarinsMissingSalesForm()}CreateClarinsMissingSalesForm(){this.ClarinsMissingSalesForm=this.fb.group({ClarinsMissingSales:this.fb.group({REPORTTYPES:[""],ACC:[""],YEAR:[""],MONTH:[""],STOGRPCODE:[""],REGION:[""],AREA:[""]})})}get ClarinsMissingSales(){return this.ClarinsMissingSalesForm.get("ClarinsMissingSales")}ngOnInit(){this.ReportTypes=this.REPORTTYPES,this.YEARS=Object(y.a)([this.activatedRoute.snapshot.data.Years]),this.GetMonth(),this.GetSTOGRPCODE(),this.InitialValue()}InitialValue(){this.ClarinsMissingSales.get("REPORTTYPES").setValue("All"),this.ClarinsMissingSales.get("YEAR").setValue((new Date).getFullYear()),this.ClarinsMissingSales.get("MONTH").setValue("All"),this.ClarinsMissingSales.get("STOGRPCODE").setValue("All")}resetForm(){this.ClarinsMissingSalesForm.reset(),this.InitialValue()}GetMonth(){this.sharedService.GetMonth().subscribe(t=>{this.sharedService.datastore.data=t,this.sharedService.MONTH.next(Object.assign({},this.sharedService.datastore).data),this.sharedService.datastore.data.unshift({Value:"All",Name:"All"})},t=>console.log("Could not load MONTHS."))}GetSTOGRPCODE(){this.sharedService.GetSTOGRPCODE(M.d.STOGRPCODE_CLARINS).subscribe(t=>{this.sharedService.datastore.data=t,this.sharedService.STOGRPCODE.next(Object.assign({},this.sharedService.datastore).data),this.sharedService.datastore.data.unshift({Value:"All",Name:"All"})},t=>console.log("Could not load STOGRPCODES."))}rptClarinsMissingSales(t,e,o,n){let i;this.spinner.show(),this.clarinsreportservice.rptClarinsMissingSales(t,e,o,n,0,0,0).subscribe(t=>{i=new Blob([t],{type:"application/pdf"})},t=>{console.log(t)},()=>{let t=URL.createObjectURL(i);window.open(t,"_blank"),this.spinner.hide()})}GeneratePDF(t,e,o,n){return Object(x.a)(this,void 0,void 0,function*(){yield this.pdfService.loadPdfMaker(),this.pdfService.pdfMake.createPdf(this.DocumentDefinition(t,e,o,n)).open()})}DocumentDefinition(t,e,o,n){this.pdfService.GetClarinsMissingFigures(t,e,o,n).subscribe(t=>{this.externalDataRetrievedFromServer=t},t=>console.log("Could not load Clarins Missing Figures data.")),this.pdfService.pdfMake.tableLayouts={exampleLayout:{hLineWidth:function(t,e){return 0},vLineWidth:function(t,e){return 0},paddingLeft:function(t){return 0===t?10:2},paddingRight:function(t,e){return t===e.table.widths.length-1?0:2},alignment:function(t){return 0===t?"right":"left"}}};var i,r,a=this.datePipe.transform(new Date,"dd-MMM-yyyy");return{pageMargins:[40,113,40,40],header:function(){return[{fontSize:8,columns:[{},{image:A.a.clarinslogoforreport,height:25,width:220,alignment:"right",margin:[0,20,20,5]}]},{fontSize:8,columns:[{text:"Clarins Missing Figures: "+t,bold:!0,alignment:"left",fontSize:10,margin:[40,0,0,5]},{text:"Generated on: "+a,bold:!0,alignment:"right",fontSize:10,margin:[0,0,40,5]}]},{canvas:[{type:"line",x1:40,y1:10,x2:555,y2:10,lineWidth:.01,color:"#cc2222"}]},{margin:[40,1,40,1],table:{body:[[{fillColor:"lightgreen",color:"#FFFFFF",fontSize:11,bold:!0,columns:[{width:35,text:"\nAREA",margin:[4,0,0,0]},{width:33,text:"\nACC"},{width:48,text:"Sales\nExpected"},{width:139,text:"\nStore Name"},{width:109,text:"\nTown"},{width:75,text:"\nTelephone"},{width:46,text:"\nWeek"}],columnGap:5}]]},layout:"noBorders"},{canvas:[{type:"line",x1:40,y1:0,x2:555,y2:0,lineWidth:.01,color:"#cc2222"}]}]},footer:function(t,e){return{text:t.toString()+" / "+e,alignment:"right",margin:[0,10,40,0]}},content:[(i=this.externalDataRetrievedFromServer,r=["AREA","ACC","SALESEXPECTED","STORE","TOWN","TELEPHONE","WEEK"],{fontSize:8,table:{widths:[26,35,45,144,110,75,45],headerRows:1,body:function(t,e){var o=[];return t.forEach(t=>{var n=[];e.forEach(e=>{var o,i,r,a;n.push("WEEK"===e?(i=""+((o=new Date(t[e])).getMonth()+1),r=""+(o.getDate()+1),a=o.getFullYear(),i.length<2&&(i="0"+i),r.length<2&&(r="0"+r),[r,i,a].join("/")):t[e])}),o.push(n)}),o}(i,r)},layout:"exampleLayout"})]}}}return t.\u0275fac=function(e){return new(e||t)(r.Mb(P.c),r.Mb(n.e),r.Mb(n.a),r.Mb(w.a),r.Mb(N.a),r.Mb(E.f),r.Mb(F.a),r.Mb(k.c))},t.\u0275cmp=r.Gb({type:t,selectors:[["app-clarins-missing-sales"]],decls:56,vars:14,consts:[[1,"container-fluid"],["autocomplete","off",3,"formGroup"],[1,"row"],[1,"col-md-12"],[1,"shadow-sm","card","no-padding"],[1,"card-body","no-padding"],["formGroupName","ClarinsMissingSales"],["id","grad1"],[1,"col-md-12","full-report","report-round",2,"height","300px"],[1,"text-center",2,"margin-top","15px"],[1,"text-center"],[1,"col-sm-12",2,"margin-top","40px"],[1,"row","no-padding","mb-1"],["for","ReportType",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],[1,"col-sm-5"],["formControlName","REPORTTYPES",1,"form-control","form-control-sm"],[3,"value",4,"ngFor","ngForOf"],[1,"col-sm-12"],["for","Year",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],["formControlName","YEAR",1,"form-control","form-control-sm"],["for","MONTH",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],["formControlName","MONTH",1,"form-control","form-control-sm"],["for","STOGRPCODE",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],["formControlName","STOGRPCODE",1,"form-control","form-control-sm"],[1,"text-center","mt-2","mb-1"],["mdbBtn","","type","submit","gradient","blue","rounded","true","mdbWavesEffect","",3,"click"],["mdbBtn","","type","button","gradient","blue","rounded","true","mdbWavesEffect","",3,"click"],["bdColor","rgba(255,255,255,0.5)","size","small","color","#cc2222","type","ball-spin-clockwise-fade",3,"fullScreen"],[2,"color","#cc2222","font-size","22px"],[3,"value"]],template:function(t,e){1&t&&(r.Sb(0,"div",0),r.Sb(1,"form",1),r.Sb(2,"div",2),r.Sb(3,"div",3),r.Sb(4,"div",4),r.Sb(5,"div",5),r.Sb(6,"div",6),r.Sb(7,"div",7),r.Sb(8,"div",8),r.Sb(9,"div",3),r.Sb(10,"h4",9),r.Kc(11,"Report Parameters"),r.Rb(),r.Sb(12,"h4",10),r.Kc(13,"Enter values for the Parameters"),r.Rb(),r.Rb(),r.Sb(14,"div",3),r.Sb(15,"div",11),r.Sb(16,"div",12),r.Sb(17,"label",13),r.Kc(18,"Report Type:"),r.Rb(),r.Sb(19,"div",14),r.Sb(20,"select",15),r.Ic(21,G,2,2,"option",16),r.fc(22,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(23,"div",17),r.Sb(24,"div",12),r.Sb(25,"label",18),r.Kc(26,"YEAR:"),r.Rb(),r.Sb(27,"div",14),r.Sb(28,"select",19),r.Ic(29,T,2,2,"option",16),r.fc(30,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(31,"div",17),r.Sb(32,"div",12),r.Sb(33,"label",20),r.Kc(34,"MONTH:"),r.Rb(),r.Sb(35,"div",14),r.Sb(36,"select",21),r.Ic(37,I,2,2,"option",16),r.fc(38,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(39,"div",17),r.Sb(40,"div",12),r.Sb(41,"label",22),r.Kc(42,"STOGRPCODE:"),r.Rb(),r.Sb(43,"div",14),r.Sb(44,"select",23),r.Ic(45,L,2,2,"option",16),r.fc(46,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(47,"div",3),r.Sb(48,"div",24),r.Sb(49,"button",25),r.cc("click",function(){return e.rptClarinsMissingSales(e.ClarinsMissingSales.get("REPORTTYPES").value,e.ClarinsMissingSales.get("YEAR").value,"All"===e.ClarinsMissingSales.get("MONTH").value?0:e.ClarinsMissingSales.get("MONTH").value,e.ClarinsMissingSales.get("STOGRPCODE").value)}),r.Kc(50," Submit"),r.Rb(),r.Sb(51,"button",26),r.cc("click",function(){return e.resetForm()}),r.Kc(52," Reset"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(53,"ngx-spinner",27),r.Sb(54,"p",28),r.Kc(55," Loading... "),r.Rb(),r.Rb(),r.Rb()),2&t&&(r.yb(1),r.mc("formGroup",e.ClarinsMissingSalesForm),r.yb(20),r.mc("ngForOf",r.gc(22,6,e.ReportTypes)),r.yb(8),r.mc("ngForOf",r.gc(30,8,e.YEARS)),r.yb(8),r.mc("ngForOf",r.gc(38,10,e.MONTHS)),r.yb(8),r.mc("ngForOf",r.gc(46,12,e.STOGRPCODES)),r.yb(8),r.mc("fullScreen",!1))},directives:[P.t,P.m,P.g,P.h,P.q,P.l,P.e,E.m,_.b,_.c,k.a,P.o,P.s],pipes:[E.b],styles:[".full-report[_ngcontent-%COMP%]{border:1px solid #e6e9ed;border-bottom-color:rgba(202,245,159,.8)}.report-round[_ngcontent-%COMP%]{border-radius:10px}label[_ngcontent-%COMP%]{text-transform:uppercase}.report-head-bg[_ngcontent-%COMP%]{border-top-left-radius:10px;border-top-right-radius:10px;background:#e6e9ed}.report-foot-bg[_ngcontent-%COMP%]{border-bottom-left-radius:10px;border-bottom-right-radius:10px;background:#e6e9ed;height:40px}.keep-middle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:-5px}.txt-width-300[_ngcontent-%COMP%]{width:300px!important;height:30px!important;margin-bottom:4px;font-family:Courier New;font-size:small}.selectwidthauto[_ngcontent-%COMP%]{width:auto!important}.font-label[_ngcontent-%COMP%]{font-size:12px}#grad1[_ngcontent-%COMP%]{height:355px;background:linear-gradient(180deg,#fff,#f5f5f5)}.no-padding[_ngcontent-%COMP%]{padding:0}.right-padding[_ngcontent-%COMP%]{padding-right:10px;font-weight:400}button[_ngcontent-%COMP%]{height:28px;width:75px;padding-top:5px;padding-left:5px;padding-right:5px;margin-right:0;margin-left:2px}"]}),t})();function Y(t,e){if(1&t&&(r.Sb(0,"option",26),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function D(t,e){if(1&t&&(r.Sb(0,"option",26),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}let V=(()=>{class t{constructor(t,e,o,n,i,r){this.fb=t,this.router=e,this.activatedRoute=o,this.clarinsreportservice=n,this.sharedService=i,this.spinner=r,this.YEARS=this.sharedService.YEAR.asObservable(),this.MONTHS=this.sharedService.MONTH.asObservable(),this.CreateClarinsDuplicateRecordsForm()}CreateClarinsDuplicateRecordsForm(){this.ClarinsDuplicateRecordsForm=this.fb.group({ClarinsDuplicateRecords:this.fb.group({YEAR:[""],MONTH:[""]})})}get ClarinsDuplicateRecords(){return this.ClarinsDuplicateRecordsForm.get("ClarinsDuplicateRecords")}ngOnInit(){this.YEARS=Object(y.a)([this.activatedRoute.snapshot.data.Years]),this.GetMonth(),this.InitialValue()}InitialValue(){this.ClarinsDuplicateRecords.get("YEAR").setValue((new Date).getFullYear()),this.ClarinsDuplicateRecords.get("MONTH").setValue("All")}GetMonth(){this.sharedService.GetMonth().subscribe(t=>{this.sharedService.datastore.data=t,this.sharedService.MONTH.next(Object.assign({},this.sharedService.datastore).data),this.sharedService.datastore.data.unshift({Value:"All",Name:"All"})},t=>console.log("Could not load MONTHS."))}resetForm(){this.ClarinsDuplicateRecords.reset(),this.InitialValue()}rptClarinsDuplicateRecords(t,e){let o;this.spinner.show(),this.clarinsreportservice.rptClarinsDuplicateRecords(t,e).subscribe(t=>{o=new Blob([t],{type:"application/pdf"})},t=>{console.log(t)},()=>{let t=URL.createObjectURL(o);window.open(t,"_blank"),this.spinner.hide()})}}return t.\u0275fac=function(e){return new(e||t)(r.Mb(P.c),r.Mb(n.e),r.Mb(n.a),r.Mb(N.a),r.Mb(w.a),r.Mb(k.c))},t.\u0275cmp=r.Gb({type:t,selectors:[["app-clarins-duplicate-records"]],decls:40,vars:8,consts:[[1,"container-fluid"],["autocomplete","off",3,"formGroup"],[1,"row"],[1,"col-md-12"],[1,"shadow-sm","card","no-padding"],[1,"card-body","no-padding"],["formGroupName","ClarinsDuplicateRecords"],["id","grad1"],[1,"col-md-12","full-report","report-round",2,"height","300px"],[1,"text-center",2,"margin-top","35px"],[1,"text-center"],[1,"col-sm-12",2,"margin-top","35px"],[1,"row","no-padding","mb-2"],["for","Year",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],[1,"col-sm-5"],["formControlName","YEAR",1,"form-control","form-control-sm"],[3,"value",4,"ngFor","ngForOf"],[1,"col-sm-12"],[1,"row","no-padding","mb-1"],["for","MONTH",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],["formControlName","MONTH",1,"form-control","form-control-sm"],[1,"text-center","mt-2","mb-1"],["mdbBtn","","type","submit","gradient","blue","rounded","true","mdbWavesEffect","",3,"click"],["mdbBtn","","type","button","gradient","blue","rounded","true","mdbWavesEffect","",3,"click"],["bdColor","rgba(255,255,255,0.5)","size","small","color","#cc2222","type","ball-spin-clockwise-fade",3,"fullScreen"],[2,"color","#cc2222","font-size","22px"],[3,"value"]],template:function(t,e){1&t&&(r.Sb(0,"div",0),r.Sb(1,"form",1),r.Sb(2,"div",2),r.Sb(3,"div",3),r.Sb(4,"div",4),r.Sb(5,"div",5),r.Sb(6,"div",6),r.Sb(7,"div",7),r.Sb(8,"div",8),r.Sb(9,"div",3),r.Sb(10,"h4",9),r.Kc(11,"Report Parameters"),r.Rb(),r.Sb(12,"h4",10),r.Kc(13,"Enter values for the Parameters"),r.Rb(),r.Rb(),r.Sb(14,"div",3),r.Sb(15,"div",11),r.Sb(16,"div",12),r.Sb(17,"label",13),r.Kc(18,"YEAR:"),r.Rb(),r.Sb(19,"div",14),r.Sb(20,"select",15),r.Ic(21,Y,2,2,"option",16),r.fc(22,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(23,"div",17),r.Sb(24,"div",18),r.Sb(25,"label",19),r.Kc(26,"MONTH:"),r.Rb(),r.Sb(27,"div",14),r.Sb(28,"select",20),r.Ic(29,D,2,2,"option",16),r.fc(30,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(31,"div",3),r.Sb(32,"div",21),r.Sb(33,"button",22),r.cc("click",function(){return e.rptClarinsDuplicateRecords(e.ClarinsDuplicateRecords.get("YEAR").value,"All"===e.ClarinsDuplicateRecords.get("MONTH").value?0:e.ClarinsDuplicateRecords.get("MONTH").value)}),r.Kc(34," Submit"),r.Rb(),r.Sb(35,"button",23),r.cc("click",function(){return e.resetForm()}),r.Kc(36," Reset"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(37,"ngx-spinner",24),r.Sb(38,"p",25),r.Kc(39," Loading... "),r.Rb(),r.Rb(),r.Rb()),2&t&&(r.yb(1),r.mc("formGroup",e.ClarinsDuplicateRecordsForm),r.yb(20),r.mc("ngForOf",r.gc(22,4,e.YEARS)),r.yb(8),r.mc("ngForOf",r.gc(30,6,e.MONTHS)),r.yb(8),r.mc("fullScreen",!1))},directives:[P.t,P.m,P.g,P.h,P.q,P.l,P.e,E.m,_.b,_.c,k.a,P.o,P.s],pipes:[E.b],styles:[".full-report[_ngcontent-%COMP%]{border:1px solid #e6e9ed;border-bottom-color:rgba(202,245,159,.8)}.report-round[_ngcontent-%COMP%]{border-radius:10px}.report-head-bg[_ngcontent-%COMP%]{border-top-left-radius:10px;border-top-right-radius:10px;background:#e6e9ed}.report-foot-bg[_ngcontent-%COMP%]{border-bottom-left-radius:10px;border-bottom-right-radius:10px;background:#e6e9ed;height:40px}.keep-middle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:-5px}.txt-width-300[_ngcontent-%COMP%]{width:300px!important;height:30px!important;margin-bottom:4px;font-family:Courier New;font-size:small}.selectwidthauto[_ngcontent-%COMP%]{width:auto!important}.font-label[_ngcontent-%COMP%]{font-size:12px}#grad1[_ngcontent-%COMP%]{height:355px;background:linear-gradient(180deg,#fff,#f5f5f5)}.no-padding[_ngcontent-%COMP%]{padding:0}.right-padding[_ngcontent-%COMP%]{padding-right:10px;font-weight:400}button[_ngcontent-%COMP%]{height:28px;width:75px;padding-top:5px;padding-left:5px;padding-right:5px;margin-right:0;margin-left:2px}"]}),t})();var B=o("bH2/");function K(t,e){1&t&&r.Nb(0,"a",43),2&t&&r.mc("innerHTML",e.$implicit.Name,r.Ac)}function z(t,e){1&t&&r.Nb(0,"div",43),2&t&&r.mc("innerHTML",e.$implicit,r.Ac)}function H(t,e){if(1&t&&(r.Sb(0,"option",44),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function U(t,e){if(1&t&&(r.Sb(0,"option",44),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function j(t,e){if(1&t&&(r.Sb(0,"option",44),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function $(t,e){if(1&t&&(r.Sb(0,"option",44),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function J(t,e){1&t&&r.Nb(0,"a",43),2&t&&r.mc("innerHTML",e.$implicit.Name,r.Ac)}function q(t,e){1&t&&r.Nb(0,"div",43),2&t&&r.mc("innerHTML",e.$implicit,r.Ac)}function Q(t,e){if(1&t&&(r.Sb(0,"option",44),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}let Z=(()=>{class t{constructor(t,e,o,n,i,r){this.fb=t,this.router=e,this.activatedRoute=o,this.clarinsreportservice=n,this.sharedService=i,this.spinner=r,this.placeholder="Enter Search String",this.keyword="Name",this.YEARS=this.sharedService.YEAR.asObservable(),this.AREAS=this.sharedService.AREA.asObservable(),this.STOGRPCODES=this.sharedService.STOGRPCODE.asObservable(),this.REGIONS=this.sharedService.REGION.asObservable(),this.TOWNS=this.sharedService.TOWN.asObservable(),this.Categories=this.sharedService.Category.asObservable(),this.CreateClarinsFlashReportByWeekForm()}CreateClarinsFlashReportByWeekForm(){this.ClarinsFlashReportByWeekForm=this.fb.group({ClarinsFlashReportByWeek:this.fb.group({ACC:[""],YEAR:[""],AREA:[""],STOGRPCODE:[""],REGION:[""],TOWN:[""],CATEGORY:[""]})})}get ClarinsFlashReportByWeek(){return this.ClarinsFlashReportByWeekForm.get("ClarinsFlashReportByWeek")}ngOnInit(){this.AllAccount=this.sharedService.GetStore(M.e.WeeklyConsultantSales),this.GetYear(),this.GetArea(),this.GetSTOGRPCODE(),this.GetRegion(),this.GetTown(),this.GetCategories(),this.InitialValue(),this.routerEvents()}InitialValue(){this.ClarinsFlashReportByWeek.get("REGION").setValue("All"),this.ClarinsFlashReportByWeek.get("AREA").setValue("All"),this.ClarinsFlashReportByWeek.get("CATEGORY").setValue("All"),this.ClarinsFlashReportByWeek.get("STOGRPCODE").setValue("All"),this.ClarinsFlashReportByWeek.get("YEAR").setValue((new Date).getFullYear())}ResetForm(){this.ClarinsFlashReportByWeekForm.reset(),this.AllAccount=this.sharedService.GetStore(M.e.WeeklyConsultantSales),this.GetTown(),this.InitialValue(),this.getVal()}getVal(){return{Value:"0",Name:"All"}}GetYear(){Object(y.a)([this.activatedRoute.snapshot.data.Years]).subscribe(t=>{this.sharedService.datastore.data=t,this.sharedService.YEAR.next(Object.assign({},this.sharedService.datastore).data)},t=>console.log("Could not load YEARS."))}GetRegion(){this.sharedService.GetRegion(M.c.REGION_BB).subscribe(t=>{this.sharedService.datastore.data=t,this.sharedService.REGION.next(Object.assign({},this.sharedService.datastore).data),this.sharedService.datastore.data.unshift({Value:"All",Name:"All"})},t=>console.log("Could not load REGIONS."))}GetTown(){this.sharedService.GetTown(M.f.TOWN_CLARINS).subscribe(t=>{this.sharedService.datastore.data=t,this.sharedService.TOWN.next(Object.assign({},this.sharedService.datastore).data)},t=>console.log("Could not load TOWNS."))}GetArea(){this.sharedService.GetArea(M.a.AREA_CLARINS).subscribe(t=>{this.sharedService.datastore.data=t,this.sharedService.AREA.next(Object.assign({},this.sharedService.datastore).data),this.sharedService.datastore.data.unshift({Value:"All",Name:"All"})},t=>console.log("Could not load AREAS."))}GetCategories(){this.sharedService.GetCategories().subscribe(t=>{this.sharedService.datastore.data=t,this.sharedService.Category.next(Object.assign({},this.sharedService.datastore).data),this.sharedService.datastore.data.unshift({Value:"All",Name:"All"})},t=>console.log("Could not load Caterories."))}GetSTOGRPCODE(){this.sharedService.GetSTOGRPCODE(M.d.STOGRPCODE_CLARINS).subscribe(t=>{this.sharedService.datastore.data=t,this.sharedService.STOGRPCODE.next(Object.assign({},this.sharedService.datastore).data),this.sharedService.datastore.data.unshift({Value:"All",Name:"All"})},t=>console.log("Could not load STOGRPCODE."))}selectEvent(t){}onChangeSearch(t){}searchCleared(){}selectEventT(t){}onChangeSearchT(t){}searchClearedT(){}routerEvents(){this.router.events.subscribe(t=>{switch(!0){case t instanceof n.d:this.isLoader=!0;break;case t instanceof n.b:this.isLoader=!1}})}rptClarinsFlashReportByWeek(t,e,o,n,i,r,a){let s;this.spinner.show(),this.clarinsreportservice.rptClarinsFlashReportByWeek(null==t.Value||""===t.Value?0:t.Value,e,o,n,i,null==r.Value||""===r.Value?"All":r.Value,a).subscribe(t=>{s=new Blob([t],{type:"application/pdf"})},t=>{console.log(t)},()=>{let t=URL.createObjectURL(s);window.open(t,"_blank"),this.spinner.hide()})}}return t.\u0275fac=function(e){return new(e||t)(r.Mb(P.c),r.Mb(n.e),r.Mb(n.a),r.Mb(N.a),r.Mb(w.a),r.Mb(k.c))},t.\u0275cmp=r.Gb({type:t,selectors:[["app-clarins-flash-report-by-week"]],decls:87,vars:35,consts:[[1,"container-fluid"],["autocomplete","off",3,"formGroup"],[1,"row"],[1,"col-md-12"],[1,"shadow-sm","card","no-padding"],[1,"card-body","no-padding"],["formGroupName","ClarinsFlashReportByWeek"],["id","grad1"],[1,"col-md-12","full-report","report-round",2,"height","375px"],[1,"text-center",2,"margin-top","15px"],[1,"text-center"],[1,"col-sm-12",2,"margin-top","20px"],[1,"row","no-padding","mb-2"],["for","store",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],[1,"col-sm-8",2,"padding-left","10px"],["formControlName","ACC","id","ACC","name","ACC","notFoundText","Not found",3,"data","initialValue","searchKeyword","placeholder","minQueryLength","itemTemplate","notFoundTemplate","debounceTime","selected","inputChanged","inputCleared"],["ngAutoCompleteStatic",""],["itemTemplateStatic",""],["notFoundTemplate",""],[1,"col-sm-12"],[1,"row","no-padding","mb-1"],["for","Year",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],[1,"col-sm-4",2,"padding-left","10px"],["formControlName","YEAR",1,"form-control","form-control-sm"],[3,"value",4,"ngFor","ngForOf"],["for","Area",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],["formControlName","AREA",1,"form-control","form-control-sm"],["for","Store Group",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],["formControlName","STOGRPCODE",1,"form-control","form-control-sm"],["for","Region",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],["formControlName","REGION",1,"form-control","form-control-sm"],["for","Town",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],[1,"col-sm-6",2,"padding-left","10px"],["formControlName","TOWN","id","TOWN","name","TOWN","notFoundText","Not found",3,"data","initialValue","searchKeyword","placeholder","minQueryLength","itemTemplate","notFoundTemplate","debounceTime","selected","inputChanged","inputCleared"],["itemTemplateStatic2",""],["notFoundTemplate2",""],["for","Category",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],["formControlName","CATEGORY",1,"form-control","form-control-sm"],[1,"text-center","mt-2"],["mdbBtn","","type","submit","gradient","blue","rounded","true","mdbWavesEffect","",3,"click"],["mdbBtn","","type","button","gradient","blue","rounded","true","mdbWavesEffect","",3,"click"],["bdColor","rgba(255,255,255,0.5)","size","small","color","#cc2222","type","ball-spin-clockwise-fade",3,"fullScreen"],[2,"color","#cc2222","font-size","22px"],[3,"innerHTML"],[3,"value"]],template:function(t,e){if(1&t&&(r.Sb(0,"div",0),r.Sb(1,"form",1),r.Sb(2,"div",2),r.Sb(3,"div",3),r.Sb(4,"div",4),r.Sb(5,"div",5),r.Sb(6,"div",6),r.Sb(7,"div",7),r.Sb(8,"div",8),r.Sb(9,"div",3),r.Sb(10,"h4",9),r.Kc(11,"Report Parameters"),r.Rb(),r.Sb(12,"h4",10),r.Kc(13,"Enter values for the Parameters"),r.Rb(),r.Rb(),r.Sb(14,"div",11),r.Sb(15,"div",12),r.Sb(16,"label",13),r.Kc(17,"Store Name:"),r.Rb(),r.Sb(18,"div",14),r.Sb(19,"ng-autocomplete",15,16),r.cc("selected",function(t){return e.selectEvent(t)})("inputChanged",function(t){return e.onChangeSearch(t)})("inputCleared",function(){return e.searchCleared()}),r.fc(21,"async"),r.Rb(),r.Ic(22,K,1,1,"ng-template",null,17,r.Jc),r.Ic(24,z,1,1,"ng-template",null,18,r.Jc),r.Rb(),r.Rb(),r.Rb(),r.Sb(26,"div",19),r.Sb(27,"div",20),r.Sb(28,"label",21),r.Kc(29,"Year:"),r.Rb(),r.Sb(30,"div",22),r.Sb(31,"select",23),r.Ic(32,H,2,2,"option",24),r.fc(33,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(34,"div",19),r.Sb(35,"div",20),r.Sb(36,"label",25),r.Kc(37,"Area:"),r.Rb(),r.Sb(38,"div",22),r.Sb(39,"select",26),r.Ic(40,U,2,2,"option",24),r.fc(41,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(42,"div",19),r.Sb(43,"div",20),r.Sb(44,"label",27),r.Kc(45,"Store Group Code:"),r.Rb(),r.Sb(46,"div",22),r.Sb(47,"select",28),r.Ic(48,j,2,2,"option",24),r.fc(49,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(50,"div",19),r.Sb(51,"div",20),r.Sb(52,"label",29),r.Kc(53,"Region:"),r.Rb(),r.Sb(54,"div",22),r.Sb(55,"select",30),r.Ic(56,$,2,2,"option",24),r.fc(57,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(58,"div",19),r.Sb(59,"div",20),r.Sb(60,"label",31),r.Kc(61,"Town:"),r.Rb(),r.Sb(62,"div",32),r.Sb(63,"ng-autocomplete",33,16),r.cc("selected",function(t){return e.selectEventT(t)})("inputChanged",function(t){return e.onChangeSearchT(t)})("inputCleared",function(){return e.searchClearedT()}),r.fc(65,"async"),r.Rb(),r.Ic(66,J,1,1,"ng-template",null,34,r.Jc),r.Ic(68,q,1,1,"ng-template",null,35,r.Jc),r.Rb(),r.Rb(),r.Rb(),r.Sb(70,"div",19),r.Sb(71,"div",20),r.Sb(72,"label",36),r.Kc(73,"Category:"),r.Rb(),r.Sb(74,"div",32),r.Sb(75,"select",37),r.Ic(76,Q,2,2,"option",24),r.fc(77,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(78,"div",3),r.Sb(79,"div",38),r.Sb(80,"button",39),r.cc("click",function(){return e.rptClarinsFlashReportByWeek(e.ClarinsFlashReportByWeek.get("ACC").value,e.ClarinsFlashReportByWeek.get("YEAR").value,"All"===e.ClarinsFlashReportByWeek.get("AREA").value?0:e.ClarinsFlashReportByWeek.get("AREA").value,e.ClarinsFlashReportByWeek.get("STOGRPCODE").value,"All"===e.ClarinsFlashReportByWeek.get("REGION").value?0:e.ClarinsFlashReportByWeek.get("REGION").value,e.ClarinsFlashReportByWeek.get("TOWN").value,e.ClarinsFlashReportByWeek.get("CATEGORY").value)}),r.Kc(81," Submit"),r.Rb(),r.Sb(82,"button",40),r.cc("click",function(){return e.ResetForm()}),r.Kc(83," Reset"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(84,"ngx-spinner",41),r.Sb(85,"p",42),r.Kc(86," Loading... "),r.Rb(),r.Rb(),r.Rb()),2&t){const t=r.wc(23),o=r.wc(25),n=r.wc(67),i=r.wc(69);r.yb(1),r.mc("formGroup",e.ClarinsFlashReportByWeekForm),r.yb(18),r.mc("data",r.gc(21,21,e.AllAccount))("searchKeyword",e.keyword)("placeholder",e.placeholder)("minQueryLength",2)("itemTemplate",t)("notFoundTemplate",o)("debounceTime",10),r.yb(13),r.mc("ngForOf",r.gc(33,23,e.YEARS)),r.yb(8),r.mc("ngForOf",r.gc(41,25,e.AREAS)),r.yb(8),r.mc("ngForOf",r.gc(49,27,e.STOGRPCODES)),r.yb(8),r.mc("ngForOf",r.gc(57,29,e.REGIONS)),r.yb(7),r.mc("data",r.gc(65,31,e.TOWNS))("searchKeyword",e.keyword)("placeholder",e.placeholder)("minQueryLength",2)("itemTemplate",n)("notFoundTemplate",i)("debounceTime",10),r.yb(13),r.mc("ngForOf",r.gc(77,33,e.Categories)),r.yb(8),r.mc("fullScreen",!1)}},directives:[P.t,P.m,P.g,P.h,B.a,P.l,P.e,P.q,E.m,_.b,_.c,k.a,P.o,P.s],pipes:[E.b],styles:["button[_ngcontent-%COMP%]{height:28px;width:75px;padding-top:5px;padding-left:5px;padding-right:5px;margin-right:0;margin-left:2px}label[_ngcontent-%COMP%]{text-transform:uppercase}[_nghost-%COMP%] .ng-autocomplete{line-height:0!important;white-space:nowrap}[_nghost-%COMP%] .autocomplete-container{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);position:relative;overflow:visible;height:30px;border-radius:4px;padding-right:0;margin-right:0}[_nghost-%COMP%] .autocomplete-container .input-container input{font-size:12px;font-weight:500!important;box-sizing:border-box;border:none;box-shadow:none;outline:none;background-color:#fff;color:rgba(0,0,0,.87);width:100%;line-height:4px;height:30px;padding:0 5px 0 12px}[_nghost-%COMP%] .autocomplete-container .input-container .x{position:absolute;right:2px;margin:auto;cursor:pointer;top:50%;transform:translateY(-50%)}[_nghost-%COMP%] .autocomplete-container .suggestions-container{display:grid;padding-right:1px;border:1px solid #b0c4de}[_nghost-%COMP%] .autocomplete-container .suggestions-container li:hover a{background-color:rgba(255,0,0,.6);color:#fff!important}[_nghost-%COMP%] .autocomplete-container .suggestions-container ul{padding:0;margin:0;max-height:300px;overflow-y:auto}[_nghost-%COMP%] .autocomplete-container .suggestions-container ul li a{padding:11px 5px 10px 12px;display:block;text-decoration:none;cursor:pointer;color:rgba(0,0,0,.87);font-size:10px;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;font-weight:700!important}.full-report[_ngcontent-%COMP%]{border:1px solid #e6e9ed;padding-left:2px}.report-round[_ngcontent-%COMP%]{border-radius:10px}.report-head-bg[_ngcontent-%COMP%]{border-top-left-radius:10px;border-top-right-radius:10px;background:#e6e9ed}.report-foot-bg[_ngcontent-%COMP%]{border-bottom-left-radius:10px;border-bottom-right-radius:10px;background:#e6e9ed;height:40px}.keep-middle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:-5px}.txt-width-300[_ngcontent-%COMP%]{width:300px!important;height:30px!important;margin-bottom:4px;font-family:Courier New;font-size:small}.selectwidthauto[_ngcontent-%COMP%]{width:auto!important}.font-label[_ngcontent-%COMP%]{font-size:12px}#grad1[_ngcontent-%COMP%]{height:425px;background:linear-gradient(180deg,#fff,#f5f5f5)}.no-padding[_ngcontent-%COMP%]{padding:0}.right-padding[_ngcontent-%COMP%]{padding-right:10px;font-weight:400}"]}),t})();function X(t,e){if(1&t&&(r.Sb(0,"option",26),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function tt(t,e){if(1&t&&(r.Sb(0,"option",26),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}let et=(()=>{class t{constructor(t,e,o,n,i,r){this.fb=t,this.router=e,this.activatedRoute=o,this.clarinsreportservice=n,this.sharedService=i,this.spinner=r,this.YEARS=this.sharedService.YEAR.asObservable(),this.STOGRPCODES=this.sharedService.STOGRPCODE.asObservable(),this.CreateClarinsFlashReportBYGroupForm()}CreateClarinsFlashReportBYGroupForm(){this.ClarinsFlashReportBYGroupForm=this.fb.group({ClarinsFlashReportBYGroup:this.fb.group({YEAR:[""],STOGRPCODE:[""]})})}get ClarinsFlashReportBYGroup(){return this.ClarinsFlashReportBYGroupForm.get("ClarinsFlashReportBYGroup")}ngOnInit(){this.YEARS=Object(y.a)([this.activatedRoute.snapshot.data.Years]),this.GetSTOGRPCODE(),this.InitialValue()}InitialValue(){this.ClarinsFlashReportBYGroup.get("YEAR").setValue((new Date).getFullYear()),this.ClarinsFlashReportBYGroup.get("STOGRPCODE").setValue("All")}resetForm(){this.ClarinsFlashReportBYGroup.reset(),this.InitialValue()}GetSTOGRPCODE(){this.sharedService.GetSTOGRPCODE(M.d.STOGRPCODE_CLARINS).subscribe(t=>{this.sharedService.datastore.data=t,this.sharedService.STOGRPCODE.next(Object.assign({},this.sharedService.datastore).data),this.sharedService.datastore.data.unshift({Value:"All",Name:"All"})},t=>console.log("Could not load STOGRPCODE."))}rptClarinsFlashReportByWeek(t,e){let o;this.spinner.show(),this.clarinsreportservice.rptClarinsFlashReportByGroup(t,e).subscribe(t=>{o=new Blob([t],{type:"application/pdf"})},t=>{console.log(t)},()=>{let t=URL.createObjectURL(o);window.open(t,"_blank"),this.spinner.hide()})}}return t.\u0275fac=function(e){return new(e||t)(r.Mb(P.c),r.Mb(n.e),r.Mb(n.a),r.Mb(N.a),r.Mb(w.a),r.Mb(k.c))},t.\u0275cmp=r.Gb({type:t,selectors:[["app-clarins-flash-report-bygroup"]],decls:40,vars:8,consts:[[1,"container-fluid"],["autocomplete","off",3,"formGroup"],[1,"row"],[1,"col-md-12"],[1,"shadow-sm","card","no-padding"],[1,"card-body","no-padding"],["formGroupName","ClarinsFlashReportBYGroup"],["id","grad1"],[1,"col-md-12","full-report","report-round",2,"height","300px"],[1,"text-center",2,"margin-top","35px"],[1,"text-center"],[1,"col-sm-12",2,"margin-top","35px"],[1,"row","no-padding","mb-1"],["for","Year",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],[1,"col-sm-5"],["formControlName","YEAR",1,"form-control","form-control-sm"],[3,"value",4,"ngFor","ngForOf"],[1,"col-sm-12"],[1,"row","no-padding","mb-2","mt-2"],["for","STOGRPCODE",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],["formControlName","STOGRPCODE",1,"form-control","form-control-sm"],[1,"text-center","mt-2","mb-1"],["mdbBtn","","type","submit","gradient","blue","rounded","true","mdbWavesEffect","",3,"click"],["mdbBtn","","type","button","gradient","blue","rounded","true","mdbWavesEffect","",3,"click"],["bdColor","rgba(255,255,255,0.5)","size","small","color","#cc2222","type","ball-spin-clockwise-fade",3,"fullScreen"],[2,"color","#cc2222","font-size","22px"],[3,"value"]],template:function(t,e){1&t&&(r.Sb(0,"div",0),r.Sb(1,"form",1),r.Sb(2,"div",2),r.Sb(3,"div",3),r.Sb(4,"div",4),r.Sb(5,"div",5),r.Sb(6,"div",6),r.Sb(7,"div",7),r.Sb(8,"div",8),r.Sb(9,"div",3),r.Sb(10,"h4",9),r.Kc(11,"Report Parameters"),r.Rb(),r.Sb(12,"h4",10),r.Kc(13,"Enter values for the Parameters"),r.Rb(),r.Rb(),r.Sb(14,"div",3),r.Sb(15,"div",11),r.Sb(16,"div",12),r.Sb(17,"label",13),r.Kc(18,"YEAR:"),r.Rb(),r.Sb(19,"div",14),r.Sb(20,"select",15),r.Ic(21,X,2,2,"option",16),r.fc(22,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(23,"div",17),r.Sb(24,"div",18),r.Sb(25,"label",19),r.Kc(26,"STOGRPCODE:"),r.Rb(),r.Sb(27,"div",14),r.Sb(28,"select",20),r.Ic(29,tt,2,2,"option",16),r.fc(30,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(31,"div",3),r.Sb(32,"div",21),r.Sb(33,"button",22),r.cc("click",function(){return e.rptClarinsFlashReportByWeek(e.ClarinsFlashReportBYGroup.get("YEAR").value,e.ClarinsFlashReportBYGroup.get("STOGRPCODE").value)}),r.Kc(34," Submit"),r.Rb(),r.Sb(35,"button",23),r.cc("click",function(){return e.resetForm()}),r.Kc(36," Reset"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(37,"ngx-spinner",24),r.Sb(38,"p",25),r.Kc(39," Loading... "),r.Rb(),r.Rb(),r.Rb()),2&t&&(r.yb(1),r.mc("formGroup",e.ClarinsFlashReportBYGroupForm),r.yb(20),r.mc("ngForOf",r.gc(22,4,e.YEARS)),r.yb(8),r.mc("ngForOf",r.gc(30,6,e.STOGRPCODES)),r.yb(8),r.mc("fullScreen",!1))},directives:[P.t,P.m,P.g,P.h,P.q,P.l,P.e,E.m,_.b,_.c,k.a,P.o,P.s],pipes:[E.b],styles:[".full-report[_ngcontent-%COMP%]{border:1px solid #e6e9ed;border-bottom-color:rgba(202,245,159,.8)}.report-round[_ngcontent-%COMP%]{border-radius:10px}.report-head-bg[_ngcontent-%COMP%]{border-top-left-radius:10px;border-top-right-radius:10px;background:#e6e9ed}.report-foot-bg[_ngcontent-%COMP%]{border-bottom-left-radius:10px;border-bottom-right-radius:10px;background:#e6e9ed;height:40px}.keep-middle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:-5px}.txt-width-300[_ngcontent-%COMP%]{width:300px!important;height:30px!important;margin-bottom:4px;font-family:Courier New;font-size:small}.selectwidthauto[_ngcontent-%COMP%]{width:auto!important}.font-label[_ngcontent-%COMP%]{font-size:12px}#grad1[_ngcontent-%COMP%]{height:355px;background:linear-gradient(180deg,#fff,#f5f5f5)}.no-padding[_ngcontent-%COMP%]{padding:0}.right-padding[_ngcontent-%COMP%]{padding-right:10px;font-weight:400}button[_ngcontent-%COMP%]{height:28px;width:75px;padding-top:5px;padding-left:5px;padding-right:5px;margin-right:0;margin-left:2px}"]}),t})();function ot(t,e){if(1&t&&(r.Sb(0,"option",39),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function nt(t,e){if(1&t&&(r.Sb(0,"select",38),r.Ic(1,ot,2,2,"option",25),r.fc(2,"async"),r.Rb()),2&t){const t=r.ec();r.yb(1),r.mc("ngForOf",r.gc(2,1,t.ReportTypes))}}function it(t,e){1&t&&r.Nb(0,"a",40),2&t&&r.mc("innerHTML",e.$implicit.Name,r.Ac)}function rt(t,e){1&t&&r.Nb(0,"div",40),2&t&&r.mc("innerHTML",e.$implicit,r.Ac)}function at(t,e){if(1&t&&(r.Sb(0,"option",39),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function st(t,e){if(1&t&&(r.Sb(0,"option",39),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function lt(t,e){1&t&&r.Nb(0,"a",40),2&t&&r.mc("innerHTML",e.$implicit.Name,r.Ac)}function ct(t,e){1&t&&r.Nb(0,"div",40),2&t&&r.mc("innerHTML",e.$implicit,r.Ac)}let dt=(()=>{class t{constructor(t,e,o,n,i,r){this.fb=t,this.router=e,this.activatedRoute=o,this.sharedService=n,this.clarinsreportservice=i,this.spinner=r,this.placeholder="Enter Search String",this.keyword="Name",this.YEARS=this.sharedService.YEAR.asObservable(),this.AREAS=this.sharedService.AREA.asObservable(),this.BaseURL="",this.ReportType=Object(O.a)([{Value:"All",Name:"All"},{Value:"MOBILE",Name:"MOBILE"},{Value:"NONMOBILE",Name:"NONMOBILE"}]),this.CreateWeeklyConsultantSalesForm()}CreateWeeklyConsultantSalesForm(){this.WeeklyConsultantSalesForm=this.fb.group({WeeklyConsultantSales:this.fb.group({ReportType:[""],ACC:[""],YEAR:[""],AREA:[""],EMPNO:[""]})})}get WeeklyConsultantSales(){return this.WeeklyConsultantSalesForm.get("WeeklyConsultantSales")}ngOnInit(){this.ReportTypes=this.ReportType,this.YEARS=Object(y.a)([this.activatedRoute.snapshot.data.Years]),this.AllAccount=this.sharedService.GetStore(M.e.WeeklyConsultantSales),this.AllEmpno=this.sharedService.GetEmpno(M.b.WeeklyConsultantSales),this.GetArea(),this.InitialValue()}InitialValue(){this.WeeklyConsultantSales.get("ReportType").setValue("All"),this.WeeklyConsultantSales.get("YEAR").setValue((new Date).getFullYear()),this.WeeklyConsultantSales.get("AREA").setValue("All")}resetForm(){this.WeeklyConsultantSalesForm.reset(),this.InitialValue()}GetArea(){this.sharedService.GetArea(M.a.AREA_CLARINS).subscribe(t=>{this.sharedService.datastore.data=t,this.sharedService.AREA.next(Object.assign({},this.sharedService.datastore).data),this.sharedService.datastore.data.unshift({Value:"All",Name:"All"})},t=>console.log("Could not load AREAS."))}selectEvent(t){}onChangeSearch(t){}searchCleared(){}selectEvent1(t){}onChangeSearch1(t){}searchCleared1(){}rptWeeklyConsultantSales(t,e,o,n,i){let r;this.spinner.show(),this.clarinsreportservice.rptWeeklyConsultantSales(void 0===t.Value?0:t.Value,e,o,void 0===n.Value?0:n.Value,i).subscribe(t=>{r=new Blob([t],{type:"application/pdf"})},t=>{console.log(t)},()=>{let t=URL.createObjectURL(r);window.open(t,"_blank"),this.spinner.hide()})}getVal(){return{Value:"0",Name:"All"}}}return t.\u0275fac=function(e){return new(e||t)(r.Mb(P.c),r.Mb(n.e),r.Mb(n.a),r.Mb(w.a),r.Mb(N.a),r.Mb(k.c))},t.\u0275cmp=r.Gb({type:t,selectors:[["weekly-consultant-sales"]],decls:71,vars:29,consts:[[1,"container-fluid"],["autocomplete","off",3,"formGroup"],[1,"row"],[1,"col-md-12"],[1,"shadow-sm","card","no-padding"],[1,"card-body","no-padding"],["formGroupName","WeeklyConsultantSales"],["id","grad1"],[1,"col-md-12","full-report","report-round",2,"height","350px"],[1,"text-center",2,"margin-top","15px"],[1,"text-center"],[1,"col-sm-12",2,"margin-top","25px"],[1,"row","no-padding","mb-2"],["for","ReportType",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],[1,"col-sm-5",2,"padding-left","10px"],["formControlName","ReportType","class","form-control form-control-sm",4,"ngIf"],[1,"col-sm-12"],["for","ACC",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],[1,"col-sm-8",2,"padding-left","10px"],["formControlName","ACC","id","ACC","name","ACC","notFoundText","Not found",3,"data","initialValue","searchKeyword","placeholder","minQueryLength","itemTemplate","notFoundTemplate","debounceTime","selected","inputChanged","inputCleared"],["ngAutoCompleteStatic",""],["itemTemplateStatic",""],["notFoundTemplate",""],["for","Year",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],["formControlName","YEAR",1,"form-control","form-control-sm"],[3,"value",4,"ngFor","ngForOf"],["for","Area",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],["formControlName","AREA",1,"form-control","form-control-sm"],["for","Empno",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],["formControlName","EMPNO","id","EMPNO","name","EMPNO","notFoundText","Not found",3,"data","initialValue","searchKeyword","placeholder","minQueryLength","itemTemplate","notFoundTemplate","debounceTime","selected","inputChanged","inputCleared"],["ngAutoCompleteStatic2",""],["itemTemplateStatic2",""],["notFoundTemplate2",""],[1,"text-center","mt-2","mb-1"],["mdbBtn","","type","submit","gradient","blue","rounded","true","mdbWavesEffect","",3,"click"],["mdbBtn","","type","button","gradient","blue","rounded","true","mdbWavesEffect","",3,"click"],["bdColor","rgba(255,255,255,0.5)","size","small","color","#cc2222","type","ball-spin-clockwise-fade",3,"fullScreen"],[2,"color","#cc2222","font-size","22px"],["formControlName","ReportType",1,"form-control","form-control-sm"],[3,"value"],[3,"innerHTML"]],template:function(t,e){if(1&t&&(r.Sb(0,"div",0),r.Sb(1,"form",1),r.Sb(2,"div",2),r.Sb(3,"div",3),r.Sb(4,"div",4),r.Sb(5,"div",5),r.Sb(6,"div",6),r.Sb(7,"div",7),r.Sb(8,"div",8),r.Sb(9,"div",3),r.Sb(10,"h4",9),r.Kc(11,"Report Parameters"),r.Rb(),r.Sb(12,"h4",10),r.Kc(13,"Enter values for the Parameters"),r.Rb(),r.Rb(),r.Sb(14,"div",3),r.Sb(15,"div",11),r.Sb(16,"div",12),r.Sb(17,"label",13),r.Kc(18,"REPORT TYPE:"),r.Rb(),r.Sb(19,"div",14),r.Ic(20,nt,3,3,"select",15),r.fc(21,"async"),r.Rb(),r.Rb(),r.Rb(),r.Sb(22,"div",16),r.Sb(23,"div",12),r.Sb(24,"label",17),r.Kc(25,"STORE NAME:"),r.Rb(),r.Sb(26,"div",18),r.Sb(27,"ng-autocomplete",19,20),r.cc("selected",function(t){return e.selectEvent(t)})("inputChanged",function(t){return e.onChangeSearch(t)})("inputCleared",function(){return e.searchCleared()}),r.fc(29,"async"),r.Rb(),r.Ic(30,it,1,1,"ng-template",null,21,r.Jc),r.Ic(32,rt,1,1,"ng-template",null,22,r.Jc),r.Rb(),r.Rb(),r.Rb(),r.Sb(34,"div",16),r.Sb(35,"div",12),r.Sb(36,"label",23),r.Kc(37,"YEAR:"),r.Rb(),r.Sb(38,"div",14),r.Sb(39,"select",24),r.Ic(40,at,2,2,"option",25),r.fc(41,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(42,"div",16),r.Sb(43,"div",12),r.Sb(44,"label",26),r.Kc(45,"AREA:"),r.Rb(),r.Sb(46,"div",14),r.Sb(47,"select",27),r.Ic(48,st,2,2,"option",25),r.fc(49,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(50,"div",16),r.Sb(51,"div",12),r.Sb(52,"label",28),r.Kc(53,"EMPLOYEE:"),r.Rb(),r.Sb(54,"div",18),r.Sb(55,"ng-autocomplete",29,30),r.cc("selected",function(t){return e.selectEvent1(t)})("inputChanged",function(t){return e.onChangeSearch1(t)})("inputCleared",function(){return e.searchCleared1()}),r.fc(57,"async"),r.Rb(),r.Ic(58,lt,1,1,"ng-template",null,31,r.Jc),r.Ic(60,ct,1,1,"ng-template",null,32,r.Jc),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(62,"div",3),r.Sb(63,"div",33),r.Sb(64,"button",34),r.cc("click",function(){return e.rptWeeklyConsultantSales(e.WeeklyConsultantSales.get("ACC").value,e.WeeklyConsultantSales.get("YEAR").value,"All"===e.WeeklyConsultantSales.get("AREA").value?0:e.WeeklyConsultantSales.get("AREA").value,e.WeeklyConsultantSales.get("EMPNO").value,e.WeeklyConsultantSales.get("ReportType").value)}),r.Kc(65," Submit"),r.Rb(),r.Sb(66,"button",35),r.cc("click",function(){return e.resetForm()}),r.Kc(67," Reset"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(68,"ngx-spinner",36),r.Sb(69,"p",37),r.Kc(70," Loading... "),r.Rb(),r.Rb(),r.Rb()),2&t){const t=r.wc(31),o=r.wc(33),n=r.wc(59),i=r.wc(61);r.yb(1),r.mc("formGroup",e.WeeklyConsultantSalesForm),r.yb(19),r.mc("ngIf",r.gc(21,19,e.ReportTypes).length),r.yb(7),r.mc("data",r.gc(29,21,e.AllAccount))("searchKeyword",e.keyword)("placeholder",e.placeholder)("minQueryLength",2)("itemTemplate",t)("notFoundTemplate",o)("debounceTime",10),r.yb(13),r.mc("ngForOf",r.gc(41,23,e.YEARS)),r.yb(8),r.mc("ngForOf",r.gc(49,25,e.AREAS)),r.yb(7),r.mc("data",r.gc(57,27,e.AllEmpno))("searchKeyword",e.keyword)("placeholder",e.placeholder)("minQueryLength",2)("itemTemplate",n)("notFoundTemplate",i)("debounceTime",10),r.yb(13),r.mc("fullScreen",!1)}},directives:[P.t,P.m,P.g,P.h,E.n,B.a,P.l,P.e,P.q,E.m,_.b,_.c,k.a,P.o,P.s],pipes:[E.b],styles:["button[_ngcontent-%COMP%]{height:28px;width:75px;padding-top:5px;padding-left:5px;padding-right:5px;margin-right:0;margin-left:2px}label[_ngcontent-%COMP%]{text-transform:uppercase}[_nghost-%COMP%] .ng-autocomplete{line-height:0!important;white-space:nowrap}[_nghost-%COMP%] .autocomplete-container{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);position:relative;overflow:visible;height:30px;border-radius:4px;padding-right:0;margin-right:0}[_nghost-%COMP%] .autocomplete-container .input-container input{font-size:12px;font-weight:500!important;box-sizing:border-box;border:none;box-shadow:none;outline:none;background-color:#fff;color:rgba(0,0,0,.87);width:100%;line-height:4px;height:30px;padding:0 5px 0 12px}[_nghost-%COMP%] .autocomplete-container .input-container .x{position:absolute;right:2px;margin:auto;cursor:pointer;top:50%;transform:translateY(-50%)}[_nghost-%COMP%] .autocomplete-container .suggestions-container{display:grid;padding-right:1px;border:1px solid #b0c4de}[_nghost-%COMP%] .autocomplete-container .suggestions-container li:hover a{background-color:rgba(255,0,0,.6);color:#fff!important}[_nghost-%COMP%] .autocomplete-container .suggestions-container ul{padding:0;margin:0;max-height:300px;overflow-y:auto}[_nghost-%COMP%] .autocomplete-container .suggestions-container ul li a{padding:11px 5px 10px 12px;display:block;text-decoration:none;cursor:pointer;color:rgba(0,0,0,.87);font-size:10px;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;font-weight:700!important}.full-report[_ngcontent-%COMP%]{border:1px solid #e6e9ed}.report-round[_ngcontent-%COMP%]{border-radius:10px}.report-head-bg[_ngcontent-%COMP%]{border-top-left-radius:10px;border-top-right-radius:10px;background:#e6e9ed}.report-foot-bg[_ngcontent-%COMP%]{border-bottom-left-radius:10px;border-bottom-right-radius:10px;background:#e6e9ed;height:40px}.keep-middle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:-5px}.txt-width-300[_ngcontent-%COMP%]{width:300px!important;height:30px!important;margin-bottom:4px;font-family:Courier New;font-size:small}.selectwidthauto[_ngcontent-%COMP%]{width:auto!important}.font-label[_ngcontent-%COMP%]{font-size:12px}#grad1[_ngcontent-%COMP%]{height:400px;background:linear-gradient(180deg,#fff,#f5f5f5)}.no-padding[_ngcontent-%COMP%]{padding:0}.right-padding[_ngcontent-%COMP%]{padding-right:10px;font-weight:400}"]}),t})();function bt(t,e){1&t&&r.Nb(0,"a",42),2&t&&r.mc("innerHTML",e.$implicit.Name,r.Ac)}function pt(t,e){1&t&&r.Nb(0,"div",42),2&t&&r.mc("innerHTML",e.$implicit,r.Ac)}function gt(t,e){if(1&t&&(r.Sb(0,"option",43),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function ht(t,e){if(1&t&&(r.Sb(0,"option",43),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function ut(t,e){if(1&t&&(r.Sb(0,"option",43),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function mt(t,e){if(1&t&&(r.Sb(0,"option",43),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function ft(t,e){if(1&t&&(r.Sb(0,"option",43),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function St(t,e){if(1&t&&(r.Sb(0,"option",43),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function Rt(t,e){if(1&t&&(r.Sb(0,"option",43),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}let Ct=(()=>{class t{constructor(t,e,o,n,i,r){this.fb=t,this.router=e,this.activatedRoute=o,this.sharedService=n,this.clarinsreportservice=i,this.spinner=r,this.placeholder="Enter Search String",this.keyword="Name",this.YEARS=this.sharedService.YEAR.asObservable(),this.AREAS=this.sharedService.AREA.asObservable(),this.STOGRPCODES=this.sharedService.STOGRPCODE.asObservable(),this.REGIONS=this.sharedService.REGION.asObservable(),this.TOWNS=this.sharedService.TOWN.asObservable(),this.Categories=this.sharedService.Category.asObservable(),this.IPAD=Object(O.a)([{Value:"All",Name:"All"},{Value:"YES",Name:"YES"},{Value:"NO",Name:"NO"}]),this.CreateWeeklyCounterSalesForm()}CreateWeeklyCounterSalesForm(){this.WeeklyCounterSalesForm=this.fb.group({WeeklyCounterSales:this.fb.group({ACC:[""],YEAR:[""],AREA:[""],STOGRPCODE:[""],REGION:[""],TOWN:[""],IPAD:[""],CATEGORY:[""]})})}get WeeklyCounterSales(){return this.WeeklyCounterSalesForm.get("WeeklyCounterSales")}ngOnInit(){this.YEARS=Object(y.a)([this.activatedRoute.snapshot.data.Years]),this.IPADS=this.IPAD,this.AllAccount=this.sharedService.GetStore(M.e.WeeklyConsultantSales),this.GetArea(),this.GetCategories(),this.GetSTOGRPCODE(),this.GetRegion(),this.GetTown(),this.InitialValue()}InitialValue(){this.WeeklyCounterSales.get("IPAD").setValue("All"),this.WeeklyCounterSales.get("REGION").setValue("All"),this.WeeklyCounterSales.get("AREA").setValue("All"),this.WeeklyCounterSales.get("TOWN").setValue("All"),this.WeeklyCounterSales.get("CATEGORY").setValue("All"),this.WeeklyCounterSales.get("STOGRPCODE").setValue("All"),this.WeeklyCounterSales.get("YEAR").setValue((new Date).getFullYear())}ResetForm(){this.WeeklyCounterSalesForm.reset(),this.InitialValue()}GetRegion(){this.sharedService.GetRegion(M.c.REGION_BB).subscribe(t=>{this.sharedService.datastore.data=t,this.sharedService.REGION.next(Object.assign({},this.sharedService.datastore).data),this.sharedService.datastore.data.unshift({Value:"All",Name:"All"})},t=>console.log("Could not load REGIONS."))}GetTown(){this.sharedService.GetTown(M.f.TOWN_CLARINS).subscribe(t=>{this.sharedService.datastore.data=t,this.sharedService.TOWN.next(Object.assign({},this.sharedService.datastore).data),this.sharedService.datastore.data.unshift({Value:"All",Name:"All"})},t=>console.log("Could not load TOWNS."))}GetArea(){this.sharedService.GetArea(M.a.AREA_CLARINS).subscribe(t=>{this.sharedService.datastore.data=t,this.sharedService.AREA.next(Object.assign({},this.sharedService.datastore).data),this.sharedService.datastore.data.unshift({Value:"All",Name:"All"})},t=>console.log("Could not load AREAS."))}GetCategories(){this.sharedService.GetCategories().subscribe(t=>{this.sharedService.datastore.data=t,this.sharedService.Category.next(Object.assign({},this.sharedService.datastore).data),this.sharedService.datastore.data.unshift({Value:"All",Name:"All"})},t=>console.log("Could not load STOGRPCODE."))}GetSTOGRPCODE(){this.sharedService.GetSTOGRPCODE(M.d.STOGRPCODE_CLARINS).subscribe(t=>{this.sharedService.datastore.data=t,this.sharedService.STOGRPCODE.next(Object.assign({},this.sharedService.datastore).data),this.sharedService.datastore.data.unshift({Value:"All",Name:"All"})},t=>console.log("Could not load STOGRPCODE."))}selectEvent(t){}onChangeSearch(t){}searchCleared(){}rptWeeklyCounterSales(t,e,o,n,i,r,a,s){let l;this.spinner.show(),this.clarinsreportservice.rptWeeklyCounterSales(void 0===t.Value?0:t.Value,e,o,n,i,r,a,s).subscribe(t=>{l=new Blob([t],{type:"application/pdf"})},t=>{console.log(t)},()=>{let t=URL.createObjectURL(l);window.open(t,"_blank"),this.spinner.hide()})}}return t.\u0275fac=function(e){return new(e||t)(r.Mb(P.c),r.Mb(n.e),r.Mb(n.a),r.Mb(w.a),r.Mb(N.a),r.Mb(k.c))},t.\u0275cmp=r.Gb({type:t,selectors:[["app-weekly-counter-sales"]],decls:91,vars:32,consts:[[1,"container-fluid"],["autocomplete","off",3,"formGroup"],[1,"row"],[1,"col-md-12"],[1,"shadow-sm","card","no-padding"],[1,"card-body","no-padding"],["formGroupName","WeeklyCounterSales"],["id","grad1"],[1,"col-md-12","full-report","report-round",2,"height","390px"],[1,"text-center",2,"margin-top","15px"],[1,"text-center"],[1,"col-sm-12",2,"margin-top","20px"],[1,"row","no-padding","mb-2"],["for","store",1,"col-sm-4","col-form-label","text-right","no-padding","mt-1"],[1,"col-sm-8",2,"padding-left","10px"],["formControlName","ACC","id","ACC","name","ACC","notFoundText","Not found",3,"data","initialValue","searchKeyword","placeholder","minQueryLength","itemTemplate","notFoundTemplate","debounceTime","selected","inputChanged","inputCleared"],["ngAutoCompleteStatic",""],["itemTemplateStatic",""],["notFoundTemplate",""],[1,"col-sm-12"],[1,"row","no-padding","mb-1"],["for","Year",1,"col-sm-4","col-form-label","text-right","no-padding","mt-1"],[1,"col-sm-5",2,"padding-left","10px"],["formControlName","YEAR",1,"form-control","form-control-sm"],[3,"value",4,"ngFor","ngForOf"],["for","Area",1,"col-sm-4","col-form-label","text-right","no-padding","mt-1"],["formControlName","AREA",1,"form-control","form-control-sm"],["for","Store Group",1,"col-sm-4","col-form-label","text-right","no-padding","mt-1"],["formControlName","STOGRPCODE",1,"form-control","form-control-sm"],["for","Region",1,"col-sm-4","col-form-label","text-right","no-padding","mt-1"],["formControlName","REGION",1,"form-control","form-control-sm"],["for","Town",1,"col-sm-4","col-form-label","text-right","no-padding","mt-1"],["formControlName","TOWN",1,"form-control","form-control-sm"],["for","IPAD",1,"col-sm-4","col-form-label","text-right","no-padding","mt-1"],["formControlName","IPAD",1,"form-control","form-control-sm"],["for","Category",1,"col-sm-4","col-form-label","text-right","no-padding","mt-1"],["formControlName","CATEGORY",1,"form-control","form-control-sm"],[1,"text-center","mt-2"],["mdbBtn","","type","submit","gradient","blue","rounded","true","mdbWavesEffect","",3,"click"],["mdbBtn","","type","button","gradient","blue","rounded","true","mdbWavesEffect","",3,"click"],["bdColor","rgba(255,255,255,0.5)","size","small","color","#cc2222","type","ball-spin-clockwise-fade",3,"fullScreen"],[2,"color","#cc2222","font-size","22px"],[3,"innerHTML"],[3,"value"]],template:function(t,e){if(1&t&&(r.Sb(0,"div",0),r.Sb(1,"form",1),r.Sb(2,"div",2),r.Sb(3,"div",3),r.Sb(4,"div",4),r.Sb(5,"div",5),r.Sb(6,"div",6),r.Sb(7,"div",7),r.Sb(8,"div",8),r.Sb(9,"div",3),r.Sb(10,"h4",9),r.Kc(11,"Report Parameters"),r.Rb(),r.Sb(12,"h4",10),r.Kc(13,"Enter values for the Parameters"),r.Rb(),r.Rb(),r.Sb(14,"div",11),r.Sb(15,"div",12),r.Sb(16,"label",13),r.Kc(17,"Store:"),r.Rb(),r.Sb(18,"div",14),r.Sb(19,"ng-autocomplete",15,16),r.cc("selected",function(t){return e.selectEvent(t)})("inputChanged",function(t){return e.onChangeSearch(t)})("inputCleared",function(){return e.searchCleared()}),r.fc(21,"async"),r.Rb(),r.Ic(22,bt,1,1,"ng-template",null,17,r.Jc),r.Ic(24,pt,1,1,"ng-template",null,18,r.Jc),r.Rb(),r.Rb(),r.Rb(),r.Sb(26,"div",19),r.Sb(27,"div",20),r.Sb(28,"label",21),r.Kc(29,"YEAR:"),r.Rb(),r.Sb(30,"div",22),r.Sb(31,"select",23),r.Ic(32,gt,2,2,"option",24),r.fc(33,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(34,"div",19),r.Sb(35,"div",20),r.Sb(36,"label",25),r.Kc(37,"Area:"),r.Rb(),r.Sb(38,"div",22),r.Sb(39,"select",26),r.Ic(40,ht,2,2,"option",24),r.fc(41,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(42,"div",19),r.Sb(43,"div",20),r.Sb(44,"label",27),r.Kc(45,"Store Group Code:"),r.Rb(),r.Sb(46,"div",22),r.Sb(47,"select",28),r.Ic(48,ut,2,2,"option",24),r.fc(49,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(50,"div",19),r.Sb(51,"div",20),r.Sb(52,"label",29),r.Kc(53,"Region:"),r.Rb(),r.Sb(54,"div",22),r.Sb(55,"select",30),r.Ic(56,mt,2,2,"option",24),r.fc(57,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(58,"div",19),r.Sb(59,"div",20),r.Sb(60,"label",31),r.Kc(61,"Town:"),r.Rb(),r.Sb(62,"div",22),r.Sb(63,"select",32),r.Ic(64,ft,2,2,"option",24),r.fc(65,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(66,"div",19),r.Sb(67,"div",20),r.Sb(68,"label",33),r.Kc(69,"IPAD:"),r.Rb(),r.Sb(70,"div",22),r.Sb(71,"select",34),r.Ic(72,St,2,2,"option",24),r.fc(73,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(74,"div",19),r.Sb(75,"div",20),r.Sb(76,"label",35),r.Kc(77,"Category:"),r.Rb(),r.Sb(78,"div",22),r.Sb(79,"select",36),r.Ic(80,Rt,2,2,"option",24),r.fc(81,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(82,"div",3),r.Sb(83,"div",37),r.Sb(84,"button",38),r.cc("click",function(){return e.rptWeeklyCounterSales(e.WeeklyCounterSales.get("ACC").value,e.WeeklyCounterSales.get("YEAR").value,"All"===e.WeeklyCounterSales.get("AREA").value?0:e.WeeklyCounterSales.get("AREA").value,e.WeeklyCounterSales.get("STOGRPCODE").value,"All"===e.WeeklyCounterSales.get("REGION").value?0:e.WeeklyCounterSales.get("REGION").value,e.WeeklyCounterSales.get("TOWN").value,e.WeeklyCounterSales.get("IPAD").value,e.WeeklyCounterSales.get("CATEGORY").value)}),r.Kc(85," Submit"),r.Rb(),r.Sb(86,"button",39),r.cc("click",function(){return e.ResetForm()}),r.Kc(87," Reset"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(88,"ngx-spinner",40),r.Sb(89,"p",41),r.Kc(90," Loading... "),r.Rb(),r.Rb(),r.Rb()),2&t){const t=r.wc(23),o=r.wc(25);r.yb(1),r.mc("formGroup",e.WeeklyCounterSalesForm),r.yb(18),r.mc("data",r.gc(21,16,e.AllAccount))("searchKeyword",e.keyword)("placeholder",e.placeholder)("minQueryLength",2)("itemTemplate",t)("notFoundTemplate",o)("debounceTime",10),r.yb(13),r.mc("ngForOf",r.gc(33,18,e.YEARS)),r.yb(8),r.mc("ngForOf",r.gc(41,20,e.AREAS)),r.yb(8),r.mc("ngForOf",r.gc(49,22,e.STOGRPCODES)),r.yb(8),r.mc("ngForOf",r.gc(57,24,e.REGIONS)),r.yb(8),r.mc("ngForOf",r.gc(65,26,e.TOWNS)),r.yb(8),r.mc("ngForOf",r.gc(73,28,e.IPADS)),r.yb(8),r.mc("ngForOf",r.gc(81,30,e.Categories)),r.yb(8),r.mc("fullScreen",!1)}},directives:[P.t,P.m,P.g,P.h,B.a,P.l,P.e,P.q,E.m,_.b,_.c,k.a,P.o,P.s],pipes:[E.b],styles:["button[_ngcontent-%COMP%]{height:28px;width:75px;padding-top:5px;padding-left:5px;padding-right:5px;margin-right:0;margin-left:2px}[_nghost-%COMP%] .ng-autocomplete{line-height:0!important;white-space:nowrap}[_nghost-%COMP%] .autocomplete-container{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);position:relative;overflow:visible;height:30px;border-radius:4px;padding-right:0;margin-right:0}[_nghost-%COMP%] .autocomplete-container .input-container input{font-size:12px;font-weight:500!important;box-sizing:border-box;border:none;box-shadow:none;outline:none;background-color:#fff;color:rgba(0,0,0,.87);width:100%;line-height:4px;height:30px;padding:0 5px 0 12px}[_nghost-%COMP%] .autocomplete-container .input-container .x{position:absolute;right:2px;margin:auto;cursor:pointer;top:50%;transform:translateY(-50%)}[_nghost-%COMP%] .autocomplete-container .suggestions-container{display:grid;padding-right:1px;border:1px solid #b0c4de}[_nghost-%COMP%] .autocomplete-container .suggestions-container li:hover a{background-color:rgba(255,0,0,.6);color:#fff!important}[_nghost-%COMP%] .autocomplete-container .suggestions-container ul{padding:0;margin:0;max-height:300px;overflow-y:auto}[_nghost-%COMP%] .autocomplete-container .suggestions-container ul li a{padding:11px 5px 10px 12px;display:block;text-decoration:none;cursor:pointer;color:rgba(0,0,0,.87);font-size:10px;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;font-weight:700!important}.full-report[_ngcontent-%COMP%]{border:1px solid #e6e9ed;border-bottom-color:#28a745}.report-round[_ngcontent-%COMP%]{border-radius:5px}.report-head-bg[_ngcontent-%COMP%]{border-top-left-radius:10px;border-top-right-radius:10px;background:#e6e9ed}.report-foot-bg[_ngcontent-%COMP%]{border-bottom-left-radius:10px;border-bottom-right-radius:10px;background:#e6e9ed;height:40px}label[_ngcontent-%COMP%]{text-transform:uppercase;font-size:12px}.selectwidthauto[_ngcontent-%COMP%]{width:auto!important}#grad1[_ngcontent-%COMP%]{height:440px;background:linear-gradient(180deg,#fff,#f5f5f5)}.no-padding[_ngcontent-%COMP%]{padding:0}.right-padding[_ngcontent-%COMP%]{padding-right:10px;font-weight:400}"]}),t})();var vt=o("Kj3r"),xt=o("/uUt"),Ot=o("vkgz"),yt=o("eIep");function Mt(t,e){if(1&t&&(r.Sb(0,"option",32),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function At(t,e){if(1&t&&(r.Sb(0,"option",32),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function Pt(t,e){1&t&&r.Nb(0,"a",33),2&t&&r.mc("innerHTML",e.$implicit.Name,r.Ac)}function wt(t,e){1&t&&r.Nb(0,"div",33),2&t&&r.mc("innerHTML",e.$implicit,r.Ac)}function Nt(t,e){if(1&t&&(r.Sb(0,"option",32),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}let Et=(()=>{class t{constructor(t,e,o,n,i,r){this.fb=t,this.router=e,this.activatedRoute=o,this.sharedService=n,this.clarinsreportservice=i,this.spinner=r,this.placeholder="Enter Search String",this.keyword="Name",this.YEARS=this.sharedService.YEAR.asObservable(),this.AREAS=this.sharedService.AREA.asObservable(),this.MONTHS=this.sharedService.MONTH.asObservable(),this.loading=!1,this.CreateWeeklyBeautyCoachSalesForm()}CreateWeeklyBeautyCoachSalesForm(){this.WeeklyBeautyCoachSalesForm=this.fb.group({WeeklyBeautyCoachSales:this.fb.group({YEAR:[""],AREA:[""],EMPNO:[""],MONTH:[""]})})}get WeeklyBeautyCoachSales(){return this.WeeklyBeautyCoachSalesForm.get("WeeklyBeautyCoachSales")}ngOnInit(){this.YEARS=Object(y.a)([this.activatedRoute.snapshot.data.Years]),this.AllEmpno=this.sharedService.GetEmpno(M.b.WeeklyAngelSales),this.GetMonth(),this.GetArea(),this.InitialValue()}Search(){this.results=this.WeeklyBeautyCoachSales.get("EMPNO").valueChanges.pipe(Object(vt.a)(400),Object(xt.a)(),Object(Ot.a)(t=>this.loading=!0),Object(yt.a)(t=>this.sharedService.search(t)),Object(Ot.a)(t=>this.loading=!1))}InitialValue(){this.WeeklyBeautyCoachSales.get("YEAR").setValue((new Date).getFullYear()),this.WeeklyBeautyCoachSales.get("MONTH").setValue("All"),this.WeeklyBeautyCoachSales.get("AREA").setValue("All")}resetForm(){this.WeeklyBeautyCoachSalesForm.reset(),this.InitialValue()}GetMonth(){this.sharedService.GetMonth().subscribe(t=>{this.sharedService.datastore.data=t,this.sharedService.MONTH.next(Object.assign({},this.sharedService.datastore).data),this.sharedService.datastore.data.unshift({Value:"All",Name:"All"})},t=>console.log("Could not load MONTHS."))}GetArea(){this.sharedService.GetArea(M.a.AREA_ANGLE).subscribe(t=>{this.sharedService.datastore.data=t,this.sharedService.AREA.next(Object.assign({},this.sharedService.datastore).data),this.sharedService.datastore.data.unshift({Value:"All",Name:"All"})},t=>console.log("Could not load AREAS."))}selectEvent(t){}onChangeSearch(t){}searchCleared(){}rptWeeklyBeautyCoachSales(t,e,o,n){let i;this.spinner.show(),this.clarinsreportservice.rptWeeklyBeautyCoachSales(t,e,void 0===o.Value?0:o.Value,n).subscribe(t=>{i=new Blob([t],{type:"application/pdf"})},t=>{console.log(t)},()=>{let t=URL.createObjectURL(i);window.open(t,"_blank"),this.spinner.hide()})}}return t.\u0275fac=function(e){return new(e||t)(r.Mb(P.c),r.Mb(n.e),r.Mb(n.a),r.Mb(w.a),r.Mb(N.a),r.Mb(k.c))},t.\u0275cmp=r.Gb({type:t,selectors:[["weekly-beauty-coach-sales"]],decls:60,vars:20,consts:[[1,"container-fluid"],["autocomplete","off",3,"formGroup"],[1,"row"],[1,"col-md-12"],[1,"shadow-sm","card","no-padding"],[1,"card-body","no-padding"],["formGroupName","WeeklyBeautyCoachSales"],["id","grad1"],[1,"col-md-12","full-report","report-round",2,"height","320px"],[1,"text-center",2,"margin-top","15px"],[1,"text-center"],[1,"col-sm-12",2,"margin-top","40px"],[1,"row","no-padding","mb-2"],["for","Year",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],[1,"col-sm-5"],["formControlName","YEAR",1,"form-control","form-control-sm"],[3,"value",4,"ngFor","ngForOf"],[1,"col-sm-12"],["for","Store Group",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],["formControlName","AREA",1,"form-control","form-control-sm"],["for","Region",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],[1,"col-sm-8"],["formControlName","EMPNO","id","EMPNO","name","EMPNO","notFoundText","Not found",3,"data","initialValue","searchKeyword","placeholder","minQueryLength","itemTemplate","notFoundTemplate","debounceTime","selected","inputChanged","inputCleared"],["ngAutoCompleteStatic",""],["itemTemplateStatic",""],["notFoundTemplate",""],["formControlName","MONTH",1,"form-control","form-control-sm"],[1,"text-center","mt-2","mb-1"],["mdbBtn","","type","submit","gradient","blue","rounded","true","mdbWavesEffect","",3,"click"],["mdbBtn","","type","button","gradient","blue","rounded","true","mdbWavesEffect","",3,"click"],["bdColor","rgba(255,255,255,0.5)","size","small","color","#cc2222","type","ball-spin-clockwise-fade",3,"fullScreen"],[2,"color","#cc2222","font-size","22px"],[3,"value"],[3,"innerHTML"]],template:function(t,e){if(1&t&&(r.Sb(0,"div",0),r.Sb(1,"form",1),r.Sb(2,"div",2),r.Sb(3,"div",3),r.Sb(4,"div",4),r.Sb(5,"div",5),r.Sb(6,"div",6),r.Sb(7,"div",7),r.Sb(8,"div",8),r.Sb(9,"div",3),r.Sb(10,"h4",9),r.Kc(11,"Report Parameters"),r.Rb(),r.Sb(12,"h4",10),r.Kc(13,"Enter values for the Parameters"),r.Rb(),r.Rb(),r.Sb(14,"div",3),r.Sb(15,"div",11),r.Sb(16,"div",12),r.Sb(17,"label",13),r.Kc(18,"Year:"),r.Rb(),r.Sb(19,"div",14),r.Sb(20,"select",15),r.Ic(21,Mt,2,2,"option",16),r.fc(22,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(23,"div",17),r.Sb(24,"div",12),r.Sb(25,"label",18),r.Kc(26,"Area:"),r.Rb(),r.Sb(27,"div",14),r.Sb(28,"select",19),r.Ic(29,At,2,2,"option",16),r.fc(30,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(31,"div",17),r.Sb(32,"div",12),r.Sb(33,"label",20),r.Kc(34,"Empno:"),r.Rb(),r.Sb(35,"div",21),r.Sb(36,"ng-autocomplete",22,23),r.cc("selected",function(t){return e.selectEvent(t)})("inputChanged",function(t){return e.onChangeSearch(t)})("inputCleared",function(){return e.searchCleared()}),r.fc(38,"async"),r.Rb(),r.Ic(39,Pt,1,1,"ng-template",null,24,r.Jc),r.Ic(41,wt,1,1,"ng-template",null,25,r.Jc),r.Rb(),r.Rb(),r.Rb(),r.Sb(43,"div",17),r.Sb(44,"div",12),r.Sb(45,"label",20),r.Kc(46,"Month:"),r.Rb(),r.Sb(47,"div",14),r.Sb(48,"select",26),r.Ic(49,Nt,2,2,"option",16),r.fc(50,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(51,"div",3),r.Sb(52,"div",27),r.Sb(53,"button",28),r.cc("click",function(){return e.rptWeeklyBeautyCoachSales(e.WeeklyBeautyCoachSales.get("YEAR").value,"All"===e.WeeklyBeautyCoachSales.get("AREA").value?0:e.WeeklyBeautyCoachSales.get("AREA").value,e.WeeklyBeautyCoachSales.get("EMPNO").value,"All"===e.WeeklyBeautyCoachSales.get("MONTH").value?0:e.WeeklyBeautyCoachSales.get("MONTH").value)}),r.Kc(54," Submit"),r.Rb(),r.Sb(55,"button",29),r.cc("click",function(){return e.resetForm()}),r.Kc(56," Reset"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(57,"ngx-spinner",30),r.Sb(58,"p",31),r.Kc(59," Loading... "),r.Rb(),r.Rb(),r.Rb()),2&t){const t=r.wc(40),o=r.wc(42);r.yb(1),r.mc("formGroup",e.WeeklyBeautyCoachSalesForm),r.yb(20),r.mc("ngForOf",r.gc(22,12,e.YEARS)),r.yb(8),r.mc("ngForOf",r.gc(30,14,e.AREAS)),r.yb(7),r.mc("data",r.gc(38,16,e.AllEmpno))("searchKeyword",e.keyword)("placeholder",e.placeholder)("minQueryLength",2)("itemTemplate",t)("notFoundTemplate",o)("debounceTime",10),r.yb(13),r.mc("ngForOf",r.gc(50,18,e.MONTHS)),r.yb(8),r.mc("fullScreen",!1)}},directives:[P.t,P.m,P.g,P.h,P.q,P.l,P.e,E.m,B.a,_.b,_.c,k.a,P.o,P.s],pipes:[E.b],styles:["button[_ngcontent-%COMP%]{height:28px;width:75px;padding-top:5px;padding-left:5px;padding-right:5px;margin-right:0;margin-left:2px}label[_ngcontent-%COMP%]{text-transform:uppercase}[_nghost-%COMP%] .ng-autocomplete{line-height:0!important;white-space:nowrap}[_nghost-%COMP%] .autocomplete-container{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);position:relative;overflow:visible;height:30px;border-radius:4px;padding-right:0;margin-right:0}[_nghost-%COMP%] .autocomplete-container .input-container input{font-size:12px;font-weight:500!important;box-sizing:border-box;border:none;box-shadow:none;outline:none;background-color:#fff;color:rgba(0,0,0,.87);width:100%;line-height:4px;height:30px;padding:0 5px 0 12px}[_nghost-%COMP%] .autocomplete-container .input-container .x{position:absolute;right:2px;margin:auto;cursor:pointer;top:50%;transform:translateY(-50%)}[_nghost-%COMP%] .autocomplete-container .suggestions-container{display:grid;padding-right:1px;border:1px solid #b0c4de}[_nghost-%COMP%] .autocomplete-container .suggestions-container li:hover a{background-color:rgba(255,0,0,.6);color:#fff!important}[_nghost-%COMP%] .autocomplete-container .suggestions-container ul{padding:0;margin:0;max-height:300px;overflow-y:auto}[_nghost-%COMP%] .autocomplete-container .suggestions-container ul li a{padding:11px 5px 10px 12px;display:block;text-decoration:none;cursor:pointer;color:rgba(0,0,0,.87);font-size:10px;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;font-weight:700!important}.full-report[_ngcontent-%COMP%]{border:1px solid #e6e9ed;border-bottom-color:#caf59f}.report-round[_ngcontent-%COMP%]{border-radius:10px}.report-head-bg[_ngcontent-%COMP%]{border-top-left-radius:10px;border-top-right-radius:10px;background:#e6e9ed}.report-foot-bg[_ngcontent-%COMP%]{border-bottom-left-radius:10px;border-bottom-right-radius:10px;background:#e6e9ed;height:40px}.txt-width-300[_ngcontent-%COMP%]{width:300px!important;height:30px!important;margin-bottom:4px;font-family:Courier New;font-size:small}.selectwidthauto[_ngcontent-%COMP%]{width:auto!important}.font-label[_ngcontent-%COMP%]{font-size:12px}#grad1[_ngcontent-%COMP%]{height:370px;background:linear-gradient(180deg,#fff,#f5f5f5)}.no-padding[_ngcontent-%COMP%]{padding:0}.right-padding[_ngcontent-%COMP%]{padding-right:10px;font-weight:400}"]}),t})();const Ft=["auto"];function kt(t,e){1&t&&r.Nb(0,"a",34),2&t&&r.mc("innerHTML",e.$implicit.Name,r.Ac)}function _t(t,e){1&t&&r.Nb(0,"div",34),2&t&&r.mc("innerHTML",e.$implicit,r.Ac)}function Gt(t,e){if(1&t&&(r.Sb(0,"option",35),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function Tt(t,e){if(1&t&&(r.Sb(0,"option",35),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function It(t,e){if(1&t&&(r.Sb(0,"option",35),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}let Lt=(()=>{class t{constructor(t,e,o,n,i,r){this.fb=t,this.router=e,this.activatedRoute=o,this.sharedService=n,this.clarinsreportservice=i,this.spinner=r,this.placeholder="Enter search string",this.keyword="Name",this.YEARS=this.sharedService.YEAR.asObservable(),this.AREAS=this.sharedService.AREA.asObservable(),this.IPAD=Object(O.a)([{Value:"All",Name:"All"},{Value:"YES",Name:"YES"},{Value:"NO",Name:"NO"}]),this.CreateNIWeeklyTargetsForm()}CreateNIWeeklyTargetsForm(){this.NIWeeklyTargetsForm=this.fb.group({NIWeeklyTargets:this.fb.group({ACC:[""],YEAR:[""],AREA:[""],IPAD:[""]})})}get NIWeeklyTargets(){return this.NIWeeklyTargetsForm.get("NIWeeklyTargets")}ngOnInit(){this.YEARS=Object(y.a)([this.activatedRoute.snapshot.data.Years]),this.AllAccount=this.sharedService.GetStore(M.e.NIWeeklyTargets),this.IPADS=this.IPAD,this.GetArea(),this.InitialValue()}InitialValue(){this.NIWeeklyTargets.get("YEAR").setValue((new Date).getFullYear()),this.NIWeeklyTargets.get("IPAD").setValue("All"),this.NIWeeklyTargets.get("AREA").setValue("All")}ResetForm(){this.NIWeeklyTargetsForm.reset(),this.InitialValue()}GetStore(){this.sharedService.GetStore(M.e.NIWeeklyTargets).subscribe(t=>{this.AllAccount=t})}GetArea(){this.sharedService.GetArea(M.a.AREA_NI).subscribe(t=>{this.sharedService.datastore.data=t,this.sharedService.AREA.next(Object.assign({},this.sharedService.datastore).data),this.sharedService.datastore.data.unshift({Value:"All",Name:"All"})},t=>console.log("Could not load AREAS."))}selectEvent(t){}onChangeSearch(t){}searchCleared(){this.InitialValue()}openPanel(t){t.stopPropagation(),this.auto.open()}closePanel(t){t.stopPropagation(),this.auto.close()}focus(t){t.stopPropagation(),this.auto.focus()}rptNIWeeklyTargets(t,e,o,n){let i;this.spinner.show(),this.clarinsreportservice.rptNIWeeklyTargets(void 0===t.Value?0:t.Value,e,o,n).subscribe(t=>{i=new Blob([t],{type:"application/pdf"})},t=>{console.log(t)},()=>{let t=URL.createObjectURL(i);window.open(t,"_blank"),this.spinner.hide()})}}return t.\u0275fac=function(e){return new(e||t)(r.Mb(P.c),r.Mb(n.e),r.Mb(n.a),r.Mb(w.a),r.Mb(N.a),r.Mb(k.c))},t.\u0275cmp=r.Gb({type:t,selectors:[["NIWeekly-Targets"]],viewQuery:function(t,e){if(1&t&&r.Pc(Ft,!0),2&t){let t;r.vc(t=r.dc())&&(e.auto=t.first)}},decls:59,vars:19,consts:[[1,"container-fluid"],["autocomplete","off",3,"formGroup"],[1,"row"],[1,"col-md-12"],[1,"shadow-sm","card","no-padding"],[1,"card-body","no-padding"],["formGroupName","NIWeeklyTargets"],["id","grad1"],[1,"col-md-12","full-report","report-round",2,"height","345px"],[1,"text-center",2,"margin-top","45px"],[1,"text-center"],[1,"col-sm-12",2,"margin-top","30px"],[1,"row","no-padding","mb-1"],["for","store",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-2"],[1,"col-sm-8","mb-2",2,"padding-left","10px"],["formControlName","ACC","notFoundText","Not found",3,"data","initialValue","searchKeyword","placeholder","minQueryLength","itemTemplate","notFoundTemplate","selected","inputChanged","inputCleared"],["ngAutoCompleteStatic",""],["itemTemplateStatic",""],["notFoundTemplate",""],[1,"col-sm-12"],[1,"row","no-padding","mb-2"],["for","Year",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],[1,"col-sm-5",2,"padding-left","10px"],["formControlName","YEAR",1,"form-control","form-control-sm"],[3,"value",4,"ngFor","ngForOf"],["for","Area",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],["formControlName","AREA",1,"form-control","form-control-sm"],["for","IPAD",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],["formControlName","IPAD",1,"form-control","form-control-sm"],[1,"text-center","mt-2"],["mdbBtn","","type","submit","gradient","blue","rounded","true","mdbWavesEffect","",3,"click"],["mdbBtn","","type","button","gradient","blue","rounded","true","mdbWavesEffect","",3,"click"],["bdColor","rgba(255,255,255,0.5)","size","small","color","#cc2222","type","ball-spin-clockwise-fade",3,"fullScreen"],[2,"color","#cc2222","font-size","22px"],[3,"innerHTML"],[3,"value"]],template:function(t,e){if(1&t&&(r.Sb(0,"div",0),r.Sb(1,"form",1),r.Sb(2,"div",2),r.Sb(3,"div",3),r.Sb(4,"div",4),r.Sb(5,"div",5),r.Sb(6,"div",6),r.Sb(7,"div",7),r.Sb(8,"div",8),r.Sb(9,"div",3),r.Sb(10,"h4",9),r.Kc(11,"Report Parameters"),r.Rb(),r.Sb(12,"h4",10),r.Kc(13,"Enter values for the Parameters"),r.Rb(),r.Rb(),r.Sb(14,"div",11),r.Sb(15,"div",12),r.Sb(16,"label",13),r.Kc(17,"STORE NAME:"),r.Rb(),r.Sb(18,"div",14),r.Sb(19,"ng-autocomplete",15,16),r.cc("selected",function(t){return e.selectEvent(t)})("inputChanged",function(t){return e.onChangeSearch(t)})("inputCleared",function(){return e.searchCleared()}),r.fc(21,"async"),r.Rb(),r.Ic(22,kt,1,1,"ng-template",null,17,r.Jc),r.Ic(24,_t,1,1,"ng-template",null,18,r.Jc),r.Rb(),r.Rb(),r.Rb(),r.Sb(26,"div",19),r.Sb(27,"div",20),r.Sb(28,"label",21),r.Kc(29,"YEAR:"),r.Rb(),r.Sb(30,"div",22),r.Sb(31,"select",23),r.Ic(32,Gt,2,2,"option",24),r.fc(33,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(34,"div",19),r.Sb(35,"div",20),r.Sb(36,"label",25),r.Kc(37,"AREA:"),r.Rb(),r.Sb(38,"div",22),r.Sb(39,"select",26),r.Ic(40,Tt,2,2,"option",24),r.fc(41,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(42,"div",19),r.Sb(43,"div",20),r.Sb(44,"label",27),r.Kc(45,"IPAD:"),r.Rb(),r.Sb(46,"div",22),r.Sb(47,"select",28),r.Ic(48,It,2,2,"option",24),r.fc(49,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(50,"div",3),r.Sb(51,"div",29),r.Sb(52,"button",30),r.cc("click",function(){return e.rptNIWeeklyTargets(e.NIWeeklyTargets.get("ACC").value,e.NIWeeklyTargets.get("YEAR").value,"All"===e.NIWeeklyTargets.get("AREA").value?0:e.NIWeeklyTargets.get("AREA").value,e.NIWeeklyTargets.get("IPAD").value)}),r.Kc(53," Submit"),r.Rb(),r.Sb(54,"button",31),r.cc("click",function(){return e.ResetForm()}),r.Kc(55," Reset"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(56,"ngx-spinner",32),r.Sb(57,"p",33),r.Kc(58," Loading... "),r.Rb(),r.Rb(),r.Rb()),2&t){const t=r.wc(23),o=r.wc(25);r.yb(1),r.mc("formGroup",e.NIWeeklyTargetsForm),r.yb(18),r.mc("data",r.gc(21,11,e.AllAccount))("searchKeyword",e.keyword)("placeholder",e.placeholder)("minQueryLength",2)("itemTemplate",t)("notFoundTemplate",o),r.yb(13),r.mc("ngForOf",r.gc(33,13,e.YEARS)),r.yb(8),r.mc("ngForOf",r.gc(41,15,e.AREAS)),r.yb(8),r.mc("ngForOf",r.gc(49,17,e.IPADS)),r.yb(8),r.mc("fullScreen",!1)}},directives:[P.t,P.m,P.g,P.h,B.a,P.l,P.e,P.q,E.m,_.b,_.c,k.a,P.o,P.s],pipes:[E.b],styles:["button[_ngcontent-%COMP%]{height:28px;width:75px;padding-top:5px;padding-left:5px;padding-right:5px;margin-right:0;margin-left:2px}label[_ngcontent-%COMP%]{text-transform:uppercase}[_nghost-%COMP%] .ng-autocomplete{line-height:0!important;white-space:nowrap}[_nghost-%COMP%] .autocomplete-container{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);position:relative;overflow:visible;height:30px;border-radius:4px;padding-right:0;margin-right:0}[_nghost-%COMP%] .autocomplete-container .input-container input{font-size:12px;font-weight:500!important;box-sizing:border-box;border:none;box-shadow:none;outline:none;background-color:#fff;color:rgba(0,0,0,.87);width:100%;line-height:4px;height:30px;padding:0 5px 0 12px}[_nghost-%COMP%] .autocomplete-container .input-container .x{position:absolute;right:2px;margin:auto;cursor:pointer;top:50%;transform:translateY(-50%)}[_nghost-%COMP%] .autocomplete-container .suggestions-container{display:grid;padding-right:1px;border:1px solid #b0c4de}[_nghost-%COMP%] .autocomplete-container .suggestions-container li:hover a{background-color:rgba(255,0,0,.6);color:#fff!important}[_nghost-%COMP%] .autocomplete-container .suggestions-container ul{padding:0;margin:0;max-height:300px;overflow-y:auto}[_nghost-%COMP%] .autocomplete-container .suggestions-container ul li a{padding:11px 5px 10px 12px;display:block;text-decoration:none;cursor:pointer;color:rgba(0,0,0,.87);font-size:10px;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;font-weight:700!important}.full-report[_ngcontent-%COMP%]{border:1px solid #e6e9ed;border-bottom-color:#caf59f}.report-round[_ngcontent-%COMP%]{border-radius:10px}.report-head-bg[_ngcontent-%COMP%]{border-top-left-radius:10px;border-top-right-radius:10px;background:#e6e9ed}.report-foot-bg[_ngcontent-%COMP%]{border-bottom-left-radius:10px;border-bottom-right-radius:10px;background:#e6e9ed;height:40px}.keep-middle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:-5px}.txt-width-300[_ngcontent-%COMP%]{width:300px!important;height:30px!important;margin-bottom:4px;font-family:Courier New;font-size:small}.selectwidthauto[_ngcontent-%COMP%]{width:auto!important}.font-label[_ngcontent-%COMP%]{font-size:12px}#grad1[_ngcontent-%COMP%]{height:400px;background:linear-gradient(180deg,#fff,#f5f5f5)}.no-padding[_ngcontent-%COMP%]{padding:0}.right-padding[_ngcontent-%COMP%]{padding-right:10px;font-weight:400}"]}),t})();function Wt(t,e){1&t&&r.Nb(0,"a",39),2&t&&r.mc("innerHTML",e.$implicit.Name,r.Ac)}function Yt(t,e){1&t&&r.Nb(0,"div",39),2&t&&r.mc("innerHTML",e.$implicit,r.Ac)}function Dt(t,e){if(1&t&&(r.Sb(0,"option",40),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function Vt(t,e){if(1&t&&(r.Sb(0,"option",40),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function Bt(t,e){if(1&t&&(r.Sb(0,"option",40),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function Kt(t,e){if(1&t&&(r.Sb(0,"option",40),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function zt(t,e){if(1&t&&(r.Sb(0,"option",40),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}function Ht(t,e){if(1&t&&(r.Sb(0,"option",40),r.Kc(1),r.Rb()),2&t){const t=e.$implicit;r.mc("value",t.Value),r.yb(1),r.Mc(" ",t.Name," ")}}let Ut=(()=>{class t{constructor(t,e,o,n,i,r){this.fb=t,this.router=e,this.activatedRoute=o,this.sharedService=n,this.clarinsreportservice=i,this.spinner=r,this.placeholder="Enter Search String",this.keyword="Name",this.MONTHS=this.sharedService.MONTH.asObservable(),this.YEARS=this.sharedService.YEAR.asObservable(),this.AREAS=this.sharedService.AREA.asObservable(),this.STOGRPCODES=this.sharedService.STOGRPCODE.asObservable(),this.REGIONS=this.sharedService.REGION.asObservable(),this.TOWNS=this.sharedService.TOWN.asObservable(),this.IPAD=Object(O.a)([{Value:"All",Name:"All"},{Value:"YES",Name:"YES"},{Value:"NO",Name:"NO"}]),this.CreateGBWeeklyTargetsForm()}CreateGBWeeklyTargetsForm(){this.GBWeeklyTargetsForm=this.fb.group({GBWeeklyTargets:this.fb.group({ACC:[""],YEAR:[""],AREA:[""],STOGRPCODE:[""],REGION:[""],MONTH:[""],IPAD:[""]})})}get GBWeeklyTargets(){return this.GBWeeklyTargetsForm.get("GBWeeklyTargets")}ngOnInit(){this.YEARS=Object(y.a)([this.activatedRoute.snapshot.data.Years]),this.IPADS=this.IPAD,this.AllAccount=this.sharedService.GetStore(M.e.GBWeeklyTargets),this.GetArea(),this.GetSTOGRPCODE(),this.GetRegion(),this.GetMonth(),this.InitialValue()}InitialValue(){this.GBWeeklyTargets.get("YEAR").setValue((new Date).getFullYear()),this.GBWeeklyTargets.get("IPAD").setValue("All"),this.GBWeeklyTargets.get("REGION").setValue("All"),this.GBWeeklyTargets.get("AREA").setValue("All"),this.GBWeeklyTargets.get("MONTH").setValue("All"),this.GBWeeklyTargets.get("STOGRPCODE").setValue("All")}ResetForm(){this.GBWeeklyTargetsForm.reset(),this.InitialValue()}GetRegion(){this.sharedService.GetRegion(M.c.REGION_BB).subscribe(t=>{this.sharedService.datastore.data=t,this.sharedService.REGION.next(Object.assign({},this.sharedService.datastore).data),this.sharedService.datastore.data.unshift({Value:"All",Name:"All"})},t=>console.log("Could not load REGIONS."))}GetMonth(){this.sharedService.GetMonth().subscribe(t=>{this.sharedService.datastore.data=t,this.sharedService.MONTH.next(Object.assign({},this.sharedService.datastore).data),this.sharedService.datastore.data.unshift({Value:"All",Name:"All"})},t=>console.log("Could not load MONTHS."))}GetArea(){this.sharedService.GetAreaGB("ANGELMGR").subscribe(t=>{this.sharedService.datastore.data=t,this.sharedService.AREA.next(Object.assign({},this.sharedService.datastore).data),this.sharedService.datastore.data.unshift({Value:"All",Name:"All"})},t=>console.log("Could not load AREAS."))}GetSTOGRPCODE(){this.sharedService.GetSTOGRPCODE(M.d.STOGRPCODE_GBT).subscribe(t=>{this.sharedService.datastore.data=t,this.sharedService.STOGRPCODE.next(Object.assign({},this.sharedService.datastore).data),this.sharedService.datastore.data.unshift({Value:"All",Name:"All"})},t=>console.log("Could not load STOGRPCODE."))}selectEvent(t){}onChangeSearch(t){}searchCleared(){}rptGBWeeklyTargets(t,e,o,n,i,r,a){let s;this.spinner.show(),this.clarinsreportservice.rptGBWeeklyTargets(void 0===t.Value?0:t.Value,e,o,n,i,r,a).subscribe(t=>{s=new Blob([t],{type:"application/pdf"})},t=>{console.log(t)},()=>{let t=URL.createObjectURL(s);window.open(t,"_blank"),this.spinner.hide()})}}return t.\u0275fac=function(e){return new(e||t)(r.Mb(P.c),r.Mb(n.e),r.Mb(n.a),r.Mb(w.a),r.Mb(N.a),r.Mb(k.c))},t.\u0275cmp=r.Gb({type:t,selectors:[["GBweekly-targets"]],decls:83,vars:29,consts:[[1,"container-fluid"],["autocomplete","off",3,"formGroup"],[1,"row"],[1,"col-md-12"],[1,"shadow-sm","card","no-padding"],[1,"card-body","no-padding"],["formGroupName","GBWeeklyTargets"],["id","grad1"],[1,"col-md-12","full-report","report-round",2,"height","375px"],[1,"text-center",2,"margin-top","15px"],[1,"text-center"],[1,"col-sm-12",2,"margin-top","20px"],[1,"row","no-padding","mb-2"],["for","store",1,"col-sm-3","col-form-label","text-right","no-padding","font-label","mt-1"],[1,"col-sm-9"],["formControlName","ACC","id","ACC","name","ACC","notFoundText","Not found",3,"data","initialValue","searchKeyword","placeholder","minQueryLength","itemTemplate","notFoundTemplate","debounceTime","selected","inputChanged","inputCleared"],["ngAutoCompleteStatic",""],["itemTemplateStatic",""],["notFoundTemplate",""],[1,"col-sm-12"],[1,"row","no-padding","mb-1"],["for","Year",1,"col-sm-3","col-form-label","text-right","no-padding","font-label","mt-1"],["formControlName","YEAR",1,"form-control","form-control-sm",2,"width","150px"],[3,"value",4,"ngFor","ngForOf"],["for","Area",1,"col-sm-3","col-form-label","text-right","no-padding","font-label","mt-1"],["formControlName","AREA",1,"form-control","form-control-sm",2,"width","150px"],["for","Store Group",1,"col-sm-3","col-form-label","text-right","no-padding","font-label","mt-1"],["formControlName","STOGRPCODE",1,"form-control","form-control-sm",2,"width","150px"],["for","Region",1,"col-sm-3","col-form-label","text-right","no-padding","font-label","mt-1"],["formControlName","REGION",1,"form-control","form-control-sm",2,"width","150px"],["for","MONTH",1,"col-sm-3","col-form-label","text-right","no-padding","font-label","mt-1"],["formControlName","MONTH",1,"form-control","form-control-sm",2,"width","150px"],["for","IPAD",1,"col-sm-3","col-form-label","text-right","no-padding","font-label","mt-1"],["formControlName","IPAD",1,"form-control","form-control-sm",2,"width","150px"],[1,"text-center","mt-2"],["mdbBtn","","type","submit","gradient","blue","rounded","true","mdbWavesEffect","",3,"click"],["mdbBtn","","type","button","gradient","blue","rounded","true","mdbWavesEffect","",3,"click"],["bdColor","rgba(255,255,255,0.5)","size","small","color","#cc2222","type","ball-spin-clockwise-fade",3,"fullScreen"],[2,"color","#cc2222","font-size","22px"],[3,"innerHTML"],[3,"value"]],template:function(t,e){if(1&t&&(r.Sb(0,"div",0),r.Sb(1,"form",1),r.Sb(2,"div",2),r.Sb(3,"div",3),r.Sb(4,"div",4),r.Sb(5,"div",5),r.Sb(6,"div",6),r.Sb(7,"div",7),r.Sb(8,"div",8),r.Sb(9,"div",3),r.Sb(10,"h4",9),r.Kc(11,"Report Parameters"),r.Rb(),r.Sb(12,"h4",10),r.Kc(13,"Enter values for the Parameters"),r.Rb(),r.Rb(),r.Sb(14,"div",11),r.Sb(15,"div",12),r.Sb(16,"label",13),r.Kc(17,"STORE:"),r.Rb(),r.Sb(18,"div",14),r.Sb(19,"ng-autocomplete",15,16),r.cc("selected",function(t){return e.selectEvent(t)})("inputChanged",function(t){return e.onChangeSearch(t)})("inputCleared",function(){return e.searchCleared()}),r.fc(21,"async"),r.Rb(),r.Ic(22,Wt,1,1,"ng-template",null,17,r.Jc),r.Ic(24,Yt,1,1,"ng-template",null,18,r.Jc),r.Rb(),r.Rb(),r.Rb(),r.Sb(26,"div",19),r.Sb(27,"div",20),r.Sb(28,"label",21),r.Kc(29,"YEAR:"),r.Rb(),r.Sb(30,"div",14),r.Sb(31,"select",22),r.Ic(32,Dt,2,2,"option",23),r.fc(33,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(34,"div",19),r.Sb(35,"div",20),r.Sb(36,"label",24),r.Kc(37,"AREA:"),r.Rb(),r.Sb(38,"div",14),r.Sb(39,"select",25),r.Ic(40,Vt,2,2,"option",23),r.fc(41,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(42,"div",19),r.Sb(43,"div",20),r.Sb(44,"label",26),r.Kc(45,"STORE GROUP:"),r.Rb(),r.Sb(46,"div",14),r.Sb(47,"select",27),r.Ic(48,Bt,2,2,"option",23),r.fc(49,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(50,"div",19),r.Sb(51,"div",20),r.Sb(52,"label",28),r.Kc(53,"REGION:"),r.Rb(),r.Sb(54,"div",14),r.Sb(55,"select",29),r.Ic(56,Kt,2,2,"option",23),r.fc(57,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(58,"div",19),r.Sb(59,"div",20),r.Sb(60,"label",30),r.Kc(61,"MONTH:"),r.Rb(),r.Sb(62,"div",14),r.Sb(63,"select",31),r.Ic(64,zt,2,2,"option",23),r.fc(65,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(66,"div",19),r.Sb(67,"div",20),r.Sb(68,"label",32),r.Kc(69,"IPAD:"),r.Rb(),r.Sb(70,"div",14),r.Sb(71,"select",33),r.Ic(72,Ht,2,2,"option",23),r.fc(73,"async"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(74,"div",3),r.Sb(75,"div",34),r.Sb(76,"button",35),r.cc("click",function(){return e.rptGBWeeklyTargets(e.GBWeeklyTargets.get("ACC").value,e.GBWeeklyTargets.get("YEAR").value,"All"===e.GBWeeklyTargets.get("AREA").value?0:e.GBWeeklyTargets.get("AREA").value,e.GBWeeklyTargets.get("STOGRPCODE").value,"All"===e.GBWeeklyTargets.get("REGION").value?0:e.GBWeeklyTargets.get("REGION").value,"All"===e.GBWeeklyTargets.get("MONTH").value?0:e.GBWeeklyTargets.get("MONTH").value,e.GBWeeklyTargets.get("IPAD").value)}),r.Kc(77," Submit"),r.Rb(),r.Sb(78,"button",36),r.cc("click",function(){return e.ResetForm()}),r.Kc(79," Reset"),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(80,"ngx-spinner",37),r.Sb(81,"p",38),r.Kc(82," Loading... "),r.Rb(),r.Rb(),r.Rb()),2&t){const t=r.wc(23),o=r.wc(25);r.yb(1),r.mc("formGroup",e.GBWeeklyTargetsForm),r.yb(18),r.mc("data",r.gc(21,15,e.AllAccount))("searchKeyword",e.keyword)("placeholder",e.placeholder)("minQueryLength",2)("itemTemplate",t)("notFoundTemplate",o)("debounceTime",10),r.yb(13),r.mc("ngForOf",r.gc(33,17,e.YEARS)),r.yb(8),r.mc("ngForOf",r.gc(41,19,e.AREAS)),r.yb(8),r.mc("ngForOf",r.gc(49,21,e.STOGRPCODES)),r.yb(8),r.mc("ngForOf",r.gc(57,23,e.REGIONS)),r.yb(8),r.mc("ngForOf",r.gc(65,25,e.MONTHS)),r.yb(8),r.mc("ngForOf",r.gc(73,27,e.IPADS)),r.yb(8),r.mc("fullScreen",!1)}},directives:[P.t,P.m,P.g,P.h,B.a,P.l,P.e,P.q,E.m,_.b,_.c,k.a,P.o,P.s],pipes:[E.b],styles:["button[_ngcontent-%COMP%]{height:28px;width:75px;padding-top:5px;padding-left:5px;padding-right:5px;margin-right:0;margin-left:2px}label[_ngcontent-%COMP%]{text-transform:uppercase}[_nghost-%COMP%] .ng-autocomplete{line-height:0!important;white-space:nowrap}[_nghost-%COMP%] .autocomplete-container{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);position:relative;overflow:visible;height:30px;border-radius:4px;padding-right:0;margin-right:0}[_nghost-%COMP%] .autocomplete-container .input-container input{font-size:12px;font-weight:500!important;box-sizing:border-box;border:none;box-shadow:none;outline:none;background-color:#fff;color:rgba(0,0,0,.87);width:100%;line-height:4px;height:30px;padding:0 5px 0 12px}[_nghost-%COMP%] .autocomplete-container .input-container .x{position:absolute;right:2px;margin:auto;cursor:pointer;top:50%;transform:translateY(-50%)}[_nghost-%COMP%] .autocomplete-container .suggestions-container{display:grid;padding-right:1px;border:1px solid #b0c4de}[_nghost-%COMP%] .autocomplete-container .suggestions-container li:hover a{background-color:rgba(255,0,0,.6);color:#fff!important}[_nghost-%COMP%] .autocomplete-container .suggestions-container ul{padding:0;margin:0;max-height:300px;overflow-y:auto}[_nghost-%COMP%] .autocomplete-container .suggestions-container ul li a{padding:11px 5px 10px 12px;display:block;text-decoration:none;cursor:pointer;color:rgba(0,0,0,.87);font-size:10px;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;font-weight:700!important}.full-report[_ngcontent-%COMP%]{border:1px solid #e6e9ed;border-bottom-color:rgba(202,245,159,.8)}.report-round[_ngcontent-%COMP%]{border-radius:10px}.report-head-bg[_ngcontent-%COMP%]{border-top-left-radius:10px;border-top-right-radius:10px;background:#e6e9ed}.report-foot-bg[_ngcontent-%COMP%]{border-bottom-left-radius:10px;border-bottom-right-radius:10px;background:#e6e9ed;height:40px}.keep-middle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:-5px}.txt-width-300[_ngcontent-%COMP%]{width:300px!important;height:30px!important;margin-bottom:4px;font-family:Courier New;font-size:small}.selectwidthauto[_ngcontent-%COMP%]{width:auto!important}.font-label[_ngcontent-%COMP%]{font-size:12px}#grad1[_ngcontent-%COMP%]{height:425px;background:linear-gradient(180deg,#fff,#f5f5f5)}.no-padding[_ngcontent-%COMP%]{padding:0}.right-padding[_ngcontent-%COMP%]{padding-right:10px;font-weight:400}"]}),t})();var jt=o("Iab2"),$t=o("IheW"),Jt=o("EApP"),qt=o("u47x"),Qt=o("qvAe");function Zt(t,e){if(1&t){const t=r.Tb();r.Sb(0,"tr",23),r.Sb(1,"td",24),r.Nb(2,"input",25),r.Rb(),r.Sb(3,"td",26),r.Sb(4,"button",27),r.cc("click",function(){r.zc(t);const o=e.index,n=r.ec();return n.Download(o,n.MStaticReportsList.controls[o].get("FILENAME").value)}),r.Nb(5,"i",28),r.Rb(),r.Rb(),r.Sb(6,"td",26),r.Sb(7,"button",29),r.cc("click",function(){r.zc(t);const o=e.index,n=r.ec();return n.Delete(o,n.MStaticReportsList.controls[o].get("FILENAME").value)}),r.Nb(8,"i",30),r.Rb(),r.Rb(),r.Rb()}2&t&&r.mc("formGroupName",e.index)}let Xt=(()=>{class t{constructor(t,e,o,n,i,a){this.fb=t,this.router=e,this.toastr=o,this.interactivityChecker=n,this.staticReportsService=i,this.platformId=a,this.onUploadFinished=new r.n,this.UploadFile=(t,e)=>{0!==t.length&&this.staticReportsService.UploadFile(t,e,"ClarinsStaticReports","MonthlyReports").subscribe(t=>{t.type===$t.d.UploadProgress?this.progress=Math.round(100*t.loaded/t.total):t.type===$t.d.Response&&(this.message="Upload success.",this.onUploadFinished.emit(t.body)),this.GetAllFiles(),this.MStaticRports.reset()})},this.CreateMonthlyReportsForm()}CreateMonthlyReportsForm(){const t=[];for(let e=0;e<14;e++)t.push(this.StaticReports());this.MonthlyReportsForm=this.fb.group({MStaticRports:this.fb.group({FILENAME:[""]}),MStaticReportsList:this.fb.array(t)})}StaticReports(){return this.fb.group({DOWNLOADFILE:[""],FILENAME:[""]})}get MStaticRports(){return this.MonthlyReportsForm.get("MStaticRports")}get MStaticReportsList(){return this.MonthlyReportsForm.get("MStaticReportsList")}ngOnInit(){this.GetAllFiles()}GetAllFiles(){this.staticReportsService.StaticReportDetails("Clarins","MonthlyPeriodic").subscribe(t=>{if(this.FileName=t,this.FileName.length>0){const t=this.MonthlyReportsForm.controls.MStaticReportsList;for(let e=0;e<this.FileName.length;e++)t.at(+e).get("DOWNLOADFILE").setValue(this.FileName[e].FileNameWithOutExtension),t.at(+e).get("FILENAME").setValue(this.FileName[e].FileName),e>=13&&e<this.FileName.length-1&&this.MStaticReportsList.push(this.StaticReports())}})}Delete(t,e){const o=this.MonthlyReportsForm.controls.MStaticReportsList;for(let n=0;n<o.length;n++)if(t==n){e&&this.staticReportsService.Delete("Clarins","MonthlyPeriodic",e).subscribe(e=>{null==e&&(this.MStaticReportsList.removeAt(t),this.toastr.warning("Deleted Successfully","Clarins"))},t=>{console.log(t)});break}}Download(t,e){const o=this.MonthlyReportsForm.controls.MStaticReportsList;for(let n=0;n<o.length;n++)if(t==n){e&&this.staticReportsService.DownloadFile("Clarins","MonthlyPeriodic",e).subscribe(t=>{let o=new Blob([t],{type:"application/pdf"});const n=window.URL.createObjectURL(o);"application/pdf"===t.type?window.open(n,"_blank"):jt.saveAs(o,e)});break}}keyevent(t){t.preventDefault();const e=Array.prototype.slice.call(document.querySelectorAll("input")),o=[];if(Array.isArray(o)&&!o.length)for(let n=0;n<e.length;n++)this.interactivityChecker.isFocusable(e[n])&&o.push(e[n]);if(13===t.keyCode||40===t.keyCode){const t=o[o.indexOf(document.activeElement)+1];t&&(t.focus(),t.select())}else if(38===t.keyCode){const t=o[o.indexOf(document.activeElement)-1];t&&(t.focus(),t.select())}}}return t.\u0275fac=function(e){return new(e||t)(r.Mb(P.c),r.Mb(n.e),r.Mb(Jt.b),r.Mb(qt.d),r.Mb(Qt.a),r.Mb(r.B))},t.\u0275cmp=r.Gb({type:t,selectors:[["app-monthly-reports"]],hostBindings:function(t,e){1&t&&r.cc("keyup",function(t){return e.keyevent(t)},!1,r.yc)},outputs:{onUploadFinished:"onUploadFinished"},decls:24,vars:3,consts:[[1,"container-fluid"],["autocomplete","off",3,"formGroup"],[1,"row"],[1,"col-md-11"],[1,"shadow-sm","card","no-padding"],[1,"card-body","no-padding"],[1,"row",2,"padding-bottom","0px"],[1,"col-md-12"],["formGroupName","MStaticRports"],[1,"row","no-padding","mb-2"],[1,"col-sm-8",2,"padding-right","5px"],["type","text","formControlName","FILENAME","id","FILENAME","placeholder","New File Name",1,"form-control","form-control-sm","bg-white"],[1,"col-sm-4","no-padding","text-right"],[1,"upload-button","btn","blue-gradient","btn-block","btn-rounded","px-1","mr-1",3,"disabled"],[1,"fa","fa-upload"],["type","file",3,"change"],["file",""],[1,"shadow-sm","card"],[1,"card-body"],[1,"tableFixHead"],[1,"table-responsive-sm","fix-table"],["formArrayName","MStaticReportsList",1,"table","table-sm","table-borderless"],[3,"formGroupName",4,"ngFor","ngForOf"],[3,"formGroupName"],[1,"no-padding;"],["type","text","formControlName","DOWNLOADFILE",1,"form-control","form-control-sm","no-border",2,"padding-left","15px"],[1,"no-padding;",2,"width","30px"],["type","button",1,"my-btn-height","btn","blue-gradient","btn-block","btn-rounded","px-1",3,"click"],["aria-hidden","true","title","Download",1,"fa","fa-download"],["type","button",1,"my-btn-height","btn","peach-gradient","btn-block","btn-rounded","px-1",3,"click"],["title","Delete",1,"fa","fa-trash"]],template:function(t,e){if(1&t){const t=r.Tb();r.Sb(0,"div",0),r.Sb(1,"form",1),r.Sb(2,"div",2),r.Sb(3,"div",3),r.Sb(4,"div",4),r.Sb(5,"div",5),r.Sb(6,"div",6),r.Sb(7,"div",7),r.Sb(8,"div",8),r.Sb(9,"div",9),r.Sb(10,"div",10),r.Nb(11,"input",11),r.Rb(),r.Sb(12,"div",12),r.Sb(13,"button",13),r.Nb(14,"i",14),r.Sb(15,"input",15,16),r.cc("change",function(){r.zc(t);const o=r.wc(16);return e.UploadFile(o.files,e.MStaticRports.get("FILENAME").value)}),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(17,"div",17),r.Sb(18,"div",18),r.Sb(19,"div",19),r.Sb(20,"div",20),r.Sb(21,"table",21),r.Sb(22,"tbody"),r.Ic(23,Zt,9,1,"tr",22),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb()}2&t&&(r.yb(1),r.mc("formGroup",e.MonthlyReportsForm),r.yb(12),r.mc("disabled",""===e.MStaticRports.get("FILENAME").value||null===e.MStaticRports.get("FILENAME").value),r.yb(10),r.mc("ngForOf",e.MStaticReportsList.controls))},directives:[P.t,P.m,P.g,P.h,P.a,P.l,P.e,P.b,E.m],styles:['.row[_ngcontent-%COMP%]{padding:10px}.card[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:1px 0}.card-body[_ngcontent-%COMP%]{flex:1 1 auto;min-height:1px;padding:1px}button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:14px}.action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:5px}.font-label[_ngcontent-%COMP%]{font-size:12px}.btn-height[_ngcontent-%COMP%]{height:30px;width:90px}.my-btn-height[_ngcontent-%COMP%]{font-size:12px;height:28px;width:30px;margin-top:0;padding:0;color:#fff}.upload-button[_ngcontent-%COMP%]{height:30px;overflow:hidden;position:relative;width:120px;color:#fff;padding-top:3px}.upload-button[_ngcontent-%COMP%]:after{content:" Add New File";color:#fff;font-size:14px;text-align:center}.upload-button[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]{font-size:14px;left:0;opacity:0;position:absolute;top:0;padding-top:0}table[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:12px;font-weight:700;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;text-transform:uppercase}input[_ngcontent-%COMP%]::-moz-placeholder{color:#c0bdbd;font-weight:300;text-transform:capitalize}input[_ngcontent-%COMP%]::placeholder{color:#c0bdbd;font-weight:300;text-transform:capitalize}.fix-table[_ngcontent-%COMP%]{height:375px;overflow-y:auto;width:100%}.tableFixHead[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;top:0}thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:1px!important;height:32px!important;font-weight:400;vertical-align:middle}.table-borderless[_ngcontent-%COMP%] td[_ngcontent-%COMP%], tr[_ngcontent-%COMP%] .table-borderless[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border:0}tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{height:22px}table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%], tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{padding:0!important}.no-padding[_ngcontent-%COMP%]{padding:0}.no-border[_ngcontent-%COMP%]{border:0;border-color:#fff}.right-padding[_ngcontent-%COMP%]{padding-right:10px;font-weight:400}.z-depth-1a[_ngcontent-%COMP%]{box-shadow:0 2px 5px 0 rgba(55,161,255,.26),0 4px 12px 0 rgba(121,155,254,.25)}.btn[_ngcontent-%COMP%]:hover, .z-depth-1-half[_ngcontent-%COMP%]{box-shadow:0 5px 11px 0 rgba(85,182,255,.28),0 4px 15px 0 rgba(36,133,255,.15)}']}),t})();function te(t,e){if(1&t){const t=r.Tb();r.Sb(0,"tr",23),r.Sb(1,"td",24),r.Nb(2,"input",25),r.Rb(),r.Sb(3,"td",26),r.Sb(4,"button",27),r.cc("click",function(){r.zc(t);const o=e.index,n=r.ec();return n.Download(o,n.HStaticReportsList.controls[o].get("FILENAME").value)}),r.Nb(5,"i",28),r.Rb(),r.Rb(),r.Sb(6,"td",26),r.Sb(7,"button",29),r.cc("click",function(){r.zc(t);const o=e.index,n=r.ec();return n.Delete(o,n.HStaticReportsList.controls[o].get("FILENAME").value)}),r.Nb(8,"i",30),r.Rb(),r.Rb(),r.Rb()}2&t&&r.mc("formGroupName",e.index)}let ee=(()=>{class t{constructor(t,e,o,n,i,a){this.fb=t,this.staticReportsService=e,this.interactivityChecker=o,this.router=n,this.toastr=i,this.platformId=a,this.onUploadFinished=new r.n,this.UploadFile=(t,e)=>{0!==t.length&&this.staticReportsService.UploadFile(t,e,"ClarinsStaticReports","HistoricReports").subscribe(t=>{t.type===$t.d.UploadProgress?this.progress=Math.round(100*t.loaded/t.total):t.type===$t.d.Response&&(this.message="Upload success.",this.onUploadFinished.emit(t.body)),this.GetAllFiles(),this.HStaticRports.reset()})},this.CreateHistoricReportsForm()}CreateHistoricReportsForm(){const t=[];for(let e=0;e<14;e++)t.push(this.StaticReports());this.HistoricReportsForm=this.fb.group({HStaticRports:this.fb.group({FILENAME:[""]}),HStaticReportsList:this.fb.array(t)})}StaticReports(){return this.fb.group({DOWNLOADFILE:[""],FILENAME:[""]})}get HStaticRports(){return this.HistoricReportsForm.get("HStaticRports")}get HStaticReportsList(){return this.HistoricReportsForm.get("HStaticReportsList")}ngOnInit(){this.GetAllFiles()}GetAllFiles(){this.staticReportsService.StaticReportDetails("Clarins","Historic").subscribe(t=>{if(this.FileName=t,this.FileName.length>0){const t=this.HistoricReportsForm.controls.HStaticReportsList;for(let e=0;e<this.FileName.length;e++)t.at(+e).get("DOWNLOADFILE").setValue(this.FileName[e].FileNameWithOutExtension),t.at(+e).get("FILENAME").setValue(this.FileName[e].FileName),e>=13&&e<this.FileName.length-1&&this.HStaticReportsList.push(this.StaticReports())}})}Delete(t,e){const o=this.HistoricReportsForm.controls.HStaticReportsList;for(let n=0;n<o.length;n++)if(t==n){e&&this.staticReportsService.Delete("Clarins","Historic",e).subscribe(e=>{null==e&&(this.HStaticReportsList.removeAt(t),this.toastr.warning("Deleted Successfully","Clarins"))},t=>{console.log(t)});break}}Download(t,e){const o=this.HistoricReportsForm.controls.HStaticReportsList;for(let n=0;n<o.length;n++)if(t==n){e&&this.staticReportsService.DownloadFile("Clarins","Historic",e).subscribe(t=>{let o=new Blob([t],{type:"application/pdf"});const n=window.URL.createObjectURL(o);"application/pdf"===t.type?window.open(n,"_blank"):jt.saveAs(o,e)});break}}keyevent(t){t.preventDefault();const e=Array.prototype.slice.call(document.querySelectorAll("input")),o=[];if(Array.isArray(o)&&!o.length)for(let n=0;n<e.length;n++)this.interactivityChecker.isFocusable(e[n])&&o.push(e[n]);if(13===t.keyCode||40===t.keyCode){const t=o[o.indexOf(document.activeElement)+1];t&&(t.focus(),t.select())}else if(38===t.keyCode){const t=o[o.indexOf(document.activeElement)-1];t&&(t.focus(),t.select())}}}return t.\u0275fac=function(e){return new(e||t)(r.Mb(P.c),r.Mb(Qt.a),r.Mb(qt.d),r.Mb(n.e),r.Mb(Jt.b),r.Mb(r.B))},t.\u0275cmp=r.Gb({type:t,selectors:[["app-historic-reports"]],hostBindings:function(t,e){1&t&&r.cc("keyup",function(t){return e.keyevent(t)},!1,r.yc)},outputs:{onUploadFinished:"onUploadFinished"},decls:24,vars:3,consts:[[1,"container-fluid"],["autocomplete","off",3,"formGroup"],[1,"row"],[1,"col-md-11"],[1,"shadow-sm","card","no-padding"],[1,"card-body","no-padding"],[1,"row",2,"padding-bottom","0px"],[1,"col-md-12"],["formGroupName","HStaticRports"],[1,"row","no-padding","mb-2"],[1,"col-sm-8",2,"padding-right","5px"],["type","text","formControlName","FILENAME","id","FILENAME","placeholder","New File Name",1,"form-control","form-control-sm","bg-white"],[1,"col-sm-4","no-padding","text-right"],[1,"upload-button","btn","blue-gradient","btn-block","btn-rounded","px-1","mr-1",3,"disabled"],[1,"fa","fa-upload"],["type","file",3,"change"],["file",""],[1,"shadow-sm","card"],[1,"card-body"],[1,"tableFixHead"],[1,"table-responsive-sm","fix-table"],["formArrayName","HStaticReportsList",1,"table","table-sm","table-borderless"],[3,"formGroupName",4,"ngFor","ngForOf"],[3,"formGroupName"],[1,"no-padding;"],["type","text","formControlName","DOWNLOADFILE",1,"form-control","form-control-sm","no-border",2,"padding-left","15px"],[1,"no-padding;",2,"width","30px"],["type","button",1,"my-btn-height","btn","blue-gradient","btn-block","btn-rounded","px-1",3,"click"],["aria-hidden","true","title","Download",1,"fa","fa-download"],["type","button",1,"my-btn-height","btn","peach-gradient","btn-block","btn-rounded","px-1",3,"click"],["title","Delete",1,"fa","fa-trash"]],template:function(t,e){if(1&t){const t=r.Tb();r.Sb(0,"div",0),r.Sb(1,"form",1),r.Sb(2,"div",2),r.Sb(3,"div",3),r.Sb(4,"div",4),r.Sb(5,"div",5),r.Sb(6,"div",6),r.Sb(7,"div",7),r.Sb(8,"div",8),r.Sb(9,"div",9),r.Sb(10,"div",10),r.Nb(11,"input",11),r.Rb(),r.Sb(12,"div",12),r.Sb(13,"button",13),r.Nb(14,"i",14),r.Sb(15,"input",15,16),r.cc("change",function(){r.zc(t);const o=r.wc(16);return e.UploadFile(o.files,e.HStaticRports.get("FILENAME").value)}),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(17,"div",17),r.Sb(18,"div",18),r.Sb(19,"div",19),r.Sb(20,"div",20),r.Sb(21,"table",21),r.Sb(22,"tbody"),r.Ic(23,te,9,1,"tr",22),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb()}2&t&&(r.yb(1),r.mc("formGroup",e.HistoricReportsForm),r.yb(12),r.mc("disabled",""===e.HStaticRports.get("FILENAME").value||null===e.HStaticRports.get("FILENAME").value),r.yb(10),r.mc("ngForOf",e.HStaticReportsList.controls))},directives:[P.t,P.m,P.g,P.h,P.a,P.l,P.e,P.b,E.m],styles:['.row[_ngcontent-%COMP%]{padding:10px}.card[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:1px 0}.card-body[_ngcontent-%COMP%]{flex:1 1 auto;min-height:1px;padding:1px}button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:14px}.action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:5px}.font-label[_ngcontent-%COMP%]{font-size:12px}.btn-height[_ngcontent-%COMP%]{height:30px;width:90px}.my-btn-height[_ngcontent-%COMP%]{font-size:12px;height:28px;width:30px;margin-top:0;padding:0;color:#fff}.upload-button[_ngcontent-%COMP%]{height:30px;overflow:hidden;position:relative;width:120px;color:#fff;padding-top:3px}.upload-button[_ngcontent-%COMP%]:after{content:" Add New File";color:#fff;font-size:14px;text-align:center}.upload-button[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]{font-size:14px;left:0;opacity:0;position:absolute;top:0;padding-top:0}table[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:12px;font-weight:700;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;text-transform:uppercase}input[_ngcontent-%COMP%]::-moz-placeholder{color:#c0bdbd;font-weight:300;text-transform:capitalize}input[_ngcontent-%COMP%]::placeholder{color:#c0bdbd;font-weight:300;text-transform:capitalize}.fix-table[_ngcontent-%COMP%]{height:375px;overflow-y:auto;width:100%}.tableFixHead[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;top:0}thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:1px!important;height:32px!important;font-weight:400;vertical-align:middle}.table-borderless[_ngcontent-%COMP%] td[_ngcontent-%COMP%], tr[_ngcontent-%COMP%] .table-borderless[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border:0}tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{height:22px}table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%], tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{padding:0!important}.no-padding[_ngcontent-%COMP%]{padding:0}.no-border[_ngcontent-%COMP%]{border:0;border-color:#fff}.right-padding[_ngcontent-%COMP%]{padding-right:10px;font-weight:400}.z-depth-1a[_ngcontent-%COMP%]{box-shadow:0 2px 5px 0 rgba(55,161,255,.26),0 4px 12px 0 rgba(121,155,254,.25)}.btn[_ngcontent-%COMP%]:hover, .z-depth-1-half[_ngcontent-%COMP%]{box-shadow:0 5px 11px 0 rgba(85,182,255,.28),0 4px 15px 0 rgba(36,133,255,.15)}']}),t})();function oe(t,e){if(1&t){const t=r.Tb();r.Sb(0,"tr",23),r.Sb(1,"td",24),r.Nb(2,"input",25),r.Rb(),r.Sb(3,"td",26),r.Sb(4,"button",27),r.cc("click",function(){r.zc(t);const o=e.index,n=r.ec();return n.Download(o,n.GStaticReportsList.controls[o].get("FILENAME").value)}),r.Nb(5,"i",28),r.Rb(),r.Rb(),r.Sb(6,"td",26),r.Sb(7,"button",29),r.cc("click",function(){r.zc(t);const o=e.index,n=r.ec();return n.Delete(o,n.GStaticReportsList.controls[o].get("FILENAME").value)}),r.Nb(8,"i",30),r.Rb(),r.Rb(),r.Rb()}2&t&&r.mc("formGroupName",e.index)}let ne=(()=>{class t{constructor(t,e,o,n,i,a){this.fb=t,this.router=e,this.toastr=o,this.interactivityChecker=n,this.staticReportsService=i,this.platformId=a,this.onUploadFinished=new r.n,this.UploadFile=(t,e)=>{0!==t.length&&this.staticReportsService.UploadFile(t,e,"ClarinsStaticReports","GeneratorReports").subscribe(t=>{t.type===$t.d.UploadProgress?this.progress=Math.round(100*t.loaded/t.total):t.type===$t.d.Response&&(this.message="Upload success.",this.onUploadFinished.emit(t.body)),this.GetAllFiles(),this.GStaticRports.reset()})},this.CreateGeneratorReportsForm()}CreateGeneratorReportsForm(){const t=[];for(let e=0;e<14;e++)t.push(this.StaticReports());this.GeneratorReportsForm=this.fb.group({GStaticRports:this.fb.group({FILENAME:[""]}),GStaticReportsList:this.fb.array(t)})}StaticReports(){return this.fb.group({DOWNLOADFILE:[""],FILENAME:[""]})}get GStaticRports(){return this.GeneratorReportsForm.get("GStaticRports")}get GStaticReportsList(){return this.GeneratorReportsForm.get("GStaticReportsList")}ngOnInit(){this.GetAllFiles()}GetAllFiles(){this.staticReportsService.StaticReportDetails("Clarins","Generator").subscribe(t=>{if(this.FileName=t,this.FileName.length>0){const t=this.GeneratorReportsForm.controls.GStaticReportsList;for(let e=0;e<this.FileName.length;e++)t.at(+e).get("DOWNLOADFILE").setValue(this.FileName[e].FileNameWithOutExtension),t.at(+e).get("FILENAME").setValue(this.FileName[e].FileName),e>=13&&e<this.FileName.length-1&&this.GStaticReportsList.push(this.StaticReports())}})}Delete(t,e){const o=this.GeneratorReportsForm.controls.GStaticReportsList;for(let n=0;n<o.length;n++)if(t==n){e&&this.staticReportsService.Delete("Clarins","Generator",e).subscribe(e=>{null==e&&(this.GStaticReportsList.removeAt(t),this.toastr.warning("Deleted Successfully","Clarins"))},t=>{console.log(t)});break}}Download(t,e){const o=this.GeneratorReportsForm.controls.GStaticReportsList;for(let n=0;n<o.length;n++)if(t==n){e&&this.staticReportsService.DownloadFile("Clarins","Generator",e).subscribe(t=>{let o=new Blob([t],{type:"application/pdf"});const n=window.URL.createObjectURL(o);"application/pdf"===t.type?window.open(n,"_blank"):jt.saveAs(o,e)});break}}keyevent(t){t.preventDefault();const e=Array.prototype.slice.call(document.querySelectorAll("input")),o=[];if(Array.isArray(o)&&!o.length)for(let n=0;n<e.length;n++)this.interactivityChecker.isFocusable(e[n])&&o.push(e[n]);if(13===t.keyCode||40===t.keyCode){const t=o[o.indexOf(document.activeElement)+1];t&&(t.focus(),t.select())}else if(38===t.keyCode){const t=o[o.indexOf(document.activeElement)-1];t&&(t.focus(),t.select())}}}return t.\u0275fac=function(e){return new(e||t)(r.Mb(P.c),r.Mb(n.e),r.Mb(Jt.b),r.Mb(qt.d),r.Mb(Qt.a),r.Mb(r.B))},t.\u0275cmp=r.Gb({type:t,selectors:[["app-generator-reports"]],hostBindings:function(t,e){1&t&&r.cc("keyup",function(t){return e.keyevent(t)},!1,r.yc)},outputs:{onUploadFinished:"onUploadFinished"},decls:24,vars:3,consts:[[1,"container-fluid"],["autocomplete","off",3,"formGroup"],[1,"row"],[1,"col-md-11"],[1,"shadow-sm","card","no-padding"],[1,"card-body","no-padding"],[1,"row",2,"padding-bottom","0px"],[1,"col-md-12"],["formGroupName","GStaticRports"],[1,"row","no-padding","mb-2"],[1,"col-sm-8",2,"padding-right","5px"],["type","text","formControlName","FILENAME","id","FILENAME","placeholder","New File Name",1,"form-control","form-control-sm","bg-white"],[1,"col-sm-4","no-padding","text-right"],[1,"upload-button","btn","blue-gradient","btn-block","btn-rounded","px-1","mr-1",3,"disabled"],[1,"fa","fa-upload"],["type","file",3,"change"],["file",""],[1,"shadow-sm","card"],[1,"card-body"],[1,"tableFixHead"],[1,"table-responsive-sm","fix-table"],["formArrayName","GStaticReportsList",1,"table","table-sm","table-borderless"],[3,"formGroupName",4,"ngFor","ngForOf"],[3,"formGroupName"],[1,"no-padding;"],["type","text","formControlName","DOWNLOADFILE",1,"form-control","form-control-sm","no-border",2,"padding-left","15px"],[1,"no-padding;",2,"width","30px"],["type","button",1,"my-btn-height","btn","blue-gradient","btn-block","btn-rounded","px-1",3,"click"],["aria-hidden","true","title","Download",1,"fa","fa-download"],["type","button",1,"my-btn-height","btn","peach-gradient","btn-block","btn-rounded","px-1",3,"click"],["title","Delete",1,"fa","fa-trash"]],template:function(t,e){if(1&t){const t=r.Tb();r.Sb(0,"div",0),r.Sb(1,"form",1),r.Sb(2,"div",2),r.Sb(3,"div",3),r.Sb(4,"div",4),r.Sb(5,"div",5),r.Sb(6,"div",6),r.Sb(7,"div",7),r.Sb(8,"div",8),r.Sb(9,"div",9),r.Sb(10,"div",10),r.Nb(11,"input",11),r.Rb(),r.Sb(12,"div",12),r.Sb(13,"button",13),r.Nb(14,"i",14),r.Sb(15,"input",15,16),r.cc("change",function(){r.zc(t);const o=r.wc(16);return e.UploadFile(o.files,e.GStaticRports.get("FILENAME").value)}),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(17,"div",17),r.Sb(18,"div",18),r.Sb(19,"div",19),r.Sb(20,"div",20),r.Sb(21,"table",21),r.Sb(22,"tbody"),r.Ic(23,oe,9,1,"tr",22),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb()}2&t&&(r.yb(1),r.mc("formGroup",e.GeneratorReportsForm),r.yb(12),r.mc("disabled",""===e.GStaticRports.get("FILENAME").value||null===e.GStaticRports.get("FILENAME").value),r.yb(10),r.mc("ngForOf",e.GStaticReportsList.controls))},directives:[P.t,P.m,P.g,P.h,P.a,P.l,P.e,P.b,E.m],styles:['.row[_ngcontent-%COMP%]{padding:10px}.card[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:1px 0}.card-body[_ngcontent-%COMP%]{flex:1 1 auto;min-height:1px;padding:1px}button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:14px}.action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:5px}.font-label[_ngcontent-%COMP%]{font-size:12px}.btn-height[_ngcontent-%COMP%]{height:30px;width:90px}.my-btn-height[_ngcontent-%COMP%]{font-size:12px;height:28px;width:30px;margin-top:0;padding:0;color:#fff}.upload-button[_ngcontent-%COMP%]{height:30px;overflow:hidden;position:relative;width:120px;color:#fff;padding-top:3px}.upload-button[_ngcontent-%COMP%]:after{content:" Add New File";color:#fff;font-size:14px;text-align:center}.upload-button[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]{font-size:14px;left:0;opacity:0;position:absolute;top:0;padding-top:0}table[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:12px;font-weight:700;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;text-transform:uppercase}input[_ngcontent-%COMP%]::-moz-placeholder{color:#c0bdbd;font-weight:300;text-transform:capitalize}input[_ngcontent-%COMP%]::placeholder{color:#c0bdbd;font-weight:300;text-transform:capitalize}.fix-table[_ngcontent-%COMP%]{height:375px;overflow-y:auto;width:100%}.tableFixHead[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;top:0}thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:1px!important;height:32px!important;font-weight:400;vertical-align:middle}.table-borderless[_ngcontent-%COMP%] td[_ngcontent-%COMP%], tr[_ngcontent-%COMP%] .table-borderless[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border:0}tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{height:22px}table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%], tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{padding:0!important}.no-padding[_ngcontent-%COMP%]{padding:0}.no-border[_ngcontent-%COMP%]{border:0;border-color:#fff}.right-padding[_ngcontent-%COMP%]{padding-right:10px;font-weight:400}.z-depth-1a[_ngcontent-%COMP%]{box-shadow:0 2px 5px 0 rgba(55,161,255,.26),0 4px 12px 0 rgba(121,155,254,.25)}.btn[_ngcontent-%COMP%]:hover, .z-depth-1-half[_ngcontent-%COMP%]{box-shadow:0 5px 11px 0 rgba(85,182,255,.28),0 4px 15px 0 rgba(36,133,255,.15)}']}),t})();function ie(t,e){if(1&t){const t=r.Tb();r.Sb(0,"tr",23),r.Sb(1,"td",24),r.Nb(2,"input",25),r.Rb(),r.Sb(3,"td",26),r.Sb(4,"button",27),r.cc("click",function(){r.zc(t);const o=e.index,n=r.ec();return n.Download(o,n.CYStaticReportsList.controls[o].get("FILENAME").value)}),r.Nb(5,"i",28),r.Rb(),r.Rb(),r.Sb(6,"td",26),r.Sb(7,"button",29),r.cc("click",function(){r.zc(t);const o=e.index,n=r.ec();return n.Delete(o,n.CYStaticReportsList.controls[o].get("FILENAME").value)}),r.Nb(8,"i",30),r.Rb(),r.Rb(),r.Rb()}2&t&&r.mc("formGroupName",e.index)}let re=(()=>{class t{constructor(t,e,o,n,i,a){this.fb=t,this.router=e,this.toastr=o,this.interactivityChecker=n,this.staticReportsService=i,this.platformId=a,this.onUploadFinished=new r.n,this.UploadFile=(t,e)=>{0!==t.length&&this.staticReportsService.UploadFile(t,e,"ClarinsStaticReports","GroupStrategyReports_CY").subscribe(t=>{t.type===$t.d.UploadProgress?this.progress=Math.round(100*t.loaded/t.total):t.type===$t.d.Response&&(this.message="Upload success.",this.onUploadFinished.emit(t.body)),this.GetAllFiles(),this.CYStaticRports.reset()})},this.CreateClarinsYearReportsForm()}CreateClarinsYearReportsForm(){const t=[];for(let e=0;e<14;e++)t.push(this.StaticReports());this.ClarinsYearReportsForm=this.fb.group({CYStaticRports:this.fb.group({FILENAME:[""]}),CYStaticReportsList:this.fb.array(t)})}StaticReports(){return this.fb.group({DOWNLOADFILE:[""],FILENAME:[""]})}get CYStaticRports(){return this.ClarinsYearReportsForm.get("CYStaticRports")}get CYStaticReportsList(){return this.ClarinsYearReportsForm.get("CYStaticReportsList")}ngOnInit(){this.GetAllFiles()}GetAllFiles(){this.staticReportsService.StaticReportDetails("Clarins","GroupStrategyClarins").subscribe(t=>{if(this.FileName=t,this.FileName.length>0){const t=this.ClarinsYearReportsForm.controls.CYStaticReportsList;for(let e=0;e<this.FileName.length;e++)t.at(+e).get("DOWNLOADFILE").setValue(this.FileName[e].FileNameWithOutExtension),t.at(+e).get("FILENAME").setValue(this.FileName[e].FileName),e>=13&&e<this.FileName.length-1&&this.CYStaticReportsList.push(this.StaticReports())}})}Delete(t,e){const o=this.ClarinsYearReportsForm.controls.CYStaticReportsList;for(let n=0;n<o.length;n++)if(t==n){e&&this.staticReportsService.Delete("Clarins","GroupStrategyClarins",e).subscribe(e=>{null==e&&(this.CYStaticReportsList.removeAt(t),this.toastr.warning("Deleted Successfully","Clarins"))},t=>{console.log(t)});break}}Download(t,e){const o=this.ClarinsYearReportsForm.controls.CYStaticReportsList;for(let n=0;n<o.length;n++)if(t==n){e&&this.staticReportsService.DownloadFile("Clarins","GroupStrategyClarins",e).subscribe(t=>{let o=new Blob([t],{type:"application/pdf"});const n=window.URL.createObjectURL(o);"application/pdf"===t.type?window.open(n,"_blank"):jt.saveAs(o,e)});break}}keyevent(t){t.preventDefault();const e=Array.prototype.slice.call(document.querySelectorAll("input")),o=[];if(Array.isArray(o)&&!o.length)for(let n=0;n<e.length;n++)this.interactivityChecker.isFocusable(e[n])&&o.push(e[n]);if(13===t.keyCode||40===t.keyCode){const t=o[o.indexOf(document.activeElement)+1];t&&(t.focus(),t.select())}else if(38===t.keyCode){const t=o[o.indexOf(document.activeElement)-1];t&&(t.focus(),t.select())}}}return t.\u0275fac=function(e){return new(e||t)(r.Mb(P.c),r.Mb(n.e),r.Mb(Jt.b),r.Mb(qt.d),r.Mb(Qt.a),r.Mb(r.B))},t.\u0275cmp=r.Gb({type:t,selectors:[["app-clarins-year"]],hostBindings:function(t,e){1&t&&r.cc("keyup",function(t){return e.keyevent(t)},!1,r.yc)},outputs:{onUploadFinished:"onUploadFinished"},decls:24,vars:3,consts:[[1,"container-fluid"],["autocomplete","off",3,"formGroup"],[1,"row"],[1,"col-md-11"],[1,"shadow-sm","card","no-padding"],[1,"card-body","no-padding"],[1,"row",2,"padding-bottom","0px"],[1,"col-md-12"],["formGroupName","CYStaticRports"],[1,"row","no-padding","mb-2"],[1,"col-sm-8",2,"padding-right","5px"],["type","text","formControlName","FILENAME","id","FILENAME","placeholder","New File Name",1,"form-control","form-control-sm","bg-white"],[1,"col-sm-4","no-padding","text-right"],[1,"upload-button","btn","blue-gradient","btn-block","btn-rounded","px-1","mr-1",3,"disabled"],[1,"fa","fa-upload"],["type","file",3,"change"],["file",""],[1,"shadow-sm","card"],[1,"card-body"],[1,"tableFixHead"],[1,"table-responsive-sm","fix-table"],["formArrayName","CYStaticReportsList",1,"table","table-sm","table-borderless"],[3,"formGroupName",4,"ngFor","ngForOf"],[3,"formGroupName"],[1,"no-padding;"],["type","text","formControlName","DOWNLOADFILE",1,"form-control","form-control-sm","no-border",2,"padding-left","15px"],[1,"no-padding;",2,"width","30px"],["type","button",1,"my-btn-height","btn","blue-gradient","btn-block","btn-rounded","px-1",3,"click"],["aria-hidden","true","title","Download",1,"fa","fa-download"],["type","button",1,"my-btn-height","btn","peach-gradient","btn-block","btn-rounded","px-1",3,"click"],["title","Delete",1,"fa","fa-trash"]],template:function(t,e){if(1&t){const t=r.Tb();r.Sb(0,"div",0),r.Sb(1,"form",1),r.Sb(2,"div",2),r.Sb(3,"div",3),r.Sb(4,"div",4),r.Sb(5,"div",5),r.Sb(6,"div",6),r.Sb(7,"div",7),r.Sb(8,"div",8),r.Sb(9,"div",9),r.Sb(10,"div",10),r.Nb(11,"input",11),r.Rb(),r.Sb(12,"div",12),r.Sb(13,"button",13),r.Nb(14,"i",14),r.Sb(15,"input",15,16),r.cc("change",function(){r.zc(t);const o=r.wc(16);return e.UploadFile(o.files,e.CYStaticRports.get("FILENAME").value)}),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(17,"div",17),r.Sb(18,"div",18),r.Sb(19,"div",19),r.Sb(20,"div",20),r.Sb(21,"table",21),r.Sb(22,"tbody"),r.Ic(23,ie,9,1,"tr",22),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb()}2&t&&(r.yb(1),r.mc("formGroup",e.ClarinsYearReportsForm),r.yb(12),r.mc("disabled",""===e.CYStaticRports.get("FILENAME").value||null===e.CYStaticRports.get("FILENAME").value),r.yb(10),r.mc("ngForOf",e.CYStaticReportsList.controls))},directives:[P.t,P.m,P.g,P.h,P.a,P.l,P.e,P.b,E.m],styles:['.row[_ngcontent-%COMP%]{padding:10px}.card[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:1px 0}.card-body[_ngcontent-%COMP%]{flex:1 1 auto;min-height:1px;padding:1px}button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:14px}.action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:5px}.font-label[_ngcontent-%COMP%]{font-size:12px}.btn-height[_ngcontent-%COMP%]{height:30px;width:90px}.my-btn-height[_ngcontent-%COMP%]{font-size:12px;height:28px;width:30px;margin-top:0;padding:0;color:#fff}.upload-button[_ngcontent-%COMP%]{height:30px;overflow:hidden;position:relative;width:120px;color:#fff;padding-top:3px}.upload-button[_ngcontent-%COMP%]:after{content:" Add New File";color:#fff;font-size:14px;text-align:center}.upload-button[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]{font-size:14px;left:0;opacity:0;position:absolute;top:0;padding-top:0}table[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:12px;font-weight:700;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;text-transform:uppercase}input[_ngcontent-%COMP%]::-moz-placeholder{color:#c0bdbd;font-weight:300;text-transform:capitalize}input[_ngcontent-%COMP%]::placeholder{color:#c0bdbd;font-weight:300;text-transform:capitalize}.fix-table[_ngcontent-%COMP%]{height:375px;overflow-y:auto;width:100%}.tableFixHead[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;top:0}thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:1px!important;height:32px!important;font-weight:400;vertical-align:middle}.table-borderless[_ngcontent-%COMP%] td[_ngcontent-%COMP%], tr[_ngcontent-%COMP%] .table-borderless[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border:0}tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{height:22px}table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%], tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{padding:0!important}.no-padding[_ngcontent-%COMP%]{padding:0}.no-border[_ngcontent-%COMP%]{border:0;border-color:#fff}.right-padding[_ngcontent-%COMP%]{padding-right:10px;font-weight:400}.z-depth-1a[_ngcontent-%COMP%]{box-shadow:0 2px 5px 0 rgba(55,161,255,.26),0 4px 12px 0 rgba(121,155,254,.25)}.btn[_ngcontent-%COMP%]:hover, .z-depth-1-half[_ngcontent-%COMP%]{box-shadow:0 5px 11px 0 rgba(85,182,255,.28),0 4px 15px 0 rgba(36,133,255,.15)}']}),t})();function ae(t,e){if(1&t){const t=r.Tb();r.Sb(0,"tr",23),r.Sb(1,"td",24),r.Nb(2,"input",25),r.Rb(),r.Sb(3,"td",26),r.Sb(4,"button",27),r.cc("click",function(){r.zc(t);const o=e.index,n=r.ec();return n.Download(o,n.FYStaticReportsList.controls[o].get("FILENAME").value)}),r.Nb(5,"i",28),r.Rb(),r.Rb(),r.Sb(6,"td",26),r.Sb(7,"button",29),r.cc("click",function(){r.zc(t);const o=e.index,n=r.ec();return n.Delete(o,n.FYStaticReportsList.controls[o].get("FILENAME").value)}),r.Nb(8,"i",30),r.Rb(),r.Rb(),r.Rb()}2&t&&r.mc("formGroupName",e.index)}let se=(()=>{class t{constructor(t,e,o,n,i,a){this.fb=t,this.router=e,this.toastr=o,this.staticReportsService=n,this.interactivityChecker=i,this.platformId=a,this.onUploadFinished=new r.n,this.UploadFile=(t,e)=>{0!==t.length&&this.staticReportsService.UploadFile(t,e,"ClarinsStaticReports","GroupStrategyReports_FY").subscribe(t=>{t.type===$t.d.UploadProgress?this.progress=Math.round(100*t.loaded/t.total):t.type===$t.d.Response&&(this.message="Upload success.",this.onUploadFinished.emit(t.body)),this.GetAllFiles(),this.FYStaticRports.reset()})},this.CreateFiscalYearReportsForm()}CreateFiscalYearReportsForm(){const t=[];for(let e=0;e<14;e++)t.push(this.StaticReports());this.FiscalYearReportsForm=this.fb.group({FYStaticRports:this.fb.group({FILENAME:[""]}),FYStaticReportsList:this.fb.array(t)})}StaticReports(){return this.fb.group({DOWNLOADFILE:[""],FILENAME:[""]})}get FYStaticRports(){return this.FiscalYearReportsForm.get("FYStaticRports")}get FYStaticReportsList(){return this.FiscalYearReportsForm.get("FYStaticReportsList")}ngOnInit(){this.GetAllFiles()}GetAllFiles(){this.staticReportsService.StaticReportDetails("Clarins","GroupStrategyFiscal").subscribe(t=>{if(this.FileName=t,this.FileName.length>0){const t=this.FiscalYearReportsForm.controls.FYStaticReportsList;for(let e=0;e<this.FileName.length;e++)t.at(+e).get("DOWNLOADFILE").setValue(this.FileName[e].FileNameWithOutExtension),t.at(+e).get("FILENAME").setValue(this.FileName[e].FileName),e>=13&&e<this.FileName.length-1&&this.FYStaticReportsList.push(this.StaticReports())}})}Delete(t,e){const o=this.FiscalYearReportsForm.controls.FYStaticReportsList;for(let n=0;n<o.length;n++)if(t==n){e&&this.staticReportsService.Delete("Clarins","GroupStrategyFiscal",e).subscribe(e=>{null==e&&(this.FYStaticReportsList.removeAt(t),this.toastr.warning("Deleted Successfully","Clarins"))},t=>{console.log(t)});break}}Download(t,e){const o=this.FiscalYearReportsForm.controls.FYStaticReportsList;for(let n=0;n<o.length;n++)if(t==n){e&&this.staticReportsService.DownloadFile("Clarins","GroupStrategyFiscal",e).subscribe(t=>{let o=new Blob([t],{type:"application/pdf"});const n=window.URL.createObjectURL(o);"application/pdf"===t.type?window.open(n,"_blank"):jt.saveAs(o,e)});break}}keyevent(t){t.preventDefault();const e=Array.prototype.slice.call(document.querySelectorAll("input")),o=[];if(Array.isArray(o)&&!o.length)for(let n=0;n<e.length;n++)this.interactivityChecker.isFocusable(e[n])&&o.push(e[n]);if(13===t.keyCode||40===t.keyCode){const t=o[o.indexOf(document.activeElement)+1];t&&(t.focus(),t.select())}else if(38===t.keyCode){const t=o[o.indexOf(document.activeElement)-1];t&&(t.focus(),t.select())}}}return t.\u0275fac=function(e){return new(e||t)(r.Mb(P.c),r.Mb(n.e),r.Mb(Jt.b),r.Mb(Qt.a),r.Mb(qt.d),r.Mb(r.B))},t.\u0275cmp=r.Gb({type:t,selectors:[["app-fiscal-year"]],hostBindings:function(t,e){1&t&&r.cc("keyup",function(t){return e.keyevent(t)},!1,r.yc)},outputs:{onUploadFinished:"onUploadFinished"},decls:24,vars:3,consts:[[1,"container-fluid"],["autocomplete","off",3,"formGroup"],[1,"row"],[1,"col-md-11"],[1,"shadow-sm","card","no-padding"],[1,"card-body","no-padding"],[1,"row",2,"padding-bottom","0px"],[1,"col-md-12"],["formGroupName","FYStaticRports"],[1,"row","no-padding","mb-2"],[1,"col-sm-8",2,"padding-right","5px"],["type","text","formControlName","FILENAME","id","FILENAME","placeholder","New File Name",1,"form-control","form-control-sm","bg-white"],[1,"col-sm-4","no-padding","text-right"],[1,"upload-button","btn","blue-gradient","btn-block","btn-rounded","px-1","mr-1",3,"disabled"],[1,"fa","fa-upload"],["type","file",3,"change"],["file",""],[1,"shadow-sm","card"],[1,"card-body"],[1,"tableFixHead"],[1,"table-responsive-sm","fix-table"],["formArrayName","FYStaticReportsList",1,"table","table-sm","table-borderless"],[3,"formGroupName",4,"ngFor","ngForOf"],[3,"formGroupName"],[1,"no-padding;"],["type","text","formControlName","DOWNLOADFILE",1,"form-control","form-control-sm","no-border",2,"padding-left","15px"],[1,"no-padding;",2,"width","30px"],["type","button",1,"my-btn-height","btn","blue-gradient","btn-block","btn-rounded","px-1",3,"click"],["aria-hidden","true","title","Download",1,"fa","fa-download"],["type","button",1,"my-btn-height","btn","peach-gradient","btn-block","btn-rounded","px-1",3,"click"],["title","Delete",1,"fa","fa-trash"]],template:function(t,e){if(1&t){const t=r.Tb();r.Sb(0,"div",0),r.Sb(1,"form",1),r.Sb(2,"div",2),r.Sb(3,"div",3),r.Sb(4,"div",4),r.Sb(5,"div",5),r.Sb(6,"div",6),r.Sb(7,"div",7),r.Sb(8,"div",8),r.Sb(9,"div",9),r.Sb(10,"div",10),r.Nb(11,"input",11),r.Rb(),r.Sb(12,"div",12),r.Sb(13,"button",13),r.Nb(14,"i",14),r.Sb(15,"input",15,16),r.cc("change",function(){r.zc(t);const o=r.wc(16);return e.UploadFile(o.files,e.FYStaticRports.get("FILENAME").value)}),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Sb(17,"div",17),r.Sb(18,"div",18),r.Sb(19,"div",19),r.Sb(20,"div",20),r.Sb(21,"table",21),r.Sb(22,"tbody"),r.Ic(23,ae,9,1,"tr",22),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb(),r.Rb()}2&t&&(r.yb(1),r.mc("formGroup",e.FiscalYearReportsForm),r.yb(12),r.mc("disabled",""===e.FYStaticRports.get("FILENAME").value||null===e.FYStaticRports.get("FILENAME").value),r.yb(10),r.mc("ngForOf",e.FYStaticReportsList.controls))},directives:[P.t,P.m,P.g,P.h,P.a,P.l,P.e,P.b,E.m],styles:['.row[_ngcontent-%COMP%]{padding:10px}.card[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:1px 0}.card-body[_ngcontent-%COMP%]{flex:1 1 auto;min-height:1px;padding:1px}button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:14px}.action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:5px}.font-label[_ngcontent-%COMP%]{font-size:12px}.btn-height[_ngcontent-%COMP%]{height:30px;width:90px}.my-btn-height[_ngcontent-%COMP%]{font-size:12px;height:28px;width:30px;margin-top:0;padding:0;color:#fff}.upload-button[_ngcontent-%COMP%]{height:30px;overflow:hidden;position:relative;width:120px;color:#fff;padding-top:3px}.upload-button[_ngcontent-%COMP%]:after{content:" Add New File";color:#fff;font-size:14px;text-align:center}.upload-button[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%]{font-size:14px;left:0;opacity:0;position:absolute;top:0;padding-top:0}table[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:12px;font-weight:700;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;text-transform:uppercase}input[_ngcontent-%COMP%]::-moz-placeholder{color:#c0bdbd;font-weight:300;text-transform:capitalize}input[_ngcontent-%COMP%]::placeholder{color:#c0bdbd;font-weight:300;text-transform:capitalize}.fix-table[_ngcontent-%COMP%]{height:375px;overflow-y:auto;width:100%}.tableFixHead[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;top:0}thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:1px!important;height:32px!important;font-weight:400;vertical-align:middle}.table-borderless[_ngcontent-%COMP%] td[_ngcontent-%COMP%], tr[_ngcontent-%COMP%] .table-borderless[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border:0}tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{height:22px}table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%], tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{padding:0!important}.no-padding[_ngcontent-%COMP%]{padding:0}.no-border[_ngcontent-%COMP%]{border:0;border-color:#fff}.right-padding[_ngcontent-%COMP%]{padding-right:10px;font-weight:400}.z-depth-1a[_ngcontent-%COMP%]{box-shadow:0 2px 5px 0 rgba(55,161,255,.26),0 4px 12px 0 rgba(121,155,254,.25)}.btn[_ngcontent-%COMP%]:hover, .z-depth-1-half[_ngcontent-%COMP%]{box-shadow:0 5px 11px 0 rgba(85,182,255,.28),0 4px 15px 0 rgba(36,133,255,.15)}']}),t})();var le=o("liBt");const ce=[{path:"",data:{title:"Clarins Report"},children:[{path:"",redirectTo:"ClarinsReports",pathMatch:"full"},{path:"",component:v,data:{title:"Clarins Reports"},children:[{path:"WeeklyBeautyCoachSales",component:Et,resolve:{Years:le.a},data:{title:"Clarins Reports: Weekly Beauty Coach Sales"}},{path:"GBWeeklyTargets",component:Ut,resolve:{Years:le.a},data:{title:"Clarins Reports: GB Weekly Targets"}},{path:"NIWeeklyTargets",component:Lt,resolve:{Years:le.a},data:{title:"Clarins Reports: NI Weekly Targets"}},{path:"Weeklyconsultantsales",component:dt,resolve:{Years:le.a},data:{title:"Clarins Reports: Weekly Consultant Sales"}},{path:"WeeklyCounterSales",component:Ct,resolve:{Years:le.a},data:{title:"Clarins Reports: Weekly Counter Sales"}},{path:"ClarinsMissingSales",component:W,resolve:{Years:le.a},data:{title:"Clarins Reports: Clarins Missing Sales"}},{path:"ClarinsDuplicateRecords",component:V,resolve:{Years:le.a},data:{title:"Clarins Reports: Clarins Duplicate Records"}},{path:"ClarinsFlashReportByWeek",component:Z,resolve:{Years:le.a},data:{title:"Clarins Reports: Clarins Flash Report By Week"}},{path:"ClarinsFlashReportBYGroup",component:et,resolve:{Years:le.a},data:{title:"Clarins Reports: Clarins Flash Report BY Group"}},{path:"Clarins-MonthlyReports",component:Xt,data:{title:"Clarins: Monthly/Periodic Reports"}},{path:"Clarins-ClarinsYear",component:re,data:{title:"Clarins: Group Business Reports (Clarins Year)"}},{path:"Clarins-FiscalYear",component:se,data:{title:"Clarins: Group Business Reports (Fiscal Year)"}},{path:"Clarins-HistoricReports",component:ee,data:{title:"Clarins: Historic Reports"}},{path:"Clarins-GeneratorReports",component:ne,data:{title:"Clarins: Generator Reports"}}]}]}];let de=(()=>{class t{}return t.\u0275mod=r.Kb({type:t}),t.\u0275inj=r.Jb({factory:function(e){return new(e||t)},imports:[[n.h.forChild(ce)],n.h]}),t})();var be=o("H8qh");let pe=(()=>{class t{}return t.\u0275mod=r.Kb({type:t}),t.\u0275inj=r.Jb({factory:function(e){return new(e||t)},imports:[[de,be.a,k.b]]}),t})()}}]);