PageSourceSearch

https://cafarnaum.ba.gov.br/assets/EmendaParlamentarDetalhe-DKsk3aLX.js

js cafarnaum.ba.gov.br collected 2026-09-25 10:19:53 UTC 7,488 bytes, 1 lines download raw bytes

1import{u as v,j as e}from"./vendor-query-CAW0R6Fd.js";import{j as B,L as N}from"./vendor-react-BIBNHc4z.js";import{H as m,F as h,j as n,k as t,o as g,B as c,A as b,S as C,t as j,v as u,as as A,x as y,c as w,p as P,ao as S,D as q}from"./index-DxX8Lkqr.js";import{b as D,e as H}from"./emendas.service-DTq9V1JE.js";import{T as F,a as R,b as _,c as r,d as z,e as i}from"./table-DcAvJ9Te.js";import{a as I,S as $,f as x,d,i as E}from"./emendas-helpers-kBQtjaIx.js";import"./ui-radix-CMPBktV5.js";import"./utils-objBp_8x.js";function X(){const{id:l}=B(),{data:p=[]}=v({queryKey:["emendas","execucoes","public",l],queryFn:()=>D.listPublic(l),enabled:!!l}),{data:s,isLoading:L,isError:T}=v({queryKey:["emendas","public",l],queryFn:()=>H.getPublicById(l),enabled:!!l});if(L)return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[e.jsx(m,{}),e.jsx("main",{className:"flex-1 container mx-auto py-8 px-4",children:e.jsxs("div",{className:"max-w-4xl mx-auto space-y-4",children:[e.jsx("div",{className:"h-10 bg-muted animate-pulse rounded w-1/2"}),e.jsx("div",{className:"h-64 bg-muted animate-pulse rounded"})]})}),e.jsx(h,{})]});if(T||!s)return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[e.jsx(m,{}),e.jsx("main",{className:"flex-1 container mx-auto py-8 px-4",children:e.jsx("div",{className:"max-w-4xl mx-auto",children:e.jsx(n,{children:e.jsxs(t,{className:"flex flex-col items-center justify-center py-12",children:[e.jsx(g,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-semibold mb-1",children:"Emenda não encontrada"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Esta emenda pode ter sido removida ou não está disponível publicamente."}),e.jsx(c,{asChild:!0,variant:"outline",children:e.jsxs(N,{to:"/emendas-parlamentares",children:[e.jsx(b,{className:"h-4 w-4 mr-2"})," Voltar para a lista"]})})]})})})}),e.jsx(h,{})]});const f=Array.isArray(s.anexos)?s.anexos:[];return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[e.jsx(C,{title:`${s.titulo} | Emendas Parlamentares`,description:s.objeto||s.descricao||`Emenda parlamentar de ${s.parlamentar}`}),e.jsx(m,{}),e.jsx("main",{className:"flex-1 container mx-auto py-8 px-4",children:e.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[e.jsx(c,{asChild:!0,variant:"ghost",size:"sm",className:"-ml-2",children:e.jsxs(N,{to:"/emendas-parlamentares",children:[e.jsx(b,{className:"h-4 w-4 mr-2"})," Voltar"]})}),e.jsxs(n,{children:[e.jsx(j,{children:e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"space-y-2 min-w-0",children:[e.jsxs(u,{className:"text-3xl flex items-start gap-2",children:[e.jsx(A,{className:"h-7 w-7 text-primary mt-1 shrink-0"}),e.jsx("span",{children:s.titulo})]}),e.jsxs(y,{className:"text-base",children:[s.parlamentar,s.partido?` (${s.partido})`:""]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(w,{variant:"outline",children:I[s.esfera]}),e.jsx(w,{children:$[s.status]})]})]})}),e.jsxs(t,{className:"space-y-6",children:[s.descricao&&e.jsx("div",{className:"prose prose-sm max-w-none text-foreground",dangerouslySetInnerHTML:{__html:P.sanitize(s.descricao)}}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 text-sm",children:[s.numero&&e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground text-xs",children:"Número"}),e.jsx("div",{className:"font-medium",children:s.numero})]}),s.ano&&e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground text-xs",children:"Ano"}),e.jsx("div",{className:"font-medium",children:s.ano})]}),s.tipo_emenda&&e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground text-xs",children:"Tipo"}),e.jsx("div",{className:"font-medium",children:s.tipo_emenda})]}),s.area&&e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground text-xs",children:"Área"}),e.jsx("div",{className:"font-medium",children:s.area})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground text-xs",children:"Indicação"}),e.jsx("div",{className:"font-medium",children:x(s.data_indicacao)})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground text-xs",children:"Empenho"}),e.jsx("div",{className:"font-medium",children:x(s.data_empenho)})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground text-xs",children:"Pagamento"}),e.jsx("div",{className:"font-medium",children:x(s.data_pagamento)})]})]}),s.objeto&&e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold mb-1",children:"Objeto"}),e.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-line",children:s.objeto})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Indicado"}),e.jsx("div",{className:"text-lg font-semibold",children:d(s.valor_indicado)})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Empenhado"}),e.jsx("div",{className:"text-lg font-semibold",children:d(s.valor_empenhado)})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Liquidado"}),e.jsx("div",{className:"text-lg font-semibold",children:d(s.valor_liquidado)})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Pago"}),e.jsx("div",{className:"text-lg font-semibold",children:d(s.valor_pago)})]})]}),E(s.link_externo)&&e.jsx(c,{asChild:!0,variant:"outline",children:e.jsxs("a",{href:s.link_externo,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(S,{className:"h-4 w-4 mr-2"})," Acessar link externo"]})})]})]}),p.length>0&&e.jsxs(n,{children:[e.jsxs(j,{children:[e.jsx(u,{className:"text-lg",children:"Execução"}),e.jsx(y,{children:"Pagamentos realizados com recursos desta emenda."})]}),e.jsx(t,{children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs(F,{children:[e.jsx(R,{children:e.jsxs(_,{children:[e.jsx(r,{children:"Beneficiário"}),e.jsx(r,{children:"Despesa"}),e.jsx(r,{children:"Empenho"}),e.jsx(r,{children:"Empenhado"}),e.jsx(r,{children:"Liquidado"}),e.jsx(r,{children:"Pago"}),e.jsx(r,{children:"Pagamento"})]})}),e.jsx(z,{children:p.map(a=>e.jsxs(_,{children:[e.jsx(i,{className:"max-w-[180px] truncate",children:a.benef
1iciario}),e.jsx(i,{className:"max-w-[220px] truncate",children:a.descricao_despesa}),e.jsx(i,{children:a.numero_empenho}),e.jsx(i,{children:d(a.valor_empenhado)}),e.jsx(i,{children:d(a.valor_liquidado)}),e.jsx(i,{children:d(a.valor_pago)}),e.jsx(i,{children:x(a.data_pagamento)})]},a.id))})]})})})]}),f.length>0&&e.jsxs(n,{children:[e.jsx(j,{children:e.jsx(u,{className:"text-lg",children:"Documentos anexos"})}),e.jsx(t,{children:e.jsx("ul",{className:"divide-y",children:f.map((a,k)=>{const o=(a==null?void 0:a.url)||"";return E(o)||o.startsWith("/")?e.jsxs("li",{className:"py-3 flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0 flex items-center gap-2",children:[e.jsx(g,{className:"h-4 w-4 text-muted-foreground shrink-0"}),e.jsx("span",{className:"truncate text-sm",children:(a==null?void 0:a.titulo)||(a==null?void 0:a.nome)||"Documento"})]}),e.jsx(c,{asChild:!0,variant:"outline",size:"sm",children:e.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(q,{className:"h-4 w-4 mr-2"})," Baixar"]})})]},k):null})})})]})]})}),e.jsx(h,{})]})}export{X 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.