PageSourceSearch

https://bitware.ai/assets/AdminProjectTimelines-B12d58EF.js

js bitware.ai collected 2026-10-05 13:30:00 UTC 11,546 bytes, 11 lines download raw bytes

1import{c as A,t as k,r as l,j as e,L as j,d as u,f as M}from"./index-DEKcvlOi.js";import{F as D}from"./filter-BPRsf2yk.js";/**
2 * @license lucide-react v0.453.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const C=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"}]]);/**
7 * @license lucide-react v0.453.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const S=A("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]),F=s=>s?s.replace(/_/g," ").replace(/\b\w/g,p=>p.toUpperCase()):"—",R=s=>s?new Date(s).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"}):"No due date";function O(){const{data:s=[],isLoading:p}=k.businessCRM.projectTimelineDashboard.useQuery(),[d,b]=l.useState("all"),[o,v]=l.useState("all"),[i,T]=l.useState("all"),[m,P]=l.useState("active"),N=l.useMemo(()=>Array.from(new Set(s.map(t=>t.project.serviceType||"General"))).sort(),[s]),f=l.useMemo(()=>Array.from(new Set(s.map(t=>t.currentStage?.assigneeName||"Unassigned"))).sort(),[s]),x=l.useMemo(()=>{const t=new Date,c=new Date;return c.setDate(t.getDate()+7),s.filter(a=>{const n=a.project.serviceType||"General",w=a.currentStage?.assigneeName||"Unassigned",g=a.currentStage?.dueAt||a.project.targetDate,h=a.project.status==="delivered"||a.progress.total>0&&a.progress.completed===a.progress.total,r=g?new Date(g):null,y=i==="all"||i==="overdue"&&r&&r<t||i==="next_7"&&r&&r>=t&&r<=c||i==="unscheduled"&&!r;return(d==="all"||n===d)&&(o==="all"||w===o)&&y&&(m==="all"||(m==="active"?!h:h))})},[s,d,o,i,m]);return e.jsxs("div",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"mx-auto max-w-[1480px] space-y-6 p-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"flex flex-col gap-4 lg:flex-row lg:items-end lg:justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",children:[e.jsx("p",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"text-sm font-semibold uppercase tracking-[.15em] text-sky-300",children:"Delivery control"}),e.jsx("h1",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"mt-2 text-3xl font-black text-white",children:"Active projects"}),e.jsx("p",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"mt-2 max-w-2xl text-sm leading-6 text-slate-400",children:"See the real delivery stage for every customer service track. Manage stages in Business CRM; completed history remains available there."})]}),e.jsxs(j,{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",href:"/admin/business-crm",className:"inline-flex items-center gap-2 self-start rounded-xl bg-white px-4 py-3 text-sm font-black text-slate-950 hover:bg-slate-100",children:["Open Business CRM ",e.jsx(u,{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"h-4 w-4"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"grid gap-3 rounded-2xl border border-white/10 bg-[#080c15] p-4 md:grid-cols-2 xl:grid-cols-4",children:[e.jsxs("label",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"text-xs font-bold uppercase tracking-[.1em] text-slate-400",children:["Service",e.jsxs("select",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",value:d,onChange:t=>b(t.target.value),className:"mt-2 w-full rounded-lg border border-white/10 bg-[#111723] px-3 py-2 text-sm normal-case tracking-normal text-white outline-none",children:[e.jsx("option",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",value:"all",children:"All services"}),N.map(t=>e.jsx("option",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",value:t,children:t},t))]})]}),e.jsxs("label",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"text-xs font-bold uppercase tracking-[.1em] text-slate-400",children:["Owner",e.jsxs("select",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",value:o,onChange:t=>v(t.target.value),className:"mt-2 w-full rounded-lg border border-white/10 bg-[#111723] px-3 py-2 text-sm normal-case tracking-normal text-white outline-none",children:[e.jsx("option",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",value:"all",children:"All owners"}),f.map(t=>e.jsx("option",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",value:t,children:t},t))]})]}),e.jsxs("label",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"text-xs font-bold uppercase tracking-[.1em] text-slate-400",children:["Due",e.jsxs("select",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",value:i,onChange:t=>T(t.target.value),className:"mt-2 w-full rounded-lg border border-white/10 bg-[#111723] px-3 py-2 text-sm normal-case tracking-normal text-white outline-none",children:[e.jsx("option",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",value:"all",children:"All due dates"}),e.jsx("option",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",value:"overdue",children:"Overdue"}),e.jsx("option",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",value:"next_7",children:"Next 7 days"}),e.jsx("option",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",value:"unscheduled",children:"No due date"})]})]}),e.jsxs("label",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"text-xs font-bold uppercase tracking-[.1em] text-slate-400",children:["Status",e.jsxs("select",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",value:m,onChange:t=>P(t.target.value),className:"mt-2 w-full rounded-lg border border-white/10 bg-[#111723] px-3 py-2 text-sm normal-case tracking-normal text-white outline-none",children:[e.jsx("option",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",value:"active",children:"Active only"}),e.jsx("option",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",value:"completed",children:"Completed only"}),e.jsx("option",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",value:"all",children:"All projects"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"flex items-center gap-2 text-sm text-slate-400",children:[e.jsx(D,{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"h-4 w-4 text-sky-300"}),x.length," matching project",x.length===1?"":"s"]}),e.jsx("div",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"grid gap-4 xl:grid-cols-2",children:p?e.jsx("p",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"text-sm text-slate-400",children:"Loading project timelines…"}):x.length?x.map(({project:t,currentStage:c,nextStage:a,progress:n})=>e.jsxs("article",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"rounded-2xl border border-white/10 bg-[#080c15] p-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",children:[e.jsx("p",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"text-xs font-bold uppercase tracking-[.11em] text-sky-300",children:t.serviceType||"General project"}),e.jsx("h2",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"mt-1 text-lg font-black text-white",children:t.name}),e.jsx("p",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"mt-2 text-sm leading-6 text-slate-400",children:t.scopeDescription||"Scope to be confirmed in the customer timeline."})]}),e.jsx("span",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:`rounded-full px-2.5 py-1 text-[11px] font-bold ${t.status==="delivered"?"bg-emerald-300/15 text-emerald-200":"bg-sky-300/10 text-sky-100"}`,children:F(t.status)})]}),e.jsxs("div",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"mt-5 grid gap-3 sm:grid-cols-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"rounded-xl border border-emerald-300/15 bg-emerald-300/[.05] p-3",children:[e.jsx("p",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"text-[10px] font-bold uppercase tracking-[.1em] text-emerald-300",children:"Current"}),e.jsx("p",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"mt-1 font-bold text-white",children:c?.title||"No current stage"}),e.jsxs("p",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"mt-1 text-xs text-slate-400",children:[e.jsx(S,{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"mr-1 inline h-3 w-3"}),c?.assigneeName||"Unassigned"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"rounded-xl border border-white/10 bg-white/[.025] p-3",children:[e.jsx("p",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"text-[10px] font-bold uppercase tracking-[.1em] text-slate-400",children:"Next"}),e.jsx("p",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"mt-1 font-bold text-white",children:a?.title||"No next stage"}),e.jsxs("p",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"mt-1 text-xs text-slate-400",children:[e.jsx(C,{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"mr-1 inline h-3 w-3"}),R(c?.dueAt||t.targetDate)]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"mt-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"flex items-center justify-between text-xs",children:[e.jsxs("span",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"font-bold text-slate-300",children:[e.jsx(M,{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"mr-1 inline h-3.5 w-3.5 text-sky-300"}),n.completed," of ",n.total," stages"]}),e.jsxs("span",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"font-black text-sky-200",children:[n.percent,"%"]})]}),e.jsx("div",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"mt-2 h-1.5 overflow-hidden rounded-full bg-white/10",children:e.jsx("div",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"h-full rounded-full bg-gradient-to-r from-emerald-300 to-sky-300",style:{width:`${n.percent}%`}})})]}),e.jsxs(j,{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",href:"/admin/business-crm",className:"mt-5 inline-flex items-center gap-2 text-sm font-bold text-sky-200 hover:text-white",children:["Manage timeline in CRM ",e.jsx(u,{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"h-4 w-4"})]})]},t.id)):e.jsx("div",{"data-loc":"client/src/pages/AdminProjectTimelines.tsx:30",className:"rounded-2xl border border-dashed border-white/10 p-10 text-center text-sm text-slate-400",children:"No projects match these filters."})})]})}export{O 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.