1import{j as e}from"./react-vendor-Ca39dfnS.js";import{a as N}from"./query-vendor-CZuItqE6.js";import{P as g,K as v,C as l,a as i,b as c,d as a,f as b,g as C,h as m,i as x,e as o}from"./main-BAUbw78W.js";import{H as p,k as h,F as w,a2 as T,M as A,P as k}from"./ui-vendor-BsCBchWs.js";import"./modulepreload-polyfill-B5Qt9EMX.js";import"./chart-vendor-DTBERZQl.js";function E(){const{userId:j,businessId:u}=g(),{data:t=[],isLoading:y}=N({queryKey:[`/api/activities?userId=${j}&businessId=${u}`]}),d=s=>{const f={call:k,email:A,meeting:T,task:h,note:w}[s]||p;return e.jsx(f,{className:"h-4 w-4"})},n=t.filter(s=>!s.completed),r=t.filter(s=>s.completed);return e.jsxs("div",{className:"h-full flex flex-col p-6 gap-6",children:[e.jsx("div",{children:e.jsx(v,{department:"SALES",title:"Sales Activities",subtitle:"Track all follow-ups, calls, emails, and tasks",compact:!0})}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[e.jsxs(l,{children:[e.jsxs(i,{className:"flex flex-row items-center justify-between gap-1 space-y-0 pb-2",children:[e.jsx(c,{className:"text-sm font-medium",children:"Pending"}),e.jsx(p,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx(a,{children:e.jsx("div",{className:"text-2xl font-bold",children:n.length})})]}),e.jsxs(l,{children:[e.jsxs(i,{className:"flex flex-row items-center justify-between gap-1 space-y-0 pb-2",children:[e.jsx(c,{className:"text-sm font-medium",children:"Completed Today"}),e.jsx(h,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx(a,{children:e.jsx("div",{className:"text-2xl font-bold",children:r.length})})]}),e.jsxs(l,{children:[e.jsxs(i,{className:"flex flex-row items-center justify-between gap-1 space-y-0 pb-2",children:[e.jsx(c,{className:"text-sm font-medium",children:"Overdue"}),e.jsx(p,{className:"h-4 w-4 text-destructive"})]}),e.jsx(a,{children:e.jsx("div",{className:"text-2xl font-bold",children:"0"})})]})]}),e.jsxs(b,{defaultValue:"pending",className:"flex-1",children:[e.jsxs(C,{children:[e.jsx(m,{value:"pending",children:"Pending"}),e.jsx(m,{value:"completed",children:"Completed"}),e.jsx(m,{value:"all",children:"All"})]}),e.jsx(x,{value:"pending",className:"mt-4",children:e.jsx(l,{children:e.jsx(a,{className:"pt-6",children:n.length===0?e.jsx("p",{className:"text-center text-muted-foreground py-8",children:"No pending activities"}):e.jsx("div",{className:"space-y-3",children:n.map(s=>e.jsxs("div",{className:"flex items-start gap-3 p-3 border rounded-lg",children:[e.jsx("div",{className:"mt-1",children:d(s.type)}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-medium",children:s.title}),s.description&&e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:s.description}),s.dueDate&&e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Due: ",new Date(s.dueDate).toLocaleDateString()]})]}),e.jsx(o,{variant:"outline",children:s.type})]},s.id))})})})}),e.jsx(x,{value:"completed",className:"mt-4",children:e.jsx(l,{children:e.jsx(a,{className:"pt-6",children:r.length===0?e.jsx("p",{className:"text-center text-muted-foreground py-8",children:"No completed activities"}):e.jsx("div",{className:"space-y-3",children:r.map(s=>e.jsxs("div",{className:"flex items-start gap-3 p-3 border rounded-lg opacity-60",children:[e.jsx("div",{className:"mt-1",children:d(s.type)}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-medium line-through",children:s.title}),s.description&&e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:s.description})]}),e.jsx(o,{variant:"secondary",children:s.type})]},s.id))})})})}),e.jsx(x,{value:"all",className:"mt-4",children:e.jsx(l,{children:e.jsx(a,{className:"pt-6",children:e.jsx("div",{className:"space-y-3",children:t.map(s=>e.jsxs("div",{className:"flex items-start gap-3 p-3 border rounded-lg",children:[e.jsx("div",{className:"mt-1",children:d(s.type)}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:`font-medium ${s.completed?"line-through":""}`,children:s.title}),s.description&&e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:s.description})]}),e.jsx(o,{variant:s.completed?"secondary":"outline",children:s.type})]},s.id))})})})})]})]})}export{E 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.