PageSourceSearch

https://www.cerusbank.net/ficha-clientes-360.module-LHAVYWIF.js

js cerusbank.net collected 2026-09-24 11:07:15 UTC 13,848 bytes, 1 lines download raw bytes

1import{a as K}from"./chunk-WVBX2HI2.js";import"./chunk-PDM4MBNM.js";import{$ as It,Vb as At}from"./chunk-D2DXWN37.js";import"./chunk-WS225X7H.js";import"./chunk-P4AWLXSQ.js";import"./chunk-FLWLAOWP.js";import"./chunk-QLBE3UGC.js";import"./chunk-3B4MX5E2.js";import"./chunk-ZTSILIWW.js";import{a as Dt}from"./chunk-E4RNTLEE.js";import{b as X}from"./chunk-UTIROFZB.js";import{V as Rt,g as zt,ga as Mt}from"./chunk-STQRMAKW.js";import{$ as ut,B as rt,C as lt,D as st,E as ct,Oa as _t,W as mt,Ya as Ct,Z as dt,Za as xt,_ as pt,aa as ht,ab as St,cb as yt,g as tt,ga as ft,h as et,jb as bt,m as it,mb as vt,ob as Et,p as nt,s as ot,sb as wt,tb as Tt,vb as Ft,wb as Nt,xa as gt,z as at}from"./chunk-E6SPOSAE.js";import{$a as M,Ab as r,Ba as C,Bb as h,Cb as u,Cc as B,Fc as G,Ga as R,Gf as $,Ha as x,Hc as U,Hf as q,J as v,Jc as j,Jf as Y,Kf as Z,Ma as S,Mf as J,Pa as c,Pb as L,Pc as W,Qb as V,Vb as b,X as _,Xb as F,Ya as f,Zb as k,ab as D,ba as E,bb as i,ca as w,cb as n,db as d,hb as T,kb as y,la as N,le as H,mb as p,ne as z,tb as I,ub as A,vb as P,xa as s,xf as Q,zb as O}from"./chunk-CECBUGKR.js";import"./chunk-O7S4L63H.js";var Vt=["fichaTable"],kt=()=>({y:"65vh",x:"1600px"}),Bt=o=>[o],Gt=(o,m)=>m.condominio_uuid;function Ut(o,m){if(o&1){let t=T();i(0,"button",20),y("click",function(){E(t);let a=p();return w(a.exportFichaPdf())}),d(1,"span",21),r(2," Exportar PDF "),n()}if(o&2){let t=p();c("nzLoading",t.exportingPdf)("disabled",t.loading||t.allRows.length===0)}}function jt(o,m){if(o&1){let t=T();i(0,"button",22),y("click",function(){E(t);let a=p();return w(a.load())}),d(1,"span",23),r(2," Atualizar "),n()}if(o&2){let t=p();c("nzLoading",t.loading)}}function Wt(o,m){if(o&1&&d(0,"nz-alert",17),o&2){let t=p();c("nzMessage",t.error)}}function Ht(o,m){if(o&1&&(i(0,"span",39),r(1),n()),o&2){let t=p().$implicit;c("nzTooltipTitle",t.tempo_casa_dias!=null?t.tempo_casa_dias+" dia(s)":""),s(),u(" ",t.tempo_casa_descricao," ")}}function Xt(o,m){o&1&&(i(0,"span"),r(1,"\u2014"),n())}function Qt(o,m){if(o&1&&(i(0,"tr")(1,"td"),r(2),n(),i(3,"td"),r(4),n(),i(5,"td"),r(6),n(),i(7,"td")(8,"nz-tag",38),r(9),n()(),i(10,"td"),r(11),b(12,"date"),n(),i(13,"td"),S(14,Ht,2,2,"span",39)(15,Xt,2,0,"span"),n(),i(16,"td",40),r(17),n(),i(18,"td"),r(19),n(),i(20,"td",40)(21,"nz-tag",38),r(22),n()(),i(23,"td")(24,"div",41)(25,"nz-tag",38),r(26),n(),i(27,"span"),r(28),b(29,"number"),n()()(),i(30,"td",42),r(31),b(32,"currency"),n(),i(33,"td",40)(34,"a",43),d(35,"span",44),n()()()),o&2){let t,e,a,l=m.$implicit,g=p(2);s(2),h((t=l.codigo)!==null&&t!==void 0?t:"\u2014"),s(2),h(l.nome_condominio),s(2),h((e=l.uf)!==null&&e!==void 0?e:"\u2014"),s(2),c("nzColor",l.status_cliente==="ATIVO"?"success":"default"),s(),u(" ",l.status_cliente==="ATIVO"?"Ativo":"Inativo"," "),s(2),u(" ",l.data_inicio_contrato?F(12,16,l.data_inicio_contrato,"dd/MM/yyyy"):"\u2014"," "),s(3),f(l.tempo_casa_descricao?14:15),s(3),h(l.total_unidades),s(2),h((a=l.sindico_atual)!==null&&a!==void 0?a:"\u2014"),s(2),c("nzColor",g.colorStatusMandato(l.status_mandato)),s(),u(" ",g.labelStatusMandato(l.status_mandato)," "),s(3),c("nzColor",g.colorStatusDocumentacao(l.status_documentacao)),s(),u(" ",g.labelStatusDocumentacao(l.status_documentacao)," "),s(2),u(" ",l.percentual_documentacao_completa!=null?F(29,19,l.percentual_documentacao_completa,"1.0-2")+"%":"\u2014"," "),s(3),u(" ",l.vgv_condominio!=null?k(32,22,l.vgv_condominio,"BRL","symbol","1.2-2"):"\u2014"," "),s(3),c("routerLink",V(27,Bt,"/app/condominios/resumo/"+l.condominio_uuid))}}function $t(o,m){if(o&1&&(i(0,"div",18)(1,"nz-table",24,0)(3,"thead")(4,"tr")(5,"th",25),r(6,"C\xF3digo"),n(),i(7,"th",26),r(8,"Condom\xEDnio"),n(),i(9,"th",27),r(10,"UF"),n(),i(11,"th",28),r(12,"Status cliente"),n(),i(13,"th",29),r(14,"In\xEDcio contrato"),n(),i(15,"th",30),r(16,"Tempo de casa"),n(),i(17,"th",31),r(18,"Unidades"),n(),i(19,"th",32),r(20,"S\xEDndico atual"),n(),i(21,"th",33),r(22,"Status mandato"),n(),i(23,"th",30),r(24,"Documenta\xE7\xE3o obrigat\xF3ria"),n(),i(25,"th",34),r(26,"VGV condom\xEDnio"),n(),i(27,"th",35),r(28,"A\xE7\xF5es"),n()()(),i(29,"tbody"),M(30,Qt,36,29,"tr",null,Gt),n()(),i(32,"div",36)(33,"span"),r(34," Total de registros: "),i(35,"span",37),r(36),n()()()()),o&2){let t=O(2),e=p();s(),c("nzData",e.displayedRowsOnScroll)("nzLoading",e.loading)("nzFrontPagination",!1)("nzShowPagination",!1)("nzScroll",L(6,kt)),s(29),D(t.data),s(6),h(e.total)}}function qt(o,m){o&1&&d(0,"nz-empty",19)}var Ot=(()=>{class o{constructor(t,e,a){this.api=t,this.message=e,this.fb=a,this.tableBodyEl=null,this.scrollListener=l=>this.onTableScroll(l),this.loading=!1,this.error=null,this.allRows=[],this.displayedRowsOnScroll=[],this.scrollSize=30,this.scrollIndex=1,this.total=0,this.scrollThreshold=120,this.exportingPdf=!1,this.filterForm=this.fb.group({condominio_uuids:[[]],data_inicio_inicial:[null],data_inicio_final:[null]})}ngOnInit(){this.load()}ngAfterViewInit(){this.bindTableBodyScroll()}ngOnDestroy(){this.tableBodyEl?.removeEventListener("scroll",this.scrollListener)}bindTableBodyScroll(){let t=this.fichaTableRef?.nativeElement?.querySelector(".ant-table-body");t&&(this.tableBodyEl=t,t.addEventListener("scroll",this.scrollListener))}formatYmd(t){let e=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),l=String(t.getDate()).padStart(2,"0");return`${e}-${a}-${l}`}ficha360QueryParams(){let t=this.filterForm.getRawValue(),e=new W;return t.condominio_uuids?.length&&(e=e.set("condominio_uuids",t.condominio_uuids.join(","))),t.data_inicio_inicial&&(e=e.set("data_inicio_inicial",this.formatYmd(t.data_inicio_inicial))),t.data_inicio_final&&(e=e.set("data_inicio_final",this.formatYmd(t.data_inicio_final))),e}load(){let{data_inicio_inicial:t,data_inicio_final:e}=this.filterForm.getRawValue();if(t&&e){let a=new Date(t).getTime();if(new Date(e).getTime()<a){this.message.warning("A data final do contrato deve ser posterior ou igual \xE0 data inicial.");return}}this.loading=!0,this.error=null,this.allRows=[],this.displayedRowsOnScroll=[],this.scrollIndex=1,this.total=0,this.api.get("/customer-summary/ficha-clientes-360",this.ficha360QueryParams()).pipe(v(()=>this.loading=!1)).subscribe({next:a=>{a.success&&a.data?(this.allRows=a.data,this.total=this.allRows.length,this.scrollIndex=1,this.displayedRowsOnScroll=[],this.increaseScroll(),setTimeout(()=>this.fillUntilScrollableOrComplete(),0)):(this.allRows=[],this.displayedRowsOnScroll=[],this.total=0)},error:a=>{this.allRows=[],this.displayedRowsOnScroll=[],this.total=0;let l=a?.error?.message;
1this.error=Array.isArray(l)?l.join("; "):l??"Erro ao carregar a lista."}})}increaseScroll(){this.allRows.length&&(this.displayedRowsOnScroll.length>=this.allRows.length||(this.displayedRowsOnScroll=this.allRows.slice(0,this.scrollIndex*this.scrollSize),this.scrollIndex++))}fillUntilScrollableOrComplete(){let t=0,e=()=>{if(t++,t>400)return;this.tableBodyEl||this.bindTableBodyScroll();let a=this.tableBodyEl;if(!a){requestAnimationFrame(e);return}this.displayedRowsOnScroll.length>=this.allRows.length||a.scrollHeight<=a.clientHeight+this.scrollThreshold&&(this.increaseScroll(),requestAnimationFrame(e))};requestAnimationFrame(e)}onTableScroll(t){let e=t.target;if(!e)return;e.scrollTop+e.clientHeight>=e.scrollHeight-this.scrollThreshold&&this.increaseScroll()}labelStatusMandato(t){switch(t){case"ATIVO":return"Ativo";case"VENCIDO":return"Vencido";case"PROXIMO_VENCIMENTO":return"Pr\xF3ximo do vencimento";case"SEM_MANDATO":return"Sem mandato";default:return t}}colorStatusMandato(t){switch(t){case"ATIVO":return"success";case"VENCIDO":return"error";case"PROXIMO_VENCIMENTO":return"warning";case"SEM_MANDATO":return"default";default:return"default"}}labelStatusDocumentacao(t){return{REGULAR:"Regular",PARCIAL:"Parcial",IRREGULAR:"Irregular",SEM_DOCUMENTACAO:"Sem checklist / tipos"}[t]??t}colorStatusDocumentacao(t){return{REGULAR:"success",PARCIAL:"warning",IRREGULAR:"error",SEM_DOCUMENTACAO:"default"}[t]??"default"}exportFichaPdf(){if(this.allRows.length===0){this.message.warning("N\xE3o h\xE1 dados para exportar com os filtros atuais");return}this.exportingPdf=!0,this.api.get("/customer-summary/ficha-clientes-360/pdf",this.ficha360QueryParams(),"blob").pipe(v(()=>this.exportingPdf=!1)).subscribe({next:t=>{let e=window.URL.createObjectURL(t);window.open(e,"_blank","noopener,noreferrer")||this.message.warning("Permita abrir pop-ups para visualizar o PDF no navegador."),setTimeout(()=>window.URL.revokeObjectURL(e),6e4)},error:t=>{let e=t?.error?.message;this.message.error(Array.isArray(e)?e.join("; "):e||"N\xE3o foi poss\xEDvel abrir o PDF.")}})}static{this.\u0275fac=function(e){return new(e||o)(C(X),C(ft),C(at))}}static{this.\u0275cmp=R({type:o,selectors:[["app-ficha-clientes-360"]],viewQuery:function(e,a){if(e&1&&I(Vt,5,N),e&2){let l;A(l=P())&&(a.fichaTableRef=l.first)}},standalone:!1,decls:38,vars:18,consts:[["fichaTable",""],[1,"site-page-header-ghost-wrapper"],[3,"nzGhost"],["nz-button","","nzType","primary",3,"nzLoading","disabled","click",4,"nzSpaceItem"],["nz-button","","nzType","default",3,"nzLoading","click",4,"nzSpaceItem"],[1,"page-content"],["nz-form","","nzLayout","vertical",1,"ficha-filters",3,"ngSubmit","formGroup"],["nzGutter","16"],[3,"nzXs","nzLg"],["formControlName","condominio_uuids",3,"label","placeholder"],[3,"nzXs","nzSm","nzLg"],["nzFormat","dd/MM/yyyy","formControlName","data_inicio_inicial","nzAllowClear","","nzPlaceHolder","Data inicial",1,"ficha-date-fullwidth"],["nzFormat","dd/MM/yyyy","formControlName","data_inicio_final","nzAllowClear","","nzPlaceHolder","Data final",1,"ficha-date-fullwidth"],[1,"ficha-filter-actions",3,"nzXs","nzLg"],[1,"ficha-label-spacer"],["nz-button","","nzType","primary","type","submit",3,"nzLoading"],["nz-icon","","nzType","search"],["nzType","error","nzShowIcon","",2,"margin-bottom","16px",3,"nzMessage"],[1,"table-container"],["nzNotFoundImage","simple","nzNotFoundContent","Nenhum condom\xEDnio encontrado."],["nz-button","","nzType","primary",3,"click","nzLoading","disabled"],["nz-icon","","nzType","file-pdf","nzTheme","outline"],["nz-button","","nzType","default",3,"click","nzLoading"],["nz-icon","","nzType","reload","nzTheme","outline"],["nzSize","small",3,"nzData","nzLoading","nzFrontPagination","nzShowPagination","nzScroll"],["nzWidth","90px"],["nzWidth","220px"],["nzWidth","56px"],["nzWidth","100px"],["nzWidth","120px"],["nzWidth","200px"],["nzWidth","100px","nzAlign","right"],["nzWidth","180px"],["nzWidth","160px"],["nzWidth","140px","nzAlign","right"],["nzWidth","120px","nzAlign","center"],[1,"table-footer-total"],[1,"total"],[3,"nzColor"],["nz-tooltip","",3,"nzTooltipTitle"],["nzAlign","center"],[2,"display","flex","align-items","center","gap","8px","flex-wrap","wrap"],["nzAlign","right"],["nz-button","","nzType","link","nz-tooltip","","nzTooltipTitle","Resumo do cliente (cadastro, mandato, documentos)",1,"ficha-link-resumo",3,"routerLink"],["nz-icon","","nzType","eye","nzTheme","outline"]],template:function(e,a){e&1&&(i(0,"div",1)(1,"nz-page-header",2)(2,"nz-page-header-title"),r(3,"Ficha Clientes 360\xBA"),n(),i(4,"nz-page-header-subtitle"),r(5," Vis\xE3o tabular por condom\xEDnio: contrato, mandato, documenta\xE7\xE3o e VGV "),n(),i(6,"nz-page-header-extra")(7,"nz-space"),S(8,Ut,3,2,"button",3)(9,jt,3,1,"button",4),n()()(),i(10,"div",5)(11,"form",6),y("ngSubmit",function(){return a.load()}),i(12,"nz-row",7)(13,"nz-col",8),d(14,"app-filter-condominios",9),n(),i(15,"nz-col",10)(16,"nz-form-item")(17,"nz-form-label"),r(18,"In\xEDcio do contrato a partir de"),n(),i(19,"nz-form-control"),d(20,"nz-date-picker",11),n()()(),i(21,"nz-col",10)(22,"nz-form-item")(23,"nz-form-label"),r(24,"In\xEDcio do contrato at\xE9"),n(),i(25,"nz-form-control"),d(26,"nz-date-picker",12),n()()(),i(27,"nz-col",13)(28,"nz-form-item")(29,"nz-form-label",14),r(30,"\xA0"),n(),i(31,"nz-form-control")(32,"button",15),d(33,"span",16),r(34," Aplicar filtros "),n()()()()()(),S(35,Wt,1,1,"nz-alert",17)(36,$t,37,7,"div",18)(37,qt,1,0,"nz-empty",19),n()()),e&2&&(s(),c("nzGhost",!1),s(10),c("formGroup",a.filterForm),s(2),c("nzXs",24)("nzLg",12),s(),c("label","Condom\xEDnios")("placeholder","Todos (se nenhum selecionado)"),s(),c("nzXs",24)("nzSm",12)("nzLg",4),s(6),c("nzXs",24)("nzSm",12)("nzLg",4),s(6),c("nzXs",24)("nzLg",4),s(5),c("nzLoading",a.loading),s(3),f(a.error?35:-1),s(),f(a.allRows.length>0?36:-1),s(),f(!a.loading&&a.allRows.length===0&&!a.error?37:-1))},dependencies:[H,it,tt,et,nt,ot,zt,J,Y,Z,_t,gt,ct,st,pt,dt,ht,ut,Q,yt,Ct,xt,St,q,$,Tt,bt,vt,Nt,wt,Ft,Et,Rt,mt,It,G,U,B],styles:['.page-content[_ngcontent-%COMP%]{padding-bottom:24px}.ficha-filters[_ngcontent-%COMP%]{margin-bottom:16px}.ficha-date-fullwidth[_ngcontent-%COMP%]{width:100%}.ficha-label-spacer[_ngcontent-%COMP%]{visibility:hidden;display:block;margin-bottom:0;min-height:1em}.table-container[_ngcontent-%COMP%]{padding:0}.table-container[_ngcontent-%COMP%]:after{content:"";display:table;clear:both}[_nghost-%COMP%]     .ant-table{min-width:max-content}.ficha-doc-hint[_ngcontent-%COMP%]{font-size:12px;color:#00000073;display:block;margin-top:2px}.ficha-link-resumo[_ngcontent-%COMP%]{padding-left:0;height:auto;line-height:1.35;white-space:nowrap}.table-footer-total[_ngcontent-%COMP%]{float:right;margin-top:15px}.table-footer-total[_ngcontent-%COMP%]   .total[_ngcontent-%COMP%]{font-weight:600}']})}}return o}
1)();var Yt=[{path:"",pathMatch:"full",redirectTo:"buscar"},{path:"buscar",component:Ot,data:{role:Dt.ListarFichaClientes360},canActivate:[K]}],Lt=(()=>{class o{static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275mod=x({type:o})}static{this.\u0275inj=_({imports:[z.forChild(Yt),z]})}}return o})();var Oe=(()=>{class o{static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275mod=x({type:o})}static{this.\u0275inj=_({imports:[j,z,rt,lt,Mt,At,Lt]})}}return o})();export{Oe as FichaClientes360Module};

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.