PageSourceSearch

https://sotreqlink.sotreq.com.br/895.36454a5370a26aac.js

js sotreq.com.br collected 2026-10-07 21:20:32 UTC 30,681 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkCustomerPanel=self.webpackChunkCustomerPanel||[]).push([[895],{511:(k,f,n)=>{n.d(f,{p:()=>h});var o=n(1066),d=n(4438),u=n(1626);let h=(()=>{class p extends o.r{PATH="Profile";constructor(c){super(c)}createProfile(c,m=!0){return this.basePost(this.getUrl("Create"),c,m)}updateProfile(c,m,b=!0){return this.basePut(this.getUrl(`${c}`),m,b)}deleteProfile(c,m=!0){return this.baseDelete(this.getUrl(c),m)}getProfileById(c,m=!0){return this.baseGet(this.getUrl(`GetProfileDetails/${c}`),m)}getProfilesByFilter(c,m=!0){return this.baseGet(this.getUrl("ListProfiles"),m,c)}static \u0275fac=function(m){return new(m||p)(d.KVO(u.Qq))};static \u0275prov=d.jDH({token:p,factory:p.\u0275fac,providedIn:"root"})}return p})()},9093:(k,f,n)=>{n.r(f),n.d(f,{DetailsSidebarModule:()=>y});var o=n(177),d=n(9417),u=n(5940),h=n(2528),p=n(1521),g=n(60),c=n(1141),m=n(9851),b=n(5430),E=n(4799),M=n(1570),a=n(8833),v=n(2242),x=n(1305),T=n(5875),_=n(4438);const e=[T.n,M.P,c.tm,a.kr,v.u,x.f,m.rO,b.q4,E.F],I=[p.S,u.r,h.X];let y=(()=>{class S{static \u0275fac=function(A){return new(A||S)};static \u0275mod=_.$C({type:S});static \u0275inj=_.G2t({imports:[o.MD,d.YN,d.X1,e,I,g.dX]})}return S})()},4895:(k,f,n)=>{n.r(f),n.d(f,{ProfileModule:()=>oe});var o=n(177),d=n(6072),u=n(6660),h=n(1141),p=n(9851),g=n(491),c=n(4799),m=n(2242),b=n(874),E=n(9093),M=n(3147),a=n(6706),v=n(3665),x=n(9421),T=n(2740),_=n(9583),e=n(4438),I=n(1125),y=n(511),S=n(5788),j=n(4251),O
1=n(9417),A=n(3353),U=n(8076),R=n(5779),V=n(5875),F=n(5430);const B=()=>({standalone:!0});function G(r,D){1&r&&(e.j41(0,"h5"),e.EFF(1,"Perfil de Acesso \xe0s \xc1reas"),e.k0s())}function N(r,D){if(1&r&&(e.j41(0,"span",11),e.EFF(1),e.k0s()),2&r){const t=D.$implicit,i=e.XpG();e.R7$(),e.JRh(i.CustomerEmployeeAreasEnumMap[t])}}function L(r,D){if(1&r){const t=e.RV6();e.j41(0,"div")(1,"p-checkbox",16),e.mxI("ngModelChange",function(s){const l=e.eBV(t).$implicit,P=e.XpG();return e.DH7(P.readingChecks[l],s)||(P.readingChecks[l]=s),e.Njj(s)}),e.bIt("onChange",function(s){const l=e.eBV(t).$implicit,P=e.XpG();return e.Njj(P.onReadingChange(l,s))}),e.k0s()()}if(2&r){const t=D.$implicit,i=e.XpG();e.R7$(),e.R50("ngModel",i.readingChecks[t]),e.Y8G("ngModelOptions",e.lJ4(3,B))("binary",!0)}}function W(r,D){if(1&r){const t=e.RV6();e.j41(0,"div")(1,"p-checkbox",16),e.mxI("ngModelChange",function(s){const l=e.eBV(t).$implicit,P=e.XpG();return e.DH7(P.editChecks[l],s)||(P.editChecks[l]=s),e.Njj(s)}),e.bIt("onChange",function(s){const l=e.eBV(t).$implicit,P=e.XpG();return e.Njj(P.onEditChange(l,s))}),e.k0s()()}if(2&r){const t=D.$implicit,i=e.XpG();e.R7$(),e.R50("ngModel",i.editChecks[t]),e.Y8G("ngModelOptions",e.lJ4(3,B))("binary",!0)}}function K(r,D){if(1&r){const t=e.RV6();e.j41(0,"p-button",24),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.onDeleteClick())}),e.k0s()}}function $(r,D){if(1&r){const t=e.RV6();e.j41(0,"div",20)(1,"div",21),e.DNE(2,K,1,0,"p-button",22),e.k0s(),e.j41(3,"div",21)(4,"p-button",23),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.onSaveClick())}),e.k0s()()()}if(2&r){const t=e.XpG();e.R7$(2),e.Y8G("ngIf",!t.isAdd)}}let X=(()=>{class r{profileService;toaster;confirmationService;userService;icons=U.F;form;profileId;isAdd=!1;finishedEditing=!1;originalPermissions=[];isVisible=!1;isObserverMode=!1;topbarConfig;profileName="";tableData;customerUserId;actionCompleted=new e.bkB;CustomerEmployeeAreasEnumMap=a.W;CustomerEmployeeAreasEnum=a.q;areas=[a.q.Equipment,a.q.Budgets,a.q.Leads,a.q.Financial,a.q.Tracking,a.q.Reports,a.q.Groups,a.q.ManageUsers,a.q.ManageProfiles,a.q.Messaging];readingChecks={};editChecks={};selectAllReading=!1;selectAllEdit=!1;showSaveConfirmationModal=!1;showDeleteConfirmationModal=!1;constructor(t,i,s,l){this.profileService=t,this.toaster=i,this.confirmationService=s,this.userService=l}ngOnInit(){this.form=new O.gE({profileName:new O.MJ("",[O.k0.required,O.k0.minLength(3)])}),this.areas.forEach(t=>{this.readingChecks[t]=!1,this.editChecks[t]=!1}),this.form.get("profileName")?.setValue(this.profileName)}setProfile(t){this.profileName=t,this.form.get("profileName")?.setValue(t)}setProfileId(t){this.profileId=t}setCustomerUserId(t){this.customerUserId=t}loadProfile(t){this.profileId=t.id,this.form.get("profileName")?.setValue(t.name??""),this.readingChecks={},this.editChecks={},this.checkPermissions(t),this.checkReadingGroup(),this.checkEditGroup(),this.originalPermissions=t.permissions}checkPermissions(t){t.permissions.forEach(i=>{switch(i.nuScreen){case a.q.Billets:case a.q.Invoices:case a.q.Financial:this.readingChecks[a.q.Financial]=!0,this.editChecks[a.q.Financial]=i?.nuAction===A.T.Write;break;case a.q.Parts:case a.q.Services:case a.q.Budgets:this.readingChecks[a.q.Budgets]=!0,this.editChecks[a.q.Budgets]=i?.nuAction===A.T.Write;break;case a.q.TrackingParts:case a.q.TrackingServices:case a.q.Tracking:this.readingChecks[a.q.Tracking]=!0,this.editChecks[a.q.Tracking]=i?.nuAction===A.T.Write;break;default:this.readingChecks[i.nuScreen]=!0,this.editChecks[i.nuScreen]=i?.nuAction===A.T.Write}})}open(t){if(this.isAdd=t??!1,this.isAdd){if(this.isObserverMode)return void this.toaster.error("Usu\xe1rio observador n\xe3o pode criar Perfis.");this.form.reset(),this.areas.forEach(i=>{this.readingChecks[i]=!1,this.editChecks[i]=!1}),this.selectAllReading=!1,this.selectAllEdit=!1}this.isVisible=!0}close(){this.isVisible=!1}onSaveClick(){const t=this.form.get("profileName")?.value?.trim(),i=this.areas.some(l=>this.readingChecks[l]||this.editChecks[l]),s=this.userService.checkUserPermission(A.T.Write,a.q.ManageProfiles);if(this.isObserverMode)this.toaster.error("Usu\xe1rio observador n\xe3o pode realizar altera\xe7\xf5es.");else{if(s)return t?this.form.get("profileName").getError("minlength")?(this.toaster.error("O campo Nome do Perfil de Acesso deve possuir pelo menos 3 caracteres"),void this.form.get("profileName")?.markAsTouched()):void(i?this.confirmationService.confirm({header:"Salvar Perfil de Acesso",message:"Tem certeza que deseja salvar esse Perfil de Acesso?",acceptLabel:"Confirmar",rejectLabel:"Cancelar",acceptIcon:"-",rejectIcon:"-",accept:()=>{this.confirmSave()}}):this.toaster.error("Selecione ao menos uma permiss\xe3o")):(this.toaster.error("Para salvar \xe9 obrigat\xf3rio preencher o nome do Perfil de Acesso"),void this.form.get("profileName")?.markAsTouched());this.toaster.error("Voc\xea n\xe3o possui permiss\xe3o para realizar esta a\xe7\xe3o")}}confirmSave(){const t=this.form.get("profileName")?.value??"";let i=[];this.updatePermissions(i),this.isAdd?this.profileService.createProfile({name:t,permissions:i,customerUserId:this.customerUserId}).subscribe({next:()=>{this.actionCompleted.emit(),this.toaster.success("Perfil de acesso criado com sucesso."),this.close()},error:()=>{this.toaster.error("Erro ao criar Perfil de Acesso")}}):this.profileService.updateProfile(this.profileId,{id:this.profileId,name:t,permissions:i}).subscribe({next:()=>{this.actionCompleted.emit(),this.toaster.success("Perfil atualizado com sucesso"),this.close()},error:()=>{this.toaster.error("Erro ao atualizar o Perfil de Acesso")}}),this.finishedEditing=!0}updatePermissions(t){this.areas.forEach(i=>
1{switch(i){case a.q.Financial:(this.readingChecks[i]||this.editChecks[i])&&(t.push({area:a.q.Billets,reading:this.readingChecks[i],edit:this.editChecks[i]}),t.push({area:a.q.Invoices,reading:this.readingChecks[i],edit:this.editChecks[i]}));break;case a.q.Budgets:(this.readingChecks[i]||this.editChecks[i])&&(t.push({area:a.q.Parts,reading:this.readingChecks[i],edit:this.editChecks[i]}),t.push({area:a.q.Services,reading:this.readingChecks[i],edit:this.editChecks[i]}));break;case a.q.Tracking:(this.readingChecks[i]||this.editChecks[i])&&(t.push({area:a.q.TrackingParts,reading:this.readingChecks[i],edit:this.editChecks[i]}),t.push({area:a.q.TrackingServices,reading:this.readingChecks[i],edit:this.editChecks[i]}));break;default:(this.readingChecks[i]||this.editChecks[i])&&t.push({area:i,reading:this.readingChecks[i],edit:this.editChecks[i]})}})}onCloseSideBar(){this.hasChanges()?this.confirmationService.confirm({header:"Sair",message:"Sair sem salvar altera\xe7\xf5es?",acceptLabel:"Confirmar",rejectLabel:"Cancelar",acceptIcon:"-",rejectIcon:"-",accept:()=>{this.close()},reject:()=>{this.isVisible=!0}}):this.close()}hasChanges(){if(this.finishedEditing)return!1;let t=!1;return t=this.isAdd?this.form.dirty||Object.values(this.editChecks).filter(i=>1==i).length>0||Object.values(this.readingChecks).filter(i=>1==i).length>0:this.form.dirty||this.checkPermissionChange(),t}checkPermissionChange(){let t=!1,i=[];return this.updatePermissions(i),t=!this.originalPermissions.every(s=>i.find(l=>s.nuScreen===l.area&&(s.nuAction===A.T.Read||s.nuAction===A.T.Write))),t}onDeleteClick(){const t=this.userService.checkUserPermission(A.T.Write,a.q.ManageProfiles);this.isObserverMode?this.toaster.error("Usu\xe1rio observador n\xe3o pode realizar altera\xe7\xf5es."):t?this.confirmationService.confirm({header:"Excluir Perfil de Acesso",message:"Tem certeza que deseja excluir esse Perfil de Acesso?",acceptLabel:"Confirmar",rejectLabel:"Cancelar",acceptIcon:"-",rejectIcon:"-",accept:()=>{this.confirmDelete()}}):this.toaster.error("Voc\xea n\xe3o possui permiss\xe3o para realizar esta a\xe7\xe3o")}confirmDelete(){this.profileService.deleteProfile(this.profileId).subscribe({next:()=>{this.actionCompleted.emit(),this.toaster.success("Perfil exclu\xeddo com sucesso"),this.close()},error:t=>{t?this.toaster.warn(t?.message):this.toaster.error("Erro ao deletar o Perfil de Acesso")}})}toggleSelectAllReading(t){const i=t.checked;this.areas.forEach(s=>{this.readingChecks[s]=this.selectAllReading,!this.selectAllReading&&this.editChecks[s]&&(this.editChecks[s]=!1)}),this.checkReadingGroup(),this.checkEditGroup(),i||setTimeout(()=>document.activeElement?.blur(),0)}toggleSelectAllEdit(t){const i=t.checked;this.areas.forEach(s=>{this.editChecks[s]=this.selectAllEdit,this.selectAllEdit&&(this.readingChecks[s]=!0)}),this.checkEditGroup(),this.checkReadingGroup(),i||setTimeout(()=>document.activeElement?.blur(),0)}onReadingChange(t,i){const s=i.checked;this.readingChecks[t]=s,!s&&this.editChecks[t]&&(this.editChecks[t]=!1),this.checkEditGroup(),this.checkReadingGroup(),s||setTimeout(()=>document.activeElement?.blur(),0)}onEditChange(t,i){const s=i.checked;this.editChecks[t]=s,s&&(this.readingChecks[t]=!0),this.checkReadingGroup(),this.checkEditGroup(),s||setTimeout(()=>document.activeElement?.blur(),0)}checkReadingGroup(){this.selectAllReading=this.areas.every(t=>this.readingChecks[t])}checkEditGroup(){this.selectAllEdit=this.areas.every(t=>this.editChecks[t])}static \u0275fac=function(i){return new(i||r)(e.rXU(y.p),e.rXU(S.W9),e.rXU(R.td),e.rXU(I.D))};static \u0275cmp=e.VBU({type:r,selectors:[["cpn-profile-details-sidebar"]],inputs:{isVisible:"isVisible",isObserverMode:"isObserverMode",topbarConfig:"topbarConfig",profileName:"profileName",tableData:"tableData",customerUserId:"customerUserId"},outputs:{actionCompleted:"actionCompleted"},decls:33,vars:14,consts:[["detailsSidebar",""],["styleClass","p-sidebar-width-large","position","right",3,"visibleChange","onHide","visible"],["pTemplate","header"],[3,"formGroup"],[1,"profile-name-region"],[2,"padding-bottom","5px"],["placeholder","Digite o nome do perfil de acesso","formControlName","profileName",1,"textarea-profile"],[1,"form-row-header"],[1,"header-item"],[1,"form-row"],[1,"form-group-left"],[1,"options"],["class","options",4,"ngFor","ngForOf"],[1,"form-group-right"],[1,"checkbox-profile-group"],[1,"checkbox-profile-item"],[3,"ngModelChange","onChange","ngModel","ngModelOptions","binary"],[4,"ngFor","ngForOf"],["pTemplate","footer"],[3,"closable"],[1,"button-region"],[1,"button"],["styleClass","btn-sotreq-primary slim","icon","pi pi-trash","iconPos","right","label","Excluir Perfil",3,"click",4,"ngIf"],["styleClass","btn-sotreq-primary slim","icon","pi pi-download","iconPos","right","label","Salvar",3,"click"],["styleClass","btn-sotreq-primary slim","icon","pi pi-trash","iconPos","right","label","Excluir Perfil",3,"click"]],template:function(i,s){if(1&i){const l=e.RV6();e.j41(0,"p-sidebar",1,0),e.mxI("visibleChange",function(C){return e.eBV(l),e.DH7(s.isVisible,C)||
1(s.isVisible=C),e.Njj(C)}),e.bIt("onHide",function(){return e.eBV(l),e.Njj(s.onCloseSideBar())}),e.DNE(2,G,2,0,"ng-template",2),e.j41(3,"form",3)(4,"div",4)(5,"div",5)(6,"label"),e.EFF(7,"Nome do Perfil de Acesso"),e.k0s()(),e.nrm(8,"input",6),e.k0s(),e.j41(9,"div",7)(10,"div",8)(11,"h5"),e.EFF(12,"\xc1reas"),e.k0s()(),e.j41(13,"div",8)(14,"h5"),e.EFF(15,"Leitura"),e.k0s()(),e.j41(16,"div",8)(17,"h5"),e.EFF(18,"Edi\xe7\xe3o"),e.k0s()()(),e.j41(19,"div",9)(20,"div",10),e.nrm(21,"span",11),e.DNE(22,N,2,1,"span",12),e.k0s(),e.j41(23,"div",13)(24,"div",14)(25,"div",15)(26,"p-checkbox",16),e.mxI("ngModelChange",function(C){return e.eBV(l),e.DH7(s.selectAllReading,C)||(s.selectAllReading=C),e.Njj(C)}),e.bIt("onChange",function(C){return e.eBV(l),e.Njj(s.toggleSelectAllReading(C))}),e.k0s(),e.DNE(27,L,2,4,"div",17),e.k0s(),e.j41(28,"div",15)(29,"p-checkbox",16),e.mxI("ngModelChange",function(C){return e.eBV(l),e.DH7(s.selectAllEdit,C)||(s.selectAllEdit=C),e.Njj(C)}),e.bIt("onChange",function(C){return e.eBV(l),e.Njj(s.toggleSelectAllEdit(C))}),e.k0s(),e.DNE(30,W,2,4,"div",17),e.k0s()()()()(),e.DNE(31,$,5,1,"ng-template",18),e.k0s(),e.nrm(32,"p-confirmDialog",19)}2&i&&(e.R50("visible",s.isVisible),e.R7$(3),e.Y8G("formGroup",s.form),e.R7$(19),e.Y8G("ngForOf",s.areas),e.R7$(4),e.R50("ngModel",s.selectAllReading),e.Y8G("ngModelOptions",e.lJ4(12,B))("binary",!0),e.R7$(),e.Y8G("ngForOf",s.areas),e.R7$(2),e.R50("ngModel",s.selectAllEdit),e.Y8G("ngModelOptions",e.lJ4(13,B))("binary",!0),e.R7$(),e.Y8G("ngForOf",s.areas),e.R7$(2),e.Y8G("closable",!1))},dependencies:[o.Sq,o.bT,O.qT,O.me,O.BC,O.cb,O.vS,O.j4,O.JD,V.B,R.Ei,h.$n,F.Sc,c.T],styles:["p-toast .p-toast-message .p-toast-message-content .p-toast-message-text{justify-content:center}.profile-name-region[_ngcontent-%COMP%]{width:100%;padding:10px 0}.textarea-profile[_ngcontent-%COMP%]{width:100%;padding:5px;font-size:14px}.invalid-field[_ngcontent-%COMP%]{border:1px solid red}.error-message[_ngcontent-%COMP%]{color:red;font-size:12px;margin-top:4px}.form-row-header[_ngcontent-%COMP%]{display:flex;justify-content:space-around;align-items:center;padding-bottom:10px;padding-right:20px}.form-row-header[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%]{margin:0;color:#000}.form-row-header[_ngcontent-%COMP%]   .header-item[_ngcontent-%COMP%]:nth-child(2){display:flex;flex:1;padding-left:260.2px}  .form-row{display:flex;gap:24px;align-items:center;justify-content:space-between;padding-bottom:10px;padding-right:20px}.form-group-left[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%]{padding-bottom:25px}.form-group-left[_ngcontent-%COMP%]{flex:2;
1min-width:200px;gap:5px;display:flex;flex-direction:column}.form-group-right[_ngcontent-%COMP%]{flex:2;width:100%;display:flex;flex-direction:column;justify-content:flex-end}  .checkbox-profile-group{display:flex;align-items:center;gap:160px;justify-content:flex-end;padding-right:16px;padding-bottom:40px}  .checkbox-profile-item{display:flex;flex-direction:column;align-items:center;gap:28px}.checkbox-item[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{font-size:14px;color:#374151;margin:0}.options[_ngcontent-%COMP%]{padding-bottom:24px;color:#000}  .p-toast-message-content{align-items:center!important}  .p-toast .p-toast-message .p-toast-message-content .p-toast-message-icon{font-size:medium}  .p-confirm-dialog .p-dialog-content{justify-content:center}.form-control[_ngcontent-%COMP%]{width:100%;padding:12px 16px;font-size:14px}.button-region[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%;height:10px}.button[_ngcontent-%COMP%]{width:auto;height:25px;padding:5px}  p-sidebar .p-sidebar-footer{position:absolute;bottom:0;width:100%;height:80px;padding:2rem;background-color:#fff}  p-sidebar .p-sidebar-width-large{padding:1rem}  .p-button{justify-content:right}  .p-button.btn-sotreq-primary, .p-button.btn-sotreq-primary[_ngcontent-%COMP%]:hover{gap:10px}  p-sidebar .p-sidebar .p-sidebar-header{justify-content:space-between}  .p-confirm-dialog .p-dialog-content .p-confirm-dialog-message{justify-content:center;padding-bottom:15px}"]})}return r})();var z=n(7493);function Y(r,D){if(1&r){const t=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"div",3)(3,"h1",4),e.EFF(4,"Gerenciamento de Perfis de Acesso"),e.k0s()(),e.j41(5,"div",5)(6,"div",6)(7,"cpn-data-search",7),e.bIt("search",function(s){e.eBV(t);const l=e.XpG();return e.Njj(l.onDataSearch(s))}),e.k0s()(),e.j41(8,"div",8)(9,"button",9),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.onClickBtnAdd())}),e.EFF(10," Adicionar\xa0 "),e.j41(11,"img",10),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.onClickBtnAdd())}),e.k0s()()()()()()}}let H=(()=>{class r{topbarConfig;onSearch=new e.bkB;onClickAdd=new e.bkB;ngOnInit(){this.topbarConfig||console.error("\xc9 necess\xe1rio um objeto de configura\xe7\xe3o para utiliza\xe7\xe3o do Componente Topbar.")}onDataSearch(t){this.onSearch.emit(t)}onClickBtnAdd(){this.onClickAdd.emit()}static \u0275fac=function(i){return new(i||r)};static \u0275cmp=e.VBU({type:r,selectors:[["cpn-profile-topbar"]],inputs:{topbarConfig:"topbarConfig"},outputs:{onSearch:"onSearch",onClickAdd:"onClickAdd"},decls:1,vars:1,consts:[["class","topbar",4,"ngIf"],[1,"topbar"],[1,"topbar-container"],[1,"topbar-title"],[1,"main-title"],[1,"topbar-items"],[1,"topbar-item"],["placeholder","Localizar",3,"search"],[1,"topbar-item","btn-filters"],["pButton","","title","Abrir Filtros da Tabela",1,"btn-sotreq-primary",3,"click"],["src","assets\\images\\groups\\icon-add.svg","alt","\xedcone de adicionar",1,"icon-button",3,"click"]],template:function(i,s){1&i&&e.DNE(0,Y,12,0,"div",0),2&i&&e.Y8G("ngIf",null!=s.topbarConfig)},dependencies:[o.bT,z.C,h._f],styles:[".topbar[_ngcontent-%COMP%]{height:46px;border-bottom:1px solid #DFDFE0}@media (max-width: 800px){.topbar[_ngcontent-%COMP%]{border-top:1px solid #DFDFE0}}.topbar[_ngcontent-%COMP%]   .topbar-container[_ngcontent-%COMP%]{display:flex}.topbar[_ngcontent-%COMP%]   .topbar-container[_ngcontent-%COMP%]   .topbar-title[_ngcontent-%COMP%]{padding-top:10px;padding-left:8px}.topbar[_ngcontent-%COMP%]   .topbar-container[_ngcontent-%COMP%]   .topbar-title[_ngcontent-%COMP%]   .main-title[_ngcontent-%COMP%]{line-height:24px}.topbar[_ngcontent-%COMP%]   .topbar-container[_ngcontent-%COMP%]   .topbar-items[_ngcontent-%COMP%]{padding:8px 0;flex:1;display:flex;justify-content:flex-end}.topbar[_ngcontent-%COMP%]   .topbar-container[_ngcontent-%COMP%]   .topbar-items[_ngcontent-%COMP%]   .topbar-item[_ngcontent-%COMP%]{z-index:200;margin-right:18px}.topbar[_ngcontent-%COMP%]   .topbar-container[_ngcontent-%COMP%]   .topbar-items[_ngcontent-%COMP%]   .topbar-item[_ngcontent-%COMP%]:last-child{margin-right:30px}
1.topbar[_ngcontent-%COMP%]   .topbar-container[_ngcontent-%COMP%]   .topbar-items[_ngcontent-%COMP%]   .topbar-space[_ngcontent-%COMP%]{width:240px;height:100%;z-index:1}.topbar[_ngcontent-%COMP%]   .topbar-container[_ngcontent-%COMP%]   .topbar-items[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{height:28px}.topbar[_ngcontent-%COMP%]   .topbar-container[_ngcontent-%COMP%]   .topbar-items[_ngcontent-%COMP%]   .btn-config-table[_ngcontent-%COMP%]{padding-top:5px}cpn-data-search[_ngcontent-%COMP%]{display:block;width:240px;margin-right:28px}.topbar[_ngcontent-%COMP%]{height:auto}  .topbar-items .p-inputtext{padding-left:2rem}  .p-paginator{display:flex;border:none;background:#fefefe;padding:8px 5px}  p-dropdown .p-dropdown-panel .p-dropdown-items .p-dropdown-item{color:gray;padding:.5rem}  .pi{line-height:0}"]})}return r})();var J=n(2283);const Q=["DetailsSidebar"],Z=["profilesTable"],w=["profilesName"],q=["details"];function ee(r,D){if(1&r&&(e.j41(0,"div",11),e.nrm(1,"span",12),e.nI1(2,"highlight"),e.k0s()),2&r){let t;const i=D.$implicit,s=e.XpG();e.R7$(),e.Y8G("innerHTML",e.i5U(2,1,null!==(t=i.name)&&void 0!==t?t:"-",s.filter.term),e.npT)}}function te(r,D){if(1&r){const t=e.RV6();e.j41(0,"div",13)(1,"a",14),e.bIt("click",function(){const s=e.eBV(t).$implicit,l=e.XpG();return e.Njj(l.openDetails(s))}),e.nrm(2,"img",15),e.k0s()()}}const ie=[{path:"",component:(()=>{class r{userService;profileService;toaster;router;FEATURE=T.l.Profiles;topbarConfig;user;isObserverMode=!1;detailsSidebar;profilesColumns=[];profilesValues;filter;term;columnDefaultSortField="name";columnDefaultSortOrder="asc";constructor(t,i,s,l){this.userService=t,this.profileService=i,this.toaster=s,this.router=l}ngOnInit(){this.initTopbar()}ngAfterViewInit(){this.userService.getUserInfo().subscribe({next:t=>{this.user=t,this.user?(this.initProfilesTable(),this.setIsObserverMode(t),this.detailsSidebar.actionCompleted.subscribe(()=>{this.initProfilesTable()})):this.toaster.error("N\xe3o foi poss\xedvel carregar as informa\xe7\xf5es do usu\xe1rio.")}})}initTopbar(){this.topbarConfig={feature:this.FEATURE,parameters:{formAppliedFiltersCount:0,filters:[]}}}onTableSearch(t){this.filter.term=t,this.executeFilter()}onPageChange(t){this.filter&&("page"===t.type?(this.filter.page=t.value.first/(this.profilesValues?.pageSize??0)+1,this.filter.pageSize=t.value.rows):"sort"===t.type&&(this.filter.columnOrderBy=t.value.field,t.value.field&&(this.filter.orderByDir=1===t.value.order?"ASC":"DESC")),this.loadProfiles())}openDetails(t){this.detailsSidebar.setProfile(t?.name??"-"),this.detailsSidebar.setProfileId(t.id),this.detailsSidebar.loadProfile(t),this.detailsSidebar.open()}openAdd(){this.detailsSidebar.open(!0),this.detailsSidebar.setCustomerUserId(this.user.companyId)}profilesTable;profilesNameTemplate;detailsTemplate;initProfilesTable(){this.initFilter(),this.executeFilter(),this.initColumns()}initFilter(){this.filter={term:this.term,paginated:!0,pageSize:20,page:1,columnOrderBy:"name",orderByDir:"ASC",nullsLast:!0,idEmpresa:this.user.companyId}}executeFilter(){this.returnToFirstPage(),this.loadProfiles()}returnToFirstPage(){this.filter.page=1,this.profilesTable.setPage(1)}initColumns(){const t=[new _.V({field:"name",header:"Nome do Perfil de Acesso",hasTemplate:!0,template:this.profilesNameTemplate,headerAlign:"left",isSortable:!0,widthPercent:"20"}),new _.V({field:"details",header:"Detalhes",hasTemplate:!0,template:this.detailsTemplate,headerAlign:"center",widthPercent:"1.5"})];setTimeout(()=>{this.profilesColumns=t},0)}loadProfiles(){this.profileService.getProfilesByFilter(this.filter).subscribe({next:t=>{setTimeout(()=>{this.profilesValues=t},0)},error:t=>{setTimeout(()=>{this.profilesValues=void 0},0),this.displayErrorMessage(t,"Erro ao carregar perfis de acesso")}})}displayErrorMessage(t,i){console.error(t),this.toaster.error(i)}setIsObserverMode(t){this.isObserverMode=t.isObserverMode}static \u0275fac=function(i){return new(i||r)(e.rXU(I.D),e.rXU(y.p),e.rXU(S.W9),e.rXU(M.Ix))};static \u0275cmp=e.VBU({type:r,selectors:[["cpn-profile"]],viewQuery:function(i,s){if(1&i&&(e.GBs(Q,5),e.GBs(Z,5),e.GBs(w,5),e.GBs(q,5)),2&i){let l;e.mGM(l=e.lsd())&&(s.detailsSidebar=l.first),e.mGM(l=e.lsd())&&(s.profilesTable=l.first),e.mGM(l=e.lsd())&&(s.profilesNameTemplate=l.first),e.mGM(l=e.lsd())&&(s.detailsTemplate=l.first)}},decls:13,vars:8,consts:[["DetailsSidebar",""],["profilesTable",""],["profilesName",""],["details",""],[1,"main-container"],[1,"section"],[3,"onSearch","onClickAdd","topbarConfig"],[3,"isObserverMode"],["m-12","",2,"width","100%"],[1,"table"],[3,"onPageChange","columns","data","pageSize","totalCount","defaultSortField","defaultSortOrder"],[1,"text-left"],[3,"innerHTML"],[1,"text-center"],[3,"click"],["src","assets\\images\\general\\icon-detail
1s.svg","title","Detalhes","alt","\xcdcone de Detalhes",1,"icon-button"]],template:function(i,s){if(1&i){const l=e.RV6();e.j41(0,"div",4)(1,"div",5)(2,"cpn-profile-topbar",6),e.bIt("onSearch",function(C){return e.eBV(l),e.Njj(s.onTableSearch(C))})("onClickAdd",function(){return e.eBV(l),e.Njj(s.openAdd())}),e.k0s()(),e.nrm(3,"cpn-profile-details-sidebar",7,0),e.j41(5,"div",8)(6,"div",9)(7,"cpn-main-table",10,1),e.bIt("onPageChange",function(C){return e.eBV(l),e.Njj(s.onPageChange(C))}),e.k0s()()()(),e.DNE(9,ee,3,4,"ng-template",null,2,e.C5r)(11,te,3,0,"ng-template",null,3,e.C5r)}2&i&&(e.R7$(2),e.Y8G("topbarConfig",s.topbarConfig),e.R7$(),e.Y8G("isObserverMode",s.isObserverMode),e.R7$(4),e.Y8G("columns",s.profilesColumns)("data",null==s.profilesValues?null:s.profilesValues.tableData)("pageSize",null==s.profilesValues?null:s.profilesValues.pageSize)("totalCount",null==s.profilesValues?null:s.profilesValues.totalCount)("defaultSortField",s.columnDefaultSortField)("defaultSortOrder",s.columnDefaultSortOrder))},dependencies:[j.$,X,H,J.J]})}return r})(),canActivate:[x.H],data:{userRolesPermission:[v.x.Customer,v.x.CustomerEmployee],userAreaPermission:a.q.ManageProfiles}},{path:"details",loadChildren:()=>Promise.resolve().then(n.bind(n,9093)).then(r=>r.DetailsSidebarModule)}];let ne=(()=>{class r{static \u0275fac=function(i){return new(i||r)};static \u0275mod=e.$C({type:r});static \u0275inj=e.G2t({imports:[M.iI.forChild(ie),M.iI]})}return r})();const se=[h.tm,g.D,p.rO,m.u,c.F];let oe=(()=>{class r{static \u0275fac=function(i){return new(i||r)};static \u0275mod=e.$C({type:r});static \u0275inj=e.G2t({imports:[o.MD,d.$,u.E,ne,E.DetailsSidebarModule,se,b.X]})}return r})()},5940:(k,f,n)=>{n.d(f,{r:()=>p});var o=n(177),d=n(9417),u=n(6296),h=n(4438);let p=(()=>{class g{static \u0275fac=function(b){return new(b||g)};static \u0275mod=h.$C({type:g});static \u0275inj=h.G2t({imports:[o.MD,d.YN,d.X1,u.iV]})}return g})()},7493:(k,f,n)=>{n.d(f,{C:()=>a});var o=n(4438),d=n(9417),u=n(9419),h=n(8141),p=n(152),g=n(5964),c=n(3294),m=n(177),b=n(8542),E=n(2242);function M(v,x){if(1&v){const T=o.RV6();o.j41(0,"i",5),o.bIt("click",function(){o.eBV(T);const e=o.XpG();return o.Njj(e.onClearSearch())})("keydown.enter",function(){o.eBV(T);const e=o.XpG();return o.Njj(e.onClearSearch())}),o.k0s()}}let a=(()=>{class v{searchForm=new d.gE({inputValue:new d.MJ("",{nonNullable:!0})});$inputValueObservable;suggestionTip="Digite pelo menos 3 caracteres\npara realizar a busca";disabled=!1;placeholder="Busque aqui";initialValue;inputStyleClass="";search=new o.bkB;ngOnInit(){null!=this.initialValue&&this.searchForm.controls.inputValue.setValue(this.initialValue),this.initFormObservable(),this.disabled&&this.searchForm.controls.inputValue.disable()}ngOnDestroy(){this.$inputValueObservable&&this.$inputValueObservable.unsubscribe()}initFormObservable(){const T="Digite pelo menos 3 caracteres\npara realizar a busca";this.$inputValueObservable=this.searchForm.controls.inputValue.valueChanges.pipe((0,h.M)(_=>_.length<u.A.SEARCH_MIN_LENGTH?this.suggestionTip=T:""),(0,p.B)(u.A.DEBOUNCE_TIME_MS),(0,g.p)(_=>_.length>=u.A.SEARCH_MIN_LENGTH||0===_.length),(0,c.F)()).subscribe(_=>{this.suggestionTip=_.length<u.A.SEARCH_MIN_LENGTH?T:"",this.search.emit(_)})}onClearSearch(){this.searchForm.get("inputValue")?.setValue("")}static \u0275fac=function(_){return new(_||v)};static \u0275cmp=o.VBU({type:v,selectors:[["cpn-data-search"]],inputs:{disabled:"disabled",placeholder:"placeholder",initialValue:"initialValue",inputStyleClass:"inputStyleClass"},outputs:{search:"search"},decls:5,vars:9,consts:[[3,"formGroup"],[1,"p-input-icon-left"],[1,"pi","pi-search"],["pInputText","","type","text","tooltipPosition","bottom","formControlName","inputValue",3,"pTooltip","tooltipEvent","placeholder"],["class","pi pi-times cursor-pointer",3,"click","keydown.enter",4,"ngIf"],[1,"pi","pi-times","cursor-pointer",3,"click","keydown.enter"]],template:function(_,e){1&_&&(o.j41(0,"form",0)(1,"span",1),o.nrm(2,"i",2)(3,"input",3),o.DNE(4,M,1,0,"i",4),o.k0s()()),2&_&&(o.Y8G("formGroup",e.searchForm),o.R7$(),o.AVh("p-input-icon-right",e.searchForm.controls.inputValue.value.length>0),o.R7$(2),o.HbH(e.inputStyleClass),o.Y8G("pTooltip",e.suggestionTip)("tooltipEvent","focus")("placeholder",e.placeholder),o.R7$(),o.Y8G("ngIf",e.searchForm.controls.inputValue.value.length>0))},dependencies:[m.bT,d.qT,d.me,d.BC,d.cb,d.j4,d.JD,b.m,E.S],styles:["input[_ngcontent-%COMP%]{height:32px}input[_ngcontent-%COMP%]:read-only{background-color:#f1f1f1;cursor:not-allowed}"]})}return v})()},6072:(k,f,n)=>{n.d(f,{$:()=>g});var o=n(177),d=n(9417),u=n(2242),h=n(8542),p=n(4438);let g=(()=>{class c{static \u0275fac=function(E){return new(E||c)};static \u0275mod=p.$C({type:c});static \u0275inj=p.G2t({imports:[o.MD,d.YN,d.X1,h.S,u.u]})}return c})()},2528:(k,f,n)=>{n.d(f,{X:()=>u});var o=n(177),d=n(4438);let u=(()=>{class h{static \u0275fac=function(c){return new(c||h)};static \u0275mod=d.$C({type:h});static \u0275inj=d.G2t({imports:[o.MD]})}return h})()},1521:(k,f,n)=>{n.d(f,{S:()=>h});var o=n(4438),d=n(1141),u=n(491);let h=(()=>{class p{filter;buttonClick=new o.bkB;emitButtonClick(){this.buttonClick.emit(this.filter)}static \u0275fac=function(m){return new(m||p)};static \u0275cmp=o.VBU({type:p,selectors:[["cpn-applied-filters"]],inputs:{filter:"filter"},outputs:{buttonClick:"buttonClick"},standalone:!0,features:[o.aNF],decls:4,vars:4,consts:[[1,"filter-card"],[1,"close-btn",3,"click","disabled"],[1,"close-filter-icon","pi","pi-times"]],template:function(m,b){if(1&m&&(o.j41(0,"p-card",0),o.EFF(1),o.j41(2,"button",1),o.bIt("click",function(){return b.emitButtonClick()}),o.nrm(3,"i",2),o.k0s()()),2&m){let E,M;o.R7$(),o.SpI("",b.filter.value," "),o.R7$(),o.AVh("disabled",null!==(E=b.filter.disabled)&&void 0!==E&&E),o.Y8G("disabled",null!==(M=b.filter.disabled)&&void 0!==M&&M)}},dependencies:[u.D,u.Z,d.tm],styles:["[_nghost-%COMP%]     .p-card .p-card-body{padding:0}[_nghost-%COMP%]     .p-card{font-size:10px;border-radius:5px;border:1px solid #5C6970}[_nghost-%COMP%]     .p-card .p-card-content{padding:.2rem;font-size:12px;display:flex;align-items:center;color:#5c6970}.close-btn[_ngcontent-%COMP%]{border:none;background:transparent;cursor:pointer;margin-left:.3rem}.close-filter-icon[_ngcontent-%COMP%]{display:flex;font-size:10px;color:#5c6970}.disabled[_ngcontent-%COMP%]{cursor:not-allowed}"]})}return p})()},6660:(k,f,n)=>{n.d(f,{E:()=>h});var o=n(177),d=n(2358),u=n(4438);let h=(()=>{class p{static \u0275fac=function(m){return new(m||p)};static \u0275mod=u.$C({type:p});static \u0275inj=u.G2t({imports:[o.MD,d.bG]})}return p})()},3294:(k,f,n)=>{n.d(f,{F:()=>h});var o=n(3669),d=n(9974),u=n(4360);function h(g,c=o.D){return g=g??p,(0,d.N)((m,b)=>{let E,M=!0;m.subscribe((0,u._)(b,a=>{const v=c(a);(M||!g(E,v))&&(M=!1,E=v,b.next(a))}
1))})}function p(g,c){return g===c}}}]);

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.