1import{r,j as e,i as w,k as u,n as j,o as c,aa as _,V as v,al as b,T as y,B as d,h as T}from"./app-DKt5H6Fv.js";import{l as C}from"./meetingsAdmin-BOfEpH3o.js";import{T as S,a as k,b as p,c as n,d as L,e as l}from"./table-JTauvYhg.js";const B=i=>i?new Date(i).toLocaleString("en-GB",{dateStyle:"medium",timeStyle:"short"}):"â";function F(){const[i,g]=r.useState([]),[a,f]=r.useState(null),[o,x]=r.useState(1),[N,m]=r.useState(!0);return r.useEffect(()=>{let s=!0;return m(!0),C(o).then(t=>{s&&(g((t==null?void 0:t.data)??[]),f((t==null?void 0:t.meta)??null))}).finally(()=>{s&&m(!1)}),()=>{s=!1}},[o]),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-baseline justify-between",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Meetings"}),a&&e.jsxs("p",{className:"text-sm text-muted-foreground",children:[a.total," total"]})]}),N?e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e.jsx(w,{className:"h-4 w-4 animate-spin"})," Loadingâ¦"]}):i.length===0?e.jsx(u,{children:e.jsx(j,{className:"py-10 text-center text-muted-foreground",children:"No meetings
1yet. The kickoff flow and ad-hoc meeting bookings will populate this view automatically."})}):e.jsxs(e.Fragment,{children:[e.jsx(u,{children:e.jsx(j,{className:"p-0",children:e.jsxs(S,{children:[e.jsx(k,{children:e.jsxs(p,{children:[e.jsx(n,{children:"When"}),e.jsx(n,{children:"Client"}),e.jsx(n,{children:"Title"}),e.jsx(n,{children:"Host"}),e.jsx(n,{children:"State"}),e.jsx(n,{})]})}),e.jsx(L,{children:i.map(s=>{var t,h;return e.jsxs(p,{children:[e.jsx(l,{className:"whitespace-nowrap",children:B(s.start_time)}),e.jsx(l,{children:((t=s.client)==null?void 0:t.name)??"â"}),e.jsx(l,{className:"max-w-xs truncate",children:s.title??`(${s.type})`}),e.jsx(l,{children:((h=s.host)==null?void 0:h.name)??"â"}),e.jsx(l,{children:e.jsxs("div",{className:"flex flex-wrap gap-1 items-center",children:[s.state.has_transcript&&e.jsxs(c,{variant:"outline",className:"gap-1",children:[e.jsx(_,{className:"h-3 w-3"})," transcript"]}),s.state.analysis_status&&e.jsxs(c,{variant:s.state.analysis_status==="reviewed"?"success":"outline",className:"gap-1",children:[e.jsx(v,{className:"h-3 w-3"})," ",s.state.analysis_status]}),s.state.attendance_count>0&&e.jsxs(c,{variant:"outline",className:"gap-1",children:[e.jsx(b,{className:"h-3 w-3"})," ",s.state.attendance_count]}),(s.state.transcript_failed_reason||s.state.attendance_failed_reason||s.state.analysis_failed_reason)&&e.jsxs(c,{variant:"destructive",className:"gap-1",children:[e.jsx(y,{className:"h-3 w-3"})," issue"]})]})}),e.jsx(l,{children:e.jsx(d,{asChild:!0,size:"sm",variant:"outline",children:e.jsx(T,{to:`/dashboard/meetings/${s.id}`,children:"Open"})})})]},s.id)})})]})})}),a&&a.last_page>1&&e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(d,{size:"sm",variant:"outline",disabled:a.current_page<=1,onClick:()=>x(s=>Math.max(1,s-1)),children:"Previous"}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",a.current_page," of ",a.last_page]}),e.jsx(d,{size:"sm",variant:"outline",disabled:a.current_page>=a.last_page,onClick:()=>x(s=>s+1),children:"Next"})]})]})]})}export{F 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.