PageSourceSearch

https://yovendo.ai/assets/AdminDashboard-B5pjl4-j.js

js yovendo.ai collected 2026-10-05 14:49:04 UTC 5,961 bytes, 1 lines download raw bytes

1import{r as o,a as f,j as e,f as t,y as i,z as a,aL as g,g as l,F as N,U as p,D as b}from"./index-Dbzkh-cK.js";import{A as y,L as v}from"./AdminLayout-Bp0o2Lc8.js";import{A as w}from"./award-D4SRN9E6.js";function L(){const[s,j]=o.useState(null),[n,x]=o.useState(!0),{toast:m}=f();return o.useEffect(()=>{(async()=>{x(!0);try{const r=localStorage.getItem("elearningAdminToken");if(!r)throw new Error("Token di autenticazione non trovato");const c={totalCourses:0,totalModules:0,totalLessons:0,totalStudents:0,totalCertificates:0},h=await fetch("/api/elearning-admin/courses",{headers:{Authorization:`Bearer ${r}`}});if(h.ok){const d=await h.json();c.totalCourses=d.length}const u=await fetch("/api/elearning-admin/students",{headers:{Authorization:`Bearer ${r}`}});if(u.ok){const d=await u.json();c.totalStudents=d.length}j(c)}catch{m({title:"Errore",description:"Si è verificato un errore nel recupero delle statistiche.",variant:"destructive"})}finally{x(!1)}})()},[m]),e.jsxs(y,{title:"Dashboard",children:[e.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:[e.jsxs(t,{children:[e.jsxs(i,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(a,{className:"text-sm font-medium",children:"Corsi"}),e.jsx(g,{className:"h-4 w-4 text-blue-600"})]}),e.jsxs(l,{children:[e.jsx("div",{className:"text-2xl font-bold",children:n?e.jsx("div",{className:"h-8 w-16 bg-gray-200 rounded animate-pulse"}):(s==null?void 0:s.totalCourses)||0}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Corsi disponibili sulla piattaforma"})]})]}),e.jsxs(t,{children:[e.jsxs(i,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(a,{className:"text-sm font-medium",children:"Moduli"}),e.jsx(v,{className:"h-4 w-4 text-indigo-600"})]}),e.jsxs(l,{children:[e.jsx("div",{className:"text-2xl font-bold",children:n?e.jsx("div",{className:"h-8 w-16 bg-gray-200 rounded animate-pulse"}):(s==null?void 0:s.totalModules)||0}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Moduli di corso creati"})]})]}),e.jsxs(t,{children:[e.jsxs(i,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(a,{className:"text-sm font-medium",children:"Lezioni"}),e.jsx(N,{className:"h-4 w-4 text-green-600"})]}),e.jsxs(l,{children:[e.jsx("div",{className:"text-2xl font-bold",children:n?e.jsx("div",{className:"h-8 w-16 bg-gray-200 rounded animate-pulse"}):(s==null?void 0:s.totalLessons)||0}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Lezioni disponibili"})]})]}),e.jsxs(t,{children:[e.jsxs(i,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(a,{className:"text-sm font-medium",children:"Studenti"}),e.jsx(p,{className:"h-4 w-4 text-orange-600"})]}),e.jsxs(l,{children:[e.jsx("div",{className:"text-2xl font-bold",children:n?e.jsx("div",{className:"h-8 w-16 bg-gray-200 rounded animate-pulse"}):(s==null?void 0:s.totalStudents)||0}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Studenti registrati"})]})]}),e.jsxs(t,{children:[e.jsxs(i,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(a,{className:"text-sm font-medium",children:"Certificati"}),e.jsx(w,{className:"h-4 w-4 text-purple-600"})]}),e.jsxs(l,{children:[e.jsx("div",{className:"text-2xl font-bold",children:n?e.jsx("div",{className:"h-8 w-16 bg-gray-200 rounded animate-pulse"}):(s==null?void 0:s.totalCertificates)||0}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Certificati rilasciati"})]})]})]}),e.jsx("div",{className:"mt-8",children:e.jsxs(t,{children:[e.jsxs(i,{children:[e.jsx(a,{children:"Guida rapida"}),e.jsx(b,{children:"Come gestire la piattaforma e-learning"})]}),e.jsx(l,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-start",children:[e.jsx("div",{className:"flex-shrink-0 flex h-8 w-8 items-center justify-center rounded-full bg-blue-100 text-blue-600",children:e.jsx("span",{className:"text-sm font-medium",children:"1"})}),e.jsxs("div",{className:"ml-4",children:[e.jsx("h3",{className:"text-sm font-medium",children:"Crea un corso"}),e.jsx("p",{className:"text-sm text-gray-500",children:'Vai alla sezione "Corsi" e crea un nuovo corso specificando titolo, descrizione e immagine di copertina.'})]})]}),e.jsxs("div",{className:"flex items-start",children:[e.jsx("div",{className:"flex-shrink-0 flex h-8 w-8 items-center justify-center rounded-full bg-blue-100 text-blue-600",children:e.jsx("span",{className:"text-sm font-medium",children:"2"})}),e.jsxs("div",{className:"ml-4",children:[e.jsx("h3",{className:"text-sm font-medium",children:"Aggiungi moduli al corso"}),e.jsx("p",{className:"text-sm text-gray-500",children:"Una volta creato il corso, aggiungi i moduli che lo compongono, definen
1do l'ordine e la descrizione."})]})]}),e.jsxs("div",{className:"flex items-start",children:[e.jsx("div",{className:"flex-shrink-0 flex h-8 w-8 items-center justify-center rounded-full bg-blue-100 text-blue-600",children:e.jsx("span",{className:"text-sm font-medium",children:"3"})}),e.jsxs("div",{className:"ml-4",children:[e.jsx("h3",{className:"text-sm font-medium",children:"Crea le lezioni"}),e.jsx("p",{className:"text-sm text-gray-500",children:"Per ogni modulo, crea le lezioni con contenuti, video o quiz. Definisci l'ordine e la durata stimata."})]})]}),e.jsxs("div",{className:"flex items-start",children:[e.jsx("div",{className:"flex-shrink-0 flex h-8 w-8 items-center justify-center rounded-full bg-blue-100 text-blue-600",children:e.jsx("span",{className:"text-sm font-medium",children:"4"})}),e.jsxs("div",{className:"ml-4",children:[e.jsx("h3",{className:"text-sm font-medium",children:"Gestisci gli studenti"}),e.jsx("p",{className:"text-sm text-gray-500",children:"Monitora i progressi degli studenti, genera i certificati e gestisci le iscrizioni ai corsi."})]})]})]})})]})})]})}export{L 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.