PageSourceSearch

https://portal.alasconnect.com/365.f9a8e4cf90e9aff9.js

js alasconnect.com collected 2026-09-25 14:31:27 UTC 93,720 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkCloudRadial=self.webpackChunkCloudRadial||[]).push([[365],{40365:(os,Y,l)=>{l.r(Y),l.d(Y,{SettingsModule:()=>ss});var ce=l(6744),g=l(71581),e=l(54438),b=l(90979),w=l(80377),v=l(8996),E=l(20100),j=l(97812),T=l(51188),h=l(60177),d=l(96268),D=l(89786),P=l(73076),S=l(53612),y=l(27452),x=l(58544);const de=()=>({allowUnsort:!1,mode:"single"}),pe=()=>[10,20,50,100],_e=i=>({pageSizes:i}),me=()=>({mode:"single"}),R=(i,s,t,a)=>[i,s,"symbol-narrow","1.2-2",t,a];function fe(i,s){1&i&&(e.j41(0,"div"),e.EFF(1," Searching... "),e.k0s())}function ge(i,s){1&i&&(e.j41(0,"div"),e.EFF(1," No records available. "),e.k0s())}function he(i,s){if(1&i&&e.DNE(0,fe,2,0,"div",20)(1,ge,2,0,"div",20),2&i){const t=e.XpG();e.Y8G("ngIf",t._dataService.isBusy),e.R7$(),e.Y8G("ngIf",!t._dataService.isBusy)}}function ue(i,s){1&i&&e.nrm(0,"span",21)}function be(i,s){if(1&i&&(e.j41(0,"span",22),e.EFF(1),e.k0s()),2&i){const t=s.$implicit;e.FS9("title",t.description),e.R7$(),e.JRh(t.name)}}function ve(i,s){1&i&&(e.j41(0,"span",23),e.EFF(1,"Name"),e.k0s())}function ke(i,s){1&i&&e.EFF(0),2&i&&e.SpI(" ",s.$implicit.type," ")}function Fe(i,s){1&i&&(e.j41(0,"span",24),e.EFF(1,"Type"),e.k0s())}function Te(i,s){1&i&&e.EFF(0),2&i&&e.SpI(" ",s.$implicit.cycle," ")}function Ce(i,s){1&i&&(e.j41(0,"span",25),e.EFF(1,"Billing Cycle"),e.k0s())}function je(i,s){if(1&i&&(e.EFF(0),e.nI1(1,"currency")),2&i){const t=s.$implicit,a=e.XpG();e.SpI(" ",e.iJd(1,1,e.ziG(8,R,t.amount,a._user.UserProfile.partner.currencyCode,a._user.UserProfile.partner.locale,a._user.UserProfile.partner.locale))," ")}}function Ie(i,s){1&i&&(e.j41(0,"span",26),e.EFF(1,"Agreement"),e.k0s())}function De(i,s){if(1&i&&(e.EFF(0),e.nI1(1,"currency")),2&i){const t=s.$implicit,a=e.XpG();e.SpI(" ",e.iJd(1,1,e.ziG(8,R,t.billedAmount,a._user.UserProfile.partner.currencyCode,a._user.UserProfile.partner.locale,a._user.UserProfile.partner.locale))," ")}}function Ee(i,s){1&i&&(e.j41(0,"span",27),e.EFF(1,"Time"),e.k0s())}function Re(i,s){1&i&&(e.j41(0,"span"),e.EFF(1,"None"),e.k0s())}function Se(i,s){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"localizedShortDateZ"),e.k0s()),2&i){const t=e.XpG().$implicit;e.R7$(),e.JRh(e.bMT(2,1,t.endDate))}}function ye(i,s){if(1&i&&e.DNE(0,Re,2,0,"span",20)(1,Se,3,3,"span",20),2&i){const t=s.$implicit;e.Y8G("ngIf",!t.isEndDate||!t.endDate),e.R7$(),e.Y8G("ngIf",t.isEndDate&&t.endDate)}}function we(i,s){1&i&&(e.j41(0,"span",28),e.EFF(1,"End Date"),e.k0s())}function xe(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",42)(1,"div",48)(2,"a",49),e.bIt("click",function(){const n=e.eBV(t).$implicit,o=e.XpG(4);return e.Njj(o.downloadQuote(n))}),e.EFF(3),e.k0s()()()}if(2&i){const t=s.$implicit;e.R7$(3),e.JRh(t.title)}}function Ge(i,s){if(1&i&&(e.j41(0,"div",40)(1,"div",41),e.EFF(2," Documents "),e.k0s(),e.j41(3,"div",42)(4,"div",46)(5,"strong"),e.EFF(6,"Title"),e.k0s()()(),e.DNE(7,xe,4,1,"div",47),e.k0s()),2&i){const t=e.XpG(3);e.R7$(7),e.Y8G("ngForOf",t.agreement.documents)}}function Ne(i,s){1&i&&(e.j41(0,"span"),e.EFF(1,"None"),e.k0s())}function $e(i,s){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"localizedShortDateZ"),e.k0s()),2&i){const t=e.XpG(3);e.R7$(),e.JRh(e.bMT(2,1,t.agreement.endDate))}}function Pe(i,s){if(1&i&&(e.j41(0,"div",42)(1,"div",43),e.EFF(2," Time Billing "),e.k0s(),e.j41(3,"div",43),e.EFF(4),e.nI1(5,"currency"),e.j41(6,"sup"),e.EFF(7,"*"),e.k0s()()()),2&i){const t=e.XpG(3);e.R7$(4),e.SpI(" ",e.iJd(5,1,e.ziG(8,R,t.agreement.billedAmount,t._user.UserProfile.partner.currencyCode,t._user.UserProfile.partner.locale,t._user.UserProfile.partner.locale)),"")}}function Ue(i,s){if(1&i&&(e.j41(0,"div",42)(1,"div",43),e.EFF(2," Units "),e.k0s(),e.j41(3,"div",43),e.EFF(4),e.k0s()()),2&i){const t=e.XpG(3);e.R7$(4),e.SpI(" ",t.agreement.units," ")}}function Ae(i,s){1&i&&(e.j41(0,"span"),e.EFF(1,"\u2013"),e.k0s())}function Be(i,s){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"number"),e.k0s()),2&i){const t=e.XpG(4);e.R7$(),e.JRh(e.i5U(2,1,t.agreement.limit,"2.2"))}}function Xe(i,s){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"currency"),e.k0s()),2&i){const t=e.XpG(4);e.R7$(),e.JRh(e.iJd(2,1,e.ziG(8,R,t.agreement.limit,t._user.UserProfile.partner.currencyCode,t._user.UserProfile.partner.locale,t._user.UserProfile.partner.locale)))}}
1function Ye(i,s){if(1&i&&(e.j41(0,"div",42)(1,"div",43),e.EFF(2," Limit "),e.k0s(),e.j41(3,"div",43),e.DNE(4,Ae,2,0,"span",20)(5,Be,3,4,"span",20)(6,Xe,3,13,"span",20),e.k0s()()),2&i){const t=e.XpG(3);e.R7$(4),e.Y8G("ngIf",t.agreement.isUnlimited),e.R7$(),e.Y8G("ngIf",!t.agreement.isUnlimited&&"amount"!=t.agreement.units.toLowerCase()),e.R7$(),e.Y8G("ngIf",!t.agreement.isUnlimited&&"amount"==t.agreement.units.toLowerCase())}}function Me(i,s){1&i&&(e.j41(0,"span"),e.EFF(1,"\u2013"),e.k0s())}function Ve(i,s){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"number"),e.j41(3,"sup"),e.EFF(4,"*"),e.k0s()()),2&i){const t=e.XpG(4);e.R7$(),e.JRh(e.i5U(2,1,t.agreement.hours,"1.2-2"))}}function Oe(i,s){if(1&i&&(e.j41(0,"div",42)(1,"div",43),e.EFF(2," Hours Used "),e.k0s(),e.j41(3,"div",43),e.DNE(4,Me,2,0,"span",20)(5,Ve,5,4,"span",20),e.k0s()()),2&i){const t=e.XpG(3);e.R7$(4),e.Y8G("ngIf",t.agreement.isUnlimited),e.R7$(),e.Y8G("ngIf",!t.agreement.isUnlimited)}}function ze(i,s){1&i&&(e.j41(0,"span"),e.EFF(1,"\u2013"),e.k0s())}function Le(i,s){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"number"),e.j41(3,"sup"),e.EFF(4,"*"),e.k0s()()),2&i){const t=e.XpG(4);e.R7$(),e.JRh(e.i5U(2,1,t.calcRemaining(t.agreement),"1.2"))}}function Je(i,s){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"currency"),e.j41(3,"sup"),e.EFF(4,"*"),e.k0s()()),2&i){const t=e.XpG(4);e.R7$(),e.JRh(e.iJd(2,1,e.ziG(8,R,t.calcRemaining(t.agreement),t._user.UserProfile.partner.currencyCode,t._user.UserProfile.partner.locale,t._user.UserProfile.partner.locale)))}}function He(i,s){if(1&i&&(e.j41(0,"div",42)(1,"div",43),e.EFF(2," Remaining "),e.k0s(),e.j41(3,"div",43),e.DNE(4,ze,2,0,"span",20)(5,Le,5,4,"span",20)(6,Je,5,13,"span",20),e.k0s()()),2&i){const t=e.XpG(3);e.R7$(4),e.Y8G("ngIf",t.agreement.isUnlimited),e.R7$(),e.Y8G("ngIf",!t.agreement.isUnlimited&&"amount"!=t.agreement.units.toLowerCase()),e.R7$(),e.Y8G("ngIf",!t.agreement.isUnlimited&&"amount"==t.agreement.units.toLowerCase())}}function Qe(i,s){if(1&i&&(e.j41(0,"div",42)(1,"div",43),e.EFF(2," Next Bill Date "),e.k0s(),e.j41(3,"div",43),e.EFF(4),e.nI1(5,"localizedShortDateZ"),e.k0s()()),2&i){const t=e.XpG(3);e.R7$(4),e.SpI(" ",e.bMT(5,1,t.agreement.nextBillDate)," ")}}function Ke(i,s){if(1&i&&(e.j41(0,"div")(1,"h3",38),e.EFF(2),e.k0s(),e.DNE(3,Ge,8,1,"div",39),e.j41(4,"div",40)(5,"div",41),e.EFF(6," Overview "),e.k0s(),e.j41(7,"div",42)(8,"div",43),e.EFF(9," Type "),e.k0s(),e.j41(10,"div",43),e.EFF(11),e.k0s()(),e.j41(12,"div",42)(13,"div",43),e.EFF(14," Start Date "),e.k0s(),e.j41(15,"div",43),e.EFF(16),e.nI1(17,"localizedShortDateZ"),e.k0s()(),e.j41(18,"div",42)(19,"div",43),e.EFF(20," End Date "),e.k0s(),e.j41(21,"div",43),e.DNE(22,Ne,2,0,"span",20)(23,$e,3,3,"span",20),e.k0s()(),e.j41(24,"div",42)(25,"div",43),e.EFF(26," Billing Cycle "),e.k0s(),e.j41(27,"div",43),e.EFF(28),e.k0s()()(),e.j41(29,"div",40)(30,"div",41),e.EFF(31," Details "),e.k0s(),e.j41(32,"div",42)(33,"div",43),e.EFF(34," Agreement Billing "),e.k0s(),e.j41(35,"div",43),e.EFF(36),e.nI1(37,"currency"),e.k0s()(),e.DNE(38,Pe,8,13,"div",44)(39,Ue,5,1,"div",44)(40,Ye,7,3,"div",44)(41,Oe,6,2,"div",44)(42,He,7,3,"div",44),e.j41(43,"div",42)(44,"div",43),e.EFF(45," Last Bill Date "),e.k0s(),e.j41(46,"div",43),e.EFF(47),e.nI1(48,"localizedShortDateZ"),e.k0s()(),e.DNE(49,Qe,6,3,"div",44),e.j41(50,"div",45)(51,"small")(52,"sup"),e.EFF(53,"*"),e.k0s(),e.EFF(54,"ESTIMATED - Actual amount may vary based on agreement terms and conditions."),e.k0s()()()()),2&i){const t=e.XpG(2);e.R7$(2),e.SpI(" ",t.agreement.name," "),e.R7$(),e.Y8G("ngIf",t.agreement.documents&&t.agreement.documents.length>0),e.R7$(8),e.SpI(" ",t.agreement.type," "),e.R7$(5),e.SpI(" ",e.bMT(17,15,t.agreement.startDate)," "),e.R7$(6),e.Y8G("ngIf",!t.agreement.isEndDate||!t.agreement.endDate),e.R7$(),e.Y8G("ngIf",t.agreement.isEndDate&&t.agreement.endDate),e.R7$(5),e.SpI(" ",t.agreement.cycle," "),e.R7$(8),e.SpI(" ",e.iJd(37,17,e.ziG(26,R,t.agreement.amount,t._user.UserProfile.partner.currencyCode,t._user.UserProfile.partner.locale,t._user.UserProfile.partner.locale))," "),e.R7$(2),e.Y8G("ngIf",t.agreement.units),e.R7$(),e.Y8G("ngIf",t.agreement.units),e.R7$(),e.Y8G("ngIf",t.agreement.units),e.R7$(),e.Y8G("ngIf",t.agreement.units),e.R7$(),e.Y8G("ngIf",t.agreement.units),e.R7$(5),e.SpI(" ",e.bMT(48,24,t.agreement.lastBillDate)," "),e.R7$(2),e.Y8G("ngIf",t.agreement.nextBillDate)}}
1function qe(i,s){if(1&i){const t=e.RV6();e.j41(0,"blade-display",29),e.bIt("onEscape",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.closeBlade())}),e.j41(1,"div",30)(2,"div",31),e.EFF(3," Agreement "),e.k0s(),e.j41(4,"div",32)(5,"button",33),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.closeBlade())}),e.nrm(6,"span",34),e.EFF(7,"Close"),e.k0s()()(),e.j41(8,"div",35),e.DNE(9,Ke,55,31,"div",20),e.j41(10,"div",36)(11,"button",37),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.closeBlade())}),e.EFF(12,"Close"),e.k0s()()()()}if(2&i){const t=e.XpG();e.R7$(9),e.Y8G("ngIf",t.agreement)}}function We(i,s){if(1&i){const t=e.RV6();e.j41(0,"blade-display",50),e.bIt("onEscape",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.closePdfView())}),e.j41(1,"div",30)(2,"div",51),e.EFF(3),e.k0s(),e.j41(4,"div",32)(5,"button",33),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.closePdfView())}),e.nrm(6,"span",34),e.EFF(7,"Close"),e.k0s()()(),e.j41(8,"div",35)(9,"pdfviewer",52),e.bIt("onClose",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.closePdfView())}),e.k0s()()()}if(2&i){const t=e.XpG();e.R7$(3),e.SpI(" ",t.pdfTitle," "),e.R7$(6),e.Y8G("src",t.pdfSrc)("name",t.pdfName)("auth",!0)}}let M=(()=>{class i{constructor(t,a,n,o,c,r,u){this._browserutils=t,this._gridService=a,this._blade=n,this._dataService=o,this._slimLoading=c,this._user=r,this._route=u,this.state={skip:0,take:this._user.UserProfile.user.rowsPerPage,sort:[{field:"closeDate",dir:"desc"}]},this.sort=[{field:"closeDate",dir:"desc"}],this.allData=()=>this._gridService.queryAll(this._gridService.convertFrom({skip:0,take:999},[{field:"closeDate",dir:"desc"}],null)),this.isRowSelected=f=>!1,this.startPickerDate=new Date,this.endPickerDate=new Date,this.showAgreement=!1,this.errors=[],this.showPdfView=!1,this.pdfName="",this.pdfSrc="",this.pdfTitle="",this._gridService.setBaseURL("/api/agreements"),this.profileData=o,this.gridData=this._gridService,this.fillData()}fillData(){const t=this._gridService.convertFrom(this.state,this.sort,this.filter);t.timeZoneOffset=(new Date).getTimezoneOffset(),this._gridService.query(t)}ngOnInit(){this.paramsSubscription=this._route.params.subscribe(t=>{t.id&&this.openAgreement(+t.id)})}dataStateChange(t){this._user.UserProfile.user.rowsPerPage!=t.take&&this._dataService.updateRowsPerpage(t.take),this._user.UserProfile.user.rowsPerPage=t.take,JSON.stringify(t.sort)!=JSON.stringify(this.sort)&&(this.state.skip=0),this.filter=t.filter,this.state=t,this.sort=t.sort,this.fillData()}getDownloadName(){return"Agreements-"+this._user.UserProfile.company.safeName+"-"+this._browserutils.currentDate()+".xlsx"}exportToExcel(t){t.saveAsExcel(),this._browserutils.pushDownloadToast(this.getDownloadName())}gridUserSelectionChange(t){this.openAgreement(t.selectedRows[0].dataItem.id)}onStartChange(t,a){return this.startPickerDate=t,this.onDateChange(a),!1}onEndChange(t,a){return this.endPickerDate=t,this.onDateChange(a),!1}filterChange(t){this.filter=t,JSON.stringify(this.filter).includes('"date"')||(this.startPickerDate=new Date,this.endPickerDate=new Date)}onDateChange(t){const a=this.startPickerDate,n=this.endPickerDate;a&&n&&t.filter({logic:"and",filters:[{field:"date",operator:"eq",value:a.toISOString().substring(0,10)+","+n.toISOString().substring(0,10)}]})}openAgreement(t){const a=new g.Yj;return a.filters="id",a.conditions="eq",a.values=t.toString(),this._slimLoading.start(),this._dataService.get(a,"/api/agreements").subscribe(n=>{this.agreement=n.data[0],this.showAgreement=!0,this._slimLoading.complete(),this._blade.showMe(),history.replaceState(null,"","/app/account/agreements/"+t.toString())},n=>{this.errors.push("There was a problem with the request")}),!1}closeBlade(){return this.showAgreement=!1,this._blade.closeMe(),history.replaceState(null,"","/app/account/agreements"),!1}downloadQuote(t){return t.fileName.startsWith("http")?(window.open(t.fileName,"_blank"),!1):(this.errors=[],t.fileName.endsWith("html")?(this._slimLoading.start(),this._dataService.downloadFile("/api/agreements/download?id="+t.id.toString()).subscribe(a=>{this._dataService.openContent(a,"Agreement"+t.id.toString()+"-"+this._user.UserProfile.company.safeName+".html","text/html"),this._slimLoading.complete()},a=>{this.errors.push("There was a problem with the request")})):this.downloadViewPdfFile(t.id,t.fileName),!1)}calcRemaining(t){return"hours"==t.units.toLowerCase()?t.limit-t.hours:t.limit-t.billedAmount}closePdfView(){return this.showPdfView=!1,this.pdfSrc="",!1}downloadViewPdfFile(t,a){return this.errors=[],this.showPdfView=!0,this.pdfTitle=a,this.pdfSrc="/api/agreements/download?id="+t.toString(),this.pdfName=a,!1}static{this.\u0275fac=function(a){return new(a||i)(e.rXU(b.b),e.rXU(w.M),e.rXU(v.C),e.rXU(g.jK),e.rXU(E.KO),e.rXU(j.D),e.rXU(T.nX))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["az-company"]],decls:33,vars:29,consts:[["grid",""],[1,"d-flex","flex-column","h-100"],[3,"title"],["title","Download all",1,"pageHeaderButton",3,"click"],[1,"fmd","fm-ExcelDocument"],[1,"row","h-100","overflow-auto"],["width","100%",1,"h-100","overflow-hidden",3,"filterChange","selectionChange","dataStateChange","data","reorderable","resizable","pageSize","skip","sortable","sort","pageable","filter","rowSelected","selectable","filterable"],["kendoGridNoRecordsTemplate",""],[1,"gridGraphic",3,"width"],["kendoGridCellTemplate",""],["field","name","title","Name"],["kendoGridHeaderTemplate",""],["field","type","title","Type","media","md"],["field","cycle","title","Billing Cycle","media","lg",3,"filterable"],["field","amount","title","Agreement","media","lg",3,"filterable"],["field","billedAmount","title","Time","media","xl",3,"filterable"],["field","endD
1ate","title","End Date","media","xl",3,"filterable"],[3,"fileName","fetchData"],["class","w-45-responsive",3,"onEscape",4,"ngIf"],["class","w-65-responsive",3,"onEscape",4,"ngIf"],[4,"ngIf"],[1,"fal","fa-file-alt"],["notranslate","",1,"fw-semibold",3,"title"],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","Name"],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","Type"],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","Billing cycle"],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","Agreement amount"],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","Billed amount"],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","End date"],[1,"w-45-responsive",3,"onEscape"],[1,"bladeHeader","clearfix"],[1,"bladeTitle"],[1,"bladeCommands"],["title","Close",1,"pageHeaderButton",3,"click"],[1,"fal","fa-times"],[1,"bladeBody"],[1,"bladeButtons"],[1,"btn","btn-secondary",3,"click"],["notranslate",""],["class","epSpecs",4,"ngIf"],[1,"epSpecs"],[1,"epTitle"],[1,"row"],[1,"col","col-6"],["class","row",4,"ngIf"],[2,"padding","10px"],[1,"col"],["class","row",4,"ngFor","ngForOf"],["notranslate","",1,"col"],["href","",3,"click"],[1,"w-65-responsive",3,"onEscape"],["notranslate","",1,"bladeTitle"],[2,"display","block","height","calc(100vh - 200px)",3,"onClose","src","name","auth"]],template:function(a,n){if(1&a){const o=e.RV6();e.j41(0,"div",1)(1,"page-header",2)(2,"button",3),e.bIt("click",function(){e.eBV(o);const r=e.sdS(7);return e.Njj(n.exportToExcel(r))}),e.nrm(3,"span",4),e.EFF(4,"Download"),e.k0s()(),e.j41(5,"div",5)(6,"kendo-grid",6,0),e.nI1(8,"async"),e.bIt("filterChange",function(r){return e.eBV(o),e.Njj(n.filterChange(r))})("selectionChange",function(r){return e.eBV(o),e.Njj(n.gridUserSelectionChange(r))})("dataStateChange",function(r){return e.eBV(o),e.Njj(n.dataStateChange(r))}),e.DNE(9,he,2,2,"ng-template",7),e.j41(10,"kendo-grid-column",8),e.DNE(11,ue,1,0,"ng-template",9),e.k0s(),e.j41(12,"kendo-grid-column",10),e.DNE(13,be,2,2,"ng-template",9)(14,ve,2,0,"ng-template",11),e.k0s(),e.j41(15,"kendo-grid-column",12),e.DNE(16,ke,1,1,"ng-template",9)(17,Fe,2,0,"ng-template",11),e.k0s(),e.j41(18,"kendo-grid-column",13),e.DNE(19,Te,1,1,"ng-template",9)(20,Ce,2,0,"ng-template",11),e.k0s(),e.j41(21,"kendo-grid-column",14),e.DNE(22,je,2,13,"ng-template",9)(23,Ie,2,0,"ng-template",11),e.k0s(),e.j41(24,"kendo-grid-column",15),e.DNE(25,De,2,13,"ng-template",9)(26,Ee,2,0,"ng-template",11),e.k0s(),e.j41(27,"kendo-grid-column",16),e.DNE(28,ye,2,2,"ng-template",9)(29,we,2,0,"ng-template",11),e.k0s(),e.nrm(30,"kendo-grid-excel",17),e.k0s()()(),e.DNE(31,qe,13,1,"blade-display",18)(32,We,10,4,"blade-display",19)}2&a&&(e.R7$(),e.Y8G("title",n._user.GetPortalString("Agreements","Agreements")),e.R7$(5),e.Y8G("data",e.bMT(8,22,n.gridData))("reorderable",!0)("resizable",!0)("pageSize",n._user.UserProfile.user.rowsPerPage)("skip",n.state.skip)("sortable",e.lJ4(24,de))("sort",n.state.sort)("pageable",e.eq3(26,_e,e.lJ4(25,pe)))("filter",n.state.filter)("rowSelected",n.isRowSelected)("selectable",e.lJ4(28,me))("filterable",!1),e.R7$(4),e.Y8G("width",35),e.R7$(8),e.Y8G("filterable",!1),e.R7$(3),e.Y8G("filterable",!1),e.R7$(3),e.Y8G("filterable",!1),e.R7$(3),e.Y8G("filterable",!1),e.R7$(3),e.Y8G("fileName",n.getDownloadName())("fetchData",n.allData),e.R7$(),e.Y8G("ngIf",n.showAgreement),e.R7$(),e.Y8G("ngIf",n.showPdfView))},dependencies:[v.C,h.Sq,h.bT,d.NXp,d._ab,d.Ioe,d.i4w,d.jqs,d.TiO,D.y,P.H,S.dg,y.j,h.Jj,h.QX,h.oe,x.eN],styles:[".epTitle[_ngcontent-%COMP%]{font-size:14px;padding:20px 0 10px;font-weight:700}"]})}}return i})();var k=l(70877),F=l(91575),U=l(65752),A=l(39408),Ze=l(73539),V=l(81127),et=l(34224),tt=l(93098),I=l(89417),O=l(1695),z=l(46196);const it=(i,s)=>s.id;function nt(i,s){if(1&i){const t=e.RV6();e.j41(0,"rbac-button",2),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.toggleEdit())}),e.k0s()}2&i&&(e.HbH("pageHeaderButton"),e.Y8G("title","Edit dashboards")("label","Edit All")("icon","fal fa-pencil")("moduleType","Account_Dashboards")("permission","Edit"))}
1function st(i,s){if(1&i){const t=e.RV6();e.j41(0,"rbac-button",2),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.toggleEdit())}),e.k0s()}2&i&&(e.HbH("pageHeaderButton Finish"),e.Y8G("title","Close editing")("label","Finish Edit")("icon","fal fa-pencil")("moduleType","Account_Dashboards")("permission","Edit"))}function at(i,s){if(1&i&&(e.j41(0,"option",13),e.EFF(1),e.k0s()),2&i){const t=s.$implicit;e.Y8G("value",t.id),e.R7$(),e.SpI(" ",t.name," ")}}function ot(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",4)(1,"div",9)(2,"label",10),e.EFF(3),e.k0s(),e.nrm(4,"br"),e.j41(5,"select",11),e.mxI("ngModelChange",function(n){e.eBV(t);const o=e.XpG();return e.DH7(o.roleFilter,n)||(o.roleFilter=n),e.Njj(n)}),e.bIt("ngModelChange",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.onRoleFilterChange())}),e.j41(6,"option",12),e.EFF(7,"All roles"),e.k0s(),e.Z7z(8,at,2,2,"option",13,it),e.j41(10,"option",14),e.EFF(11,"No role specified"),e.k0s()()()()}if(2&i){const t=e.XpG();e.R7$(3),e.JRh(t.filterLegendTitle),e.R7$(2),e.R50("ngModel",t.roleFilter),e.R7$(3),e.Dyx(t.allRoles)}}function rt(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",15)(1,"az-dashboard-viewer",16),e.bIt("onUpdate",function(n){e.eBV(t);const o=e.XpG();return e.Njj(o.updateWidgets(n))})("onSubmit",function(n){e.eBV(t);const o=e.XpG();return e.Njj(o.updateDashboard(n))})("onDelete",function(n){e.eBV(t);const o=e.XpG();return e.Njj(o.deleteDashboard(n))}),e.k0s()()}if(2&i){const t=e.XpG();e.R7$(),e.Y8G("dashboard",t.dashboard)("widgets",t.dashboardItems)("groups",t.dashboard.groups)("errors",t.errors)("moduleType","Account_Dashboards")}}function lt(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",24)(1,"dashboard-editor",25),e.bIt("onSubmit",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.submitDashboard())})("onCancel",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.closeBlade())}),e.k0s()()}if(2&i){const t=e.XpG(2);e.R7$(),e.Y8G("dashboard",t.editDashboard)("errors",t.errors)("groups",t.editDashboard.groups)("moduleType","Account_Dashboards")}}function ct(i,s){if(1&i){const t=e.RV6();e.j41(0,"blade-display",17)(1,"div",18)(2,"div",19),e.EFF(3," Dashboard "),e.k0s(),e.j41(4,"div",20)(5,"button",21),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.closeBlade())}),e.nrm(6,"span",22),e.EFF(7,"Cancel"),e.k0s()()(),e.DNE(8,lt,2,4,"div",23),e.k0s()}if(2&i){const t=e.XpG();e.R7$(8),e.Y8G("ngIf",t.editDashboard)}}let L=(()=>{class i{constructor(t,a,n,o,c,r,u,f,C,$){this._blade=t,this._browserutils=a,this._confirmService=n,this._dataService=o,this._route=c,this._router=r,this._slimLoading=u,this._user=f,this.roleService=C,this.userPermissionsService=$,this.editMode=!1,this.filterLegendTitle="Show Items Based on Role Membership",this.roleFilter="",this.allRoles=[],this.dashboardItems=[],this.emptyLinks=[{count:0,isCount:!1,text:"Create dashboard",icon:"fa fa-plus",url:"/app/account/dashboards/0",moduleType:A.nR.Account_Dashboards}],this.pageLinks=this.emptyLinks,this.categoryList=[],this.dashboards=[],this.selectedTabIndex=0,this.selectedDashboardId=0,this.currentUpdate="",this.errors=[],this.showDashboardEdit=!1,this.iconType=0,this.fillData()}toggleEdit(){return this.editMode=!this.editMode,this.roleFilter="",this.editMode&&0==this.allRoles.length&&this.fetchAllRoles(),this.fillData(),!1}fetchAllRoles(){this.allRoles=[],this.roleService.getAssignableRoles(A.nR.Account_Dashboards).subscribe({next:t=>{this.allRoles=t},error:t=>{console.error("Error loading roles:",t)}})}isRoleFilter(t){return""==this.roleFilter?"block":"^"==this.roleFilter?t.roleIds&&0!=t.roleIds.length?"none":"":t.roleIds&&t.roleIds.some(a=>a===this.roleFilter)?"":"none"}onRoleFilterChange(){this.selectDashboard(this.dashboard?this.dashboard.id:this.dashboards[0]?this.dashboards[0].id:0)}ngOnInit(){this.paramsSubscription=this._route.params.subscribe(t=>{t.id&&("0"==t.id?(history.replaceState(null,"","/app/account/dashboards"),this.openAddDashboard()):parseInt(t.id)>0?(this.selectedDashboardId=+t.id,this.selectDashboard(this.selectedDashboardId)):this.currentUpdate=t.id)})}ngOnDestroy(){this.paramsSubscription&&this.paramsSubscription.unsubscribe()}fillData(){const t=new g.Yj;this.editMode&&(t.filters="all",t.conditions="eq",t.values="true"),t.take=999,this._dataService.get(t,"/api/dashboards").subscribe(a=>{if(this.dashboards=a.data,this.dashboards&&(0==this.dashboards.length?(this.pageLinks=this.emptyLinks,this.dashboard=void 0,this.dashboardItems=[],this.selectedDashboardId=0):this.pageLinks=[],this.dashboards.length>0))if(this.selectedDashboardId>0)this.selectDashboard(this.selectedDashboardId);else if(this.currentUpdate){let n=!1;for(let o=0;o<this.dashboards.length;o++)if(this.dashboards[o].updateKey==this.currentUpdate){this.selectDashboard(this.dashboards[o].id),n=!0;break}n||this.selectDashboard(this.dashboards[0].id)}else this.selectDashboard(this.dashboards[0].id),this._router.navigate(["/app/account/dashboards",this.dashboards[0].id],{replaceUrl:!0})})}visibleDashboards(){return this.dashboards.filter(t=>!(this.editMode&&"none"==this.isRoleFilter(t)))}selectDashboard(t){if(0==this.dashboards.length)return;const a=this.visibleDashboards();this.pageLinks=a.map(o=>({count:0,isCount:!1,text:o.title,icon:o.icon,url:"/app/account/dashboards/"+o.id,moduleType:A.nR.Account_Dashboards}));let n=a.findIndex(o=>o.id==t);-1==n&&(n=0),this.dashboard=a[n],this.dashboardItems=this.dashboard?.widgets??[],this.selectedTabIndex=this.dashboard?n:-1,this.dashboard&&(this.selectedDashboardId=this.dashboard.id)}deleteDashboard(t){return this._confirmService.activate('Are you sure you want to delete "'+t.title+'"?').then(a=>{a==U.x.OK&&(this._slimLoading.start(),this._dataService.delete(t.id,"/api/dashboards").subscribe(()=>{this._slimLoading.complete(),this.fillData(),this._router.navigate(["/app/account/dashboards"]),this._browserutils.openToast("Dashboard successfully deleted.","Done!",b.R.success)},n=>{this.errors=this._dataService.processErrors(n),this._browserutils.pushErrorToast(this.errors[0])}))}),!1}openAddDashboard(){return this.editDashboard={id:0,title:"New Dashboard",widgets:[],groups:[{groupName:"Everyone",id:0}],order:0,description:"",icon:"far fa-tachometer-alt-slow",isSubscribed:!1,templatePackId:0,templatePackName:"",canBeEdited:!1,canBeDeleted:!1,isPartnerManaged:!1},this.showDashboardEdit=!0,this._blade.showMe(),!1}closeBlade(){return this.showDashboardEdit=!1,this._blade.closeMe(),!1}updateWidgets(t){return this._dataService.post({id:this.dashboard.id,widgets:t},"/api/dashboards/widgets").subscribe(()=>{this._browserutils.openToast("Dashboard updated.","Done!",b.R.success)},a=>{this._dataService.processErrors(a)}),!1}submitDashboard(){return this.editDashboard&&(this._slimLoading.start(),this._dataService.post(this.editDashboard,"/api/dashboards").subscribe(t=>{this.fillData(),this._slimLoading.complete(),this.closeBlade(),0==this.editDashboard.id&&(this._router.navigate(["/app/account/dashboards/",t.data.id]),this._browserutils.openToast("Dashboard added.","Done!",b.R.success))},t=>{this._dataService.processErrors(t)})),!1}updateDashboard(t){return this.dashboard&&(this._slimLoading.start(),this._dataService.post(t,"/api/dashboards").subscribe(a=>{this._slimLoading.complete(),this.closeBlade(),this._browserutils.openToast("Dashboard updated. Reloading page.","Done!",b.R.success),location.href="/app/account/dashboards/"+a.data.id.toString()},a=>{this._dataService.processErrors(a)})),!1}iconChange(t){this.iconType=t.iconType}static{this.\u0275fac=function(a){return new(a||i)(e.rXU(v.C),e.rXU(b.b),e.rXU(U.G),e.rXU(g.jK),e.rXU(T.nX),e.rXU(T.Ix),e.rXU(E.KO),e.rXU(j.D),e.rXU(Ze.W),e.rXU(V.N))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["az-usage"]],decls:10,vars:15,consts:[[1,"d-flex","flex-column","h-100","dashboardsPageHeader"],[3,"title","links","linkSelected"],[3,"click","title","label","icon","moduleType","permission"],[3,"title","label","class","icon","moduleType","permission"],[1,"row"],[1,"row","h-100"],[1,"col","h-100","overflow-auto","py-3"],["style","height: calc(100vh - 160px);",4,"ngIf"],["class","w-45-responsive",4,"ngIf"],[1,"editAllContentBox"],["for","roleFilter"],["id","roleFilter","name","roleFilter",1,"form-select",2,"width","300px",3,"ngModelChange","ngModel"],["value",""],["notranslate","",3,"value"],["value","^"],[2,"height","calc(100vh - 160px)"],[3,"onUpdate","onSubmit","onDelete","dashboard","widgets","groups","errors","moduleType"],[1,"w-45-responsive"],[1,"bladeHeader","clearfix"],[1,"bladeTitle"],[1,"bladeCommands"],[1,"pageHeaderButton",3,"click"],[1,"fal","fa-times"],["class","bladeBody",4,"ngIf"],[1,"bladeBody"],[3,"onSubmit","onCancel","dashboard","errors","groups","moduleType"]],template:function(a,n){1&a&&(e.j41(0,"div",0)(1,"page-header",1)(2,"rbac-button",2),e.bIt("click",function(){return n.openAddDashboard()}),e.k0s(),e.DNE(3,nt,1,7,"rbac-button",3)(4,st,1,7,"rbac-button",3),e.k0s(),e.DNE(5,ot,12,2,"div",4),e.j41(6,"div",5)(7,"div",6),e.DNE(8,rt,2,5,"div",7),e.k0s()()(),e.DNE(9,ct,9,1,"blade-display",8)),2&a&&(e.R7$(),e.Y8G("title",n._user.GetPortalString("Dashboards","Dashboards"))("links",n.pageLinks)("linkSelected",n.selectedTabIndex),e.R7$(),e.HbH("pageHeaderButton"),e.Y8G("title","Add dashboard")("label","Add Dashboard")("icon","fa fa-plus")("moduleType","Account_Dashboards")("permission","Edit"),e.R7$(),e.vxM(n.editMode?-1:3),e.R7$(),e.vxM(n.editMode?4:-1),e.R7$(),e.vxM(n.editMode&&null!=n.allRoles&&n.allRoles.length?5:-1),e.R7$(3),e.Y8G("ngIf",n.dashboard&&n.dashboardItems),e.R7$(),e.Y8G("ngIf",n.showDashboardEdit))},dependencies:[v.C,h.bT,et.b,tt._,I.xH,I.y7,I.wz,I.BC,I.vS,D.y,O.S,z.C3],styles:[".dashboardsPageHeader[_ngcontent-%COMP%]     .pageHeader{height:auto!important;min-height:80px}"]})}}return i})();var dt=l(68720),J=l(51558),pt=l(54572),_t=l(41680);const mt=()=>({allowUnsort:!1,mode:"single"}),ft=()=>[10,20,50,100],gt=i=>({pageSizes:i}),ht=()=>({mode:"single"});function ut(i,s){1&i&&(e.j41(0,"div"),e.EFF(1," Searching... "),e.k0s())}function bt(i,s){1&i&&(e.j41(0,"div"),e.EFF(1," No records available. "),e.k0s())}
1function vt(i,s){if(1&i&&e.DNE(0,ut,2,0,"div",25)(1,bt,2,0,"div",25),2&i){const t=e.XpG();e.Y8G("ngIf",t.dataService.isBusy),e.R7$(),e.Y8G("ngIf",!t.dataService.isBusy)}}function kt(i,s){1&i&&e.nrm(0,"img",29)}function Ft(i,s){1&i&&e.nrm(0,"img",30)}function Tt(i,s){1&i&&e.nrm(0,"img",31)}function Ct(i,s){if(1&i&&e.DNE(0,kt,1,0,"img",26)(1,Ft,1,0,"img",27)(2,Tt,1,0,"img",28),2&i){const t=s.$implicit;e.Y8G("ngIf",-1==t.feedbackRating),e.R7$(),e.Y8G("ngIf",0==t.feedbackRating),e.R7$(),e.Y8G("ngIf",1==t.feedbackRating)}}function jt(i,s){if(1&i){const t=e.RV6();e.j41(0,"a",32),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.toggleFilter())}),e.nrm(1,"span",33),e.k0s()}}function It(i,s){if(1&i&&(e.j41(0,"span",34),e.EFF(1),e.nI1(2,"localizedShort"),e.k0s()),2&i){const t=s.$implicit;e.R7$(),e.SpI(" ",e.bMT(2,1,t.date)," ")}}function Dt(i,s){1&i&&(e.j41(0,"span",35),e.EFF(1,"Date"),e.k0s())}function Et(i,s){if(1&i&&(e.j41(0,"span",38),e.EFF(1),e.k0s()),2&i){const t=e.XpG().$implicit;e.R7$(),e.Lme(" ",t.userFname," ",t.userLname," ")}}function Rt(i,s){if(1&i&&(e.j41(0,"span",38),e.EFF(1),e.k0s()),2&i){const t=e.XpG().$implicit;e.R7$(),e.SpI(" ",t.userEmail," ")}}function St(i,s){1&i&&e.nrm(0,"span",39)}function yt(i,s){if(1&i&&e.DNE(0,Et,2,2,"span",36)(1,Rt,2,1,"span",36)(2,St,1,0,"span",37),2&i){const t=s.$implicit;e.Y8G("ngIf",t.userFname&&t.userLname),e.R7$(),e.Y8G("ngIf",!t.userFname||!t.userLname),e.R7$(),e.Y8G("ngIf",t.feedbackWantsFollowUp)}}function wt(i,s){1&i&&(e.j41(0,"span",40),e.EFF(1,"User"),e.k0s())}function xt(i,s){if(1&i&&(e.j41(0,"span",38)(1,"a",41),e.EFF(2),e.k0s()()),2&i){const t=e.XpG().$implicit;e.R7$(),e.Mz_("routerLink","/app/service/status/",t.ticketPsaId,""),e.R7$(),e.SpI(" ",t.ticketString," ")}}function Gt(i,s){if(1&i&&e.DNE(0,xt,3,3,"span",36),2&i){const t=s.$implicit;e.Y8G("ngIf",t.ticketString&&"0"!=t.ticketString)}}function Nt(i,s){1&i&&(e.j41(0,"span",42),e.EFF(1,"Ticket ID"),e.k0s())}function $t(i,s){if(1&i&&e.nrm(0,"kendo-grid-numeric-filter-cell",43),2&i){const t=s.$implicit;e.Y8G("column",s.column)("filter",t)("spinners",!1)}}function Pt(i,s){1&i&&(e.j41(0,"span",44),e.EFF(1,"Ticket Subject"),e.k0s())}function Ut(i,s){1&i&&(e.j41(0,"span",45),e.EFF(1,"Comment"),e.k0s())}function At(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",46)(1,"chart-viewer",47),e.bIt("onCancel",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.closeTab())}),e.k0s()()}if(2&i){const t=e.XpG();e.R7$(),e.Y8G("chartApi","/api/feedback/chart")("chartDQO",t.chartDQO)}}function Bt(i,s){1&i&&e.nrm(0,"img",29)}function Xt(i,s){1&i&&e.nrm(0,"img",30)}function Yt(i,s){1&i&&e.nrm(0,"img",31)}function Mt(i,s){if(1&i&&(e.j41(0,"div",58)(1,"div",59),e.EFF(2," Comment "),e.k0s(),e.j41(3,"div",64),e.EFF(4),e.k0s()()),2&i){const t=e.XpG(3);e.R7$(4),e.SpI(" ",t.feedback.feedbackComment," ")}}function Vt(i,s){1&i&&(e.j41(0,"div",58)(1,"div",59),e.EFF(2," Follow-up "),e.k0s(),e.j41(3,"div",60)(4,"span",65),e.EFF(5,"Wants follow-up on this submission"),e.k0s()()())}function Ot(i,s){if(1&i&&(e.j41(0,"div",58)(1,"div",59),e.EFF(2," Date "),e.k0s(),e.j41(3,"div",60),e.EFF(4),e.nI1(5,"localizedShort"),e.k0s()()),2&i){const t=e.XpG(3);e.R7$(4),e.SpI(" ",e.bMT(5,1,t.feedback.date)," ")}}function zt(i,s){if(1&i&&(e.j41(0,"span")(1,"a",66),e.EFF(2),e.k0s()()),2&i){const t=e.XpG(4);e.R7$(),e.Mz_("href","mailto:",t.feedback.userEmail,"",e.B4B),e.R7$(),e.SpI(" ",t.feedback.userEmail," ")}}function Lt(i,s){if(1&i&&(e.j41(0,"div",58)(1,"div",59),e.EFF(2," User "),e.k0s(),e.j41(3,"div",64),e.EFF(4),e.DNE(5,zt,3,3,"span",25),e.k0s()()),2&i){const t=e.XpG(3);e.R7$(4),e.Lme(" ",t.feedback.userFname," ",t.feedback.userLname," "),e.R7$(),e.Y8G("ngIf",t.feedback.userEmail)}}function Jt(i,s){if(1&i&&(e.j41(0,"div",58)(1,"div",59),e.EFF(2," Phone "),e.k0s(),e.j41(3,"div",64),e.EFF(4),e.k0s()()),2&i){const t=e.XpG(3);e.R7$(4),e.SpI(" ",t.feedback.phone," ")}}function Ht(i,s){if(1&i&&(e.j41(0,"div",58)(1,"div",59),e.EFF(2," Company "),e.k0s(),e.j41(3,"div",64),e.EFF(4),e.k0s()()),2&i){const t=e.XpG(3);e.R7$(4),e.SpI(" ",t.feedback.companyName," ")}}
1function Qt(i,s){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(4);e.R7$(),e.SpI(" #",t.feedback.ticketString," ")}}function Kt(i,s){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(4);e.R7$(),e.SpI(" - ",t.feedback.ticketSubject," ")}}function qt(i,s){if(1&i&&(e.j41(0,"div",58)(1,"div",59),e.EFF(2," Ticket "),e.k0s(),e.j41(3,"div",64),e.DNE(4,Qt,2,1,"span",25)(5,Kt,2,1,"span",25),e.k0s()()),2&i){const t=e.XpG(3);e.R7$(4),e.Y8G("ngIf",t.feedback.ticketString&&"0"!=t.feedback.ticketString),e.R7$(),e.Y8G("ngIf",t.feedback.ticketSubject)}}function Wt(i,s){if(1&i&&(e.j41(0,"div",58)(1,"div",59),e.EFF(2," Agent "),e.k0s(),e.j41(3,"div",64),e.EFF(4),e.k0s()()),2&i){const t=e.XpG(3);e.R7$(4),e.Lme(" ",t.feedback.agentFname," ",t.feedback.agentLname," ")}}function Zt(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",55)(1,"h3"),e.EFF(2," Feedback Received "),e.k0s(),e.j41(3,"div",56)(4,"div",57),e.EFF(5," Rating "),e.k0s(),e.j41(6,"div",58)(7,"div",59),e.EFF(8," Rating "),e.k0s(),e.j41(9,"div",60),e.DNE(10,Bt,1,0,"img",26)(11,Xt,1,0,"img",27)(12,Yt,1,0,"img",28),e.k0s()(),e.DNE(13,Mt,5,1,"div",61)(14,Vt,6,0,"div",61),e.k0s(),e.j41(15,"div",56)(16,"div",57),e.EFF(17," Details "),e.k0s(),e.DNE(18,Ot,6,3,"div",61)(19,Lt,6,3,"div",61)(20,Jt,5,1,"div",61)(21,Ht,5,1,"div",61)(22,qt,6,2,"div",61)(23,Wt,5,2,"div",61),e.j41(24,"div",58)(25,"div",59),e.EFF(26," Source "),e.k0s(),e.j41(27,"div",60),e.EFF(28),e.nI1(29,"enumValue"),e.k0s()()(),e.j41(30,"div",62)(31,"button",63),e.bIt("click",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.closeBlade())}),e.EFF(32," Close "),e.k0s()()()}if(2&i){const t=e.XpG(2);e.R7$(10),e.Y8G("ngIf",-1==t.feedback.feedbackRating),e.R7$(),e.Y8G("ngIf",0==t.feedback.feedbackRating),e.R7$(),e.Y8G("ngIf",1==t.feedback.feedbackRating),e.R7$(),e.Y8G("ngIf",t.feedback.feedbackComment),e.R7$(),e.Y8G("ngIf",t.feedback.feedbackWantsFollowUp),e.R7$(4),e.Y8G("ngIf",t.feedback.date),e.R7$(),e.Y8G("ngIf",t.feedback.userFname||t.feedback.userEmail),e.R7$(),e.Y8G("ngIf",t.feedback.phone),e.R7$(),e.Y8G("ngIf",t.feedback.companyName),e.R7$(),e.Y8G("ngIf",t.feedback.ticketString||t.feedback.ticketSubject),e.R7$(),e.Y8G("ngIf",t.feedback.agentFname||t.feedback.agentLname),e.R7$(5),e.SpI(" ",e.i5U(29,12,t.feedback.source,t.feedbackSources)," ")}}function ei(i,s){if(1&i){const t=e.RV6();e.j41(0,"blade-display",48),e.bIt("onEscape",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.closeBlade())}),e.j41(1,"div",49)(2,"div",50),e.EFF(3," Feedback "),e.k0s(),e.j41(4,"div",51)(5,"button",52),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.closeBlade())}),e.nrm(6,"span",53),e.EFF(7,"Close "),e.k0s()()(),e.DNE(8,Zt,33,15,"div",54),e.k0s()}if(2&i){const t=e.XpG();e.R7$(8),e.Y8G("ngIf",t.feedback)}}let H=(()=>{class i{constructor(t,a,n,o,c,r,u,f,C,$){this._blade=t,this._bladeExpanding=a,this._browserutils=n,this._confirmService=o,this._gridService=c,this._route=r,this._router=u,this._slimLoading=f,this.dataService=C,this.userService=$,this.emailCode="",this.errors=[],this.feedbackSources=dt.P,this.isFilter=!0,this.showBlade=!1,this.showDetail
1s=!1,this.showEdit=!1,this.showingTab=0,this.sort=[{field:"date",dir:"desc"}],this.state={skip:0,take:this.userService.UserProfile.user.rowsPerPage,sort:[{field:"date",dir:"desc"}]},this.allData=()=>this._gridService.queryAll(this._gridService.convertFrom({skip:0,take:99999},[{field:"date",dir:"desc"}],null)),this.isRowSelected=le=>!1,this._gridService.setBaseURL("/api/feedback/company"),this.gridData=c,this.chartDQO=new g.Yj,this.chartDQO.filters="companyId",this.chartDQO.conditions="eq",this.chartDQO.values=$.UserProfile.company.companyId.toString(),this.fillData()}ngOnInit(){this.paramsSubscription=this._route.params.subscribe({next:t=>{t.id&&this.openBlade(+t.id)}})}ngOnDestroy(){this.paramsSubscription&&this.paramsSubscription.unsubscribe()}fillData(){this._gridService.query(this._gridService.convertFrom(this.state,this.sort,this.filter))}dataStateChange(t){this.userService.UserProfile.user.rowsPerPage!=t.take&&this.dataService.updateRowsPerpage(t.take),this.userService.UserProfile.user.rowsPerPage=t.take,this.state=t,this.filter=t.filter,JSON.stringify(t.sort)!=JSON.stringify(this.sort)&&(this.state.skip=0),this.sort=t.sort,this._gridService.query(this._gridService.convertFrom(this.state,this.sort,this.filter))}getDownloadName(){return`Feedback-${this.userService.UserProfile.company.safeName}-${this._browserutils.currentDate()}.xlsx`}exportToExcel(){this.errors=[];const t=new g.Yj;this.dataService.downloadRequestFile(t,"/api/feedback/download/company").subscribe({next:a=>{this.dataService.downloadContent(a,this.getDownloadName()),this._browserutils.pushDownloadToast(this.getDownloadName())},error:a=>{this._browserutils.pushErrorToast("There was a problem with the request.")}})}openBlade(t){const a=new g.Yj;return a.filters="id^companyId",a.conditions="eq^eq",a.values=`${t.toString()}^${this.userService.UserProfile.company.companyId.toString()}`,this._slimLoading.start(),this.dataService.get(a,"/api/feedback/company").subscribe({next:n=>{n.data[0]&&(this._slimLoading.complete(),this.feedback=n.data[0],this.showBlade=!0,history.replaceState(null,"",`/app/account/feedback/${t.toString()}`),this._blade.showMe())},error:n=>{this.errors=this.dataService.processErrors(n)}}),!1}closeBlade(){return this.showBlade=!1,this.showEdit=!1,this.showDetail
1s=!1,this._blade.closeMe(),history.replaceState(null,"","/app/account/feedback"),!1}editFeedback(t){return this.showBlade=!1,this.showEdit=!0,this._blade.showMe(),!1}gridUserSelectionChange(t){this.openBlade(t.selectedRows[0].dataItem.id)}showTab(t){this._bladeExpanding.showWidth(1==t?"450":"60vw"),this._bladeExpanding.showMe(),this.showingTab=t}toggleFilter(){return this.isFilter=!this.isFilter,!1}closeTab(){this._bladeExpanding.closeMe(),this.showingTab=0}static{this.\u0275fac=function(a){return new(a||i)(e.rXU(v.C),e.rXU(J.K),e.rXU(b.b),e.rXU(U.G),e.rXU(w.M),e.rXU(T.nX),e.rXU(T.Ix),e.rXU(E.KO),e.rXU(g.jK),e.rXU(j.D))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["az-usage"]],decls:36,vars:24,consts:[["grid",""],[1,"d-flex","flex-column","h-100"],[3,"title"],["title","Download all",1,"pageHeaderButton",3,"click"],[1,"fmd","fm-ExcelDocument"],[1,"row","h-100","overflow-hidden"],[1,"col","h-100","overflow-auto"],[1,"h-100",3,"selectionChange","dataStateChange","data","reorderable","resizable","pageSize","skip","sortable","sort","pageable","filter","rowSelected","selectable","filterable"],["kendoGridNoRecordsTemplate",""],[1,"gridGraphic",3,"width"],["kendoGridCellTemplate",""],["kendoGridHeaderTemplate",""],["field","date","title","Date","filter","date"],["field","userLname","title","User","media","md"],["field","ticketPsaId","title","Ticket ID","filter","numeric","format","{#:n}","media","lg"],["kendoGridFilterCellTemplate",""],["field","ticketSubject","title","Ticket Subject","media","lg"],["field","feedbackComment","title","Comment","media","xl"],[1,"col-auto","position-relative",2,"width","40px"],[3,"onEscape","isLinks"],["type","button",1,"ebTab",3,"click"],[1,"ebTabTitle"],["aria-hidden","true",1,"fal","fa-chart-bar"],["class","h-100 overflow-auto",4,"ngIf"],["class","w-45-responsive",3,"onEscape",4,"ngIf"],[4,"ngIf"],["src","https://azurative.azureedge.net/images/rating_negative.svg","class","ratingIcon",4,"ngIf"],["src","https://azurative.azureedge.net/images/rating_neutral.svg","class","ratingIcon",4,"ngIf"],["src","https://azurative.azureedge.net/images/rating_positive.svg","class","ratingIcon",4,"ngIf"],["src","https://azurative.azureedge.net/images/rating_negative.svg",1,"ratingIcon"],["src","https://azurative.azureedge.net/images/rating_neutral.svg",1,"ratingIcon"],["src","https://azurative.azureedge.net/images/rating_positive.svg",1,"ratingIcon"],["title","Toggle search","href","",2,"font-size","10px",3,"click"],[1,"fa","fa-search"],[1,"fw-semibold"],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","Date"],["notranslate","",4,"ngIf"],["style","padding-left: 10px;","class","alertText boldText fa fa-exclamation-circle",4,"ngIf"],["notranslate",""],[1,"alertText","boldText","fa","fa-exclamation-circle",2,"padding-left","10px"],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","User last name"],["title","View ticket",3,"routerLink"],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","Ticket ID"],[3,"column","filter","spinners"],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","Ticket subject"],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","Feedback comment"],[1,"h-100","overflow-auto"],[3,"onCancel","chartApi","chartDQO"],[1,"w-45-responsive",3,"onEscape"],[1,"bladeHeader","clearfix"],[1,"bladeTitle"],[1,"bladeCommands"],["title","Close",1,"pageHeaderButton",3,"click"],[1,"fal","fa-times"],["class","bladeBody",4,"ngIf"],[1,"bladeBody"],[1,"bladeDetailsTable"],[1,"bladeDetailsTitle"],[1,"row"],[1,"col-4"],[1,"col-8"],["class","row",4,"ngIf"],[1,"bladeButtons","button-group"],[1,"btn","btn-secondary",3,"click"],["notranslate","",1,"col-8"],[1,"alertText","boldText"],[3,"href"]],template:function(a,n){if(1&a){const o=e.RV6();e.j41(0,"div",1)(1,"page-header",2)(2,"button",3),e.bIt("click",function(){return e.eBV(o),e.Njj(n.exportToExcel())}),e.nrm(3,"span",4),e.EFF(4,"Download "),e.k0s()(),e.j41(5,"div",5)(6,"div",6)(7,"kendo-grid",7,0),e.nI1(9,"async"),e.bIt("selectionChange",function(r){return e.eBV(o),e.Njj(n.gridUserSelectionChange(r))})("dataStateChange",function(r){return e.eBV(o),e.Njj(n.dataStateChange(r))}
1),e.DNE(10,vt,2,2,"ng-template",8),e.j41(11,"kendo-grid-column",9),e.DNE(12,Ct,3,3,"ng-template",10)(13,jt,2,0,"ng-template",11),e.k0s(),e.j41(14,"kendo-grid-column",12),e.DNE(15,It,3,3,"ng-template",10)(16,Dt,2,0,"ng-template",11),e.k0s(),e.j41(17,"kendo-grid-column",13),e.DNE(18,yt,3,3,"ng-template",10)(19,wt,2,0,"ng-template",11),e.k0s(),e.j41(20,"kendo-grid-column",14),e.DNE(21,Gt,1,1,"ng-template",10)(22,Nt,2,0,"ng-template",11)(23,$t,1,3,"ng-template",15),e.k0s(),e.j41(24,"kendo-grid-column",16),e.DNE(25,Pt,2,0,"ng-template",11),e.k0s(),e.j41(26,"kendo-grid-column",17),e.DNE(27,Ut,2,0,"ng-template",11),e.k0s()()(),e.j41(28,"div",18)(29,"bladeExpanding-display",19),e.bIt("onEscape",function(){return e.eBV(o),e.Njj(n.closeTab())}),e.j41(30,"button",20),e.bIt("click",function(){return e.eBV(o),e.Njj(n.showTab(2))}),e.j41(31,"span",21),e.EFF(32,"Charts"),e.k0s(),e.nrm(33,"span",22),e.k0s(),e.DNE(34,At,2,2,"div",23),e.k0s()()()(),e.DNE(35,ei,9,1,"blade-display",24)}2&a&&(e.R7$(),e.Y8G("title",n.userService.GetPortalString("Feedback","Feedback")),e.R7$(6),e.Y8G("data",e.bMT(9,17,n.gridData))("reorderable",!0)("resizable",!0)("pageSize",n.userService.UserProfile.user.rowsPerPage)("skip",n.state.skip)("sortable",e.lJ4(19,mt))("sort",n.state.sort)("pageable",e.eq3(21,gt,e.lJ4(20,ft)))("filter",n.state.filter)("rowSelected",n.isRowSelected)("selectable",e.lJ4(23,ht))("filterable",n.isFilter),e.R7$(4),e.Y8G("width",40),e.R7$(18),e.Y8G("isLinks",!1),e.R7$(5),e.Y8G("ngIf",2==n.showingTab),e.R7$(),e.Y8G("ngIf",n.showBlade))},dependencies:[T.Wk,v.C,pt.s,h.bT,J.K,d._ab,d.Ioe,d.i4w,d.jqs,d.TiO,d.YCj,d.LrU,D.y,S.dg,y.j,h.Jj,_t.hq,x.sT],styles:[".bladeDetailsTable[_ngcontent-%COMP%]   .bladeDetailsTitle[_ngcontent-%COMP%]{font-size:larger;font-weight:700;padding:20px 0 10px}.bladeDetailsTable[_ngcontent-%COMP%]   .row[_ngcontent-%COMP%]{border-bottom:solid 1px var(--blade-border-color);padding-bottom:5px;margin-bottom:5px}.ratingIcon[_ngcontent-%COMP%]{height:20px;width:20px;margin-top:-2px}.ebChartTitle[_ngcontent-%COMP%]{width:100%;text-align:center;font-size:14pt}.ebTitleText[_ngcontent-%COMP%]{display:inline-block}.ebSelect[_ngcontent-%COMP%]{margin-left:20px;margin-top:6px;display:inline-block}.ebSelect[_ngcontent-%COMP%]   select[_ngcontent-%COMP%]{border:none;font-size:14px;padding-bottom:1px;border-bottom:solid 1px #ccc}.ebSelect[_ngcontent-%COMP%]   select[_ngcontent-%COMP%] > option[_ngcontent-%COMP%]{background:#f7f9fb}"]})}}return i})();var Q=l(68430),ti=l(84412),m=l(23155),B=l(93512);const ii=i=>({"k-hover-row":i}),K=()=>({allowUnsort:!1,mode:"single"}),q=()=>[10,20,50,100],W=i=>({pageSizes:i}),Z=()=>({mode:"single"}),G=(i,s,t)=>[i,s,"symbol-narrow","1.2-2",t];function ni(i,s){if(1&i){const t=e.RV6();e.j41(0,"button",26),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.paymentUrl(n.isConnectBooster,n.isWisePay,n.isFlexpoint))}),e.nrm(1,"span",27),e.EFF(2,"Open Payment Portal "),e.k0s()}}function si(i,s){1&i&&(e.j41(0,"div"),e.EFF(1," Searching... "),e.k0s())}function ai(i,s){1&i&&(e.j41(0,"div"),e.EFF(1," No records available. "),e.k0s())}function oi(i,s){if(1&i&&e.DNE(0,si,2,0,"div",28)(1,ai,2,0,"div",28),2&i){const t=e.XpG();e.Y8G("ngIf",t._dataService.isBusy),e.R7$(),e.Y8G("ngIf",!t._dataService.isBusy)}}function ri(i,s){1&i&&e.nrm(0,"span",29)}function li(i,s){if(1&i){const t=e.RV6();e.j41(0,"a",30),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.toggleFilter())}),e.nrm(1,"span",31),e.k0s()}}function ci(i,s){if(1&i&&(e.j41(0,"span",32),e.EFF(1),e.k0s()),2&i){const t=s.$implicit;e.R7$(),e.JRh(t.invoiceNumber)}}function di(i,s){1&i&&(e.j41(0,"span",33),e.EFF(1,"Number"),e.k0s())}function pi(i,s){if(1&i&&(e.j41(0,"span",34),e.EFF(1),e.nI1(2,"localizedShortDateZ"),e.k0s()),2&i){const t=s.$implicit;e.R7$(),e.JRh(e.bMT(2,1,t.date))}}function _i(i,s){1&i&&(e.j41(0,"span",35),e.EFF(1,"Date"),e.k0s())}function mi(i,s){if(1&i&&(e.j41(0,"span",34),e.EFF(1),e.nI1(2,"currency"),e.k0s()),2&i){const t=s.$implicit,a=e.XpG();e.R7$(),e.JRh(e.iJd(2,1,e.sMw(7,G,t.total,a._user.UserProfile.partner.currencyCode,a._user.UserProfile.partner.locale)))}}function fi(i,s){1&i&&(e.j41(0,"span",36),e.EFF(1,"Total"),e.k0s())}function gi(i,s){1&i&&(e.j41(0,"span",41),e.EFF(1,"Paid"),e.k0s())}function hi(i,s){if(1&i&&(e.j41(0,"span",42),e.EFF(1),e.nI1(2,"currency"),e.k0s()),2&i){const t=e.XpG().$implicit,a=e.XpG(2);e.R7$(),e.JRh(e.iJd(2,1,e.sMw(7,G,t.balance,a._user.UserProfile.partner.currencyCode,a._user.UserProfile.partner.locale)))}}function ui(i,s){if(1&i&&(e.j41(0,"span",43),e.EFF(1),e.nI1(2,"currency"),e.k0s()),2&i){const t=e.XpG().$implicit,a=e.XpG(2);e.R7$(),e.JRh(e.iJd(2,1,e.sMw(7,G,t.balance,a._user.UserProfile.partner.currencyCode,a._user.UserProfile.partner.locale)))}}function bi(i,s){if(1&i&&e.DNE(0,gi,2,0,"span",38)(1,hi,3,11,"span",39)(2,ui,3,11,"span",40),2&i){const t=s.$implicit;e.Y8G("ngIf",0==t.balance),e.R7$(),e.Y8G("ngIf",t.balance>0),e.R7$(),e.Y8G("ngIf",t.balance<0)}}function vi(i,s){1&i&&(e.j41(0,"span",44),e.EFF(1,"Balance"),e.k0s())}
1function ki(i,s){1&i&&(e.j41(0,"kendo-grid-column",37),e.DNE(1,bi,3,3,"ng-template",11)(2,vi,2,0,"ng-template",12),e.k0s()),2&i&&e.Y8G("filterable",!1)}function Fi(i,s){if(1&i&&(e.j41(0,"span",34),e.EFF(1),e.k0s()),2&i){const t=s.$implicit;e.R7$(),e.JRh(t.status)}}function Ti(i,s){1&i&&(e.j41(0,"span",45),e.EFF(1,"Status"),e.k0s())}function Ci(i,s){if(1&i&&(e.j41(0,"span",34),e.EFF(1),e.k0s()),2&i){const t=s.$implicit;e.R7$(),e.JRh(t.type)}}function ji(i,s){1&i&&(e.j41(0,"span",46),e.EFF(1,"Type"),e.k0s())}function Ii(i,s){if(1&i&&(e.j41(0,"span",34),e.EFF(1),e.k0s()),2&i){const t=s.$implicit;e.R7$(),e.JRh(t.reference)}}function Di(i,s){1&i&&(e.j41(0,"span",47),e.EFF(1,"Reference"),e.k0s())}function Ei(i,s){if(1&i&&(e.j41(0,"span",34),e.EFF(1),e.k0s()),2&i){const t=s.$implicit;e.R7$(),e.JRh(t.po)}}function Ri(i,s){1&i&&(e.j41(0,"span",48),e.EFF(1,"PO#"),e.k0s())}function Si(i,s){1&i&&(e.j41(0,"div"),e.EFF(1," Searching... "),e.k0s())}function yi(i,s){1&i&&(e.j41(0,"div"),e.EFF(1," No records available. "),e.k0s())}function wi(i,s){if(1&i&&e.DNE(0,Si,2,0,"div",28)(1,yi,2,0,"div",28),2&i){const t=e.XpG();e.Y8G("ngIf",t._dataService.isBusy),e.R7$(),e.Y8G("ngIf",!t._dataService.isBusy)}}function xi(i,s){1&i&&e.nrm(0,"span",29)}function Gi(i,s){if(1&i){const t=e.RV6();e.j41(0,"a",30),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.toggleFilter())}),e.nrm(1,"span",31),e.k0s()}}function Ni(i,s){if(1&i&&(e.j41(0,"span",32),e.EFF(1),e.k0s()),2&i){const t=s.$implicit;e.R7$(),e.JRh(t.invoiceNumber)}}function $i(i,s){1&i&&(e.j41(0,"span",33),e.EFF(1,"Number"),e.k0s())}function Pi(i,s){if(1&i&&(e.j41(0,"span",34),e.EFF(1),e.nI1(2,"localizedShortDateZ"),e.k0s()),2&i){const t=s.$implicit;e.R7$(),e.JRh(e.bMT(2,1,t.date))}}function Ui(i,s){1&i&&(e.j41(0,"span",35),e.EFF(1,"Date"),e.k0s())}function Ai(i,s){if(1&i&&(e.j41(0,"span",34),e.EFF(1),e.nI1(2,"currency"),e.k0s()),2&i){const t=s.$implicit,a=e.XpG();e.R7$(),e.JRh(e.iJd(2,1,e.sMw(7,G,t.total,a._user.UserProfile.partner.currencyCode,a._user.UserProfile.partner.locale)))}}function Bi(i,s){1&i&&(e.j41(0,"span",36),e.EFF(1,"Total"),e.k0s())}function Xi(i,s){if(1&i&&(e.j41(0,"span",34),e.EFF(1),e.k0s()),2&i){const t=s.$implicit;e.R7$(),e.JRh(t.reference)}}function Yi(i,s){1&i&&(e.j41(0,"span",47),e.EFF(1,"Reference"),e.k0s())}function Mi(i,s){if(1&i&&(e.j41(0,"span",34),e.EFF(1),e.k0s()),2&i){const t=s.$implicit;e.R7$(),e.JRh(t.status)}}function Vi(i,s){1&i&&(e.j41(0,"span",45),e.EFF(1,"Status"),e.k0s())}function Oi(i,s){if(1&i){const t=e.RV6();e.j41(0,"blade-display",49),e.bIt("onEscape",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.closeInvoice())}),e.j41(1,"div",50)(2,"div",51),e.EFF(3," Invoice "),e.k0s(),e.j41(4,"div",52)(5,"button",53),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.closeInvoice())}),e.nrm(6,"span",54),e.EFF(7,"Close "),e.k0s()()(),e.j41(8,"div",55)(9,"pdfviewer",56),e.bIt("onClose",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.closeInvoice())}),e.k0s()()()}if(2&i){const t=e.XpG();e.R7$(9),e.Y8G("src",t.pdfSrc)("name",t.pdfName)("auth",!0)}}let zi=(()=>{class i{constructor(t,a,n,o,c,r,u){this._browserutils=t,this._gridService=a,this._blade=n,this._slimLoading=o,this._dataService=c,this._user=r,this.mixpanelService=u,this.isConnectBooster=!1,this.isWisePay=!1,this.isFlexpoint=!1,this.haloAllData=[],this.haloLoaded=!1,this.haloData$=new ti.t({data:[],total:0}),this.state={skip:0,take:this._user.UserProfile.user.rowsPerPage,sort:[{field:"date",dir:"desc"}]},this.sort=[{field:"date",dir:"desc"}],this.allData=()=>this._gridService.queryAll(this._gridService.convertFrom({skip:0,take:999},[{field:"date",dir:"desc"}],null)),this.showInvoice=!1,this.pdfName="",this.pdfSrc="",this.errors=[],this.isRowSelected=f=>!1,this.startPickerDate=new Date,this.endPickerDate=new Date,this.isFilter=!0,(r.UserProfile.partner.psaType==m.r_.ConnectWise||r.UserProfile.partner.psaType==m.r_.Kaseya_BMS||r.UserProfile.partner.psaType==m.r_.Halo)&&(this._gridService.setBaseURL("/api/invoices"),this.gridData=r.UserProfile.partner.psaType==m.r_.Halo?this.haloData$:a
1),this.allAutotaskData=this.allAutotaskData.bind(this),this.profileData=c,this.errors.length=0,this._dataService.get(new g.Yj,"/api/partner/payments").subscribe(f=>{this.isConnectBooster=f.data.isConnectBooster,this.isWisePay=f.data.isWisePay,this.isFlexpoint=f.data.isFlexpoint},f=>{this.errors=this._dataService.processErrors(f)}),this.fillData(),(this._user.UserProfile.partner.psaType==m.r_.ConnectWise||this._user.UserProfile.partner.psaType==m.r_.Halo)&&this._dataService.get(new g.Yj,"/api/invoices/options").subscribe(f=>{this.displayOptions=f.data})}fillData(){const t=this._gridService.convertFrom(this.state,this.sort,this.filter);t.timeZoneOffset=(new Date).getTimezoneOffset(),this._user.UserProfile.partner.psaType==m.r_.ConnectWise||this._user.UserProfile.partner.psaType==m.r_.Kaseya_BMS?this._gridService.query(t):this._user.UserProfile.partner.psaType==m.r_.Halo?this.loadHaloInvoices():(this._user.UserProfile.partner.psaType==m.r_.Autotask||this._user.UserProfile.partner.psaType==m.r_.Syncro)&&(this._slimLoading.start(),this._dataService.get(t,"/api/invoices").subscribe(n=>{this.gridAutoData=n.data,this._slimLoading.complete()},n=>{this.errors=this._dataService.processErrors(n),this._browserutils.pushErrorToast(this.errors[0])}))}loadHaloInvoices(){if(this.haloLoaded)return void this.processHaloData();const t=new g.Yj;t.skip=0,t.take=1e5,this._slimLoading.start(),this._dataService.get(t,"/api/invoices").subscribe(a=>{this.haloAllData=a.data||[],this.haloLoaded=!0,this.processHaloData(),this._slimLoading.complete()},a=>{this.errors=this._dataService.processErrors(a),this._browserutils.pushErrorToast(this.errors[0]),this._slimLoading.complete()})}processHaloData(){const t=(0,Q.eh)(this.haloAllData,{skip:this.state.skip,take:this.state.take,sort:this.state.sort,filter:this.state.filter});this.haloData$.next(t)}dataStateChange(t){this._user.UserProfile.user.rowsPerPage!=t.take&&this._dataService.updateRowsPerpage(t.take),this._user.UserProfile.user.rowsPerPage=t.take,JSON.stringify(t.sort)!=JSON.stringify(this.sort)&&(this.state.skip=0),this.filter=t.filter,this.state=t,this.sort=t.sort,this._user.UserProfile.partner.psaType==m.r_.ConnectWise||this._user.UserProfile.partner.psaType==m.r_.Kaseya_BMS?this.fillData():this._user.UserProfile.partner.psaType==m.r_.Halo&&this.processHaloData()}allAutotaskData(){return{data:(0,Q.eh)(this.gridAutoData,{sort:[{field:"date",dir:"asc"}]}).data}}getDownloadName(){return"Invoices-"+this._user.UserProfile.company.safeName+"-"+this._browserutils.currentDate()+".xlsx"}exportToExcel(t){t.saveAsExcel(),this._browserutils.pushDownloadToast(this.getDownloadName())}closeInvoice(){return this.showInvoice=!1,this.pdfSrc="",this._blade.closeMe(),!1}downloadFile(t){return this.errors=[],this.showInvoice=!0,this._blade.showMe(),this.pdfSrc="/api/invoices/download?id="+t.id.toString(),this.pdfName=this._user.UserProfile.company.safeName+"-Invoice-"+this._browserutils.SafeName(t.invoiceNumber),this.mixpanelService.trackEvent(B.N.InvoiceView,{Subject:"Invoice #"+t.id.toString()}),!1}gridUserSelectionChange(t){const a=t.selectedRows[0].dataItem;if(this._user.UserProfile.partner.psaType==m.r_.Syncro){this._slimLoading.start();const n=new g.Yj;n.filters="id",n.conditions="eq",n.values=a.id.toString(),this._dataService.get(n,"/api/invoices").subscribe(o=>{this._slimLoading.complete();const c=o.data;c&&c.url?(this.mixpanelService.trackEvent(B.N.InvoiceView,{Subject:"Invoice #"+a.id.toString()}),window.open(c.url)):this._browserutils.pushErrorToast("Invoice not available.")},o=>{this.errors=this._dataService.processErrors(o),this._browserutils.pushErrorToast(this.errors[0])})}else{if(this._user.UserProfile.partner.psaType==m.r_.Kaseya_BMS)return!1;this.downloadFile(a)}}onStartChange(t,a){return this.startPickerDate=t,this.onDateChange(a),!1}onEndChange(t,a){return this.endPickerDate=t,this.onDateChange(a),!1}filterChange(t){this.filter=t,JSON.stringify(this.filter).includes('"date"')||(this.startPickerDate=new Date,this.endPickerDate=new Date)}onDateChange(t){const a=this.startPickerDate,n=this.endPickerDate;a&&n&&t.filter({logic:"and",filters:[{field:"date",operator:"eq",value:a.toISOString().substring(0,10)+","+n.toISOString().substring(0,10)}]})}toggleFilter(){return this.isFilter=!this.isFilter,!1}paymentUrl(t,a,n){return t?this._browserutils.connectBoosterUrl():a?this._browserutils.wisePayUrl():n&&this._browserutils.flexpointUrl(),!1}static{this.\u0275fac=function(a){return new(a||i)(e.rXU(b.b),e.rXU(w.M),e.rXU(v.C),e.rXU(E.KO),e.rXU(g.jK),e.rXU(j.D),e.rXU(B.U))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["az-company"]],decls:60,vars:58,consts:[["grid1",""],["grid2",""],[1,"d-flex","flex-column","h-100"],[3,"title"],["title","Open payment portal","class","pageHeaderButton",3,"click",4,"ngIf"],["title","Download all",1,"pageHeaderButton",3,"click"],[1,"fmd","fm-ExcelDocument"],[1,"row","h-100","overflow-auto"],[1,"h-100","overflow-hidden",3,"filterChange","selectionChange","dataStateChange","hidden","ngClass","data","reorderable","resizable","pageSize","skip","sortable","sort","pageable","filter","rowSelected","selectable","filterable"],["kendoGridNoRecordsTemplate",""],[1,"gridGraphic",3,"width"],["kendoGridCellTemplate",""],["kendoGridHeaderTemplate",""],["field","invoiceNumber","title","Number"],["field","date","title","Date","media","md",3,"filterable"],["field","total","title","Total","media","lg",3,"filterable"],["field","balance","title","Balance","media","lg",3,"filterable",4,"ngIf"],["field","status","title","Status","media","lg",3,"filterable"],["field","type","title","Type","media","xl",3,"filterable"],["field","reference","title","Reference","media","xl"],["field","po","title","PO#","media","xl"],[3,"fileName","fetchData"],[1,"h-100","overflow-hidden",3,"selectionChange","filterChange","dataStateChange","hidden","kendoGridBinding","reorderable","resizable","pageSize","skip","sortable","sort","pageable","filter","rowSelected","selectable","filterable"],["field","reference","title","Reference","media","lg"],["field","status","title","Status","media","xl",3,"filterable"],["class","w-65-responsive",3,"onEscape",4,"ngIf"],["title","Open payment portal",1,"pageHeaderButton",3,"click"],[1,"fal","fa-credit-card"],[4,"ngIf"],[1,"fal","fa-file-alt"],["t
1itle","Toggle search","href","",2,"font-size","10px",3,"click"],[1,"fa","fa-search"],["notranslate","",1,"fw-semibold"],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","Invoice number"],["notranslate",""],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","Date"],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","Total"],["field","balance","title","Balance","media","lg",3,"filterable"],["class","goodText boldText","notranslate","",4,"ngIf"],["class","alertText","notranslate","",4,"ngIf"],["class","warnText","notranslate","",4,"ngIf"],["notranslate","",1,"goodText","boldText"],["notranslate","",1,"alertText"],["notranslate","",1,"warnText"],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","Balance"],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","Status"],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","Type"],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","Reference"],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","PO #"],[1,"w-65-responsive",3,"onEscape"],[1,"bladeHeader","clearfix"],[1,"bladeTitle"],[1,"bladeCommands"],["title","Close",1,"pageHeaderButton",3,"click"],[1,"fal","fa-times"],[1,"bladeBody"],[2,"display","block","height","calc(100vh - 200px)",3,"onClose","src","name","auth"]],template:function(a,n){if(1&a){const o=e.RV6();e.j41(0,"div",2)(1,"page-header",3),e.DNE(2,ni,3,0,"button",4),e.j41(3,"button",5),e.bIt("click",function(){e.eBV(o);const r=e.sdS(8),u=e.sdS(38);return e.Njj(n.exportToExcel(10==n._user.UserProfile.partner.psaType||40==n._user.UserProfile.partner.psaType||60==n._user.UserProfile.partner.psaType?r:u))}),e.nrm(4,"span",6),e.EFF(5,"Download "),e.k0s()(),e.j41(6,"div",7)(7,"kendo-grid",8,0),e.nI1(9,"async"),e.bIt("filterChange",function(r){return e.eBV(o),e.Njj(n.filterChange(r))})("selectionChange",function(r){return e.eBV(o),e.Njj(n.gridUserSelectionChange(r))})("dataStateChange",function(r){return e.eBV(o),e.Njj(n.dataStateChange(r))}),e.DNE(10,oi,2,2,"ng-template",9),e.j41(11,"kendo-grid-column",10),e.DNE(12,ri,1,0,"ng-template",11)(13,li,2,0,"ng-template",12),e.k0s(),e.j41(14,"kendo-grid-column",13),e.DNE(15,ci,2,1,"ng-template",11)(16,di,2,0,"ng-template",12),e.k0s(),e.j41(17,"kendo-grid-column",14),e.DNE(18,pi,3,3,"ng-template",11)(19,_i,2,0,"ng-template",12),e.k0s(),e.j41(20,"kendo-grid-column",15),e.DNE(21,mi,3,11,"ng-template",11)(22,fi,2,0,"ng-template",12),e.k0s(),e.DNE(23,ki,3,1,"kendo-grid-column",16),e.j41(24,"kendo-grid-column",17),e.DNE(25,Fi,2,1,"ng-template",11)(26,Ti,2,0,"ng-template",12),e.k0s(),e.j41(27,"kendo-grid-column",18),e.DNE(28,Ci,2,1,"ng-template",11)(29,ji,2,0,"ng-template",12),e.k0s(),e.j41(30,"kendo-grid-column",19),e.DNE(31,Ii,2,1,"ng-template",11)(32,Di,2,0,"ng-template",12),e.k0s(),e.j41(33,"kendo-grid-column",20),e.DNE(34,Ei,2,1,"ng-template",11)(35,Ri,2,0,"ng-template",12),e.k0s(),e.nrm(36,"kendo-grid-excel",21),e.k0s(),e.j41(37,"kendo-grid",22,1),e.bIt("selectionChange",function(r){return e.eBV(o),e.Njj(n.gridUserSelectionChange(r))})("filterChange",function(r){return e.eBV(o),e.Njj(n.filterChange(r))})("dataStateChange",function(r){return e.eBV(o),e.Njj(n.dataStateChange(r))}),e.DNE(39,wi,2,2,"ng-template",9),e.j41(40,"kendo-grid-column",10),e.DNE(41,xi,1,0,"ng-template",11)(42,Gi,2,0,"ng-template",12),e.k0s(),e.j41(43,"kendo-grid-column",13),e.DNE(44,Ni,2,1,"ng-template",11)(45,$i,2,0,"ng-template",12),e.k0s(),e.j41(46,"kendo-grid-column",14),e.DNE(47,Pi,3,3,"ng-template",11)(48,Ui,2,0,"ng-template",12),e.k0s(),e.j41(49,"kendo-grid-column",15),e.DNE(50,Ai,3,11,"ng-template",11)(51,Bi,2,0,"ng-template",12),e.k0s(),e.j41(52,"kendo-grid-column",23),e.DNE(53,Xi,2,1,"ng-template",11)(54,Yi,2,0,"ng-template",12),e.k0s(),e.j41(55,"kendo-grid-column",24),e.DNE(56,Mi,2,1,"ng-template",11)(57,Vi,2,0,"ng-template",12),e.k0s(),e.nrm(58,"kendo-grid-excel",21),e.k0s()()(),e.DNE(59,Oi,10,3,"blade-display",25)}2&a&&(e.R7$(),e.Y8G("title",n._user.GetPortalString("Invoices","Invoices")),e.R7$(),e.Y8G("ngIf",n.isWisePay||n.isConnectBooster||n.isFlexpoint),e.R7$(5),e.Y8G("hidden",!(10==n._user.UserProfile.partner.psaType||40==n._user.UserProfile.partner.psaType||60==n._user.UserProfile.partner.psaType))("ngClass",e.eq3(46,ii,10==n._user.UserProfile.partner.psaType||60==n._user.UserProfile.partner.psaType))("data",e.bMT(9,44,n.gridData))("reorderable",!0)("resizable",!0)("pageSize",n._user.UserProfile.user.rowsPerPage)("skip",n.state.skip)("sortable",e.lJ4(48,K))("sort",n.state.sort)("pageable",e.eq3(50,W,e.lJ4(49,q)))("filter",n.state.filter)("rowSelected",n.isRowSelected)("selectable",e.lJ4(52,Z))("filterable",n.isFilter),e.R7$(4),e.Y8G("width",35),e.R7$(6),e.Y8G("filterable",!1),e.R7$(3),e.Y8G("filterable",!1),e.R7$(3),e.Y8G("ngIf",n.displayOptions&&!n.displayOptions.hideInvoiceBalance),e.R7$(),e.Y8G("filterable",!1),e.R7$(3),e.Y8G("filterable",!1),e.R7$(9),e.Y8G("fileName",n.getDownloadName())("fetchData",n.allData),e.R7$(),e.Y8G("hidden",!(20==n._user.UserProfile.partner.psaType||50==n._user.UserProfile.partner.psaType))("kendoGridBinding",n.gridAutoData)("reorderable",!0)("resizable",!0)("pageSize",n._user.UserProfile.user.rowsPerPage)("skip",n.state.skip)("sortable",e.lJ4(53,K))("sort",n.state.sort)("pageable",e.eq3(55,W,e.lJ4(54,q)))("filter",n.state.filter)("rowSelected",n.isRowSelected)("selectable",e.lJ4(57,Z))("filterable",n.isFilter),e.R7$(3),e.Y8G("width",35),e.R7$(6),e.Y8G("filterable",!1),e.R7$(3),e.Y8G("filterable",!1),e.R7$(6),e.Y8G("filterable",!1),e.R7$(3),e.Y8G("fileName",n.getDownloadName())("fetchData",n.allAutotaskData),e.R7$(),e.Y8G("ngIf",n.showInvoice))},dependencies:[v.C,h.YU,h.bT,d.NXp,d._ab,d.vqx,d.Ioe,d.i4w,d.jqs,d.TiO,D.y,P.H,S.dg,y.j,h.Jj,h.oe,x.eN]})}}return i})();var p=l(80821),Li=l(42634);const X=()=>["Edit","Account_Settings"];function Ji(i,s){1&i&&(e.j41(0,"span",18),e.EFF(1,"Enabled"),e.k0s())}function Hi(i,s){1&i&&(e.j41(0,"span",19),e.EFF(1,"Disabled"),e.k0s())}function Qi(i,s){if(1&i){const t=e.RV6();e.j41(0,"a",20),e.bIt("click",function(){e.eBV(t);const n=e.XpG(3);return e.Njj(n.showMessageOptions())}),e.EFF(1,"Change"),e.k0s()}}function Ki(i,s){if(1&i&&(e.j41(0,"div",10)(1,"div",11)(2,"div",14),e.EFF(3," Message Center "),e.k0s(),e.j41(4,"div",13)(5,"div",10)(6,"div",11),e.EFF(7," Daily Digest Delivery: \xa0 "),e.DNE(8,Ji,2,0,"span",15)(9,Hi,2,0,"span",16)(10,Qi,2,0,"a",17),e.k0s()()()()()),2&i){const t=e.XpG(2);e.R7$(8),e.Y8G("ngIf",t.settings.isMessageDigestEnabled),e.R7$(),e.Y8G("ngIf",!t.settings.isMessageDigestEnabled),e.R7$(),e.Y8G("userPermissions",e.lJ4(3,X))}}function qi(i,s){1&i&&(e.j41(0,"div",14),e.EFF(1," Microsoft 365 "),e.k0s())}function Wi(i,s){1&i&&(e.j41(0,"span",19),e.EFF(1,"Not Connected"),e.k0s())}function Zi(i,s){1&i&&(e.j41(0,"span",18),e.EFF(1,"OK"),e.k0s())}function en(i,s){if(1&i&&(e.j41(0,"span",32),e.EFF(1),e.k0s()),2&i){const t=e.XpG(3);e.R7$(),e.JRh(t.settings.lastOAuthAdminMessage)}}function tn(i,s){if(1&i){const t=e.RV6();e.j41(0,"button",33),e.bIt("click",function(){e.eBV(t);const n=e.XpG(3);return e.Njj(n.connect365Admin())}),e.EFF(1,"Connect Microsoft 365"),e.k0s()}}function nn(i,s){1&i&&(e.j41(0,"span",19),e.EFF(1,"Not Connected"),e.k0s())}function sn(i,s){1&i&&(e.j41(0,"span",18),e.EFF(1,"OK"),e.k0s())}function an(i,s){if(1&i&&(e.j41(0,"span",32),e.EFF(1),e.k0s()),2&i){const t=e.XpG(3);e.R7$(),e.JRh(t.settings.lastOAuthLoginMessage)}}function on(i,s){if(1&i){const t=e.RV6();e.j41(0,"button",33),e.bIt("click",function(){e.eBV(t);const n=e.XpG(3);return e.Njj(n.connect365Login())}),e.EFF(1,"Connect Microsoft 365"),e.k0s()}}function rn(i,s){if(1&i&&(e.j41(0,"div")(1,"div",21)(2,"div",11)(3,"strong"),e.EFF(4,"Instru
1ctions"),e.k0s(),e.EFF(5," \u2013 To allow this application to access your Microsoft 365 information, you need to authorize two different applications using the buttons below. "),e.k0s()(),e.j41(6,"div",22)(7,"div",23)(8,"div",24),e.nrm(9,"span",25),e.k0s(),e.j41(10,"div",26)(11,"strong"),e.EFF(12,"Administrative Access Application"),e.k0s(),e.nrm(13,"br"),e.EFF(14," This application is used to monitor your Microsoft 365 tenant. Click the button and log in as an administrator in the Office tenant you want to connect. "),e.k0s(),e.j41(15,"div",27),e.EFF(16," Status: "),e.DNE(17,Wi,2,0,"span",16)(18,Zi,2,0,"span",15)(19,en,2,1,"span",28),e.k0s()(),e.j41(20,"div",29),e.DNE(21,tn,2,0,"button",30),e.k0s()(),e.j41(22,"div",22)(23,"div",23)(24,"div",24),e.nrm(25,"span",31),e.k0s(),e.j41(26,"div",26)(27,"strong"),e.EFF(28,"User Login Access Application"),e.k0s(),e.nrm(29,"br"),e.EFF(30," For better security, user log ins are handled by a separate application with a much smaller set of access rights. This application lets users log in to the portal using their Microsoft 365 account (supports MFA). Click the button and log in as an administrator in the Office tenant you want to connect. "),e.k0s(),e.j41(31,"div",27),e.EFF(32," Status: "),e.DNE(33,nn,2,0,"span",16)(34,sn,2,0,"span",15)(35,an,2,1,"span",28),e.k0s()(),e.j41(36,"div",29),e.DNE(37,on,2,0,"button",30),e.k0s()()()),2&i){const t=e.XpG(2);e.R7$(17),e.Y8G("ngIf",!t.settings.lastOAuthAdminMessage),e.R7$(),e.Y8G("ngIf","OK"==t.settings.lastOAuthAdminMessage),e.R7$(),e.Y8G("ngIf","OK"!=t.settings.lastOAuthAdminMessage),e.R7$(2),e.Y8G("userPermissions",e.lJ4(8,X)),e.R7$(12),e.Y8G("ngIf",!t.settings.lastOAuthLoginMessage),e.R7$(),e.Y8G("ngIf","OK"==t.settings.lastOAuthLoginMessage),e.R7$(),e.Y8G("ngIf","OK"!=t.settings.lastOAuthLoginMessage),e.R7$(2),e.Y8G("userPermissions",e.lJ4(9,X))}}function ln(i,s){if(1&i&&(e.qex(0),e.DNE(1,Ki,11,4,"div",9),e.j41(2,"div",10)(3,"div",11),e.DNE(4,qi,2,0,"div",12),e.j41(5,"div",13)(6,"div",10),e.DNE(7,rn,38,10,"div",4),e.k0s()()()(),e.bVm()),2&i){const t=e.XpG();e.R7$(),e.Y8G("ngIf",!t.isMessagesDisabled),e.R7$(3),e.Y8G("ngIf",!t.settings.isDelegatedAdmin),e.R7$(3),e.Y8G("ngIf",!t.settings.isDelegatedAdmin)}}function cn(i,s){if(1&i){const t=e.RV6();e.j41(0,"blade-display",34)(1,"div",35)(2,"div",36),e.EFF(3," Message Center "),e.k0s(),e.j41(4,"div",37)(5,"button",38),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.closeBlade())}),e.nrm(6,"span",39),e.EFF(7,"Close"),e.k0s()()(),e.j41(8,"div",40)(9,"h3"),e.EFF(10,"Email Delivery"),e.k0s(),e.j41(11,"p"),e.EFF(12," Enable this option so that users can receive new message updates by email. Individual users can opt out of receiving these emails. "),e.k0s(),e.j41(13,"div",41)(14,"input",42),e.mxI("ngModelChange",function(n){e.eBV(t);const o=e.XpG();return e.DH7(o.settings.isMessageDigestEnabled,n)||(o.settings.isMessageDigestEnabled=n),e.Njj(n)}),e.k0s(),e.j41(15,"label",43),e.EFF(16," Enable Daily Digest delivery to company users? "),e.k0s(),e.j41(17,"small",44),e.EFF(18,"Users will receive up to one email daily with the latest message summaries."),e.k0s()(),e.j41(19,"div",45)(20,"rbac-button",46),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.submitMessageOptions())}),e.k0s(),e.j41(21,"button",47),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.closeBlade())}),e.EFF(22,"Close"),e.k0s()()()()}if(2&i){const t=e.XpG();e.R7$(14),e.R50("ngModel",t.settings.isMessageDigestEnabled),e.R7$(6),e.HbH("btn btn-primary me-2"),e.Y8G("label","Submit")("disabled",t._dataService.isBusy)("moduleType","Account_Settings")("permission","Edit")}}let dn=(()=>{class i{constructor(t,a,n,o,c,r){this._browserutils=t,this._blade=a,this._slimLoading=n,this._dataService=o,this._user=c,this.userPermissionsService=r,this.isMessagesDisabled=!1,this.errors=[],this.sidebarTypes=p.I,this.showMessageCenter=!1,this.fillData()}ngOnInit(){this.isMessagesDisabled=this.userPermissionsService.IsDisabled(this.sidebarTypes.Company_Messages)}fillData(){return this._slimLoading.start(),this._dataService.get(new g.Yj,"/api/settings").subscribe(t=>{this._slimLoading.complete(),this.settings=t.data},t=>{this.errors=this._dataService.processErrors(t)}),!1}connect365Admin(){return this._slimLoading.start(),this._dataService.get(new g.Yj,"/api/settings/office").subscribe(t=>{this._slimLoading.complete(),location.href=t.data.redirect},t=>{this.errors=this._dataService.processErrors(t)}),!1}connect365Login(){return this._slimLoading.start(),this._dataService.get(new g.Yj,"/api/settings/login").subscribe(t=>{this._slimLoading.complete(),location.href=t.data.redirect},t=>{this.errors=this._dataService.processErrors(t)}),!1}showMessageOptions(){return this.showMessageCenter=!0,this._blade.showMe(),!1}closeBlade(){return this.showMessageCenter=!1,this._blade.closeMe(),!1}submitMessageOptions(){return this._slimLoading.start(),this._dataService.post(this.settings,"api/settings/messages").subscribe(t=>{this.closeBlade(),this._browserutils.openToast("Message Center options updated.","Done!",b.R.success),this._slimLoading.complete()},t=>{this.errors=this._dataService.processErrors(t)}),!1}static{this.\u0275fac=function(a){return new(a||i)(e.rXU(b.b),e.rXU(v.C),e.rXU(E.KO),e.rXU(g.jK),e.rXU(j.D),e.rXU(V.N))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["az-usage"]],decls:13,vars:5,consts:[[1,"d-flex","flex-column","h-100"],[3,"title"],[1,"row","h-100","overflow-auto"],[1,"col","h-100","overflow-auto","py-3"],[4,"ngIf"],[1,"col-auto","d-none","d-sm-block","navpanel","h-100","overflow-auto"],[1,"navpanelSection"],["target","_blank",3,"href"],["class","w-45-responsive",4,"ngIf"],["class","row",4,"ngIf"],[1,"row"],[1,"col"],["class","epT
1itle",4,"ngIf"],[1,"epSpecs"],[1,"epTitle"],["class","goodText font-weight-bold",4,"ngIf"],["class","alertText font-weight-bold",4,"ngIf"],["style","margin-left: 20px;","class","small","href","#",3,"click",4,"userPermissions"],[1,"goodText","font-weight-bold"],[1,"alertText","font-weight-bold"],["href","#",1,"small",2,"margin-left","20px",3,"click"],[1,"row",2,"padding-bottom","10px"],[1,"row",2,"padding","10px"],[1,"col-7","clearfix"],[2,"float","left","font-size","15px","width","30px","font-weight","bold"],[1,"fal","fa-cogs"],[2,"float","none","margin-left","35px"],[2,"padding-top","10px","margin-left","35px"],["class","warnText font-weight-bold",4,"ngIf"],[1,"col-5","text-center"],["class","btn btn-secondary","style","margin-top: 22px; width:175px;",3,"click",4,"userPermissions"],[1,"fal","fa-users"],[1,"warnText","font-weight-bold"],[1,"btn","btn-secondary",2,"margin-top","22px","width","175px",3,"click"],[1,"w-45-responsive"],[1,"bladeHeader","clearfix"],[1,"bladeTitle"],[1,"bladeCommands"],["title","Close",1,"pageHeaderButton",3,"click"],[1,"fal","fa-times"],[1,"bladeBody"],[1,"form-check"],["type","checkbox","id","isMessageDigestEnabled","name","isMessageDigestEnabled",1,"form-check-input",3,"ngModelChange","ngModel"],["for","isMessageDigestEnabled",1,"form-check-label"],[1,"d-block","form-text","text-muted"],[1,"bladeButtons"],[3,"click","label","disabled","moduleType","permission"],["type","button",1,"btn","btn-secondary",3,"click"]],template:function(a,n){1&a&&(e.j41(0,"div",0),e.nrm(1,"page-header",1),e.j41(2,"div",2)(3,"div",3),e.DNE(4,ln,8,3,"ng-container",4),e.k0s(),e.j41(5,"div",5)(6,"div",6)(7,"h3"),e.EFF(8,"Contact Info"),e.k0s(),e.j41(9,"div")(10,"a",7),e.EFF(11),e.k0s()()()()()(),e.DNE(12,cn,23,7,"blade-display",8)),2&a&&(e.R7$(),e.Y8G("title",n._user.GetPortalString("Settings","Settings")),e.R7$(3),e.Y8G("ngIf",n.settings),e.R7$(6),e.FS9("href",n._user.UserProfile.partner.website,e.B4B),e.R7$(),e.JRh(n._user.UserProfile.partner.name),e.R7$(),e.Y8G("ngIf",n.showMessageCenter))},dependencies:[v.C,h.bT,I.Zm,I.BC,I.vS,D.y,O.S,z.C3,Li.Z],styles:[".epSpecs[_ngcontent-%COMP%]   .row[_ngcontent-%COMP%]{border-bottom:none;padding-bottom:5px;margin-bottom:5px}.row-headings[_ngcontent-%COMP%]{margin:20px!important;border-top:solid 1px var(--main-border-color);border-bottom:solid 1px var(--main-border-color);padding:10px 0;text-align:center;text-transform:uppercase;color:var(--main-title-color)}.epTitle[_ngcontent-%COMP%]{font-size:14pt;padding:10px 0;font-weight:500}"]})}}return i})();var pn=l(73748),_n=l(96354),mn=l(75417);const ee=()=>({allowUnsort:!1,mode:"single"}),te=()=>[10,20,50,100],ie=i=>({pageSizes:i}),ne=()=>({mode:"single"});function fn(i,s){1&i&&(e.j41(0,"div"),e.EFF(1," Searching... "),e.k0s())}function gn(i,s){1&i&&(e.j41(0,"div"),e.EFF(1," No records available. "),e.k0s())}function hn(i,s){if(1&i&&e.DNE(0,fn,2,0,"div",18)(1,gn,2,0,"div",18),2&i){const t=e.XpG();e.Y8G("ngIf",t._dataService.isBusy),e.R7$(),e.Y8G("ngIf",!t._dataService.isBusy)}}function un(i,s){1&i&&e.nrm(0,"span",19)}function bn(i,s){if(1&i){const t=e.RV6();e.j41(0,"a",20),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.toggleFilter())}),e.nrm(1,"span",21),e.k0s()}}function vn(i,s){if(1&i&&(e.j41(0,"span",22),e.EFF(1),e.k0s()),2&i){const t=s.$implicit;e.R7$(),e.JRh(t.name)}}function kn(i,s){1&i&&(e.j41(0,"span",23),e.EFF(1,"Name"),e.k0s())}function Fn(i,s){1&i&&e.EFF(0),2&i&&e.SpI(" ",s.$implicit.status," ")}function Tn(i,s){1&i&&(e.j41(0,"span",24),e.EFF(1,"Status"),e.k0s())}function Cn(i,s){if(1&i&&(e.j41(0,"span",25),e.EFF(1),e.k0s()),2&i){const t=s.$implicit;e.R7$(),e.JRh(t.salesRep)}}function jn(i,s){1&i&&(e.j41(0,"span",26),e.EFF(1,"Sales Rep"),e.k0s())}function In(i,s){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"localizedShortDateZ"),e.k0s()),2&i){const t=s.$implicit;e.R7$(),e.JRh(e.bMT(2,1,t.closeDate))}}function Dn(i,s){1&i&&(e.j41(0,"span",27),e.EFF(1,"Date"),e.k0s())}function En(i,s){1&i&&(e.j41(0,"div"),e.EFF(1," Searching... "),e.k0s())}function Rn(i,s){1&i&&(e.j41(0,"div"),e.EFF(1," No records available. "),e.k0s())}function Sn(i,s){if(1&i&&e.DNE(0,En,2,0,"div",18)(1,Rn,2,0,"div",18),2&i){const t=e.XpG();e.Y8G("ngIf",t._dataService.isBusy),e.R7$(),e.Y8G("ngIf",!t._dataService.isBusy)}}function yn(i,s){1&i&&e.nrm(0,"span",19)}function wn(i,s){if(1&i){const t=e.RV6();e.j41(0,"a",20),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.toggleFilter())}),e.nrm(1,"span",21),e.k0s()}}function xn(i,s){if(1&i&&(e.j41(0,"span",22),e.EFF(1),e.k0s()),2&i){const t=s.$implicit;e.R7$(),e.JRh(t.name)}}function Gn(i,s){1&i&&(e.j41(0,"span",23),e.EFF(1,"Name"),e.k0s())}function Nn(i,s){1&i&&e.EFF(0),2&i&&e.SpI(" ",s.$implicit.status," ")}function $n(i,s){1&i&&(e.j41(0,"span",24),e.EFF(1,"Status"),e.k0s())}function Pn(i,s){if(1&i&&(e.j41(0,"span",25),e.EFF(1),e.k0s()),2&i){const t=s.$implicit;e.R7$(),e.JRh(t.salesRep)}}function Un(i,s){1&i&&(e.j41(0,"span",26),e.EFF(1,"Sales Rep"),e.k0s())}function An(i,s){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"localizedShortDateZ"),e.k0s()),2&i){const t=s.$implicit;e.R7$(),e.JRh(e.bMT(2,1,t.closeDate))}}function Bn(i,s){1&i&&(e.j41(0,"span",27),e.EFF(1,"Date"),e.k0s())}let se=(()=>{class i{get isServerGridPsa(){const t=this._user.UserProfile.partner.psaType;return t===m.r_.ConnectWise||t===m.r_.Halo}constructor(t,a,n,o,c,r,u){this._browserutils=t,this._gridService=a,this._slimLoading=n,this.route=o,this.offcanvasService=c,this._dataService=r,this._user=u,this.errors=[],this.startPickerDate=new Date,this.endPickerDate=new Date,this.pdfName="",this.pdfSrc="",this.isFilter=!0,this.psaType=m.r_,this.state={skip:0,take:this._user.UserProfile.user.rowsPerPage,sort:[{field:"closeDate",dir:"desc"}]},this.sort=[{field:"closeDate",dir:"desc"}],this.allData=()=>this._gridService.queryAll(this._gridService.convertFrom({skip:0,take:999},[{field:"closeDate",dir:"desc"}],null)),this.isRowSelected=f=>!1,this._gridService.setBaseURL("/api/quotes"),this.profileData=r,this.gridData=this._gridService,this.errors.length=0}ngOnInit(){this.route.url.pipe((0,_n.T)(t=>t[t.length-1].path)).subscribe(t=>{parseInt(t)&&this.openQuote(parseInt(t))}).unsubscribe(),this.fillData()}fillData(){const t=this._gridService.convertFrom(this.state,this.sort,this.filter);t.timeZoneOffset=(new Date).getTimezoneOffset(),this.isServerGridPsa?this._gridService.queryWithErrors(t):this._user.UserProfile.partner.psaType==m.r_.Autotask&&(this._slimLoading.start(),this._dataService.get(t,"/api/quotes").subscribe({next:n=>{this.gridAutoData=n.data,this._slimLoading.complete()},error:n=>{this.errors=this._dataService.processErrors(n),this._browserutils.pushErrorToast(this.errors[0])}}))}dataStateChange(t){this._user.UserProfile.user.rowsPerPage!=t.take&&this._dataService.updateRowsPerpage(t.take),this._user.UserProfile.user.rowsPerPage=t.take,JSON.stringify(t.sort)!=JSON.stringify(this.sort)&&(this.state.skip=0),this.filter=t.filter,this.state=t,this.sort=t.sort,this.fillData()}getDownloadName(){return"Quotes-"+this._user.UserProfile.company.safeName+"-"+this._browserutils.currentDate()+".xlsx"}exportToExcel(t){t.saveAsExcel(),this._browserutils.pushDownloadToast(this.getDownloadName())}gridUserSelectionChange(t){this.openQuote(t.selectedRows[0].dataItem.id)}openQuote(t){this.offcanvasRef=this.offcanvasService.open(pn.Y,{position:"end",panelClass:"w-45-responsive offCanvasThemeStyles"}),this.offcanvasRef.componentInstance.quoteId=t,this.offcanvasRef.componentInstance.isFromPlanner=!1}filterChange(t){this.filter=t,JSON.stringify(this.filter).includes('"date"')||(this.startPickerDate=new Date,this.endPickerDate=new Date)}toggleFilter(){return this.isFilter=!this.isFilter,!1}static{this.\u0275fac=function(a){return new(a||i)(e.rXU(b.b),e.rXU(w.M),e.rXU(E.KO),e.rXU(T.nX),e.rXU(mn.RS),e.rXU(g.jK),e.rXU(j.D))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["az-company"]],decls:45,vars:47,consts:[["grid1",""],["grid2",""],[1,"d-flex","flex-column","h-100"],[3,"title"],["title","Download all",1,"pageHeaderButton",3,"click"],[1,"fmd","fm-ExcelDocument"],[1,"row","h-100","overflow-auto"],["width","100%",1,"h-100","overflow-hidden",3,"filterChange","selectionChange","dataStateChange","hidden","data","reorderable","resizable","pageSize","skip","sortable","sort","pageable","filter","rowSelected","selectable","filterable"],["kendoGridNoRecordsTemplate",""],[1,"gridGraphic",3,"width"],["kendoGridCellTemplate",""],["kendoGridHeaderTemplate",""],["field","name","title","Name"],["field","status","title","Status","media","md"],["field","salesRep","title","Sales Rep","media","lg"],["field","closeDate","title","Date","media","lg",3,"filterable"],[3,"fileName","fetchData"],["width","100%",1,"h-100","overflow-hidden",3,"filterChange","selectionChange","dataStateChange","hidden","kendoGridBinding","reorderable","resizable","pageSize","skip","sortable","sort","pageable","filter","rowSelected","selectable","filterable"],[4,"ngIf"],[1,"fal","fa-file-alt"],["t
1itle","Toggle search","href","",2,"font-size","10px",3,"click"],[1,"fa","fa-search"],["notranslate","",1,"fw-semibold"],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","Name"],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","Status"],["notranslate",""],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","Sales rep"],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","Close date"]],template:function(a,n){if(1&a){const o=e.RV6();e.j41(0,"div",2)(1,"page-header",3)(2,"button",4),e.bIt("click",function(){e.eBV(o);const r=e.sdS(7),u=e.sdS(27);return e.Njj(n.exportToExcel(n.isServerGridPsa?r:u))}),e.nrm(3,"span",5),e.EFF(4,"Download "),e.k0s()(),e.j41(5,"div",6)(6,"kendo-grid",7,0),e.nI1(8,"async"),e.bIt("filterChange",function(r){return e.eBV(o),e.Njj(n.filterChange(r))})("selectionChange",function(r){return e.eBV(o),e.Njj(n.gridUserSelectionChange(r))})("dataStateChange",function(r){return e.eBV(o),e.Njj(n.dataStateChange(r))}),e.DNE(9,hn,2,2,"ng-template",8),e.j41(10,"kendo-grid-column",9),e.DNE(11,un,1,0,"ng-template",10)(12,bn,2,0,"ng-template",11),e.k0s(),e.j41(13,"kendo-grid-column",12),e.DNE(14,vn,2,1,"ng-template",10)(15,kn,2,0,"ng-template",11),e.k0s(),e.j41(16,"kendo-grid-column",13),e.DNE(17,Fn,1,1,"ng-template",10)(18,Tn,2,0,"ng-template",11),e.k0s(),e.j41(19,"kendo-grid-column",14),e.DNE(20,Cn,2,1,"ng-template",10)(21,jn,2,0,"ng-template",11),e.k0s(),e.j41(22,"kendo-grid-column",15),e.DNE(23,In,3,3,"ng-template",10)(24,Dn,2,0,"ng-template",11),e.k0s(),e.nrm(25,"kendo-grid-excel",16),e.k0s(),e.j41(26,"kendo-grid",17,1),e.bIt("filterChange",function(r){return e.eBV(o),e.Njj(n.filterChange(r))})("selectionChange",function(r){return e.eBV(o),e.Njj(n.gridUserSelectionChange(r))})("dataStateChange",function(r){return e.eBV(o),e.Njj(n.dataStateChange(r))}),e.DNE(28,Sn,2,2,"ng-template",8),e.j41(29,"kendo-grid-column",9),e.DNE(30,yn,1,0,"ng-template",10)(31,wn,2,0,"ng-template",11),e.k0s(),e.j41(32,"kendo-grid-column",12),e.DNE(33,xn,2,1,"ng-template",10)(34,Gn,2,0,"ng-template",11),e.k0s(),e.j41(35,"kendo-grid-column",13),e.DNE(36,Nn,1,1,"ng-template",10)(37,$n,2,0,"ng-template",11),e.k0s(),e.j41(38,"kendo-grid-column",14),e.DNE(39,Pn,2,1,"ng-template",10)(40,Un,2,0,"ng-template",11),e.k0s(),e.j41(41,"kendo-grid-column",15),e.DNE(42,An,3,3,"ng-template",10)(43,Bn,2,0,"ng-template",11),e.k0s(),e.nrm(44,"kendo-grid-excel",16),e.k0s()()()}2&a&&(e.R7$(),e.Y8G("title",n._user.GetPortalString("Quotes","Quotes")),e.R7$(5),e.Y8G("hidden",!n.isServerGridPsa)("data",e.bMT(8,35,n.gridData))("reorderable",!0)("resizable",!0)("pageSize",n._user.UserProfile.user.rowsPerPage)("skip",n.state.skip)("sortable",e.lJ4(37,ee))("sort",n.state.sort)("pageable",e.eq3(39,ie,e.lJ4(38,te)))("filter",n.state.filter)("rowSelected",n.isRowSelected)("selectable",e.lJ4(41,ne))("filterable",n.isFilter),e.R7$(4),e.Y8G("width",35),e.R7$(12),e.Y8G("filterable",!1),e.R7$(3),e.Y8G("fileName",n.getDownloadName())("fetchData",n.allData),e.R7$(),e.Y8G("hidden",n._user.UserProfile.partner.psaType!==n.psaType.Autotask)("kendoGridBinding",n.gridAutoData)("reorderable",!0)("resizable",!0)("pageSize",n._user.UserProfile.user.rowsPerPage)("skip",n.state.skip)("sortable",e.lJ4(42,ee))("sort",n.state.sort)("pageable",e.eq3(44,ie,e.lJ4(43,te)))("filter",n.state.filter)("rowSelected",n.isRowSelected)("selectable",e.lJ4(46,ne))("filterable",n.isFilter),e.R7$(3),e.Y8G("width",35),e.R7$(12),e.Y8G("filterable",!1),e.R7$(3),e.Y8G("fileName",n.getDownloadName())("fetchData",n.allData))},dependencies:[h.bT,d.NXp,d._ab,d.vqx,d.Ioe,d.i4w,d.jqs,d.TiO,D.y,S.dg,y.j,h.Jj,x.eN],styles:[".epTitle[_ngcontent-%COMP%]{font-size:14px;padding:20px 0 10px;font-weight:700}"]})}}return i})(),Xn=(()=>{class i{constructor(){}static{this.\u0275fac=function(a){return new(a||i)}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["az-company"]],hostAttrs:[1,"container-fluid","overflow-hidden","h-100"],decls:1,vars:0,template:function(a,n){1&a&&e.nrm(0,"router-outlet")},dependencies:[T.n3],encapsulation:2})}}return i})();var N=l(816),ae=l(99998);const Yn=["grid"],Mn=()=>[10,20,50,100],Vn=i=>({pageSizes:i}),On=()=>({mode:"single"});function zn(i,s){1&i&&(e.j41(0,"div"),e.EFF(1,"Searching..."),e.k0s())}function Ln(i,s){1&i&&(e.j41(0,"div"),e.EFF(1,"No records available."),e.k0s())}function Jn(i,s){if(1&i&&e.DNE(0,zn,2,0,"div",8)(1,Ln,2,0,"div",8),2&i){e.XpG();const t=e.sdS(1);e.Y8G("ngIf",t&&t.loading),e.R7$(),e.Y8G("ngIf",t&&!t.loading)}}function Hn(i,s){1&i&&e.nrm(0,"span",9)}function Qn(i,s){if(1&i){const t=e.RV6();e.j41(0,"a",10),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.toggleFilter())}),e.nrm(1,"span",11),e.k0s()}}
1function Kn(i,s){if(1&i&&(e.j41(0,"kendo-grid-string-filter-menu",12),e.nrm(1,"kendo-filter-startswith-operator")(2,"kendo-filter-contains-operator")(3,"kendo-filter-eq-operator"),e.k0s()),2&i){const t=s.$implicit,n=s.filterService;e.Y8G("column",s.column)("filter",t)("filterService",n)}}function qn(i,s){1&i&&(e.j41(0,"span",13),e.EFF(1,"Name"),e.k0s())}let oe=(()=>{class i{constructor(t,a){this.user=t,this.hotkeysService=a,this.selectionChange=new e.bkB,this.isFilterable=!0,this.isRowSelected=n=>!1}toggleFilter(){return this.isFilterable=!this.isFilterable,!1}ngOnInit(){this.refreshFunc=this.hotkeysService.add(new N.t5("f2",t=>(this.refresh(),!1)))}refresh(){this.gridBinding&&this.gridBinding.rebind()}onSelectionChange(t){this.selectionChange.emit(t)}ngOnDestroy(){this.hotkeysService.remove(this.refreshFunc)}static{this.\u0275fac=function(a){return new(a||i)(e.rXU(j.D),e.rXU(N.dr))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["az-reports-grid"]],viewQuery:function(a,n){if(1&a&&(e.GBs(Yn,5),e.GBs(ae.V,5)),2&a){let o;e.mGM(o=e.lsd())&&(n.gridComponent=o.first),e.mGM(o=e.lsd())&&(n.gridBinding=o.first)}},outputs:{selectionChange:"selectionChange"},decls:9,vars:14,consts:[["grid",""],["gridBinding","",1,"h-100","overflow-hidden",3,"selectionChange","controller","reorderable","resizable","sortable","pageSize","pageable","filterable","rowSelected","selectable"],["kendoGridNoRecordsTemplate",""],[1,"gridGraphic",3,"width"],["kendoGridCellTemplate",""],["kendoGridHeaderTemplate",""],["field","name","title","Name"],["kendoGridFilterMenuTemplate",""],[4,"ngIf"],[1,"fal","fa-file-pdf"],["title","Toggle search","href","",2,"font-size","10px",3,"click"],[1,"fa","fa-search"],["operator","startswith",3,"column","filter","filterService"],["kendoTooltip","","tooltipClass","kendoHeaderToolTip","title","Name"]],template:function(a,n){if(1&a){const o=e.RV6();e.j41(0,"kendo-grid",1,0),e.bIt("selectionChange",function(r){return e.eBV(o),e.Njj(n.onSelectionChange(r))}),e.DNE(2,Jn,2,2,"ng-template",2),e.j41(3,"kendo-grid-column",3),e.DNE(4,Hn,1,0,"ng-template",4)(5,Qn,2,0,"ng-template",5),e.k0s(),e.j41(6,"kendo-grid-column",6),e.DNE(7,Kn,4,3,"ng-template",7)(8,qn,2,0,"ng-template",5),e.k0s()()}2&a&&(e.Y8G("controller","api/client-reports")("reorderable",!0)("resizable",!0)("sortable",!0)("pageSize",n.user.UserProfile.user.rowsPerPage)("pageable",e.eq3(11,Vn,e.lJ4(10,Mn)))("filterable",n.isFilterable)("rowSelected",n.isRowSelected)("selectable",e.lJ4(13,On)),e.R7$(3),e.Y8G("width",35))},dependencies:[h.bT,d._ab,d.Ioe,d.i4w,d.jqs,d.TiO,d.hwM,d.Qpn,d.VCe,d.Afz,d.Rxp,S.dg,y.j,ae.V],styles:["[_nghost-%COMP%]{height:100%}"]})}}return i})();var re=l(54281);function Wn(i,s){if(1&i){const t=e.RV6();e.j41(0,"blade-display",5),e.bIt("onEscape",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.closeReport())}),e.j41(1,"div",6)(2,"div",7),e.EFF(3," Report "),e.k0s(),e.j41(4,"div",8)(5,"button",9),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.closeReport())}),e.nrm(6,"span",10),e.EFF(7,"Close"),e.k0s()()(),e.j41(8,"div",11)(9,"h3",12),e.EFF(10),e.k0s(),e.nrm(11,"pdfviewer",13),e.j41(12,"div",14)(13,"button",15),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.closeReport())}),e.EFF(14,"Close"),e.k0s()()()()}if(2&i){const t=e.XpG();e.R7$(10),e.SpI(" ",t.reportLayout.name," "),e.R7$(),e.Y8G("src",t.pdfSrc)("name",t.reportLayout.name)("auth",!0)("showClose",!1)}}let Zn=(()=>{class i{constructor(t,a,n,o,c){this.browserutils=t,this.user=a,this.hotkeysService=n,this.blade=o,this.logRocketService=c,this.showReport=!1,this.reportLayout={id:0,name:"",description:"",isClientVisible:!1,includedModules:[]},this.pdfSrc=""}ngOnInit(){this.refreshFunc=this.hotkeysService.add(new N.t5("f2",t=>(this.refresh(),!1)))}refresh(){this.reportsGridComponent&&this.reportsGridComponent.refresh()}openReport(t){this.reportLayout=t.selectedRows[0].dataItem,this.showReport=!0,this.pdfSrc=`/api/client-reports/v2/${this.reportLayout.id}`,this.logRocketService.trackCustomEvent(re.hN.ReportOpened,{report_id:this.reportLayout.id,report_name:this.reportLayout.name})}closeReport(){return this.showReport=!1,this.pdfSrc="",this.blade.closeMe(),!1}ngOnDestroy(){this.hotkeysService.remove(this.refreshFunc)}static{this.\u0275fac=function(a){return new(a||i)(e.rXU(b.b),e.rXU(j.D),e.rXU(N.dr),e.rXU(v.C),e.rXU(re.ox))}}
1static{this.\u0275cmp=e.VBU({type:i,selectors:[["az-reports"]],viewQuery:function(a,n){if(1&a&&e.GBs(oe,5),2&a){let o;e.mGM(o=e.lsd())&&(n.reportsGridComponent=o.first)}},decls:5,vars:2,consts:[[1,"d-flex","flex-column","h-100"],[3,"onRefresh","title"],[1,"row","h-100","overflow-auto"],[3,"selectionChange"],["class","w-65-responsive",3,"onEscape",4,"ngIf"],[1,"w-65-responsive",3,"onEscape"],[1,"bladeHeader","clearfix"],[1,"bladeTitle"],[1,"bladeCommands"],["title","Close",1,"pageHeaderButton",3,"click"],[1,"fal","fa-times"],[1,"bladeBody"],["notranslate","",1,"clearfix"],[2,"display","block","height","calc(100vh - 200px)",3,"src","name","auth","showClose"],[1,"bladeButtons"],[1,"btn","btn-secondary",3,"click"]],template:function(a,n){1&a&&(e.j41(0,"div",0)(1,"page-header",1),e.bIt("onRefresh",function(){return n.refresh()}),e.k0s(),e.j41(2,"div",2)(3,"az-reports-grid",3),e.bIt("selectionChange",function(c){return n.openReport(c)}),e.k0s()()(),e.DNE(4,Wn,15,5,"blade-display",4)),2&a&&(e.R7$(),e.Y8G("title",n.user.GetPortalString("AccountReports","Reports")),e.R7$(3),e.Y8G("ngIf",n.showReport))},dependencies:[v.C,h.bT,D.y,P.H,oe]})}}return i})();var _=l(79547);const ts=T.iI.forChild([{path:"",component:Xn,children:[{path:"planner/timeline",redirectTo:"/projects-planning/planner/timeline",pathMatch:"full"},{path:"planner/timeline/:id",redirectTo:"/projects-planning/planner/timeline/:id",pathMatch:"full"},{path:"planner/board",redirectTo:"/projects-planning/planner/board",pathMatch:"full"},{path:"planner/board/:id",redirectTo:"/projects-planning/planner/board/:id",pathMatch:"full"},{path:"planner/list",redirectTo:"/projects-planning/planner/list",pathMatch:"full"},{path:"planner/list/:id",redirectTo:"/projects-planning/planner/list/:id",pathMatch:"full"},{path:"planner/options",redirectTo:"/projects-planning/planner/archive",pathMatch:"full"},{path:"planner/options/:id",redirectTo:"/projects-planning/planner/archive/:id",pathMatch:"full"},{path:"meetings",redirectTo:"/projects-planning/meetings",pathMatch:"full"},{path:"meetings/:id",redirectTo:"/projects-planning/meetings/:id",pathMatch:"full"},{path:"projects/projects-tickets",redirectTo:"/projects-planning/project-tickets/tickets",pathMatch:"full"},{path:"projects",redirectTo:"/projects-planning/project-tickets",pathMatch:"full"},{path:"agreements",component:M,canActivate:[k.q,F.m],title:"Agreements",data:{modules:[p.I.Account,p.I.Account_Agreements],claimType:_.nR.Account_Agreements,claimValue:_.aX.Read}},{path:"agreements/:id",component:M,canActivate:[k.q,F.m],title:"Agreements",data:{modules:[p.I.Account,p.I.Account_Agreements],claimType:_.nR.Account_Agreements,claimValue:_.aX.Read}},{path:"dashboards",component:L,canActivate:[k.q,F.m],title:"Dashboards",data:{modules:[p.I.Account,p.I.Account_Dashboards],claimType:_.nR.Account_Dashboards,claimValue:_.aX.Read}},{path:"dashboards/:id",component:L,canActivate:[k.q,F.m],title:"Dashboards",data:{modules:[p.I.Account,p.I.Account_Dashboards],claimType:_.nR.Account_Dashboards,claimValue:_.aX.Read}},{path:"feedback",component:H,canActivate:[k.q,F.m],title:"Feedback",data:{modules:[p.I.Account,p.I.Account_Feedback],claimType:_.nR.Account_Feedback,claimValue:_.aX.Read}},{path:"feedback/:id",component:H,canActivate:[k.q,F.m],title:"Feedback",data:{modules:[p.I.Account,p.I.Account_Feedback],claimType:_.nR.Account_Feedback,claimValue:_.aX.Read}},{path:"invoices",component:zi,canActivate:[k.q,F.m],title:"Invoices",data:{modules:[p.I.Account,p.I.Account_Invoices],claimType:_.nR.Account_Invoices,claimValue:_.aX.Read}},{path:"quotes",component:se,canActivate:[k.q,F.m],title:"Quotes",data:{modules:[p.I.Account,p.I.Account_Quotes],claimType:_.nR.Account_Quotes,claimValue:_.aX.Read}},{path:"quotes/:id",component:se,canActivate:[k.q,F.m],title:"Quotes",data:{modules:[p.I.Account,p.I.Account_Quotes],claimType:_.nR.Account_Quotes,claimValue:_.aX.Read}},{path:"reports",component:Zn,canActivate:[k.q,F.m],title:"Reports",data:{modules:[p.I.Account,p.I.Account_Reports],claimType:_.nR.Account,claimValue:_.aX.Read}},{path:"settings",component:dn,canActivate:[k.q,F.m],title:"Microsoft 365 Settings",data:{modules:[p.I.Account,p.I.Account_Settings],claimType:_.nR.Account_Settings,claimValue:_.aX.Read}}]}]);var is=l(35867),ns=l(93873);let ss=(()=>
1{class i{static{this.\u0275fac=function(a){return new(a||i)}}static{this.\u0275mod=e.$C({type:i})}static{this.\u0275inj=e.G2t({imports:[ts,ce.sb,ns.G,is._]})}}return i})()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.