PageSourceSearch

https://campusendocrino.com/assets/OrganizationsList-ig1yBIi0.js

js campusendocrino.com collected 2026-09-29 07:17:13 UTC 3,438 bytes, 1 lines download raw bytes

1import{j as e,l as x,L as C,v as j,S as l,T as s,b as t,G as d,f,O as z,C as v,t as y,X as S}from"./vendor-mantine-DQvSv3QS.js";import{r as c}from"./vendor-charts-BYZ8jVF7.js";import{b}from"./orgs-TXp-zw39.js";import{u as O,L as o}from"./index-BNlvsJKT.js";import"./api-3zWh6Ndi.js";import"./vendor-firebase-DFbLPQpn.js";function $(){const{user:n,loading:h}=O(),[g,u]=c.useState([]),[E,r]=c.useState(!0),[p,a]=c.useState(null);c.useEffect(()=>{h||(async()=>{if(!n||n.isAnonymous){a("Debes iniciar sesión para ver tus organizaciones"),r(!1);return}try{r(!0),a(null);const m=await b();u(m)}catch(m){console.error("Error loading organizations:",m),a("No se pudieron cargar las organizaciones")}finally{r(!1)}})()},[h,n]);const w=async()=>{if(!(!n||n.isAnonymous))try{r(!0),a(null);const i=await b();u(i)}catch(i){console.error("Error loading organizations:",i),a("No se pudieron cargar las organizaciones")}finally{r(!1)}};return E?e.jsx(x,{h:400,children:e.jsx(C,{size:"lg"})}):p?e.jsx(j,{size:"sm",children:e.jsx(x,{h:400,children:e.jsxs(l,{align:"center",gap:"md",children:[e.jsx(s,{c:"red",size:"lg",children:p}),e.jsx(t,{onClick:w,children:"Reintentar"})]})})}):e.jsx(j,{size:"lg",children:e.jsxs(l,{gap:"xl",children:[e.jsxs(d,{justify:"space-between",align:"center",children:[e.jsxs("div",{children:[e.jsx(f,{order:1,mb:"xs",children:"Mis Organizaciones"}),e.jsx(s,{c:"dimmed",size:"lg",children:"Gestiona tus organizaciones y eventos"})]}),e.jsx(t,{component:o,to:"/org/admin",variant:"filled",children:"➕ Crear Organización"})]}),g.length===0?e.jsx(x,{h:300,children:e.jsxs(l,{align:"center",gap:"md",children:[e.jsx(s,{size:"lg",c:"dimmed",children:"No tienes organizaciones creadas"}),e.jsx(s,{size:"sm",c:"dimmed",children:"¡Crea tu primera organización para comenzar!"}),e.jsx(t,{component:o,to:"/org/admin",variant:"filled",size:"md",children:"➕ Crear mi primera organización"})]})}):e.jsx(z,{children:g.map(i=>e.jsx(z.Col,{span:{base:12,sm:6,md:4},children:e.jsx(v,{shadow:"sm",padding:"lg",radius:"lg",withBorder:!0,h:"100%",children:e.jsxs(l,{gap:"md",h:"100%",children:[e.jsxs(d,{justify:"space-between",align:"flex-start",children:[e.jsx(f,{order:3,lineClamp:2,children:i.name}),e.jsx(y,{variant:"light",color:"blue",size:"sm",children:i.domainSlug})]}),i.description&&e.jsx(s,{size:"sm",c:"dimmed",lineClamp:3,children:i.description}),e.jsxs(v.Section,{withBorder:!0,inheritPadding:!0,py:"xs",mt:"auto",style:{borderLeft:0,borderRight:0,borderBottom:0},children:[e.jsx(s,{size:"xs",c:"dimmed",tt:"uppercase",fw:700,mb:4,children:"Próximo evento"}),i.nextEvent?e.jsxs(d,{justify:"space-between",align:"center",wrap:"nowrap",gap:"xs",children:[e.jsx(s,{size:"sm",fw:600,lineClamp:1,component:o,to:`/org/${i.domainSlug}/event/${i.nextEvent.slug}/admin`,children:i.nextEvent.title}),i.nextEvent.status==="live"&&e.jsx(y,{color:"red",variant:"filled",size:"xs",children:"EN VIVO"})]}):e.jsx(s,{size:"sm",c:"dimmed",children:"Sin próximos eventos"}),i.nextEvent&&e.jsx(s,{size:"xs",c:"dimmed",mt:2,tt:"capitalize",children:S(i.nextEvent.startsAt).locale("es").format("dddd D [de] MMMM, h:mm A")})]}),e.jsxs(d,{gap:"sm",children:[e.jsx(t,{component:o,to:`/org/${i.domainSlug}`,variant:"light",size:"sm",style:{flex:1},children:"👀 Visitar"}),e.jsx(t,{component:o,to:`/org/${i.domainSlug}/admin`,variant:"filled",size:"sm",style:{flex:1},children:"⚙️ Administrar"})]})]})})},i._id))})]})})}export{$ 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.