1import{a as nt}from"./chunk-7QDCBHOH.js";import{a as it}from"./chunk-L5DDZRRI.js";import{a as he}from"./chunk-IDVEQ7KW.js";import"./chunk-Q23P5MNU.js";import{G as Ye,V as et,Xb as tt}from"./chunk-KAXNKA6Y.js";import"./chunk-7B5EAB4N.js";import"./chunk-P4AWLXSQ.js";import"./chunk-KRRZGW2D.js";import"./chunk-QLBE3UGC.js";import"./chunk-NKPQKUAK.js";import"./chunk-NEUHW5A3.js";import{a as Qe}from"./chunk-LEQJ4IIU.js";import{a as Xe}from"./chunk-TFLZ2IQR.js";import{e as ie,f as ne}from"./chunk-LYNHHBB7.js";import{b as k}from"./chunk-NRR7AH3C.js";import{S as Ge,U as Ze,V as qe,W as Je,b as Fe,g as Pe,ha as Ke}from"./chunk-XV5UGDTZ.js";import{$ as Ie,B as ve,Ba as we,C as Ee,D as be,E as De,Ha as Ve,Oa as Be,Ya as Re,Z as Te,Za as He,_ as Me,_a as ke,aa as Ne,b as Ce,cb as Ae,g as $,h as ge,ha as Le,ib as Ue,jb as Z,kb as Oe,l as xe,m as fe,mb as q,ob as We,p as ze,rb as $e,s as ye,sb as J,tb as K,vb as Q,wb as X,xa as j,xb as je,z as Se}from"./chunk-NQAP53SD.js";import{$a as M,Ab as D,Ba as E,Bb as n,Cb as m,Db as h,Dc as R,Ga as V,Ha as B,Ib as de,Ic as H,J as F,Jb as se,Kb as me,Kc as ce,Kf as G,Lf as U,Ma as S,Nf as O,Oa as ae,Pa as p,Qb as P,Ra as re,Wb as u,X as w,Ya as v,Yb as f,Zb as T,_ as ee,_a as le,ab as I,ac as L,ba as C,bb as t,bg as ue,ca as g,cb as i,cg as _e,db as _,dg as W,hb as b,ie as pe,kb as x,mb as s,oe as te,xa as a,yf as A}from"./chunk-DF25LJWB.js";import{a as Y}from"./chunk-O7S4L63H.js";var ot=(o,d)=>d.uuid;function St(o,d){if(o&1){let e=b();t(0,"nz-alert",6),x("nzOnClose",function(){let l=C(e).$implicit,c=s(2);return g(c.closeErrorAlert(l))}),i()}if(o&2){let e=d.$implicit;p("nzMessage",e)}}function vt(o,d){o&1&&_(0,"nz-alert",11)}function Et(o,d){o&1&&_(0,"nz-empty",13),o&2&&p("nzNotFoundContent","Nenhuma cobran\xE7a pendente nesta unidade")}function bt(o,d){if(o&1){let e=b();t(0,"button",23),x("click",function(){C(e);let l=s().$implicit,c=s(4);return g(c.toggleDetail(l.uuid))}),_(1,"span",24),i()}if(o&2){let e=s().$implicit,r=s(4);a(),p("nzType",r.isDetailExpanded(e.uuid)?"minus-circle":"plus-circle")}}function Dt(o,d){if(o&1&&(t(0,"tr")(1,"td"),n(2),i(),t(3,"td"),n(4),u(5,"date"),i(),t(6,"td"),n(7),u(8,"date"),i(),t(9,"td",17),n(10),u(11,"currency"),i(),t(12,"td",17),n(13),u(14,"currency"),i()()),o&2){let e=d.$implicit;a(2),m(e.unidade_codigo||"\u2014"),a(2),h(" ",T(5,5,e.competencia,"MM/yyyy","UTC")," "),a(3),h(" ",T(8,9,e.data_vencimento,"dd/MM/yyyy","UTC")," "),a(3),h(" ",f(11,13,e.valor,"BRL")," "),a(3),h(" ",f(14,16,e.valor_com_encargos,"BRL")," ")}}function Tt(o,d){if(o&1&&(t(0,"tr",22)(1,"td")(2,"div",25)(3,"strong",26),n(4," Cobran\xE7as de unidades vinculadas "),i(),t(5,"nz-table",27)(6,"thead")(7,"tr")(8,"th"),n(9,"Unidade"),i(),t(10,"th"),n(11,"Compet\xEAncia"),i(),t(12,"th"),n(13,"Vencimento"),i(),t(14,"th",17),n(15,"Valor principal"),i(),t(16,"th",17),n(17,"Valor c/ encargos"),i()()(),t(18,"tbody"),M(19,Dt,15,19,"tr",null,ot),i()()()()()),o&2){let e=s().$implicit,r=s(4);p("nzExpand",r.isDetailExpanded(e.uuid)),a(),ae("colspan",7),a(4),p("nzData",e.cobrancas_vinculadas)("nzFrontPagination",!1)("nzShowPagination",!1),a(14),I(e.cobrancas_vinculadas)}}function Mt(o,d){if(o&1){let e=b();t(0,"tr",18),x("click",function(){let l=C(e).$implicit,c=s(4);return g(c.selectCharge(l.uuid))}),t(1,"td",19),x("nzCheckedChange",function(l){let c=C(e).$implicit,z=s(4);return g(z.onChargeChecked(c.uuid,l))})("click",function(l){return C(e),g(l.stopPropagation())}),i(),t(2,"td",20),x("click",function(l){return C(e),g(l.stopPropagation())}),S(3,bt,2,1,"button",21),i(),t(4,"td"),n(5),u(6,"date"),i(),t(7,"td"),n(8),u(9,"date"),i(),t(10,"td"),n(11),i(),t(12,"td",17),n(13),u(14,"currency"),i(),t(15,"td",17),n(16),u(17,"currency"),i()(),S(18,Tt,21,5,"tr",22)}if(o&2){let e=d.$implicit,r=s(4);re("selected-row",r.selectedChargeUuid===e.uuid),a(),p("nzChecked",r.selectedChargeUuid===e.uuid),a(2),v(e.cobrancas_vinculadas.length?3:-1),a(2),m(T(6,10,e.competencia,"MM/yyyy","UTC")),a(3),m(T(9,14,e.data_vencimento,"dd/MM/yyyy","UTC")),a(3),m(e.nosso_numero||"\u2014"),a(2),h(" ",f(14,18,e.valor_com_encargos,"BRL")," "),a(3),h(" ",f(17,21,e.valor_com_encargos_total,"BRL")," "),a(2),v(e.cobrancas_vinculadas.length?18:-1)}}function It(o,d){if(o&1&&(t(0,"nz-table",14,0)(2,"thead")(3,"tr"),_(4,"th",15)(5,"th",16),t(6,"th"),n(7,"Compet\xEAncia"),i(),t(8,"th"),n(9,"Vencimento"),i(),t(10,"th"),n(11,"Nosso n\xBA"),i(),t(12,"th",17),n(13,"Valor unidade"),i(),t(14,"th",17),n(15,"Valor total c/ encargos"),i()()(),t(16,"tbody"),M(17,Mt,19,24,null,null,ot),i()()),o&2){let e=D(1),r=s(3);p("nzData",r.pendingData.charges)("nzFrontPagination",!1)("nzShowPagination",!1),a(17),I(e.data)}}function Nt(o,d){if(o&1){let e=b();t(0,"div",7)(1,"p")(2,"strong"),n(3,"Condom\xEDnio:"),i(),n(4),i(),t(5,"p")(6,"strong"),n(7,"Unidade:"),i(),n(8),i(),t(9,"p")(10,"strong"),n(11,"Nosso n\xBA duplicado:"),i(),n(12),i(),t(13,"p")(14,"strong"),n(15,"Valor do cr\xE9dito:"),i(),n(16),u(17,"currency"),i(),t(18,"div",8)(19,"span"),n(20,"Aplicar descontos nas cobran\xE7as"),i(),t(21,"nz-switch",9),x("ngModelChange",function(l){C(e);let c=s(2);return g(c.onApplyDiscountChange(l))}),i()(),t(22,"p",10),n(23," Selecione a cobran\xE7a pendente da unidade que receber\xE1 o cr\xE9dito. O valor do cr\xE9dito deve ser exatamente igual ao valor total da cobran\xE7a (incluindo unidades vinculadas). "),i(),S(24,vt,1,0,"nz-alert",11),i(),t(25,"h3",12),n(26,"Cobran\xE7as pendentes da unidade"),i(),S(27,Et,1,1,"nz-empty",13)(28,It,19,3,"nz-table",14)}if(o&2){let e=s(2);a(4),h(" ",e.formatCondominioLabel(e.pendingData.condominio_codigo,e.pendingData.condominio_nome)," "),a(4),h(" ",e.pen
1dingData.unidade_codigo||"\u2014"," "),a(4),h(" ",e.pendingData.duplicate_nosso_numero||"\u2014"," "),a(4),h(" ",f(17,7,e.pendingData.credit_value,"BRL")," "),a(5),p("ngModel",e.applyDiscount),a(3),v(e.hasValueMismatch?24:-1),a(3),v(e.pendingData.charges.length?28:27)}}function Ft(o,d){if(o&1){let e=b();t(0,"div"),M(1,St,1,1,"nz-alert",2,le),S(3,Nt,29,10),t(4,"div",3)(5,"button",4),x("click",function(){C(e);let l=s();return g(l.cancel())}),n(6,"Cancelar"),i(),t(7,"button",5),x("click",function(){C(e);let l=s();return g(l.continueWithCharge())}),n(8," Continuar "),i()()()}if(o&2){let e=s();a(),I(e.errorList),a(2),v(e.pendingData?3:-1),a(4),p("disabled",!e.canContinue)}}function Pt(o,d){o&1&&(t(0,"div",1),_(1,"nz-spin",28),i())}var at=(()=>{class o{constructor(e,r){this.api=e,this.modalService=r,this.nzData=ee(ue),this.modalRef=ee(_e),this.isLoading=!0,this.errorList=[],this.pendingData=null,this.selectedChargeUuid=null,this.expandSet=new Set,this.applyDiscount=!0}ngOnInit(){this.loadPendingCharges()}loadPendingCharges(){this.isLoading=!0,this.selectedChargeUuid=null,this.api.get(`/unit-credits/pending-charges/${this.nzData.instrument_uuid}`,{applyDiscount:this.applyDiscount}).pipe(F(()=>this.isLoading=!1)).subscribe({next:e=>{this.pendingData=e.data,e.data.charges.length===1&&(this.selectedChargeUuid=e.data.charges[0].uuid)},error:e=>{Array.isArray(e.error?.message)?this.errorList=e.error.message:e.error?.message?this.errorList=[e.error.message]:this.errorList=["Erro ao carregar cobran\xE7as pendentes"]}})}onApplyDiscountChange(e){this.applyDiscount=e,this.loadPendingCharges()}selectCharge(e){this.selectedChargeUuid=e}onChargeChecked(e,r){this.selectedChargeUuid=r?e:null}toggleDetail(e){this.isDetailExpanded(e)?this.expandSet.delete(e):this.expandSet.add(e)}isDetailExpanded(e){return this.expandSet.has(e)}closeErrorAlert(e){this.errorList=this.errorList.filter(r=>r!==e)}get selectedCharge(){return!this.pendingData||!this.selectedChargeUuid?null:this.pendingData.charges.find(e=>e.uuid===this.selectedChargeUuid)??null}get canContinue(){return!this.selectedChargeUuid||!this.pendingData||!this.selectedCharge?!1:this.selectedCharge.valor_com_encargos_total===this.pendingData.credit_value}get hasValueMismatch(){return!this.selectedCharge||!this.pendingData?!1:this.selectedCharge.valor_com_encargos_total!==this.pendingData.credit_value}formatCondominioLabel(e,r){return e!=null&&r?`${e} - ${r}`:r||(e!=null?String(e):"\u2014")}continueWithCharge(){if(!this.canContinue||!this.selectedChargeUuid||!this.pendingData)return;this.modalService.create({nzContent:it,nzTitle:"Gerar Cr\xE9dito por Duplicidade",nzBodyStyle:{maxHeight:"80vh",overflow:"auto"},nzCentered:!0,nzWidth:"70%",nzData:{isModal:!0,charge_uuid:this.selectedChargeUuid,duplicityMode:!0,instrument_uuid:this.pendingData.instrument_uuid,apply_discount:this.applyDiscount,credit_value:this.pendingData.credit_value,data_pagamento_retorno:this.pendingData.data_pagamento_retorno,data_credito_retorno:this.pendingData.data_credito_retorno},nzFooter:null}).afterClose.subscribe(r=>{r&&this.modalRef.close(!0)})}cancel(){this.modalRef.close(!1)}static{this.\u0275fac=function(r){return new(r||o)(E(k),E(W))}}static{this.\u0275cmp=V({type:o,selectors:[["app-generate-credit-modal"]],standalone:!1,decls:2,vars:1,consts:[["pendingChargesTable",""],[2,"padding","24px","text-align","center"],["nzShowIcon","","nzType","error","nzCloseable","",2,"margin-bottom","12px",3,"nzMessage"],[2,"display","flex","justify-content","flex-end","gap","8px","margin-top","16px"],["nz-button","","type","button",3,"click"],["nz-button","","nzType","primary","type","button",3,"click","disabled"],["nzShowIcon","","nzType","error","nzCloseable","",2,"margin-bottom","12px",3,"nzOnClose","nzMessage"],[2,"margin-bottom","16px"],[2,"display","flex","align-items","center","gap","8px","margin-top","12px"],[3,"ngModelChange","ngModel"],[2,"color","rgba(0, 0, 0, 0.65)","margin-top","8px"],["nzShowIcon","","nzType","warning","nzMessage","O valor do cr\xE9dito deve ser exatamente igual ao valor total da cobran\xE7a selecionada",2,"margin-top","12px"],[2,"margin-bottom","8px"],["nzNotFoundImage","simple",3,"nzNotFoundContent"],["nzSize","small","nzBordered","",3,"nzData","nzFrontPagination","nzShowPagination"],["nzWidth","48px"],["nzWidth","40px"],["nzAlign","right"],[2,"cursor","pointer",3,"click"],[3,"nzCheckedChange","click","nzChecked"],[3,"click"],["nz-button","","nzType","text","nzSize","small","type","button"],[3,"nzExpand"],["nz-button","","nzType","text","nzSize","small","type","button",3,"click"],["nz-icon","","nzTheme","outline",3,"nzType"],[2,"padding","8px 12px"],[2,"display","block","margin-bottom","8px"],["nzSize","small",3,"nzData","nzFrontPagination","nzShowPagination"],["nzSimple",""]],template:function(r,l){r&1&&S(0,Ft,9,2,"div")(1,Pt,2,0,"div",1),r&2&&v(l.isLoading?1:0)},dependencies:[$,xe,Pe,O,G,U,j,A,Le,Ge,K,Z,q,Oe,X,J,Q,je,We,$e,H,R],styles:[".selected-row[_ngcontent-%COMP%]{background-color:#e6f4ff}"]})}}return o}
1)();var rt=()=>["condominio"],Lt=()=>({x:"1830px"}),wt=()=>({x:"1600px"}),lt=(o,d)=>d.uuid;function Vt(o,d){if(o&1){let e=b();t(0,"a",39),x("click",function(){C(e);let l=s().$implicit,c=s();return g(c.openGenerateCreditModal(l))}),_(1,"span",40),n(2," Gerar Cr\xE9dito "),i()}}function Bt(o,d){if(o&1&&(t(0,"tr")(1,"td"),n(2),u(3,"date"),i(),t(4,"td"),n(5),i(),t(6,"td"),n(7),i(),t(8,"td"),n(9),u(10,"date"),i(),t(11,"td"),n(12),u(13,"date"),i(),t(14,"td"),n(15),i(),t(16,"td"),n(17),i(),t(18,"td"),n(19),i(),t(20,"td"),n(21),u(22,"date"),u(23,"date"),i(),t(24,"td"),n(25),u(26,"date"),i(),t(27,"td"),n(28),u(29,"currency"),i(),t(30,"td"),n(31),u(32,"currency"),i(),t(33,"td"),n(34),i(),t(35,"td")(36,"nz-tag",36),n(37),i()(),t(38,"td",37),S(39,Vt,3,0,"a",38),i()()),o&2){let e=d.$implicit,r=s();a(2),m(f(3,16,e.identified_at,"dd/MM/yyyy '\xE0s' HH:mm")),a(3),m(r.formatCondominioLabel(e.condominio_codigo,e.condominio_name)),a(2),m(e.unidade_code||"\u2014"),a(2),m(e.competencia?T(10,19,e.competencia,"MM/yyyy","UTC"):"\u2014"),a(3),m(e.due_date?f(13,23,e.due_date,"dd/MM/yyyy"):"\u2014"),a(3),m(e.original_nosso_numero||"\u2014"),a(2),m(e.duplicate_nosso_numero||"\u2014"),a(2),m(e.payment_method||"\u2014"),a(2),h(" ",e.return_payment_date?f(22,26,e.return_payment_date,"dd/MM/yyyy"):e.charge_payment_date?f(23,29,e.charge_payment_date,"dd/MM/yyyy"):"\u2014"," "),a(4),m(e.return_credit_date?f(26,32,e.return_credit_date,"dd/MM/yyyy"):"\u2014"),a(3),m(e.charged_value!=null?f(29,35,e.charged_value,"BRL"):"\u2014"),a(3),m(e.paid_value!=null?f(32,38,e.paid_value,"BRL"):"\u2014"),a(3),m(e.remittance_nsu||"\u2014"),a(2),p("nzColor",r.getCreditStatusColor(e.credit_status,e.credit_used)),a(),h(" ",r.getCreditStatusLabel(e.credit_status)," "),a(2),v(e.credit_used?-1:39)}}function Rt(o,d){if(o&1&&n(0),o&2){let e=s().$implicit;h(" (n\xBA ",e.duplicate_nosso_numero,") ")}}function Ht(o,d){if(o&1&&(t(0,"tr")(1,"td"),n(2),u(3,"date"),i(),t(4,"td"),n(5),u(6,"currency"),i(),t(7,"td"),n(8," Duplicidade "),S(9,Rt,1,1),i(),t(10,"td"),n(11),i(),t(12,"td"),n(13),i(),t(14,"td"),n(15),i(),t(16,"td")(17,"nz-tag",36),n(18),i()(),t(19,"td"),n(20),u(21,"date"),i(),t(22,"td"),n(23),i(),t(24,"td"),n(25),u(26,"currency"),i()()),o&2){let e=d.$implicit,r=s();a(2),m(T(3,11,e.data_credito,"dd/MM/yyyy","UTC")),a(3),m(f(6,15,e.valor,"BRL")),a(4),v(e.duplicate_nosso_numero?9:-1),a(2),m(r.formatCondominioLabel(e.condominio_codigo,e.condominio_name)),a(2),m(e.unidade_code||"\u2014"),a(2),m(e.responsible_name||"\u2014"),a(2),p("nzColor",r.getCreditStatusColor(e.status)),a(),h(" ",r.getCreditStatusLabel(e.status)," "),a(2),h(" ",e.destination_competencia?T(21,18,e.de
1stination_competencia,"MM/yyyy","UTC"):"\u2014"," "),a(3),m(e.destination_nosso_numero||"\u2014"),a(2),h(" ",e.destination_valor_pago!=null?f(26,22,e.destination_valor_pago,"BRL"):"\u2014"," ")}}function kt(o,d){if(o&1&&(_(0,"nz-empty",41),t(1,"span",42),n(2),i()),o&2){let e=s();p("nzNotFoundContent",null),a(2),h(" ",e.hasSearched?"N\xE3o h\xE1 pagamentos em duplicidade":"Utilize os filtros e clique em Buscar"," ")}}function At(o,d){if(o&1&&(_(0,"nz-empty",41),t(1,"span",42),n(2),i()),o&2){let e=s();p("nzNotFoundContent",null),a(2),h(" ",e.hasSearchedHistory?"N\xE3o h\xE1 hist\xF3rico de cr\xE9ditos":"Utilize os filtros e clique em Buscar"," ")}}function Gt(o,d){if(o&1&&(t(0,"div",43)(1,"div")(2,"span"),n(3," Total de registros: "),t(4,"span",44),n(5),i()()()()),o&2){let e=s(2);a(5),m(e.totalRegistros||0)}}function Ut(o,d){if(o&1&&S(0,Gt,6,1,"div",43),o&2){let e=s();v(e.totalRegistros?0:-1)}}function Ot(o,d){if(o&1&&(t(0,"div",43)(1,"div")(2,"span"),n(3," Total de registros: "),t(4,"span",44),n(5),i()()()()),o&2){let e=s(2);a(5),m(e.historyTotalRegistros||0)}}function Wt(o,d){if(o&1&&S(0,Ot,6,1,"div",43),o&2){let e=s();v(e.historyTotalRegistros?0:-1)}}var dt=(()=>{class o{constructor(e,r,l,c,z){this.fb=e,this.api=r,this.modalService=l,this.permissionService=c,this.activatedRoute=z,this.isLoading=!1,this.isLoadingHistory=!1,this.allDuplicatePayments=[],this.duplicatePaymentsOnScroll=[],this.allCreditsHistory=[],this.creditsHistoryOnScroll=[],this.totalRegistros=0,this.historyTotalRegistros=0,this.scrollSize=20,this.scrollIndex=1,this.historyScrollIndex=1,this.selectedTabIndex=0,this.hasSearched=!1,this.hasSearchedHistory=!1,this.validateForm=this.fb.group({condominio_uuid:[null],unidade_uuid:[null],nosso_numero:[null],data_pagamento_from:[null],data_pagamento_to:[null]}),this.historyForm=this.fb.group({condominio_uuid:[null],unidade_uuid:[null],status:[null],data_credito_from:[null],data_credito_to:[null]}),this.validateForm.get("condominio_uuid")?.valueChanges.subscribe(()=>{this.validateForm.patchValue({unidade_uuid:null},{emitEvent:!1})}),this.historyForm.get("condominio_uuid")?.valueChanges.subscribe(()=>{this.historyForm.patchValue({unidade_uuid:null},{emitEvent:!1})})}get condominiumSelected(){return this.validateForm.get("condominio_uuid")?.value??""}get historyCondominiumSelected(){return this.historyForm.get("condominio_uuid")?.value??""}ngOnInit(){this.activatedRoute.queryParams.subscribe(e=>{let r={condominio_uuid:e.condominio_uuid||null,unidade_uuid:e.unidade_uuid||null,nosso_numero:e.nosso_numero||null,data_pagamento_from:e.data_pagamento_from||null,data_pagamento_to:e.data_pagamento_to||null},l={condominio_uuid:e.condominio_uuid||null,unidade_uuid:e.unidade_uuid||null,status:e.status||null,data_credito_from:e.data_credito_from||null,data_credito_to:e.data_credito_to||null},c=Object.values(r).some(N=>!!N),z=Object.values(l).some(N=>!!N),y=e.tab==="historico";c&&this.validateForm.patchValue(r,{emitEvent:!1}),z&&this.historyForm.patchValue(l,{emitEvent:!1}),y?(this.selectedTabIndex=1,z&&this.onSearchHistory()):c&&this.onSearch()})}onTabChange(e){this.selectedTabIndex=e}getDuplicatePaymentsList(){this.isLoading=!0,this.api.post("/return-mirror/duplicate-payments/list",ie(Y({},this.validateForm.value))).pipe(F(()=>this.isLoading=!1)).subscribe({next:e=>{this.allDuplicatePayments=e.data||[],this.totalRegistros=this.allDuplicatePayments.length,this.scrollIndex=1,this.duplicatePaymentsOnScroll=[],this.increaseScroll(),this.hasSearched=!0}})}getCreditsHistory(){this.isLoadingHistory=!0,this.api.post("/unit-credits/history",ie(Y({},this.historyForm.value))).pipe(F(()=>this.isLoadingHistory=!1)).subscribe({next:e=>{this.allCreditsHistory=e.data||[],this.historyTotalRegistros=this.allCreditsHistory.length,this.historyScrollIndex=1,this.creditsHistoryOnScroll=[],this.increaseHistoryScroll(),this.hasSearchedHistory=!0}})}onSearch(){this.getDuplicatePaymentsList()}onSearchHistory(){this.getCreditsHistory()}onScroll(e){ne(()=>{e.target.offsetTop+e.target.scrollTop>=e.target.scrollHeight-700&&this.increaseScroll()},1)}onHistoryScroll(e){ne(()=>{e.target.offsetTop+e.target.scrollTop>=e.target.scrollHeight-700&&this.increaseHistoryScroll()},1)}increaseScroll(){this.duplicatePaymentsOnScroll=this.allDuplicatePayments.slice(0,this.scrollIndex*this.scrollSize),this.scrollIndex++}increaseHistoryScroll(){this.creditsHistoryOnScroll=this.allCreditsHistory.slice(0,this.historyScrollIndex*this.scrollSize),this.historyScrollIndex++}getCreditStatusLabel(e){return e==="UTILIZADO"?"Utilizado":"Dispon\xEDvel"}getCreditStatusColor(e,r){return r||e==="UTILIZADO"?"green":"gold"}formatCondominioLabel(e,r){return e!=null&&r?`${e} - ${r}`:r||(e!=null?String(e):"\u2014")}openGenerateCreditModal(e){e.credit_used||this.permissionService.validate("cobrancas-gerar-credito",()=>{this.modalService.create({nzContent:at,nzTitle:"Gerar Cr\xE9dito por Duplicidade",nzBodyStyle:{maxHeight:"80vh",overflow:"auto"},nzCentered:!0,nzWidth:"70%",nzData:{instrument_uuid:e.uuid},nzFooter:null}).afterClose.subscribe(l=>{l&&(this.getDuplicatePaymentsList(),this.hasSearchedHistory&&this.getCreditsHistory())})})}static{this.\u0275fac=function(r){return new(r||o)(E(Se),E(k),E(W),E(Qe),E(pe))}}static{this.\u0275cmp=V({type:o,selectors:[["app-list-duplicate-payments"]],standalone:!1,decls:140,vars:32,consts:[["duplicatePaymentsTable",""],["creditsHistoryTable",""],["emptyList",""],["emptyHistory",""],["totalTemplate",""],["historyTotalTemplate",""],[1,"site-page-header-ghost-wrapper"],["nzBackIcon","",3,"nzGhost"],[3,"nzSelectedIndexChange","nzSelectedIndex"],["nzTitle","Listagem"],["nz-form","","nz-row","","nzGutter","16","nzLayout","vertical","nzAlign","bottom",3,"ngSubmit","formGroup"],["nz-col","","nzSpan","6"],["label","Condom\xEDnio","formControlName","condominio_uuid",3,"selectMode","tiposPessoas","allowClear"],["formControlName","unidade_uuid","label","Unidade",3,"condominium_uuid","allowClear"],["nz-col","","nzSpan","4"],["nz-input","","formControlName","nosso_numero","placeholder","Nosso n\xFAmero duplicado"],["formControlName","data_pagamento_from","nzFormat","dd/MM/yyyy"],["formControlName","data_pagamento_to","
1nzFormat","dd/MM/yyyy"],["nz-button","","nzType","primary","type","submit","nzBlock",""],["nz-icon","","nzType","search"],["nzSize","small",2,"padding","0","overflow","scroll","max-height","60vh",3,"scroll","nzData","nzLoading","nzShowPagination","nzFooter","nzFrontPagination","nzNoResult","nzScroll"],["nzWidth","120px"],["nzWidth","140px"],["nzWidth","80px"],["nzWidth","100px"],["nzWidth","110px"],["nzWidth","130px"],["nzWidth","130px","nzRight",""],["nzTitle","Hist\xF3rico de cr\xE9ditos"],["nz-col","","nzSpan","5"],["formControlName","status","nzAllowClear","","nzPlaceHolder","Todos"],["nzValue","DISPONIVEL","nzLabel","Dispon\xEDvel"],["nzValue","UTILIZADO","nzLabel","Utilizado"],["formControlName","data_credito_from","nzFormat","dd/MM/yyyy"],["formControlName","data_credito_to","nzFormat","dd/MM/yyyy"],["nz-col","","nzSpan","3"],[3,"nzColor"],["nzRight",""],["nz-link",""],["nz-link","",3,"click"],["nz-icon","","nzType","wallet","nzTheme","outline"],["nzNotFoundImage","simple",3,"nzNotFoundContent"],[2,"color","rgba(0, 0, 0, 0.25)"],[1,"total-footer"],[1,"total"]],template:function(r,l){if(r&1){let c=b();t(0,"div",6)(1,"nz-page-header",7)(2,"nz-page-header-title"),n(3,"Pagamentos em Duplicidade"),i(),t(4,"nz-page-header-subtitle"),n(5," Pagamentos identificados com nosso n\xFAmero diferente do instrumento de baixa da cobran\xE7a "),i(),t(6,"nz-page-header-content")(7,"nz-tabset",8),me("nzSelectedIndexChange",function(y){return C(c),se(l.selectedTabIndex,y)||(l.selectedTabIndex=y),g(y)}),x("nzSelectedIndexChange",function(y){return C(c),g(l.onTabChange(y))}),t(8,"nz-tab",9)(9,"form",10),x("ngSubmit",function(){return C(c),g(l.onSearch())}),t(10,"div",11),_(11,"app-filtro-pessoas",12),i(),t(12,"div",11),_(13,"app-filtro-unidades",13),i(),t(14,"div",14)(15,"nz-form-item")(16,"nz-form-label"),n(17,"Nosso n\xFAmero"),i(),t(18,"nz-form-control"),_(19,"input",15),i()()(),t(20,"div",14)(21,"nz-form-item")(22,"nz-form-label"),n(23,"Pagamento de"),i(),t(24,"nz-form-control"),_(25,"nz-date-picker",16),i()()(),t(26,"div",14)(27,"nz-form-item")(28,"nz-form-label"),n(29,"Pagamento at\xE9"),i(),t(30,"nz-form-control"),_(31,"nz-date-picker",17),i()()(),t(32,"div",14)(33,"nz-form-item")(34,"button",18),_(35,"span",19),n(36," Buscar "),i()()()(),t(37,"nz-table",20,0),x("scroll",function(y){return C(c),g(l.onScroll(y))}),t(39,"thead")(40,"tr")(41,"th",21),n(42,"Identificado em"),i(),t(43,"th",22),n(44,"Condom\xEDnio"),i(),t(45,"th",23),n(46,"Unidade"),i(),t(47,"th",24),n(48,"Compet\xEAncia"),i(),t(49,"th",25),n(50,"Vencimento"),i(),t(51,"th",26),n(52,"Nosso n\xBA original"),i(),t(53,"th",26),n(54,"Nosso n\xBA duplicado"),i(),t(55,"th",25),n(56,"Forma pgto."),i(),t(57,"th",25),n(58,"Dt. pagamento"),i(),t(59,"th",25),n(60,"Dt. cr\xE9dito"),i(),t(61,"th",24),n(62,"Valor cobrado"),i(),t(63,"th",24),n(64,"Valor pago"),i(),t(65,"th",24),n(66,"NSU remessa"),i(),t(67,"th",25),n(68,"Status cr\xE9dito"),i(),t(69,"th",27),n(70,"A\xE7\xF5es"),i()()(),t(71,"tbody"),M(72,Bt,40,41,"tr",null,lt),i()()(),t(74,"nz-tab",28)(75,"form",10),x("ngSubmit",function(){return C(c),g(l.onSearchHistory())}),t(76,"div",11),_(77,"app-filtro-pessoas",12),i(),t(78,"div",29),_(79,"app-filtro-unidades",13),i(),t(80,"div",14)(81,"nz-form-item")(82,"nz-form-label"),n(83,"Status"),i(),t(84,"nz-form-control")(85,"nz-select",30),_(86,"nz-option",31)(87,"nz-option",32),i()()()(),t(88,"div",14)(89,"nz-form-item")(90,"nz-form-label"),n(91,"Cr\xE9dito de"),i(),t(92,"nz-form-control"),_(93,"nz-date-picker",33),i()()(),t(94,"div",14)(95,"nz-form-item")(96,"nz-form-label"),n(97,"Cr\xE9dito at\xE9"),i(),t(98,"nz-form-control"),_(99,"nz-date-picker",34),i()()(),t(100,"div",35)(101,"nz-form-item")(102,"button",18),_(103,"span",19),n(104," Buscar "),i()()()(),t(105,"nz-table",20,1),x("scroll",function(y){return C(c),g(l.onHistoryScroll(y))}),t(107,"thead")(108,"tr")(109,"th",25),n(110,"Data"),i(),t(111,"th",24),n(112,"Valor"),i(),t(113,"th",22),n(114,"Origem"),i(),t(115,"th",21),n(116,"Condom\xEDnio"),i(),t(117,"th",23),n(118,"Unidade"),i(),t(119,"th",22),n(120,"Respons\xE1vel"),i(),t(121,"th",25),n(122,"Status"),i(),t(123,"th",21),n(124,"Compet\xEAncia abatida"),i(),t(125,"th",21),n(126,"Nosso n\xBA abatido"),i(),t(127,"th",25),n(128,"Valor abatido"),i()()(),t(129,"tbody"),M(130,Ht,27,25,"tr",null,lt),i()()()()()()(),S(132,kt,3,2,"ng-template",null,2,L)(134,At,3,2,"ng-template",null,3,L)(136,Ut,1,1,"ng-template",null,4,L)(138,Wt,1,1,"ng-template",null,5,L)}if(r&2){let c=D(38),z=D(106),y=D(133),N=D(135),mt=D(137),ct=D(139);a(),p("nzGhost",!1),a(6),de("nzSelectedIndex",l.selectedTabIndex),a(2),p("formGroup",l.validateForm),a(2),p("selectMode","default")("tiposPessoas",P(28,rt))("allowClear",!0),a(2),p("condominium_uuid",l.condominiumSelected)("allowClear",!0),a(24),p("nzData",l.duplicatePaymentsOnScroll)("nzLoading",l.isLoading)("nzShowPagination",!1)("nzFooter",l.totalRegistros?mt:"")("nzFrontPagination",!1)("nzNoResult",y)("nzScroll",P(29,Lt)),a(35),I(c.data),a(3),p("formGroup",l.historyForm),a(2),p("selectMode","default")("tiposPessoas",P(30,rt))("allowClear",!0),a(2),p("condominium_uuid",l.historyCondominiumSelected)("allowClear",!0),a(26),p("nzData",l.creditsHistoryOnScroll)("nzLoading",l.isLoadingHistory)("nzShowPagination",!1)("nzFooter",l.historyTotalRegistros?ct:"")("nzFrontPagination",!1)("nzNoResult",N)("nzScroll",P(31,wt)),a(25),I(z.data)}},dependencies:[fe,Ce,$,ge,et,Ye,O,G,U,Be,j,De,be,Me,Te,Ne,Ie,A,Fe,Ae,Re,He,ke,we,Ve,K,Z,q,X,J,Q,Ue,qe,Ze,Je,ze,ye,H,R],encapsulation:2})}}return o}
1)();var $t=[{path:"",pathMatch:"full",redirectTo:"buscar"},{path:"buscar",component:dt,data:{role:Xe.ListarPagamentosDuplicidade},canActivate:[he]}],st=(()=>{class o{static{this.\u0275fac=function(r){return new(r||o)}}static{this.\u0275mod=B({type:o})}static{this.\u0275inj=w({imports:[te.forChild($t),te]})}}return o})();var Li=(()=>{class o{static{this.\u0275fac=function(r){return new(r||o)}}static{this.\u0275mod=B({type:o})}static{this.\u0275inj=w({imports:[st,ve,ce,tt,Ke,Ee,nt]})}}return o})();export{Li as DuplicatePaymentsModule};
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.