1import{_ as N}from"./PageHeader.vue.1GiGf5MU.js";import{_ as R}from"./Button.rqw7atPz.js";import{_ as V}from"./VText.vue.d4t4Tgai.js";import{_ as z}from"./UIcon.vue.q5BiR_CF.js";import{_ as U}from"./Table.dd6ibwI1.js";import{_ as A}from"./Card.OVYrjFH4.js";import{d as I,u as C,c as q,o as r,l as m,h as o,w as t,b as h,i as f,t as g,m as l,F as x,r as E,n as _,g as j,j as D,k as H,S as L}from"./entry.eAwQsD1a.js";import{u as G}from"./useDirectus.PaBxmo4Y.js";import{g as J,a as K}from"./time.TYhP27-i.js";import{w as M}from"./Icon.Bclsazv-.js";import"./nuxt-link.FwEzzv3T.js";import"./Headline.vue.TYkGMqlL.js";import"./_plugin-vue_export-helper.x3n3nnut.js";import"./selectMenu.LLDhGwvZ.js";import"./Icon.mrl4pZkk.js";import"./Checkbox.jlCAE0XR.js";import"./useFormGroup.SefvtU2y.js";import"./index.0wqzsba0.js";const O=l("div",{class:"flex items-center justify-between"},null,-1),Q={class:"flex items-center"},W={key:0,class:"w-3","aria-hidden":"true"},ge=I({__name:"index",async setup(X){let c,y;const{path:P}=C(),{data:b,error:Y}=([c,y]=M(()=>H(P,()=>G(L("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,y(),c),T={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"}},S=[{key:"name",label:"Name"},{key:"milestones",label:"Status"},{key:"due_date",label:"Target Date"},{key:"actions"}],$=q(()=>{var s;return b.value?(s=b.value)==null?void 0:s.map(n=>{const u=n.tasks;return{id:n.id,name:n.name,due_date:n.due_date,tasks:u.map(a=>({isComplete:a.status==="completed",isCurrent:a.status==="active"||a.status==="in_progress"||a.status==="in_review",icon:"i-heroicons-calendar",name:a.name,status:T[a.status??"pending"].label}))}}):[]});return(s,n)=>{const u=N,a=R,k=V,v=z,B=U,F=A;return r(),m("div",null,[o(u,{title:"Projects",breadcrumbs:[{title:"Portal",href:"/portal"},{title:"Projects"}]},{actions:t(()=>[]),_:1}),o(F,{class:"mt-6"},{header:t(()=>[O]),default:t(()=>[o(B,{columns:S,rows:h($),"column-attribute":"label"},{"name-data":t(({row:e})=>[o(a,{variant:"link",to:`/portal/projects/${e.id}`,size:"xl",padded:!1},{default:t(()=>[f(g(e.name),1)]),_:2},1032,["to"])]),"due_date-data":t(({row:e})=>[o(k,{size:"xs"},{default:t(()=>[f(g(("getFriendlyDate"in s?s.getFriendlyDate:h(J))(e.due_date)),1)]),_:2},1024),o(k,{size:"xs","text-color":"light"},{default:t(()=>[f(g(("getRelativeTime"in s?s.getRelativeTime:h(K))(e.due_date)),1)]),_:2},1024)]),"milestones-data":t(({row:e})=>[l("ul",Q,[(r(!0),m(x,null,E(e.tasks,({isComplete:i,isCurrent:d,icon:w},p)=>(r(),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?(r(),j(v,{key:0,name:"i-heroicons-check",class:"w-4 text-white"})):w&&d?(r(),j(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?(r(),m("li",W,[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})=>[o(a,{to:`/portal/projects/${e.id}`,color:"primary",variant:"outline",icon:"i-heroicons-arrow-right"},null,8,["to"])]),_:1},8,["rows"])]),_:1})])}}});export{ge 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.