- docker-compose: add planka + planka-db services (port 1337, isolated volume) - apache.conf: add ProxyPass /board/ → localhost:1337 - .env.example: add PLANKA_SECRET_KEY + PLANKA_BASE_URL - Sidebar: rename Planner → Tasks, open /board in new tab via <a> - Router: remove /planner route - Delete PlannerView.vue, TaskList.vue, TaskCard.vue (Calendar keeps TaskForm) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 line
6.9 KiB
JavaScript
1 line
6.9 KiB
JavaScript
import{d as N,u as B,y as I,c as r,a as t,h as a,k as g,w as i,i as c,e as d,o as n,q as f,t as l,F as v,r as b,n as x,D as T,s as w,j as L,K as _}from"./index-BP_aNEdP.js";import{u as V}from"./devops-DxRDHPW5.js";import{_ as k,a as y}from"./CardContent.vue_vue_type_script_setup_true_lang-B8VjSxLa.js";import{a as C,_ as S}from"./CardTitle.vue_vue_type_script_setup_true_lang-KH4UhlTi.js";import{_ as P}from"./Button.vue_vue_type_script_setup_true_lang-B_YE_XNW.js";import{_ as $}from"./Spinner.vue_vue_type_script_setup_true_lang-Cu49-Cc4.js";import{_ as F}from"./DevopsConnectForm.vue_vue_type_script_setup_true_lang-DQc_dk7n.js";import"./utils-7WVCegLb.js";import"./Input.vue_vue_type_script_setup_true_lang-SeygKlpx.js";const M={class:"p-6 space-y-6"},W={class:"flex items-center justify-between gap-4 flex-wrap"},E={class:"flex items-center gap-2"},O={key:0,class:"flex items-center gap-2 text-sm text-muted-foreground"},K={key:1,class:"flex items-center gap-3"},R={class:"text-sm text-foreground"},q={key:0,class:"text-xs text-muted-foreground ml-2"},H={key:2,class:"flex items-center gap-3"},G={key:3,class:"text-xs text-destructive mt-2"},J={class:"flex items-center justify-between gap-3 flex-wrap"},Q={class:"flex items-center rounded-lg border border-border overflow-hidden bg-muted/30"},U=["onClick"],X={key:0,class:"flex items-center justify-center py-8"},Y={key:1,class:"text-center py-8 text-sm text-muted-foreground"},Z={key:2,class:"space-y-0"},tt={class:"text-xs font-mono text-muted-foreground w-10 shrink-0"},et={class:"flex-1 min-w-0"},st={class:"text-sm text-foreground truncate"},ot={class:"text-xs text-muted-foreground"},nt=["title"],rt=["title"],at={class:"text-xs text-muted-foreground w-20 shrink-0 hidden lg:block"},lt={class:"flex items-center gap-1 shrink-0 w-14 justify-end"},it=["onClick"],dt={key:0,class:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},ct={key:1,class:"h-3.5 w-3.5 animate-spin",fill:"none",viewBox:"0 0 24 24"},ut=["href"],bt=N({__name:"DevopsView",setup(mt){const o=V(),j=B(),p=w("All"),u=w(null);I(async()=>{await o.fetchIntegration(),o.integration&&await o.fetchWorkItems()});const h=L(()=>p.value==="All"?o.workItems:o.workItems.filter(m=>m.state===p.value));async function z(){try{await o.sync(),_.success("Sync complete"),await o.fetchWorkItems()}catch{_.error(o.error??"Sync failed")}}async function A(m){if(!u.value){u.value=m;try{const s=await fetch(`/cc-dashboard/api/devops/work-items/${m}/clone`,{method:"POST",headers:{Authorization:`Bearer ${j.token}`}});if(!s.ok)throw new Error(await s.text());_.success("Cloned to Tasks")}catch{_.error("Failed to clone")}finally{u.value=null}}}return(m,s)=>(n(),r("div",M,[t("div",W,[s[1]||(s[1]=t("h2",{class:"text-lg font-semibold text-foreground"},"Azure DevOps",-1)),t("div",E,[a(o).integration?(n(),g(P,{key:0,variant:"outline",size:"sm",loading:a(o).syncing,onClick:z},{default:i(()=>[...s[0]||(s[0]=[f(" Sync Now ",-1)])]),_:1},8,["loading"])):c("",!0)])]),d(k,null,{default:i(()=>[d(y,{class:"pt-4"},{default:i(()=>{var e;return[a(o).loading&&!a(o).integration?(n(),r("div",O,[d($,{size:"sm"}),s[2]||(s[2]=t("span",null,"Loading...",-1))])):a(o).integration?(n(),r("div",K,[s[5]||(s[5]=t("div",{class:"h-2 w-2 rounded-full bg-[hsl(var(--success))]"},null,-1)),t("span",R,[s[3]||(s[3]=f(" Connected to ",-1)),t("strong",null,l(a(o).integration.organization),1),s[4]||(s[4]=f(" / ",-1)),t("strong",null,l(a(o).integration.project),1)]),a(o).integration.last_synced_at?(n(),r("span",q," Last synced: "+l(new Date(a(o).integration.last_synced_at).toLocaleString()),1)):c("",!0)])):(n(),r("div",H,[...s[6]||(s[6]=[t("div",{class:"h-2 w-2 rounded-full bg-muted-foreground"},null,-1),t("span",{class:"text-sm text-muted-foreground"},"Not connected",-1)])])),(e=a(o).integration)!=null&&e.last_sync_error?(n(),r("p",G," Error: "+l(a(o).integration.last_sync_error),1)):c("",!0)]}),_:1})]),_:1}),!a(o).integration&&!a(o).loading?(n(),g(k,{key:0},{default:i(()=>[d(S,null,{default:i(()=>[d(C,{class:"text-sm"},{default:i(()=>[...s[7]||(s[7]=[f("Connect Azure DevOps",-1)])]),_:1})]),_:1}),d(y,null,{default:i(()=>[d(F)]),_:1})]),_:1})):c("",!0),a(o).integration?(n(),g(k,{key:1},{default:i(()=>[d(S,{class:"pb-2"},{default:i(()=>[t("div",J,[d(C,{class:"text-sm"},{default:i(()=>[...s[8]||(s[8]=[f("Work Items",-1)])]),_:1}),t("div",Q,[(n(),r(v,null,b(["All","Active","Resolved","Closed"],e=>t("button",{key:e,class:x(["px-3 py-1 text-xs font-medium transition-colors",p.value===e?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted/50"]),onClick:D=>p.value=e},l(e),11,U)),64))])])]),_:1}),d(y,null,{default:i(()=>[a(o).loading?(n(),r("div",X,[d($,{size:"md",class:"text-primary"})])):h.value.length===0?(n(),r("div",Y," No work items found ")):(n(),r("div",Z,[s[11]||(s[11]=t("div",{class:"flex items-center gap-3 px-3 py-1.5 text-xs text-muted-foreground border-b border-border mb-1"},[t("span",{class:"w-10 shrink-0"},"#"),t("span",{class:"flex-1"},"Title"),t("span",{class:"w-28 shrink-0 hidden md:block"},"Project"),t("span",{class:"w-8 shrink-0 text-center hidden sm:block"},"P"),t("span",{class:"w-20 shrink-0 hidden lg:block"},"Created"),t("span",{class:"w-20 shrink-0"},"State"),t("span",{class:"w-14 shrink-0 text-right"},"Link")],-1)),(n(!0),r(v,null,b(h.value,e=>(n(),r("div",{key:e.id,class:"flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-muted/30 transition-colors"},[t("span",tt,"#"+l(e.ado_id),1),t("div",et,[t("p",st,l(e.title),1),t("p",ot,l(e.type),1)]),t("span",{class:"text-xs text-muted-foreground w-28 shrink-0 truncate hidden md:block",title:e.team_project},l(e.team_project||"—"),9,nt),t("span",{class:x(["text-xs font-medium w-8 shrink-0 text-center hidden sm:block",(e.priority??3)<=1?"text-red-400":(e.priority??3)<=2?"text-amber-400":"text-muted-foreground"]),title:`Priority ${e.priority}`}," P"+l(e.priority??3),11,rt),t("span",at,l(e.created_date?new Date(e.created_date).toLocaleDateString():"—"),1),t("span",{class:x(["text-xs px-2 py-0.5 rounded-full shrink-0 w-20 text-center",e.state==="Active"?"bg-blue-500/10 text-blue-400":e.state==="Resolved"?"bg-green-500/10 text-green-400":(e.state==="Closed","bg-muted text-muted-foreground")])},l(e.state),3),t("div",lt,[t("button",{class:x(["p-1 rounded text-muted-foreground hover:text-primary transition-colors",{"opacity-50":u.value===e.id}]),title:"Clone to Tasks",onClick:T(D=>A(e.id),["stop"])},[u.value!==e.id?(n(),r("svg",dt,[...s[9]||(s[9]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"},null,-1)])])):(n(),r("svg",ct,[...s[10]||(s[10]=[t("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),t("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])]))],10,it),e.url?(n(),r("a",{key:0,href:e.url,target:"_blank",class:"text-xs text-primary hover:underline"},"→",8,ut)):c("",!0)])]))),128))]))]),_:1})]),_:1})):c("",!0)]))}});export{bt as default};
|