PageSourceSearch

https://soloncloud.web.app/_nuxt/EZUWy8Nz.js

js soloncloud.web.app collected 2026-10-03 12:38:05 UTC 4,004 bytes, 1 lines download raw bytes

1import{d as k,r as g,B as D,o as d,c as p,e as s,a,w as o,_ as I,p as P,b as h,u as m,t as b,n as V,h as w,G as T,m as O}from"./CI1C_uXz.js";import{_ as E}from"./CM-NhgdL.js";import{_ as B}from"./CMU0AGGZ.js";import{_ as U}from"./N1sdYELR.js";import{u as $}from"./B4aWTkcP.js";import"./DB_vzzlN.js";import"./Cl7DE2nn.js";import"./DlAUqK2U.js";import"./DpJYn9EV.js";import"./BeXiswin.js";import"./BGeNPtnh.js";import"./CZ0FPn8Y.js";import"./DdRZOEPx.js";import"./Co_r7hZX.js";import"./BOeXJ-Be.js";const G={class:"flex items-center justify-between"},z=s("p",{class:"text-gray-600 mt-1"}," Candidatos encontrados pela busca automática diária. Aprove pra publicar na tela de Captações, ou edite antes de aprovar caso algum dado precise de ajuste. ",-1),F=["title"],L=["href"],Y={key:1},S={class:"flex gap-2 justify-start"},J={key:0,class:"text-center py-10 text-gray-500"},le=k({__name:"pending",setup(Z){const{$swal:n}=O(),u=$(),i=g([]),r=g(!1);async function _(){r.value=!0;try{const e=await u.getPending();i.value=Array.isArray(e)?e:[]}catch(e){console.error("Erro ao carregar oportunidades pendentes:",e),i.value=[]}finally{r.value=!1}}_();const v=[{title:"Nome",indexValue:"NM_PROGRAMA"},{title:"Concedente extraído",indexValue:"NM_CONCEDENTE"},{title:"Natureza jurídica",indexValue:"NATUREZA_JURIDICA"},{title:"Categoria",indexValue:"TIPO"},{title:"Prazo",indexValue:"DT_FIM"},{title:"Fonte",indexValue:"URL"},{title:"Ações",indexValue:"actions"}],y={"Administração Pública Municipal":"bg-blue-100 text-blue-700","Organização da Sociedade Civil":"bg-purple-100 text-purple-700","Consórcio Público":"bg-amber-100 text-amber-700"},A=D(()=>i.value.map(e=>({...e,DT_FIM:e.DT_FIM?T.utc(e.DT_FIM).format("DD/MM/YYYY"):"Não informado"})));async function C(e){try{await u.review(e,"approve"),n.success({title:"Aprovado!",text:"A oportunidade já aparece na tela de captações."}),_()}catch{n.error({text:"Não foi possível aprovar essa oportunidade."})}}function R(e){n.confirmRemove({text:"A oportunidade será rejeitada e essa URL nunca mais será sugerida de novo.",input:"textarea",inputPlaceholder:"Motivo (opcional)",confirmButtonText:"Rejeitar"}).then(async c=>{if(c.isConfirmed)try{await u.review(e,"reject",c.value),n.success({title:"Rejeitado",text:"A oportunidade foi removida da fila."}),_()}catch{n.error({text:"Não foi possível rejeitar essa oportunidade."})}})}return(e,c)=>{const x=I,l=E,f=P,N=B,M=U;return d(),p("div",null,[s("div",G,[a(x,{variant:"title"},{default:o(()=>[h(" Oportunidades pendentes de revisão ")]),_:1}),a(f,{to:"/admin/programs/history"},{default:o(()=>[a(l,{"btn-class":"btn-outline-light"},{default:o(()=>[h("Ver histórico de curadoria")]),_:1})]),_:1})]),z,a(M,{class:"mt-5","body-class":"p-0"},{default:o(()=>[a(N,{columns:v,items:m(A),loading:m(r),responsive:"",striped:""},{NM_PROGRAMA:o(({value:t})=>[s("span",{class:"font-semibold line-clamp-2",title:t},b(t),9,F)]),NATUREZA_JURIDICA:o(({value:t})=>[s("span",{class:V(["inline-block px-2 py-1 rounded-md text-xs font-semibold whitespace-nowrap",y[t]||"bg-gray-100 text-gray-700"])},b(t),3)]),URL:o(({value:t})=>[t?(d(),p("a",{key:0,href:t,target:"_blank",class:"text-primary-600 underline"}," Ver fonte ",8,L)):(d(),p("span",Y,"N/A"))]),actions:o(({record:t})=>[s("div",S,[a(l,{title:"Aprovar","btn-class":"bg-primary-500 text-white text-sm py-2",icon:"heroicons:check","icon-class":"text-xl",onClick:j=>C(t.ID_PROGRAMA)},null,8,["onClick"]),a(f,{to:`/admin/programs/${t.ID_PROGRAMA}-edit`},{default:o(()=>[a(l,{title:"Editar antes de aprovar","btn-class":"btn-outline-light text-sm py-2",icon:"heroicons:pencil-square","icon-class":"text-xl"})]),_:2},1032,["to"]),a(l,{title:"Rejeitar","btn-class":"btn-outline-danger text-sm py-2",icon:"heroicons:trash","icon-class":"text-xl",onClick:j=>R(t.ID_PROGRAMA)},null,8,["onClick"])])]),_:1},8,["items","loading"]),!m(r)&&m(i).length===0?(d(),p("div",J," Nenhuma oportunidade pendente no momento. ")):w("",!0)]),_:1})])}}});export{le as default};

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.