"use strict";(self.webpackChunkkonveyor_static_report=self.webpackChunkkonveyor_static_report||[]).push([[346],{4346:(t,e,n)=>{n.r(e),n.d(e,{default:()=>E});var r=n(5043),s=n(6971),o=n(8437),i=n(8185),c=n(326),l=n(4554),a=n(27),d=n(1522),h=n(9876),x=n(8407),j=n(9380),y=n(8951),g=n(8220),p=n(4910),u=n(50),m=n(9678),T=n(8876),I=n(709),P=n(797),f=n(9893),S=n(6131),b=n(4450),k=n(6390),C=n(579);const w=k.jr.map((t=>({category:t,totalIncidents:0,totalStoryPoints:0}))),_={IncidentsBar:{getY:t=>t.totalIncidents,getTooltip:t=>{let{datum:e}=t;return"".concat(e.y," incidents")}},StoryPointsBar:{getY:t=>t.totalStoryPoints,getTooltip:t=>{let{datum:e}=t;return"".concat(e.y," SP")}}},v=t=>{let{application:e}=t;const n=e.issues,s=(0,r.useMemo)((()=>(n||[]).reduce(((t,e)=>{const n=t.find((t=>t.category===e.category));let r;return r=n?[...t.filter((t=>t.category!==e.category)),{category:e.category,totalIncidents:n.totalIncidents+e.totalIncidents,totalStoryPoints:n.totalStoryPoints+e.totalEffort}]:[...t,{category:e.category,totalIncidents:0,totalStoryPoints:0}],r.sort((0,k.T$)((t=>t.category)))}),w)),[n]);return(0,C.jsxs)(y.x,{md:6,children:[(0,C.jsx)(g.E,{children:(0,C.jsxs)(p.Z,{isFullHeight:!0,children:[(0,C.jsx)(u.Z,{children:"Incidents"}),(0,C.jsx)(m.b,{children:(0,C.jsxs)(T.X,{variant:"compact",children:[(0,C.jsx)(I.d,{children:(0,C.jsxs)(P.Tr,{children:[(0,C.jsx)(f.Th,{width:40,children:"Category"}),(0,C.jsx)(f.Th,{children:"Incidents"}),(0,C.jsx)(f.Th,{children:"Total Story Points"})]})}),(0,C.jsx)(S.N,{children:s.map((t=>(0,C.jsxs)(P.Tr,{children:[(0,C.jsx)(b.Td,{children:t.category}),(0,C.jsx)(b.Td,{children:t.totalIncidents}),(0,C.jsx)(b.Td,{children:t.totalStoryPoints})]},t.category)))})]})})]})}),(0,C.jsx)(g.E,{children:(0,C.jsxs)(p.Z,{isFullHeight:!0,children:[(0,C.jsx)(u.Z,{children:"Incidents and Story Points"}),(0,C.jsx)(m.b,{children:(0,C.jsxs)(l.t,{themeColor:a.L.multiOrdered,domainPadding:{x:35},padding:{bottom:40,top:20,left:60,right:0},height:300,width:700,children:[(0,C.jsx)(d.c,{}),(0,C.jsx)(d.c,{dependentAxis:!0,showGrid:!1}),(0,C.jsx)(h.E,{offset:10,children:Object.entries(_).map((t=>{let[e,n]=t;return(0,C.jsx)(x._,{data:s.map((t=>({name:e,x:t.category,y:n.getY(t),label:n.getTooltip}))),labelComponent:(0,C.jsx)(j.I,{constrainToVisibleArea:!0})},e)}))})]})})]})})]})},E=()=>{const t=(0,s.KC)();return(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(o.d8,{children:(0,C.jsx)(i.B,{hasGutter:!0,children:(0,C.jsx)(c.a,{children:t&&(0,C.jsx)(v,{application:t})})})})})}}}]);
//# sourceMappingURL=346.792b6579.chunk.js.map