PageSourceSearch

https://riogallegos.gob.ar/build/assets/ActivityLogs-5RmgVfD8.js

js riogallegos.gob.ar collected 2026-09-25 06:11:28 UTC 4,611 bytes, 1 lines download raw bytes

1import{c as S,a as k,j as t,r as w,H as A,U as L,aa as R,L as B}from"./vendor-BEiifegs.js";import{A as D}from"./app-layout-C3VWiYz6.js";import{I as E}from"./input-7qhqwwXu.js";import{B as H}from"./button-CzWzRcks.js";import"./utils-Brt-rx33.js";import"./AccessibilityMenu-Cv6uCVhL.js";import"./app-Dqd_TtrX.js";import"./app-CeM2vtc2.js";import"./label-DY8Hb7PL.js";import"./index-BdkDokuX.js";function O(s){const e=S.c(26),{logs:r,filters:N}=s,[a,v]=k.useState(N.search||"");let m;e[0]!==a?(m=y=>{y.preventDefault(),w.get("/admin/security/logs",{search:a},{preserveState:!0})},e[0]=a,e[1]=m):m=e[1];const j=m;let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=[{title:"Dashboard",href:"/admin"},{title:"Seguridad",href:"/admin/security/logs"},{title:"Registro de Actividad",href:"/admin/security/logs"}],e[2]=x):x=e[2];const _=x;let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(A,{title:"Registro de Actividad"}),e[3]=u):u=e[3];let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex items-center justify-between",children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(L,{className:"h-6 w-6 text-muted-foreground"}),t.jsx("h1",{className:"text-xl font-bold",children:"Auditoría (Registro de Actividad)"})]})}),e[4]=p):p=e[4];let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=y=>v(y.target.value),e[5]=h):h=e[5];let l;e[6]!==a?(l=t.jsx(E,{type:"text",placeholder:"Buscar en logs...",value:a,onChange:h}),e[6]=a,e[7]=l):l=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsxs(H,{type:"submit",variant:"secondary",children:[t.jsx(R,{className:"h-4 w-4 mr-2"}),"Buscar"]}),e[8]=f):f=e[8];let d;e[9]!==j||e[10]!==l?(d=t.jsxs("form",{onSubmit:j,className:"flex gap-2 max-w-sm mb-6",children:[l,f]}),e[9]=j,e[10]=l,e[11]=d):d=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("thead",{className:"text-xs uppercase bg-muted text-muted-foreground",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-4 py-3 rounded-tl-lg",children:"Fecha"}),t.jsx("th",{className:"px-4 py-3",children:"Usuario"}),t.jsx("th",{className:"px-4 py-3",children:"Evento"}),t.jsx("th",{className:"px-4 py-3",children:"Modelo"}),t.jsx("th",{className:"px-4 py-3 rounded-tr-lg",children:"Descripción"})]})}),e[12]=b):b=e[12];let c;e[13]!==r.data?(c=r.data.map($),e[13]=r.data,e[14]=c):c=e[14];let i;e[15]!==r.data.length?(i=r.data.length===0&&t.jsx("tr",{children:t.jsx("td",{colSpan:5,className:"px-4 py-8 text-center text-muted-foreground",children:"No hay registros de actividad todavía."})}),e[15]=r.data.length,e[16]=i):i=e[16];let n;e[17]!==c||e[18]!==i?(n=t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full text-sm text-left",children:[b,t.jsxs("tbody",{children:[c,i]})]})}),e[17]=c,e[18]=i,e[19]=n):n=e[19];let o;e[20]!==r.links?(o=r.links&&r.links.length>3&&t.jsx("div",{className:"flex justify-center mt-6 gap-1",children:r.links.map(I)}),e[20]=r.links,e[21]=o):o=e[21];let g;return e[22]!==n||e[23]!==o||e[24]!==d?(g=t.jsxs(D,{breadcrumbs:_,children:[u,t.jsxs("div",{className:"flex h-full flex-1 flex-col gap-4 roun
1ded-xl p-4",children:[p,t.jsx("div",{className:"rounded-xl border bg-card text-card-foreground shadow",children:t.jsxs("div",{className:"p-6",children:[d,n,o]})})]})]}),e[22]=n,e[23]=o,e[24]=d,e[25]=g):g=e[25],g}function I(s,e){return t.jsx(B,{href:s.url||"#",className:`px-3 py-1 text-sm rounded-md border ${s.active?"bg-primary text-primary-foreground border-primary":s.url?"hover:bg-muted":"text-muted-foreground bg-muted/50 cursor-not-allowed"}`,dangerouslySetInnerHTML:{__html:s.label}},e)}function $(s){return t.jsxs("tr",{className:"border-b last:border-0 hover:bg-muted/50",children:[t.jsx("td",{className:"px-4 py-3 font-medium",children:new Date(s.created_at).toLocaleString()}),t.jsx("td",{className:"px-4 py-3",children:s.causer?s.causer.name:"Sistema / Anónimo"}),t.jsx("td",{className:"px-4 py-3",children:t.jsx("span",{className:`px-2 py-1 rounded-full text-xs ${s.event==="created"?"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-300":s.event==="updated"?"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300":s.event==="deleted"?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-300":"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300"}`,children:s.event})}),t.jsxs("td",{className:"px-4 py-3 text-muted-foreground truncate max-w-[150px]",children:[s.subject_type?s.subject_type.split("\\").pop():"-"," #",s.subject_id]}),t.jsx("td",{className:"px-4 py-3",children:s.description})]},s.id)}export{O 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.