PageSourceSearch

https://hudumacna.com/static/js/9281.55268e37.chunk.js

js hudumacna.com collected 2026-10-09 22:39:37 UTC 22,388 bytes, 2 lines download raw bytes

1/*! For license information please see 9281.55268e37.chunk.js.LICENSE.txt */
2"use strict";(self.webpackChunkstudent_management_app=self.webpackChunkstudent_management_app||[]).push([[9281],{606:(e,t,s)=>{s.d(t,{A:()=>a});const a=(0,s(7101).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},28165:(e,t,s)=>{s.d(t,{A:()=>a});const a=(0,s(7101).A)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},32630:(e,t,s)=>{s.d(t,{A:()=>a});const a=(0,s(7101).A)("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]])},39360:(e,t,s)=>{s.d(t,{A:()=>a});const a=(0,s(7101).A)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},40732:(e,t,s)=>{s.d(t,{A:()=>r});s(9950);var a=s(44414);const r=e=>{let{size:t="medium",color:s="blue"}=e;const r={small:"w-4 h-4",medium:"w-8 h-8",large:"w-12 h-12"}[t],l={blue:"text-blue-600",gray:"text-gray-600",white:"text-white"}[s];return(0,a.jsx)("div",{className:"flex justify-center items-center",children:(0,a.jsxs)("svg",{className:`animate-spin ${r} ${l}`,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})})}},48805:(e,t,s)=>{s.d(t,{$:()=>r});s(9950);var a=s(44414);const r=e=>{let{children:t,variant:s="primary",size:r="default",isLoading:l=!1,disabled:n=!1,icon:i,onClick:c,type:d="button",className:o="",...m}=e;const x=n||l?"opacity-50 cursor-not-allowed":"";return(0,a.jsxs)("button",{type:d,className:`inline-flex items-center justify-center font-medium rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 transition-colors duration-200 ${{primary:"bg-primary-600 text-white hover:bg-primary-700 focus:ring-primary-500",secondary:"bg-gray-100 text-gray-700 hover:bg-gray-200 focus:ring-gray-500",danger:"bg-red-600 text-white hover:bg-red-700 focus:ring-red-500",success:"bg-green-600 text-white hover:bg-green-700 focus:ring-green-500",outline:"border border-gray-300 bg-white text-gray-700 hover:bg-gray-50 focus:ring-primary-500"}[s]} ${{small:"px-3 py-1.5 text-sm",default:"px-4 py-2 text-sm",large:"px-6 py-3 text-base"}[r]} ${x} ${o}`,disabled:n||l,onClick:c,...m,children:[l&&(0,a.jsxs)("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-current",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),i&&!l&&(0,a.jsx)(i,{className:"h-5 w-5 mr-2","aria-hidden":"true"}),t]})}},49281:(e,t,s)=>{s.r(t),s.d(t,{default:()=>S});var a=s(9950),r=s(73814),l=s(56600),n=s(69212),i=s(606),c=s(39360),d=s(73142),o=s(28165),m=s(65455),x=s(19888),p=s(19535),u=s(99590),h=s(32630),y=s(92011),g=s(7101);const j=(0,g.A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),f=(0,g.A)("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);var b=s(40732),v=s(48805),w=s(67714),N=s(99845),k=s(44414);const A={reminder:{subject:"Reminder: Complete Your Training Enrollment",body:"Dear {name},\n\nWe noticed that you haven't completed your training enrollment process.\nYour intended start date is {startDate}.\n\nPlease complete the necessary steps to secure your spot in the program.\n\nBest regards,\nCaregiver Training and Huduma Center LLC"},approved:{subject:"Training Enrollment Approved",body:"Dear {name},\n\nCongratulations! Your training enrollment has been approved.\nYour start date is confirmed for {startDate}.\n\nWe look forward to having you join us.\n\nBest regards,\nCaregiver Training and Huduma Center LLC"}},C=e=>{let{title:t,value:s,icon:a,color:r}=e;return(0,k.jsx)("div",{className:"bg-white rounded-lg shadow p-4",children:(0,k.jsxs)("div",{className:"flex items-center",children:[(0,k.jsx)("div",{className:`p-2 rounded-lg ${r}`,children:(0,k.jsx)(a,{className:"h-6 w-6 text-white"})}),(0,k.jsxs)("div",{className:"ml-4",children:[(0,k.jsx)("p",{className:"text-sm text-gray-500",children:t}),(0,k.jsx)("p",{className:"text-xl font-semibold",children:s})]})]})})},S=()=>{const e=(0,r.Zp)(),{showConfirm:t}=(0,N.M)(),[s,g]=(0,a.useState)([]),[S,M]=(0,a.useState)(!0),[D,$]=(0,a.useState)(null),[E,z]=(0,a.useState)(""),[L,O]=(0,a.useState)(null),[P,H]=(0,a.useState)({status:"all",startDate:"",country:"all"}),{showToast:T}=(0,w.d)(),[U,G]=(0,a.useState)(new Set),[R]=(0,a.useState)({field:"submittedAt",direction:"desc"}),[V,B]=(0,a.useState)(!1),[I,_]=(0,a.useState)({subject:"",body:""}),F=[...new Set(s.map(e=>(e.countryOfOrigin||"").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")))].filter(e=>e),W={total:s.length,pending:s.filter(e=>"pending"===e.status).length,approved:s.filter(e=>"approved"===e.status).length,rejected:s.filter(e=>"rejected"===e.status).length};(0,a.useEffect)(()=>{(0,l.Ij)("reconcileAllApprovedEnrollments").catch(e=>{console.error("Could not reconcile approved enrollments:",e)});const e=(0,l.P)((0,l.rJ)(l.db,"enrollments"),(0,l.My)("submittedAt","desc")),t=(0,l.aQ)(e,e=>{g(e.docs.map(e=>{var t;return{id:e.id,...e.data(),submittedAt:(null===(t=e.data().submittedAt)||void 0===t?void 0:t.toDate())||new Date}})),M(!1)},e=>{console.error("Error fetching enrollments:",e),$("Failed to load enrollments"),M(!1)});return()=>t()},[]);const Y=async(e,t)=>{try{const s=(0,l.H9)(l.db,"enrollments",e);if(await(0,l.mZ)(s,{status:t,updatedAt:(0,l.O5)()}),"approved"===t){const t=await(0,l.Ij)("reconcileApprovedEnrollment",{enrollmentId:e});T(t.studentId?"Enrollment approved and student activated":"Enrollment approved; activation is being finalized","success")}else T("Status updated successfully","success");O(null)}catch(D){console.error("Error updating status:",D),T("Failed to update status","error")}},q=s.filter(e=>{var t,s,a;const r=(null===(t=e.fullName)||void 0===t?void 0:t.toLowerCase().includes(E.toLowerCase()))||(null===(s=e.email)||void 0===s?void 0:s.toLowerCase().includes(E.toLowerCase()))||(null===(a=e.countryOfOrigin)||void 0===a?void 0:a.toLowerCase().includes(E.toLowerCase())),l="all"===P.status||e.status===P.status,n="all"===P.country||(e.countryOfOrigin?e.countryOfOrigin.toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):"")===P.country,i=!P.startDate||e.intendedStartDate===P.startDate;return r&&l&&n&&i}),Z=async e=>{if(0===U.size)return void T("Please select enrollments first","warning");if(await t(`Are you sure you want to ${e} ${U.size} enrollment(s)?`,{title:"Bulk Action",confirmText:"Confirm"}))try{const t=l.db.batch();
2U.forEach(s=>{const a=(0,l.H9)(l.db,"enrollments",s);switch(e){case"approve":t.update(a,{status:"approved",updatedAt:(0,l.O5)()});break;case"reject":t.update(a,{status:"rejected",updatedAt:(0,l.O5)()});break;case"delete":t.delete(a)}}),await t.commit(),"approve"===e&&await(0,l.Ij)("reconcileAllApprovedEnrollments"),T(`Successfully ${e}d ${U.size} enrollment(s)`,"success"),G(new Set)}catch(D){console.error(`Error in bulk ${e}:`,D),T(`Failed to ${e} enrollments`,"error")}},J=[...q].sort((e,t)=>{const s=e[R.field],a=t[R.field];return"asc"===R.direction?s<a?-1:1:s>a?-1:1}),Q=()=>(0,k.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4",children:(0,k.jsx)("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-2xl",children:(0,k.jsxs)("div",{className:"p-6",children:[(0,k.jsx)("h3",{className:"text-xl font-bold text-gray-900 mb-4",children:"Send Email"}),(0,k.jsxs)("div",{className:"space-y-4",children:[(0,k.jsxs)("div",{children:[(0,k.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Subject"}),(0,k.jsx)("input",{type:"text",value:I.subject,onChange:e=>_(t=>({...t,subject:e.target.value})),className:"w-full px-3 py-2 border border-gray-300 rounded-md"})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Message"}),(0,k.jsx)("textarea",{value:I.body,onChange:e=>_(t=>({...t,body:e.target.value})),rows:"8",className:"w-full px-3 py-2 border border-gray-300 rounded-md"})]}),(0,k.jsxs)("div",{className:"flex justify-end space-x-3",children:[(0,k.jsx)(v.$,{variant:"outline",onClick:()=>B(!1),children:"Cancel"}),(0,k.jsx)(v.$,{variant:"primary",onClick:()=>{T("Email sent successfully","success"),B(!1)},children:"Send Email"})]})]})]})})});return S?(0,k.jsx)("div",{className:"flex justify-center items-center min-h-[400px]",children:(0,k.jsx)(b.A,{size:"large"})}):D?(0,k.jsx)("div",{className:"bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded relative",children:D}):(0,k.jsxs)("div",{className:"p-3 sm:p-4 lg:p-6 min-w-0",children:[(0,k.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-3 sm:gap-4 mb-6",children:[(0,k.jsx)(C,{title:"Total Enrollments",value:W.total,icon:i.A,color:"bg-blue-500"}),(0,k.jsx)(C,{title:"Pending",value:W.pending,icon:c.A,color:"bg-yellow-500"}),(0,k.jsx)(C,{title:"Approved",value:W.approved,icon:d.A,color:"bg-green-500"}),(0,k.jsx)(C,{title:"Rejected",value:W.rejected,icon:o.A,color:"bg-red-500"})]}),(0,k.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:justify-between sm:items-start mb-6",children:[(0,k.jsxs)("div",{children:[(0,k.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Training Enrollments"}),(0,k.jsx)("p",{className:"text-gray-600 mt-1",children:"Manage and track student enrollment applications"})]}),(0,k.jsxs)("div",{className:"flex flex-wrap gap-2 sm:justify-end",children:[U.size>0&&(0,k.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,k.jsx)(v.$,{variant:"primary",onClick:()=>Z("approve"),icon:d.A,children:"Approve Selected"}),(0,k.jsx)(v.$,{variant:"outline",onClick:()=>Z("reject"),icon:o.A,children:"Reject Selected"}),(0,k.jsx)(v.$,{variant:"danger",onClick:()=>Z("delete"),icon:m.A,children:"Delete Selected"})]}),(0,k.jsx)(v.$,{variant:"outline",onClick:()=>{const e=[["Full Name","Email","Phone","Country","Start Date","Status","Submitted"],...s.map(e=>[e.fullName,e.email,e.phoneNumber,e.countryOfOrigin,e.intendedStartDate,e.status,(0,n.GP)(e.submittedAt,"MMM dd, yyyy HH:mm")])].map(e=>e.join(",")).join("\\n"),t=new Blob([e],{type:"text/csv"}),a=window.URL.createObjectURL(t),r=document.createElement("a");r.href=a,r.download=`enrollments-${(0,n.GP)(new Date,"yyyy-MM-dd")}.csv`,r.click()},icon:x.A,children:"Export to CSV"})]})]}),(0,k.jsx)("div",{className:"bg-white p-3 sm:p-4 rounded-lg shadow mb-6",children:(0,k.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-4",children:[(0,k.jsxs)("div",{children:[(0,k.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Search"}),(0,k.jsx)("input",{type:"text",placeholder:"Search enrollments...",value:E,onChange:e=>z(e.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Status"}),(0,k.jsxs)("select",{value:P.status,onChange:e=>H(t=>({...t,status:e.target.value})),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500",children:[(0,k.jsx)("option",{value:"all",children:"All Statuses"}),(0,k.jsx)("option",{value:"pending",children:"Pending"}),(0,k.jsx)("option",{value:"approved",children:"Approved"}),(0,k.jsx)("option",{value:"rejected",children:"Rejected"})]})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Country"}),(0,k.jsxs)("select",{value:P.country,onChange:e=>H(t=>({...t,country:e.target.value})),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500",children:[(0,k.jsx)("option",{value:"all",children:"All Countries"}),F.map(e=>(0,k.jsx)("option",{value:e,children:e},e))]})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Start Date"}),(0,k.jsx)("input",{type:"date",value:P.startDate,onChange:e=>H(t=>({...t,startDate:e.target.value})),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]})]})}),(0,k.jsxs)("div",{className:"bg-white rounded-lg shadow overflow-hidden",children:[(0,k.jsxs)("div",{className:"md:hidden divide-y divide-gray-200",children:[0===J.length&&(0,k.jsx)("p",{className:"p-6 text-center text-sm text-gray-500",children:"No enrollments match these filters."}),J.map(t=>(0,k.jsx)("article",{className:"p-4",children:(0,k.jsxs)("div",{className:"flex items-start gap-3",children:[(0,k.jsx)("input",{type:"checkbox",checked:U.has(t.id),onChange:e=>{const s=new Set(U);e.target.checked?s.add(t.id):s.delete(t.id),G(s)},className:"mt-1 rounded border-gray-300","aria-label":`Select ${t.fullName}`}),(0,k.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,k.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,k.jsx)("h3",{className:"font-semibold text-gray-900 break-words",children:t.fullName||"Unnamed enrollment"}),(0,k.jsx)("span",{className:"px-2 py-1 text-xs font-semibold rounded-full "+("approved"===t.status?"bg-green-100 text-green-800":"rejected"===t.status?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"),children:t.status?t.status.charAt(0).toUpperCase()+t.status.slice(1):"Pending"})]}),(0,k.jsx)("p",{className:"mt-1 text-xs font-semibold text-blue-700",children:t.programName||("hca"===t.type?"CNA Training":"Training enrollment")}),(0,k.jsxs)("div",{className:"mt-3 space-y-1.5 text-sm text-gray-600",children:[(0,k.jsxs)("p",{className:"flex min-w-0 items-center gap-2",children:[(0,k.jsx)(p.A,{className:"h-4 w-4 flex-none"}),(0,k.jsx)("span",{className:"truncate",children:t.email||t.emailAddress||"No email"})]}),(0,k.jsxs)("p",{className:"flex items-center gap-2",children:[(0,k.jsx)(u.A,{className:"h-4 w-4 flex-none"}),t.phoneNumber||"No phone"]}),(0,k.jsxs)("p",{className:"flex items-center gap-2",children:[(0,k.jsx)(h.A,{className:"h-4 w-4 flex-none"}),t.intendedStartDate?(0,n.GP)(new Date(t.intendedStartDate),"MMM dd, yyyy"):"Start date not set"]})]}),(0,k.jsx)(v.$,{variant:"outline",onClick:()=>e(`/dashboard/enrollments/${t.id}`),className:"mt-4 w-full",children:"View Details"})]})]})},t.id))]}),(0,k.jsx)("div",{className:"hidden md:block overflow-x-auto",children:(0,k.jsxs)("table",{className:"min-w-full divide-y divide-gray-200",children:[(0,k.jsx)("thead",{className:"bg-gray-50",children:(0,k.jsxs)("tr",{children:[(0,k.jsx)("th",{className:"px-6 py-3 text-left",children:(0,k.jsx)("input",{type:"checkbox",checked:U.size===q.length,onChange:e=>{e.target.checked?G(new Set(q.map(e=>e.id))):G(new Set)},className:"rounded border-gray-300"})}),(0,k.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Type"}),(0,k.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Student Details"}),(0,k.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Contact Information"}),(0,k.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Country/Origin"}),(0,k.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Start Date"}),(0,k.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),(0,k.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Submitted"}),(0,k.jsx)("th",{className:"px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),(0,k.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:J.map(s=>(0,k.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,k.jsx)("td",{className:"px-6 py-4",children:(0,k.jsx)("input",{type:"checkbox",checked:U.has(s.id),onChange:e=>{const t=new Set(U);e.target.checked?t.add(s.id):t.delete(s.id),G(t)},className:"rounded border-gray-300"})}),(0,k.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,k.jsx)("span",{className:"px-2 py-1 inline-flex text-xs leading-5 font-semibold rounded-full "+("hca"===s.type?"bg-blue-100 text-blue-800":"bg-purple-100 text-purple-800"),children:"hca"===s.type?"CNA Training":"cna"===s.type?s.programName||"CNA Enrollment":"State Exam"})}),(0,k.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,k.jsxs)("div",{className:"flex items-center",children:[(0,k.jsx)(y.A,{className:"h-5 w-5 text-gray-400 mr-2"}),(0,k.jsx)("div",{className:"text-sm font-medium text-gray-900",children:s.fullName})]})}),(0,k.jsx)("td",{className:"px-6 py-4",children:(0,k.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,k.jsxs)("div",{className:"flex items-center text-sm text-gray-500",children:[(0,k.jsx)(u.A,{className:"h-4 w-4 mr-2"}),s.phoneNumber]}),(0,k.jsxs)("div",{className:"flex items-center text-sm text-gray-500",children:[(0,k.jsx)(p.A,{className:"h-4 w-4 mr-2"}),"state_exam"===s.type?s.emailAddress:s.email]})]})}),(0,k.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,k.jsxs)("div",{className:"flex items-center",children:[(0,k.jsx)(j,{className:"h-5 w-5 text-gray-400 mr-2"}),(0,k.jsx)("div",{className:"text-sm text-gray-900",children:s.countryOfOrigin})]})}),(0,k.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,k.jsxs)("div",{className:"flex items-center",children:[(0,k.jsx)(h.A,{className:"h-5 w-5 text-gray-400 mr-2"}),(0,k.jsx)("div",{className:"text-sm text-gray-900",children:"state_exam"===s.type?(0,n.GP)(new Date(s.trainingCompletionDate),"MMM dd, yyyy"):(0,n.GP)(new Date(s.intendedStartDate),"MMM dd, yyyy")})]})}),(0,k.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,k.jsx)("span",{className:"px-2 py-1 inline-flex text-xs leading-5 font-semibold rounded-full "+("pending"===s.status?"bg-yellow-100 text-yellow-800":"approved"===s.status?"bg-green-100 text-green-800":"rejected"===s.status?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"),children:s.status.charAt(0).toUpperCase()+s.status.slice(1)})}),(0,k.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:(0,n.GP)(s.submittedAt,"MMM dd, yyyy HH:mm")}
2),(0,k.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm font-medium",children:(0,k.jsxs)("div",{className:"relative",children:[(0,k.jsx)(v.$,{variant:"ghost",onClick:()=>e(`/dashboard/enrollments/${s.id}`),className:"mr-2",children:"View Details"}),(0,k.jsxs)("div",{className:"relative inline-block",children:[(0,k.jsx)(v.$,{variant:"ghost",onClick:()=>O(L===s.id?null:s.id),icon:f}),L===s.id&&(0,k.jsx)("div",{className:"absolute right-0 mt-2 w-48 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 z-10",children:(0,k.jsxs)("div",{className:"py-1",role:"menu",children:[(0,k.jsx)("button",{onClick:()=>Y(s.id,"approved"),className:"w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",children:"Approve"}),(0,k.jsx)("button",{onClick:()=>Y(s.id,"rejected"),className:"w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",children:"Reject"}),(0,k.jsx)("button",{onClick:()=>(async(e,t)=>{const s=A[t];if(!s)return;const a=s.subject,r=s.body.replace("{name}",e.fullName).replace("{startDate}",(0,n.GP)(new Date(e.intendedStartDate),"MMM dd, yyyy"));_({subject:a,body:r}),B(!0)})(s,"reminder"),className:"w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",children:"Send Reminder"}),(0,k.jsx)("button",{onClick:()=>(async e=>{if(await t("Are you sure you want to delete this enrollment?",{type:"confirm-danger",title:"Delete Enrollment",confirmText:"Delete"}))try{await(0,l.kd)((0,l.H9)(l.db,"enrollments",e)),T("Enrollment deleted successfully","success"),O(null)}catch(D){console.error("Error deleting enrollment:",D),T("Failed to delete enrollment","error")}})(s.id),className:"w-full text-left px-4 py-2 text-sm text-red-600 hover:bg-gray-100",children:"Delete"})]})})]})]})})]},s.id))})]})})]}),V&&(0,k.jsx)(Q,{})]})}},65455:(e,t,s)=>{s.d(t,{A:()=>a});
2const a=(0,s(7101).A)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},73142:(e,t,s)=>{s.d(t,{A:()=>a});const a=(0,s(7101).A)("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},92011:(e,t,s)=>{s.d(t,{A:()=>a});const a=(0,s(7101).A)("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},99590:(e,t,s)=>{s.d(t,{A:()=>a});const a=(0,s(7101).A)("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]])}}]);

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.