1import{a7 as l,d as r,j as a,B as i,H as c,d4 as o,ab as m,P as x,f as h,g as u,h as p,z as f,i as j,S as v,x as N,a_ as g}from"./index-CBYMo-oK.js";import{C as y}from"./coach-evaluation-history-VtMI58S3.js";import{U as w}from"./user-check-2oj5bI9Z.js";import"./coach-development-plan-C2Y5TAim.js";import"./trending-up-FAxHt_6I.js";import"./calendar-clock-DzoqJZ07.js";function C({coachPersonId:t}){const{data:s,isLoading:n}=r({queryKey:["/api/admin/coaches",t,"staff-day-evaluations"]});return a.jsxs(h,{"data-testid":"card-staff-day-evaluations",children:[a.jsxs(u,{className:"pb-3",children:[a.jsxs(p,{className:"text-base flex items-center gap-2",children:[a.jsx(w,{className:"w-4 h-4"}),"Event-Day Staff Evaluations"]}),a.jsx(f,{children:"How head coaches rated this coach after individual event sessions."})]}),a.jsx(j,{className:"space-y-2",children:n?a.jsx(v,{className:"h-16 w-full"}):!s||s.length===0?a.jsx("p",{className:"text-sm text-muted-foreground","data-testid":"text-no-staff-day-evals",children:"No event-day evaluations yet."}):s.map(e=>a.jsxs("div",{className:"border rounded-md p-3 space-y-1.5","data-testid":`staff-day-eval-${e.id}`,children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[a.jsxs("div",{className:"min-w-0",children:[a.jsx("div",{className:"font-medium text-sm truncate",children:e.eventName}),a.jsxs("div",{className:"text-xs text-muted-foreground",children:["by ",e.evaluatorName," · ",new Date(e.createdAt).toLocaleDateString(),e.roleAtEvent?` · as ${e.roleAtEvent.replace(/_/g," ").toLowerCase()}`:""]})]}),a.jsxs(N,{variant:"secondary",className:"gap-1 shrink-0",children:[a.jsx(g,{className:"w-3 h-3"}),e.rating,"/5"]})]}),e.strengths&&a.jsxs("p",{className:"text-xs",children:[a.jsx("span",{className:"font-medium",children:"Strengths:"})," ",e.strengths]}),e.areasForImprovement&&a.jsxs("p",{className:"text-xs",children:[a.jsx("span",{className:"font-medium",children:"To improve:"})," ",e.areasForImprovement]}),e.notes&&a.jsxs("p",{className:"text-xs text-muted-foreground",children:[a.jsx("span",{className:"font-medium",children:"Notes:"})," ",e.notes]})]},e.id))})]})}function L(){const t=l(),s=parseInt(t.personId),{data:n}=r({queryKey:["/api/coach-evaluations/all-coaches"]}),e=n?.find(d=>d.personId===s);return a.jsx("div",{className:"min-h-screen bg-background",children:a.jsxs("div",{className:"max-w-2xl mx-auto p-4 space-y-4",children:[a.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[a.jsx(i,{variant:"ghost",size:"icon",asChild:!0,"data-testid":"button-back",children:a.jsx(c,{href:"/admin/coach-evaluations",children:a.jsx(o,{})})}),a.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[a.jsx(m,{className:"w-5 h-5 text-primary shrink-0"}),a.jsxs("h1",{className:"text-lg font-semibold truncate","data-testid":"text-page-title",children:[e?`${e.firstName} ${e.lastName}`:"Coach"," â Evaluations"]})]}),a.jsx(i,{asChild:!0,"data-testid":"button-new-evaluation",children:a.jsxs(c,{href:"/coach-evaluation",children:[a.jsx(x,{className:"w-4 h-4"})," New Evaluation"]})})]}),!isNaN(s)&&a.jsxs(a.Fragment,{children:[a.jsx(y,{coachPersonId:s,canRegenerate:!0}),a.jsx(C,{coachPersonId:s})]})]})})}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.