PageSourceSearch

https://cbtkd.org.br/assets/DetalhesRegistroCBTKD-e0495ab3.js

js cbtkd.org.br collected 2026-10-10 00:51:00 UTC 34,210 bytes, 11 lines download raw bytes

1import{j as e}from"./vendor-ui-bootstrap-613dad89.js";import{r as c}from"./vendor-react-4c7f50f2.js";import{S as ua}from"./SmartInput-37432b19.js";import fa,{hideSpinner as u,showSpinner as E}from"./BusySpinner-44ad2170.js";import xa from"./DeleteRegisterDialog-cdf25b23.js";import{f as p}from"./FormatDataTypesUtils-76fbe04b.js";import{i as b}from"./vendor-firebase-7ea6fd91.js";import{S as A}from"./StrUtil-dc9607e5.js";import{b as $,M as O,N as ha}from"./main-722823a7.js";/* empty css                      *//* empty css                        *//* empty css                              *//* empty css                    *//* empty css                     *//* empty css                     */import{h as N,a as ga}from"./ClipboardUtils-023f5fe2.js";import{d as M}from"./downloadUtils-23de5369.js";import pa from"./DocumentosComponent-2c864d05.js";import{P as ba}from"./printCertificadoComponent-5c7a3089.js";import{$ as va,a as Ca,b as ja}from"./module-a4d4adf2.js";import{t as W}from"./index-393f3531.js";import{I as Na}from"./Images.service-94be9e48.js";import{g as wa,m as ya}from"./GraduacoesUtil-4a64c0a8.js";import{a as w}from"./dateForFirebaseUtils-3ebf0ebf.js";import{I as Da}from"./InputDialog-b9090c00.js";import{f as k}from"./vendor-utils-de6b936e.js";import"./vendor-ui-material-b69ee68f.js";/* empty css              */import"./KeysUtil-aee16e59.js";import"./NumberFormatsUtil-381d6edf.js";import"./SmartSelect-a2255c8a.js";import"./SmartSection-3749aecd.js";import"./index-79185c02.js";import"./monthUtil-9f48d581.js";/* empty css                     */import"./html2canvas.esm-e0a7d97b.js";import"./browser-0582e8d8.js";import"./uuid-ecdb74cc.js";function le(t){const[a,h]=c.useState(void 0),_=c.useRef(!1),[z,L]=c.useState(!1),[U,H]=c.useState(!1),[K,V]=c.useState(!1),[q,Y]=c.useState(!1),[J,Q]=c.useState(!1),v=c.useRef(),[X,g]=c.useState(!1),[Z,y]=c.useState(!0),f=c.useRef(0),l=c.useRef([]),i=c.useRef(0),{setError:D}=t,aa=s=>{const r="3",o="7";let d=s.filter(n=>n.tipo===r);return d.length>0?{url:d[0].urlFrente,tipo:"Documento de identifição",descricao:d[0].descricao}:(d=s.filter(n=>n.tipo===o),d.length>0?{url:d[0].urlFrente,tipo:"Documento de identifição",descricao:d[0].descricao}:"")},ea=s=>{let r=0;return s.indexOf("DAN")!==-1?s.split(" ").forEach(o=>{o.indexOf("º")!==-1&&(r=parseInt(o.split("º")[0]),r+=10)}):s.indexOf("GUB")!==-1&&s.split(" ").forEach(o=>{o.indexOf("º")!==-1&&(r=parseInt(o.split("º")[0]),r=11-r)}),r},C=c.useCallback((s,r={current:!0})=>{$.getOne("praticantes",s.vinculo.idEntidade).then(o=>{if(!r.current){console.log("🚫 [DetalhesRegistroCBTKD retrieveData] Componente desmontado, cancelando");return}o&&$.getOne("services",s.servico).then(d=>{if(!r.current){console.log("🚫 [DetalhesRegistroCBTKD retrieveData] Componente desmontado, cancelando");return}let n=0;d?n=d.certificado.nivel.toUpperCase().indexOf("DAN")!==-1?10+Number(d.certificado.nivel.split(" ")[0]):11-Number(d.certificado.nivel.split(" ")[0]):n=ea(s.descricao),f.current=o.dadosTaekwondo.maxGraduacao?o.dadosTaekwondo.maxGraduacao:0,l.current=O(o.dadosTaekwondo.historicoGraduacoes),i.current=new Date().getFullYear()-o.dadosPessoais.birthdate.toDate().getFullYear(),h({...s,dadosCertificacao:{...s.dadosCertificacao,numero:o.dadosTaekwondo.kukkiwon?o.dadosTaekwondo.kukkiwon:"",graduacao:n},dadosExtra:{birthdate:o.dadosPessoais.birthdate?o.dadosPessoais.birthdate:"",maxGraduacao:o.dadosTaekwondo.maxGraduacao?o.dadosTaekwondo.maxGraduacao:0,graduacao:o.dadosTaekwondo.MaxGraduacao?o.dadosTaekwondo.MaxGraduacao:"",graduacaoDate:o.dadosTaekwondo.maxGraduacao&&o.dadosTaekwondo.HistoricoGraduacoes?o.dadosTaekwondo.HistoricoGraduacoes[o.dadosTaekwondo.maxGraduacao-1]:"",federacao:o.dadosFiliacao&&o.dadosFiliacao.federacao?o.dadosFiliacao.federacao:"",foto:o.dadosPessoais.urlImagemID&&o.dadosPessoais.urlImagemID.indexOf("http")!==-1?o.dadosPessoais.urlImagemID:"",rg:aa(o.documentos),email:o.dadosContato.email?o.dadosContato.email:""},documentos:o.documentos,HistoricoGraduacoes:ha(o.dadosTaekwondo.HistoricoGraduacoes),historicoGraduacoes:O(o.dadosTaekwondo.historicoGraduacoes),observacao:s.observacao.replace("Parcela 1 de 1.","").replace("Parcela 1 de 1.","")})}).catch(d=>{console.log(d),D(d.message)})}).catch(o=>{console.log(o),D(o.message)})},[D]),j=c.useRef(!1);c.useEffect(()=>{const s={current:!0};return t.doc&&!_.current&&C(t.doc,s),()=>{if(s.current=!1,j.current)try{u(),console.log("🧹 [CLEANUP DetalhesRegistroCBTKD] Spinner limpo ao desmontar componente")}catch{}}},[t.doc,C]);const oa=()=>{let s=[];return a.observacao.length===0&&(s[s.length]="observação"),s},sa=()=>{let s=[];if(!a.dadosCertificacao||!a.dadosCertificacao.graduacao)s.push("graduação pretendida não identificada");else{const r=a.dadosCertificacao.graduacao-1;if(!a.historicoGraduacoes||!Array.isArray(a.historicoGraduacoes))s.push("histórico de graduações não encontrado");else if(!a.historicoGraduacoes[r])s.push(`graduação pretendida (${a.dadosCertificacao.graduacao-10}º DAN) não encontrada no histórico`);else{const o=a.historicoGraduacoes[r];(!o.data||o.data===""||o.data===null)&&s.push(`data do exame da graduação pretendida (${a.dadosCertificacao.graduacao-10}º DAN). Por favor, acesse o cadastro do praticante e informe a data do exame no histórico de graduações`)}}return s},da=s=>{s.preventDefault();let r=sa();if(r.length===0){j.current=!0,E(),t.setError("");let o={...a,dadosCertificacao:{...a.dadosCertificacao,dataEmissao:b.fromDate(new Date(new Date().toDateString()+" 03:00:00"))}};h(o),console.log("DetalhesRegistroCBTKD => handleAprovar => newDoc:",o),t.dataService.updateObject("contas",t.docId,{"dadosCertificacao.dataEmissao":o.dadosCertificacao.dataEmissao,"dadosCertificacao.graduacao":a.dadosCertificacao.graduacao,observacao:""}).then(()=>{var P;t.handleAprovado();let d=a.historicoGraduacoes;const n=a.dadosCertificacao.graduacao-1;d[n].aprovacaoConfederacao=!0,d[n].observacaoConfederacao=o.observacao;let x=a.HistoricoGraduacoes;const m=(P=d[n])==null?void 0:P.data;if(m)x[n]=b.fromDate(new Date(m));else throw console.error("⚠️ Data do exame não encontrada para graduação:",n+1),new Error("Data do exame não encontrada. Este certificado não deveria ter sido aprovado.");let F=wa(d,a.HistoricoGraduacoes);t.dataService.updateObject("praticantes",a.vinculo.idEntidade,{"dadosTaekwondo.HistoricoGraduacoes":x,"dadosTaekwondo.historicoGraduacoes":d,"dadosTaekwondo.maxGraduacao":F,"dadosTaekwondo.MaxGraduacao":ya(F)}).then(()=>{R()}).catch(B=>{console.log(B),t.setError(B.message),g(!1),u()})}).catch(d=>{console.log(d),t.setError(d.message),g(!1),u()})}else{let o=[];return o=r,t.setError(A("Para aprovar esta certificação, informe: ",o)),window.scrollTo({top:0,behavior:"smooth"}),!1}},ta=s=>{s.preventDefault();let r=oa();if(r.length===0){E(),j.current=!0,t.setError("");let o={...a,dadosCertificacao:{...a.dadosCertificacao,dataRecusa:b.fromDate(new Date(new Date().toDateString()+" 03:00:00"))}};h(o),document.getElementById(`CollapseFinanceiroDetalhes-${t.indxDoc}`).classList.remove("show"),t.dataService.updateObject("contas",t.docId,{"dadosCertificacao.dataRecusa":o.dadosCertificacao.dataRecusa,observacao:o.observacao}).then(()=>{t.handleReprovado(),console.log("Registro CBTKD recusado com sucesso!"),document.getElementById(`CollapseFinanceiroDetalhes-${t.indxDoc}`).classList.remove("show"),u()}).catch(d=>{console.log(d),t.setError(d.message),u()})}else{let o=[];return o=r,t.setError(A("Para reprovar esta certificação, informe: ",o)),window.scrollTo({top:0,behavior:"smooth"}),!1}},ra=s=>{s.preventDefault();let{id:r,value:o}=s.target;switch(r){case"numeroDocumento":h(d=>({...d,dadosCertificacao:{...d.dadosCertificacao,numero:o}}));break;case"dataValidade":h(d=>({...d,dadosCertificacao:{...d.dadosCertificacao,dataValidade:o}}));break;case"observacao":h(d=>({...d,observacao:o}));break}},I=s=>{s.preventDefault(),t.setError&&t.setError(""),t.contasService.getUpdatedStatusFromCobrancaByContaId(a.id,!0).then(r=>{r&&r.success===!1&&t.setError&&t.setError(r.message||"Não foi possível verificar a situação da cobrança."),t.dataService.getOne("contas",a.id).then(o=>{C(o)}).catch(o=>{console.log(o),t.setError(o.message)})}).catch(r=>{var o,d;console.log(r),t.setError&&t.setError("Erro ao verificar situação da cobrança: "+(((d=(o=r==null?void 0:r.response)==null?void 0:o.data)==null?void 0:d.message)||(r==null?void 0:r.message)||"erro de
1sconhecido"))})},ia=s=>{j.current=!0,E(),t.contasService.abonarCobranca(a.id,s,null,C).then(()=>{}).catch(r=>{console.log(r),u()})},na=()=>new Promise((s,r)=>{const o=new Image,d="https://firebasestorage.googleapis.com/v0/b/sg-cbtkd.appspot.com/o/modeloscertificados%2FModelo_Certificado_CBTKD_MOD_Rivanaldo.png?alt=media&token=711c6a52-abf4-43c5-bea3-3f6e1301ce8e";o.onload=()=>{console.log("✅ Imagem de fundo carregada com sucesso"),s(o)},o.onerror=n=>{console.error("❌ Erro ao carregar imagem de fundo:",n),r(n)},o.src=d}),R=async()=>{document.getElementById(`CollapseFinanceiroDetalhes-${t.indxDoc}`).classList.contains("show")===!1&&document.getElementById(`CollapseFinanceiroDetalhes-${t.indxDoc}`).classList.add("show"),y(!0),setTimeout(()=>{g(!0),setTimeout(()=>{const s={filename:"Certificado"+k(new Date,"-dd-MM-yyyy")+".pdf",method:"open",resolution:va.MEDIUM,page:{margin:Ca.NONE,format:"A4",orientation:"landscape"}};setTimeout(()=>{console.log("📄 Gerando PDF sem fundo para impressão..."),ja(v,s).then(()=>{console.log("✅ PDF gerado com sucesso!"),console.log("🖼️ Ativando fundo para gerar imagem..."),G(v)}).catch(r=>{console.error("❌ Erro ao gerar PDF:",r),G(v)})},500)},300)},300)},G=async s=>{console.log("htmlToImageConvert => elementRef:",s),console.log("🖼️ Ativando fundo para captura da imagem..."),y(!1);try{await na(),console.log("✅ Imagem de fundo carregada, aguardando renderização...")}catch(o){console.error("⚠️ Erro ao carregar imagem de fundo:",o)}await new Promise(o=>{const d=()=>{console.log("🎉 [DEBUG] Evento backgroundImageReady recebido!"),window.removeEventListener("backgroundImageReady",d),o()};window.addEventListener("backgroundImageReady",d),setTimeout(()=>{console.warn("⚠️ [DEBUG] Timeout aguardando imagem, prosseguindo mesmo assim"),window.removeEventListener("backgroundImageReady",d),o()},5e3)}),setTimeout(()=>{if(console.log("📸 Capturando imagem do certificado COM fundo..."),s.current){const d=s.current.getBoundingClientRect();console.log("📐 [DEBUG] Dimensões do elemento:",{width:d.width,height:d.height,visible:d.width>0&&d.height>0});const n=s.current.querySelector('img[alt="Fundo do certificado"]');n?(console.log("✅ [DEBUG] Imagem de fundo encontrada no DOM"),console.log("📊 [DEBUG] Estado da imagem:",{complete:n.complete,naturalWidth:n.naturalWidth,naturalHeight:n.naturalHeight})):console.error("❌ [DEBUG] Imagem de fundo NÃO encontrada no DOM!")}const o={cacheBust:!1,skipFonts:!0,useCORS:!0,allowTaint:!0,backgroundColor:"#ffffff",quality:.95,pixelRatio:2,filter:d=>!(d.tagName==="LINK"&&d.href&&d.href.includes("fonts.googleapis.com")),onclone:d=>{d.querySelectorAll('link[href*="fonts.googleapis.com"]').forEach(m=>m.remove());const x=d.createElement("style");return x.textContent=`
2            * {
3              font-family: Arial, sans-serif !important;
4            }
5            .material-icons,
6            .material-icons-outlined,
7            .material-symbols-outlined {
8              font-family: 'Material Icons', Arial, sans-serif !important;
9            }
10          `,d.head.appendChild(x),d}};W(s.current,o).catch(d=>{console.error("Erro ao gerar imagem do certificado:",d);const n={cacheBust:!1,skipFonts:!0,backgroundColor:"#ffffff",quality:.8};return W(s.current,n)}).then(d=>{if(!d)throw new Error("Falha ao gerar imagem do certificado");console.log(d),Na.uploadImageBase64("certificados/",d.split("data:image/png;base64,")[1],"png").then(n=>{var x;console.log("url:",n),t.dataService.createWithID("certificadovalidate",t.docId,{url:n,metadados:{ownerid:t.currentUser&&t.currentUser.uid?t.currentUser.uid:"",owner:t.currentUser&&t.currentUser.displayName?t.currentUser.displayName:"",creation:b.fromDate(new Date),date:b.fromDate(new Date),successorId:"",version:0,active:!0}}).catch(m=>{console.log(m)}),t.dataService.updateObjectInsideCollection("praticantes",a.vinculo.idEntidade,"documentos",{idDocumento:"",tipo:"9",numero:"",descricao:(x=a.dadosCertificacao)!=null&&x.graduacao&&!isNaN(a.dadosCertificacao.graduacao)?`Diploma CBTKD - ${a.dadosCertificacao.graduacao-10}
10º DAN`:"Diploma CBTKD - Graduação não identificada",dataEmissao:p(new Date,"Date",""),dataValidade:"",orgaoEmissor:"CBTKD",urlFrente:n,urlVerso:""}).then(()=>{console.log("✅ Imagem com fundo salva com sucesso!"),y(!0),g(!1),document.getElementById(`CollapseFinanceiroDetalhes-${t.indxDoc}`).classList.remove("show"),u()}).catch(m=>{console.log(m),t.setError(m.message),g(!1),u()})})}).catch(d=>{console.log(d),t.setError(d.message),g(!1),u()})},1e3)},T=()=>{switch(f.current){case 11:return i.current>=9?"Idade mínima de 9 anos atendida. Possui "+i.current+" anos de idade.":"Não atende a idade mínima necessária, possui "+i.current+" anos de idade, precisa ter pelo menos 9 anos de idade";case 12:return i.current>=10?"Idade mínima de 10 anos atendida. Possui "+i.current+" anos de idade.":"Não atende a idade mínima necessária, possui "+i.current+" anos de idade, precisa ter pelo menos 10 anos de idade";case 13:return i.current>=12?"Idade mínima de 12 anos atendida. Possui "+i.current+" anos de idade.":"Não atende a idade mínima necessária, possui "+i.current+" anos de idade, precisa ter pelo menos 12 anos de idade";case 14:return i.current>=18?"Idade mínima de 18 anos atendida. Possui "+i.current+" anos de idade.":"Não atende a idade mínima necessária, possui "+i.current+" anos de idade, precisa ter pelo menos 18 anos de idade";case 15:return i.current>=22?"Idade mínima de 22 anos atendida. Possui "+i.current+" anos de idade.":"Não atende a idade mínima necessária, possui "+i.current+" anos de idade, precisa ter pelo menos 22 anos de idade";case 16:return i.current>=30?"Idade mínima de 30 anos atendida. Possui "+i.current+" anos de idade.":"Não atende a idade mínima necessária, possui "+i.current+" anos de idade, precisa ter pelo menos 30 anos de idade";case 17:return i.current>=40?"Idade mínima de 40 anos atendida. Possui "+i.current+" anos de idade.":"Não atende a idade mínima necessária, possui "+i.current+" anos de idade, precisa ter pelo menos 40 anos de idade";case 18:return i.current>=47?"Idade mínima de 47 anos atendida. Possui "+i.current+" anos de idade.":"Não atende a idade mínima necessária, possui "+i.current+" anos de idade, precisa ter pelo menos 47 anos de idade";case 19:return i.current>=55?"Idade mínima de 55 anos atendida. Possui "+i.current+" anos de idade.":"Não atende a idade mínima necessária, possui "+i.current+" anos de idade, precisa ter pelo menos 55 anos de idade";default:return""}},S=()=>{for(let s=l.current.length-1;s>=0;s--)if(l.current[s].data!==""&&l.current[s].aprovacaoConfederacao)return s>=10?new Date(w(new Date(l.current[s].data),(s+1-10)*365))<new Date?"Carência mínima atendida em "+k(w(new Date(l.current[s].data),(s+1-10)*365),"dd/MM/yyyy")+" ("+(s+1-10)+" anos após seu "+(s+1-10)+"º Dan).":"Não atende a carência mínima necessária, só será possível a partir de "+k(w(new Date(l.current[s].data),(s+1-10)*365),"dd/MM/yyyy")+" ("+(s+1-10)+" anos após seu "+(s+1-10)+"º Dan).":"Só podem ser registradas 4 passagens de faixas em um mesmo ano.";return""},ca=()=>{for(let s=l.current.length-1;s>=0;s--)if(l.current[s].data!==""&&l.current[s].aprovacaoConfederacao)return w(new Date(l.current[s].data),(s+1-10)*365);return 0},la=()=>{let s=f.current;if(s>10)return ca()<=new Date;{let r=new Date().getFullYear(),o=0;for(let d=0;d<s;d++)l.current[d].data!==""&&l.current[d].aprovacaoConfederacao&&new Date(l.current[d]).getFullYear()===r&&o++;return o<4}},ma=()=>{switch(f.current){case 11:return i.current>=9;case 12:return i.current>=10;case 13:return i.current>=12;case 14:return i.current>=18;case 15:return i.current>=22;case 16:return i.current>=30;case 17:return i.current>=40;case 18:return i.current>=47;case 19:return i.current>=55;default:return!0}};return a===void 0?e.jsx(c.Fragment,{children:e.jsx("div",{className:"col",children:"Carregando..."})}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"container-fluid ps-0 pe-0 padding-bottom-4px",children:e.jsx("div",{className:"",children:a&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"d-flex flex-row border-top col p-2 align-middle",style:{fontSize:"0.95em"},children:[e.jsx("div",{className:"col-auto sw hd-sm hd-md hd-lg hd-xl hd-xxl",style:{minWidth:"140px",maxWidth:"140px"},children:e.jsx("a",{href:`/sie/financeiro/addconta?id=${a.id}`,target:"_blank",rel:"noreferrer",children:a.dadosCertificacao!==void 0&&a.dadosCertificacao.dataEmissao!==void 0&&a.dadosCertificacao.dataEmissao!==""?e.jsx("span",{className:"badge bg-info",children:a.numero}):a.dadosCertificacao!==void 0&&a.dadosCertificacao.dataRecusa!==void 0&&a.dadosCertificacao.dataRecusa!==""?e.jsx("span",{className:"badge text-light bg-dark",children:a.numero}):a.pagamento.pago===!1?e.jsx("span",{className:"badge bg-danger",children:a.numero}):a.pagamento.pago===!0?e.jsx("span",{className:"badge bg-success",children:a.numero}):""})}),e.jsx("div",{className:"col-auto hd sw-sm sw-md sw-lg sw-xl sw-xxl",style:{minWidth:"140px",maxWidth:"140px"},children:e.jsx("a",{href:`/sie/financeiro/addconta?id=${a.id}`,target:"_blank",rel:"noreferrer",children:a.numero})}),e.jsx("div",{className:"col me-2",children:e.jsx("a",{href:`/sie/cadastros/addpraticante?id=${a.vinculo.idEntidade}`,target:"_blank",rel:"noreferrer",children:a.vinculo.name})}),e.jsx("div",{className:"col-2 hd hd-sm hd-md hd-lg",style:{minWidth:"140px",maxWidth:"140px"},children:p(a.pagamento.dataPagamento,"Date","")}),e.jsx("div",{className:"col hd hd-sm hd-md me-2",children:a.descricao}),e.jsx("div",{className:"col-2 col border-0 me-3 hd",style:{minWidth:"110px",maxWidth:"110px"},children:a.dadosCertificacao&&a.dadosCertificacao.dataEmissao!==void 0&&a.dadosCertificacao.dataEmissao!==""?e.jsxs("span",{className:"d-flex align-middle badge bg-info rounded-pill",style:{maxWidth:"80px"},title:"O pagamento da cobrança foi confirmado",children:[e.jsx("span",{className:"material-symbols-outlined",style:{fontSize:"1.25em"},children:"print"}),e.jsx("span",{className:"ms-1",style:{fontSize:"1em",paddingTop:"1px"},children:"Emitido"})]}):a.dadosCertificacao!==void 0&&a.dadosCertificacao.dataRecusa!==void 0&&a.dadosCertificacao.dataRecusa!==""?e.jsxs("span",{className:"d-flex align-middle badge text-light bg-dark rounded-pill",style:{maxWidth:"92px"},title:"O pagamento da cobrança foi confirmado",children:[e.jsx("span",{className:"material-symbols-outlined",style:{fontSize:"1.25em"},children:"cancel"}),e.jsx("span",{className:"ms-1",style:{fontSize:"1em",paddingTop:"1px"},children:"Recusado"})]}):a.pagamento.pago===!1?e.jsxs("span",{className:"d-flex align-middle badge bg-danger rounded-pill",style:{maxWidth:"106px"},title:"Cobrança aguardando o pagamento do recebedor",children:[e.jsx("span",{className:"material-symbols-outlined",style:{fontSize:"1.25em"},children:"schedule"}),e.jsx("span",{className:"ms-1",style:{fontSize:"1em",paddingTop:"1px"},children:"Aguardando"})]}):a.pagamento.pago===!0?e.jsxs("span",{className:"d-flex align-middle badge bg-success rounded-pill",style:{maxWidth:"64px"},title:"O pagamento da cobrança foi confirmado",children:[e.jsx("span",{className:"material-symbols-outlined",style:{fontSize:"1.25em"},children:"check_circle"}),e.jsx("span",{className:"ms-1",style:{fontSize:"1em",paddingTop:"1px"},children:"Pago"})]}):""}),e.jsx("div",{className:a.pagamento.pago?"d-none":"d-flex justify-content-end border-bottom-0 col-auto",children:e.jsxs("div",{className:"d-flex flex-row flex-nowrap align-middle pt-0 pb-0 mb-0 justify-content-center",style:{minWidth:"58px",marginRight:"42px"},children:[t.cobrancaForcarVerificacaoEnabled&&e.jsx("div",{className:"d-flex justify-content-end form-check form-switch ms-0 align-middle mt
10-0 mb-0 p-0",children:e.jsx("button",{className:"btn btn-sm p-0 mb-0 mt-1 rounded-circle hd hd-sm sw-md sw-lg sw-xl sw-xxl",type:"button",title:"Verificar situação da cobrança junto a empresa de cobranças.Esta verificação já é realizada automaticamente, mas pode ser forçada manualmente clicando aqui.",onClick:I,children:e.jsx("span",{className:"material-icons-outlined text-secondary rounded-circle btn-hover-lightgray p-2 mb-0",children:"sync"})})}),t.cobrancaAbonarEnabled&&e.jsx("div",{className:"d-flex justify-content-end form-check form-switch ms-0 align-middle mt-0 mb-0 p-0",children:e.jsx("button",{className:"btn btn-sm p-0 mb-0 mt-1 rounded-circle hd hd-sm sw-md sw-lg sw-xl sw-xxl",type:"button",title:"Abonar esta cobrança. Será necessário informar o motivo do abono.","data-bs-toggle":"modal","data-bs-target":`#inputDialogAbonarFatura${a.id}`,children:e.jsx("span",{className:"material-icons-outlined text-secondary rounded-circle btn-hover-lightgray p-2 mb-0",children:"attach_money"})})}),!a.pagamento.pago&&e.jsxs("button",{className:"btn btn-sm p-0 mb-0 mt-1 rounded-circle sw sw-sm hd-md hd-lg hd-xl hd-xxl",type:"button",id:"dropdownMenuReference2","data-bs-toggle":"dropdown","aria-expanded":"false","data-bs-reference":"parent",children:[e.jsx("span",{className:"material-icons-outlined text-secondary rounded-circle btn-hover-lightgray p-2 mb-0",children:"more_vert"}),e.jsx("span",{className:"visually-hidden",children:"Toggle Dropdown"})]}),e.jsxs("ul",{className:"dropdown-menu","aria-labelledby":"dropdownMenuReference2",children:[t.cobrancaForcarVerificacaoEnabled&&e.jsx("li",{children:e.jsx("button",{className:"btn dropdown-item",type:"button",title:"Verificar situação da cobrança junto a empresa de cobranças.Esta verificação já é realizada automaticamente, mas pode ser forçada manualmente clicando aqui.",onClick:I,children:e.jsx("span",{children:"Verificar situação desta cobrança"})})}),t.cobrancaAbonarEnabled&&e.jsx("li",{children:e.jsx("button",{className:"btn dropdown-item",type:"button",title:"Abonar esta cobrança. Será necessário informar o motivo do abono.","data-bs-toggle":"modal","data-bs-target":`#inputDialogAbonarFatura${a.id}`,children:e.jsx("span",{children:"Abonar esta cobrança"})})})]})]})}),e.jsx("div",{className:a.pagamento.pago?"d-flex justify-content-end border-bottom-0 col-auto":"d-none",children:e.jsx("div",{className:"d-flex flex-row flex-nowrap align-middle pt-0 pb-0 mb-0 justify-content-end",style:{minWidth:"100px"},children:e.jsxs("div",{className:"d-flex justify-content-end form-check form-switch ms-0 align-middle mt
10-0 mb-0 p-0",children:[(()=>{a.dadosCertificacao;const s=!!(a.dadosCertificacao&&a.dadosCertificacao.dataEmissao),r=!!(a.dadosCertificacao&&a.dadosCertificacao.dataRecusa),o=t.isPrintCertification?t.isPrintCertification(a):!1,d=t.printCertificationEnabled?t.printCertificationEnabled():!1;return(s||!s&&!r)&&o&&d?e.jsxs("button",{className:"btn btn-sm p-0 mb-0 mt-1 rounded-circle",type:"button",title:s?"Reimprimir certificação":"Aprovar e imprimir certificação",onClick:R,children:[e.jsx("span",{className:"material-icons-outlined text-secondary rounded-circle btn-hover-lightgray p-2 mb-0",children:"print"}),e.jsx("span",{className:"visually-hidden",children:"Toggle Dropdown"})]}):null})(),e.jsx("button",{id:`btnDetalhes-${t.indxDoc}`,className:a.pagamento!==void 0&&a.pagamento.pago?"btn btn-sm ms-2 p-0 mb-0 mt-1 rounded-circle":"d-none",style:{padding:"6px 8px 0px 6px!important"},type:"button","data-bs-toggle":"collapse","data-bs-target":`#CollapseFinanceiroDetalhes-${t.indxDoc}`,"aria-expanded":"false","aria-controls":`CollapseFinanceiroDetalhes-${t.indxDoc}`,"data-toggle":"tooltip","data-placement":"top",title:"Exibir detalhes",children:e.jsx("span",{className:"material-icons-outlined text-secondary rounded-circle btn-hover-lightgray p-2 mb-0",children:"expand_more"})})]})})})]}),e.jsxs("div",{className:"border-top-0 collapse p-0 m-0 bg-light",id:`CollapseFinanceiroDetalhes-${t.indxDoc}`,children:[e.jsx("div",{className:"m-0 p-0 pt-2 ps-2 pe-2 bg-light border",children:e.jsxs("div",{className:"d-flex flex-column flex-wrap p-2 pb-3",children:[e.jsxs("div",{className:"d-flex flex-row flex-wrap m-0 col border-0 gap-3",children:[e.jsx("div",{className:"d-flex flex-column flex-wrap card flex-fill",style:{minHeight:"150px"},children:e.jsxs("div",{className:"card-body",children:[e.jsx("h5",{className:"card-title",children:"Detalhes"}),e.jsxs("p",{className:"card-text",children:[e.jsx("span",{className:"sw sw-sm sw-md hd-lg hd-xl hd-xxl",children:`Serviço: ${a.descricao}`}),e.jsxs("span",{children:["Número da cobrança: ",a.bolixInfo!==void 0&&a.bolixInfo.boleto!==void 0&&a.bolixInfo.boleto!==""?e.jsx("a",{href:a.bolixInfo.boleto,target:"_blank",rel:"noreferrer",children:a.numeroDocumento}):a.numeroDocumento]}),e.jsx("span",{className:"sw sw-sm sw-md sw-lg hd-xl hd-xxl",children:`Data do pagamento: ${p(a.pagamento.dataPagamento,"Date","")}`}),a.dadosCertificacao!==void 0&&(a.dadosCertificacao.dataEmissao!==void 0&&a.dadosCertificacao.dataEmissao!==""||a.dadosCertificacao.dataRecusa!==void 0&&a.dadosCertificacao.dataRecusa!=="")&&e.jsxs("span",{children:[e.jsxs("span",{className:a.dadosCertificacao!==void 0&&a.dadosCertificacao.dataRecusa!==void 0&&a.dadosCertificacao.dataRecusa!==""?"d-none":"",children:[e.jsx("br",{className:"hd hd-sm hd-md hd-lg sw-xl sw-xxl"}),"Número: ",a.dadosCertificacao!==void 0&&a.dadosCertificacao.numero!==void 0&&a.dadosCertificacao.numero]}),e.jsxs("span",{className:a.dadosCertificacao!==void 0&&a.dadosCertificacao.dataRecusa!==void 0&&a.dadosCertificacao.dataRecusa!==""?"d-none":"",children:[e.jsx("br",{className:"hd hd-sm hd-md hd-lg sw-xl sw-xxl"}),"Data de validade: ",a.dadosCertificacao!==void 0&&a.dadosCertificacao.dataEmissao!==void 0&&a.dadosCertificacao.dataEmissao!==""&&p(a.dadosCertificacao.dataEmissao,"Date","")]}),e.jsxs("span",{className:"col border-0",children:[e.jsx("br",{className:"hd hd-sm hd-md hd-lg sw-xl sw-xxl"}),"Observação: ",a.observacao]})]})]})]})}),e.jsxs("div",{className:"card",style:{minWidth:"22rem",maxWidth:"22rem"},children:[a.dadosExtra.foto!==void 0&&a.dadosExtra.foto!==""?e.jsx("img",{src:a.dadosExtra.foto,className:"ard-img-top rounded-top",alt:"",onClick:()=>M(document,a.vinculo.name,a.dadosExtra.foto," - foto ID.jpg"),style:{cursor:"pointer"}}):e.jsx("span",{className:"material-symbols-outlined rounded-top w-100 text-center",style:{fontSize:"300
10px"},children:"block"}),e.jsxs("div",{className:"card-body",children:[a.dadosExtra.foto!==void 0&&a.dadosExtra.foto!==""&&e.jsx("div",{children:e.jsx("span",{className:"material-symbols-outlined bg-white border-0 p-1 float-end",style:{fontSize:"1.25em",transform:"translate(12px, -48px)",borderRadius:"50%",cursor:"pointer",minWidth:"28px",maxWidth:"28px"},onClick:()=>M(document,a.vinculo.name,a.dadosExtra.foto," - foto ID.jpg"),children:"download"})}),e.jsxs("h5",{className:"card-title",children:[a.vinculo.name,e.jsxs("button",{title:"Copiar nome",type:"button",className:"btn btn-link rounded-circle p-0 mt-0 ms-1 position-relative",onClick:()=>N(a.vinculo.name,L),children:[e.jsx("span",{className:"material-symbols-outlined",children:"content_copy"}),z&&e.jsx("span",{className:"position-absolute top-0 start-100 translate-middle badge rounded-pill bg-success",style:{fontSize:"xx-small",marginLeft:"25px"},children:"Copiado!"})]})]}),e.jsxs("p",{className:"card-text",children:["Data de nascimento:"," ",a.dadosExtra.birthdate!==""&&p(a.dadosExtra.birthdate,"Date",""),e.jsxs("button",{title:"Copiar data de nascimento",type:"button",className:"btn btn-link rounded-circle p-0 mt-0 ms-1 position-relative",onClick:()=>ga(a.dadosExtra.birthdate,H),children:[e.jsx("span",{className:"material-symbols-outlined",children:"content_copy"}),U&&e.jsx("span",{className:"position-absolute top-0 start-100 translate-middle badge rounded-pill bg-success",style:{fontSize:"xx-small",marginLeft:"25px"},children:"Copiado!"})]}),e.jsx("br",{}),"Federação:"," ",a.dadosExtra.federacao!==""&&a.dadosExtra.federacao,e.jsxs("button",{title:"Copiar federação",type:"button",className:"btn btn-link rounded-circle p-0 mt-0 ms-1 position-relative",onClick:()=>N(a.dadosExtra.federacao,V),children:[e.jsx("span",{className:"material-symbols-outlined",children:"content_copy"}),K&&e.jsx("span",{className:"position-absolute top-0 start-100 translate-middle badge rounded-pill bg-success",style:{fontSize:"xx-small",marginLeft:"25px"},children:"Copiado!"})]}),e.jsx("br",{}),"Graduação atual:"," ",a.dadosExtra.graduacao?a.dadosExtra.graduacao:"",a.dadosExtra.graduacaoDate!=="",e.jsxs("button",{title:"Copiar a graduação atual",type:"button",className:"btn btn-link rounded-circle p-0 mt-0 ms-1 position-relative",onClick:()=>N(a.dadosExtra.graduacao,Y),children:[e.jsx("span",{className:"material-symbols-outlined",children:"content_copy"}),q&&e.jsx("span",{className:"position-absolute top-0 start-100 translate-middle badge rounded-pill bg-success",style:{fontSize:"xx-small",marginLeft:"25px"},children:"Copiado!"})]}),e.jsx("br",{}),"E-mail:"," ",a.dadosExtra.email!==""&&e.jsx("a",{href:`mailto://${a.dadosExtra.email}`,target:"_blank",rel:"noreferrer",children:a.dadosExtra.email}),e.jsxs("button",{title:"Copiar e-mail",type:"button",className:"btn btn-link rounded-circle p-0 mt-0 ms-1 position-relative",onClick:()=>N(a.dadosExtra.email,Q),children:[e.jsx("span",{className:"material-symbols-outlined",children:"content_copy"}),J&&e.jsx("span",{className:"position-absolute top-0 start-100 translate-middle badge rounded-pill bg-success",style:{fontSize:"xx-small",marginLeft:"25px"},children:"Copiado!"})]})]})]})]}),e.jsx("div",{className:"d-flex flex-column flex-wrap card flex-fill p-2 pb-0",style:{minHeight:"150px"},children:e.jsx(pa,{id:"documentos",name:a.vinculo.name?a.vinculo.name:"",dados:a.documentos,create:!1,delete:!1})})]}),e.jsxs("div",{className:"d-flex flex-column flex-wrap m-0 col border-0",children:[e.jsxs("div",{className:(a.dadosCertificacao===void 0||a.dadosCertificacao!==void 0&&(a.dadosCertificacao.dataEmissao===void 0||a.dadosCertificacao.dataEmissao==="")&&(a.dadosCertificacao.dataRecusa===void 0||a.dadosCertificacao.dataRecusa===""))&&a.pagamento!==void 0&&a.pagamento.pago?"border-0 mt-2":"d-none",children:[e.jsx("div",{className:"col border-0 mt-2",children:e.jsx("div",{className:"col",children:e.jsxs("div",{className:"alert alert-info d-flex align-items-center",role:"alert",children:[e.jsx("span",{className:"material-icons-outlined me-2",children:"info"}),e.jsxs("div",{children:["Para aprovar esta certificação, preencha os campos abaixo e clique em [Aprovar].",e.jsx("br",{}),"Para recusar esta certificação, preencha o campo de observação com sua justificativa e clique em [Recusar]."]})]})})}),e.jsx("div",{className:"col border-0",children:e.jsx(ua,{id:"observacao",value:a.observacao,onChange:ra,type:"text",className:"form-control form-input middlePosition inputBox",placeholder:"Observação",disabled:a.situacao==="Emitido"||a.situacao==="Recusado",noAnimation:!0})}),f.current<a.dadosCertificacao.graduacao&&e.jsx("div",{className:"row",children:e.jsx("div",{className:"col mt-2",children:!la()&&f.current<a.dadosCertificacao.graduacao?e.jsxs("div",{className:"alert alert-danger d-flex align-items-center",role:"alert",children:[e.jsx("span",{className:"material-icons-outlined me-2",children:"cancel"}),e.jsx("div",{className:"d-flow-column",children:e.jsx("div",{children:`${S()}`})})]}):e.jsxs("div",{className:"alert alert-success d-flex align-items-center",role:"alert",children:[e.jsx("span",{className:"material-icons-outlined me-2",children:"task_alt"}),e.jsx("div",{className:"d-flow-column",children:e.jsx("div",{children:`${S()}`})})]})})}),f.current<a.dadosCertificacao.graduacao&&e.jsx("div",{className:"row",children:e.jsx("div",{className:"col mt-2",children:!ma()&&f.current<a.dadosCertificacao.graduacao?e.jsxs("div",{className:"alert alert-danger d-flex align-items-center",role:"alert",children:[e.jsx("span",{className:"material-icons-outlined me-2",children:"cancel"}),e.jsx("div",{className:"d-flow-column",children:e.jsx("div",{children:`${T()}`})})]}):e.jsxs("div",{className:"alert alert-success d-flex align-items-center",role:"alert",children:[e.jsx("span",{className:"material-icons-outlined me-2",children:"task_alt"}),e.jsx("div",{className:"d-flow-column",children:e.jsx("div",{children:`${T()}`})})]})})})]}),e.jsx("div",{className:(a.dadosCertificacao===void 0||a.dadosCertificacao!==void 0&&(a.dadosCertificacao.dataEmissao===void 0||a.dadosCertificacao.dataEmissao==="")&&(a.dadosCertificacao.dataRecusa===void 0||a.dadosCertificacao.dataRecusa===""))&&a.pagamento!==void 0&&a.pagamento.pago?"border-0":"d-none",children:e.jsx("div",{className:"col border-0",children:e.jsxs("div",{className:"modal-footer d-flex flex-row justify-content-right mt-0 p-2 pb-0",style:{gap:"10px"},children:[e.jsx("button",{id:"btnImprimir",type:"button",className:"btn btn-primary ps-4 pe-4 mt-2",onClick:da,"aria-label":"Imprimir",children:a.dadosCertificacao.fazerEmissao?"Aprovar e Imprimir":"Aprovar"}),e.jsx("button",{id:"btnRecusar",type:"button",className:"btn btn-danger ps-4 pe-4 mt-2",onClick:ta,"aria-label":"Recusar",children:"Recusar"})]})})})]})]})}),X&&e.jsx("div",{className:"col-auto fs-4 text-muted p-0",id:"report",ref:v,style:{minHeight:"984px",maxHeight:"984px",minWidth:"1392px",maxWidth:"1392px"},children:e.jsx(ba,{doc:a,docId:t.docId,indxGraduacaoAlvo:a.dadosExtra.graduacao,noBackgroun
10d:Z,forceRender:!0})})]})]})})}),e.jsx(fa,{}),e.jsx(xa,{deleteData:t.handleDialogExcluir}),e.jsx(Da,{id:`inputDialogAbonarFatura${a.id}`,title:"Abono de cobrança",placeholder:"Informe o motivo deste abono",defaulValue:"",handleMethod:ia})]})}export{le as default};
11//# sourceMappingURL=DetalhesRegistroCBTKD-e0495ab3.js.map

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.