PageSourceSearch

https://craibas.al.gov.br/build/assets/Index-o74PuStb.js

js craibas.al.gov.br collected 2026-10-02 23:55:40 UTC 12,475 bytes, 1 lines download raw bytes

1import{c as we,u as ye,r as me,j as t,b as P,H as De}from"./app-CTaY8UJf.js";import{P as Se}from"./PaginationFixed-iLESiNIA.js";import{B as o}from"./button-DXCKLHtj.js";import{D as fe,a as ue,b as be,c as ge,d as je,e as Ne}from"./dialog-BKzHwCpL.js";import{D as Ce,a as Le,b as Te,c as xe}from"./dropdown-menu-D6OZoFra.js";import{I as Ee}from"./input-7aHhCeCr.js";import{L as Me}from"./label-CxCrcTSv.js";import{T as pe,a as O,b as Ae,c as ae,d as Be,e as Oe}from"./table-Cb1Hol7G.js";import{A as Pe}from"./AppLayoutWithNotifications-mus8tTbI.js";import _e from"./file-text-jraIksbC.js";import Fe from"./ellipsis-DmaWUrvi.js";import $e from"./eye-BixEHFrD.js";import He from"./pencil-TRb729mG.js";import Re from"./trash-2-QtamTJOn.js";import{S as qe}from"./shield-check-CXJJ4XEh.js";import Ie from"./plus-BsfGhhT4.js";import ze from"./search-BOJp92ky.js";import Ve from"./x-DmP7A1Bz.js";import"./app-CNmQMdEi.js";import"./index-sraz7nLe.js";import"./index-CsfSsVkk.js";import"./index-Svmmcv6D.js";import"./index-DXg2b8Vm.js";import"./index-CJBlix5Q.js";import"./index-DHUBBKJC.js";import"./index-msf3AG1t.js";import"./index-fQ3brVpV.js";import"./circle-alert-CTn79Wf8.js";import"./createLucideIcon-CmjF8lT1.js";import"./circle-x-VMcb1sXz.js";import"./circle-check-big-0QGs7tCc.js";import"./app-layout-DHg6PkRO.js";import"./index-BE_AIKwc.js";import"./video-CWkR2iFG.js";import"./chevron-right-Dcl2lTY9.js";import"./avatar-BRFzpAWX.js";import"./index-BGC6_Qsa.js";import"./index-C_SHgnPd.js";import"./layers-Cb0hKdx0.js";import"./file-check-tR1YCl9R.js";import"./message-square-BtERmk2L.js";import"./users-BYuco8Ea.js";import"./trending-up-CsQX3MuM.js";import"./handshake-ppgb6oUe.js";import"./calendar-CEIt2YqY.js";import"./trending-down-B7TczfdV.js";import"./building-BaJqVYxM.js";import"./list-Dehc_B-t.js";import"./activity-D1Ey-wIS.js";import"./breadcrumbs-ByKSkPWt.js";const B="/portal/admin/lei-organica";function It(){const e=we.c(89),{items:s,filters:ke,flash:F}=ye().props,[r,he]=me.useState(ke.nome??""),[a,re]=me.useState(null),[i,$]=me.useState(null),H=F?.message_success??F?.success,R=F?.message_error??F?.error;let q;e[0]!==r?(q=()=>{P.get(B,{nome:r||void 0},{preserveState:!0,replace:!0})},e[0]=r,e[1]=q):q=e[1];const n=q;let I;e[2]===Symbol.for("react.memo_cache_sentinel")?(I=()=>{he(""),P.get(B)},e[2]=I):I=e[2];const ve=I;let z;e[3]!==i?(z=()=>{i&&P.delete(`${B}/${i.id}`,{onSuccess:()=>$(null)})},e[3]=i,e[4]=z):z=e[4];const oe=z;let V;e[5]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(De,{title:"Lei Orgânica Municipal - Admin"}),e[5]=V):V=e[5];let K;e[6]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsxs("div",{children:[t.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full bg-slate-100 px-3 py-1 text-xs font-bold text-slate-700 dark:bg-slate-800 dark:text-slate-300",children:[t.jsx(qe,{className:"h-3.5 w-3.5"}),t.jsx("span",{children:"Legislação Municipal • Lei Maior"})]}),t.jsx("h1",{className:"mt-2 text-2xl font-black tracking-tight text-slate-900 dark:text-white sm:text-3xl",children:"Lei Orgânica Municipal"}),t.jsx("p",{className:"mt-1 text-xs text-slate-500 dark:text-slate-400 sm:text-sm",children:"Publicações, emendas e versões consolidadas da Lei Orgânica do Município."})]}),e[6]=K):K=e[6];let U;e[7]===Symbol.for("react.memo_cache_sentinel")?(U=t.jsxs("div",{className:"flex flex-col justify-between gap-4 md:flex-row md:items-center",children:[K,t.jsxs(o,{onClick:Ke,className:"rounded-xl text-xs font-bold shadow-md transition hover:scale-105",children:[t.jsx(Ie,{className:"mr-1.5 h-4 w-4"}),"Novo Documento"]})]}),e[7]=U):U=e[7];let c;e[8]!==H?(c=H&&t.jsx("div",{className:"rounded-2xl border border-emerald-200 bg-emerald-50 p-4 text-xs font-semibold text-emerald-900 dark:border-emerald-900/50 dark:bg-emerald-950/40 dark:text-emerald-300",children:H}),e[8]=H,e[9]=c):c=e[9];let d;e[10]!==R?(d=R&&t.jsx("div",{className:"rounded-2xl border border-rose-200 bg-rose-50 p-4 text-xs font-semibold text-rose-900 dark:border-rose-900/50 dark:bg-rose-950/40 dark:text-rose-300",children:R}),e[10]=R,e[11]=d):d=e[11];let W;e[12]===Symbol.for("react.memo_cache_sentinel")?(W=t.jsx(Me,{htmlFor:"nome",className:"text-xs font-bold text-slate-700 dark:text-slate-300",children:"Título / Nome do Documento"}),e[12]=W):W=e[12];let X;e[13]===Symbol.for("react.memo_cache_sentinel")?(X=l=>he(l.target.value),e[13]=X):X=e[13];let m;e[14]!==n?(m=l=>l.key==="Enter"&&n(),e[14]=n,e[15]=m):m=e[15];let x;e[16]!==r||e[17]!==m?(x=t.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:t.jsxs("div",{className:"space-y-1.5 md:col-span-2",children:[W,t.jsx(Ee,{id:"nome",value:r,onChange:X,onKeyDown:m,placeholder:"Buscar por título ou descrição...",className:"h-10 rounded-xl border-slate-200 bg-slate-50 text-xs shadow-xs dark:border-slate-800 dark:bg-slate-800"})]})}),e[16]=r,e[17]=m,e[18]=x):x=e[18];let G;e[19]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx(ze,{className:"mr-1.5 h-3.5 w-3.5"}),e[19]=G):G=e[19];let p;e[20]!==n?(p=t.jsxs(o,{onClick:n,className:"rounded-xl h-10 text-xs font-bold shadow-xs",children:[G,"Buscar"]}),e[20]=n,e[21]=p):p=e[21];let h;e[22]!==r?(h=r&&t.jsxs(o,{variant:"outline",onClick:ve,className:"rounded-xl h-10 text-xs font-semibold",children:[t.jsx(Ve,{className:"mr-1.5 h-3.5 w-3.5"}),"Limpar"]}),e[22]=r,e[23]=h):h=e[23];let f;e[24]!==p||e[25]!==h?(f=t.jsxs("div",{className:"mt-4 flex gap-2",children:[p,h]}),e[24]=p,e[25]=h,e[26]=f):f=e[26];let u;e[27]!==x||e[28]!==f?(u=t.jsxs("div",{className:"rounded-3xl border border-slate-200/80 bg-white p-6 shadow-xs dark:border-slate-800 dark:bg-slate-900",children:[x,f]}),e[27]=x,e[28]=f,e[29]=u):u=e[29];let J;e[30]===Symbol.for("react.memo_cache_sentinel")?(J=t.jsx("h3",{className:"text-base font-extrabold text-slate-900 dark:text-white",children:"Documentos da Lei Orgânica"}),e[30]=J):J=e[30];let b;e[31]!==s.total?(b=t.jsx("div",{className:"flex items-center justify-between border-b border-slate-100 p-6 dark:border-slate-800",children:t.jsxs("div",{children:[J,t.jsxs("p",{className:"text-xs text-slate-500",children:["Total de ",s.total," arquivos cadastrados"]})]})}),e[31]=s.total,e[32]=b):b=e[32];let Q;e[33]===Symbol.for("react.memo_cache_sentinel")?(Q=t.jsx(Ae,{className:"bg-slate-50 dark:bg-slate-800/50",children:t.jsxs(pe,{className:"border-b border-slate-100 dar
1k:border-slate-800",children:[t.jsx(ae,{className:"text-[11px] font-bold text-slate-500 uppercase",children:"Nome do Documento"}),t.jsx(ae,{className:"text-[11px] font-bold text-slate-500 uppercase",children:"Data de Cadastro"}),t.jsx(ae,{className:"text-[11px] font-bold text-slate-500 uppercase",children:"Arquivo"}),t.jsx(ae,{className:"w-24 text-right text-[11px] font-bold text-slate-500 uppercase",children:"Ações"})]})}),e[33]=Q):Q=e[33];let g;e[34]!==s.data?(g=s.data.length===0?t.jsx(pe,{children:t.jsx(O,{colSpan:4,className:"py-12 text-center text-slate-400",children:"Nenhum documento cadastrado."})}):s.data.map(l=>t.jsxs(pe,{className:"transition-colors hover:bg-slate-50/80 dark:hover:bg-slate-800/40",children:[t.jsx(O,{className:"font-extrabold text-slate-900 dark:text-white",children:l.nome}),t.jsx(O,{className:"text-slate-500 font-medium",children:l.created_at?new Date(l.created_at).toLocaleDateString("pt-BR"):"—"}),t.jsx(O,{children:l.documento_url?t.jsxs("a",{href:l.documento_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 text-xs font-bold text-blue-600 hover:underline",children:[t.jsx(_e,{className:"h-3.5 w-3.5"}),"Abrir PDF"]}):t.jsx("span",{className:"text-slate-400",children:"—"})}),t.jsx(O,{className:"text-right",children:t.jsxs(Ce,{children:[t.jsx(Le,{asChild:!0,children:t.jsx(o,{variant:"ghost",size:"sm",className:"h-8 w-8 rounded-lg p-0 text-slate-600 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-800",children:t.jsx(Fe,{className:"h-4 w-4"})})}),t.jsxs(Te,{align:"end",className:"rounded-2xl shadow-xl",children:[t.jsxs(xe,{onClick:()=>re(l),className:"text-xs font-semibold cursor-pointer",children:[t.jsx($e,{className:"mr-2 h-3.5 w-3.5 text-slate-500"}),"Ver detalhes"]}),t.jsxs(xe,{onClick:()=>P.get(`${B}/${l.id}/edit`),className:"text-xs font-semibold cursor-pointer",children:[t.jsx(He,{className:"mr-2 h-3.5 w-3.5 text-slate-500"}),"Editar"]}),t.jsxs(xe,{onClick:()=>$(l),className:"text-xs font-semibold text-rose-600 focus:text-rose-700 cursor-pointer",children:[t.jsx(Re,{className:"mr-2 h-3.5 w-3.5"}),"Excluir"]})]})]})})]},l.id)),e[34]=s.data,e[35]=g):g=e[35];let j;e[36]!==g?(j=t.jsx("div",{className:"overflow-x-auto",children:t.jsxs(Be,{children:[Q,t.jsx(Oe,{className:"divide-y divide-slate-100 dark:divide-slate-800 text-xs",children:g})]})}),e[36]=g,e[37]=j):j=e[37];let N;e[38]!==s.current_page||e[39]!==s.last_page||e[40]!==s.links||e[41]!==s.per_page||e[42]!==s.total?(N=t.jsx("div",{className:"p-4 border-t border-slate-100 dark:border-slate-800",children:t.jsx(Se,{current_page:s.current_page,last_page:s.last_page,per_page:s.per_page,total:s.total,links:s.links,baseUrl:B})}),e[38]=s.current_page,e[39]=s.last_page,e[40]=s.links,e[41]=s.per_page,e[42]=s.total,e[43]=N):N=e[43];let _;e[44]!==b||e[45]!==j||e[46]!==N?(_=t.jsxs("div",{className:"overflow-hidden rounded-3xl border border-slate-200/80 bg-white shadow-xs dark:border-slate-800 dark:bg-slate-900",children:[b,j,N]}),e[44]=b,e[45]=j,e[46]=N,e[47]=_):_=e[47];let k;e[48]!==u||e[49]!==_||e[50]!==c||e[51]!==d?(k=t.jsxs("div",{className:"container mx-auto max-w-7xl px-4 py-8 sm:px-6 lg:px-8 space-y-6",children:[U,c,d,u,_]}),e[48]=u,e[49]=_,e[50]=c,e[51]=d,e[52]=k):k=e[52];const ie=!!a;let Y;e[53]===Symbol.for("react.memo_cache_sentinel")?(Y=()=>re(null),e[53]=Y):Y=e[53];const ne=a?.nome??"Documento";let v;e[54]!==ne?(v=t.jsx(fe,{className:"text-lg font-black text-slate-900 dark:text-white",children:ne}),e[54]=ne,e[55]=v):v=e[55];let w;e[56]!==a?(w=a?.created_at?new Date(a.created_at).toLocaleDateString("pt-BR"):"—",e[56]=a,e[57]=w):w=e[57];let y;e[58]!==w?(y=t.jsxs(ue,{className:"text-xs text-slate-500 pt-1",children:["Cadastrado em:"," ",w]}),e[58]=w,e[59]=y):y=e[59];let D;e[60]!==v||e[61]!==y?(D=t.jsxs(be,{children:[v,y]}),e[60]=v,e[61]=y,e[62]=D):D=e[62];let S;e[63]!==a?(S=a&&a.documento_url&&t.jsx("div",{className:"mt-4",children:t.jsxs("a",{href:a.documento_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-2 rounded-xl border border-blue-200 bg-blue-50/60 px-4 py-2.5 text-xs font-bold text-blue-700 hover:bg-blue-100 dar
1k:border-blue-900/40 dark:bg-blue-950/40 dark:text-blue-300",children:[t.jsx(_e,{className:"h-4 w-4"}),"Visualizar Arquivo da Lei Orgânica"]})}),e[63]=a,e[64]=S):S=e[64];let Z;e[65]===Symbol.for("react.memo_cache_sentinel")?(Z=t.jsx(ge,{className:"pt-4",children:t.jsx(o,{variant:"outline",className:"rounded-xl text-xs font-semibold",onClick:()=>re(null),children:"Fechar"})}),e[65]=Z):Z=e[65];let C;e[66]!==D||e[67]!==S?(C=t.jsxs(je,{className:"max-w-xl rounded-3xl p-6",children:[D,S,Z]}),e[66]=D,e[67]=S,e[68]=C):C=e[68];let L;e[69]!==ie||e[70]!==C?(L=t.jsx(Ne,{open:ie,onOpenChange:Y,children:C}),e[69]=ie,e[70]=C,e[71]=L):L=e[71];const ce=!!i;let ee;e[72]===Symbol.for("react.memo_cache_sentinel")?(ee=()=>$(null),e[72]=ee):ee=e[72];let te;e[73]===Symbol.for("react.memo_cache_sentinel")?(te=t.jsx(fe,{className:"text-lg font-black text-slate-900 dark:text-white",children:"Excluir Documento"}),e[73]=te):te=e[73];const de=i?.nome;let T;e[74]!==de?(T=t.jsxs(be,{children:[te,t.jsxs(ue,{className:"text-xs text-slate-500 pt-2",children:["Tem certeza que deseja excluir ",t.jsx("strong",{children:de}),"?"]})]}),e[74]=de,e[75]=T):T=e[75];let se;e[76]===Symbol.for("react.memo_cache_sentinel")?(se=t.jsx(o,{variant:"outline",className:"rounded-xl text-xs font-semibold",onClick:()=>$(null),children:"Cancelar"}),e[76]=se):se=e[76];let E;e[77]!==oe?(E=t.jsxs(ge,{className:"gap-2 pt-4",children:[se,t.jsx(o,{variant:"destructive",className:"rounded-xl text-xs font-bold",onClick:oe,children:"Excluir"})]}),e[77]=oe,e[78]=E):E=e[78];let M;e[79]!==T||e[80]!==E?(M=t.jsxs(je,{className:"max-w-md rounded-3xl p-6",children:[T,E]}),e[79]=T,e[80]=E,e[81]=M):M=e[81];let A;e[82]!==ce||e[83]!==M?(A=t.jsx(Ne,{open:ce,onOpenChange:ee,children:M}),e[82]=ce,e[83]=M,e[84]=A):A=e[84];let le;return e[85]!==k||e[86]!==L||e[87]!==A?(le=t.jsxs(Pe,{children:[V,k,L,A]}),e[85]=k,e[86]=L,e[87]=A,e[88]=le):le=e[88],le}function Ke(){return P.get(`${B}/create`)}export{It 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.