1import{_ as N}from"./Dl9XEbwO.js";import{_ as V}from"./Dgs6hFTu.js";import{_ as $}from"./CJvuIo6D.js";import{_ as A}from"./osqaVy29.js";import{_ as S}from"./Byfx70N9.js";import{_ as U}from"./BnYVzLkN.js";import{a as I,g as C}from"./B0ptFxXJ.js";import{d as q,Z as E,W as H,k as L,b as m,A as r,B as t,Q,R as W,o as n,z as f,e as l,F as x,h as Z,f as D,n as _,c as P,g,t as h}from"./Bcc8-a-q.js";import{u as G}from"./_bZiThFm.js";import"./0TAyzOoh.js";import"./9pjYCGkJ.js";import"./V1CGmUic.js";import"./CfUektVg.js";import"./CdE3OqS9.js";import"./D3ZPBIcn.js";import"./Cw8iTAvs.js";import"./BZqjWkfA.js";import"./oaYCrmSY.js";import"./B8rpExb1.js";const J={class:"flex items-center"},K={key:0,class:"w-3","aria-hidden":"true"},he=q({__name:"index",async setup(M){let c,b;const{path:T}=E(),{data:y,error:O}=([c,b]=H(()=>Q(T,()=>G(W("os_projects",{fields:["id","name","due_date",{tasks:["id","name","status","due_date"]}],deep:{tasks:{_sort:["due_date"],_filter:{type:{_eq:"milestone"}}}}})),{})),c=await c,b(),c),j={pending:{label:"Pending",icon:"i-heroicons-clock-20-solid",color:"gray"},active:{label:"Active",icon:"i-heroicons-play-20-solid",color:"blue"},in_progress:{label:"In Progress",icon:"i-heroicons-wrench-screwdriver-20-solid",color:"amber"},in_review:{label:"In Review",icon:"i-heroicons-exclamation-circle-20-solid",color:"orange"},completed:{label:"Completed",icon:"i-heroicons-check-20-solid",color:"green"}},B=[{key:"name",label:"Name"},{key:"milestones",label:"Status"},{key:"due_date",label:"Target Date"},{key:"actions"}],R=L(()=>{var o;return y.value?(o=y.value)==null?void 0:o.map(a=>{const u=a.tasks;return{id:a.id,name:a.name,due_date:a.due_date,tasks:u.map(s=>({isComplete:s.status==="completed",isCurrent:s.status==="active"||s.status==="in_progress"||s.status==="in_review",icon:"i-heroicons-calendar",name:s.name,status:j[s.status??"pending"].label}))}}):[]});return(o,a)=>{const u=N,s=V,k=$,v=A,z=S,F=U;return n(),m("div",null,[r(u,{title:"Projects",breadcrumbs:[{title:"Portal",href:"/portal"},{title:"Projects"}]},{actions:t(()=>a[0]||(a[0]=[])),_:1}),r(F,{class:"mt-6"},{header:t(()=>a[1]||(a[1]=[l("div",{class:"flex items-center justify-between"},null,-1)])),default:t(()=>[r(z,{columns:B,rows:f(R),"column-attribute":"label"},{"name-data":t(({row:e})=>[r(s,{variant:"link",to:`/portal/projects/${e.id}`,size:"xl",padded:!1},{default:t(()=>[g(h(e.name),1)]),_:2},1032,["to"])]),"due_date-data":t(({row:e})=>[r(k,{size:"xs"},{default:t(()=>[g(h(("getFriendlyDate"in o?o.getFriendlyDate:f(I))(e.due_date)),1)]),_:2},1024),r(k,{size:"xs","text-color":"light"},{default:t(()=>[g(h(("getRelativeTime"in o?o.getRelativeTime:f(C))(e.due_date)),1)]),_:2},1024)]),"milestones-data":t(({row:e})=>[l("ul",J,[(n(!0),m(x,null,Z(e.tasks,({isComplete:i,isCurrent:d,icon:w},p)=>(n(),m(x,{key:p},[l("li",{class:_([(p!==e.tasks.length-1,""),"relative"])},[l("div",{class:_([{"border-primary border-dashed h-10 w-10 border-2":d&&!i,"bg-primary w-5 h-5":i,"dark:border-gray-700 border-gray-300 border-2 w-5 h-5":!d&&!i},"relative flex items-center justify-center flex-shrink-0 rounded-card"])},[i?(n(),P(v,{key:0,name:"i-heroicons-check",class:"w-4 text-white"})):w&&d?(n(),P(v,{key:1,name:w,class:_(["fill-current",{"text-primary w-5 h-5":d}])},null,8,["name","class"])):D("",!0)],2)],2),p!==e.tasks.length-1?(n(),m("li",K,[l("div",{class:_(["h-0.5 w-full",[i?"bg-primary":"bg-gray-200 dark:bg-gray-700"]])},null,2)])):D("",!0)],64))),128))])]),"actions-data":t(({row:e})=>[r(s,{to:`/portal/projects/${e.id}`,color:"primary",variant:"outline",icon:"i-heroicons-arrow-right"},null,8,["to"])]),_:1},8,["rows"])]),_:1})])}}});export{he 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.