- Sidebar: white background, orange gradient logo, orange active pill - TopBar: glassmorphism (white/80 + backdrop-blur-xl) - AppLayout: warm gradient background mesh - DataTable: new reusable component with column sort, filter, resize - DevopsView: rebuilt with DataTable; connection shows "all assigned work items" - ADO work item URLs: use org-level URL (no project in path) - CalendarBlock: planned blocks show task title instead of project name - Reports export: replaced <a download> with fetch+blob to send JWT auth header - Sidebar Tasks: fixed path /board/ (trailing slash for Apache ProxyPass) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 line
6 KiB
JavaScript
1 line
6 KiB
JavaScript
import{d as M,y as $,c as r,a as e,n as c,e as m,F as p,r as v,b as V,s as g,o,k as B,w as h,t as n,i as d,h as i,f as z}from"./index-DVV3ZbZ2.js";import{d as S}from"./dashboard-CxPPoZJ0.js";import{a as N,_ as F}from"./CardContent.vue_vue_type_script_setup_true_lang-DdGXaWEa.js";import{_ as L}from"./Progress.vue_vue_type_script_setup_true_lang-vRzAaLns.js";import{_ as D}from"./Spinner.vue_vue_type_script_setup_true_lang-BkmDerVR.js";import{f as b,a as y}from"./utils-7WVCegLb.js";const H={class:"p-6"},P={class:"flex items-center gap-3 mb-6"},A={class:"flex items-center rounded-lg border border-border overflow-hidden bg-muted/30"},I={key:0,class:"flex items-center justify-center h-40"},E={key:1,class:"text-center text-muted-foreground py-12"},G={key:2,class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4"},R={class:"flex items-start justify-between gap-2 mb-3"},T={class:"min-w-0"},q={class:"font-semibold text-sm text-foreground truncate"},J={key:0,class:"text-xs text-muted-foreground truncate"},K={key:0,class:"text-xs bg-muted text-muted-foreground px-1.5 py-0.5 rounded shrink-0"},O={class:"space-y-1.5"},Q={class:"flex items-center justify-between text-xs"},U={class:"font-medium text-foreground"},W={class:"flex items-center justify-between text-xs"},X={class:"text-foreground"},Y={key:0,class:"flex items-center justify-between text-xs"},Z={class:"text-foreground"},j={key:0,class:"mt-3"},tt={class:"flex items-center justify-between text-xs mb-1"},et={key:3,class:"border border-border rounded-lg overflow-hidden"},st=["onClick"],ot={class:"min-w-0"},rt={class:"text-sm font-medium text-foreground truncate"},nt={key:0,class:"text-xs text-muted-foreground truncate"},at={class:"text-sm text-foreground tabular-nums text-right w-20"},it={class:"text-sm text-muted-foreground tabular-nums text-right w-16"},dt={class:"text-xs text-muted-foreground text-right w-24"},lt={class:"w-20 flex items-center justify-end gap-1.5"},ut={key:1,class:"text-xs text-muted-foreground"},vt=M({__name:"ProjectsView",setup(ct){const x=z(),l=g([]),_=g(!1),w=localStorage.getItem("projects.view"),u=g(w==="list"?"list":"grid");function f(a){u.value=a,localStorage.setItem("projects.view",a)}$(async()=>{_.value=!0;try{const a=await S.projects({});l.value=a.data.sort((s,t)=>t.total_hours-s.total_hours)}finally{_.value=!1}});const k=a=>a?a>90?"danger":a>70?"warning":"success":"default";return(a,s)=>(o(),r("div",H,[e("div",P,[s[4]||(s[4]=e("h2",{class:"text-lg font-semibold text-foreground flex-1"},"Projects",-1)),e("div",A,[e("button",{class:c(["px-2.5 py-1.5 transition-colors",u.value==="grid"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted/50"]),title:"Grid view",onClick:s[0]||(s[0]=t=>f("grid"))},[...s[2]||(s[2]=[e("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"})],-1)])],2),e("button",{class:c(["px-2.5 py-1.5 transition-colors",u.value==="list"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted/50"]),title:"List view",onClick:s[1]||(s[1]=t=>f("list"))},[...s[3]||(s[3]=[e("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 10h16M4 14h16M4 18h16"})],-1)])],2)])]),_.value?(o(),r("div",I,[m(D,{size:"lg",class:"text-primary"})])):l.value.length===0?(o(),r("div",E," No projects found ")):u.value==="grid"?(o(),r("div",G,[(o(!0),r(p,null,v(l.value,t=>(o(),B(F,{key:t.project_id,class:"cursor-pointer hover:border-primary/50 transition-colors",onClick:C=>i(x).push(`/projects/${t.project_id}`)},{default:h(()=>[m(N,{class:"p-4"},{default:h(()=>[e("div",R,[e("div",T,[e("p",q,n(t.display_name),1),t.client?(o(),r("p",J,n(t.client),1)):d("",!0)]),t.job_number?(o(),r("span",K,n(t.job_number),1)):d("",!0)]),e("div",O,[e("div",Q,[s[5]||(s[5]=e("span",{class:"text-muted-foreground"},"Total hours",-1)),e("span",U,n(i(b)(t.total_hours)),1)]),e("div",W,[s[6]||(s[6]=e("span",{class:"text-muted-foreground"},"Sessions",-1)),e("span",X,n(t.session_count),1)]),t.last_active?(o(),r("div",Y,[s[7]||(s[7]=e("span",{class:"text-muted-foreground"},"Last active",-1)),e("span",Z,n(i(y)(t.last_active)),1)])):d("",!0)]),t.progress_pct!==null?(o(),r("div",j,[e("div",tt,[s[8]||(s[8]=e("span",{class:"text-muted-foreground"},"Budget",-1)),e("span",{class:c(t.progress_pct>90?"text-red-400":"text-muted-foreground")},n((t.progress_pct??0).toFixed(0))+"% ",3)]),m(L,{value:t.progress_pct,color:k(t.progress_pct)},null,8,["value","color"])])):d("",!0)]),_:2},1024)]),_:2},1032,["onClick"]))),128))])):(o(),r("div",et,[s[9]||(s[9]=V('<div class="grid grid-cols-[1fr_auto_auto_auto_auto] gap-4 px-4 py-2.5 bg-muted/30 border-b border-border text-xs font-medium text-muted-foreground uppercase tracking-wide"><span>Project</span><span class="text-right w-20">Hours</span><span class="text-right w-16">Sessions</span><span class="text-right w-24">Last Active</span><span class="text-right w-20">Budget</span></div>',1)),(o(!0),r(p,null,v(l.value,t=>(o(),r("div",{key:t.project_id,class:"grid grid-cols-[1fr_auto_auto_auto_auto] gap-4 px-4 py-3 border-b border-border last:border-0 cursor-pointer hover:bg-muted/20 transition-colors items-center",onClick:C=>i(x).push(`/projects/${t.project_id}`)},[e("div",ot,[e("p",rt,n(t.display_name),1),t.client?(o(),r("p",nt,n(t.client),1)):d("",!0)]),e("span",at,n(i(b)(t.total_hours)),1),e("span",it,n(t.session_count),1),e("span",dt,n(t.last_active?i(y)(t.last_active):"—"),1),e("div",lt,[t.progress_pct!==null?(o(),r("span",{key:0,class:c(["text-xs tabular-nums",t.progress_pct>90?"text-red-400":"text-muted-foreground"])},n((t.progress_pct??0).toFixed(0))+"% ",3)):(o(),r("span",ut,"—"))])],8,st))),128))]))]))}});export{vt as default};
|