1import{u as C,j as t}from"./vendor-query-HuNr2OOg.js";import{c as G,C as D,b as j}from"./CallQuestionBuilder-DQ8XlcWS.js";import{E as b,D as c}from"./EntityDetailLayout-ChU_CLvU.js";import{G as v}from"./GestorShellLayout-CiirRDKn.js";import{B as m}from"./badge-CoDR_tZG.js";import{d as g,e as x,s as N,h as u,v as y}from"./index-B9EaWs5J.js";import{a as S,n as w}from"./useGestorCalls-BG_wJmOi.js";import{c as A,b as $,d as f,e as E}from"./gestor-shell-TBNowdfe.js";import{a as L,u as T,L as d}from"./vendor-router-plbrcz1S.js";import{A as B}from"./arrow-right-C8XFVS0p.js";import"./vendor-react-BN0qJr-I.js";import"./alert-dialog-CQoa8her.js";import"./vendor-radix-DCkeDM7m.js";import"./vendor-charts-CXqRGmUN.js";import"./form-B2blOOmC.js";import"./vendor-forms-D4MPt3QK.js";import"./select-Bx92EZlX.js";import"./chevron-down-CDMVS9ta.js";import"./ProductCreateDialog-9eTr26Fw.js";import"./ProductAccessPrivileges-CJ5jnydU.js";import"./checkbox-td0l9DqT.js";import"./switch-BVBHBSX1.js";import"./badge-check-Dl4Nlaip.js";import"./tags-M0eTRmN5.js";import"./useGestorProducts-CtUjQ4mj.js";import"./zod-DFhGa739.js";import"./credit-card-mBIq8I9b.js";import"./plus-KZMqtAWo.js";import"./collapsible-BL-EtaLU.js";import"./useCallFormFields-0SF45m0M.js";import"./list-checks-aOOByOar.js";import"./list-filter-nPg-wEf3.js";import"./upload-DeihrVWv.js";import"./type-BSbhVEJR.js";import"./lock-DTzEcUzi.js";import"./circle-help-wB_TeIF8.js";import"./grip-vertical-iHyztZy_.js";import"./eye-BUXYE9m2.js";import"./chevron-left-C_jlVjzV.js";import"./useDocumentTitle-xTPWgVDR.js";import"./EditionWorkspaceShell-Dc79wNhv.js";import"./calendar-check-C-xph8b9.js";import"./file-text-D-z1nS5Y.js";import"./menu-0kMVWNw1.js";import"./BrandLogo-t7LJ_z0w.js";import"./tabs-Cj6qLtj8.js";import"./ChangePasswordForm-zlzFCc7k.js";import"./PasswordInput-B3jJbgJG.js";import"./vendor-motion-DjGcfsVB.js";import"./key-round-C4haCnJ4.js";import"./mail-B83u8EaH.js";import"./users-round-U8AIGJ92.js";import"./book-open-BpR4zXpZ.js";import"./shield-check-6RaPPMSt.js";import"./sliders-horizontal-CT2bYo4k.js";import"./settings-2-CUWnb61Q.js";import"./user-round-BB6pBisF.js";import"./package-Bv3K6j-5.js";import"./arrow-left-CXgzbUuF.js";import"./map-pin-Bd4jW6pd.js";const k={draft:"muted",configured:"muted",published:"default",applications_open:"success",applications_closed:"warn",reviewing:"warn",live:"success",finished:"default",archived:"muted"};function Q(e){return e?new Date(e).toLocaleString("es-ES"):"Sin fecha"}function Ot(){const{slug:e,callSlug:r}=L(),[,l]=T(),n=C({queryKey:["gestor","edition",e],queryFn:()=>y(`/gestor/editions/${e}`),enabled:!!e,staleTime:1e3*60*5}),i=S(e,r),a=i.data?.call,o=w(i.data?.stats??a?.stats),p=a?G(e,a.slug):"#";return t.jsx(v,{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:70",title:"Convocatoria",subtitle:"Detalle, preguntas personalizadas y solicitudes de la convocatoria.",breadcrumbs:[{label:"Gestor",href:"/gestor"},{label:"Ediciones",href:"/gestor/ediciones"},{label:n.data?.edition.name??e,href:`/gestor/edicion/${e}/overview`},{label:"Convocatorias",href:`/gestor/edicion/${e}/convocatorias`},{label:a?.name??r}],edition:n.data?.edition,currentSectionKey:"convocatorias",headerActions:a?t.jsx(u,{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:90",asChild:!0,children:t.jsxs(d,{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:91",href:p,children:["Ver solicitudes",t.jsx(B,{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:93",className:"ml-2 h-4 w-4"})]})}):null,children:i.isLoading?t.jsx("p",{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:100",className:"text-sm text-stone-500",children:"Cargando convocatoriaâ¦"}):a?t.jsxs(b,{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:104",backHref:`/gestor/edicion/${e}/convocatorias`,backLabel:"Volver a convocatorias",eyebrow:`Target: ${$(a.targetRole)}`,title:a.name,status:{label:A(a.status),tone:k[a.status]??"default"},subtitle:t.jsxs("span",{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:114",className:"font-mono text-xs text-stone-500",children:["/",a.slug]}),children:[t.jsx(c,{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:119",title:"Información general",description:"Edita datos, estado, ventana de fechas y descripciones. El slug se mantiene automático.",children:t.jsx(D,{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:123",slug:e,call:a,onSaved:s=>{s.slug&&s.slug!==r&&l(`/gestor/edicion/${e}/convocatorias/${s.slug}`)},onArchived:()=>l(`/gestor/edicion/${e}/convocatorias`),onDeleted:()=>l(`/gestor/edicion/${e}/convocatorias`)})}),t.jsx(c,{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:142",title:"Formulario / preguntas",description:"Configura las preguntas especÃficas que verá el público objetivo de esta convocatoria.",children:t.jsx("div",{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:14
16",id:"preguntas",children:t.jsx(j,{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:147",editionSlug:e,callSlug:a.slug})})}),t.jsx(c,{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:151",title:"Solicitudes",description:"Vista previa de solicitudes recibidas y acceso directo al filtro completo.",children:t.jsxs("div",{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:155",className:"space-y-4",children:[t.jsxs("div",{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:156",className:"grid gap-3 sm:grid-cols-3",children:[t.jsx(g,{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:157",className:"border-stone-200 bg-stone-50 shadow-none",children:t.jsxs(x,{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:158",className:"p-4",children:[t.jsx("p",{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:159",className:"text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground",children:"Total"}),t.jsx("p",{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:162",className:"mt-2 text-2xl font-semibold",children:o.totalApplications})]})}),t.jsx(g,{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:167",className:"border-stone-200 bg-stone-50 shadow-none sm:col-span-2",children:t.jsxs(x,{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:168",className:"p-4",children:[t.jsx("p",{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:169",className:"text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground",children:"Por estado"}),t.jsx("div",{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:172",className:"mt-3 flex flex-wrap gap-2",children:Object.keys(o.applicationsByStatus).length===0?t.jsx("span",{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:174",className:"text-sm text-muted-foreground",children:"Sin solicitudes aún."}):Object.entries(o.applicationsByStatus).map(([s,h])=>t.jsxs(m,{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:180",variant:"secondary",children:[f(s),": ",h]},s))})]})})]}),t.jsxs("div",{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:191",className:"rounded-2xl border border-stone-200 bg-white p-4",children:[t.jsxs("div",{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:192",className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsxs("div",{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:193",className:"flex items-center gap-2 font-medium",children:[t.jsx(N,{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:194",className:"h-4 w-4 text-primary"}),"Ãltimas solicitudes"]}),t.jsx(u,{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:197",asChild:!0,variant:"outline",size:"sm",className:"bg-white",children:t.jsx(d,{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:203",href:p,children:"Ver todas filtradas"})})]}),o.latestApplications.length===0?t.jsx("p",{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:207",className:"mt-4 text-sm text-muted-foreground",children:"Sin solicitudes recibidas."}):t.jsx("div",{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:211",className:"mt-4 grid gap-3",children:o.latestApplications.map(s=>t.jsxs(d,{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:213",href:`/gestor/edicion/${e}/applications/${s.id}`,className:"rounded-xl border border-stone-200 p-3 hover:bg-stone-50",children:[t.jsxs("div",{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:218",className:"flex flex-wrap items-center justify-between gap-2",children:[t.jsx("p",{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:219",className:"font-medium text-foreground",children:s.entityName??s.applicantName??s.applicantEmail??`Solicitud ${s.id}`}),t.jsx(m,{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:225",variant:"secondary",children:f(s.status)})]}),t.jsxs("p",{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:229",className:"mt-1 text-xs text-muted-foreground",children:[E(s.applicantType)," ","· Enviada ",Q(s.submittedAt)]})]},s.id))})]})]})})]}):t.jsx("p",{"data-loc":"src/pages/gestor/GestorCallDetail.tsx:102",className:"text-sm text-rose-600",children:"Convocatoria no encontrada."})})}export{Ot 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.