1"use strict";(self.webpackChunkUxAngularOnline=self.webpackChunkUxAngularOnline||[]).push([[1281],{45159:(w,U,t)=>{t.d(U,{C:()=>r});const r={data:'<?xml version="1.0" encoding="utf-8"?>\x3c!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools --\x3e\n<svg width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n <path fill="none" stroke="currentColor" stroke-width="2" d="M2.99787498,0.999999992 L17.4999998,0.999999992 L20.9999998,4.50000005 L21,23 L3,23 L2.99787498,0.999999992 Z M16,1 L16,6 L21,6 M12,20 L12,11 M8,14 L12,10 L16,14"/>\n</svg>',name:"upload-document-icon"}},86291:(w,U,t)=>{t.d(U,{x:()=>r});const r={data:'<?xml version="1.0" ?>\n<svg width="800px" height="800px" viewBox="-16.32 0 368.09 368.09" xmlns="http://www.w3.org/2000/svg">\n\n<defs>\n<style>\n.cls-1{fill:#ffffff;}\n.cls-2{fill:currentColor;}\n.cls-3{fill:currentColor;}\n.cls-4{fill:currentColor;}\n.cls-5{fill:currentColor;}\n.cls-6{fill:currentColor;}\n.cls-7{opacity:0.5;}\n.cls-8{fill:currentColor;}\n</style>\n</defs>\n\n<g data-name="Layer 2" id="Layer_2">\n<g data-name="Layer 1" id="Layer_1-2">\n\n\x3c!-- A feh\xe9r h\xe1tt\xe9r \xe9s az \xe1rny\xe9k elt\xe1vol\xedtva --\x3e\n\n<path class="cls-3" d="M238.56,368.09h-195A43.64,43.64,0,0,1,0,324.51V43.59A43.64,43.64,0,0,1,43.59,0h195a43.64,43.64,0,0,1,43.59,43.59V123h-12V43.59A31.62,31.62,0,0,0,238.56,12h-195A31.62,31.62,0,0,0,12,43.59V324.51a31.62,31.62,0,0,0,31.59,31.59h195a31.62,31.62,0,0,0,31.59-31.59V279.93h12v44.58A43.64,43.64,0,0,1,238.56,368.09Z"/>\n\n<path class="cls-3" d="M60.84,112.86V93.34q0-9,4.9-13.18T78.52,76q8.1,0,13.29,3.9A12.71,12.71,0,0,1,97,90.62q0,3.17-1.33,4.31t-4.42,1.14q-5.67,0-5.74-3.46a17.2,17.2,0,0,0-.07-1.73A7.83,7.83,0,0,0,85,89.15a3.86,3.86,0,0,0-1-1.62,6.22,6.22,0,0,0-2-1.07A8.77,8.77,0,0,0,79,86q-6.63,0-6.63,7.36v19.51q0,7.37,6.55,7.36t6.63-7.36v-2.5H81.17a3,3,0,0,1-2.54-1.29,5.56,5.56,0,0,1,0-6.19,2.93,2.93,0,0,1,2.5-1.36H93.54a3.18,3.18,0,0,1,2.54,1.07,3.76,3.76,0,0,1,.92,2.54v7.73q0,9-4.93,13.18t-13.18,4.2q-8.17,0-13.11-4.2T60.84,112.86Z"/>\n\n<path class="cls-3" d="M103.63,126.34V79.43A3,3,0,0,1,105,77a5.92,5.92,0,0,1,3.61-1h13q8.25,0,13.18,4.2t4.93,13.18v19.07q0,9-4.93,13.18t-13.18,4.2h-13a5.92,5.92,0,0,1-3.61-1A3,3,0,0,1,103.63,126.34Zm11.49-6.55h6.55q6.63,0,6.63-7.36V93.34q0-7.36-6.63-7.36h-6.55Z"/>\n\n<path class="cls-3" d="M147.08,126.26V79.43A3.14,3.14,0,0,1,148.25,77a4.52,4.52,0,0,1,3.09-1h15.24q7.88,0,12.63,4.09T184,92.9v.37q0,8.76-5,12.92t-13.15,4.16h-7.29v15.91a2.86,2.86,0,0,1-1.69,2.61,9.37,9.37,0,0,1-8.1,0A2.86,2.86,0,0,1,147.08,126.26Zm11.49-24.74h7.29q6.63,0,6.63-7.36v-.81q0-7.36-6.63-7.36h-7.29Z"/>\n\n<path class="cls-3" d="M189,126.26V79.43A3.46,3.46,0,0,1,192.51,76h15.24q18.12,0,18.12,15.76,0,11.49-8.91,14.95l9,16.27a2.23,2.23,0,0,1,.37,1.33,5.35,5.35,0,0,1-2.32,4.05,7.58,7.58,0,0,1-4.9,1.91,3.82,3.82,0,0,1-3.68-2.13l-10.09-19.59h-4.86v17.75a2.86,2.86,0,0,1-1.69,2.61,9.37,9.37,0,0,1-8.1,0A2.86,2.86,0,0,1,189,126.26Zm11.49-26.58h7.29a7,7,0,0,0,4.93-1.58q1.69-1.58,1.69-5.27t-1.69-5.26A7,7,0,0,0,207.75,86h-7.29Z"/>\n\n<rect class="cls-3" height="12" width="92" x="57.46" y="162.43"/>\n<rect class="cls-3" height="12" width="92" x="57.46" y="191.39"/>\n<rect class="cls-3" height="12" width="92" x="57.46" y="220.36"/>\n\n<path class="cls-4" d="M276.81,269.38s52.64-26.32,52.64-65.8V150.95l-52.64-13.16-52.64,13.16v52.64C224.18,243.06,276.81,269.38,276.81,269.38Z"/>\n\n<path class="cls-5" d="M329.45,178.58v22c0,39.48-52.64,65.8-52.64,65.8s-52.63-26.32-52.63-65.8v-22c0,39.48,52.63,65.8,52.63,65.8S329.45,218.06,329.45,178.58Z"/>\n\n<path class="cls-3" d="M276.81,272.65l-2.68-1.34c-2.28-1.14-56-28.47-56-71.16V142.83l58.64-14.66,58.64,14.66v57.32c0,42.7-53.67,70-56,71.16ZM230.18,152.2v48c0,30.5,36.33,53.16,46.63,59,10.29-5.82,46.64-28.55,46.64-59v-48l-46.64-11.66Z"/>\n\n<path class="cls-6" d="M250.25,163.07l15.5-3L276.4,158c1.16-.22,2.37-.37,3.51-.68,1.79-.48,1,.38-.17-.23,1.58.86,3.93,1.11,5.65,1.59l10.74,3,15.52,4.37c3.72,1,5.31-4.74,1.6-5.79l-16-4.5c-5.1-1.43-10.73-3.92-16-4.5-5-.55-11.25,1.87-16.13,2.81l-16.47,3.19c-3.79.73-2.18,6.52,1.6,5.79Z"/>\n\n<g class="cls-7">\n<path class="cls-8" d="M38,35.95H72.77c3.86,0,3.87-6,0-6H38c-3.86,0-3.87,6,0,6Z"/>\n<path class="cls-8" d="M87.17,35.95h86.34c3.86,0,3.87-6,0-6H87.17c-3.86,0-3.87,6,0,6Z"/>\n</g>\n\n</g>\n</g>\n\n</svg>',name:"gdpr-document-icon"}},44578:(w,U,t)=>{t.d(U,{u:()=>E});var m,r=t(75359);class E{}
1m=E,E.functionName="[USM customers]",E.setLoading=(0,r.PH)(`${m.functionName} Sets customer list loading`,(0,r.Ky)()),E.loadCustomers=(0,r.PH)(`${m.functionName} Load customers`,(0,r.Ky)()),E.setCustomers=(0,r.PH)(`${m.functionName} Populate customers`,(0,r.Ky)()),E.setCountryList=(0,r.PH)(`${m.functionName} Sets country list`,(0,r.Ky)()),E.deleteCustomer=(0,r.PH)(`${m.functionName} Delete customer`,(0,r.Ky)()),E.revokeDeleteCustomer=(0,r.PH)(`${m.functionName} Revoke delete customer`,(0,r.Ky)()),E.toggleShowDeleted=(0,r.PH)(`${m.functionName} Toggle show deleted`),E.toggleShowSuppliers=(0,r.PH)(`${m.functionName} Toggle show suppliers`),E.setCustomerType=(0,r.PH)(`${m.functionName} Set customer type`,(0,r.Ky)()),E.setDateFilterParams=(0,r.PH)(`${m.functionName} Set date filter params`,(0,r.Ky)()),E.setFilteredCustomer=(0,r.PH)(`${m.functionName} Set filtered customer`,(0,r.Ky)())},61674:(w,U,t)=>{t.d(U,{X:()=>u});var p,r=t(75359),m=t(48665),E=t(37308),y=t(22189);class u{}p=u,u.selectState=d=>d.usmCustomers,u.selectIsLoading=(0,r.P1)(p.selectState,d=>d.isLoading),u.selectCustomers=(0,r.P1)(p.selectState,d=>d.customers),u.selectSuppliers=(0,r.P1)(p.selectState,d=>d.suppliers),u.selectShowDeleted=(0,r.P1)(p.selectState,d=>d.showDeleted),u.selectShowSuppliers=(0,r.P1)(p.selectState,d=>d.showSuppliers),u.selectCustomerType=(0,r.P1)(p.selectState,d=>d.customerType),u.selectDateFilterParams=(0,r.P1)(p.selectState,d=>d.dateFilterParams),u.selectCustomerId=(0,r.P1)(p.selectState,d=>d.filteredCustomer),u.selectDateFilterSubtitle=(0,r.P1)(E.k.selectAllLocalizedValues,p.selectDateFilterParams,(d,C)=>{const z=m.p.getValue(d,15237141,"Sz\u0171r\xe9si felt\xe9telek:");if(!C?.startDate&&!C?.endDate)return"";const K=new Date,I=C.endDate.getFullYear()===K.getFullYear()&&C.endDate.getMonth()===K.getMonth()&&C.endDate.getDate()===K.getDate();return 1970===C.startDate.getFullYear()&&0===C.startDate.getMonth()&&1===C.startDate.getDate()&&I?"":`${z} ${y.d.formatDateToReadableString(C.startDate)} - ${y.d.formatDateToReadableString(C.endDate)}`})},86786:(w,U,t)=>{t.d(U,{i:()=>J});var r=t(36895),m=t(24006),E=t(69544),y=t(73764),p=t(37599),u=t(7813),d=t(92174),C=t(73739),z=t(11502),K=t(66891),I=t(91251),G=t(53496),B=t(94650);let j=(()=>{class _{}return _.\u0275fac=function(c){return new(c||_)},_.\u0275mod=B.oAB({type:_}),_.\u0275inj=B.cJS({imports:[r.ez,m.UX,C.I,d.m,u.W,G.Z,K.Kz.forChild([I.o])]}),_})();var g=t(97626),tt=t(91959),N=t(44932),et=t(36879),Q=t(92777);let st=(()=>{class _{}return _.\u0275fac=function(c){return new(c||_)},_.\u0275mod=B.oAB({type:_}),_.\u0275inj=B.cJS({imports:[r.ez,u.W,m.u5,m.UX,N.P,y.z,C.I,K.Kz.forChild([I.o,et.S]),j,Q.I]}),_})(),J=(()=>{class _{}return _.\u0275fac=function(c){return new(c||_)},_.\u0275mod=B.oAB({type:_}),_.\u0275inj=B.cJS({imports:[r.ez,C.I,m.u5,m.UX,d.m,E.vi,z.Y,y.z,u.W,N.P,g.m,tt.i,j,G.Z,Q.I,p.D,st]}),_})()},84712:(w,U,t)=>{t.d(U,{l:()=>Mt});var r=t(75359),m=t(36053),E=t(8929),y=t(21086),p=t(63527),u=t(7625),d=t(75778),C=t(24850),z=t(27221),K=t(31307),I=t(72986),G=t(40943),B=t(92198),j=t(40537),g=t(34582),tt=t(50034),N=t(95766),et=t(74449),Q=t(96621),st=t(2139),J=t(86670),_=t(90521),T=t(61303),c=t(85385),L=t(33962),$=t(83995),Z=t(22189),M=t(27746),ot=t(4946),h=t(40415),v=t(15837),S=t(99169),k=t(14773),rt=t(81944),at=t(15044),R=t(44578),x=t(61674),e=t(94650),dt=t(57241),mt=t(47542),lt=t(61339),nt=t(77122),it=t(36895),ht=t(6715),pt=t(44098),gt=t(70410),vt=t(36748),l=t(63655),A=t(81995),F=t(33342),ft=t(69263),_t=t(79780),Dt=t(62763),Et=t(76939);const ut=["table"],Ct=["featureSidemenu"];function H(P,V){if(1&P){const s=e.EpF();e.ynx(0),e.TgZ(1,"app-usm-customers-table",1,2),e.NdJ("onTableKeydown",function(a){e.CHM(s);const n=e.oxw(3);return e.KtG(n.keydown(a))})("cellDoubleClick",function(){e.CHM(s);const a=e.oxw(3);return e.KtG(a.openUpdateCustomerModal())}),e.ALo(3,"async"),e.ALo(4,"async"),e.ALo(5,"async"),e.qZA(),e._UZ(6,"app-feature-sidemenu",3,4),e.ALo(8,"async"),e.BQk()}if(2&P){const s=V.ngLet,o=e.oxw().ngLet,a=e.oxw(2);let n;e.xp6(1),e.Q6J("title",s)("subTitle",e.lcZ(3,9,a.tableSubtitle$))("dataSource",o)("actions",e.lcZ(4,11,a.actions$))("loading",null!==(n=e.lcZ(5,13,a.isLoading$))&&void 0!==n&&n)("rowSelectionOnly",!1)("customerType",a.customerType),e.xp6(5),e.Q6J("items",e.lcZ(8,15,a.sidemenu$))("identifier",a.UsmSidemenuIdentifier)}}function X(P,V){if(1&P&&(e.ynx(0),e.YNc(1,H,9,17,"ng-container",0),e.ALo(2,"localize"),e.ALo(3,"localize"),e.BQk()),2&P){const s=e.oxw(2);e.xp6(1),e.Q6J("ngLet",s.isClient?e.xi3(2,1,16477633,"UNIX Service Manager / \xdcgyf\xe9llista"):e.xi3(3,4,16477634,"UNIX Service Manager / Besz\xe1ll\xedt\xf3lista"))}}function b(P,V){if(1&P&&(e.ynx(0),e.YNc(1,X,4,7,"ng-container",0),e.ALo(2,"async"),e.BQk()),2&P){const s=e.oxw();e.xp6(1),e.Q6J("ngLet",e.lcZ(2,1,s.combinedDataSource$))}}let Mt=(()=>{class P extends((0,$.t)()){constructor(s,o,a,n,D,q,St,Y,Pt,Tt,Lt,At,Ot,Ut,Rt,It){super(),this.store=s,this.modal=o,this.loc=a,this.keypress=n,this.route=D,this.router=q,this.location=St,this.alert=Y,this.keyboardNav=Pt,this.dateRangeService=Tt,this.storeHelper=Lt,this.usmKeyboardShortcutsService=At,this.fileClient=Ot,this.usmGdprDocumentClient=Ut,this.navigationService=Rt,this.customersPopupService=It,this.isLoading$=this.store.pipe((0,r.Ys)(x.X.selectIsLoading),(0,u.R)(this.destroyed$)),this.customerDataSource$=this.store.pipe((0,r.Ys)(x.X.selectCustomers),(0,u.R)(this.destroyed$)),this.supplierDataSource$=this.store.pipe((0,r.Ys)(x.X.selectSuppliers),(0,u.R)(this.destroyed$)),this.showSuppliers$=this.store.pipe((0,r.Ys)(x.X.selectShowSuppliers),(0,d.x)(),(0,u.R)(this.destroyed$)),this.canEdit$=this.store.select(at.FV.selectHasPermission(g.seD.UGYFEL_MOD)).pipe((0,d.x)(),(0,u.R)(this.destroyed$)),this.canSeeVehicles$=this.store.select(at.FV.selectHasPermission(g.seD.JARMU_MEGTEK)).pipe((0,d.x)(),(0,u.R)(this.destroyed$)),this.combinedDataSource$=(0,m.aj)([this.customerDataSource$,this.supplierDataSource$,this.showSuppliers$]).pipe((0,C.U)(([i,f,O])=>O&&this.isClient?[...i||[],...f||[]]:this.isClient?i:f),(0,u.R)(this.destroyed$)),this.tableInited$=new E.xQ,this.tableSubtitle$=this.store.select(x.X.selectDateFilterSubtitle),this.UsmSidemenuIdentifier=g.FLy.CUSTOMERS_SIDEMENU,this.canEdit=!1,this.isClient=!0,this.showDeleted$=this.store.pipe((0,r.Ys)(x.X.selectShowDeleted),(0,d.x)(),(0,u.R)(this.destroyed$)),this.sidemenu$=(0,m.aj)([this.showDeleted$,this.showSuppliers$,this.canEdit$,this.canSeeVehicles$]).pipe((0,C.U)(([i,f,O,yt])=>{const W={visibility:[M.S.Desktop,M.S.Tablet]};return[v.R.navigateBackButtonSidemenu(this.loc.getValue(14074156,"Vissza"),"Esc",()=>{T.D.navigateBack()},void 0,W),...O?[v.R.editButtonSidemenu(this.loc.getValue(14735462,"Szerkeszt\xe9s"),"Enter/F2",()=>{this.openUpdateCustomerModal()},void 0,{...W})]:[],v.R.separator(M.S.Desktop),v.R.refreshButtonSidemenu(this.loc.getValue(14074149,"Friss\xedt\xe9s"),"F5",()=>{this.loadDataSource()},void 0,W),v.R.separator(M.S.Desktop),...O?[v.R.addButtonSidemenu(this.isClient?this.loc.getValue(15236212,"\xdaj \xfcgyf\xe9l felv\xe9tele"):this.loc.getValue(15236213,"\xdaj besz\xe1ll\xedt\xf3 felv\xe9tele"),"Insert",()=>{this.openNewCustomerModal()},void 0,{...W})]:[],v.R.separator(M.S.Desktop),...O?[v.R.addButtonSidemenu(this.loc.getValue(16460412,"Dokumentum felt\xf6lt\xe9s"),"Alt+F",()=>{this.openUploadAttachmentsModal()},!0,{...W})]:[],...O?[v.R.downloadButtonSidemenu(this.loc.getValue(16683696,"Felt\xf6lt\xf6tt dokumentumok megtekint\xe9se"),"F3",()=>{this.openImageViewerModal()},!0,{...W})]:[],v.R.gdprDocumentButtonSidemenu(this.loc.getValue(17722958,"GDPR nyilatkozat let\xf6lt\xe9se"),"Alt+H",()=>{this.generateGdprForFocusedCustomer()},void 0,W),v.R.gdprDocumentButtonSidemenu(this.loc.getValue(16683693,"GDPR nyilatkozat nyomtat\xe1sa"),"Alt+G",()=>{this.generateGdprForFocusedCustomer(g.Xr.Printer)},void 0,W),v.R.separator(M.S.Desktop),v.R.calendarSideMenu(this.loc.getValue(14387544,"D\xe1tum sz\u0171r\xe9s"),"Alt+F10",()=>{this.openDateFilterModal()},!0),...yt?[v.R.carSideMenu(this.loc.getValue(16700935,"Kapcsolt j\xe1rm\u0171vek megjelen\xedt\xe9se"),"Alt+F12",()=>
1{this.openAttachedCarList()},void 0,{...W})]:[],v.R.separator(M.S.Desktop),...O?[v.R.deleteButtonSidemenu(this.loc.getValue(17119247,"T\xf6rl\xe9s/Aktiv\xe1l\xe1s"),"Delete",()=>{const ct=this.table?.getFocusedCellData()?.dataObject;!ct?.customerId||(ct.isDeleted?this.openCustomerRevokeRemoveModal(ct):this.openCustomerRemoveModal(ct))},void 0,{...W})]:[],v.R.separator(M.S.Desktop),v.R.showDeletedButtonSidemenu(this.loc.getValue(15236112,"Besz\xe1ll\xedt\xf3k"),"Alt+B",()=>{this.toggleShowSuppliers()},!0,{identifier:"showSuppliersToggle",isActive:f,hidden:this.customerType===g.z6Q.BESZALLITO,visibility:M.S.Desktop}),v.R.showDeletedButtonSidemenu(this.loc.getValue(14074151,"T\xf6r\xf6lt mutat"),"Alt+S",()=>{this.toggleShowDeleted()},!0,{identifier:"showDeletedToggle",isActive:i})]})),this.actions$=this.sidemenu$.pipe((0,C.U)(i=>et.n.sidemenuToHeadline(i.filter(f=>!f.hidden),this.loc))),this.openNewCustomerModal=()=>{this.customersPopupService.openCustomersPopup(this.isClient?this.loc.getValue(15236212,"\xdaj \xfcgyf\xe9l felv\xe9tele"):this.loc.getValue(15236213,"\xdaj besz\xe1ll\xedt\xf3 felv\xe9tele"),this.customerType,this.keypress,void 0).pipe((0,u.R)(this.destroyed$),(0,z.K)(()=>(0,y.of)(void 0))).subscribe(i=>{!i||(this.loadDataSource(),this.combinedDataSource$.pipe((0,K.T)(1),(0,I.q)(1),(0,G.g)(0),(0,u.R)(this.destroyed$)).subscribe(()=>{this.focusRow(i)}))})},this.openUpdateCustomerModal=()=>{if(!this.canEdit)return;var i=this.table.getFocusedCellData().dataObject;if(!i||!i?.customerId||""===i?.customerId)return;const f=this.isClient?this.loc.getValue(14739440,"\xdcgyf\xe9l m\xf3dos\xedt\xe1sa"):this.loc.getValue(15236203,"Besz\xe1ll\xedt\xf3 m\xf3dos\xedt\xe1sa"),O=this.isClient?this.loc.getValue(15774134,"A m\u0171velet nem lehets\xe9ges, mert az \xfcgyf\xe9l m\xe1r t\xf6r\xf6lve lett."):this.loc.getValue(15774135,"A m\u0171velet nem lehets\xe9ges, mert a besz\xe1ll\xedt\xf3 m\xe1r t\xf6r\xf6lve lett.");i.isDeleted?this.alert.showError(f,[O]):this.customersPopupService.openCustomersPopup(f,this.customerType,this.keypress,i).pipe((0,u.R)(this.destroyed$),(0,z.K)(()=>(0,y.of)(void 0))).subscribe(yt=>{!yt||this.loadDataSource()})},this.keydown=i=>{const f=(...O)=>L.X.doesKeyboardEventExactlyMatch(i,O);if(f(c.m.Escape))return L.X.stopEvent(i),void T.D.navigateBack();if(f(c.m.Insert)&&this.canEdit)return this.openNewCustomerModal(),void L.X.stopEvent(i);if((f(c.m.Enter)||f(c.m.F2))&&this.canEdit)return this.openUpdateCustomerModal(),void L.X.stopEvent(i);if(f(c.m.F5))return i.repeat||this.loadDataSource(),void L.X.stopEvent(i);if(f(c.m.Delete)&&this.canEdit){const O=this.table?.getFocusedCellData()?.dataObject;if(!O?.customerId)return;return O.isDeleted?this.openCustomerRevokeRemoveModal(O):this.openCustomerRemoveModal(O),void L.X.stopEvent(i)}return f(c.m.Alt,c.m.S)?(this.toggleShowDeleted(),void L.X.stopEvent(i)):f(c.m.Alt,c.m.B)?(this.toggleShowSuppliers(),void L.X.stopEvent(i)):f(c.m.Alt,c.m.F)&&this.canEdit?(L.X.stopEvent(i),void this.openUploadAttachmentsModal()):f(c.m.F3)&&this.canEdit?(this.openImageViewerModal(),void L.X.stopEvent(i)):f(c.m.Alt,c.m.H)?(this.generateGdprForFocusedCustomer(),void L.X.stopEvent(i)):f(c.m.Alt,c.m.G)?(this.generateGdprForFocusedCustomer(g.Xr.Printer),void L.X.stopEvent(i)):f(c.m.Alt,c.m.F10)?(this.openDateFilterModal(),void L.X.stopEvent(i)):f(c.m.Alt,c.m.F11)?(this.openHistoryPage(),void L.X.stopEvent(i)):f(c.m.Alt,c.m.F12)?(this.openAttachedCarList(),void L.X.stopEvent(i)):void 0}
1,this.getSubtitle=i=>rt.$.getReceiptSubtitle(i),!this.customerType&&void 0!==this.route.snapshot.data.customerType&&(this.customerType=this.route.snapshot.data.customerType),this.isClient=this.customerType===g.z6Q.UGYFEL,this.canEdit$.pipe((0,u.R)(this.destroyed$)).subscribe(i=>{this.canEdit=i})}set mainTableSetter(s){s&&s.table&&this.tableInited$.next(s.table)}ngOnInit(){this.store.dispatch(R.u.setCustomerType({customerType:this.customerType}));const s=this.route.snapshot.queryParamMap,o=s.has("startDate")&&s.has("endDate"),a=s.has(S.Z.customerSearchIdQueryParam);if(!o){const n=this.storeHelper.selectSync(x.X.selectDateFilterParams);this.router.navigate([],{queryParams:{startDate:Z.d.formatDateToSqlString(n.startDate),endDate:Z.d.formatDateToSqlString(n.endDate)},queryParamsHandling:"merge",replaceUrl:!0})}if(a){const n=s.get(S.Z.customerSearchIdQueryParam);this.store.dispatch(R.u.setFilteredCustomer({filteredCustomer:{customerId:n}})),n&&this.combinedDataSource$.pipe((0,B.h)(D=>!!D?.some(q=>q?.customerId===n)),(0,I.q)(1),(0,G.g)(0),(0,u.R)(this.destroyed$)).subscribe(()=>{this.focusRow(n),this.openUpdateCustomerModal()})}this.dateRangeService.watch(this.route,({startDate:n,endDate:D})=>{this.store.dispatch(R.u.setDateFilterParams({params:{startDate:new Date(n),endDate:new Date(D)}})),this.loadDataSource()},()=>{this.alert.showError(this.loc.getValue(14738145,"Hiba t\xf6rt\xe9nt a m\u0171velet sor\xe1n."),[this.loc.getValue(15240917,"K\xe9rj\xfck, kezd\u0151 d\xe1tumnak kor\xe1bbi d\xe1tumot adjon meg, mint a v\xe9ge d\xe1tum.")])}),(0,st.ph)(this.route,"id",this.destroyed$,this.tableInited$,this.combinedDataSource$,"customerId"),this.keyboardNav.startListeningOnGlobalKeydownEvents(),this.subscribeGlobalFocusEvents(),this.sidemenu$.pipe((0,I.q)(1)).subscribe(n=>this.initKeyboardShortcutsHelper(n))}ngOnDestroy(){super.ngOnDestroy()}openUploadAttachmentsModal(s=!1){const o=this.table?.getFocusedCellData()?.dataObject;if(o){if(o.isDeleted)return void this.alert.showError(this.loc.getValue(2849132,"F\xe1jlok csatol\xe1sa"),[this.loc.getValue(16485196,"Lez\xe1rt bizonylathoz nem lehet tov\xe1bbi f\xe1jlokat csatolni.")]);if(this.storeHelper.selectSync(N.s.selectMobileMode))return void this.router.navigate(["service-manager","attachment-upload-mobile"],{queryParams:{[S.Z.receiptIdQueryParam]:o.customerId,[S.Z.fromPageIdQueryParam]:g.GF.USM_UGYFEL}});(0,p.D)(this.modal.usmCustomComponent(this.loc.getValue(2849132,"F\xe1jlok csatol\xe1sa"),ot.W,{innerComponentData:{params:new _.M({subtitle:this.getSubtitle(o),fromPageId:g.GF.USM_UGYFEL,uploadMode:h.Q.Deferred,attachmentsIdProvider:()=>o.customerId,isReadOnly:s})},modalOptions:{...Q.Z.DefaultMobileXxlFullScreenGreyWithSidemenu}}).result).pipe((0,u.R)(this.destroyed$),(0,z.K)(()=>(0,y.of)(null)))}}openImageViewerModal(){const s=this.table?.getFocusedCellData()?.dataObject;!s||this.store.dispatch((0,tt.pT)({title:this.loc.getValue(15235387,"Csatolt f\xe1jlok"),subtitle:this.getSubtitle(s),downloadButton:!0,enableFullScreen:!1,imageSize:"uek",honnanTab:g.GF.USM_UGYFEL,honnanErt:s.customerId,downloadButtonCallBack:(o,a)=>{this.fileClient.getFile(o,a.fileName,!a.isImage,!1,g.spE.Original).pipe((0,I.q)(1)).subscribe(n=>{J.P.downloadBlob(n.data,n.fileName)})}}))}generateGdprForFocusedCustomer(s=g.Xr.Pdf){const o=this.table?.getFocusedCellData()?.dataObject;if(!o||!o.customerId)return;const a=new g.wav({customerId:o.customerId,customerType:this.isClient?g.z6Q.UGYFEL:g.z6Q.BESZALLITO});this.store.dispatch(R.u.setLoading({isLoading:!0})),this.usmGdprDocumentClient.generateGdprDocument(a).pipe((0,I.q)(1),(0,j.x)(()=>this.store.dispatch(R.u.setLoading({isLoading:!1})))).subscribe(n=>{if(!n||!n?.valid)return void this.alert.showError(this.loc.getValue(14738145,"Hiba t\xf6rt\xe9nt a m\u0171velet sor\xe1n."),n?.errorMessages);const D=this.createPdfBlobFromResponse(n);D?s===g.Xr.Pdf?J.P.downloadBlob(D,n.fileName??"gdpr.pdf"):s===g.Xr.Printer&&this.printPdfBlob(D):this.alert.showError(this.loc.getValue(14738145,"Hiba t\xf6rt\xe9nt a m\u0171velet sor\xe1n."),[])})}createPdfBlobFromResponse(s){if(s.pdf)try{const o=atob(s.pdf),a=new Array(o.length);for(let D=0;D<o.length;
1D++)a[D]=o.charCodeAt(D);const n=new Uint8Array(a);return new Blob([n],{type:"application/pdf"})}catch{}if(s.base64Pdf){const o=atob(s.base64Pdf),a=new Array(o.length);for(let D=0;D<o.length;D++)a[D]=o.charCodeAt(D);const n=new Uint8Array(a);return new Blob([n],{type:"application/pdf"})}return null}printPdfBlob(s){const o=URL.createObjectURL(s),a=document.createElement("iframe");a.style.display="none",a.src=o,document.body.appendChild(a),a.onload=()=>{setTimeout(()=>{a.contentWindow?.focus(),a.contentWindow?.print()},0)}}toggleShowSuppliers(){this.store.dispatch(R.u.toggleShowSuppliers())}toggleShowDeleted(){this.store.dispatch(R.u.toggleShowDeleted())}initKeyboardShortcutsHelper(s){const D=(this.isClient?["customer-list"]:["supplier-list"]).map(Y=>this.usmKeyboardShortcutsService.getKeyboardShortcutsTabByUrl(Y));if(D.some(Y=>!Y))return;const[q]=D;[{...q,commands:[...q.commands,...rt.$.convertSidemenuItemsToKeyboardShortcutsCommands(s)]}].forEach(Y=>this.usmKeyboardShortcutsService.pushTab(Y))}subscribeGlobalFocusEvents(){this.keyboardNav.getEvents$().pipe((0,u.R)(this.destroyed$)).subscribe(s=>{switch(s){case"Content":this.table?.table.focus();break;case"FeatureSidemenu":this.featureSidemenu?.focus()}})}loadDataSource(){this.store.dispatch(R.u.loadCustomers({customerType:this.customerType}))}openHistoryPage(){const s=this.table?.getFocusedCellData()?.dataObject;if(s)return this.navigationService.navigate(`${k.A.serviceManager}/${k.A.customerVehiscleHistory}?${S.Z.customerSearchIdQueryParam}=${s?.customerId}`),"stop"}openDateFilterModal(){const s=this.storeHelper.selectSync(x.X.selectDateFilterParams);this.dateRangeService.openDateRangeModal({title:this.loc.getValue(14387544,"D\xe1tum sz\u0171r\xe9s"),dateRange:{startDate:s?.startDate,endDate:s?.endDate},isMasterData:!0},o=>{this.store.dispatch(R.u.setDateFilterParams({params:o}))})}openAttachedCarList(){var s=this.table.getFocusedCellData().dataObject;if(!s?.customerId)return;const o=this.router.createUrlTree([`/${k.A.serviceManager}/${k.A.usmVehicleList}`],{queryParams:{[S.Z.customerSearchIdQueryParam]:s.customerId}}),a=this.location.prepareExternalUrl(o.toString());this.navigationService.navigate(a)}focusRow(s){this.table?.table?.focusRowAndCell({identifierValue:s}),this.table?.table?.scrollToCurrentlyFocusedRowAndCell()}openCustomerRemoveModal(s){if(!s)return;const o=this.isClient?this.loc.getValue(14074144,"\xdcgyf\xe9l t\xf6rl\xe9se"):this.loc.getValue(15774136,"Besz\xe1ll\xedt\xf3 t\xf6rl\xe9se"),a=this.isClient?this.loc.getValue(15774134,"A m\u0171velet nem lehets\xe9ges, mert az \xfcgyf\xe9l m\xe1r t\xf6r\xf6lve lett."):this.loc.getValue(15774135,"A m\u0171velet nem lehets\xe9ges, mert a besz\xe1ll\xedt\xf3 m\xe1r t\xf6r\xf6lve lett.");s.isDeleted?this.alert.showError(o,[a]):s.customerType!==g.z6Q.UNIX?this.modal.confirm(this.loc.getValue(15236214,"Biztosan t\xf6r\xf6lni szeretn\xe9 a kijel\xf6lt sort?"),this.loc.getValue(14074578,"T\xf6rl\xe9s meger\u0151s\xedt\xe9se"),{primaryActionText:this.loc.web.Torles,secondaryActionText:this.loc.web.Megsem},this.keypress).result.then(n=>{if(n){let D=new g.Lx1({customerId:s.customerId});this.store.dispatch(R.u.deleteCustomer({deleteParams:D,customerType:this.customerType}))}}):this.alert.showError(o,[this.loc.getValue(17114979,"Ez a besz\xe1ll\xedt\xf3 az Unix Aut\xf3 Kft. \xe1ltal \xfczemeltetett partner, ez\xe9rt nem t\xf6r\xf6lhet\u0151.")])}openCustomerRevokeRemoveModal(s){if(!s)return;const o=this.isClient?this.loc.getValue(17119212,"\xdcgyf\xe9l aktiv\xe1l\xe1sa"):this.loc.getValue(17119214,"Besz\xe1ll\xedt\xf3 aktiv\xe1l\xe1sa"),a=this.isClient?this.loc.getValue(17119179,"A m\u0171velet nem lehets\xe9ges, mert az \xfcgyf\xe9l m\xe1r akt\xedv \xe1llapotban van."):this.loc.getValue(17119175,"A m\u0171velet nem lehets\xe9ges, mert a besz\xe1ll\xedt\xf3 m\xe1r akt\xedv \xe1llapotban van.");s.isDeleted?this.modal.confirm(this.loc.getValue(17119194,"Biztosan aktiv\xe1lni szeretn\xe9 a kijel\xf6lt sort?"),o,{primaryActionText:this.loc.getValue(17119244,"Aktiv\xe1l\xe1s"),secondaryActionText:this.loc.web.Megsem},this.keypress).result.then(n=>
1{n&&this.store.dispatch(R.u.revokeDeleteCustomer({customerId:s.customerId,customerType:this.customerType}))}):this.alert.showError(o,[a])}}return P.\u0275fac=function(s){return new(s||P)(e.Y36(r.yh),e.Y36(dt.Z),e.Y36(mt.z),e.Y36(lt.v),e.Y36(nt.gz),e.Y36(nt.F0),e.Y36(it.Ye),e.Y36(ht.u),e.Y36(pt.YE),e.Y36(gt.q),e.Y36(vt.F),e.Y36(l.P),e.Y36(g.bau),e.Y36(g.oqo),e.Y36(A.f),e.Y36(F._))},P.\u0275cmp=e.Xpm({type:P,selectors:[["app-usm-customers"]],viewQuery:function(s,o){if(1&s&&(e.Gf(ut,5),e.Gf(Ct,5),e.Gf(ut,5)),2&s){let a;e.iGM(a=e.CRH())&&(o.table=a.first),e.iGM(a=e.CRH())&&(o.featureSidemenu=a.first),e.iGM(a=e.CRH())&&(o.mainTableSetter=a.first)}},inputs:{customerType:"customerType"},features:[e.qOj],decls:2,vars:3,consts:[[4,"ngLet"],[3,"title","subTitle","dataSource","actions","loading","rowSelectionOnly","customerType","onTableKeydown","cellDoubleClick"],["table",""],[3,"items","identifier"],["featureSidemenu",""]],template:function(s,o){1&s&&(e.YNc(0,b,3,3,"ng-container",0),e.ALo(1,"async")),2&s&&e.Q6J("ngLet",e.lcZ(1,1,o.isLoading$))},dependencies:[ft.h,_t.L,Dt.t,it.Ov,Et.F],styles:["[_nghost-%COMP%]{font-size:16px;display:flex;flex-grow:1}"]}),P})()},41281:(w,U,t)=>{t.r(U),t.d(U,{UnixServiceManagerCustomerModule:()=>vt});var r=t(36895),m=t(24006),E=t(66891),y=t(18562),p=t(75359),u=t(69544),d=t(2449),C=t(81830),z=t(13950),K=t(8343),I=t(45159),G=t(86291),B=t(21003),j=t(86212),g=t(7813),tt=t(92174),N=t(73739),et=t(44768),Q=t(57648),st=t(37599),J=t(11502),_=t(3587),T=t(21086),c=t(68896),L=t(87168),$=t(87545),Z=t(27221),M=t(34582),ot=t(89380),h=t(44578),v=t(61674),S=t(94650),k=t(61339),rt=t(97185),at=t(57241),R=t(47542);let x=(()=>{class l{constructor(F,ft,_t,Dt,Et,ut,Ct){this.keypress=F,this.actions$=ft,this.customerClient=_t,this.store=Dt,this.toastr=Et,this.modal=ut,this.loc=Ct,this.loadCustomers=(0,y.GW)(()=>this.actions$.pipe((0,y.l4)(h.u.loadCustomers,h.u.toggleShowDeleted,h.u.toggleShowSuppliers),(0,L.M)(this.store.select(v.X.selectCustomerType),this.store.select(v.X.selectShowDeleted),this.store.select(v.X.selectShowSuppliers),this.store.select(v.X.selectDateFilterParams),this.store.select(v.X.selectCustomerId)),(0,$.w)(([H,X,b,Mt,P,V])=>(this.store.dispatch(h.u.setLoading({isLoading:!0})),H.type===h.u.toggleShowSuppliers.type?this.customerClient.getCustomers(new M.Usf({customerType:M.z6Q.BESZALLITO,isDeleted:b,startDate:P?.startDate,endDate:P?.endDate,customerId:V?.customerId})).pipe((0,Z.K)(()=>(0,T.of)([])),(0,$.w)(o=>(0,T.of)(h.u.setCustomers({customerType:M.z6Q.BESZALLITO,customers:o??[]}),h.u.setLoading({isLoading:!1})))):this.customerClient.getCustomers(new M.Usf({customerType:X,isDeleted:b,startDate:P?.startDate,endDate:P?.endDate,customerId:V?.customerId})).pipe((0,Z.K)(()=>(0,T.of)([])),(0,$.w)(o=>(0,T.of)(h.u.setCustomers({customerType:X,customers:o??[]}),h.u.setLoading({isLoading:!1})))))))),this.deleteCustomer=(0,y.GW)(()=>this.actions$.pipe((0,y.l4)(h.u.deleteCustomer),(0,$.w)(({deleteParams:H,customerType:X})=>(this.store.dispatch(h.u.setLoading({isLoading:!0})),this.customerClient.removeCustomer(H).pipe((0,Z.K)(()=>(0,T.of)(new M.euj)),(0,$.w)(b=>b?.valid?(this.toastr.success(this.loc.getValue(15249957,"Az \xfcgyf\xe9l t\xf6rl\xe9se sikeresen megt\xf6rt\xe9nt."),this.loc.getValue(14074139,"\xdcgyf\xe9l m\u0171velet")),(0,T.of)(h.u.loadCustomers({customerType:X}))):(h.u.setLoading({isLoading:!1}),this.modal.alert(b?.errorMessages??[this.loc.getValue(14738145,"Hiba t\xf6rt\xe9nt a m\u0171velet sor\xe1n.")],this.loc.getValue(14074144,"\xdcgyf\xe9l t\xf6rl\xe9se"),{alertType:ot.d.Danger,buttonText:this.loc.getValue(14074106,"Rendben")},this.keypress,!0),c.E))))))),this.revokeDeleteCustomer=(0,y.GW)(()=>this.actions$.pipe((0,y.l4)(h.u.revokeDeleteCustomer),(0,$.w)(({customerId:H,customerType:X})=>(this.store.dispatch(h.u.setLoading({isLoading:!0})),this.customerClient.revokeRemoveCustomer(H).pipe((0,Z.K)(()=>(0,T.of)(new M.euj)),(0,$.w)(b=>b?.valid?(this.toastr.success(this.loc.getValue(17119246,"Sikeres aktiv\xe1l\xe1s."),this.loc.getValue(14074139,"\xdcgyf\xe9l m\u0171velet")),(0,T.of)(h.u.loadCustomers({customerType:X}))):(h.u.setLoading({isLoading:!1}),this.modal.alert(b?.errorMessages??[this.loc.getValue(14738145,"Hiba t\xf6rt\xe9nt a m\u0171velet sor\xe1n.")],this.loc.getValue(17119212,"\xdcgyf\xe9l aktiv\xe1l\xe1sa"),{alertType:ot.d.Danger,buttonText:this.loc.getValue(14074106,"Rendben")},this.keypress,!0),c.E)))))))}}return l.\u0275fac=function(F){return new(F||l)(S.LFG(k.v),S.LFG(y.eX),S.LFG(M.Yx7),S.LFG(p.yh),S.LFG(rt._W),S.LFG(at.Z),S.LFG(R.z))},l.\u0275prov=S.Yz7({token:l,factory:l.\u0275fac}),l})();const e={isLoading:!1,customers:void 0,suppliers:[],showDeleted:!1,showSuppliers:!1,customerType:M.z6Q.UGYFEL,dateFilterParams:{startDate:new Date(1970,0,1),endDate:new Date}},dt=(0,p.Lq)(e,(0,p.on)(h.u.setLoading,(l,{isLoading:A})=>({...l,isLoading:A})),(0,p.on)(h.u.setCustomers,(l,{customerType:A,customers:F})=>A===M.z6Q.UGYFEL?{...l,customers:F}:{...l,suppliers:F}),(0,p.on)(h.u.toggleShowDeleted,l=>({...l,showDeleted:!l.showDeleted})),(0,p.on)(h.u.toggleShowSuppliers,l=>({...l,showSuppliers:!l.showSuppliers})),(0,p.on)(h.u.setCustomerType,(l,{customerType:A})=>({...l,customerType:A})),(0,p.on)(h.u.setFilteredCustomer,(l,{filteredCustomer:A})=>({...l,filteredCustomer:A})),(0,p.on)(h.u.setDateFilterParams,(l,{params:A})=>({...l,dateFilterParams:A})));var mt=t(86786),lt=t(77122),nt=t(84712),it=t(22569),ht=t(63378);const pt=[{path:"",component:nt.l,resolve:[it.E],data:{szotarParams:ht.j}}];let gt=(()=>{class l{}return l.\u0275fac=function(F){return new(F||l)},l.\u0275mod=S.oAB({type:l}),l.\u0275inj=S.cJS({imports:[lt.Bz.forChild(pt),lt.Bz]}),l})(),vt=(()=>{class l{}return l.\u0275fac=function(F){return new(F||l)},l.\u0275mod=S.oAB({type:l}),l.\u0275inj=S.cJS({imports:[r.ez,gt,tt.m,st.D,N.I,m.u5,m.UX,et.H,d.y,Q.A,y.sQ.forFeature
1([x]),p.Aw.forFeature("usmCustomers",dt),E.Kz.forChild([G.x,C.O,K.i,j.o,B._,I.C,z.V]),u.vi,J.Y,g.W,_.B,mt.i]}),l})()}}]);
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.