PageSourceSearch

https://prms-dyph-sec67.web.app/assets/Dashboard-DTDOX9lk.js

js prms-dyph-sec67.web.app collected 2026-10-03 12:33:32 UTC 23,066 bytes, 11 lines download raw bytes

1import{r as c,j as e}from"./react-vendor-BhAyUcBJ.js";import{u as le,z as P,e as fe,c as M,d as T,s as X,b as be,g as $,o as je,q as J,l as K,f as Y,w as ye}from"./appEntry-D3Ky44Xp.js";import{u as Ne}from"./useStudents-CS7QmMVi.js";import{u as ve}from"./useClassSchedules-CcWLwxhR.js";import{u as re}from"./useBatches-fhfb3_Bj.js";import{u as we}from"./useTableConfig-xhIktNP0.js";import{S as Se}from"./StudentModal-DKcBMpXS.js";import{X as ke}from"./x-D-RUFuDe.js";import{c as ne}from"./createLucideIcon-CxFhcMYD.js";import{U as Ce}from"./user-CBK2k3qe.js";import{C as j}from"./calendar-CKLs334F.js";import{C as Me}from"./clock-epjGKz7Q.js";import Te from"./SadhnaReport-Ce_lES8d.js";import{u as Be,S as De}from"./useUsers-CShfkIGw.js";import{b as Ae}from"./eventPasses-BLFZXT9Q.js";import{E as Ee,n as Fe}from"./EventCard-Cm42oztX.js";import{S as O}from"./settings-DWewKDsV.js";import{U}from"./users-wS6ag6ve.js";import{F as Pe}from"./file-text-WyE2lu8z.js";import{B as L}from"./book-open-BSuOv8p3.js";import{P as Z}from"./phone-gHmFbE-S.js";import{T as ee}from"./ticket-DKeIFslC.js";import{C as se}from"./chevron-up-DOkLX1u-.js";import{C as te}from"./chevron-down-BZBXmlbe.js";import{f as ae}from"./format-BKzWwitV.js";import{L as Oe}from"./loader-circle-CTVfHPjr.js";import{Q as Ue}from"./qr-code-BxZh0PDX.js";import"./index-BPJB34iJ.js";import"./registerServiceWorker-QPbZ_EC-.js";import"./papaparse.min-2w6DjtEf.js";import"./text-BoD1AgKQ.js";import"./quill.snow-CSYyRfWE.js";import"./CartesianChart-ztV4PYhV.js";import"./react-redux-B_YHeXjR.js";import"./value-DJrwRANZ.js";import"./LineChart-D13TDCrk.js";import"./eventAuditLog-CGP6KmcX.js";import"./history-21GJq8Yz.js";import"./plus-UZItM2tw.js";import"./pencil-Bgc-fdro.js";import"./clipboard-check-FLKR1TBK.js";import"./chart-column-tM3ljqZp.js";import"./eye-off-ClNZWTSl.js";import"./eye-B1pA7LpJ.js";import"./trash-2-DiKp48tv.js";import"./chevron-right-DLfMDkCR.js";import"./calendar-days-cXRWtTrL.js";import"./info-DBwYlb2Z.js";import"./en-US-ChXMrxo7.js";/**
2 * @license lucide-react v0.544.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const Le=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],qe=ne("circle-plus",Le);/**
7 * @license lucide-react v0.544.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const Ie=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],He=ne("tag",Ie),Re=({isOpen:s,onClose:x,onSuccess:y})=>{const{user:p}=le(),{batches:f}=re(),[S,k]=c.useState(!1),[r,u]=c.useState({title:"",speaker:"",date:"",time:"19:00",selectedBatches:[],callingType:"Session"}),v=c.useMemo(()=>{const n=(f||[]).map(g=>g.title).filter(Boolean);return Array.from(new Set(n))},[f]),B=async n=>{if(n.preventDefault(),!r.title||!r.speaker||!r.date||r.selectedBatches.length===0){P.error("Please fill all required fields");return}try{k(!0),await fe(M(T,"classSchedules"),{title:r.title,speaker:r.speaker,date:new Date(r.date),time:r.time,batch:r.selectedBatches.join(", "),description:"",status:"Scheduled",callingType:r.callingType,createdBy:(p==null?void 0:p.id)||"",createdAt:X(),updatedAt:X()}),P.success("Class scheduled successfully"),u({title:"",speaker:"",date:"",time:"19:00",selectedBatches:[],callingType:"Session"}),y==null||y(),x()}catch(g){console.error("Error scheduling class:",g),P.error("Failed to schedule class")}finally{k(!1)}},N=n=>{u(g=>({...g,selectedBatches:g.selectedBatches.includes(n)?g.selectedBatches.filter(w=>w!==n):[...g.selectedBatches,n]}))};return s?e.jsx("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:e.jsxs("div",{className:"flex items-center justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:block sm:p-0",children:[e.jsx("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:e.jsx("div",{className:"absolute inset-0 bg-gray-500 opacity-75",onClick:x})}),e.jsx("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:"​"}),e.jsx("div",{className:"inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full",children:e.jsxs("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:[e.jsxs("div",{className:"flex justify-between items-center mb-5",children:[e.jsx("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Schedule New Class"}),e.jsx("button",{onClick:x,className:"text-gray-400 hover:text-gray-500",children:e.jsx(ke,{className:"h-6 w-6"})})]}),e.jsxs("form",{onSubmit:B,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Topic / Title"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e.jsx(He,{className:"h-5 w-5 text-gray-400"})}),e.jsx("input",{type:"text",required:!0,className:"pl-10 block w-full border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm border p-2",placeholder:"e.g. Bhagavad Gita Chapter 1",value:r.title,onChange:n=>u({...r,title:n.target.value})})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Speaker"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e.jsx(Ce,{className:"h-5 w-5 text-gray-400"})}),e.jsx("input",{type:"text",required:!0,className:"pl-10 block w-full border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm border p-2",placeholder:"Speaker Name",value:r.speaker,onChange:n=>u({...r,speaker:n.target.value})})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Date"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e.jsx(j,{className:"h-5 w-5 text-gray-400"})}),e.jsx("input",{type:"date",required:!0,className:"pl-10 block w-full border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm border p-2",value:r.date,onChange:n=>u({...r,date:n.target.value})})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Time"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e.jsx(Me,{className:"h-5 w-5 text-gray-400"})}),e.jsx("input",{type:"time",required:!0,className:"pl-10 block w-full border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm border p-2",value:r.time,onChange:n=>u({...r,time:n.target.value})})]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Batches"}),e.jsx("div",{className:"border rounded-md p-3 max-h-32 overflow-y-auto space-y-2",children:v.length===0?e.jsx("p",{className:"text-sm text-gray-500",children:"No batches available"}):v.map(n=>e.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:r.selectedBatches.includes(n),onChange:()=>N(n),className:"rounded text-blue-600 focus:ring-blue-500 h-4 w-4"}),e.jsx("span",{className:"text-sm text-gray-700",children:n})]},n))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Type"}),e.jsxs("div",{className:"flex space-x-4",children:[e.jsxs("label",{className:"flex items-center",children:[e.jsx("input",{type:"radio",checked:r.callingType==="Session",onChange:()=>u({...r,callingType:"Session"}),className:"text-blue-600 focus:ring-blue-500 h-4 w-4"}),e.jsx("span",{className:"ml-2 text-sm text-gray-700",children:"Regular Session"})]}),e.jsxs("label",{className:"flex items-center",children:[e.jsx("input",{type:"radio",checked:r.callingType==="Festival/Event",onChange:()=>u({...r,callingType:"Festival/Event"}),className:"text-blue-600 focus:ring-blue-500 h-4 w-4"}),e.jsx("span",{className:"ml-2 text-sm text-gray-700",children:"Festival / Event"})]})]})]}),e.jsxs("div",{className:"mt-5 sm:mt-6 flex gap-3",children:[e.jsx("button",{type:"button",onClick:x,className:"flex-1 inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:text-sm",children:"Cancel"}),e.jsx("button",{type:"submit",disabled:S,className:"flex-1 inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:text-sm disabled:opacity-50",children:S?"Scheduling...":"Schedule Class"})]})]})]})})]})}):null},Ls=()=>{const{user:s}=le(),x=be(),{addStudent:y}=Ne(),{batches:p}=re(),{classSchedules:f}=ve(),{config:S}=we(),[k,r]=c.useState(!1),[u,v]=c.useState(!1),[B,N]=c.useState(!1),[n,g]=c.useState(!0),[w,ie]=c.useState(!1),q=(s==null?void 0:s.role)==="Admin"||!!(s!=null&&s.eventMgmt),I=(s==null?void 0:s.role)==="Admin"||!!(s!=null&&s.eventMgmt)&&(s==null?void 0:s.role)!=="Volunteer",[H,R]=c.useState(!1);c.useEffect(()=>{if(!q||!(s!=null&&s.id)){R(!1);return}let t=!1;return(async()=>{try{const o=(await $(M(T,"events"))).docs.some(m=>(m.data().workflowNodes||[]).some(a=>
11(a.assignedUserIds||[]).includes(s.id)));t||R(o)}catch(l){console.error("Failed to check checkpoint assignment:",l)}})(),()=>{t=!0}},[q,s==null?void 0:s.id]);const D=(s==null?void 0:s.role)==="Admin"||(s==null?void 0:s.role)==="Facilitator",{users:Q}=Be({roles:De}),ce=c.useMemo(()=>Ae(Q),[Q]),[V,A]=c.useState(null);c.useEffect(()=>{if(!D){A(null);return}const t=je(J(M(T,"events"),Y("createdAt","desc"),K(5)),l=>{const o=l.docs.map(a=>Fe(a.id,a.data())),m=(s==null?void 0:s.role)==="Admin"?o:o.filter(a=>a.status==="published");A(m[0]||null)},()=>A(null));return()=>t()},[D,s==null?void 0:s.role]);const[E,oe]=c.useState([]),[de,z]=c.useState(!1),[me,xe]=c.useState(!1),he=async t=>{if(y){const l={...t};(s==null?void 0:s.role)==="Facilitator"&&!l.batch&&(l.connectedWith=s.id),await y(l),r(!1)}},_=c.useMemo(()=>{if(!s||!f)return[];const t=new Date;let l=f.filter(o=>{if(o.status!=="Scheduled")return!1;const m=new Date(o.date),[a,d]=(o.time||"00:00").split(":").map(Number);return m.setHours(a||0,d||0,0,0),m.getTime()>=t.getTime()});if(s.role==="Facilitator"){const o=p.filter(a=>{var d;return(d=a.batchHeads)==null?void 0:d.includes(s==null?void 0:s.id)}),m=new Set(o.map(a=>a.title));l=l.filter(a=>(a.batch||"").split(",").map(i=>i.trim()).some(i=>m.has(i)))}else(s.role==="Volunteer"||s.role==="Member")&&(s.batch?l=l.filter(o=>(o.batch||"").includes(s.batch)):l=[]);return l.sort((o,m)=>o.date.getTime()-m.date.getTime()),l},[f,s,p]),ue=async()=>{const t=!w;if(ie(t),t&&!me){z(!0);try{const l=new Date;l.setHours(0,0,0,0);const o=J(M(T,"classSchedules"),ye("date","<",l),Y("date","desc"),K(20)),a=(await $(o)).docs.map(d=>{var h,b,C;const i=d.data();return{id:d.id,...i,date:((h=i.date)==null?void 0:h.toDate())||new Date,createdAt:((b=i.createdAt)==null?void 0:b.toDate())||new Date,updatedAt:((C=i.updatedAt)==null?void 0:C.toDate())||new Date}});oe(a),xe(!0)}catch(l){console.error("Error fetching past classes:",l)}finally{z(!1)}}},W=c.useMemo(()=>{if(!s)return[];const t=new Date;let l=[...E];const o=new Set(E.map(a=>a.id));f.forEach(a=>{if(!o.has(a.id)){const d=new Date(a.date),[i,h]=(a.time||"00:00").split(":").map(Number);d.setHours(i||0,h||0,0,0),d.getTime()<t.getTime()&&l.push(a)}});const m=new Set;if(l=l.filter(a=>m.has(a.id)?!1:(m.add(a.id),!0)),s.role==="Facilitator"){const a=p.filter(i=>{var h;return(h=i.batchHeads)==null?void 0:h.includes(s==null?void 0:s.id)}),d=new Set(a.map(i=>i.title));l=l.filter(i=>(i.batch||"").split(",").map(b=>b.trim()).some(b=>d.has(b)))}else(s.role==="Volunteer"||s.role==="Member")&&(s.batch?l=l.filter(a=>(a.batch||"").includes(s.batch)):l=[]);return l.sort((a,d)=>{const i=new Date(a.date),h=new Date(d.date),[b,C]=(a.time||"00:00").split(":").map(Number),[ge,pe]=(d.time||"00:00").split(":").map(Number);return i.setHours(b||0,C||0,0,0),h.setHours(ge||0,pe||0,0,0),h.getTime()-i.getTime()}),l},[E,f,s,p]),G=c.useMemo(()=>_.slice(0,5).map(t=>({id:t.id,title:t.title,speaker:t.speaker,date:t.date,time:t.time,batch:t.batch})),[_]),F=I||H?e.jsxs(e.Fragment,{children:[I&&e.jsxs("button",{onClick:()=>x("/event-management/events"),className:"p-3 bg-indigo-50 rounded-lg border border-indigo-200 hover:bg-indigo-100 transition-colors duration-200 flex flex-col items-center text-center justify-center gap-2",children:[e.jsx(ee,{className:"h-6 w-6 text-indigo-600"}),e.jsx("span",{className:"font-medium text-gray-900 text-sm",children:"Event Management"})]}),H&&e.jsxs("button",{onClick:()=>x("/event-management/scanner"),className:"p-3 bg-rose-50 rounded-lg border border-rose-200 hover:bg-rose-100 transition-colors duration-200 flex flex-col items-center text-center justify-center gap-2",children:[e.jsx(Ue,{className:"h-6 w-6 text-rose-600"}),e.jsx("span",{className:"font-medium text-gray-900 text-sm",children:"Scan Passes"})]})]}):null;return e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx("div",{className:"hidden sm:flex items-center justify-between",children:e.jsx("div",{children:e.jsxs("h1",{className:"text-3xl font-bold text-gray-900",children:["Welcome, ",s==null?void 0:s.name]})})}),((s==null?void 0:s.role)==="Admin"||(s==null?void 0:s.role)==="Facilitator")&&e.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 flex flex-col",children:[e.jsx("div",{className:"p-4 border-b border-gray-200",children:e.jsxs("h2",{className:"text-lg font-semibold text-gray-900 flex items-center",children:[e.jsx(O,{className:"h-5 w-5 mr-2 text-gray-500"}),"Quick Actions"]})}),e.jsx("div",{className:"p-4 flex-1 flex items-center",children:e.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 w-full",children:[F,e.jsxs("button",{onClick:()=>r(!0),className:"p-3 bg-blue-50 rounded-lg border border-blue-200 hover:bg-blue-100 transition-colors duration-200 flex flex-col items-center text-center justify-center gap-2",children:[e.jsx(U,{className:"h-6 w-6 text-blue-600"}),e.jsx("span",{className:"font-medium text-gray-900 text-sm",children:"Add Member"})]}),e.jsxs("button",{onClick:()=>v(!0),className:"p-3 bg-green-50 rounded-lg border border-green-200 hover:bg-green-100 transition-colors duration-200 flex flex-col items-center text-center justify-center gap-2",children:[e.jsx(qe,{className:"h-6 w-6 text-green-600"}),e.jsx("span",{className:"font-medium text-gray-900 text-sm",children:"Schedule Class"})]}),e.jsxs("button",{onClick:()=>x("/forms/new"),className:"p-3 bg-purple-50 rounded-lg border border-purple-200 hover:bg-purple-100 transition-colors duration-200 flex flex-col items-center text-center justify-center gap-2",children:[e.jsx(Pe,{className:"h-6 w-6 text-purple-600"}),e.jsx("span",{className:"font-medium text-gray-900 text-sm",children:"Create Form"})]}),e.jsxs("button",{onClick:()=>N(!0),className:"p-3 bg-orange-50 rounded-lg border border-orange-200 hover:bg-orange-100 transition-colors duration-200 flex flex-col items-center text-center justify-center gap-2",children:[e.jsx(L,{className:"h-6 w-6 text-orange-600"}),e.jsx("span",{className:"font-medium text-gray-900 text-sm",children:"Fill Sadhna Report"})]}),e.jsxs("button",{onClick:()=>x("/calling"),className:"p-3 bg-teal-50 rounded-lg border border-teal-200 hover:bg-teal-100 transition-colors duration-200 flex flex-col items-center text-center justify-center gap-2",children:[e.jsx(Z,{className:"h-6 w-6 text-teal-600"}),e.jsx("span",{className:"font-medium text-gray-900 text-sm",children:"Calling Service"})]})]})})]}
11),(s==null?void 0:s.role)==="Volunteer"&&e.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 flex flex-col",children:[e.jsx("div",{className:"p-4 border-b border-gray-200",children:e.jsxs("h2",{className:"text-lg font-semibold text-gray-900 flex items-center",children:[e.jsx(O,{className:"h-5 w-5 mr-2 text-gray-500"}),"Quick Actions"]})}),e.jsx("div",{className:"p-4 flex-1 flex items-center",children:e.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 w-full",children:[F,e.jsxs("button",{onClick:()=>x("/calling"),className:"p-3 bg-teal-50 rounded-lg border border-teal-200 hover:bg-teal-100 transition-colors duration-200 flex flex-col items-center text-center justify-center gap-2",children:[e.jsx(Z,{className:"h-6 w-6 text-teal-600"}),e.jsx("span",{className:"font-medium text-gray-900 text-sm",children:"Calling Service"})]}),e.jsxs("button",{onClick:()=>N(!0),className:"p-3 bg-orange-50 rounded-lg border border-orange-200 hover:bg-orange-100 transition-colors duration-200 flex flex-col items-center text-center justify-center gap-2",children:[e.jsx(L,{className:"h-6 w-6 text-orange-600"}),e.jsx("span",{className:"font-medium text-gray-900 text-sm",children:"Fill Sadhna Report"})]})]})})]}),(s==null?void 0:s.role)==="Member"&&e.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 flex flex-col",children:[e.jsx("div",{className:"p-4 border-b border-gray-200",children:e.jsxs("h2",{className:"text-lg font-semibold text-gray-900 flex items-center",children:[e.jsx(O,{className:"h-5 w-5 mr-2 text-gray-500"}),"Quick Actions"]})}),e.jsx("div",{className:"p-4 flex-1 flex items-center",children:e.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 w-full",children:[F,e.jsxs("button",{onClick:()=>N(!0),className:"p-3 bg-orange-50 rounded-lg border border-orange-200 hover:bg-orange-100 transition-colors duration-200 flex flex-col items-center text-center justify-center gap-2",children:[e.jsx(L,{className:"h-6 w-6 text-orange-600"}),e.jsx("span",{className:"font-medium text-gray-900 text-sm",children:"Fill Sadhna Report"})]})]})})]}),B&&e.jsx(Te,{onSaved:()=>{N(!1)},openFormInitially:!0}),D&&V&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("h2",{className:"text-lg font-semibold text-gray-900 flex items-center",children:[e.jsx(ee,{className:"h-5 w-5 mr-2 text-indigo-600"}),"Latest Event"]}),e.jsx("button",{onClick:()=>x("/event-management/events"),className:"text-sm font-medium text-blue-600 hover:underline",children:"View all events"})]}),e.jsx(Ee,{event:V,canManage:(s==null?void 0:s.role)==="Admin",canOpenEvent:(s==null?void 0:s.role)==="Facilitator",usersById:ce})]}),e.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden",children:[e.jsxs("button",{onClick:()=>g(!n),className:"w-full px-6 py-4 flex items-center justify-between bg-gray-50 hover:bg-gray-100 transition-colors",children:[e.jsxs("h2",{className:"text-lg font-semibold text-gray-900 flex items-center",children:[e.jsx(j,{className:"h-5 w-5 mr-2 text-indigo-600"}),"Upcoming Classes"]}),n?e.jsx(se,{className:"h-5 w-5 text-gray-500"}):e.jsx(te,{className:"h-5 w-5 text-gray-500"})]}),n&&e.jsx("div",{className:"divide-y divide-gray-200",children:G.length>0?G.map(t=>e.jsx("div",{className:"p-6 hover:bg-gray-50 transition-colors",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-start space-x-4",children:[e.jsx("div",{className:"p-2 bg-indigo-50 rounded-lg shrink-0",children:e.jsx(j,{className:"h-6 w-6 text-indigo-600"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-900",children:t.title}),e.jsx("p",{className:"text-sm text-gray-500",children:t.speaker}),e.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-gray-500",children:[e.jsxs("span",{className:"flex items-center",children:[e.jsx(j,{className:"h-3 w-3 mr-1"}),ae(t.date,"MMM d, yyyy")]}),e.jsxs("span",{className:"flex items-center",children:[e.jsx(U,{className:"h-3 w-3 mr-1"}),t.batch]})]})]})]}),e.jsx("div",{className:"text-left sm:text-right pl-[3.25rem] sm:pl-0",children:e.jsx("p",{className:"text-sm font-medium text-gray-900",children:t.time})})]})},t.id)):e.jsx("div",{className:"p-6 text-center text-gray-500",children:"No upcoming classes"})})]}),e.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden",children:[e.jsxs("button",{onClick:ue,className:"w-full px-6 py-4 flex items-center justify-between bg-gray-50 hover:bg-gray-100 transition-colors",children:[e.jsxs("h2",{className:"text-lg font-semibold text-gray-900 flex items-center",children:[e.jsx(j,{className:"h-5 w-5 mr-2 text-gray-600"}),"Past Classes"]}
11),w?e.jsx(se,{className:"h-5 w-5 text-gray-500"}):e.jsx(te,{className:"h-5 w-5 text-gray-500"})]}),w&&e.jsx("div",{className:"divide-y divide-gray-200",children:de?e.jsx("div",{className:"p-6 flex justify-center",children:e.jsx(Oe,{className:"h-6 w-6 animate-spin text-gray-500"})}):W.length>0?W.map(t=>e.jsx("div",{className:"p-6 hover:bg-gray-50 transition-colors",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-start space-x-4",children:[e.jsx("div",{className:"p-2 bg-gray-50 rounded-lg shrink-0",children:e.jsx(j,{className:"h-6 w-6 text-gray-600"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-900",children:t.title}),e.jsx("p",{className:"text-sm text-gray-500",children:t.speaker}),e.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-gray-500",children:[e.jsxs("span",{className:"flex items-center",children:[e.jsx(j,{className:"h-3 w-3 mr-1"}),ae(t.date,"MMM d, yyyy")]}),e.jsxs("span",{className:"flex items-center",children:[e.jsx(U,{className:"h-3 w-3 mr-1"}),t.batch]})]})]})]}),e.jsxs("div",{className:"text-left sm:text-right pl-[3.25rem] sm:pl-0",children:[e.jsx("p",{className:"text-sm font-medium text-gray-900",children:t.time}),e.jsx("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800 mt-1",children:"Completed"})]})]})},t.id)):e.jsx("div",{className:"p-6 text-center text-gray-500",children:"No past classes"})})]}),e.jsx(Se,{isOpen:k,onClose:()=>r(!1),student:null,onSave:he,config:S}),e.jsx(Re,{isOpen:u,onClose:()=>v(!1),onSuccess:()=>{}})]})};export{Ls 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.