PageSourceSearch

https://hudumacna.com/static/js/7007.55e7f2ba.chunk.js

js hudumacna.com collected 2026-10-09 22:39:36 UTC 13,050 bytes, 2 lines download raw bytes

1/*! For license information please see 7007.55e7f2ba.chunk.js.LICENSE.txt */
2"use strict";(self.webpackChunkstudent_management_app=self.webpackChunkstudent_management_app||[]).push([[7007],{3278:(e,s,t)=>{t.d(s,{A:()=>a});const a=(0,t(7101).A)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},22050:(e,s,t)=>{t.d(s,{A:()=>a});const a=(0,t(7101).A)("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]])},28400:(e,s,t)=>{t.d(s,{A:()=>a});const a=(0,t(7101).A)("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]])},33412:(e,s,t)=>{t.d(s,{A:()=>a});const a=(0,t(7101).A)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},37488:(e,s,t)=>{t.d(s,{A:()=>a});const a=(0,t(7101).A)("CalendarDays",[["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"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]])},38284:(e,s,t)=>{t.d(s,{A:()=>a});const a=(0,t(7101).A)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},43654:(e,s,t)=>{t.d(s,{A:()=>a});const a=(0,t(7101).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},47288:(e,s,t)=>{t.d(s,{A:()=>a});const a=(0,t(7101).A)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},57007:(e,s,t)=>{t.r(s),t.d(s,{default:()=>f});var a=t(9950),r=t(47288),i=t(33412);const n=(0,t(7101).A)("UsersRound",[["path",{d:"M18 21a8 8 0 0 0-16 0",key:"3ypg7q"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3",key:"10s06x"}]]);var d=t(37488),l=t(28400),c=t(22050),o=t(38284),m=t(3278),x=t(43654),h=t(71057),g=t(56600),p=t(67714),u=t(44414);const y=e=>new Date(e).toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric",year:"numeric",timeZone:"America/Los_Angeles"}),j=e=>new Date(e).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",timeZone:"America/Los_Angeles"}),b=e=>(null===e||void 0===e?void 0:e.displayName)||(null===e||void 0===e?void 0:e.email)||"Instructor";function f(){const{showToast:e}=(0,p.d)(),[s,t]=(0,a.useState)([]),[f,v]=(0,a.useState)([]),[N,A]=(0,a.useState)(!0),[w,k]=(0,a.useState)(""),[C,M]=(0,a.useState)(""),[U,S]=(0,a.useState)("upcoming"),[I,_]=(0,a.useState)({}),L=(0,a.useCallback)(async()=>{A(!0);try{const e=await(0,g.Ij)("getInstructorManagement");t(e.tutors||[]),v((e.schedules||[]).sort((e,s)=>e.startAt-s.startAt))}catch(s){e((null===s||void 0===s?void 0:s.message)||"Could not load instructor assignments.","error")}finally{A(!1)}},[e]);(0,a.useEffect)(()=>{L()},[L]);const q=Date.now(),D=f.filter(e=>e.endAt>=q),$=s.filter(e=>"disabled"!==e.status),T=(0,a.useMemo)(()=>{const e=new Map;return f.forEach(s=>{const t=s.seriesId||s.id;e.has(t)||e.set(t,[]),e.get(t).push(s)}),[...e.entries()].map(e=>{let[s,t]=e;const a=[...t].sort((e,s)=>e.startAt-s.startAt);return{id:s,sessions:a,first:a[0]}}).filter(e=>{const s=e.sessions.map(e=>`${e.title||""} ${e.moduleId||""} ${e.instructor||""}`).join(" ").toLowerCase();return!(C&&!s.includes(C.toLowerCase()))&&(!("upcoming"===U&&!e.sessions.some(e=>e.endAt>=q))&&!("unassigned"===U&&!e.sessions.some(e=>!e.instructorUid)))}).sort((e,s)=>e.first.startAt-s.first.startAt)},[f,C,U,q]);return N?(0,u.jsxs)("div",{className:"flex min-h-[360px] items-center justify-center text-gray-500",children:[(0,u.jsx)(r.A,{className:"mr-2 h-5 w-5 animate-spin"}),"Loading assignments\u2026"]}):(0,u.jsxs)("div",{className:"space-y-6",children:[(0,u.jsxs)("header",{className:"flex flex-col gap-4 border-b border-gray-200 pb-5 sm:flex-row sm:items-end sm:justify-between",children:[(0,u.jsxs)("div",{children:[(0,u.jsx)("h1",{className:"text-2xl font-semibold text-gray-950",children:"Instructor Assignments"}),(0,u.jsx)("p",{className:"mt-1 max-w-2xl text-sm text-gray-600",children:"Assign existing portal instructors to individual cohort dates. An instructor sees only the days assigned to their account."})]}),(0,u.jsxs)("button",{onClick:L,className:"inline-flex items-center justify-center gap-2 rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50",children:[(0,u.jsx)(i.A,{className:"h-4 w-4"}),"Refresh"]})]}),(0,u.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-3",children:[[n,$.length,"Portal instructors"],[d.A,D.length,"Upcoming teaching dates"],[l.A,D.filter(e=>!e.instructorUid).length,"Dates needing an instructor"]].map(e=>{let[s,t,a]=e;return(0,u.jsxs)("div",{className:"rounded-xl border border-gray-200 bg-white p-4",children:[(0,u.jsxs)("div",{className:"flex items-center gap-3",children:[(0,u.jsx)(s,{className:"h-5 w-5 text-gray-500"}),(0,u.jsx)("span",{className:"text-2xl font-semibold text-gray-950",children:t})]}),(0,u.jsx)("p",{className:"mt-1 text-sm text-gray-600",children:a})]},a)})}),(0,u.jsxs)("section",{className:"overflow-hidden rounded-xl border border-gray-200 bg-white",children:[(0,u.jsx)("div",{className:"border-b border-gray-200 p-4 sm:p-5",children:(0,u.jsxs)("div",{className:"flex items-start gap-3",children:[(0,u.jsx)("span",{className:"rounded-lg bg-slate-100 p-2.5",children:(0,u.jsx)(n,{className:"h-5 w-5 text-slate-700"})}),(0,u.jsxs)("div",{children:[(0,u.jsx)("h2",{className:"font-semibold text-gray-950",children:"Instructor workload"}),(0,u.jsx)("p",{className:"mt-1 text-sm text-gray-500",children:"Accounts are managed in Users & Access. Teaching dates are assigned below."})]})]})}),s.length?(0,u.jsxs)("div",{children:[(0,u.jsxs)("div",{className:"hidden grid-cols-[minmax(0,1.6fr)_130px_150px_minmax(180px,1fr)] gap-4 border-b border-gray-200 bg-gray-50 px-5 py-2.5 text-[11px] font-semibold uppercase tracking-wider text-gray-500 md:grid",children:[(0,u.jsx)("span",{children:"Instructor"}),(0,u.jsx)("span",{children:"Account"}),(0,u.jsx)("span",{children:"Workload"}),(0,u.jsx)("span",{children:"Next assignment"})]}),(0,u.jsx)("div",{className:"divide-y divide-gray-200",children:[...s].sort((e,s)=>{const t=D.filter(s=>s.instructorUid===e.uid).length;return D.filter(e=>e.instructorUid===s.uid).length-t||b(e).localeCompare(b(s))}).map(e=>{const s=D.filter(s=>s.instructorUid===e.uid).sort((e,s)=>e.startAt-s.startAt),t=e.status||"active",a="disabled"===t?"bg-red-50 text-red-700 border-red-100":"invited"===t?"bg-amber-50 text-amber-700 border-amber-100":"bg-emerald-50 text-emerald-700 border-emerald-100";return(0,u.jsxs)("div",{className:"grid gap-3 px-4 py-4 hover:bg-gray-50/60 md:grid-cols-[minmax(0,1.6fr)_130px_150px_minmax(180px,1fr)] md:items-center md:gap-4 md:px-5",children:[(0,u.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,u.jsx)("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-slate-100",children:(0,u.jsx)(c.A,{className:"h-5 w-5 text-slate-600"})}),(0,u.jsxs)("div",{className:"min-w-0",children:[(0,u.jsx)("p",{className:"truncate font-semibold text-gray-950",children:b(e)}),(0,u.jsx)("p",{className:"truncate text-sm text-gray-500",children:e.email})]})]}),(0,u.jsx)("div",{children:(0,u.jsx)("span",{className:`inline-flex rounded-full border px-2.5 py-1 text-xs font-semibold capitalize ${a}`,children:t})}),(0,u.jsxs)("div",{children:[(0,u.jsxs)("p",{className:"text-sm font-semibold text-gray-900",children:[s.length," upcoming ",1===s.length?"day":"days"]}),(0,u.jsx)("p",{className:"mt-0.5 text-xs text-gray-500",children:s.length?"Teaching assigned":"No upcoming workload"})]}),(0,u.jsx)("div",{children:s[0]?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("p",{className:"text-sm font-semibold text-gray-900",children:y(s[0].startAt)}),(0,u.jsxs)("p",{className:"mt-0.5 truncate text-xs text-gray-500",children:[s[0].title," \xb7 ",j(s[0].startAt)]})]}):(0,u.jsx)("span",{className:"text-sm text-gray-400",children:"No upcoming assignment"})})]},e.uid)})})]}):(0,u.jsx)("p",{className:"p-8 text-center text-sm text-gray-500",children:"No Tutor / Instru
2ctor accounts are available. Invite them in Users & Access first."})]}),(0,u.jsxs)("section",{className:"overflow-hidden rounded-xl border border-gray-200 bg-white",children:[(0,u.jsxs)("div",{className:"space-y-3 border-b border-gray-200 p-4 sm:flex sm:items-center sm:justify-between sm:space-y-0 sm:p-5",children:[(0,u.jsxs)("div",{children:[(0,u.jsx)("h2",{className:"font-semibold text-gray-950",children:"Cohort teaching dates"}),(0,u.jsx)("p",{className:"mt-1 text-sm text-gray-500",children:"Choose a different instructor for any day."})]}),(0,u.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,u.jsxs)("label",{className:"relative",children:[(0,u.jsx)(o.A,{className:"absolute left-3 top-2.5 h-4 w-4 text-gray-400"}),(0,u.jsx)("input",{value:C,onChange:e=>M(e.target.value),placeholder:"Search cohorts",className:"w-full rounded-lg border border-gray-300 py-2 pl-9 pr-3 text-sm sm:w-52"})]}),(0,u.jsxs)("select",{value:U,onChange:e=>S(e.target.value),className:"rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm",children:[(0,u.jsx)("option",{value:"upcoming",children:"Upcoming dates"}),(0,u.jsx)("option",{value:"unassigned",children:"Unassigned dates"}),(0,u.jsx)("option",{value:"all",children:"All dates"})]})]})]}),(0,u.jsxs)("div",{className:"divide-y divide-gray-200",children:[T.map(t=>{let{id:a,sessions:i,first:n}=t;const d=!I[a],l=i.filter(e=>e.instructorUid).length;return(0,u.jsxs)("div",{children:[(0,u.jsxs)("button",{onClick:()=>_(e=>({...e,[a]:d})),className:"flex w-full items-center justify-between gap-3 p-4 text-left hover:bg-gray-50 sm:p-5",children:[(0,u.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[d?(0,u.jsx)(m.A,{className:"h-5 w-5 shrink-0 text-gray-400"}):(0,u.jsx)(x.A,{className:"h-5 w-5 shrink-0 text-gray-400"}),(0,u.jsxs)("div",{className:"min-w-0",children:[(0,u.jsx)("p",{className:"truncate font-medium text-gray-900",children:n.title||"Cohort"}),(0,u.jsxs)("p",{className:"text-sm text-gray-500",children:["Starts ",y(n.startAt)," \xb7 ",i.length," class ",1===i.length?"date":"dates"]})]})]}),(0,u.jsxs)("span",{className:"shrink-0 rounded-full px-2.5 py-1 text-xs font-medium "+(l===i.length?"bg-green-50 text-green-700":"bg-amber-50 text-amber-700"),children:[l,"/",i.length," assigned"]})]}),d&&(0,u.jsx)("div",{className:"border-t border-gray-100 bg-gray-50/60 px-4 py-2 sm:px-5",children:(0,u.jsx)("div",{className:"divide-y divide-gray-200",children:i.map((t,a)=>(0,u.jsxs)("div",{className:"grid gap-3 py-4 md:grid-cols-[minmax(0,1fr)_minmax(240px,360px)] md:items-center",children:[(0,u.jsxs)("div",{className:"flex items-start gap-3",children:[(0,u.jsx)("span",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-gray-300 bg-white text-xs font-semibold text-gray-600",children:t.seriesPosition||a+1}),(0,u.jsxs)("div",{children:[(0,u.jsx)("p",{className:"font-medium text-gray-900",children:y(t.startAt)}),(0,u.jsxs)("p",{className:"text-sm text-gray-500",children:[j(t.startAt),"\u2013",j(t.endAt),t.location?` \xb7 ${t.location}`:""]})]})]}),(0,u.jsxs)("label",{className:"relative",children:[(0,u.jsxs)("span",{className:"sr-only",children:["Instructor for ",y(t.startAt)]}),(0,u.jsxs)("select",{value:t.instructorUid||"",disabled:w===t.id,onChange:a=>(async(t,a)=>{const r=f,i=s.find(e=>e.uid===a);k(t.id),v(e=>e.map(e=>e.id===t.id?{...e,instructorUid:a||null,instructor:i?b(i):"",instructorEmail:(null===i||void 0===i?void 0:i.email)||""}:e));try{await(0,g.Ij)("assignTutorSession",{scheduleId:t.id,instructorUid:a||null}),e(i?`${b(i)} assigned to ${y(t.startAt)}.`:"Instructor removed from this date.","success")}catch(n){v(r),e((null===n||void 0===n?void 0:n.message)||"Could not update this assignment.","error")}finally{k("")}})(t,a.target.value),className:"w-full rounded-lg border border-gray-300 bg-white px-3 py-2.5 pr-9 text-sm disabled:bg-gray-100",children:[(0,u.jsx)("option",{value:"",children:"Unassigned"}),$.map(e=>(0,u.jsxs)("option",{value:e.uid,children:[b(e)," \u2014 ",e.email]},e.uid))]}),w===t.id?(0,u.jsx)(r.A,{className:"absolute right-3 top-3 h-4 w-4 animate-spin text-gray-500"}):t.instructorUid?(0,u.jsx)(h.A,{className:"absolute right-3 top-3 h-4 w-4 text-green-600"}):null]})]},t.id))})})]},a)}),!T.length&&(0,u.jsx)("p",{className:"p-10 text-center text-sm text-gray-500",children:"No class dates match this view."})]})]})]})}},71057:(e,s,t)=>{t.d(s,{A:()=>a});const a=(0,t(7101).A)("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])}}]);

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.