PageSourceSearch

https://businessinsights.lovable.app/assets/SprintGoalsTracker-CPGPfRCI.js

js businessinsights.lovable.app collected 2026-10-03 03:28:31 UTC 3,471 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-ui-D7X1860i.js";import{r as u}from"./vendor-react-BchadoZV.js";import{d as j,f as v,g,e as N,n as y,B as C,P as b}from"./index-BNuU0U7e.js";import{u as D}from"./vendor-i18n-rFxkqqo2.js";import{T}from"./target-CL86Zl-a.js";import{B as k,h as S,X as B,Y as R,T as G,l as K,b as n}from"./vendor-charts-DLW0tl0w.js";import"./vendor-utils-Dgo5sBm9.js";import"./vendor-supabase-DBq2mNUo.js";const Y=({sprints:o,tasks:c})=>{const{t:m}=D(),i=u.useMemo(()=>o.map(t=>{const s=c.filter(a=>a.sprint_id===t.id),r=s.reduce((a,l)=>a+(l.story_points||0),0),p=s.filter(a=>a.status==="completed").reduce((a,l)=>a+(l.story_points||0),0),h=0,f=r>0?Math.round(p/r*100):0;return{...t,committed:r,delivered:p,addedScope:h,pct:f,taskCount:s.length,completedCount:s.filter(a=>a.status==="completed").length}}),[o,c]),x=i.filter(t=>t.status==="completed"||t.status==="active").map(t=>({name:t.name,Committed:t.committed,Delivered:t.delivered,Capacity:t.capacity_points||0})),d=u.useMemo(()=>{const t=i.filter(s=>s.status==="completed"&&s.committed>0);return t.length?Math.round(t.reduce((s,r)=>s+r.pct,0)/t.length):0},[i]);return e.jsxs(j,{children:[e.jsx(v,{className:"pb-2",children:e.jsxs(g,{className:"text-base flex items-center gap-2",children:[e.jsx(T,{className:"w-4 h-4"}),m("agile.sgt.sprintGoalsCommitmentVsDelivered","Sprint Goals & Commitment vs Delivered")]})}),e.jsxs(N,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"rounded-lg border border-border p-3 text-center",children:[e.jsxs("div",{className:"text-2xl font-bold",children:[d,"%"]}),e.jsx("div",{className:"text-[10px] text-muted-foreground",children:m("agile.sgt.avgDeliveryRate","Avg Delivery Rate")})]}),e.jsx("div",{className:"flex-1 text-xs text-muted-foreground",children:d>=80?"✅ Team consistently delivers on commitments":d>=60?"⚠️ Consider reducing sprint scope":"🔴 Over-commitment detected — recalibrate capacity"})]}),x.length>0&&e.jsx("div",{className:"h-[220px]",children:e.jsx(y,{width:"100%",height:"100%",children:e.jsxs(k,{data:x,children:[e.jsx(S,{strokeDasharray:"3 3",className:"stroke-border"}),e.jsx(B,{dataKey:"name",tick:{fontSize:10}}),e.jsx(R,{tick:{fontSize:10}}),e.jsx(G,{}),e.jsx(K,{}),e.jsx(n,{dataKey:"Committed",fill:"hsl(var(--muted-foreground))",radius:[4,4,0,0]}),e.jsx(n,{dataKey:"Delivered",fill:"hsl(var(--primary))",radius:[4,4,0,0]}),e.jsx(n,{dataKey:"Capacity",fill:"hsl(var(--accent-foreground) / 0.3)",radius:[4,4,0,0]})]})})}),e.jsx("div",{className:"space-y-2",children:i.map(t=>e.jsxs("div",{className:"rounded-lg border border-border p-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium",children:t.name}),e.jsx(C,{variant:t.status==="active"?"default":t.status==="completed"?"secondary":"outline",className:"text-[9px]",children:t.status})]}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.delivered,"/",t.committed," SP (",t.pct,"%)"]})]}),t.goal&&e.jsxs("p",{className:"text-xs text-muted-foreground mb-2",children:["🎯 ",t.goal]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(b,{value:t.pct,className:"flex-1 h-1.5"}),e.jsxs("span",{className:"text-[10px] text-muted-foreground",children:[t.completedCount,"/",t.taskCount," items"]})]})]},t.id))})]})]})};export{Y 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.