1(self.webpackChunkloocalio=self.webpackChunkloocalio||[]).push([[1439],{81439:(e,o,t)=>{"use strict";t.r(o),t.d(o,{CompanyEditPageModule:()=>ht});var n=t(38583),i=t(94490),r=t(63423),a=t(79765),c=t(46782),s=t(37716),l=t(46289),m=t(34274),p=t(95038),d=t(71402),u=t(50384),g=t(35700),f=t(69406),h=t(92406),y=t(55969),Z=t(65353),v=t(84280),b=t(83348),_=t(94506);const x=["fileInput"];function T(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"ion-button",17),s.NdJ("click",function(){return s.CHM(e),s.oxw(3).toggleReorderGroup()}),s._UZ(1,"ion-icon",18),s._uU(2," Zmie\u0144 kolejno\u015b\u0107 "),s.qZA()}}function A(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"ion-button",19),s.NdJ("click",function(){return s.CHM(e),s.oxw(3).cancelReorder()}),s._UZ(1,"ion-icon",20),s._uU(2," Anuluj "),s.qZA()}}function w(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"ion-button",21),s.NdJ("click",function(){return s.CHM(e),s.oxw(3).saveReorder()}),s._UZ(1,"ion-icon",22),s._uU(2," Zapisz "),s.qZA()}}function I(e,o){if(1&e&&(s.TgZ(0,"ion-item"),s.YNc(1,T,3,0,"ion-button",14),s.YNc(2,A,3,0,"ion-button",15),s.YNc(3,w,3,0,"ion-button",16),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.Q6J("ngIf",e.reorderDisabled),s.xp6(1),s.Q6J("ngIf",!e.reorderDisabled),s.xp6(1),s.Q6J("ngIf",!e.reorderDisabled)}}function C(e,o){1&e&&(s.TgZ(0,"ion-badge",28),s._uU(1,"Zdj\u0119cie w tle"),s.qZA())}function q(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"ion-item"),s._UZ(1,"ion-reorder",23),s.TgZ(2,"ion-thumbnail"),s._UZ(3,"img",24),s.qZA(),s.TgZ(4,"ion-label"),s.TgZ(5,"h3"),s._uU(6,"Zdj\u0119cie w galerii"),s.qZA(),s.YNc(7,C,2,0,"ion-badge",25),s.qZA(),s.TgZ(8,"ion-button",26),s.NdJ("click",function(o){const t=s.CHM(e).$implicit;return s.oxw(2).showImagePopover(t,o)}),s._UZ(9,"ion-icon",27),s.qZA(),s.qZA()}if(2&e){const e=o.$implicit;s.xp6(3),s.Q6J("src",e.miniature,s.LSH),s.xp6(4),s.Q6J("ngIf",e.image_type&&"cover-image"===e.image_type)}}function U(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"loc-card-crud"),s.TgZ(1,"ion-card",2),s.TgZ(2,"ion-item",3),s.TgZ(3,"ion-label"),s.TgZ(4,"h2"),s._uU(5,"Galeria zdj\u0119\u0107"),s.qZA(),s.TgZ(6,"p",4),s._uU(7),s.qZA(),s.qZA(),s.TgZ(8,"ion-button",5),s.NdJ("click",function(){return s.CHM(e),s.oxw().showUploadDialog()}),s._UZ(9,"ion-icon",6),s._uU(10," Dodaj "),s.qZA(),s.TgZ(11,"ion-button",5),s.NdJ("click",function(){return s.CHM(e),s.oxw().changeViewImages()}),s._UZ(12,"ion-icon",7),s._uU(13," Dalej "),s.qZA(),s.TgZ(14,"input",8,9),s.NdJ("change",function(o){return s.CHM(e),s.oxw().uploadFiles(o)}),s.qZA(),s.qZA(),s.TgZ(16,"ion-card-content"),s.TgZ(17,"ion-list",10),s.YNc(18,I,4,3,"ion-item",11),s.TgZ(19,"ion-reorder-group",12),s.NdJ("ionItemReorder",function(o){return s.CHM(e),s.oxw().doReorder(o)}),s.YNc(20,q,10,2,"ion-item",13),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=s.oxw();s.xp6(7),s.hij(" Maksymalna ilo\u015b\u0107 zdj\u0119\u0107: ",e.company.package.pictures_count," "),s.xp6(11),s.Q6J("ngIf",(null==e.images?null:e.images.length)>0),s.xp6(2),s.Q6J("ngForOf",e.images)}}function k(e,o){1&e&&(s.TgZ(0,"div",29),s._UZ(1,"ion-spinner",30),s.qZA())}let D=(()=>{class e{constructor(e,o,t,n,i){this.companiesService=e,this.loadingService=o,this.alertsService=t,this.alertController=n,this.popoverController=i,this.isLoading=!0,this.reorderDisabled=!0,this.companyImagesDone=new s.vpe}ngOnInit(){this.fetchData()}changeViewImages(){this.companyImagesDone.emit(!0)}fetchData(){this.isLoading=!0,this.companiesService.getCompany(this.company.id).subscribe(e=>{console.log(e),this.company=e,this.company.images&&(this.images=this.company.images.slice()),this.isLoading=!1})}doReorder(e){this.images=e.detail.complete(this.images)}cancelReorder(){this.fetchData(),this.reorderDisabled=!0}saveReorder(){this.isLoading=!0,this.images.forEach((e,o)=>e.order=o+1),this.companiesService.setImagesOrder(this.company,this.images).subscribe(e=>{console.log(e),this.fetchData(),this.reorderDisabled=!0})}toggleReorderGroup(){this.reorderGroup.disabled=!this.reorderGroup.disabled,this.reorderDisabled=!this.reorderDisabled}uploadFiles(e){return(0,Z.mG)(this,void 0,void 0,function*(){const o=e.target.files;if(this.company.images.length+o.length>this.company.package.pictures_count)this.showPackageLimit();else{this.loadingService.showLoadingAlert(),console.log(o);const t=[];for(let e=0;e<o.length;e++)t.push(o[e]);const n=t.map(e=>this.uploadFile(e));yield Promise.all(n),e.target.value=null,this.loadingService.closeLoadingAlert(),this.fetchData()}})}uploadFile(e){return(0,Z.mG)(this,void 0,void 0,function*(){return yield this.companiesService.addImage(this.company,e).toProm
1ise()})}showUploadDialog(){this.company.images.length+1>this.company.package.pictures_count?this.showPackageLimit():this.fileInputElement&&this.fileInputElement.nativeElement.click()}showPackageLimit(e){return(0,Z.mG)(this,void 0,void 0,function*(){const o=yield this.alertController.create({header:"Ograniczenie pakietu",message:e||"Dodano maksymal\u0105 liczb\u0119 zdj\u0119\u0107.",buttons:["OK"],cssClass:"pxc-alert--md"});yield o.present()})}deleteImage(e){this.alertsService.showDeleteAlert(()=>{this.isLoading=!0,this.companiesService.deleteImage(this.company,e).subscribe(e=>{console.log(e),this.fetchData()})})}setImageAsCover(e){this.companiesService.getCoverImages(this.company).length>this.company.package.cover_images_count-1?this.showPackageLimit("Ustawiono maksymal\u0105 liczb\u0119 zdj\u0119\u0107 w tle."):(this.isLoading=!0,this.companiesService.setImageAsCover(this.company,e).subscribe(e=>{console.log(e),this.fetchData()}))}removeImageAsCover(e){this.isLoading=!0,this.companiesService.removeImageAsCover(this.company,e).subscribe(e=>{console.log(e),this.fetchData()})}showImagePopover(e,o){return(0,Z.mG)(this,void 0,void 0,function*(){o.stopPropagation();const t=[{text:e.image_type&&"cover-image"===e.image_type?"Nie pokazuj w tle":"Poka\u017c w tle",icon:"mdi@wallpaper",handler:()=>e.image_type&&"cover-image"===e.image_type?this.removeImageAsCover(e):this.setImageAsCover(e)},{text:"Usu\u0144",icon:"mdi@delete",handler:()=>this.deleteImage(e)}],n=yield this.popoverController.create({component:v.G,componentProps:{items:t},event:o});yield n.present()})}}return e.\u0275fac=function(o){return new(o||e)(s.Y36(m.t),s.Y36(b.b),s.Y36(p.m),s.Y36(i.Br),s.Y36(i.Dh))},e.\u0275cmp=s.Xpm({type:e,selectors:[["loc-company-images-crud"]],viewQuery:function(e,o){if(1&e&&(s.Gf(i.oz,5),s.Gf(x,5,s.SBq)),2&e){let e;s.iGM(e=s.CRH())&&(o.reorderGroup=e.first),s.iGM(e=s.CRH())&&(o.fileInputElement=e.first)}},inputs:{company:"company"},outputs:{companyImagesDone:"companyImagesDone"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["loadingTemplate",""],[1,"loc-card-crud__container"],["lines","full",1,"loc-card-crud__header"],[1,"loc-card-crud__package-info"],["shape","round","size","default",3,"click"],["pxcIcon","mdi@plus","slot","start"],["pxcIcon","mdi@arrow-right-thin-circle-outline","slot","end"],["type","file","multiple","",2,"display","none",3,"change"],["fileInput",""],["lines","full"],[4,"ngIf"],[3,"ionItemReorder"],[4,"ngFor","ngForOf"],["fill","clear","shape","round","color","dark","slot","start",3,"click",4,"ngIf"],["fill","clear","shape","round","color","dark","slot","start","style","margin-right: 8px",3,"click",4,"ngIf"],["fill","solid","shape","round","color","primary","slot","start",3,"click",4,"ngIf"],["fill","clear","shape","round","color","dark","slot","start",3,"click"],["pxcIcon","mdi@sort-ascending","slot","start"],["fill","clear","shape","round","color","dark","slot","start",2,"margin-right","8px",3,"click"],["pxcIcon","mdi@close","slot","start"],["fill","solid","shape","round","color","primary","slot","start",3,"click"],["pxcIcon","mdi@content-save-outline","slot","start",2,"margin-left","2px"],["slot","start"],[3,"src"],["color","primary","mode","ios",4,"ngIf"],["fill","clear","color","dark",3,"click"],["pxcIcon","mdi@dots-vertical","slot","icon-only"],["color","primary","mode","ios"],[1,"pxc-spinner"],["color","primary"]],template:function(e,o){if(1&e&&(s.YNc(0,U,21,3,"loc-card-crud",0),s.YNc(1,k,2,0,"ng-template",null,1,s.W1O)),2&e){const e=s.MAs(2);s.Q6J("ngIf",!o.isLoading)("ngIfElse",e)}},directives:[n.O5,_.r,i.PM,i.Ie,i.Q$,i.YG,i.gu,h.a,i.FN,i.q_,i.oz,n.sg,i.Nh,i.Bs,i.yp,i.PQ],styles:["ion-thumbnail[_ngcontent-%COMP%]{margin-right:16px;height:80px;width:80px}ion-list[_ngcontent-%COMP%]{padding-top:0}.loc-card-crud__package-info[_ngcontent-%COMP%]{font-size:12px;font-weight:400;opacity:.8}"]}),e})();const N=["fileInput"];function O(e,o){if(1&e&&(s.TgZ(0,"ion-item",15),s.TgZ(1,"ion-thumbnail",16),s._UZ(2,"img",17),s.qZA(),s.TgZ(3,"ion-label"),s.TgZ(4,"h3"),s._uU(5,"Certyfikat nearB."),s.qZA(),s.TgZ(6,"p"),s._uU(7,"Wygenerowany certyfikat nearB."),s.qZA(),s.qZA(),s.qZA()),2&e){const e=s.oxw(2);s.xp6(2),s.Q6J("src",e.getNearbCertificateUrl(),s.LSH)}}function S(e,o){if(1&e&&(s.TgZ(0,"ion-item",15),s.TgZ(1,"ion-thumbnail",16),s._UZ(2,"img",17),s.qZA(),s.TgZ(3,"ion-label"),s.TgZ(4,"h3"),s._uU(5,"Certyfikat Loocalio"),s.qZA(),s.TgZ(6,"p"),s._uU(7,"Wygenerowany certyfikat Loocalio"),s.qZA(),s.qZA(),s.qZA()),2&e){const e=s.oxw(2);s.xp6(2),s.Q6J("src",e.getLoocalioCertificateUrl(),s.LSH)}}function F(e,o){if(1&e){const e=s.EpF();
1s.TgZ(0,"ion-button",21),s.NdJ("click",function(){return s.CHM(e),s.oxw(3).toggleReorderGroup()}),s._UZ(1,"ion-icon",22),s._uU(2," Zmie\u0144 kolejno\u015b\u0107 "),s.qZA()}}function M(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"ion-button",23),s.NdJ("click",function(){return s.CHM(e),s.oxw(3).cancelReorder()}),s._UZ(1,"ion-icon",24),s._uU(2," Anuluj "),s.qZA()}}function J(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"ion-button",25),s.NdJ("click",function(){return s.CHM(e),s.oxw(3).saveReorder()}),s._UZ(1,"ion-icon",26),s._uU(2," Zapisz "),s.qZA()}}function P(e,o){if(1&e&&(s.TgZ(0,"ion-item"),s.YNc(1,F,3,0,"ion-button",18),s.YNc(2,M,3,0,"ion-button",19),s.YNc(3,J,3,0,"ion-button",20),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.Q6J("ngIf",e.reorderDisabled),s.xp6(1),s.Q6J("ngIf",!e.reorderDisabled),s.xp6(1),s.Q6J("ngIf",!e.reorderDisabled)}}function Y(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"ion-item"),s._UZ(1,"ion-reorder",27),s.TgZ(2,"ion-thumbnail"),s._UZ(3,"img",17),s.qZA(),s.TgZ(4,"ion-label"),s.TgZ(5,"h3"),s._uU(6,"Certyfikat"),s.qZA(),s.qZA(),s.TgZ(7,"ion-button",28),s.NdJ("click",function(){const o=s.CHM(e).$implicit;return s.oxw(2).deleteCertificate(o)}),s._UZ(8,"ion-icon",29),s.qZA(),s.qZA()}if(2&e){const e=o.$implicit;s.xp6(3),s.Q6J("src",e.miniature,s.LSH)}}function Q(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"loc-card-crud"),s.TgZ(1,"ion-card",2),s.TgZ(2,"ion-item",3),s.TgZ(3,"ion-label"),s.TgZ(4,"h2"),s._uU(5,"Certyfikaty"),s.qZA(),s.TgZ(6,"p"),s._uU(7,"Pochwal si\u0119 swoimi certyfikatami"),s.qZA(),s.qZA(),s.TgZ(8,"ion-button",4),s.NdJ("
1click",function(){return s.CHM(e),s.oxw().changeViewCertificates()}),s._UZ(9,"ion-icon",5),s._uU(10," Dalej "),s.qZA(),s.qZA(),s.TgZ(11,"ion-card-content"),s.TgZ(12,"ion-list"),s.TgZ(13,"ion-item-divider"),s.TgZ(14,"ion-label"),s._uU(15,"Wygenerowane certyfikaty"),s.qZA(),s.qZA(),s.YNc(16,O,8,1,"ion-item",6),s.YNc(17,S,8,1,"ion-item",6),s.qZA(),s.TgZ(18,"ion-list",7),s.TgZ(19,"ion-item-divider"),s.TgZ(20,"ion-label"),s._uU(21,"Inne certyfikaty"),s.qZA(),s.TgZ(22,"ion-button",8),s.NdJ("click",function(){return s.CHM(e),s.oxw().showUploadDialog()}),s._UZ(23,"ion-icon",9),s._uU(24," Dodaj "),s.qZA(),s.TgZ(25,"input",10,11),s.NdJ("change",function(o){return s.CHM(e),s.oxw().uploadFiles(o)}),s.qZA(),s.qZA(),s.YNc(27,P,4,3,"ion-item",12),s.TgZ(28,"ion-reorder-group",13),s.NdJ("ionItemReorder",function(o){return s.CHM(e),s.oxw().doReorder(o)}),s.YNc(29,Y,9,1,"ion-item",14),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=s.oxw();s.xp6(16),s.Q6J("ngIf",e.isNearbCertificateShowed()),s.xp6(1),s.Q6J("ngIf",e.isLoocalioCertificateShowed()),s.xp6(10),s.Q6J("ngIf",(null==e.company.certificates?null:e.company.certificates.length)>0),s.xp6(2),s.Q6J("ngForOf",e.certificates)}}function L(e,o){1&e&&(s.TgZ(0,"div",30),s._UZ(1,"ion-spinner",31),s.qZA())}let H=(()=>{class e{constructor(e,o,t){this.companiesService=e,this.loadingService=o,this.alertsService=t,this.isLoading=!0,this.reorderDisabled=!0,this.companyCertificatesDone=new s.vpe}ngOnInit(){this.fetchData()}changeViewCertificates(){this.companyCertificatesDone.emit(!0)}fetchData(){this.isLoading=!0,this.companiesService.getCompany(this.company.id).subscribe(e=>{console.log(e),this.company=e,this.company.certificates&&(this.certificates=this.company.certificates.slice()),this.isLoading=!1})}doReorder(e){this.certificates=e.detail.complete(this.certificates)}cancelReorder(){this.fetchData(),this.reorderDisabled=!0}saveReorder(){this.isLoading=!0,this.certificates.forEach((e,o)=>e.order=o+1),console.log("this.certificates",this.certificates),this.companiesService.setCertificatesOrder(this.company,this.certificates).subscribe(e=>{console.log("data",e),this.fetchData(),this.reorderDisabled=!0})}toggleReorderGroup(){this.reorderGroup.disabled=!this.reorderGroup.disabled,this.reorderDisabled=!this.reorderDisabled}uploadFiles(e){return(0,Z.mG)(this,void 0,void 0,function*(){this.loadingService.showLoadingAlert();const o=e.target.files;console.log(o);const t=[];for(let e=0;e<o.length;e++)t.push(o[e]);const n=t.map(e=>this.uploadFile(e));yield Promise.all(n),e.target.value=null,this.loadingService.closeLoadingAlert(),this.fetchData()})}uploadFile(e){return(0,Z.mG)(this,void 0,void 0,function*(){return yield this.companiesService.addCertificate(this.company,e).toPromise()})}showUploadDialog(){this.fileInputElement&&this.fileInputElement.nativeElement.click()}isLoocalioCertificateShowed(){return this.company&&this.companiesService.hasLoocalioCertificate(this.company)&&this.company.package&&("Gold"===this.company.package.name||"Orange"===this.company.package.name)}getLoocalioCertificateUrl(){return this.companiesService.getLoocalioCertificateUrl(this.company)}isNearbCertificateShowed(){var e,o,t,n,i,r,a;return this.company&&(null===(e=this.company)||void 0===e?void 0:e.package)&&("Basic"===(null===(t=null===(o=this.company)||void 0===o?void 0:o.package)||void 0===t?void 0:t.name)||"Gold"===(null===(i=null===(n=this.company)||void 0===n?void 0:n.package)||void 0===i?void 0:i.name)||"Orange"===(null===(a=null===(r=this.company)||void 0===r?void 0:r.package)||void 0===a?void 0:a.name))}getNearbCertificateUrl(){return this.companiesService.getNearbCertificateUrl(this.company)}deleteCertificate(e){this.alertsService.showDeleteAlert(()=>{this.isLoading=!0,this.companiesService.deleteCertificate(this.company,e).subscribe(e=>{console.log(e),this.fetchData()})})}}return e.\u0275fac=function(o){return new(o||e)(s.Y36(m.t),s.Y36(b.b),s.Y36(p.m))},e.\u0275cmp=s.Xpm({type:e,selectors:[["loc-company-certificates-crud"]],viewQuery:function(e,o){if(1&e&&(s.Gf(i.oz,5),s.Gf(N,5,s.SBq)),2&e){let e;s.iGM(e=s.CRH())&&(o.reorderGroup=e.first),s.iGM(e=s.CRH())&&(o.fileInputElement=e.first)}},inputs:{company:"company"},outputs:{companyCertificatesDone:"companyCertificatesDone"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["loadingTemplate",""],[1,"loc-card-crud__container"],["lines","full",1,"loc-card-crud__header"],["shape","round","size","default",3,"click"],["pxcIcon","mdi@arrow-right-thin-circle-outline","slot","end"],["lines","none",4,"ngIf"],["lines","full",1,"loc-company-certificates-crud__other"],["shape","round","slot","end",3,"click"],["pxcIcon","mdi@plus","slot","start"],["type","file","multiple","",2,"display","none",3,"change"],["fileInput",""],[4,"ngIf"],[3,"ionItemReorder"],[4,"ngFor","ngForOf"],["lines","none"],[2,"height","auto"],[3,"src"],["fill","clear","shape","round","color","dark","slot","start",3,"click",4,"ngIf"],["fill","clear","shape","round","color","dark","slot","start","style","margin-right: 8px",3,"click",4,"ngIf"],["fill","solid","shape","round","color","primary","slot","start",3,"click",4,"ngIf"],["fill","clear","shape","round","color","dark","slot","start",3,"click"],["pxcIcon","mdi@sort-ascending","slot","start"],["fill","clear","shape","round","color","dark","slot","start",2,"margin-right","8px",3,"click"],["pxcIcon","mdi@close","slot","start"],["fill","solid","shape","round","color","primary","slot","start",3,"click"],["pxcIcon","mdi@content-save-outline","slot","start",2,"margin-left","2px"],["slot","start"],["fill","clear","color","dark",3,"click"],["pxcIcon","mdi@delete","slot","icon-only"],[1,"pxc-spinner"],["color","primary"]],template:function(e,o){if(1&e&&(s.YNc(0,Q,30,4,"loc-card-crud",0),s.YNc(1,L,2,0,"ng-template",null,1,s.W1O)),2&e){const e=s.MAs(2);s.Q6J("ngIf",!o.isLoading)("ngIfElse",e)}},directives:[n.O5,_.r,i.PM,i.Ie,i.Q$,i.YG,i.gu,h.a,i.FN,i.q_,i.rH,i.oz,n.sg,i.Bs,i.Nh,i.PQ],styles:["ion-thumbnail[_ngcontent-%COMP%]{margin-right:16px;height:80px;width:80px}ion-list[_ngcontent-%COMP%]{padding-top:0}ion-item-divider[_ngcontent-%COMP%]{background:none!important}.loc-company-certificates-crud__other[_ngcontent-%COMP%]{margin-top:16px}.loc-company-certificates-crud__other[_ngcontent-%COMP%] ion-item-divider[_ngcontent-%COMP%]{margin-bottom:10px}"]}),e})();var z=t(3679),E=t(78556),j=t(68896),G=t(19657),$=t(98295),R=t(83166),B=t(35618),W=t(22889);const V=["fileInput"];function X(e,o){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Pole wymagane"),s.qZA())}function K(e,o){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Pole wymagane"),s.qZA())}function ee(e,o){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Pole wymagane"),s.qZA())}function oe(e,o){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Za du\u017ca ilo\u015b\u
10107 znak\xf3w"),s.qZA())}const te=function(){return{addTargetToExternalLinks:!0}},ne=function(e){return{link:e}};let ie=(()=>{class e{constructor(e,o,t,n){this.formBuilder=e,this.companyService=o,this.loadingService=t,this.modalController=n,this.type="create",this.employeeType="employee",this.descriptionLength=0,this.descriptionMaxLength=100,this.Editor=E}ngOnInit(){this.setupForm(),"update"===this.type&&this.employee&&this.updateForm(),this.updatePackageRestriction()}setupForm(){this.employeeForm=this.formBuilder.group({name:["",[z.kI.required]],role:["",[z.kI.required]],description:["",[z.kI.required]],fileName:[""],file:[""]})}updateForm(){this.employeeForm.patchValue(this.employee),this.updatePackageRestriction()}updatePackageRestriction(){if(!this.company||!this.company.package)return;let e;"owner"===this.employeeType&&(e=this.company.package.owner_characters),"employee"===this.employeeType&&(e=this.company.package.team_characters),e&&(this.descriptionMaxLength=e)}save(){for(const e in this.employeeForm.controls)e&&this.employeeForm.controls[e].markAsTouched();if(this.employeeForm.valid&&!this.checkDescriptionLength()){const e={};"update"===this.type&&(e.id=this.employee&&this.employee.id?this.employee.id:null),e.name=this.employeeForm.value.name,e.role=this.employeeForm.value.role,e.type=this.employeeType,e.description=this.employeeForm.value.description,e.file=this.employeeForm.value.file,"create"===this.type?(this.loadingService.showLoadingAlert(),this.companyService.addEmployee(this.company,e).subscribe(e=>{console.log(e),this.loadingService.closeLoadingAlert(),this.modalController.dismiss("saved")})):"update"===this.type&&(this.loadingService.showLoadingAlert(),this.companyService.updateEmployee(e).subscribe(e=>{console.log(e),this.loadingService.closeLoadingAlert(),this.modalController.dismiss("saved")}))}}uploadFiles(e){return(0,Z.mG)(this,void 0,void 0,function*(){const o=e.target.files;console.log(o),this.employeeForm.get("fileName").setValue(o[0]?o[0].name:null),this.employeeForm.get("file").setValue(o[0])})}showUploadDialog(){this.fileInputElement&&this.fileInputElement.nativeElement.click()}onDescriptionChange({editor:e}){this.descriptionLength=e.getData().replace(/<[^>]*>|\s/g,"").replace(/\ /g,"").length}checkDescriptionLength(){return this.descriptionLength>this.descriptionMaxLength}}return e.\u0275fac=function(o){return new(o||e)(s.Y36(z.qu),s.Y36(m.t),s.Y36(b.b),s.Y36(i.IN))},e.\u0275cmp=s.Xpm({type:e,selectors:[["loc-company-team-save"]],viewQuery:function(e,o){if(1&e&&s.Gf(V,5,s.SBq),2&e){let e;s.iGM(e=s.CRH())&&(o.fileInputElement=e.first)}},inputs:{type:"type",company:"company",employee:"employee",employeeType:"employeeType"},decls:40,vars:13,consts:[[3,"title"],[3,"formGroup"],["appearance","outline"],["matInput","","formControlName","name"],["input",""],[4,"ngIf"],["matInput","","formControlName","role"],["fxLayout","column",1,"loc-text-editor"],[1,"loc-text-editor__field"],["formControlName","description",3,"editor","config","change"],["fxLayout","row"],["fxFlex","1 0 auto"],["align","end"],["fxLayout","row","fxLayoutAlign","center center"],["floatLabel","always","appearance","outline"],["readonly","","placeholder","Dodaj zdj\u0119cie","matInput","","formControlName","fileName"],["type","file",2,"display","none",3,"change"],["fileInput",""],["shape","round","size","small","fill","clear",1,"loc-list__right-inline-button",3,"click"],["pxcIcon","mdi@upload","slot","start"],["fxLayoutAlign","center center",1,"loc-list__actions"],["shape","round","size","default",3,"click"]],template:function(e,o){if(1&e&&(s.TgZ(0,"loc-modal",0),s.TgZ(1,"loc-list"),s.TgZ(2,"ion-list",1),s.TgZ(3,"mat-form-field",2),s.TgZ(4,"mat-label"),s._uU(5,"Wpisz imi\u0119"),s.qZA(),s._UZ(6,"input",3,4),s.YNc(8,X,2,0,"mat-error",5),s.qZA(),s.TgZ(9,"mat-form-field",2),s.TgZ(10,"mat-label"),s._uU(11,"Wpisz stanowisko"),s.qZA(),s._UZ(12,"input",6,4),s.YNc(14,K,2,0,"mat-error",5),s.qZA(),s.TgZ(15,"div",7),s.TgZ(16,"ion-label"),s._uU(17," Opisz czym si\u0119 zajmuje w Twojej firmie "),s.qZA(),s.TgZ(18,"div",8),s.TgZ(19,"ckeditor",9),s.NdJ("
1change",function(e){return o.onDescriptionChange(e)}),s.qZA(),s.TgZ(20,"div",10),s.YNc(21,ee,2,0,"mat-error",5),s.YNc(22,oe,2,0,"mat-error",5),s._UZ(23,"div",11),s.TgZ(24,"mat-hint",12),s._uU(25),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(26,"div",13),s.TgZ(27,"mat-form-field",14),s.TgZ(28,"mat-label"),s._uU(29,"Zdj\u0119cie"),s.qZA(),s._UZ(30,"input",15,4),s.qZA(),s.TgZ(32,"input",16,17),s.NdJ("change",function(e){return o.uploadFiles(e)}),s.qZA(),s.TgZ(34,"ion-button",18),s.NdJ("click",function(){return o.showUploadDialog()}),s._UZ(35,"ion-icon",19),s._uU(36," Wy\u015blij "),s.qZA(),s.qZA(),s.qZA(),s.TgZ(37,"div",20),s.TgZ(38,"ion-button",21),s.NdJ("click",function(){return o.save()}),s._uU(39," Zapisz "),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&e){let e;s.Q6J("title","create"===o.type?"Dodaj pracownika":"Edytuj pracownika"),s.xp6(2),s.Q6J("formGroup",o.employeeForm),s.xp6(6),s.Q6J("ngIf",o.employeeForm.get("name").invalid),s.xp6(6),s.Q6J("ngIf",o.employeeForm.get("role").invalid),s.xp6(5),s.Q6J("editor",o.Editor)("config",s.VKq(11,ne,s.DdM(10,te))),s.xp6(2),s.Q6J("ngIf",(null==(e=o.employeeForm.get("description"))?null:e.invalid)&&(null==(e=o.employeeForm.get("description"))?null:e.touched)),s.xp6(1),s.Q6J("ngIf",o.checkDescriptionLength()),s.xp6(3),s.AsE("",o.descriptionLength,"/",o.descriptionMaxLength,"")}},directives:[j.z,G.n,i.q_,z.JL,z.sg,$.KE,$.hX,R.Nt,z.Fj,z.JJ,z.u,n.O5,B.xw,i.Q$,W.u,B.yH,$.bx,B.Wh,i.YG,i.gu,h.a,$.TO],styles:["ion-list[_ngcontent-%COMP%]{padding-top:30px}"]}),e})();var re=t(31871);function ae(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"ion-button",10),s.NdJ("click",function(){return s.CHM(e),s.oxw(3).showEmployeeCreateModal("owner")}),s._UZ(1,"ion-icon",11),s._uU(2," Dodaj "),s.qZA()}}function ce(e,o){if(1&e&&s._UZ(0,"img",18),2&e){const e=s.oxw(4);s.Q6J("src",null==e.owner.images[0]?null:e.owner.images[0].miniature,s.LSH)}}function se(e,o){1&e&&(s.TgZ(0,"div",19),s._UZ(1,"ion-icon",20),s.qZA())}function le(e,o){if(1&e){const e=s.EpF();
1s.TgZ(0,"ion-item",12),s.TgZ(1,"ion-thumbnail",13),s.NdJ("click",function(){s.CHM(e);const o=s.oxw(3);return o.showEmployeeUpdateModal(o.owner,"owner")}),s.YNc(2,ce,1,1,"img",14),s.YNc(3,se,2,0,"div",15),s.qZA(),s.TgZ(4,"ion-label",13),s.NdJ("click",function(){s.CHM(e);const o=s.oxw(3);return o.showEmployeeUpdateModal(o.owner,"owner")}),s.TgZ(5,"h3"),s._uU(6),s.qZA(),s.TgZ(7,"p"),s._uU(8),s.qZA(),s.qZA(),s.TgZ(9,"ion-button",16),s.NdJ("click",function(){s.CHM(e);const o=s.oxw(3);return o.deleteEmployee(o.owner.id)}),s._UZ(10,"ion-icon",17),s.qZA(),s.qZA()}if(2&e){const e=s.oxw(3);s.xp6(2),s.Q6J("ngIf",e.owner&&e.owner.images&&e.owner.images[0]&&e.owner.images[0].miniature),s.xp6(1),s.Q6J("ngIf",!(e.owner&&e.owner.images&&e.owner.images[0]&&e.owner.images[0].miniature)),s.xp6(3),s.Oqu(e.owner.name),s.xp6(2),s.Oqu(e.owner.role)}}function me(e,o){if(1&e&&(s.TgZ(0,"ion-list"),s.TgZ(1,"ion-item-divider"),s.TgZ(2,"ion-label"),s._uU(3,"Przedstaw Gospodarza"),s.qZA(),s.YNc(4,ae,3,0,"ion-button",8),s.qZA(),s.YNc(5,le,11,4,"ion-item",9),s.qZA()),2&e){const e=s.oxw(2);s.xp6(4),s.Q6J("ngIf",!e.owner),s.xp6(1),s.Q6J("ngIf",e.owner)}}function pe(e,o){if(1&e){const e=s.EpF();
1s.TgZ(0,"ion-item"),s.TgZ(1,"ion-button",24),s.NdJ("click",function(){return s.CHM(e),s.oxw(3).toggleReorderGroup()}),s._UZ(2,"ion-icon",25),s._uU(3," Zmie\u0144 kolejno\u015b\u0107 "),s.qZA(),s.qZA()}}function de(e,o){if(1&e&&s._UZ(0,"img",18),2&e){const e=s.oxw().$implicit;s.Q6J("src",null==e.images[0]?null:e.images[0].miniature,s.LSH)}}function ue(e,o){1&e&&(s.TgZ(0,"div",19),s._UZ(1,"ion-icon",20),s.qZA())}function ge(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"ion-item",26),s._UZ(1,"ion-reorder",27),s.TgZ(2,"ion-thumbnail",13),s.NdJ("click",function(){const o=s.CHM(e).$implicit;return s.oxw(3).showEmployeeUpdateModal(o,"employee")}),s.YNc(3,de,1,1,"img",14),s.YNc(4,ue,2,0,"div",15),s.qZA(),s.TgZ(5,"ion-label",13),s.NdJ("click",function(){const o=s.CHM(e).$implicit;return s.oxw(3).showEmployeeUpdateModal(o,"employee")}),s.TgZ(6,"h3"),s._uU(7),s.qZA(),s.TgZ(8,"p"),s._uU(9),s.qZA(),s.qZA(),s.TgZ(10,"ion-button",16),s.NdJ("click",function(){const o=s.CHM(e).$implicit;return s.oxw(3).deleteEmployee(o.id)}),s._UZ(11,"ion-icon",17),s.qZA(),s.qZA()}if(2&e){const e=o.$implicit;s.xp6(3),s.Q6J("ngIf",e&&e.images&&e.images[0]&&e.images[0].miniature),s.xp6(1),s.Q6J("ngIf",!(e&&e.images&&e.images[0]&&e.images[0].miniature)),s.xp6(3),s.Oqu(e.name),s.xp6(2),s.Oqu(e.role)}}function fe(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"ion-list",21),s.TgZ(1,"ion-item-divider"),s.TgZ(2,"ion-label"),s._uU(3,"Przedstaw Sw\xf3j zesp\xf3\u0142"),s.qZA(),s.TgZ(4,"ion-button",10),s.NdJ("click",function(){return s.CHM(e),s.oxw(2).showEmployeeCreateModal("employee")}),s._UZ(5,"ion-icon",11),s._uU(6," Dodaj "),s.qZA(),s.qZA(),s.YNc(7,pe,4,0,"ion-item",6),s.TgZ(8,"ion-reorder-group",22),s.NdJ("ionItemReorder",function(o){return s.CHM(e),s.oxw(2).doReorder(o)}),s.YNc(9,ge,12,4,"ion-item",23),s.qZA(),s.qZA()}if(2&e){const e=s.oxw(2);s.xp6(7),s.Q6J("ngIf",(null==e.employees?null:e.employees.length)>0),s.xp6(2),s.Q6J("ngForOf",e.employees)}}function he(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"loc-card-crud"),s.TgZ(1,"ion-card",2),s.TgZ(2,"ion-item",3),s.TgZ(3,"ion-label"),s.TgZ(4,"h2"),s._uU(5,"Dodaj zesp\xf3\u0142"),s.qZA(),s.TgZ(6,"p"),s._uU(7,"Edycja zespo\u0142u firmy"),s.qZA(),s.qZA(),s.TgZ(8,"ion-button",4),s.NdJ("
1click",function(){return s.CHM(e),s.oxw().changeViewTeam()}),s._UZ(9,"ion-icon",5),s._uU(10," Dalej "),s.qZA(),s.qZA(),s.TgZ(11,"ion-card-content"),s.YNc(12,me,6,2,"ion-list",6),s.YNc(13,fe,10,2,"ion-list",7),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=s.oxw();s.xp6(12),s.Q6J("ngIf",e.isOwnerEnabled()),s.xp6(1),s.Q6J("ngIf",e.isTeamEnabled())}}function ye(e,o){1&e&&(s.TgZ(0,"div",28),s._UZ(1,"ion-spinner",29),s.qZA())}let Ze=(()=>{class e{constructor(e,o,t,n){this.modalController=e,this.overlayController=o,this.companiesService=t,this.alertsService=n,this.isLoading=!0,this.companyTeamDone=new s.vpe}ngOnInit(){this.fetchData()}changeViewTeam(){this.companyTeamDone.emit(!0)}fetchData(){this.isLoading=!0,this.companiesService.getCompany(this.company.id).subscribe(e=>{console.log(e),this.company=e,this.processEmployees(this.company.employees),this.isLoading=!1})}processEmployees(e){this.owner=e.find(e=>"owner"===e.type),this.employees=e.filter(e=>"employee"===e.type)}doReorder(e){this.company.employees=e.detail.complete(this.company.employees)}toggleReorderGroup(){this.reorderGroup.disabled=!this.reorderGroup.disabled}showEmployeeCreateModal(e){return(0,Z.mG)(this,void 0,void 0,function*(){const o=yield this.modalController.create({component:ie,componentProps:{company:this.company,type:"create",employeeType:e},cssClass:"pxc-modal--lg"});yield this.overlayController.present(o);const{data:t}=yield o.onDidDismiss();"saved"===t&&this.fetchData()})}showEmployeeUpdateModal(e,o){return(0,Z.mG)(this,void 0,void 0,function*(){const t=yield this.modalController.create({component:ie,componentProps:{company:this.company,type:"update",employee:e,employeeType:o},cssClass:"pxc-modal--lg"});yield this.overlayController.present(t);const{data:n}=yield t.onDidDismiss();"saved"===n&&this.fetchData()})}isOwnerEnabled(){return this.company.package.owner_enabled}isTeamEnabled(){return this.company.package.team_enabled}deleteEmployee(e){this.alertsService.showDeleteAlert(()=>{this.companiesService.deleteEmployee(e).subscribe(e=>{console.log(e),this.fetchData()})})}}return e.\u0275fac=function(o){return new(o||e)(s.Y36(i.IN),s.Y36(re.o),s.Y36(m.t),s.Y36(p.m))},e.\u0275cmp=s.Xpm({type:e,selectors:[["loc-company-team-crud"]],viewQuery:function(e,o){if(1&e&&s.Gf(i.oz,5),2&e){let e;s.iGM(e=s.CRH())&&(o.reorderGroup=e.first)}},inputs:{company:"company"},outputs:{companyTeamDone:"companyTeamDone"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["loadingTemplate",""],[1,"loc-card-crud__container"],["lines","full",1,"loc-card-crud__header"],["shape","round","size","default",3,"click"],["pxcIcon","mdi@arrow-right-thin-circle-outline","slot","end"],[4,"ngIf"],["class","loc-company-team-crud__team","lines","full",4,"ngIf"],["shape","round","slot","end",3,"click",4,"ngIf"],["button","","lines","none",4,"ngIf"],["shape","round","slot","end",3,"click"],["pxcIcon","mdi@plus","slot","start"],["button","","lines","none"],[3,"click"],[3,"src",4,"ngIf"],["style","background: #e3e3e3","fxLayoutAlign","center center","fxFlexFill","",4,"ngIf"],["fill","clear","color","dark",3,"click"],["pxcIcon","mdi@delete","slot","icon-only"],[3,"src"],["fxLayoutAlign","center center","fxFlexFill","",2,"background","#e3e3e3"],["pxcIcon","mdi@account-circle",2,"font-size","60px","opacity","0.2"],["lines","full",1,"loc-company-team-crud__team"],[3,"ionItemReorder"],["button","",4,"ngFor","ngForOf"],["fill","clear","shape","round","color","dark","slot","start",3,"click"],["pxcIcon","mdi@sort-ascending","slot","start"],["button",""],["slot","start"],[1,"pxc-spinner"],["color","primary"]],template:function(e,o){if(1&e&&(s.YNc(0,he,14,2,"loc-card-crud",0),s.YNc(1,ye,2,0,"ng-template",null,1,s.W1O)),2&e){const e=s.MAs(2);s.Q6J("ngIf",!o.isLoading)("ngIfElse",e)}},directives:[n.O5,_.r,i.PM,i.Ie,i.Q$,i.YG,i.gu,h.a,i.FN,i.q_,i.rH,i.Bs,B.Wh,B.s9,i.oz,n.sg,i.Nh,i.PQ],styles:["ion-thumbnail[_ngcontent-%COMP%]{margin-right:16px;height:80px;width:80px}ion-list[_ngcontent-%COMP%]{padding-top:0}ion-item-divider[_ngcontent-%COMP%]{background:none!important}.loc-company-team-crud__team[_ngcontent-%COMP%]{margin-top:16px}.loc-company-team-crud__team[_ngcontent-%COMP%] ion-item-divider[_ngcontent-%COMP%]{margin-bottom:10px}"]}),e})();var ve=t(83290);let be=(()=>{class e{constructor(e){this.modalController=e}ngOnInit(){}onServiceAdded(e){this.modalController.dismiss("saved")}}return e.\u0275fac=function(o){return new(o||e)(s.Y36(i.IN))},e.\u0275cmp=s.Xpm({type:e,selectors:[["loc-company-service-add"]],inputs:{company:"company"},decls:2,vars:1,consts:[["title","Dodaj us\u0142ug\u0119"],["type","select",3,"company","serviceAdded"]],template:function(e,o){1&e&&(s.TgZ(0,"loc-modal",0),s.TgZ(1,"loc-services-crud",1),s.NdJ("serviceAdded",function(e){return o.onServiceAdded(e)}),s.qZA(),s.qZA()),2&e&&(s.xp6(1),s.Q6J("company",o.company))},directives:[j.z,ve.I],styles:[""]}),e})();function _e(e,o){if(1&e){const e=s.EpF();
1s.TgZ(0,"ion-button",15),s.NdJ("click",function(){return s.CHM(e),s.oxw(3).cancelReorder()}),s._UZ(1,"ion-icon",16),s._uU(2," Anuluj "),s.qZA()}}function xe(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"ion-button",17),s.NdJ("click",function(){return s.CHM(e),s.oxw(3).saveReorder()}),s._UZ(1,"ion-icon",18),s._uU(2," Zapisz "),s.qZA()}}function Te(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"ion-item"),s.TgZ(1,"ion-button",11),s.NdJ("click",function(){return s.CHM(e),s.oxw(2).toggleReorderGroup()}),s._UZ(2,"ion-icon",12),s._uU(3," Zmie\u0144 kolejno\u015b\u0107 "),s.qZA(),s.YNc(4,_e,3,0,"ion-button",13),s.YNc(5,xe,3,0,"ion-button",14),s.qZA()}if(2&e){const e=s.oxw(2);s.xp6(4),s.Q6J("ngIf",!e.reorderDisabled),s.xp6(1),s.Q6J("ngIf",!e.reorderDisabled)}}function Ae(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"ion-item"),s._UZ(1,"ion-reorder",19),s.TgZ(2,"ion-thumbnail"),s._UZ(3,"img",20),s.qZA(),s.TgZ(4,"ion-label"),s.TgZ(5,"h3"),s._uU(6),s.qZA(),s.qZA(),s.TgZ(7,"ion-button",21),s.NdJ("click",function(){const o=s.CHM(e).$implicit;return s.oxw(2).deleteService(o)}),s._UZ(8,"ion-icon",22),s.qZA(),s.qZA()}if(2&e){const e=o.$implicit;s.xp6(3),s.Q6J("src",null==e.svg?null:e.svg.url,s.LSH),s.xp6(3),s.Oqu(e.name)}}function we(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"loc-card-crud"),s.TgZ(1,"ion-card",2),s.TgZ(2,"ion-item",3),s.TgZ(3,"ion-label"),s.TgZ(4,"h2"),s._uU(5,"Ikony informuj\u0105ce o us\u0142ugach"),s.qZA(),s.TgZ(6,"p",4),s._uU(7),s.qZA(),s.qZA(),s.TgZ(8,"ion-button",5),s.NdJ("click",function(){return s.CHM(e),s.oxw().showAddServiceModal()}),s._UZ(9,"ion-icon",6),s._uU(10," Wybierz ikony "),s.qZA(),s.qZA(),s.TgZ(11,"ion-card-content"),s.TgZ(12,"ion-list",7),s.YNc(13,Te,6,2,"ion-item",8),s.TgZ(14,"ion-reorder-group",9),s.NdJ("ionItemReorder",function(o){return s.CHM(e),s.oxw().doReorder(o)}),s.YNc(15,Ae,9,2,"ion-item",10),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=s.oxw();s.xp6(7),s.hij(" Maksymalna ilo\u015b\u0107 ikon: ",e.company.package.services_count," "),s.xp6(6),s.Q6J("ngIf",(null==e.company.services?null:e.company.services.length)>0),s.xp6(2),s.Q6J("ngForOf",e.company.services)}}function Ie(e,o){1&e&&(s.TgZ(0,"div",23),s._UZ(1,"ion-spinner",24),s.qZA())}let Ce=(()=>{class e{constructor(e,o,t,n,i){this.modalController=e,this.overlayController=o,this.companiesService=t,this.alertController=n,this.alertsService=i,this.isLoading=!0,this.reorderDisabled=!0}ngOnInit(){this.fetchData()}fetchData(){this.isLoading=!0,this.companiesService.getCompany(this.company.id).subscribe(e=>{console.log(e),this.company=e,this.company.services&&(this.company.services=this.company.services.slice()),this.isLoading=!1})}cancelReorder(){this.fetchData(),this.reorderDisabled=!0}saveReorder(){this.isLoading=!0,this.company.services.forEach((e,o)=>e.order=o+1),this.companiesService.setServicesOrder(this.company,this.company.services).subscribe(e=>{console.log(e),this.fetchData(),this.reorderDisabled=!0})}doReorder(e){this.company.services=e.detail.complete(this.company.services)}toggleReorderGroup(){this.reorderGroup.disabled=!this.reorderGroup.disabled,this.reorderDisabled=!this.reorderDisabled}showAddServiceModal(){return(0,Z.mG)(this,void 0,void 0,function*(){if(this.company.services.length+1>this.company.package.services_count)this.showPackageLimit();else{const e=yield this.modalController.create({component:be,componentProps:{company:this.company},cssClass:"pxc-modal--md"});yield this.overlayController.present(e);const{data:o}=yield e.onDidDismiss();"saved"===o&&this.fetchData()}})}showPackageLimit(){return(0,Z.mG)(this,void 0,void 0,function*(){const e=yield this.alertController.create({header:"Ograniczenie pakietu",message:"Dodano maksymal\u0105 liczb\u0119 us\u0142ug.",buttons:["OK"]});yield e.present()})}deleteService(e){this.alertsService.showDeleteAlert(()=>{this.isLoading=!0,this.companiesService.deleteService(this.company,e).subscribe(e=>{console.log(e),this.fetchData()})})}}return e.\u0275fac=function(o){return new(o||e)(s.Y36(i.IN),s.Y36(re.o),s.Y36(m.t),s.Y36(i.Br),s.Y36(p.m))},e.\u0275cmp=s.Xpm({type:e,selectors:[["loc-company-services-crud"]],viewQuery:function(e,o){if(1&e&&s.Gf(i.oz,5),2&e){let e;s.iGM(e=s.CRH())&&(o.reorderGroup=e.first)}},inputs:{company:"company"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["loadingTemplate",""],[1,"loc-card-crud__container"],["lines","full",1,"loc-card-crud__header"],[1,"loc-card-crud__package-info"],["shape","round","size","default",3,"click"],["pxcIcon","mdi@plus","slot","start"],["lines","full"],[4,"ngIf"],[3,"ionItemReorder"],[4,"ngFor","ngForOf"],["fill","clear","shape","round","color","dark","slot","start",3,"click"],["pxcIcon","mdi@sort-ascending","slot","start"],["fill","clear","shape","round","color","dark","slot","start","style","margin-right: 8px",3,"click",4,"ngIf"],["fill","solid","shape","round","color","primary","slot","start",3,"click",4,"ngIf"],["fill","clear","shape","round","color","dark","slot","start",2,"margin-right","8px",3,"click"],["pxcIcon","mdi@close","slot","start"],["fill","solid","shape","round","color","primary","slot","start",3,"click"],["pxcIcon","mdi@content-save-outline","slot","start",2,"margin-left","2px"],["slot","start"],[3,"src"],["fill","clear","color","dark",3,"click"],["pxcIcon","mdi@delete","slot","icon-only"],[1,"pxc-spinner"],["color","primary"]],template:function(e,o){if(1&e&&(s.YNc(0,we,16,3,"loc-card-crud",0),s.YNc(1,Ie,2,0,"ng-template",null,1,s.W1O)),2&e){const e=s.MAs(2);s.Q6J("ngIf",!o.isLoading)("ngIfElse",e)}},directives:[n.O5,_.r,i.PM,i.Ie,i.Q$,i.YG,i.gu,h.a,i.FN,i.q_,i.oz,n.sg,i.Nh,i.Bs,i.PQ],styles:["ion-thumbnail[_ngcontent-%COMP%]{margin-right:16px;height:40px;width:40px}ion-list[_ngcontent-%COMP%]{padding-top:0}.loc-card-crud__package-info[_ngcontent-%COMP%]{font-size:12px;font-weight:400;opacity:.8}"]}),e})();var qe=t(8310),Ue=t(21651),ke=t(19725);const De=function(e){return["offer",e]};function Ne(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"ion-item",8),s.TgZ(1,"ion-thumbnail"),s._UZ(2,"img",9),s.qZA(),s.TgZ(3,"ion-label",10),s.TgZ(4,"h3"),s._uU(5),s.qZA(),s.TgZ(6,"p"),s._uU(7),s.qZA(),s.qZA(),s.TgZ(8,"ion-button",11),s.NdJ("
1click",function(){const o=s.CHM(e).$implicit;return s.oxw(2).deleteOffer(o.id)}),s._UZ(9,"ion-icon",12),s.qZA(),s.qZA()}if(2&e){const e=o.$implicit;s.xp6(2),s.Q6J("src",null==e.image?null:e.image.miniature,s.LSH)("routerLink",s.VKq(5,De,e.id)),s.xp6(1),s.Q6J("routerLink",s.VKq(7,De,e.id)),s.xp6(2),s.Oqu(e.name),s.xp6(2),s.Oqu(e.subtitle)}}function Oe(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"loc-card-crud"),s.TgZ(1,"ion-card",2),s.TgZ(2,"ion-item",3),s.TgZ(3,"ion-label"),s.TgZ(4,"h2"),s._uU(5,"Oferty specjalne"),s.qZA(),s.TgZ(6,"p"),s._uU(7,"Dodawaj oferty specjalne"),s.qZA(),s.qZA(),s.TgZ(8,"ion-button",4),s.NdJ("click",function(){return s.CHM(e),s.oxw().showAddOfferModal()}),s._UZ(9,"ion-icon",5),s._uU(10," Dodaj "),s.qZA(),s.TgZ(11,"ion-button",4),s.NdJ("click",function(){return s.CHM(e),s.oxw().changeViewOffers()}),s._UZ(12,"ion-icon",6),s._uU(13," Dalej "),s.qZA(),s.qZA(),s.TgZ(14,"ion-card-content"),s.TgZ(15,"ion-list"),s.TgZ(16,"ion-item-divider"),s.TgZ(17,"ion-label"),s._uU(18,"Oferta firmy"),s.qZA(),s.qZA(),s.YNc(19,Ne,10,9,"ion-item",7),s.qZA(),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=s.oxw();s.xp6(19),s.Q6J("ngForOf",e.offers)}}function Se(e,o){1&e&&(s.TgZ(0,"div",13),s._UZ(1,"ion-spinner",14),s.qZA())}let Fe=(()=>{class e{constructor(e,o,t,n,i,r){this.modalController=e,this.overlayController=o,this.companiesService=t,this.offersService=n,this.alertsService=i,this.alertController=r,this.isLoading=!1,this.companyOffersDone=new s.vpe}ngOnInit(){this.fetchData(),console.log("company",this.company)}changeViewOffers(){this.companyOffersDone.emit(!0)}showAddOfferModal(){return(0,Z.mG)(this,void 0,void 0,function*(){const e=yield this.modalController.create({component:Ue.v,componentProps:{company:this.company,type:"create"},cssClass:"pxc-modal--lg"});yield e.present();const{data:o}=yield e.onDidDismiss();"saved"===o&&this.fetchData()})}showOfferUpdateModal(e){return(0,Z.mG)(this,void 0,void 0,function*(){const o=yield this.modalController.create({component:Ue.v,componentProps:{company:this.company,type:"update",offer:e},cssClass:"pxc-modal--lg"});yield this.overlayController.present(o);const{data:t}=yield o.onDidDismiss();"saved"===t&&this.fetchData()})}fetchData(){this.isLoading=!0,this.offersService.getCompanyOffers(this.company).subscribe(e=>{console.log("fetchedCompanyOffers",e),this.offers=e.data,this.meta=e.meta,this.isLoading=!1})}deleteOffer(e){this.alertsService.showDeleteAlert(()=>{this.isLoading=!0,this.offersService.deleteCompanyOffer(e).subscribe(e=>{console.log(e),this.fetchData()})})}}return e.\u0275fac=function(o){return new(o||e)(s.Y36(i.IN),s.Y36(re.o),s.Y36(m.t),s.Y36(ke.b),s.Y36(p.m),s.Y36(i.Br))},e.\u0275cmp=s.Xpm({type:e,selectors:[["loc-company-offers-crud"]],viewQuery:function(e,o){if(1&e&&s.Gf(i.oz,5),2&e){let e;s.iGM(e=s.CRH())&&(o.reorderGroup=e.first)}},inputs:{company:"company"},outputs:{companyOffersDone:"companyOffersDone"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["loadingTemplate",""],[1,"loc-card-crud__container"],["lines","full",1,"loc-card-crud__header"],["shape","round","size","default",3,"click"],["pxcIcon","mdi@plus","slot","start"],["pxcIcon","mdi@arrow-right-thin-circle-outline","slot","end"],["button","","lines","none",4,"ngFor","ngForOf"],["button","","lines","none"],[3,"src","routerLink"],[2,"margin-left","10px",3,"routerLink"],["fill","clear","color","dark",3,"click"],["pxcIcon","mdi@delete","slot","icon-only"],[1,"pxc-spinner"],["color","primary"]],template:function(e,o){if(1&e&&(s.YNc(0,Oe,20,1,"loc-card-crud",0),s.YNc(1,Se,2,0,"ng-template",null,1,s.W1O)),2&e){const e=s.MAs(2);s.Q6J("ngIf",!o.isLoading)("ngIfElse",e)}},directives:[n.O5,_.r,i.PM,i.Ie,i.Q$,i.YG,i.gu,h.a,i.FN,i.q_,i.rH,n.sg,i.Bs,i.YI,r.rH,i.PQ],styles:[""]}),e})();var Me=t(99692),Je=t(11494),Pe=t(66682),Ye=t(54395),Qe=t(87519),Le=t(93342),He=t(5304),ze=t(68939),Ee=t(26215),je=t(25917);class Ge{constructor(e){this.companiesService=e,this.invoicesUserSubject=new Ee.X([]),this.loadingSubject=new Ee.X(!1),this.loading$=this.loadingSubject.asObservable(),this.totalItemsCountSubject=new Ee.X(0),this.totalItemsCount$=this.totalItemsCountSubject.asObservable()}connect(e){return this.invoicesUserSubject.asObservable()}disconnect(e){this.invoicesUserSubject.complete(),this.loadingSubject.complete(),this.totalItemsCountSubject.complete()}loadInvoicesForCompany(e,o){this.loadingSubject.next(!0),this.companiesService.getInvoicesByCompany(e||null,o).pipe((0,He.K)(()=>(0,je.of)([])),(0,ze.x)(()=>this.loadingSubject.next(!1))).subscribe(e=>{this.totalItemsCountSubject.next(e.total),this.invoicesUserSubject.next(e.data)})}}var $e=t(53815),Re=t(32789);function Be(e,o){1&e&&(s.TgZ(0,"th",16),s._uU(1,"Id"),s.qZA())}function We(e,o){if(1&e&&(s.TgZ(0,"td",17),s._uU(1),s.qZA()),2&e){const e=o.$implicit;s.xp6(1),s.Oqu(e.id)}}function Ve(e,o){1&e&&(s.TgZ(0,"th",16),s._uU(1,"Nazwa"),s.qZA())}function Xe(e,o){if(1&e&&(s.TgZ(0,"td",18),s._uU(1),s.qZA()),2&e){const e=o.$implicit;s.xp6(1),s.hij(" ",e.name," ")}}function Ke(e,o){1&e&&(s.TgZ(0,"th",19),s._uU(1," Data wystawienia "),s.qZA())}function eo(e,o){if(1&e&&(s.TgZ(0,"td",17),s._uU(1),s.qZA()),2&e){const e=o.$implicit;s.xp6(1),s.hij(" ",e.created_at," ")}}function oo(e,o){1&e&&(s.TgZ(0,"th",20),s._uU(1,"Akcje"),s.qZA())}function to(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"td",21),s.TgZ(1,"div",22),s.TgZ(2,"ion-button",23),s.NdJ("
1click",function(){const o=s.CHM(e).$implicit;return s.oxw().downloadInvoice(o.id)}),s._UZ(3,"ion-icon",24),s.qZA(),s.qZA(),s.qZA()}}function no(e,o){1&e&&s._UZ(0,"tr",25)}function io(e,o){1&e&&s._UZ(0,"tr",26)}function ro(e,o){1&e&&(s.TgZ(0,"div",27),s._UZ(1,"ion-spinner"),s.qZA())}const ao=function(){return[5,10,20]};let co=(()=>{class e{constructor(e,o,t,n){this.invoicesService=e,this.alertsService=o,this.companiesService=t,this.loadingService=n,this.displayedColumns=["name","created_at","actions"],this.destroy$=new a.xQ}get searchInput(){return this._searchInput}set searchInput(e){e.ionChange.pipe((0,c.R)(this.destroy$),(0,Ye.b)(700),(0,Qe.x)(),(0,Le.b)(()=>{this.paginator&&(this.paginator.pageIndex=0),this.fetchData()})).subscribe(),this._searchInput=e}ngOnInit(){this.dataSource=new Ge(this.companiesService)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}ngAfterViewInit(){this.fetchData(),this.paginator._intl.itemsPerPageLabel="",this.sort.sortChange.subscribe(()=>this.paginator.pageIndex=0),(0,Pe.T)(this.sort.sortChange,this.paginator.page).pipe((0,Le.b)(()=>this.fetchData())).subscribe()}fetchData(){this.sort&&this.paginator&&this.dataSource.loadInvoicesForCompany({filter:this.searchInput?this.searchInput.value:"",sortOrder:this.sort.direction,sortField:this.sort.active,pageNumber:this.paginator.pageIndex,pageSize:this.paginator.pageSize},this.company)}downloadInvoice(e){this.loadingService.showLoadingAlert(),this.invoicesService.getInvoiceDownload(e).subscribe(e=>{console.log(e),this.loadingService.closeLoadingAlert(),this.invoiceUrl=e.url,window.open(this.invoiceUrl,"_blank")})}}return e.\u0275fac=function(o){return new(o||e)(s.Y36($e.x),s.Y36(p.m),s.Y36(m.t),s.Y36(b.b))},e.\u0275cmp=s.Xpm({type:e,selectors:[["loc-invoices-user-table"]],viewQuery:function(e,o){if(1&e&&(s.Gf(Me.NW,5),s.Gf(Je.YE,5)),2&e){let e;s.iGM(e=s.CRH())&&(o.paginator=e.first),s.iGM(e=s.CRH())&&(o.sort=e.first)}},inputs:{searchInput:"searchInput",company:"company"},decls:20,vars:13,consts:[[1,"table-container"],["mat-table","","matSort","","aria-label","Elements","matSortDisableClear","",1,"full-width-table",3,"dataSource"],["matColumnDef","id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","name","xsticky",""],["mat-cell","","style","font-weight: 500 !important",4,"matCellDef"],["matColumnDef","created_at"],["style","min-width: 120px","mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["class","loc-table__actions-cell","mat-cell","",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","pxc-table__spinner",4,"ngIf"],[3,"length","pageSize","pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-cell","",2,"font-weight","500 !important"],["mat-header-cell","","mat-sort-header","",2,"min-width","120px"],["mat-header-cell",""],["mat-cell","",1,"loc-table__actions-cell"],[1,"loc-table__actions"],["fill","clear","color","dark",3,"click"],["pxcIcon","mdi@download","slot","icon-only"],["mat-header-row",""],["mat-row",""],[1,"pxc-table__spinner"]],template:function(e,o){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"table",1),s.ynx(2,2),s.YNc(3,Be,2,0,"th",3),s.YNc(4,We,2,1,"td",4),s.BQk(),s.ynx(5,5),s.YNc(6,Ve,2,0,"th",3),s.YNc(7,Xe,2,1,"td",6),s.BQk(),s.ynx(8,7),s.YNc(9,Ke,2,0,"th",8),s.YNc(10,eo,2,1,"td",4),s.BQk(),s.ynx(11,9),s.YNc(12,oo,2,0,"th",10),s.YNc(13,to,4,0,"td",11),s.BQk(),s.YNc(14,no,1,0,"tr",12),s.YNc(15,io,1,0,"tr",13),s.qZA(),s.qZA(),s.YNc(16,ro,2,0,"div",14),s.ALo(17,"async"),s._UZ(18,"mat-paginator",15),s.ALo(19,"async")),2&e&&(s.xp6(1),s.Q6J("dataSource",o.dataSource),s.xp6(13),s.Q6J("matHeaderRowDef",o.displayedColumns)("matHeaderRowDefSticky",!0),s.xp6(1),s.Q6J("matRowDefColumns",o.displayedColumns),s.xp6(1),s.Q6J("ngIf",s.lcZ(17,8,o.dataSource.loading$)),s.xp6(2),s.Q6J("length",s.lcZ(19,10,o.dataSource.totalItemsCount$))("pageSize",10)("pageSizeOptions",s.DdM(12,ao)))},directives:[Re.BZ,Je.YE,Re.w1,Re.fO,Re.Dz,Re.as,Re.nj,n.O5,Me.NW,Re.ge,Je.nU,Re.ev,i.YG,i.gu,h.a,Re.XQ,Re.Gk,i.PQ],pipes:[n.Ov],styles:[".full-width-table[_ngcontent-%COMP%]{width:100%}.table-container[_ngcontent-%COMP%]{height:calc(100% - 56px);width:100%;max-width:100%;overflow:auto}th[_ngcontent-%COMP%]{padding:10px 10px 10px 20px!important;text-align:left!important}td[_ngcontent-%COMP%]{padding:20px!important}th[_ngcontent-%COMP%]{font-weight:600!important;color:#000c;background-color:#ececec!important}mat-paginator[_ngcontent-%COMP%], th[_ngcontent-%COMP%]{box-shadow:inset 0 1px 0 #0000000d}mat-paginator[_ngcontent-%COMP%]{background-color:#00000005}.loc-badge[_ngcontent-%COMP%]{font-weight:400;text-transform:uppercase;letter-spacing:.3px}.loc-badge--active[_ngcontent-%COMP%]{background-color:green}.loc-badge--waiting[_ngcontent-%COMP%]{background-color:red}.loc-badge--gold[_ngcontent-%COMP%]{background-color:#c9ac07}.loc-badge--orange[_ngcontent-%COMP%]{background-color:#c77700}.loc-badge--primary[_ngcontent-%COMP%]{background-color:var(--ion-color-primary)}.loc-badge--gray[_ngcontent-%COMP%]{background-color:#494949}.loc-badge--custom[_ngcontent-%COMP%]{background-color:#8b4513}.loc-table__link-cell[_ngcontent-%COMP%]{cursor:pointer}tr[_ngcontent-%COMP%]:hover{background-color:#00000008}.loc-table__actions-cell[_ngcontent-%COMP%]{padding:0 10px 0 0!important}.loc-table__actions[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-direction:row;place-content:flex-start;align-items:center;box-sizing:border-box}.loc-table__actions[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{font-size:11px;
1--padding-start:8px;--padding-end:8px;--padding-bottom:15px;--padding-top:15px}"]}),e})(),so=(()=>{class e{constructor(e){this.platformService=e,this.platformWidth="xl",this.destroy$=new a.xQ}ngOnInit(){this.platformService.width$.pipe((0,c.R)(this.destroy$)).subscribe(e=>{this.platformWidth=e})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}isPlatformWidthDense(){return this.platformService.isWidth("lt-md",this.platformWidth)}}return e.\u0275fac=function(o){return new(o||e)(s.Y36(l.m))},e.\u0275cmp=s.Xpm({type:e,selectors:[["loc-invoices-user"]],hostVars:2,hostBindings:function(e,o){2&e&&s.ekj("loc-invoices-user--dense",o.isPlatformWidthDense())},inputs:{platformWidth:"platformWidth",company:"company"},decls:13,vars:2,consts:[[1,"loc-card-crud__container"],["lines","full",1,"loc-card-crud__header"],["fxLayoutAlign","start center"],["placeholder","Szukaj"],["searchInput",""],[3,"company","searchInput"]],template:function(e,o){if(1&e&&(s.TgZ(0,"loc-card-crud"),s.TgZ(1,"ion-card",0),s.TgZ(2,"ion-item",1),s.TgZ(3,"ion-label"),s.TgZ(4,"h2"),s._uU(5,"Faktury"),s.qZA(),s.TgZ(6,"p"),s._uU(7,"Podgl\u0105d"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(8,"ion-card-content"),s.TgZ(9,"div",2),s._UZ(10,"ion-searchbar",3,4),s.qZA(),s._UZ(12,"loc-invoices-user-table",5),s.qZA(),s.qZA(),s.qZA()),2&e){const e=s.MAs(11);s.xp6(12),s.Q6J("company",o.company)("searchInput",e)}},directives:[_.r,i.PM,i.Ie,i.Q$,i.FN,B.Wh,i.VI,i.j9,co],styles:[""]}),e})();var lo=t(88030);function mo(e,o){1&e&&(s.TgZ(0,"mat-form-field",6),s.TgZ(1,"mat-label"),s._uU(2,"TikTok"),s.qZA(),s._UZ(3,"input",40),s.qZA())}function po(e,o){1&e&&(s.TgZ(0,"mat-form-field",6),s.TgZ(1,"mat-label"),s._uU(2,"Twitter"),s.qZA(),s._UZ(3,"input",41),s.qZA())}function uo(e,o){1&e&&(s.ynx(0),s.TgZ(1,"ion-item-divider"),s.TgZ(2,"ion-label"),s._uU(3,"Rezerwuj / zam\xf3w"),s.qZA(),s.qZA(),s.TgZ(4,"mat-form-field",6),s.TgZ(5,"mat-label"),s._uU(6,"Booking"),s.qZA(),s._UZ(7,"input",42),s.qZA(),s.TgZ(8,"mat-form-field",6),s.TgZ(9,"mat-label"),s._uU(10,"Booksy"),s.qZA(),s._UZ(11,"input",43),s.qZA(),s.TgZ(12,"mat-form-field",6),s.TgZ(13,"mat-label"),s._uU(14,"Pyszne"),s.qZA(),s._UZ(15,"input",44),s.qZA(),s.TgZ(16,"mat-form-field",6),s.TgZ(17,"mat-label"),s._uU(18,"Airbnb"),s.qZA(),s._UZ(19,"input",45),s.qZA(),s.TgZ(20,"mat-form-field",6),s.TgZ(21,"mat-label"),s._uU(22,"Slowhop"),s.qZA(),s._UZ(23,"input",46),s.qZA(),s.BQk())}function go(e,o){1&e&&(s.TgZ(0,"div",47),s._UZ(1,"ion-spinner",48),s.qZA())}const fo=function(e){return{display:e}};let ho=(()=>{class e{constructor(e,o,t,n,i,r,c,l,m,p){this.formBuilder=e,this.alertController=o,this.modalController=t,this.overlayController=n,this.companiesService=i,this.loadingService=r,this.authService=c,this.usersService=l,this.alertsService=m,this.navCtrl=p,this.type="create",this.defaultFromHour="09:00",this.defaultToHour="18:00",this.daysOfWeek=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],this.pickerTheme={container:{buttonColor:"#f28a04"},dial:{dialBackgroundColor:"#f28a04"},clockFace:{clockHandColor:"#f28a04"}},this.companyMoreInfoUpdated=new s.vpe,this.companyMoreInfoDone=new s.vpe,this.isLoading=!1,this.destroy$=new a.xQ}ngOnInit(){if(this.setupForm(),this.authService.getAuthUser().pipe((0,c.R)(this.destroy$)).subscribe(e=>{this.authUser=e,"update"===this.type&&this.company&&this.updateForm()}),this.company){let e=this.moreInfoCompanyForm.controls.links;this.companiesService.hasGoldPackage(this.company)&&(e.addControl("tiktok",this.formBuilder.control("")),e.addControl("twitter",this.formBuilder.control(""))),this.companiesService.hasBasicPackage(this.company)||(e.addControl("pyszne",this.formBuilder.control("")),e.addControl("booksy",this.formBuilder.control("")),e.addControl("booking",this.formBuilder.control("")),e.addControl("airbnb",this.formBuilder.control("")),e.addControl("slowhop",this.formBuilder.control("")))}}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}setupForm(){this.moreInfoCompanyForm=this.formBuilder.group({hours:this.formBuilder.group({mondayOpened:[!1],tuesdayOpened:[!1],wednesdayOpened:[!1],thursdayOpened:[!1],fridayOpened:[!1],saturdayOpened:[!1],sundayOpened:[!1],mondayFrom:[this.defaultFromHour],mondayTo:[this.defaultToHour],tuesdayFrom:[this.defaultFromHour],tuesdayTo:[this.defaultToHour],wednesdayFrom:[this.defaultFromHour],wednesdayTo:[this.defaultToHour],thursdayFrom:[this.defaultFromHour],thursdayTo:[this.defaultToHour],fridayFrom:[this.defaultFromHour],fridayTo:[this.defaultToHour],saturdayFrom:[this.defaultFromHour],saturdayTo:[this.defaultToHour],sundayFrom:[this.defaultFromHour],sundayTo:[this.defaultToHour]}),links:this.formBuilder.group({web:[""],facebook:[""],instagram:[""],youtube:[""]})})}updateForm(){this.moreInfoCompanyForm.patchValue(this.company),this.updateHours(this.company.hours)}updateHours(e){(null==e?void 0:e.length)>
10&&this.daysOfWeek.forEach((o,t)=>{e[t]&&(this.moreInfoCompanyForm.get("hours").get(o+"Opened").setValue(!0),this.moreInfoCompanyForm.get("hours").get(o+"From").setValue(e[t].split(" - ")[0]),this.moreInfoCompanyForm.get("hours").get(o+"To").setValue(e[t].split(" - ")[1]))})}getHoursSting(){return`[${this.moreInfoCompanyForm.value.hours.mondayOpened?`"${this.moreInfoCompanyForm.value.hours.mondayFrom} - ${this.moreInfoCompanyForm.value.hours.mondayTo}"`:'""'},${this.moreInfoCompanyForm.value.hours.tuesdayOpened?`"${this.moreInfoCompanyForm.value.hours.tuesdayFrom} - ${this.moreInfoCompanyForm.value.hours.tuesdayTo}"`:'""'},${this.moreInfoCompanyForm.value.hours.wednesdayOpened?`"${this.moreInfoCompanyForm.value.hours.wednesdayFrom} - ${this.moreInfoCompanyForm.value.hours.wednesdayTo}"`:'""'},${this.moreInfoCompanyForm.value.hours.thursdayOpened?`"${this.moreInfoCompanyForm.value.hours.thursdayFrom} - ${this.moreInfoCompanyForm.value.hours.thursdayTo}"`:'""'},${this.moreInfoCompanyForm.value.hours.fridayOpened?`"${this.moreInfoCompanyForm.value.hours.fridayFrom} - ${this.moreInfoCompanyForm.value.hours.fridayTo}"`:'""'},${this.moreInfoCompanyForm.value.hours.saturdayOpened?`"${this.moreInfoCompanyForm.value.hours.saturdayFrom} - ${this.moreInfoCompanyForm.value.hours.saturdayTo}"`:'""'},${this.moreInfoCompanyForm.value.hours.sundayOpened?`"${this.moreInfoCompanyForm.value.hours.sundayFrom} - ${this.moreInfoCompanyForm.value.hours.sundayTo}"`:'""'}]`}save(){if(this.moreInfoCompanyForm.valid){const e={};"update"===this.type&&(e.id=this.company&&this.company.id?this.company.id:null),e.hours=this.getHoursSting(),e.links=this.moreInfoCompanyForm.value.links,this.loadingService.showLoadingAlert(),console.log("company | data",e),"update"===this.type&&this.companiesService.updateMoreInfoCompany(e).subscribe(e=>{console.log("newCompany",e),this.loadingService.closeLoadingAlert(),this.companyMoreInfoUpdated.emit(e.id),this.redirectToTeam()})}}redirectToTeam(){this.companyMoreInfoDone.emit(!0)}}return e.\u0275fac=function(o){return new(o||e)(s.Y36(z.qu),s.Y36(i.Br),s.Y36(i.IN),s.Y36(re.o),s.Y36(m.t),s.Y36(b.b),s.Y36(u.e),s.Y36(g.f),s.Y36(p.m),s.Y36(i.SH))},e.\u0275cmp=s.Xpm({type:e,selectors:[["loc-company-more-info-form"]],inputs:{company:"company",customer:"customer",type:"type"},outputs:{companyMoreInfoUpdated:"companyMoreInfoUpdated",companyMoreInfoDone:"companyMoreInfoDone"},decls:95,vars:9,consts:[[3,"ngStyle"],[1,"loc-card-crud__container"],["lines","full",1,"loc-card-crud__header"],["shape","round","size","default",3,"disabled","click"],[2,"padding-top","0",3,"formGroup"],["formGroupName","links"],["appearance","outline"],["matInput","","formControlName","web"],["matInput","","formControlName","facebook"],["matInput","","formControlName","instagram"],["matInput","","formControlName","youtube"],["appearance","outline",4,"ngIf"],[4,"ngIf"],[2,"margin-bottom","0"],["formGroupName","hours","fxLayout","column"],["fxLayout","row","fxLayoutAlign","center center",1,"loc-company-hours"],["fxFlex","0 0 auto","formControlName","mondayOpened"],["fxFlex","1 0 auto"],["fxLayout","row","fxLayoutAlign","center center"],["formControlName","mondayFrom","matInput","","placeholder","OD"],["formControlName","mondayTo","matInput","","placeholder","DO"],["fxFlex","0 0 auto","formControlName","tuesdayOpened"],["formControlName","tuesdayFrom","matInput","","placeholder","OD"],["formControlName","tuesdayTo","matInput","","placeholder","DO"],["fxFlex","0 0 auto","formControlName","wednesdayOpened"],["formControlName","wednesdayFrom","matInput","","placeholder","OD"],["formControlName","wednesdayTo","matInput","","placeholder","DO"],["fxFlex","0 0 auto","formControlName","thursdayOpened"],["formControlName","thursdayFrom","matInput","","placeholder","OD"],["formControlName","thursdayTo","matInput","","placeholder","DO"],["fxFlex","0 0 auto","formControlName","fridayOpened"],["formControlName","fridayFrom","matInput","","placeholder","OD"],["formControlName","fridayTo","matInput","","placeholder","DO"],["fxFlex","0 0 auto","formControlName","saturdayOpened"],["formControlName","saturdayFrom","matInput","","placeholder","OD"],["formControlName","saturdayTo","matInput","","placeholder","DO"],["fxFlex","0 0 auto","formControlName","sundayOpened"],["formControlName","sundayFrom","matInput","","placeholder","OD"],["formControlName","sundayTo","matInput","","placeholder","DO"],["class","pxc-spinner",4,"ngIf"],["matInput","","formControlName","tiktok"],["matInput","","formControlName","twitter"],["matInput","","formControlName","booking"],["matInput","","formControlName","booksy"],["matInput","","formControlName","pyszne"],["matInput","","formControlName","airbnb"],["matInput","","formControlName","slowhop"],[1,"pxc-spinner"],["color","primary"]],template:function(e,o){1&e&&(s.TgZ(0,"loc-card-crud",0),s.TgZ(1,"ion-card",1),s.TgZ(2,"ion-item",2),s.TgZ(3,"ion-label"),s.TgZ(4,"h2"),s._uU(5,"Pozosta\u0142e informacje"),s.qZA(),s.TgZ(6,"p"),s._uU(7,"Pozosta\u0142e informacje do profilu firmy"),s.qZA(),s.qZA(),s.TgZ(8,"ion-button",3),s.NdJ("
1click",function(){return o.save()}),s._uU(9," Dalej "),s.qZA(),s.qZA(),s.TgZ(10,"ion-card-content",4),s.TgZ(11,"div",5),s.TgZ(12,"ion-item-divider"),s.TgZ(13,"ion-label"),s._uU(14,"Social media"),s.qZA(),s.qZA(),s.TgZ(15,"mat-form-field",6),s.TgZ(16,"mat-label"),s._uU(17,"Strona WWW"),s.qZA(),s._UZ(18,"input",7),s.qZA(),s.TgZ(19,"mat-form-field",6),s.TgZ(20,"mat-label"),s._uU(21,"Facebook"),s.qZA(),s._UZ(22,"input",8),s.qZA(),s.TgZ(23,"mat-form-field",6),s.TgZ(24,"mat-label"),s._uU(25,"Instagram"),s.qZA(),s._UZ(26,"input",9),s.qZA(),s.TgZ(27,"mat-form-field",6),s.TgZ(28,"mat-label"),s._uU(29,"YouTube"),s.qZA(),s._UZ(30,"input",10),s.qZA(),s.YNc(31,mo,4,0,"mat-form-field",11),s.YNc(32,po,4,0,"mat-form-field",11),s.YNc(33,uo,24,0,"ng-container",12),s.qZA(),s.TgZ(34,"ion-item-divider",13),s.TgZ(35,"ion-label"),s._uU(36,"Godziny otwarcia"),s.qZA(),s.qZA(),s.TgZ(37,"div",14),s.TgZ(38,"div",15),s._UZ(39,"ion-checkbox",16),s.TgZ(40,"h3"),s._uU(41,"Poniedzia\u0142ek"),s.qZA(),s._UZ(42,"div",17),s.TgZ(43,"div",18),s._UZ(44,"input",19),s._UZ(45,"input",20),s.qZA(),s.qZA(),s.TgZ(46,"div",15),s._UZ(47,"ion-checkbox",21),s.TgZ(48,"h3"),s._uU(49,"Wtorek"),s.qZA(),s._UZ(50,"div",17),s.TgZ(51,"div",18),s._UZ(52,"input",22),s._UZ(53,"input",23),s.qZA(),s.qZA(),s.TgZ(54,"div",15),s._UZ(55,"ion-checkbox",24),s.TgZ(56,"h3"),s._uU(57,"\u015aroda"),s.qZA(),s._UZ(58,"div",17),s.TgZ(59,"div",18),s._UZ(60,"input",25),s._UZ(61,"input",26),s.qZA(),s.qZA(),s.TgZ(62,"div",15),s._UZ(63,"ion-checkbox",27),s.TgZ(64,"h3"),s._uU(65,"Czwartek"),s.qZA(),s._UZ(66,"div",17),s.TgZ(67,"div",18),s._UZ(68,"input",28),s._UZ(69,"input",29),s.qZA(),s.qZA(),s.TgZ(70,"div",15),s._UZ(71,"ion-checkbox",30),s.TgZ(72,"h3"),s._uU(73,"Pi\u0105tek"),s.qZA(),s._UZ(74,"div",17),s.TgZ(75,"div",18),s._UZ(76,"input",31),s._UZ(77,"input",32),s.qZA(),s.qZA(),s.TgZ(78,"div",15),s._UZ(79,"ion-checkbox",33),s.TgZ(80,"h3"),s._uU(81,"Sobota"),s.qZA(),s._UZ(82,"div",17),s.TgZ(83,"div",18),s._UZ(84,"input",34),s._UZ(85,"input",35),s.qZA(),s.qZA(),s.TgZ(86,"div",15),s._UZ(87,"ion-checkbox",36),s.TgZ(88,"h3"),s._uU(89,"Niedziela"),s.qZA(),s._UZ(90,"div",17),s.TgZ(91,"div",18),s._UZ(92,"input",37),s._UZ(93,"input",38),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.YNc(94,go,2,0,"div",39)),2&e&&(s.Q6J("ngStyle",s.VKq(7,fo,o.isLoading?"none":"initial")),s.xp6(8),s.Q6J("disabled",o.moreInfoCompanyForm.invalid),s.xp6(2),s.Q6J("formGroup",o.moreInfoCompanyForm),s.xp6(21),s.Q6J("ngIf",o.companiesService.hasGoldPackage(o.company)),s.xp6(1),s.Q6J("ngIf",o.companiesService.hasGoldPackage(o.company)),s.xp6(1),s.Q6J("ngIf",!o.companiesService.hasBasicPackage(o.company)),s.xp6(61),s.Q6J("ngIf",o.isLoading))},directives:[_.r,n.PC,lo.Zl,i.PM,i.Ie,i.Q$,i.YG,i.FN,z.JL,z.sg,z.x0,i.rH,$.KE,$.hX,R.Nt,z.Fj,z.JJ,z.u,n.O5,B.xw,B.Wh,i.nz,i.w,B.yH,i.PQ],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%}.loc-image-form-field[_ngcontent-%COMP%] .mat-form-field-infix{width:20px!important}.loc-company-hours[_ngcontent-%COMP%]{padding:16px;border-bottom:1px solid #dbdbdb}.loc-company-hours[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:16px;color:#000;margin-left:24px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.loc-company-hours[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{max-width:60px;text-align:center}.company-span-error[_ngcontent-%COMP%]{color:var(--ion-color-danger);font-size:12px;font-weight:400;margin-bottom:10px}"]}),e})();function yo(e,o){if(1&e&&(s.TgZ(0,"ion-title"),s._uU(1),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.hij(" ",e.company.name," ")}}function Zo(e,o){1&e&&(s.TgZ(0,"ion-button",25),s._uU(1," Zmie\u0144 pakiet "),s.qZA())}function vo(e,o){if(1&e&&(s.TgZ(0,"ion-button",26),s._UZ(1,"ion-icon",27),s._uU(2," Podgl\u0105d "),s.qZA()),2&e){const e=s.oxw();s.Q6J("href","/app/firmy/"+e.company.slug)}}const bo=function(e){return["/firmy",e]};function _o(e,o){if(1&e&&(s.TgZ(0,"ion-button",28),s._UZ(1,"ion-icon",27),s._uU(2," Podgl\u0105d "),s.qZA()),2&e){const e=s.oxw();s.Q6J("routerLink",s.VKq(1,bo,e.company.slug))}}function xo(e,o){1&e&&(s.TgZ(0,"ion-button",29),s.NdJ("click",function(){return!0}
1),s._UZ(1,"ion-icon",30),s._uU(2," Zapisz "),s.qZA())}function To(e,o){1&e&&(s.TgZ(0,"ion-segment-button",31),s.TgZ(1,"ion-label"),s._uU(2,"Klient"),s.qZA(),s.qZA())}function Ao(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"loc-company-info-form",40),s.NdJ("companyUpdated",function(){return s.CHM(e),s.oxw(2).onCompanyUpdate()})("packagePayed",function(){return s.CHM(e),s.oxw(2).packagePayed()}),s.qZA()}if(2&e){const e=s.oxw(2);s.Q6J("company",e.company)}}function wo(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"loc-company-images-crud",41),s.NdJ("companyImagesDone",function(o){return s.CHM(e),s.oxw(2).onCompanyImagesDone(o)}),s.qZA()}if(2&e){const e=s.oxw(2);s.Q6J("company",e.company)}}function Io(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"loc-company-certificates-crud",42),s.NdJ("companyCertificatesDone",function(o){return s.CHM(e),s.oxw(2).onCompanyCertificatesDone(o)}),s.qZA()}if(2&e){const e=s.oxw(2);s.Q6J("company",e.company)}}function Co(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"loc-company-team-crud",43),s.NdJ("companyTeamDone",function(o){return s.CHM(e),s.oxw(2).onCompanyTeamDone(o)}),s.qZA()}if(2&e){const e=s.oxw(2);s.Q6J("company",e.company)}}function qo(e,o){if(1&e&&s._UZ(0,"loc-company-services-crud",44),2&e){const e=s.oxw(2);s.Q6J("company",e.company)}}function Uo(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"loc-customer-form",45),s.NdJ("customerUpdated",function(){return s.CHM(e),s.oxw(2).onCustomerUpdate()}),s.qZA()}if(2&e){const e=s.oxw(2);s.Q6J("customer",e.customer)}}function ko(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"loc-company-offers-crud",46),s.NdJ("companyOffersDone",function(o){return s.CHM(e),s.oxw(2).onCompanyOffersDone(o)}),s.qZA()}if(2&e){const e=s.oxw(2);s.Q6J("company",e.company)}}function Do(e,o){if(1&e&&s._UZ(0,"loc-invoices-user",44),2&e){const e=s.oxw(2);s.Q6J("company",e.company)}}function No(e,o){if(1&e){const e=s.EpF();s.TgZ(0,"loc-company-more-info-form",47),s.NdJ("companyMoreInfoUpdated",function(){return s.CHM(e),s.oxw(2).companyMoreInfoUpdated()})("companyMoreInfoDone",function(o){return s.CHM(e),s.oxw(2).onCompanyMoreToTeam(o)}),s.qZA()}if(2&e){const e=s.oxw(2);s.Q6J("company",e.company)}}function Oo(e,o){if(1&e&&(s.ynx(0),s.YNc(1,Ao,1,1,"loc-company-info-form",32),s.YNc(2,wo,1,1,"loc-company-images-crud",33),s.YNc(3,Io,1,1,"loc-company-certificates-crud",34),s.YNc(4,Co,1,1,"loc-company-team-crud",35),s.YNc(5,qo,1,1,"loc-company-services-crud",36),s.YNc(6,Uo,1,1,"loc-customer-form",37),s.YNc(7,ko,1,1,"loc-company-offers-crud",38),s.YNc(8,Do,1,1,"loc-invoices-user",36),s.YNc(9,No,1,1,"loc-company-more-info-form",39),s.BQk()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("ngIf","info"===e.view),s.xp6(1),s.Q6J("ngIf","images"===e.view),s.xp6(1),s.Q6J("ngIf","certificates"===e.view),s.xp6(1),s.Q6J("ngIf","team"===e.view),s.xp6(1),s.Q6J("ngIf","images"===e.view),s.xp6(1),s.Q6J("ngIf","customer"===e.view),s.xp6(1),s.Q6J("ngIf","offers"===e.view),s.xp6(1),s.Q6J("ngIf","invoices"===e.view),s.xp6(1),s.Q6J("ngIf","more"===e.view)}}function So(e,o){1&e&&(s.TgZ(0,"div",48),s._UZ(1,"ion-spinner",49),s.qZA())}const Fo=[{path:"",component:(()=>{class e{constructor(e,o,t,n,i,r,c,s){this.platformService=e,this.activatedRoute=o,this.companiesService=t,this.alertsService=n,this.customersService=i,this.authService=r,this.usersService=c,this.messagesService=s,this.platformWidth="xl",this.view="info",this.isLoading=!0,this.destroy$=new a.xQ}ngOnInit(){this.platformService.width$.pipe((0,c.R)(this.destroy$)).subscribe(e=>{this.platformWidth=e}),this.activatedRoute.paramMap.subscribe(e=>{this.companyId=+e.get("companyId"),this.fetchData()}),this.authService.getAuthUser().pipe((0,c.R)(this.destroy$)).subscribe(e=>{console.log("auth user changed"),console.log(e),this.authUser=e}),this.fetchMeUnseen()}fetchMeUnseen(){this.messagesService.getMeMessagesUnseen().subscribe(e=>{console.log("unseen",e.message),this.unseen=e.message})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}isPlatformWidthDense(){return this.platformService.isWidth("lt-md",this.platformWidth)}fetchData(){this.companyId&&(this.isLoading=!0,this.companiesService.getCompany(this.companyId).subscribe(e=>{this.company=e,this.isLoading=!1}))}viewSegmentChanged(e){const o=e.detail.value;this.company&&this.company.package&&("team"===o&&!this.company.package.team_enabled&&!this.company.package.owner_enabled||"certificates"===o&&!this.company.package.certificates_enabled||"offers"===o&&!this.company.package.offers_limit?this.showPackageLimitAlert():("customer"===o&&this.company&&this.fetchCustomer(),this.view=e.detail.value))}showPackageLimitAlert(){this.alertsService.showPackageLimitAlert()}isViewSegmentDisabled(){return!(this.company&&this.company.package)}onCompanyUpdate(){this.fetchData(),this.view="images"}companyMoreInfoUpdated(){this.fetchData(),this.view="team"}onCompanyImagesDone(e){!0===e&&(this.view="more")}onCompanyMoreToTeam(e){!0===e&&(this.view="team")}onCompanyTeamDone(e){!0===e&&(this.view="certificates")}onCompanyCertificatesDone(e){!0===e&&(this.view="offers")}onCompanyOffersDone(e){!0===e&&(this.view="invoices")}packagePayed(){console.log("event-packagePayed"),this.fetchData()}onCustomerUpdate(){this.fetchCustomer()}fetchCustomer(){this.isLoading=!0,this.customersService.getCustomer(this.company.customer_id).subscribe(e=>{this.customer=e,this.isLoading=!1})}}return e.\u0275fac=function(o){return new(o||e)(s.Y36(l.m),s.Y36(r.gz),s.Y36(m.t),s.Y36(p.m),s.Y36(d.v),s.Y36(u.e),s.Y36(g.f),s.Y36(f.K))},e.\u0275cmp=s.Xpm({type:e,selectors:[["app-company-edit"]],hostVars:2,hostBindings:function(e,o){2&e&&s.ekj("loc-company-edit--dense",o.isPlatformWidthDense())},inputs:{platformWidth:"platformWidth",company:"company"},decls:41,vars:10,consts:[["xcolor","light"],["slot","start"],["defaultHref","/panel/companies"],[4,"ngIf"],["slot","end"],["color","primary","fill","solid","style","margin-right: 16px","disabled","","class","loc-button-round",4,"ngIf"],["target","_blank","color","primary",3,"href",4,"ngIf"],["routerDirection","root","color","primary",3,"routerLink",4,"ngIf"],["color","primary","xfill","solid",3,"click",4,"ngIf"],["scrollable","",2,"max-width","100%",3,"value","disabled","ionChange"],["value","info","layout","icon-start"],["pxcIcon","mdi@numeric-1-circle"],["value","images","layout","icon-start"],["pxcIcon","mdi@numeric-2-circle"],["value","more","layout","icon-start"],["pxcIcon","mdi@numeric-3-circle"],["value","team","layout","icon-start"],["pxcIcon","mdi@numeric-4-circle"],["value","certificates","layout","icon-start"],["pxcIcon","mdi@numeric-5-circle"],["value","offers","layout","icon-start"],["pxcIcon","mdi@numeric-6-circle"],["value","customer",4,"ngIf"],[4,"ngIf","ngIfElse"],["loadingTemplate",""],["color","primary","fill","solid","disabled","",1,"loc-button-round",2,"margin-right","16px"],["target","_blank","color","primary",3,"href"],["pxcIcon","mdi@eye","slot","start"],["routerDirection","root","color","primary",3,"routerLink"],["color","primary","xfill","solid",3,"click"],["pxcIcon","mdi@content-save-outline","slot","start"],["value","customer"],["type","update",3,"company","companyUpdated","packagePayed",4,"ngIf"],[3,"company","companyImagesDone",4,"ngIf"],[3,"company","companyCertificatesDone",4,"ngIf"],[3,"company","companyTeamDone",4,"ngIf"],[3,"company",4,"ngIf"],["type","update",3,"customer","customerUpdated",4,"ngIf"],[3,"company","companyOffersDone",4,"ngIf"],["type","update",3,"company","companyMoreInfoUpdated","companyMoreInfoDone",4,"ngIf"],["type","update",3,"company","companyUpdated","packagePayed"],[3,"company","companyImagesDone"],[3,"company","companyCertificatesDone"],[3,"company","companyTeamDone"],[3,"company"],["type","update",3,"customer","customerUpdated"],[3,"company","companyOffersDone"],["type","update",3,"company","companyMoreInfoUpdated","companyMoreInfoDone"],[1,"pxc-spinner"],["color","primary"]],template:function(e,o){if(1&e&&(s.TgZ(0,"ion-header"),s.TgZ(1,"ion-toolbar",0),s.TgZ(2,"ion-buttons",1),s._UZ(3,"ion-back-button",2),s.qZA(),s.YNc(4,yo,2,1,"ion-title",3),s.TgZ(5,"ion-buttons",4),s.YNc(6,Zo,2,0,"ion-button",5),s.YNc(7,vo,3,1,"ion-button",6),s.YNc(8,_o,3,3,"ion-button",7),s.YNc(9,xo,3,0,"ion-button",8),s.qZA(),s.qZA(),s.TgZ(10,"ion-toolbar",0),s.TgZ(11,"ion-segment",9),s.NdJ("ionChange",function(e){return o.viewSegmentChanged(e)}),s.TgZ(12,"ion-segment-button",10),s._UZ(13,"ion-icon",11),s.TgZ(14,"ion-label"),s._uU(15,"Dane"),s.qZA(),s.qZA(),s.TgZ(16,"ion-segment-button",12),s._UZ(17,"ion-icon",13),s.TgZ(18,"ion-label"),s._uU(19,"Galeria/Ikony"),s.qZA(),s.qZA(),s.TgZ(20,"ion-segment-button",14),s._UZ(21,"ion-icon",15),s.TgZ(22,"ion-label"),s._uU(23,"Pozosta\u0142e informacje"),s.qZA(),s.qZA(),s.TgZ(24,"ion-segment-button",16),s._UZ(25,"ion-icon",17),s.TgZ(26,"ion-label"),s._uU(27,"Zesp\xf3\u0142"),s.qZA(),s.qZA(),s.TgZ(28,"ion-segment-button",18),s._UZ(29,"ion-icon",19),s.TgZ(30,"ion-label"),s._uU(31,"Certyfikaty"),s.qZA(),s.qZA(),s.TgZ(32,"ion-segment-button",20),s._UZ(33,"ion-icon",21),s.TgZ(34,"ion-label"),s._uU(35,"Oferty"),s.qZA(),s.qZA(),s.YNc(36,To,3,0,"ion-segment-button",22),s.qZA(),s.qZA(),s.qZA(),s.TgZ(37,"ion-content"),s.YNc(38,Oo,10,9,"ng-container",23),s.qZA(),s.YNc(39,So,2,0,"ng-template",null,24,s.W1O)),2&e){const e=s.MAs(40);s.xp6(4),s.Q6J("ngIf",o.company),s.xp6(2),s.Q6J("ngIf",o.usersService.isCustomer(o.authUser)),s.xp6(1),s.Q6J("ngIf",!o.platformService.isHybrid()&&o.company&&o.company.id),s.xp6(1),s.Q6J("ngIf",o.platformService.isHybrid()&&o.company&&o.company.id),s.xp6(1),s.Q6J("ngIf",!1),s.xp6(2),s.Q6J("value",o.view)("disabled",o.isViewSegmentDisabled()),s.xp6(25),s.Q6J("ngIf",o.usersService.isAdmin(o.authUser)||o.usersService.isSales(o.authUser)),s.xp6(2),s.Q6J("ngIf",!o.isLoading)("ngIfElse",e)}},directives:[i.Gu,i.sr,i.Sm,i.oU,i.cs,n.O5,i.cJ,i.QI,i.GO,i.gu,h.a,i.Q$,i.W2,i.wd,i.YG,i.YI,r.rH,y.d,D,H,Ze,Ce,qe.O,Fe,so,ho,i.PQ],styles:["[_nghost-%COMP%] .loc-button-round[_ngcontent-%COMP%]{--border-radius:10px}"]}),e})()}];let Mo=(()=>{class e{}return e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[r.Bz.forChild(Fo)],r.Bz]}),e})();var Jo=t(84419),Po=t(15566),Yo=t(29790),Qo=t(21482);let Lo=(()=>{class e{}return e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[n.ez,i.Pc,Qo.i,Jo.p]]}),e})();var Ho=t(22832),zo=t(15665);let Eo=(()=>{class e{}return e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[n.ez,zo.z,Ho.p,i.Pc,$.lN,z.UX,Po.o9,R.c,Jo.p,W.d,Po.o9]]}),e})(),jo=(()=>{class e{}return e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[n.ez,i.Pc,Qo.i,Jo.p,Po.o9,Eo]]}),e})();var Go=t(73965);let $o=(()=>{class e{}return e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[n.ez,zo.z,Go.J]]}),e})(),Ro=(()=>{class e{}return e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[n.ez,i.Pc,Qo.i,Jo.p,$o]]}),e})();var Bo=t(72094),Wo=t(48363);let Vo=(()=>{class e{}return e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[n.ez,i.Pc,Qo.i,Jo.p,Wo.v]]}),e})();var Xo=t(67717),Ko=t(40734);let et=(()=>{class e{}return e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[n.ez,i.Pc,Qo.i,Jo.p,Ko.L,r.Bz]]}),e})();var ot=t(82371);let tt=(()=>{class e{}return e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[n.ez,Re.p0,Me.TU,Je.JX,Po.o9,r.Bz,Qo.i,Jo.p,i.Pc]]}),e})();var nt=t(72411),it=t(93738),rt=t(67441),at=t(21554),ct=t(58341),st=t(76627),lt=t(96109),mt=t(41099),pt=t(16282),dt=t
1(78436),ut=t(31793),gt=t(27128);let ft=(()=>{class e{}return e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[n.ez,i.Pc,Jo.p,Po.o9,z.UX,Yo.aw,nt.P,$.lN,R.c,it.QW,rt.LD,at.Bb,W.d,Qo.i,ct.Hi,st.Ps,lt.Ky,mt.rK,pt.o,dt.F,ut.P,gt.Q]]}),e})(),ht=(()=>{class e{}return e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[n.ez,i.Pc,Jo.p,Po.o9,Yo.aw,r.Bz,Vo,Lo,jo,Ro,Bo.n,Xo._,Mo,et,ot.P,tt,ft]]}),e})()}}]);
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.