PageSourceSearch

https://imoye.co.uk/build/assets/Tutor-CmzZsb4U.js

js imoye.co.uk collected 2026-10-10 02:25:04 UTC 10,718 bytes, 1 lines download raw bytes

1import{o as a,f as o,a as t,F as h,i as _,c as v,t as l,n as f,g as $,N as A,d as b,b as p,w as m,h as k,u as g,j as y}from"./app-BH9QaZPI.js";import{_ as D}from"./AppLayout-z82MIi82.js";import{_ as S,a as C}from"./StudentDashboardActivityItem-CKiREkxP.js";import{b as w,a as N}from"./ClipboardDocumentListIcon-CusSORq3.js";import{r as T}from"./CheckBadgeIcon-D9ejiIVl.js";import{u as M}from"./useLearnitPageTheme-Cqsvxjcq.js";import{r as j}from"./ClockIcon-F9sveuo4.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./EarlyAccessBadge-DtiMbhOQ.js";import"./usePostHog-D8G14hqC.js";function B(i,c){return a(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M18 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM3 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 9.374 21c-2.331 0-4.512-.645-6.374-1.766Z"})])}function E(i,c){return a(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z"})])}const L={class:"space-y-5"},R={class:"grid grid-cols-1 gap-5 sm:grid-cols-2 xl:grid-cols-4"},V={__name:"TutorDashboardOverviewSection",props:{stats:{type:Array,required:!0}},setup(i){return(c,u)=>(a(),o("section",L,[u[0]||(u[0]=t("h1",{class:"text-4xl font-semibold text-base-content"},"Tutor Dashboard",-1)),t("div",R,[(a(!0),o(h,null,_(i.stats,n=>(a(),v(S,{key:n.title,title:n.title,value:n.value,icon:n.icon,highlighted:n.highlighted},null,8,["title","value","icon","highlighted"]))),128))])]))}},O={key:0,class:"overflow-hidden rounded-2xl border border-base-300 bg-base-100 shadow-sm"},P={class:"overflow-x-auto"},Z={class:"min-w-full divide-y divide-base-300"},I={class:"divide-y divide-base-300"},U={class:"whitespace-nowrap px-6 py-4 text-sm text-base-content"},q={class:"px-6 py-4 text-sm text-base-content"},F={class:"whitespace-nowrap px-6 py-4 text-sm text-base-content/80"},H={class:"whitespace-nowrap px-6 py-4 text-sm text-base-content/70"},z={class:"whitespace-nowrap px-6 py-4"},G={class:"flex flex-wrap items-center gap-1"},W={key:0,class:"badge badge-sm badge-ghost"},J={class:"whitespace-nowrap px-6 py-4"},K={class:"whitespace-nowrap px-6 py-4 text-right"},Q=["onClick"],X={key:1,class:"rounded-2xl border border-dashed border-base-300 bg-base-100 p-8 text-center text-base-content/70"},Y={__name:"TutorPendingSubmissionsTable",props:{submissions:{type:Array,default:()=>[]}},setup(i){const c=e=>e?new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"N/A",u=e=>e.needs_feedback?e.assignment_type==="mcq"&&e.auto_score!=null?`Auto-graded (${e.auto_score}%) · review pending`:"Awaiting feedback":{submitted:"Submitted",under_review:"Under review",feedback_provided:"Graded",resubmitted:"Resubmitted",draft:"Draft"}[e.status]??e.status,n=e=>{if(!e)return{text:"—",class:"badge-ghost"};const d=new Date(e),s=Math.ceil((d-Date.now())/864e5);return s<0?{text:"Expired",class:"badge-error"}:s<=2?{text:`Due in ${s}d`,class:"badge-warning"}:s<=7?{text:`Due in ${s}d`,class:"badge-info"}:{text:c(e),class:"badge-ghost"}},r=e=>{A.visit(route("tutor.submissions.show",e))};return(e,d)=>i.submissions.length>0?(a(),o("div",O,[t("div",P,[t("table",Z,[d[0]||(d[0]=t("thead",{class:"bg-base-200/60"},[t("tr",null,[t("th",{class:"px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-base-content/70"}," Student "),t("th",{class:"px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-base-content/70"}," Assignment "),t("th",{class:"px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-base-content/70"}," Course "),t("th",{class:"px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-base-content/70"}," Submitted "),t("th",{class:"px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-base-content/70"}," Status "),t("th",{class:"px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-base-content/70"}," Expires "),t("th",{class:"px-6 py-3 text-right text-xs font-medium uppercase tracking-wider text-base-content/70"}," Actions ")])],-1)),t("tbody",I,[(a(!0),o(h,null,_(i.submissions,s=>(a(),o("tr",{key:s.id,class:"hover:bg-base-200/40"},[t("td",U,l(s.user_name),1),t("td",q,l(s.assignment_title),1),t("td",F,l(s.course_title),1),t("td",H,l(c(s.submitted_at)),1),t("td",z,[t("div",G,[t("span",{class:f(["badge badge-sm",s.needs_feedback?"badge-warning":"badge-success"])},l(u(s)),3),s.is_locked?(a(),o("span",W," In review ")):$("",!0)])]),t("td",J,[t("span",{class:f(["badge badge-sm",n(s.access_expires_at).class])},l(n(s.access_expires_at).text),3)]),t("td",K,[t("button",{type:"button",class:"btn btn-primary btn-sm",onClick:x=>r(s.id)}," Review ",8,Q)])]))),128))])])])])):(a(),o("div",X," No pending submissions "))}},tt={class:"space-y-5"},et={key:0,class:"overflow-hidden rounded-2xl border border-base-300 bg-base-100 shadow-sm"},st={class:"overflow-x-auto"},nt={class:"min-w-full divide-y divide-base-300"},at={class:"divide-y divide-base-300"},rt={class:"whitespace-nowrap px-6 py-4 text-sm text-base-content"},ot={class:"whitespace-nowrap px-6 py-4 text-sm text-base-content/80"},it={class:"whitespace-nowrap px-6 py-4"},ct={class:"whitespace-nowrap px-6 py-4 text-sm text-base-content/70"},dt={class:"whitespace-nowrap px-6 py-4 text-sm text-base-content/70"},lt={key:1,class:"rounded-2xl border border-dashed border-base-300 bg-base-100 p-8 text-center text-base-content/70"},ut={__name:"TutorDashboardRecentEnrollmentsSection",props:{enrollments:{type:Array,default:()=>[]}},setup(i){const c=n=>n?new Date(n).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"N/A",u=n=>n==="active"?"badge-success":n==="pending"?"badge-warning":n==="expired"?"badge-error":"badge-ghost";return(n,r)=>(a(),o("section",tt,[r[1]||(r[1]=t("h2",{class:"text-3xl font-semibold text-base-content"},"Recent Enrollments",-1)),i.enrollments.length>0?(a(),o("div",et,[t("div",st,[t("table",nt,[r[0]||(r[0]=t("thead",{class:"bg-base-200/60"},[t("tr",null,[t("th",{class:"px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-base-content/70"}," Student "),t("th",{class:"px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-base-content/70"}," Course "),t("th",{class:"px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-base-content/70"}," Status "),t("th",{class:"px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-base-content/70"}," Started "),t("th",{class:"px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-base-content/70"}," Expires ")])],-1)),t("tbody",at,[(a(!0),o(h,null,_(i.enrollments,e=>(a(),o("tr",{key:e.id,class:"hover:bg-base-200/40"},[t("td",rt,l(e.student_name),1),t("td",ot,l(e.course_title),1),t("td",it,[t("span",{class:f(["badge badge-sm",u(e.status)])},l(e.status),3)]),t("td",ct,l(c(e.started_at)),1),t("td",dt,l(c(e.expires_at)),1)]))),128))])])])])):(a(),o("div",lt," No recent enrollments "))]))}},pt={class:"rounded-2xl border border-base-300 bg-base-100 p-5 shadow-sm"},xt={class:"mb-4 flex items-center justify-between gap-4"},bt={key:0,class:"text-sm text-base-content/70"},mt={key:1,class:"space-y-3"},ht={__name:"TutorDashboardRecentActivitySection",props:{items:{type:Array,default:()=>[]},links:{type:Object,default:()=>({})}},setup(i){const c=i,u={assignment_submitted:w,new_student_started:B,student_completed_course:T},n={primary:"bg-primary/10 text-primary",warning:"bg-warning/20 text-warning-content",info:"bg-info/20 text-info"},r=b(()=>(c.items||[]).map(d=>({...d,icon:u[d.type]??w,toneClass:n[d.tone]||n.primary}))),e=b(()=>{var s;const d=(s=c.links)==null?void 0:s.notifications_index;
1return typeof d=="string"&&d.length>0?d:route("notifications.index")});return(d,s)=>(a(),o("section",pt,[t("div",xt,[s[1]||(s[1]=t("h2",{class:"text-3xl font-semibold text-base-content"},"Recent Activity",-1)),p(g(y),{href:e.value,class:"btn btn-outline btn-primary btn-sm shrink-0 rounded-full px-6 normal-case"},{default:m(()=>s[0]||(s[0]=[k(" View All ")])),_:1},8,["href"])]),r.value.length===0?(a(),o("div",bt," No recent activity — new student and submission alerts will appear here. ")):(a(),o("div",mt,[(a(!0),o(h,null,_(r.value,x=>(a(),v(g(y),{key:x.id,href:x.url||e.value,class:"block rounded-xl transition-colors hover:bg-base-200/50"},{default:m(()=>[p(C,{item:x},null,8,["item"])]),_:2},1032,["href"]))),128))]))]))}},_t={class:"bg-base-200/40 py-8"},ft={class:"mx-auto w-full max-w-full space-y-8 px-4 sm:px-6 lg:px-8"},gt={class:"space-y-5"},yt={class:"flex items-end justify-between gap-4"},Mt={__name:"Tutor",props:{stats:{type:Object,default:()=>({})},recent_enrollments:{type:Array,default:()=>[]},pending_submissions:{type:Array,default:()=>[]},recent_activity:{type:Array,default:()=>[]},links:{type:Object,default:()=>({})}},setup(i){const c=i;M();const u=b(()=>{const r=c.stats||{};return[{title:"Courses",value:r.total_courses??0,icon:N,highlighted:!1},{title:"Students",value:r.total_students??0,icon:E,highlighted:!1},{title:"Pending Submissions",value:r.pending_submissions??0,icon:w,highlighted:!0},{title:"Due Within 7 Days",value:r.due_within_7_days??0,icon:j,highlighted:!1}]}),n=b(()=>{var r;return((r=c.links)==null?void 0:r.submissions_index)??route("tutor.submissions.index")});return(r,e)=>(a(),v(D,{title:"Tutor Dashboard","route-name":"tutor.dashboard","menu-variant":"tutor"},{default:m(()=>[t("div",_t,[t("div",ft,[p(V,{stats:u.value},null,8,["stats"]),t("section",gt,[t("div",yt,[e[1]||(e[1]=t("h2",{class:"text-3xl font-semibold text-base-content"},"Pending Submissions",-1)),p(g(y),{href:n.value,class:"btn btn-outline btn-primary btn-sm shrink-0 rounded-full px-6 normal-case"},{default:m(()=>e[0]||(e[0]=[k(" View All ")])),_:1},8,["href"])]),p(Y,{submissions:i.pending_submissions},null,8,["submissions"])]),p(ht,{items:i.recent_activity,links:i.links},null,8,["items","links"]),p(ut,{enrollments:i.recent_enrollments},null,8,["enrollments"])])])]),_:1}))}};export{Mt 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.