• File: 9-es2015.de6fc6bf9fa0b4768172.js
  • Full Path: /home/icicle/public_html/test/Publish-20260710231155-20260715025645/wwwroot/assets/9-es2015.de6fc6bf9fa0b4768172.js
  • Date Modified: 10/01/2021 10:59 AM
  • File size: 51.79 KB
  • MIME-type: text/plain
  • Charset: utf-8
(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{Iab2:function(t,e,o){var n,i;void 0===(i="function"==typeof(n=function(){"use strict";function e(t,e,o){var n=new XMLHttpRequest;n.open("GET",t),n.responseType="blob",n.onload=function(){a(n.response,e,o)},n.onerror=function(){console.error("could not download file")},n.send()}function o(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return 200<=e.status&&299>=e.status}function n(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(e){var o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(o)}}var i="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,r=i.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=i.saveAs||("object"!=typeof window||window!==i?function(){}:"download"in HTMLAnchorElement.prototype&&!r?function(t,r,a){var s=i.URL||i.webkitURL,l=document.createElement("a");l.download=r=r||t.name||"download",l.rel="noopener","string"==typeof t?(l.href=t,l.origin===location.origin?n(l):o(l.href)?e(t,r,a):n(l,l.target="_blank")):(l.href=s.createObjectURL(t),setTimeout(function(){s.revokeObjectURL(l.href)},4e4),setTimeout(function(){n(l)},0))}:"msSaveOrOpenBlob"in navigator?function(t,i,r){if(i=i||t.name||"download","string"!=typeof t)navigator.msSaveOrOpenBlob(function(t,e){return void 0===e?e={autoBom:!1}:"object"!=typeof e&&(console.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t}(t,r),i);else if(o(t))e(t,i,r);else{var a=document.createElement("a");a.href=t,a.target="_blank",setTimeout(function(){n(a)})}}:function(t,o,n,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof t)return e(t,o,n);var s="application/octet-stream"===t.type,l=/constructor/i.test(i.HTMLElement)||i.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||s&&l||r)&&"undefined"!=typeof FileReader){var p=new FileReader;p.onloadend=function(){var t=p.result;t=c?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=t:location=t,a=null},p.readAsDataURL(t)}else{var d=i.URL||i.webkitURL,b=d.createObjectURL(t);a?a.location=b:location.href=b,a=null,setTimeout(function(){d.revokeObjectURL(b)},4e4)}});i.saveAs=a.saveAs=a,t.exports=a})?n.apply(e,[]):n)||(t.exports=i)},dufq:function(t,e,o){"use strict";o.d(e,"e",function(){return n}),o.d(e,"b",function(){return i}),o.d(e,"c",function(){return r}),o.d(e,"f",function(){return a}),o.d(e,"a",function(){return s}),o.d(e,"d",function(){return l});var n=function(t){return t.WeeklyConsultantSales="WeeklyConsultantSales",t.GBWeeklyTargets="GBWeeklyTargets",t.NIWeeklyTargets="NIWeeklyTargets",t.BeautyBARAccountWeeklySales="BeautyBARAccountWeeklySales",t.SkinSpaAccountSales="SkinSpaAccountSales",t.OccupancyWeeklyCheck="OccupancyWeeklyCheck",t.TherapistWeeklySales="TherapistWeeklySales",t.GoldSalonRetailSales="GoldSalonRetailSales",t.CFGAccountWeeklySales="CFGAccountWeeklySales",t}({}),i=function(t){return t.WeeklyConsultantSales="WeeklyConsultantSales",t.WeeklyAngelSales="WeeklyAngelSales",t.TherapistWeeklySales="TherapistWeeklySales",t.MobileTherapistWeeklySales="MobileTherapistWeeklySales",t.CFGAmbassadorWeeklySales="CFGAmbassadorWeeklySales",t}({}),r=function(t){return t[t.REGION_BB=1]="REGION_BB",t[t.REGION_GS=2]="REGION_GS",t}({}),a=function(t){return t[t.TOWN_CLARINS=1]="TOWN_CLARINS",t[t.TOWN_CFG=2]="TOWN_CFG",t}({}),s=function(t){return t[t.AREA_CLARINS=1]="AREA_CLARINS",t[t.AREA_ANGLE=2]="AREA_ANGLE",t[t.REA_BB=3]="REA_BB",t[t.AREA_GS=4]="AREA_GS",t[t.AREA_TWS=5]="AREA_TWS",t[t.AREA_MTWS=6]="AREA_MTWS",t[t.AREA_NI=7]="AREA_NI",t[t.AREA_CFG=8]="AREA_CFG",t}({}),l=function(t){return t[t.STOGRPCODE_CLARINS=1]="STOGRPCODE_CLARINS",t[t.STOGRPCODE_BB=2]="STOGRPCODE_BB",t[t.STOGRPCODE_GBT=3]="STOGRPCODE_GBT",t[t.STOGRPCODE_GS=4]="STOGRPCODE_GS",t[t.STOGRPCODE_OCC=5]="STOGRPCODE_OCC",t[t.STOGRPCODE_SSPA=6]="STOGRPCODE_SSPA",t[t.STOGRPCODE_CFG=7]="STOGRPCODE_CFG",t}({})},"li+p":function(t,e,o){"use strict";o.r(e),o.d(e,"TravelretailreportsModule",function(){return W});var n=o("H8qh"),i=o("iInd"),r=o("Cfvw"),a=o("LRne"),s=o("mCNh"),l=o("dufq"),c=o("pLZG"),p=o("lJxs"),d=o("8Y7J"),b=o("s7LF"),g=o("O/6Z"),h=o("+CKi"),u=o("EApP"),f=o("SVse"),m=o("Egam"),R=o("dbUT"),S=o("JqCM");function M(t,e){if(1&t&&(d.Sb(0,"option",30),d.Kc(1),d.Rb()),2&t){const t=e.$implicit;d.mc("value",t.Value),d.yb(1),d.Mc(" ",t.Name," ")}}function O(t,e){1&t&&d.Nb(0,"div",31)}function x(t,e){if(1&t&&(d.Sb(0,"option",30),d.Kc(1),d.Rb()),2&t){const t=e.$implicit;d.mc("value",t.Value),d.yb(1),d.Mc(" ",t.Name," ")}}let C=(()=>{class t{constructor(t,e,o,n,i,r){this.fb=t,this.router=e,this.activatedRoute=o,this.travelRetailReportService=n,this.sharedService=i,this.toastr=r,this.YEARS=this.sharedService.YEAR.asObservable(),this.STOGRPCODES=this.sharedService.STOGRPCODE.asObservable(),this.disabled=!1,this.ShowFilter=!1,this.limitSelection=!1,this.selectedItems=[],this.CreateTravelRetailMissingFiguresForm()}CreateTravelRetailMissingFiguresForm(){this.TravelRetailMissingFiguresForm=this.fb.group({TravelRetailMissingFigures:this.fb.group({YEAR:[""],MONTH:[""],STOGRPCODE:[""]})})}get TravelRetailMissingFigures(){return this.TravelRetailMissingFiguresForm.get("TravelRetailMissingFigures")}ngOnInit(){this.YEARS=Object(r.a)([this.activatedRoute.snapshot.data.Years]),this.GetSTOGRPCODE(),this.InitialValue(),this.Months=Object(a.a)([{Value:0,Name:"ALL"},{Value:1,Name:"JAN"},{Value:2,Name:"FEB"},{Value:3,Name:"MAR"},{Value:4,Name:"APR"},{Value:5,Name:"MAY"},{Value:6,Name:"JUN"},{Value:7,Name:"JUL"},{Value:8,Name:"AUG"},{Value:9,Name:"SEP"},{Value:10,Name:"OCT"},{Value:11,Name:"NOV"},{Value:12,Name:"DEC"}]),this.selectedItems=[{Value:0,Name:"ALL"}],this.dropdownSettings={singleSelection:!1,idField:"Value",textField:"Name",selectAllText:"Select All",unSelectAllText:"UnSelect All",itemsShowLimit:3,allowSearchFilter:this.ShowFilter}}InitialValue(){this.TravelRetailMissingFigures.get("YEAR").setValue((new Date).getFullYear()),this.TravelRetailMissingFigures.get("STOGRPCODE").setValue("All")}ResetForm(){this.TravelRetailMissingFiguresForm.reset(),this.InitialValue()}GetSTOGRPCODE(){this.sharedService.GetSTOGRPCODE(l.d.STOGRPCODE_OCC).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."))}onItemSelect(t){console.log("onItemSelect",t)}onSelectAll(t){console.log("onSelectAll",t)}toogleShowFilter(){this.ShowFilter=!this.ShowFilter,this.dropdownSettings=Object.assign({},this.dropdownSettings,{allowSearchFilter:this.ShowFilter})}handleLimitSelection(){this.dropdownSettings=Object.assign({},this.dropdownSettings,this.limitSelection?{limitSelection:2}:{limitSelection:null})}rptTravelRetailMissingFigures(t,e,o){let n;this.travelRetailReportService.rptTravelRetailMissingFigures(t,this.GetValue(e),o).subscribe(t=>{n=new Blob([t],{type:"application/pdf"})},t=>{console.log(t),this.toastr.error(t)},()=>{let t=URL.createObjectURL(n);window.open(t,"_blank")})}GetValue(t){var e=[];if(t.length>0)for(var o in t)e.push(t[o].Value);else e.push("0");return e}discardOddDoubleEven(){return Object(s.a)(Object(c.a)(t=>!(t%2)),Object(p.a)(t=>t+t))}}return t.\u0275fac=function(e){return new(e||t)(d.Mb(b.c),d.Mb(i.e),d.Mb(i.a),d.Mb(g.a),d.Mb(h.a),d.Mb(u.b))},t.\u0275cmp=d.Gb({type:t,selectors:[["app-travel-retail-missing-figures"]],decls:49,vars:14,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"],["formGroupName","TravelRetailMissingFigures"],["id","grad1"],[1,"col-md-12","full-report","report-round",2,"height","295px"],[1,"col-md-12"],[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-8"],["formControlName","YEAR",1,"form-control","form-control-sm",2,"width","150px"],[3,"value",4,"ngFor","ngForOf"],[1,"col-sm-12"],["for","Region",1,"col-sm-4","col-form-label","text-right","no-padding","font-label","mt-1"],["name","MONTH","formControlName","MONTH",3,"placeholder","settings","data","onSelect","onSelectAll"],["style"," max-height: 250px;"],["optionsTemplate",""],["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",2,"width","150px"],[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.8)","size","small","color","black","type","ball-spin-clockwise-fade",3,"fullScreen"],[2,"color","black"],[3,"value"],[2,"padding","1px 10px","margin-right","10px","right","2px","top","-2px"]],template:function(t,e){1&t&&(d.Sb(0,"div",0),d.Sb(1,"form",1),d.Sb(2,"div",2),d.Sb(3,"div",3),d.Sb(4,"div",4),d.Sb(5,"div",5),d.Sb(6,"div",6),d.Sb(7,"div",7),d.Sb(8,"div",8),d.Sb(9,"div",9),d.Sb(10,"h4",10),d.Kc(11,"Report Parameters"),d.Rb(),d.Sb(12,"h4",11),d.Kc(13,"Enter values for the Parameters"),d.Rb(),d.Rb(),d.Sb(14,"div",9),d.Sb(15,"div",12),d.Sb(16,"div",13),d.Sb(17,"label",14),d.Kc(18,"Year:"),d.Rb(),d.Sb(19,"div",15),d.Sb(20,"select",16),d.Ic(21,M,2,2,"option",17),d.fc(22,"async"),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Sb(23,"div",18),d.Sb(24,"div",13),d.Sb(25,"label",19),d.Kc(26,"Month:"),d.Rb(),d.Sb(27,"div",15),d.Sb(28,"ng-multiselect-dropdown",20),d.cc("onSelect",function(t){return e.onItemSelect(t)})("onSelectAll",function(t){return e.onSelectAll(t)}),d.fc(29,"async"),d.Rb(),d.Ic(30,O,1,0,"ng-template",21,22,d.Jc),d.Rb(),d.Rb(),d.Rb(),d.Sb(32,"div",18),d.Sb(33,"div",13),d.Sb(34,"label",23),d.Kc(35,"STOGRPCODE:"),d.Rb(),d.Sb(36,"div",15),d.Sb(37,"select",24),d.Ic(38,x,2,2,"option",17),d.fc(39,"async"),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Sb(40,"div",9),d.Sb(41,"div",25),d.Sb(42,"button",26),d.cc("click",function(){return e.rptTravelRetailMissingFigures(e.TravelRetailMissingFigures.get("YEAR").value,e.TravelRetailMissingFigures.get("MONTH").value,e.TravelRetailMissingFigures.get("STOGRPCODE").value)}),d.Kc(43," Submit"),d.Rb(),d.Sb(44,"button",27),d.cc("click",function(){return e.ResetForm()}),d.Kc(45," Reset"),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Sb(46,"ngx-spinner",28),d.Sb(47,"p",29),d.Kc(48," Loading... "),d.Rb(),d.Rb(),d.Rb()),2&t&&(d.yb(1),d.mc("formGroup",e.TravelRetailMissingFiguresForm),d.yb(20),d.mc("ngForOf",d.gc(22,8,e.YEARS)),d.yb(7),d.mc("placeholder","Select Month")("settings",e.dropdownSettings)("data",d.gc(29,10,e.Months)),d.zb("disabled",e.disabled),d.yb(10),d.mc("ngForOf",d.gc(39,12,e.STOGRPCODES)),d.yb(8),d.mc("fullScreen",!1))},directives:[b.t,b.m,b.g,b.h,b.q,b.l,b.e,f.m,m.a,R.b,R.c,S.a,b.o,b.s],pipes:[f.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}.selectwidthauto[_ngcontent-%COMP%]{width:auto!important}#grad1[_ngcontent-%COMP%]{height:350px;background:linear-gradient(180deg,#fff,#f5f5f5)}.no-padding[_ngcontent-%COMP%]{padding:0}.right-padding[_ngcontent-%COMP%]{padding-right:10px;font-weight:400}"]}),t})();var v=o("Iab2"),y=o("IheW"),F=o("qvAe"),w=o("u47x");function _(t,e){if(1&t){const t=d.Tb();d.Sb(0,"tr",25),d.Sb(1,"td",26),d.Nb(2,"input",27),d.Rb(),d.Sb(3,"td",28),d.Sb(4,"button",29),d.cc("click",function(){d.zc(t);const o=e.index,n=d.ec();return n.Download(o,n.MStaticReportsList.controls[o].get("FILENAME").value)}),d.Nb(5,"i",30),d.Rb(),d.Rb(),d.Sb(6,"td",28),d.Sb(7,"button",31),d.cc("click",function(){d.zc(t);const o=e.index,n=d.ec();return n.Delete(o,n.MStaticReportsList.controls[o].get("FILENAME").value)}),d.Nb(8,"i",32),d.Rb(),d.Rb(),d.Rb()}2&t&&d.mc("formGroupName",e.index)}let P=(()=>{class t{constructor(t,e,o,n,i,r){this.fb=t,this.router=e,this.toastr=o,this.staticReportsService=n,this.interactivityChecker=i,this.platformId=r,this.onUploadFinished=new d.n,this.UploadFile=(t,e)=>{0!==t.length&&this.staticReportsService.UploadFile(t,e,"TravelRetailStaticReports","MonthlyReports").subscribe(t=>{t.type===y.d.UploadProgress?this.progress=Math.round(100*t.loaded/t.total):t.type===y.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("TravelRetail","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("TravelRetail","MonthlyPeriodic",e).subscribe(e=>{null==e&&(this.MStaticReportsList.removeAt(t),this.toastr.warning("Deleted Successfully","TravelRetail"))},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("TravelRetail","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"):v.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)(d.Mb(b.c),d.Mb(i.e),d.Mb(u.b),d.Mb(F.a),d.Mb(w.d),d.Mb(d.B))},t.\u0275cmp=d.Gb({type:t,selectors:[["app-monthlyreports"]],hostBindings:function(t,e){1&t&&d.cc("keyup",function(t){return e.keyevent(t)},!1,d.yc)},outputs:{onUploadFinished:"onUploadFinished"},decls:26,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"],[1,"row","no-padding","mb-1"],[1,"col-sm-12"],["type","text","formControlName","FILENAME","id","FILENAME","placeholder","",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"],[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=d.Tb();d.Sb(0,"div",0),d.Sb(1,"form",1),d.Sb(2,"div",2),d.Sb(3,"div",3),d.Sb(4,"div",4),d.Sb(5,"div",5),d.Sb(6,"div",6),d.Sb(7,"div",7),d.Sb(8,"div",8),d.Sb(9,"div",9),d.Sb(10,"div",10),d.Sb(11,"div",11),d.Sb(12,"div",12),d.Nb(13,"input",13),d.Rb(),d.Rb(),d.Rb(),d.Sb(14,"div",14),d.Sb(15,"button",15),d.Nb(16,"i",16),d.Sb(17,"input",17,18),d.cc("change",function(){d.zc(t);const o=d.wc(18);return e.UploadFile(o.files,e.MStaticRports.get("FILENAME").value)}),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Sb(19,"div",19),d.Sb(20,"div",20),d.Sb(21,"div",21),d.Sb(22,"div",22),d.Sb(23,"table",23),d.Sb(24,"tbody"),d.Ic(25,_,9,1,"tr",24),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb()}2&t&&(d.yb(1),d.mc("formGroup",e.MonthlyReportsForm),d.yb(14),d.mc("disabled",""===e.MStaticRports.get("FILENAME").value||null===e.MStaticRports.get("FILENAME").value),d.yb(10),d.mc("ngForOf",e.MStaticReportsList.controls))},directives:[b.t,b.m,b.g,b.h,b.a,b.l,b.e,b.b,f.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})();const N=function(){return["TravelRetail-MissingFigures"]},A=function(){return["TravelRetail-MonthlyReports"]},E=function(){return["TravelRetail-ClarinsYear"]},L=function(){return["TravelRetail-FiscalYear"]},k=function(){return["TravelRetail-HistoricReports"]};let T=(()=>{class t{constructor(){}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=d.Gb({type:t,selectors:[["app-travelretailreports"]],decls:33,vars:10,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","200px"],["data-toggle","dropdown",1,"dropdown-toggle"],[1,"caret"],[1,"dropdown-menu","fontsize","position"],[3,"routerLink"],[1,"dropdown","custom-dropdown",2,"width","230px","text-align","center"],[1,"dropdown","custom-dropdown",2,"width","250px","text-align","right"],[1,"dropdown","custom-dropdown",2,"width","200px","text-align","right"],[1,"d-flex","justify-content-center"],[1,"col-md-6"]],template:function(t,e){1&t&&(d.Sb(0,"div",0),d.Sb(1,"div",1),d.Sb(2,"div",2),d.Sb(3,"div",3),d.Sb(4,"ul",4),d.Sb(5,"li",5),d.Sb(6,"a",6),d.Kc(7,"Live Report"),d.Nb(8,"span",7),d.Rb(),d.Sb(9,"ul",8),d.Sb(10,"li"),d.Sb(11,"a",9),d.Kc(12,"Travel Retail Missing Figures"),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Sb(13,"li",10),d.Sb(14,"a",9),d.Kc(15,"Monthly/Periodic Reports"),d.Rb(),d.Rb(),d.Sb(16,"li",11),d.Sb(17,"a",6),d.Kc(18,"Group Business Reports"),d.Nb(19,"span",7),d.Rb(),d.Sb(20,"ul",8),d.Sb(21,"li"),d.Sb(22,"a",9),d.Kc(23,"Clarins Year"),d.Rb(),d.Rb(),d.Sb(24,"li"),d.Sb(25,"a",9),d.Kc(26,"Fiscal Year"),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Sb(27,"li",12),d.Sb(28,"a",9),d.Kc(29,"Historic Reports"),d.Rb(),d.Rb(),d.Rb(),d.Sb(30,"div",13),d.Sb(31,"div",14),d.Nb(32,"router-outlet"),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb()),2&t&&(d.yb(11),d.mc("routerLink",d.pc(5,N)),d.yb(3),d.mc("routerLink",d.pc(6,A)),d.yb(8),d.mc("routerLink",d.pc(7,E)),d.yb(3),d.mc("routerLink",d.pc(8,L)),d.yb(3),d.mc("routerLink",d.pc(9,k)))},directives:[i.g,i.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}.position[_ngcontent-%COMP%]{width:250px;position:absolute;transform:translate3d(0,31px,0)!important;top:0;left:0;will-change:transform;margin-top:12px}.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}.custom-dropdown[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#fff;text-decoration:none;font-size:16px;font-weight:600}.custom-dropdown[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{color:bisque;text-decoration:none}.dropdown-menu[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{padding:5px 10px;font-family:Century Gothic;text-decoration:none;font-size:18px;font-weight:700;color:#cc0b0b}.dropdown-menu[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]:hover{background-color:#cc0b0b;color:#fff;display:block;font-size:16px;font-weight:500;font-family:Century Gothic}.custom-dropdown[_ngcontent-%COMP%]   .dropdown-menu[_ngcontent-%COMP%]{left:-1px;top:41px}.dropdown-menu[_ngcontent-%COMP%]{border:1px solid #cc0b0a;padding:3px}.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:""}.fontsize[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{font-size:16px!important;font-weight:700!important;line-height:28px;font-family:Times New Roman}']}),t})();function G(t,e){if(1&t){const t=d.Tb();d.Sb(0,"tr",23),d.Sb(1,"td",24),d.Nb(2,"input",25),d.Rb(),d.Sb(3,"td",26),d.Sb(4,"button",27),d.cc("click",function(){d.zc(t);const o=e.index,n=d.ec();return n.Download(o,n.HStaticReportsList.controls[o].get("FILENAME").value)}),d.Nb(5,"i",28),d.Rb(),d.Rb(),d.Sb(6,"td",26),d.Sb(7,"button",29),d.cc("click",function(){d.zc(t);const o=e.index,n=d.ec();return n.Delete(o,n.HStaticReportsList.controls[o].get("FILENAME").value)}),d.Nb(8,"i",30),d.Rb(),d.Rb(),d.Rb()}2&t&&d.mc("formGroupName",e.index)}let D=(()=>{class t{constructor(t,e,o,n,i,r){this.fb=t,this.router=e,this.staticReportsService=o,this.toastr=n,this.interactivityChecker=i,this.platformId=r,this.onUploadFinished=new d.n,this.UploadFile=(t,e)=>{0!==t.length&&this.staticReportsService.UploadFile(t,e,"TravelRetailStaticReports","HistoricReports").subscribe(t=>{t.type===y.d.UploadProgress?this.progress=Math.round(100*t.loaded/t.total):t.type===y.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("TravelRetail","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("TravelRetail","Historic",e).subscribe(e=>{null==e&&(this.HStaticReportsList.removeAt(t),this.toastr.warning("Deleted Successfully","TravelRetail"))},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("TravelRetail","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"):v.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)(d.Mb(b.c),d.Mb(i.e),d.Mb(F.a),d.Mb(u.b),d.Mb(w.d),d.Mb(d.B))},t.\u0275cmp=d.Gb({type:t,selectors:[["app-historicreports"]],hostBindings:function(t,e){1&t&&d.cc("keyup",function(t){return e.keyevent(t)},!1,d.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","",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=d.Tb();d.Sb(0,"div",0),d.Sb(1,"form",1),d.Sb(2,"div",2),d.Sb(3,"div",3),d.Sb(4,"div",4),d.Sb(5,"div",5),d.Sb(6,"div",6),d.Sb(7,"div",7),d.Sb(8,"div",8),d.Sb(9,"div",9),d.Sb(10,"div",10),d.Nb(11,"input",11),d.Rb(),d.Sb(12,"div",12),d.Sb(13,"button",13),d.Nb(14,"i",14),d.Sb(15,"input",15,16),d.cc("change",function(){d.zc(t);const o=d.wc(16);return e.UploadFile(o.files,e.HStaticRports.get("FILENAME").value)}),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Sb(17,"div",17),d.Sb(18,"div",18),d.Sb(19,"div",19),d.Sb(20,"div",20),d.Sb(21,"table",21),d.Sb(22,"tbody"),d.Ic(23,G,9,1,"tr",22),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb()}2&t&&(d.yb(1),d.mc("formGroup",e.HistoricReportsForm),d.yb(12),d.mc("disabled",""===e.HStaticRports.get("FILENAME").value||null===e.HStaticRports.get("FILENAME").value),d.yb(10),d.mc("ngForOf",e.HStaticReportsList.controls))},directives:[b.t,b.m,b.g,b.h,b.a,b.l,b.e,b.b,f.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 I(t,e){if(1&t){const t=d.Tb();d.Sb(0,"tr",25),d.Sb(1,"td",26),d.Nb(2,"input",27),d.Rb(),d.Sb(3,"td",28),d.Sb(4,"button",29),d.cc("click",function(){d.zc(t);const o=e.index,n=d.ec();return n.Download(o,n.CYStaticReportsList.controls[o].get("FILENAME").value)}),d.Nb(5,"i",30),d.Rb(),d.Rb(),d.Sb(6,"td",28),d.Sb(7,"button",31),d.cc("click",function(){d.zc(t);const o=e.index,n=d.ec();return n.Delete(o,n.CYStaticReportsList.controls[o].get("FILENAME").value)}),d.Nb(8,"i",32),d.Rb(),d.Rb(),d.Rb()}2&t&&d.mc("formGroupName",e.index)}let Y=(()=>{class t{constructor(t,e,o,n,i,r){this.fb=t,this.router=e,this.toastr=o,this.staticReportsService=n,this.interactivityChecker=i,this.platformId=r,this.onUploadFinished=new d.n,this.UploadFile=(t,e)=>{0!==t.length&&this.staticReportsService.UploadFile(t,e,"TravelRetailStaticReports","GroupStrategyReports_CY").subscribe(t=>{t.type===y.d.UploadProgress?this.progress=Math.round(100*t.loaded/t.total):t.type===y.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.CYStaticReports());this.ClarinsYearReportsForm=this.fb.group({CYStaticRports:this.fb.group({FILENAME:[""]}),CYStaticReportsList:this.fb.array(t)})}CYStaticReports(){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("TravelRetail","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.CYStaticReports())}})}Delete(t,e){const o=this.ClarinsYearReportsForm.controls.CYStaticReportsList;for(let n=0;n<o.length;n++)if(t==n){e&&this.staticReportsService.Delete("TravelRetail","GroupStrategyClarins",e).subscribe(e=>{null==e&&(this.CYStaticReportsList.removeAt(t),this.toastr.warning("Deleted Successfully","TravelRetail"))},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("TravelRetail","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"):v.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)(d.Mb(b.c),d.Mb(i.e),d.Mb(u.b),d.Mb(F.a),d.Mb(w.d),d.Mb(d.B))},t.\u0275cmp=d.Gb({type:t,selectors:[["app-clarinsyear"]],hostBindings:function(t,e){1&t&&d.cc("keyup",function(t){return e.keyevent(t)},!1,d.yc)},outputs:{onUploadFinished:"onUploadFinished"},decls:26,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"],[1,"row","no-padding","mb-1"],[1,"col-sm-12"],["type","text","formControlName","FILENAME","id","FILENAME","placeholder","",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"],[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=d.Tb();d.Sb(0,"div",0),d.Sb(1,"form",1),d.Sb(2,"div",2),d.Sb(3,"div",3),d.Sb(4,"div",4),d.Sb(5,"div",5),d.Sb(6,"div",6),d.Sb(7,"div",7),d.Sb(8,"div",8),d.Sb(9,"div",9),d.Sb(10,"div",10),d.Sb(11,"div",11),d.Sb(12,"div",12),d.Nb(13,"input",13),d.Rb(),d.Rb(),d.Rb(),d.Sb(14,"div",14),d.Sb(15,"button",15),d.Nb(16,"i",16),d.Sb(17,"input",17,18),d.cc("change",function(){d.zc(t);const o=d.wc(18);return e.UploadFile(o.files,e.CYStaticRports.get("FILENAME").value)}),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Sb(19,"div",19),d.Sb(20,"div",20),d.Sb(21,"div",21),d.Sb(22,"div",22),d.Sb(23,"table",23),d.Sb(24,"tbody"),d.Ic(25,I,9,1,"tr",24),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb()}2&t&&(d.yb(1),d.mc("formGroup",e.ClarinsYearReportsForm),d.yb(14),d.mc("disabled",""===e.CYStaticRports.get("FILENAME").value||null===e.CYStaticRports.get("FILENAME").value),d.yb(10),d.mc("ngForOf",e.CYStaticReportsList.controls))},directives:[b.t,b.m,b.g,b.h,b.a,b.l,b.e,b.b,f.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 U(t,e){if(1&t){const t=d.Tb();d.Sb(0,"tr",25),d.Sb(1,"td",26),d.Nb(2,"input",27),d.Rb(),d.Sb(3,"td",28),d.Sb(4,"button",29),d.cc("click",function(){d.zc(t);const o=e.index,n=d.ec();return n.Download(o,n.FYStaticReportsList.controls[o].get("FILENAME").value)}),d.Nb(5,"i",30),d.Rb(),d.Rb(),d.Sb(6,"td",28),d.Sb(7,"button",31),d.cc("click",function(){d.zc(t);const o=e.index,n=d.ec();return n.Delete(o,n.FYStaticReportsList.controls[o].get("FILENAME").value)}),d.Nb(8,"i",32),d.Rb(),d.Rb(),d.Rb()}2&t&&d.mc("formGroupName",e.index)}let z=(()=>{class t{constructor(t,e,o,n,i,r){this.fb=t,this.router=e,this.toastr=o,this.staticReportsService=n,this.interactivityChecker=i,this.platformId=r,this.onUploadFinished=new d.n,this.UploadFile=(t,e)=>{0!==t.length&&this.staticReportsService.UploadFile(t,e,"TravelRetailStaticReports","GroupStrategyReports_FY").subscribe(t=>{t.type===y.d.UploadProgress?this.progress=Math.round(100*t.loaded/t.total):t.type===y.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.FYStaticReports());this.FiscalYearReportsForm=this.fb.group({FYStaticRports:this.fb.group({FILENAME:[""]}),FYStaticReportsList:this.fb.array(t)})}FYStaticReports(){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("TravelRetail","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.FYStaticReports())}})}Delete(t,e){const o=this.FiscalYearReportsForm.controls.FYStaticReportsList;for(let n=0;n<o.length;n++)if(t==n){e&&this.staticReportsService.Delete("TravelRetail","GroupStrategyFiscal",e).subscribe(e=>{null==e&&(this.FYStaticReportsList.removeAt(t),this.toastr.warning("Deleted Successfully","TravelRetail"))},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("TravelRetail","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"):v.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)(d.Mb(b.c),d.Mb(i.e),d.Mb(u.b),d.Mb(F.a),d.Mb(w.d),d.Mb(d.B))},t.\u0275cmp=d.Gb({type:t,selectors:[["app-fiscalyear"]],hostBindings:function(t,e){1&t&&d.cc("keyup",function(t){return e.keyevent(t)},!1,d.yc)},outputs:{onUploadFinished:"onUploadFinished"},decls:26,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"],[1,"row","no-padding","mb-1"],[1,"col-sm-12"],["type","text","formControlName","FILENAME","id","FILENAME","placeholder","",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"],[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=d.Tb();d.Sb(0,"div",0),d.Sb(1,"form",1),d.Sb(2,"div",2),d.Sb(3,"div",3),d.Sb(4,"div",4),d.Sb(5,"div",5),d.Sb(6,"div",6),d.Sb(7,"div",7),d.Sb(8,"div",8),d.Sb(9,"div",9),d.Sb(10,"div",10),d.Sb(11,"div",11),d.Sb(12,"div",12),d.Nb(13,"input",13),d.Rb(),d.Rb(),d.Rb(),d.Sb(14,"div",14),d.Sb(15,"button",15),d.Nb(16,"i",16),d.Sb(17,"input",17,18),d.cc("change",function(){d.zc(t);const o=d.wc(18);return e.UploadFile(o.files,e.FYStaticRports.get("FILENAME").value)}),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Sb(19,"div",19),d.Sb(20,"div",20),d.Sb(21,"div",21),d.Sb(22,"div",22),d.Sb(23,"table",23),d.Sb(24,"tbody"),d.Ic(25,U,9,1,"tr",24),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb(),d.Rb()}2&t&&(d.yb(1),d.mc("formGroup",e.FiscalYearReportsForm),d.yb(14),d.mc("disabled",""===e.FYStaticRports.get("FILENAME").value||null===e.FYStaticRports.get("FILENAME").value),d.yb(10),d.mc("ngForOf",e.FYStaticReportsList.controls))},directives:[b.t,b.m,b.g,b.h,b.a,b.l,b.e,b.b,f.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})();const H=[{path:"",data:{title:"Travel Retail Reports"},children:[{path:"",redirectTo:"Travelretailreports",pathMatch:"full"},{path:"",component:T,data:{title:"Travel Retail Reports"},children:[{path:"TravelRetail-MissingFigures",component:C,resolve:{Years:o("liBt").a},data:{title:"Travel Retail: Missing Figures"}},{path:"TravelRetail-MonthlyReports",component:P,data:{title:"Travel Retail: Monthly/Periodic Reports"}},{path:"TravelRetail-ClarinsYear",component:Y,data:{title:"Travel Retail: Group Business Reports (Clarins Year)"}},{path:"TravelRetail-FiscalYear",component:z,data:{title:"Travel Retail: Group Business Reports (Fiscal Year)"}},{path:"TravelRetail-HistoricReports",component:D,data:{title:"Travel Retail: Historic Reports"}}]}]}];let B=(()=>{class t{}return t.\u0275mod=d.Kb({type:t}),t.\u0275inj=d.Jb({factory:function(e){return new(e||t)},imports:[[i.h.forChild(H)],i.h]}),t})(),W=(()=>{class t{}return t.\u0275mod=d.Kb({type:t}),t.\u0275inj=d.Jb({factory:function(e){return new(e||t)},imports:[[B,n.a,S.b,m.b.forRoot()]]}),t})()},qvAe:function(t,e,o){"use strict";o.d(e,"a",function(){return s});var n=o("IheW"),i=o("lJxs"),r=o("8Y7J");const a={headers:new n.e({"Content-Type":"application/json",Authorization:"jwt-token"})};let s=(()=>{class t{constructor(t,e){this.http=t,this.BaseURL="",this.BaseURL="http://localhost:4200/"===e?"https://localhost:44301/api/UploadDownload/":e+"api/UploadDownload/"}StaticReportDetails(t,e){return this.http.get(this.BaseURL+"GetAllFileDetails?mejortype="+t+"&subtype="+e)}Delete(t,e,o){return this.http.delete(this.BaseURL+"DeleteFile?mejor="+t+"&subtype="+e+"&fileName="+o,a).pipe(Object(i.a)(t=>t))}UploadFile(t,e,o,i){let r=t[0];const a=new FormData;a.append("file",r,r.name);const s=new n.f("POST",this.BaseURL+"Upload?NewName="+e+"&mejorType="+o+"&subType="+i,a,{reportProgress:!0,responseType:"blob"});return this.http.request(s)}DownloadFile(t,e,o){return this.http.get(this.BaseURL+"Download?mejortype="+t+"&subtype="+e+"&fileName="+o,{responseType:"blob"}).pipe(Object(i.a)(t=>t))}}return t.\u0275fac=function(e){return new(e||t)(r.Zb(n.b),r.Zb("BASE_URL"))},t.\u0275prov=r.Ib({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()}}]);