1import{a as G}from"./chunk-UASGVFG3.js";import{a as j}from"./chunk-EOTUOSCR.js";import{a as U,b as H}from"./chunk-5E4YCGQE.js";import{a as z}from"./chunk-72U53S6D.js";import"./chunk-K3GS6H6W.js";import"./chunk-W4BNGQYG.js";import{$a as O,D as k,Jb as Y,Mb as $,S as q,b as y,ba as M,f as R,i as g,nb as Q,pb as B,wb as L}from"./chunk-BXNZQW2D.js";import{g as V}from"./chunk-QB5NFKQE.js";import{Ab as h,Bb as m,Mb as i,Ob as l,Qa as r,Rc as F,Ua as A,Vb as w,Wb as D,Za as I,f as K,h as u,jb as d,ka as T,oc as b,pb as v,qb as _,ra as x,rb as C,sa as E,sb as o,tb as e,ub as p,yb as P}from"./chunk-SPB3D6FE.js";var N=K(Q());var f=class{constructor(){this.path="api/Procon/Portais/Consumidores/Recalls/Application/Recalls/ListarResumosPorSegmentoTipoDeProduto/ListarResumosPorSegmentoTipoDeProdutoEndpoint",this.method="GET"}};var W=()=>["../"],J=s=>({expanded:s});function X(s,S){if(s&1){let t=P();o(0,"tr",13),h("click",function(){let n=x(t).$implicit,c=m(2);return E(c.alternar(n))}),o(1,"td")(2,"span",11),i(3,"Tipo de produto:\xA0"),e(),i(4),e(),o(5,"td",10)(6,"span",11),i(7,"Campanhas com este tipo de produto:\xA0"),e(),i(8),e(),o(9,"td",10)(10,"span",11),i(11,"Afetados por este tipo de produto:\xA0"),e(),i(12),e(),o(13,"td",10)(14,"span",11),i(15,"Atendidos por este tipo de produto:\xA0"),e(),i(16),e()(),o(17,"tr",14)(18,"td",17),p(19,"itens-de-recall",18),e()()}if(s&2){let t=S.$implicit,a=m(2);d("ngClass",D(7,J,a.expandeds.has(t))),r(4),l(" ",t.nomeDoTipoDeProduto," "),r(4),l(" ",t.totalDeCampanhas," "),r(4),l(" ",t.totalDeAfetados,""),r(4),l(" ",t.percentualDeAtendimentos,"%"),r(3),d("isOpen",a.expandeds.has(t))("recalls",t.recalls)}}function Z(s,S){if(s&1){let t=P();o(0,"tr",13),h("click",function(){let n=x(t).$implicit,c=m();return E(c.alternar(n))}),o(1,"td")(2,"span",11),i(3,"Segmento:"),e(),i(4),e(),o(5,"td",10)(6,"span",11),i(7,"Ocorr\xEAncias em campanhas:"),e(),i(8),e(),o(9,"td"),i(10),e(),o(11,"td",10)(12,"span",11),i(13,"Afetados:"),e(),i(14),e(),o(15,"td",10),p(16,"span",11),i(17),e()(),o(18,"tr",14)(19,"td",12)(20,"div",15)(21,"table",16)(22,"colgroup"),p(23,"col")(24,"col")(25,"col"),e(),o(26,"thead")(27,"tr")(28,"th"),i(29),e(),p(30,"th",10)(31,"th",10),e()(),o(32,"tbody"),_(33,X,20,9,null,null,v),e()()()()()}if(s&2){let t=S.$implicit,a=m();d("ngClass",D(8,J,a.expandeds.has(t))),r(4),l("\xA0",t.nomeDoSegmento,""),r(4),l("\xA0",t.totalDeCampanhas,""),r(2),l("(",t.percentualCampanhas,"%)"),r(4),l("\xA0",t.totalDeAfetados,""),r(3),l("\xA0(",t.percentualDeAtendimentos,"%)"),r(3),d("@openClose",a.expandeds.has(t)?"open":"closed"),r(9),l("",t.tiposDeProduto.length," tipos de produto"),r(4),C(t.tiposDeProduto)}}var Ce=(()=>{class s{constructor(t){this.helpers=t,this.expandeds=new Set,this.form=new R({dataInicial:new g("2002-01-01",y.required),dataFinal:new g((0,N.default)().format("YYYY-MM-DD"),y.required),segmentoId:new g(null)}),this.endpointService=T(V),this.pesquisarSegmentos=a=>u(this,null,function*(){return(yield this.endpointService.requestAsync(new U,{termo:a})).map(n=>({text:n.nome,value:n.id}))}),this.recuperarSegmento=a=>u(this,null,function*(){let n=yield this.endpointService.requestAsync(new H,{segmentoId:a});return n?{text:n.nome,value:n.id}:null})}pesquisar(){return u(this,null,function*(){if(!this.helpers.validar(this.form))return;let t=this.form.value;t.segmentoId=t.segmentoId??void 0,this.response=yield this.endpointService.requestAsync(new f,t).showBusy().showError()})}alternar(t){this.expandeds.has(t)?this.expandeds.delete(t):this.expandeds.add(t)}static{this.\u0275fac=function(a){return new(a||s)(A(q))}}static{this.\u0275cmp=I({type:s,selectors:[["ng-component"]],decls:49,vars:12,consts:[[1,"mat-elevation-z1","print-area"],["titulo","Campanhas de Recall por Segmento e Tipo de Produto",3,"rotaVoltar"],[3,"disabled"],[1,"p-4","sm:p-6","bg-white","flex","flex-wrap","gap-4","items-end"],[1,"grid","grid-cols-3","gap-4"],["labelText","Data inicial","min","2002-01-01",3,"control"],["labelText","Data final",3,"control"],["labelText","Segmento","placeholder","Todos os segmentos",3,"searchFunction","recoverFunction","control"],["mat-raised-button","","color","accent",1,"!ml-auto",3,"click"],["aria-label","Lista de recalls por segmento e tipo de produto",1,"report-table"],[1,"text-right"],[1,"font-medium"],["colspan","5"],[1,"expandable",3,"click","ngClass"],[1,"detail"],[1,"content"],["aria-label","parte do relat\xF3rio de recalls por segmento e tipo de produto"],["colspan","4"],[3,"isOpen","recalls"]],template:function(a,n){a&1&&(o(0,"div",0)(1,"cabecalho-voltar",1),p(2,"print-button",2),e(),o(3,"div",3)(4,"div",4),p(5,"app-date-only-field",5)(6,"app-date-only-field",6)(7,"app-select-search-field",7),e(),o(8,"button",8),h("click",function(){return n.pesquisar()}),o(9,"mat-icon"),i(10,"summarize"),e(),i(11," Gerar "),e()(),p(12,"mat-divider"),o(13,"table",9)(14,"colgroup"),p(15,"col")(16,"col")(17,"col")(18,"col")(19,"col"),e(),o(20,"thead")(21,"tr")(22,"th"),i(23),e(),p(24,"th")(25,"th")(26,"th")(27,"th"),e()(),o(28,"tbody"),_(29,Z,35,10,null,null,v),e(),o(31,"tfoot")(32,"tr"),p(33,"td"),o(34,"td",10)(35,"span",11),i(36,"Total de ocorr\xEAncias em campanhas:\xA0"),e(),i(37),e(),p(38,"td"),o(39,"td",10)(40,"span",11),i(41,"Total de afetados:\xA0"),e(),i(42),e(),p(43,"td"),e(),o(44,"tr")(45,"td",12)(46,"span",11),i(47,"Total de campanhas:\xA0"),e(),i(48),e()()()()()),a&2&&(r(),d("rotaVoltar",w(11,W)),r(),d("disabled",!n.response),r(3),d("control",n.form.controls.dataInicial),r(),d("control",n.form.controls.dataFinal),r(),d("searchFunction",n.pesquisarSegmentos)("recoverFunction",n.recuperarSegmento)("control",n.form.controls.segmentoId),r(16),l("",n.response==null||n.response.segmentos==null?null:n.response.segmentos.length," segmentos"),r(6),C(n.response==null?null:n.response.segmentos),r(8),l(" ",n.response==null?null:n.response.totalDeOcorrenciasDeSegmentos," "),r(5),l(" ",n.response==null?null:n.response.totalDeAfetados," "),r(6),l(" ",n.response==null?null:n.response.totalDeCampanhas," "))},dependencies:[$,k,M,O,Y,b,B,L,G,z,F],encapsulation:2,data:{animation:[j]}})}}return s})();export{Ce as RecallsPorSegmentoETipoDeProdutoPageComponent};
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.