Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
wwwroot
:
9-es5.de6fc6bf9fa0b4768172-20260716183709.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
!function(){function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function n(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{Iab2:function(t,e,n){var o,i;void 0===(i="function"==typeof(o=function(){"use strict";function e(t,e,n){var o=new XMLHttpRequest;o.open("GET",t),o.responseType="blob",o.onload=function(){a(o.response,e,n)},o.onerror=function(){console.error("could not download file")},o.send()}function n(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return 200<=e.status&&299>=e.status}function o(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(e){var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(n)}}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 l=i.URL||i.webkitURL,c=document.createElement("a");c.download=r=r||t.name||"download",c.rel="noopener","string"==typeof t?(c.href=t,c.origin===location.origin?o(c):n(c.href)?e(t,r,a):o(c,c.target="_blank")):(c.href=l.createObjectURL(t),setTimeout(function(){l.revokeObjectURL(c.href)},4e4),setTimeout(function(){o(c)},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(n(t))e(t,i,r);else{var a=document.createElement("a");a.href=t,a.target="_blank",setTimeout(function(){o(a)})}}:function(t,n,o,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof t)return e(t,n,o);var l="application/octet-stream"===t.type,c=/constructor/i.test(i.HTMLElement)||i.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||l&&c||r)&&"undefined"!=typeof FileReader){var p=new FileReader;p.onloadend=function(){var t=p.result;t=s?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})?o.apply(e,[]):o)||(t.exports=i)},dufq:function(t,e,n){"use strict";n.d(e,"e",function(){return o}),n.d(e,"b",function(){return i}),n.d(e,"c",function(){return r}),n.d(e,"f",function(){return a}),n.d(e,"a",function(){return l}),n.d(e,"d",function(){return c});var o=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}({}),l=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}({}),c=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(e,o,i){"use strict";i.r(o),i.d(o,"TravelretailreportsModule",function(){return tt});var r=i("H8qh"),a=i("iInd"),l=i("Cfvw"),c=i("LRne"),s=i("mCNh"),p=i("dufq"),d=i("pLZG"),b=i("lJxs"),u=i("8Y7J"),g=i("s7LF"),f=i("O/6Z"),h=i("+CKi"),m=i("EApP"),R=i("SVse"),v=i("Egam"),S=i("dbUT"),y=i("JqCM");function M(t,e){if(1&t&&(u.Sb(0,"option",30),u.Kc(1),u.Rb()),2&t){var n=e.$implicit;u.mc("value",n.Value),u.yb(1),u.Mc(" ",n.Name," ")}}function O(t,e){1&t&&u.Nb(0,"div",31)}function x(t,e){if(1&t&&(u.Sb(0,"option",30),u.Kc(1),u.Rb()),2&t){var n=e.$implicit;u.mc("value",n.Value),u.yb(1),u.Mc(" ",n.Name," ")}}var C,F=((C=function(){function e(n,o,i,r,a,l){t(this,e),this.fb=n,this.router=o,this.activatedRoute=i,this.travelRetailReportService=r,this.sharedService=a,this.toastr=l,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()}return n(e,[{key:"CreateTravelRetailMissingFiguresForm",value:function(){this.TravelRetailMissingFiguresForm=this.fb.group({TravelRetailMissingFigures:this.fb.group({YEAR:[""],MONTH:[""],STOGRPCODE:[""]})})}},{key:"ngOnInit",value:function(){this.YEARS=Object(l.a)([this.activatedRoute.snapshot.data.Years]),this.GetSTOGRPCODE(),this.InitialValue(),this.Months=Object(c.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}}},{key:"InitialValue",value:function(){this.TravelRetailMissingFigures.get("YEAR").setValue((new Date).getFullYear()),this.TravelRetailMissingFigures.get("STOGRPCODE").setValue("All")}},{key:"ResetForm",value:function(){this.TravelRetailMissingFiguresForm.reset(),this.InitialValue()}},{key:"GetSTOGRPCODE",value:function(){var t=this;this.sharedService.GetSTOGRPCODE(p.d.STOGRPCODE_OCC).subscribe(function(e){t.sharedService.datastore.data=e,t.sharedService.STOGRPCODE.next(Object.assign({},t.sharedService.datastore).data),t.sharedService.datastore.data.unshift({Value:"All",Name:"All"})},function(t){return console.log("Could not load STOGRPCODE.")})}},{key:"onItemSelect",value:function(t){console.log("onItemSelect",t)}},{key:"onSelectAll",value:function(t){console.log("onSelectAll",t)}},{key:"toogleShowFilter",value:function(){this.ShowFilter=!this.ShowFilter,this.dropdownSettings=Object.assign({},this.dropdownSettings,{allowSearchFilter:this.ShowFilter})}},{key:"handleLimitSelection",value:function(){this.dropdownSettings=Object.assign({},this.dropdownSettings,this.limitSelection?{limitSelection:2}:{limitSelection:null})}},{key:"rptTravelRetailMissingFigures",value:function(t,e,n){var o,i=this;this.travelRetailReportService.rptTravelRetailMissingFigures(t,this.GetValue(e),n).subscribe(function(t){o=new Blob([t],{type:"application/pdf"})},function(t){console.log(t),i.toastr.error(t)},function(){var t=URL.createObjectURL(o);window.open(t,"_blank")})}},{key:"GetValue",value:function(t){var e=[];if(t.length>0)for(var n in t)e.push(t[n].Value);else e.push("0");return e}},{key:"discardOddDoubleEven",value:function(){return Object(s.a)(Object(d.a)(function(t){return!(t%2)}),Object(b.a)(function(t){return t+t}))}},{key:"TravelRetailMissingFigures",get:function(){return this.TravelRetailMissingFiguresForm.get("TravelRetailMissingFigures")}}]),e}()).\u0275fac=function(t){return new(t||C)(u.Mb(g.c),u.Mb(a.e),u.Mb(a.a),u.Mb(f.a),u.Mb(h.a),u.Mb(m.b))},C.\u0275cmp=u.Gb({type:C,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&&(u.Sb(0,"div",0),u.Sb(1,"form",1),u.Sb(2,"div",2),u.Sb(3,"div",3),u.Sb(4,"div",4),u.Sb(5,"div",5),u.Sb(6,"div",6),u.Sb(7,"div",7),u.Sb(8,"div",8),u.Sb(9,"div",9),u.Sb(10,"h4",10),u.Kc(11,"Report Parameters"),u.Rb(),u.Sb(12,"h4",11),u.Kc(13,"Enter values for the Parameters"),u.Rb(),u.Rb(),u.Sb(14,"div",9),u.Sb(15,"div",12),u.Sb(16,"div",13),u.Sb(17,"label",14),u.Kc(18,"Year:"),u.Rb(),u.Sb(19,"div",15),u.Sb(20,"select",16),u.Ic(21,M,2,2,"option",17),u.fc(22,"async"),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Sb(23,"div",18),u.Sb(24,"div",13),u.Sb(25,"label",19),u.Kc(26,"Month:"),u.Rb(),u.Sb(27,"div",15),u.Sb(28,"ng-multiselect-dropdown",20),u.cc("onSelect",function(t){return e.onItemSelect(t)})("onSelectAll",function(t){return e.onSelectAll(t)}),u.fc(29,"async"),u.Rb(),u.Ic(30,O,1,0,"ng-template",21,22,u.Jc),u.Rb(),u.Rb(),u.Rb(),u.Sb(32,"div",18),u.Sb(33,"div",13),u.Sb(34,"label",23),u.Kc(35,"STOGRPCODE:"),u.Rb(),u.Sb(36,"div",15),u.Sb(37,"select",24),u.Ic(38,x,2,2,"option",17),u.fc(39,"async"),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Sb(40,"div",9),u.Sb(41,"div",25),u.Sb(42,"button",26),u.cc("click",function(){return e.rptTravelRetailMissingFigures(e.TravelRetailMissingFigures.get("YEAR").value,e.TravelRetailMissingFigures.get("MONTH").value,e.TravelRetailMissingFigures.get("STOGRPCODE").value)}),u.Kc(43," Submit"),u.Rb(),u.Sb(44,"button",27),u.cc("click",function(){return e.ResetForm()}),u.Kc(45," Reset"),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Sb(46,"ngx-spinner",28),u.Sb(47,"p",29),u.Kc(48," Loading... "),u.Rb(),u.Rb(),u.Rb()),2&t&&(u.yb(1),u.mc("formGroup",e.TravelRetailMissingFiguresForm),u.yb(20),u.mc("ngForOf",u.gc(22,8,e.YEARS)),u.yb(7),u.mc("placeholder","Select Month")("settings",e.dropdownSettings)("data",u.gc(29,10,e.Months)),u.zb("disabled",e.disabled),u.yb(10),u.mc("ngForOf",u.gc(39,12,e.STOGRPCODES)),u.yb(8),u.mc("fullScreen",!1))},directives:[g.t,g.m,g.g,g.h,g.q,g.l,g.e,R.m,v.a,S.b,S.c,y.a,g.o,g.s],pipes:[R.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}"]}),C),w=i("Iab2"),_=i("IheW"),P=i("qvAe"),k=i("u47x");function N(t,e){if(1&t){var n=u.Tb();u.Sb(0,"tr",25),u.Sb(1,"td",26),u.Nb(2,"input",27),u.Rb(),u.Sb(3,"td",28),u.Sb(4,"button",29),u.cc("click",function(){u.zc(n);var t=e.index,o=u.ec();return o.Download(t,o.MStaticReportsList.controls[t].get("FILENAME").value)}),u.Nb(5,"i",30),u.Rb(),u.Rb(),u.Sb(6,"td",28),u.Sb(7,"button",31),u.cc("click",function(){u.zc(n);var t=e.index,o=u.ec();return o.Delete(t,o.MStaticReportsList.controls[t].get("FILENAME").value)}),u.Nb(8,"i",32),u.Rb(),u.Rb(),u.Rb()}2&t&&u.mc("formGroupName",e.index)}var A,E,L=((A=function(){function e(n,o,i,r,a,l){var c=this;t(this,e),this.fb=n,this.router=o,this.toastr=i,this.staticReportsService=r,this.interactivityChecker=a,this.platformId=l,this.onUploadFinished=new u.n,this.UploadFile=function(t,e){0!==t.length&&c.staticReportsService.UploadFile(t,e,"TravelRetailStaticReports","MonthlyReports").subscribe(function(t){t.type===_.d.UploadProgress?c.progress=Math.round(100*t.loaded/t.total):t.type===_.d.Response&&(c.message="Upload success.",c.onUploadFinished.emit(t.body)),c.GetAllFiles(),c.MStaticRports.reset()})},this.CreateMonthlyReportsForm()}return n(e,[{key:"CreateMonthlyReportsForm",value:function(){for(var t=[],e=0;e<14;e++)t.push(this.StaticReports());this.MonthlyReportsForm=this.fb.group({MStaticRports:this.fb.group({FILENAME:[""]}),MStaticReportsList:this.fb.array(t)})}},{key:"StaticReports",value:function(){return this.fb.group({DOWNLOADFILE:[""],FILENAME:[""]})}},{key:"ngOnInit",value:function(){this.GetAllFiles()}},{key:"GetAllFiles",value:function(){var t=this;this.staticReportsService.StaticReportDetails("TravelRetail","MonthlyPeriodic").subscribe(function(e){if(t.FileName=e,t.FileName.length>0)for(var n=t.MonthlyReportsForm.controls.MStaticReportsList,o=0;o<t.FileName.length;o++)n.at(+o).get("DOWNLOADFILE").setValue(t.FileName[o].FileNameWithOutExtension),n.at(+o).get("FILENAME").setValue(t.FileName[o].FileName),o>=13&&o<t.FileName.length-1&&t.MStaticReportsList.push(t.StaticReports())})}},{key:"Delete",value:function(t,e){for(var n=this,o=this.MonthlyReportsForm.controls.MStaticReportsList,i=0;i<o.length;i++)if(t==i){e&&this.staticReportsService.Delete("TravelRetail","MonthlyPeriodic",e).subscribe(function(e){null==e&&(n.MStaticReportsList.removeAt(t),n.toastr.warning("Deleted Successfully","TravelRetail"))},function(t){console.log(t)});break}}},{key:"Download",value:function(t,e){for(var n=this.MonthlyReportsForm.controls.MStaticReportsList,o=0;o<n.length;o++)if(t==o){e&&this.staticReportsService.DownloadFile("TravelRetail","MonthlyPeriodic",e).subscribe(function(t){var n=new Blob([t],{type:"application/pdf"}),o=window.URL.createObjectURL(n);"application/pdf"===t.type?window.open(o,"_blank"):w.saveAs(n,e)});break}}},{key:"keyevent",value:function(t){t.preventDefault();var e=Array.prototype.slice.call(document.querySelectorAll("input")),n=[];if(Array.isArray(n)&&!n.length)for(var o=0;o<e.length;o++)this.interactivityChecker.isFocusable(e[o])&&n.push(e[o]);if(13===t.keyCode||40===t.keyCode){var i=n[n.indexOf(document.activeElement)+1];i&&(i.focus(),i.select())}else if(38===t.keyCode){var r=n[n.indexOf(document.activeElement)-1];r&&(r.focus(),r.select())}}},{key:"MStaticRports",get:function(){return this.MonthlyReportsForm.get("MStaticRports")}},{key:"MStaticReportsList",get:function(){return this.MonthlyReportsForm.get("MStaticReportsList")}}]),e}()).\u0275fac=function(t){return new(t||A)(u.Mb(g.c),u.Mb(a.e),u.Mb(m.b),u.Mb(P.a),u.Mb(k.d),u.Mb(u.B))},A.\u0275cmp=u.Gb({type:A,selectors:[["app-monthlyreports"]],hostBindings:function(t,e){1&t&&u.cc("keyup",function(t){return e.keyevent(t)},!1,u.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){var n=u.Tb();u.Sb(0,"div",0),u.Sb(1,"form",1),u.Sb(2,"div",2),u.Sb(3,"div",3),u.Sb(4,"div",4),u.Sb(5,"div",5),u.Sb(6,"div",6),u.Sb(7,"div",7),u.Sb(8,"div",8),u.Sb(9,"div",9),u.Sb(10,"div",10),u.Sb(11,"div",11),u.Sb(12,"div",12),u.Nb(13,"input",13),u.Rb(),u.Rb(),u.Rb(),u.Sb(14,"div",14),u.Sb(15,"button",15),u.Nb(16,"i",16),u.Sb(17,"input",17,18),u.cc("change",function(){u.zc(n);var t=u.wc(18);return e.UploadFile(t.files,e.MStaticRports.get("FILENAME").value)}),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Sb(19,"div",19),u.Sb(20,"div",20),u.Sb(21,"div",21),u.Sb(22,"div",22),u.Sb(23,"table",23),u.Sb(24,"tbody"),u.Ic(25,N,9,1,"tr",24),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb()}2&t&&(u.yb(1),u.mc("formGroup",e.MonthlyReportsForm),u.yb(14),u.mc("disabled",""===e.MStaticRports.get("FILENAME").value||null===e.MStaticRports.get("FILENAME").value),u.yb(10),u.mc("ngForOf",e.MStaticReportsList.controls))},directives:[g.t,g.m,g.g,g.h,g.a,g.l,g.e,g.b,R.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)}']}),A),T=function(){return["TravelRetail-MissingFigures"]},G=function(){return["TravelRetail-MonthlyReports"]},D=function(){return["TravelRetail-ClarinsYear"]},I=function(){return["TravelRetail-FiscalYear"]},Y=function(){return["TravelRetail-HistoricReports"]},U=((E=function(){function e(){t(this,e)}return n(e,[{key:"ngOnInit",value:function(){}}]),e}()).\u0275fac=function(t){return new(t||E)},E.\u0275cmp=u.Gb({type:E,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&&(u.Sb(0,"div",0),u.Sb(1,"div",1),u.Sb(2,"div",2),u.Sb(3,"div",3),u.Sb(4,"ul",4),u.Sb(5,"li",5),u.Sb(6,"a",6),u.Kc(7,"Live Report"),u.Nb(8,"span",7),u.Rb(),u.Sb(9,"ul",8),u.Sb(10,"li"),u.Sb(11,"a",9),u.Kc(12,"Travel Retail Missing Figures"),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Sb(13,"li",10),u.Sb(14,"a",9),u.Kc(15,"Monthly/Periodic Reports"),u.Rb(),u.Rb(),u.Sb(16,"li",11),u.Sb(17,"a",6),u.Kc(18,"Group Business Reports"),u.Nb(19,"span",7),u.Rb(),u.Sb(20,"ul",8),u.Sb(21,"li"),u.Sb(22,"a",9),u.Kc(23,"Clarins Year"),u.Rb(),u.Rb(),u.Sb(24,"li"),u.Sb(25,"a",9),u.Kc(26,"Fiscal Year"),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Sb(27,"li",12),u.Sb(28,"a",9),u.Kc(29,"Historic Reports"),u.Rb(),u.Rb(),u.Rb(),u.Sb(30,"div",13),u.Sb(31,"div",14),u.Nb(32,"router-outlet"),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb()),2&t&&(u.yb(11),u.mc("routerLink",u.pc(5,T)),u.yb(3),u.mc("routerLink",u.pc(6,G)),u.yb(8),u.mc("routerLink",u.pc(7,D)),u.yb(3),u.mc("routerLink",u.pc(8,I)),u.yb(3),u.mc("routerLink",u.pc(9,Y)))},directives:[a.g,a.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}']}),E);function z(t,e){if(1&t){var n=u.Tb();u.Sb(0,"tr",23),u.Sb(1,"td",24),u.Nb(2,"input",25),u.Rb(),u.Sb(3,"td",26),u.Sb(4,"button",27),u.cc("click",function(){u.zc(n);var t=e.index,o=u.ec();return o.Download(t,o.HStaticReportsList.controls[t].get("FILENAME").value)}),u.Nb(5,"i",28),u.Rb(),u.Rb(),u.Sb(6,"td",26),u.Sb(7,"button",29),u.cc("click",function(){u.zc(n);var t=e.index,o=u.ec();return o.Delete(t,o.HStaticReportsList.controls[t].get("FILENAME").value)}),u.Nb(8,"i",30),u.Rb(),u.Rb(),u.Rb()}2&t&&u.mc("formGroupName",e.index)}var H,B=((H=function(){function e(n,o,i,r,a,l){var c=this;t(this,e),this.fb=n,this.router=o,this.staticReportsService=i,this.toastr=r,this.interactivityChecker=a,this.platformId=l,this.onUploadFinished=new u.n,this.UploadFile=function(t,e){0!==t.length&&c.staticReportsService.UploadFile(t,e,"TravelRetailStaticReports","HistoricReports").subscribe(function(t){t.type===_.d.UploadProgress?c.progress=Math.round(100*t.loaded/t.total):t.type===_.d.Response&&(c.message="Upload success.",c.onUploadFinished.emit(t.body)),c.GetAllFiles(),c.HStaticRports.reset()})},this.CreateHistoricReportsForm()}return n(e,[{key:"CreateHistoricReportsForm",value:function(){for(var t=[],e=0;e<14;e++)t.push(this.StaticReports());this.HistoricReportsForm=this.fb.group({HStaticRports:this.fb.group({FILENAME:[""]}),HStaticReportsList:this.fb.array(t)})}},{key:"StaticReports",value:function(){return this.fb.group({DOWNLOADFILE:[""],FILENAME:[""]})}},{key:"ngOnInit",value:function(){this.GetAllFiles()}},{key:"GetAllFiles",value:function(){var t=this;this.staticReportsService.StaticReportDetails("TravelRetail","Historic").subscribe(function(e){if(t.FileName=e,t.FileName.length>0)for(var n=t.HistoricReportsForm.controls.HStaticReportsList,o=0;o<t.FileName.length;o++)n.at(+o).get("DOWNLOADFILE").setValue(t.FileName[o].FileNameWithOutExtension),n.at(+o).get("FILENAME").setValue(t.FileName[o].FileName),o>=13&&o<t.FileName.length-1&&t.HStaticReportsList.push(t.StaticReports())})}},{key:"Delete",value:function(t,e){for(var n=this,o=this.HistoricReportsForm.controls.HStaticReportsList,i=0;i<o.length;i++)if(t==i){e&&this.staticReportsService.Delete("TravelRetail","Historic",e).subscribe(function(e){null==e&&(n.HStaticReportsList.removeAt(t),n.toastr.warning("Deleted Successfully","TravelRetail"))},function(t){console.log(t)});break}}},{key:"Download",value:function(t,e){for(var n=this.HistoricReportsForm.controls.HStaticReportsList,o=0;o<n.length;o++)if(t==o){e&&this.staticReportsService.DownloadFile("TravelRetail","Historic",e).subscribe(function(t){var n=new Blob([t],{type:"application/pdf"}),o=window.URL.createObjectURL(n);"application/pdf"===t.type?window.open(o,"_blank"):w.saveAs(n,e)});break}}},{key:"keyevent",value:function(t){t.preventDefault();var e=Array.prototype.slice.call(document.querySelectorAll("input")),n=[];if(Array.isArray(n)&&!n.length)for(var o=0;o<e.length;o++)this.interactivityChecker.isFocusable(e[o])&&n.push(e[o]);if(13===t.keyCode||40===t.keyCode){var i=n[n.indexOf(document.activeElement)+1];i&&(i.focus(),i.select())}else if(38===t.keyCode){var r=n[n.indexOf(document.activeElement)-1];r&&(r.focus(),r.select())}}},{key:"HStaticRports",get:function(){return this.HistoricReportsForm.get("HStaticRports")}},{key:"HStaticReportsList",get:function(){return this.HistoricReportsForm.get("HStaticReportsList")}}]),e}()).\u0275fac=function(t){return new(t||H)(u.Mb(g.c),u.Mb(a.e),u.Mb(P.a),u.Mb(m.b),u.Mb(k.d),u.Mb(u.B))},H.\u0275cmp=u.Gb({type:H,selectors:[["app-historicreports"]],hostBindings:function(t,e){1&t&&u.cc("keyup",function(t){return e.keyevent(t)},!1,u.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){var n=u.Tb();u.Sb(0,"div",0),u.Sb(1,"form",1),u.Sb(2,"div",2),u.Sb(3,"div",3),u.Sb(4,"div",4),u.Sb(5,"div",5),u.Sb(6,"div",6),u.Sb(7,"div",7),u.Sb(8,"div",8),u.Sb(9,"div",9),u.Sb(10,"div",10),u.Nb(11,"input",11),u.Rb(),u.Sb(12,"div",12),u.Sb(13,"button",13),u.Nb(14,"i",14),u.Sb(15,"input",15,16),u.cc("change",function(){u.zc(n);var t=u.wc(16);return e.UploadFile(t.files,e.HStaticRports.get("FILENAME").value)}),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Sb(17,"div",17),u.Sb(18,"div",18),u.Sb(19,"div",19),u.Sb(20,"div",20),u.Sb(21,"table",21),u.Sb(22,"tbody"),u.Ic(23,z,9,1,"tr",22),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb()}2&t&&(u.yb(1),u.mc("formGroup",e.HistoricReportsForm),u.yb(12),u.mc("disabled",""===e.HStaticRports.get("FILENAME").value||null===e.HStaticRports.get("FILENAME").value),u.yb(10),u.mc("ngForOf",e.HStaticReportsList.controls))},directives:[g.t,g.m,g.g,g.h,g.a,g.l,g.e,g.b,R.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)}']}),H);function W(t,e){if(1&t){var n=u.Tb();u.Sb(0,"tr",25),u.Sb(1,"td",26),u.Nb(2,"input",27),u.Rb(),u.Sb(3,"td",28),u.Sb(4,"button",29),u.cc("click",function(){u.zc(n);var t=e.index,o=u.ec();return o.Download(t,o.CYStaticReportsList.controls[t].get("FILENAME").value)}),u.Nb(5,"i",30),u.Rb(),u.Rb(),u.Sb(6,"td",28),u.Sb(7,"button",31),u.cc("click",function(){u.zc(n);var t=e.index,o=u.ec();return o.Delete(t,o.CYStaticReportsList.controls[t].get("FILENAME").value)}),u.Nb(8,"i",32),u.Rb(),u.Rb(),u.Rb()}2&t&&u.mc("formGroupName",e.index)}var V,j=((V=function(){function e(n,o,i,r,a,l){var c=this;t(this,e),this.fb=n,this.router=o,this.toastr=i,this.staticReportsService=r,this.interactivityChecker=a,this.platformId=l,this.onUploadFinished=new u.n,this.UploadFile=function(t,e){0!==t.length&&c.staticReportsService.UploadFile(t,e,"TravelRetailStaticReports","GroupStrategyReports_CY").subscribe(function(t){t.type===_.d.UploadProgress?c.progress=Math.round(100*t.loaded/t.total):t.type===_.d.Response&&(c.message="Upload success.",c.onUploadFinished.emit(t.body)),c.GetAllFiles(),c.CYStaticRports.reset()})},this.CreateClarinsYearReportsForm()}return n(e,[{key:"CreateClarinsYearReportsForm",value:function(){for(var t=[],e=0;e<14;e++)t.push(this.CYStaticReports());this.ClarinsYearReportsForm=this.fb.group({CYStaticRports:this.fb.group({FILENAME:[""]}),CYStaticReportsList:this.fb.array(t)})}},{key:"CYStaticReports",value:function(){return this.fb.group({DOWNLOADFILE:[""],FILENAME:[""]})}},{key:"ngOnInit",value:function(){this.GetAllFiles()}},{key:"GetAllFiles",value:function(){var t=this;this.staticReportsService.StaticReportDetails("TravelRetail","GroupStrategyClarins").subscribe(function(e){if(t.FileName=e,t.FileName.length>0)for(var n=t.ClarinsYearReportsForm.controls.CYStaticReportsList,o=0;o<t.FileName.length;o++)n.at(+o).get("DOWNLOADFILE").setValue(t.FileName[o].FileNameWithOutExtension),n.at(+o).get("FILENAME").setValue(t.FileName[o].FileName),o>=13&&o<t.FileName.length-1&&t.CYStaticReportsList.push(t.CYStaticReports())})}},{key:"Delete",value:function(t,e){for(var n=this,o=this.ClarinsYearReportsForm.controls.CYStaticReportsList,i=0;i<o.length;i++)if(t==i){e&&this.staticReportsService.Delete("TravelRetail","GroupStrategyClarins",e).subscribe(function(e){null==e&&(n.CYStaticReportsList.removeAt(t),n.toastr.warning("Deleted Successfully","TravelRetail"))},function(t){console.log(t)});break}}},{key:"Download",value:function(t,e){for(var n=this.ClarinsYearReportsForm.controls.CYStaticReportsList,o=0;o<n.length;o++)if(t==o){e&&this.staticReportsService.DownloadFile("TravelRetail","GroupStrategyClarins",e).subscribe(function(t){var n=new Blob([t],{type:"application/pdf"}),o=window.URL.createObjectURL(n);"application/pdf"===t.type?window.open(o,"_blank"):w.saveAs(n,e)});break}}},{key:"keyevent",value:function(t){t.preventDefault();var e=Array.prototype.slice.call(document.querySelectorAll("input")),n=[];if(Array.isArray(n)&&!n.length)for(var o=0;o<e.length;o++)this.interactivityChecker.isFocusable(e[o])&&n.push(e[o]);if(13===t.keyCode||40===t.keyCode){var i=n[n.indexOf(document.activeElement)+1];i&&(i.focus(),i.select())}else if(38===t.keyCode){var r=n[n.indexOf(document.activeElement)-1];r&&(r.focus(),r.select())}}},{key:"CYStaticRports",get:function(){return this.ClarinsYearReportsForm.get("CYStaticRports")}},{key:"CYStaticReportsList",get:function(){return this.ClarinsYearReportsForm.get("CYStaticReportsList")}}]),e}()).\u0275fac=function(t){return new(t||V)(u.Mb(g.c),u.Mb(a.e),u.Mb(m.b),u.Mb(P.a),u.Mb(k.d),u.Mb(u.B))},V.\u0275cmp=u.Gb({type:V,selectors:[["app-clarinsyear"]],hostBindings:function(t,e){1&t&&u.cc("keyup",function(t){return e.keyevent(t)},!1,u.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){var n=u.Tb();u.Sb(0,"div",0),u.Sb(1,"form",1),u.Sb(2,"div",2),u.Sb(3,"div",3),u.Sb(4,"div",4),u.Sb(5,"div",5),u.Sb(6,"div",6),u.Sb(7,"div",7),u.Sb(8,"div",8),u.Sb(9,"div",9),u.Sb(10,"div",10),u.Sb(11,"div",11),u.Sb(12,"div",12),u.Nb(13,"input",13),u.Rb(),u.Rb(),u.Rb(),u.Sb(14,"div",14),u.Sb(15,"button",15),u.Nb(16,"i",16),u.Sb(17,"input",17,18),u.cc("change",function(){u.zc(n);var t=u.wc(18);return e.UploadFile(t.files,e.CYStaticRports.get("FILENAME").value)}),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Sb(19,"div",19),u.Sb(20,"div",20),u.Sb(21,"div",21),u.Sb(22,"div",22),u.Sb(23,"table",23),u.Sb(24,"tbody"),u.Ic(25,W,9,1,"tr",24),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb()}2&t&&(u.yb(1),u.mc("formGroup",e.ClarinsYearReportsForm),u.yb(14),u.mc("disabled",""===e.CYStaticRports.get("FILENAME").value||null===e.CYStaticRports.get("FILENAME").value),u.yb(10),u.mc("ngForOf",e.CYStaticReportsList.controls))},directives:[g.t,g.m,g.g,g.h,g.a,g.l,g.e,g.b,R.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)}']}),V);function K(t,e){if(1&t){var n=u.Tb();u.Sb(0,"tr",25),u.Sb(1,"td",26),u.Nb(2,"input",27),u.Rb(),u.Sb(3,"td",28),u.Sb(4,"button",29),u.cc("click",function(){u.zc(n);var t=e.index,o=u.ec();return o.Download(t,o.FYStaticReportsList.controls[t].get("FILENAME").value)}),u.Nb(5,"i",30),u.Rb(),u.Rb(),u.Sb(6,"td",28),u.Sb(7,"button",31),u.cc("click",function(){u.zc(n);var t=e.index,o=u.ec();return o.Delete(t,o.FYStaticReportsList.controls[t].get("FILENAME").value)}),u.Nb(8,"i",32),u.Rb(),u.Rb(),u.Rb()}2&t&&u.mc("formGroupName",e.index)}var q,J,Z,X=((q=function(){function e(n,o,i,r,a,l){var c=this;t(this,e),this.fb=n,this.router=o,this.toastr=i,this.staticReportsService=r,this.interactivityChecker=a,this.platformId=l,this.onUploadFinished=new u.n,this.UploadFile=function(t,e){0!==t.length&&c.staticReportsService.UploadFile(t,e,"TravelRetailStaticReports","GroupStrategyReports_FY").subscribe(function(t){t.type===_.d.UploadProgress?c.progress=Math.round(100*t.loaded/t.total):t.type===_.d.Response&&(c.message="Upload success.",c.onUploadFinished.emit(t.body)),c.GetAllFiles(),c.FYStaticRports.reset()})},this.CreateFiscalYearReportsForm()}return n(e,[{key:"CreateFiscalYearReportsForm",value:function(){for(var t=[],e=0;e<14;e++)t.push(this.FYStaticReports());this.FiscalYearReportsForm=this.fb.group({FYStaticRports:this.fb.group({FILENAME:[""]}),FYStaticReportsList:this.fb.array(t)})}},{key:"FYStaticReports",value:function(){return this.fb.group({DOWNLOADFILE:[""],FILENAME:[""]})}},{key:"ngOnInit",value:function(){this.GetAllFiles()}},{key:"GetAllFiles",value:function(){var t=this;this.staticReportsService.StaticReportDetails("TravelRetail","GroupStrategyFiscal").subscribe(function(e){if(t.FileName=e,t.FileName.length>0)for(var n=t.FiscalYearReportsForm.controls.FYStaticReportsList,o=0;o<t.FileName.length;o++)n.at(+o).get("DOWNLOADFILE").setValue(t.FileName[o].FileNameWithOutExtension),n.at(+o).get("FILENAME").setValue(t.FileName[o].FileName),o>=13&&o<t.FileName.length-1&&t.FYStaticReportsList.push(t.FYStaticReports())})}},{key:"Delete",value:function(t,e){for(var n=this,o=this.FiscalYearReportsForm.controls.FYStaticReportsList,i=0;i<o.length;i++)if(t==i){e&&this.staticReportsService.Delete("TravelRetail","GroupStrategyFiscal",e).subscribe(function(e){null==e&&(n.FYStaticReportsList.removeAt(t),n.toastr.warning("Deleted Successfully","TravelRetail"))},function(t){console.log(t)});break}}},{key:"Download",value:function(t,e){for(var n=this.FiscalYearReportsForm.controls.FYStaticReportsList,o=0;o<n.length;o++)if(t==o){e&&this.staticReportsService.DownloadFile("TravelRetail","GroupStrategyFiscal",e).subscribe(function(t){var n=new Blob([t],{type:"application/pdf"}),o=window.URL.createObjectURL(n);"application/pdf"===t.type?window.open(o,"_blank"):w.saveAs(n,e)});break}}},{key:"keyevent",value:function(t){t.preventDefault();var e=Array.prototype.slice.call(document.querySelectorAll("input")),n=[];if(Array.isArray(n)&&!n.length)for(var o=0;o<e.length;o++)this.interactivityChecker.isFocusable(e[o])&&n.push(e[o]);if(13===t.keyCode||40===t.keyCode){var i=n[n.indexOf(document.activeElement)+1];i&&(i.focus(),i.select())}else if(38===t.keyCode){var r=n[n.indexOf(document.activeElement)-1];r&&(r.focus(),r.select())}}},{key:"FYStaticRports",get:function(){return this.FiscalYearReportsForm.get("FYStaticRports")}},{key:"FYStaticReportsList",get:function(){return this.FiscalYearReportsForm.get("FYStaticReportsList")}}]),e}()).\u0275fac=function(t){return new(t||q)(u.Mb(g.c),u.Mb(a.e),u.Mb(m.b),u.Mb(P.a),u.Mb(k.d),u.Mb(u.B))},q.\u0275cmp=u.Gb({type:q,selectors:[["app-fiscalyear"]],hostBindings:function(t,e){1&t&&u.cc("keyup",function(t){return e.keyevent(t)},!1,u.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){var n=u.Tb();u.Sb(0,"div",0),u.Sb(1,"form",1),u.Sb(2,"div",2),u.Sb(3,"div",3),u.Sb(4,"div",4),u.Sb(5,"div",5),u.Sb(6,"div",6),u.Sb(7,"div",7),u.Sb(8,"div",8),u.Sb(9,"div",9),u.Sb(10,"div",10),u.Sb(11,"div",11),u.Sb(12,"div",12),u.Nb(13,"input",13),u.Rb(),u.Rb(),u.Rb(),u.Sb(14,"div",14),u.Sb(15,"button",15),u.Nb(16,"i",16),u.Sb(17,"input",17,18),u.cc("change",function(){u.zc(n);var t=u.wc(18);return e.UploadFile(t.files,e.FYStaticRports.get("FILENAME").value)}),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Sb(19,"div",19),u.Sb(20,"div",20),u.Sb(21,"div",21),u.Sb(22,"div",22),u.Sb(23,"table",23),u.Sb(24,"tbody"),u.Ic(25,K,9,1,"tr",24),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb(),u.Rb()}2&t&&(u.yb(1),u.mc("formGroup",e.FiscalYearReportsForm),u.yb(14),u.mc("disabled",""===e.FYStaticRports.get("FILENAME").value||null===e.FYStaticRports.get("FILENAME").value),u.yb(10),u.mc("ngForOf",e.FYStaticReportsList.controls))},directives:[g.t,g.m,g.g,g.h,g.a,g.l,g.e,g.b,R.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)}']}),q),$=[{path:"",data:{title:"Travel Retail Reports"},children:[{path:"",redirectTo:"Travelretailreports",pathMatch:"full"},{path:"",component:U,data:{title:"Travel Retail Reports"},children:[{path:"TravelRetail-MissingFigures",component:F,resolve:{Years:i("liBt").a},data:{title:"Travel Retail: Missing Figures"}},{path:"TravelRetail-MonthlyReports",component:L,data:{title:"Travel Retail: Monthly/Periodic Reports"}},{path:"TravelRetail-ClarinsYear",component:j,data:{title:"Travel Retail: Group Business Reports (Clarins Year)"}},{path:"TravelRetail-FiscalYear",component:X,data:{title:"Travel Retail: Group Business Reports (Fiscal Year)"}},{path:"TravelRetail-HistoricReports",component:B,data:{title:"Travel Retail: Historic Reports"}}]}]}],Q=((Z=function e(){t(this,e)}).\u0275mod=u.Kb({type:Z}),Z.\u0275inj=u.Jb({factory:function(t){return new(t||Z)},imports:[[a.h.forChild($)],a.h]}),Z),tt=((J=function e(){t(this,e)}).\u0275mod=u.Kb({type:J}),J.\u0275inj=u.Jb({factory:function(t){return new(t||J)},imports:[[Q,r.a,y.b,v.b.forRoot()]]}),J)},qvAe:function(e,o,i){"use strict";i.d(o,"a",function(){return s});var r=i("IheW"),a=i("lJxs"),l=i("8Y7J"),c={headers:new r.e({"Content-Type":"application/json",Authorization:"jwt-token"})},s=function(){var e=function(){function e(n,o){t(this,e),this.http=n,this.BaseURL="",this.BaseURL="http://localhost:4200/"===o?"https://localhost:44301/api/UploadDownload/":o+"api/UploadDownload/"}return n(e,[{key:"StaticReportDetails",value:function(t,e){return this.http.get(this.BaseURL+"GetAllFileDetails?mejortype="+t+"&subtype="+e)}},{key:"Delete",value:function(t,e,n){return this.http.delete(this.BaseURL+"DeleteFile?mejor="+t+"&subtype="+e+"&fileName="+n,c).pipe(Object(a.a)(function(t){return t}))}},{key:"UploadFile",value:function(t,e,n,o){var i=t[0],a=new FormData;a.append("file",i,i.name);var l=new r.f("POST",this.BaseURL+"Upload?NewName="+e+"&mejorType="+n+"&subType="+o,a,{reportProgress:!0,responseType:"blob"});return this.http.request(l)}},{key:"DownloadFile",value:function(t,e,n){return this.http.get(this.BaseURL+"Download?mejortype="+t+"&subtype="+e+"&fileName="+n,{responseType:"blob"}).pipe(Object(a.a)(function(t){return t}))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(l.Zb(r.b),l.Zb("BASE_URL"))},e.\u0275prov=l.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()}}])}();