PageSourceSearch

https://sistema.cashlocal.com.br/4567.4944454cb666ffbb3371.js

js cashlocal.com.br collected 2026-10-02 00:46:22 UTC 5,638 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkbr_com_cashlocal=self.webpackChunkbr_com_cashlocal||[]).push([[4567],{14567:(z,g,i)=>{i.r(g),i.d(g,{UnitsModule:()=>N});var p=i(12057),a=i(24751),u=i(84525),U=i(55501),f=i(93065),C=i(16658);class b extends C.g{}var d=i(70020),S=i(68939),v=i(22188),t=i(60793),y=i(96341),T=i(79866),m=i(27745),Z=i(13928),h=i(4207);function A(e,o){1&e&&(t.TgZ(0,"small"),t._uU(1,"Este Campo \xe9 Obrigat\xf3rio"),t.qZA())}function M(e,o){if(1&e&&(t.TgZ(0,"div",12),t.YNc(1,A,2,0,"small",13),t.qZA()),2&e){t.oxw();const n=t.MAs(10);t.xp6(1),t.Q6J("ngIf",n.errors.required)}}let x=(()=>{class e{constructor(n,s,r,c,O,Q,q){this.router=n,this.route=s,this.cashlocalMessageService=r,this.customerService=c,this.unitService=O,this.selectedCompanyService=Q,this.spinnerService=q,this.isInsert=!1,this.unit=new b,this.customer=new U.Y,this.submitted=!1}ngOnInit(){const n=this.selectedCompanyService.getSelectedCompany();this.customerService.getById(n).subscribe(s=>{this.isInsert&&(this.unit.customer=s)}),this.route.params.subscribe(s=>{this.isInsert="new"==s.id,this.isInsert||this.unitService.getById(s.id).subscribe(r=>{this.unit=r})})}onSubmit(){this.submitted=!0,this.spinnerService.show(),this.form.invalid?this.spinnerService.hide():this.unitService.post(this.unit).pipe((0,S.x)(()=>this.spinnerService.hide())).subscribe(n=>{this.cashlocalMessageService.addSuccessToast(n.message),this.router.navigate(["/units"])})}}return e.\u0275fac=function(n){return new(n||e)(t.Y36(u.F0),t.Y36(u.gz),t.Y36(y.T),t.Y36(f.J),t.Y36(d._),t.Y36(v.w),t.Y36(T.t2))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-unit"]],viewQuery:function(n,s){if(1&n&&t.Gf(a.F,5),2&n){let r;t.iGM(r=t.CRH())&&(s.form=r.first)}},decls:14,vars:3,consts:[[3,"header"],[3,"ngSubmit"],[1,"p-grid","p-fluid"],[1,"p-col-12"],[1,"form-group"],["for","description"],[1,"star"],["autocomplete","new-password","id","description","name","description","pInputText","","placeholder","Descri\xe7\xe3o","required","","type","text",1,"p-text-uppercase",3,"ngModel","ngModelChange"],["description","ngModel"],["class","p-invalid",4,"ngIf"],[1,"p-text-center"],["icon","far fa-save","label","Salvar","pButton","","type","submit",1,"p-button-rounded","float"],[1,"p-invalid"],[4,"ngIf"]],template:function(n,s){if(1&n&&(t.TgZ(0,"p-card",0),t.TgZ(1,"form",1),t.NdJ("ngSubmit",function(){return s.onSubmit()}),t.TgZ(2,"div",2),t.TgZ(3,"div",3),t.TgZ(4,"div",4),t.TgZ(5,"label",5),t._uU(6," Descri\xe7\xe3o "),t.TgZ(7,"span",6),t._uU(8,"*"),t.qZA(),t.qZA(),t.TgZ(9,"input",7,8),t.NdJ("ngModelChange",function(c){return s.unit.description=c}),t.qZA(),t.YNc(11,M,2,1,"div",9),t.qZA(),t.qZA(),t.qZA(),t.TgZ(12,"div",10),t._UZ(13,"button",11),t.qZA(),t.qZA(),t.qZA()),2&n){const r=t.MAs(10);t.Q6J("header",s.isInsert?"Nova Unidade":"Editando Unidade"),t.xp6(9),t.Q6J("ngModel",s.unit.description),t.xp6(2),t.Q6J("ngIf",s.submitted&&r.errors)}},directives:[m.Z,a._Y,a.JL,a.F,a.Fj,Z.o,a.Q7,a.JJ,a.On,p.O5,h.Hq],encapsulation:2}),e})();var l=i(22691),I=i(33013);function Y(e,o){1&e&&(t.TgZ(0,"tr"),t.TgZ(1,"th",5),t._uU(2," Descri\xe7\xe3o "),t._UZ(3,"p-sortIcon",6),t.qZA(),t.TgZ(4,"th",7),t._uU(5,"A\xe7\xf5es"),t.qZA(),t.qZA())}function J(e,o){if(1&e&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.ALo(3,"uppercase"),t.qZA(),t.TgZ(4,"td",7),t._UZ(5,"button",8),t.qZA(),t.qZA()),2&e){const n=o.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,2,n.description)),t.xp6(3),t.MGl("routerLink","/units/",n._id,"")}}function L(e,o){1&e&&t._UZ(0,"button",9)}const B=function(){return[10,25,50,100]},E=[{path:"",component:(()=>{class e{constructor(n,s,r){this.unitService=n,this.customerService=s,this.selectedCompanyService=r,this.items=[],this.companySubscription=this.selectedCompanyService.onChangeSelectedCompany().subscribe(c=>{c&&(!this.customer||c._id!=this.customer._id)&&(this.customer=c,this.search())})}ngOnInit(){this.selectedCompanyService.getSelectedCompany()||this.search()}ngOnDestroy(){this.companySubscription&&this.companySubscription.unsubscribe()}search(){this.unitService.getAllByCustomer(this.customer).subscribe(n=>{this.items=n})}}return e.\u0275fac=function(n){return new(n||e)(t.Y36(d._),t.Y36(f.J),t.Y36(v.w))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-units"]],decls:5,vars:6,consts:[["header","Unidades"],[3,"paginator","rowsPerPageOptions","rows","value"],["pTemplate","header"],["pTemplate","body"],["class","p-button-rounded float","icon","fa fa-plus","label","Novo","pButton","","routerLink","/units/new","type","button",4,"ngIf"],["pSortableColumn","de
1scription"],["field","description"],[1,"p-text-center"],["icon","fas fa-pencil-alt","pButton","","type","button",1,"p-button-rounded","p-button-text",3,"routerLink"],["icon","fa fa-plus","label","Novo","pButton","","routerLink","/units/new","type","button",1,"p-button-rounded","float"]],template:function(n,s){1&n&&(t.TgZ(0,"p-card",0),t.TgZ(1,"p-table",1),t.YNc(2,Y,6,0,"ng-template",2),t.YNc(3,J,6,4,"ng-template",3),t.qZA(),t.qZA(),t.YNc(4,L,1,0,"button",4)),2&n&&(t.xp6(1),t.Q6J("paginator",!0)("rowsPerPageOptions",t.DdM(5,B))("rows",10)("value",s.items),t.xp6(3),t.Q6J("ngIf",s.customer))},directives:[m.Z,l.iA,I.jx,p.O5,l.lQ,l.fz,h.Hq,u.rH],pipes:[p.gd],encapsulation:2}),e})(),data:{title:"Unidades"}},{path:":id",component:x,data:{title:"Unidade",disableCompanyChange:!0}}];let F=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[[u.Bz.forChild(E)],u.Bz]}),e})(),N=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({providers:[d._],imports:[[p.ez,a.u5,a.UX,F,h.hJ,m.d,l.U$,Z.j]]}),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.