1import{_ as G}from"./AppOrganizationLayout-DtuyhsuB.js";import{_ as O,u as T}from"./Global-CldoNbFC.js";import{u as Y}from"./useHelpers-a-kXaKKm.js";import z from"./CollectiveImpactLayout-Bc68g82i.js";import{_ as L,d as C,m as P,i as m,c as V,w as l,o as d,g as b,a as e,b as t,u,t as a,e as y,h as q,F as B,D as W,E as U}from"./app-DDAIzm-M.js";import"./AppMenu-Dd587Rz3.js";const n=s=>(W("data-v-814b45bb"),s=s(),U(),s),A={class:"w-full px-4 md:px-8"},E={class:"flex flex-col space-y-10"},F={class:"grid grid-cols-1 md:grid-cols-2 gap-5"},$=n(()=>e("h3",{class:"text-2xl font-bold col-span-1 md:col-span-2"}," Waste Efficiency Metrics ",-1)),H=n(()=>e("div",{class:"flex items-start justify-between w-full"},[e("span",{class:"font-bold"},"Dashboard Period")],-1)),J={class:"flex flex-col w-full"},K={for:"year",class:"mt-5"},Q=n(()=>e("span",{class:"text-lg font-bold text-blue-dark-lyc"},"Year: ",-1)),X={class:"flex flex-col space-y-10",id:"report"},Z=n(()=>e("h3",{class:"font-bold"},"Waste Dashboard",-1)),ee={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},te=n(()=>e("div",{class:"flex flex-col md:flex-row items-start justify-between w-full"},[e("div",{class:"font-bold flex items-center"},[e("span",null,"Diversion Rate by Sub Group")])],-1)),le={class:"flex flex-col items-center space-y-3"},oe={class:"w-full relative"},se={class:"w-full text-blue-dark-lyc flex flex-col items-center p-5 rounded-xl"},ae={class:"text-2xl font-bold"},ne={class:"text-6xl font-bold text-blue-dark-lyc rounded-full mt-5"},re=n(()=>e("hr",null,null,-1)),ie={class:"w-full text-blue-dark-lyc flex flex-col items-center p-5 rounded-xl"},ce={class:"text-2xl font-bold"},de={class:"text-6xl font-bold text-blue-dark-lyc rounded-full mt-5"},ue=n(()=>e("div",{class:"flex flex-col lg:flex-row items-start justify-between w-full"},[e("span",{class:"font-bold"},"Active Sub Groups")],-1)),fe=["href"],me={class:"flex items-start justify-end w-full"},pe={class:"w-full text-blue-dark-lyc flex flex-col items-center p-5 rounded-xl"},_e={class:"text-2xl font-bold"},xe={key:0,class:"text-4xl font-bold text-blue-dark-lyc rounded-full mt-5"},be=n(()=>e("hr",null,null,-1)),ye={class:"w-full text-blue-dark-lyc flex flex-col items-center p-5 rounded-xl"},he={class:"text-2xl font-bold"},ve={class:"text-4xl font-bold text-blue-dark-lyc rounded-full mt-5"},ge=n(()=>e("div",{class:"flex flex-col lg:flex-row items-start justify-between w-full"},[e("span",{class:"font-bold"},"Waste Distribution by Category")],-1)),we={class:"w-full"},ke={class:"flex items-center justify-end space-x-3"},De={class:"p-4"},Ce={class:"mb-2 text-lg font-semibold"},Se={__name:"Index",props:{yearList:{type:Array,required:!0},year:{type:Number,required:!0},diversionRate:{type:Object,required:!0,default:()=>({})},distributionByCategory:{type:Object,required:!0},distributionByMetric:{type:Object,required:!0},totalDiversionRate:{type:Number,required:!0},totalPollutionPrevention:{type:Number,required:!0},sourceProportion:{type:Object,required:!0},consumption:{type:Number,required:!0},activeSubGroups:{type:Array,required:!0}},setup(s){const{formatCurrency:p}=Y(),I=new Date().getFullYear(),g=s,w=C(g.year),{changeYear:M}=T(w),S=P(()=>Object.keys(g.distributionByMetric).map(i=>({name:i,value:i}))),h=C(null),N=P(()=>{if(!h.value)return null;const i=g.sourceProportion[h.value];return typeof i=="number"?i:null}),v=C({categoryName:{value:null,matchMode:"contains"}});return(i,r)=>{const k=m("Dropdown"),c=m("Panel"),_=m("font-awesome-icon"),f=m("Column"),j=m("DataTable"),R=m("Skeleton");return d(),V(G,{title:"Waste"},{"top-phrase":l(()=>[b(" Collective Impact ")]),default:l(()=>[e("div",A,[t(z),e("div",E,[e("div",F,[$,t(c,{class:"w-full col-span-1 md:col-span-2",toggleable:""},{header:l(()=>[H]),default:l(()=>[e("div",J,[e("label",K,[Q,t(k,{modelValue:w.value,"onUpdate:modelValue":r[0]||(r[0]=o=>w.value=o),options:s.yearList,onChange:u(M),placeholder:"Select Year",class:"w-56"},null,8,["modelValue","options","onChange"])])])]),_:1})]),e("div",X,[t(c,{class:"w-full",toggleable:""},{header:l(()=>[Z]),default:l(()=>[e("div",ee,[t(c,{class:"flex flex-col justify-start md:col-span-2"},{header:l(()=>[te]),default:l(()=>[e("div",le,[e("div",oe,[t(O,{data:s.diversionRate.bar,"x-axis":{name:"Month",rotate:0,nameGap:60},"y-axis":{name:"Diversion Rate (%)",min:0},"bar-width":"80%"},null,8,["data"])])])]),_:1}),t(c,{class:"flex flex-col justify-center col-span-2"},{default:l(()=>[e("div",null,[e("div",se,[e("h3",ae,[t(_,{icon:["fas","dumpster"],class:"text-green-600"}),b(" - Total Diversion Rate ")]),e("p",ne,a(s.totalDiversionRate)+"% ",1)]),re,e("div",ie,[e("h3",ce,[t(_,{icon:["fas","leaf"],class:"text-green-600"}),b(" - Total Pollution Prevention ")]),e("p",de,a(u(p)(s.totalPollutionPrevention))+" lbs ",1)])])]),_:1}),t(c,null,{header:l(()=>[ue]),default:l(()=>[t(j,{value:s.activeSubGroups,rows:5,class:"mt-5"},{default:l(()=>[t(f,{field:"name",header:"Sub Group",sortable:""}),t(f,null,{body:l(({data:o})=>[e("a",{href:i.route("organization.metrics.index",[o==null?void 0:o.slug,{area:"waste"},{year:u(I)}]),target:"_blank",class:"text-blue-dark-lyc"},[t(_,{icon:["fas","magnifying-glass"]})],8,fe)]),_:1})]),_:1},8,["value"])]),_:1}),t(c,{class:"flex flex-col justify-start col-span-1"},{header:l(()=>[e("div",me,[t(k,{modelValue:h.value,"onUpdate:modelValue":r[1]||(r[1]=o=>h.value=o),options:S.value,"option-label":"name","option-value":"value",placeholder:"Select Metric",class:"text-sm w-64"},null,8,["modelValue","options"])])]),default:l(()=>[e("div",pe,[e("h3",_e,[t(_,{icon:["fas","calculator"],class:"text-yellow-600"}),b(" - Stream Percent Proportion ")]),N.value!==null?(d(),y("p",xe,a(N.value)+"% ",1)):(d(),V(R,{key:1,shape:"rectangle",width:"10rem",height:"2rem",class:"mt-5"}))]),be,e("div",ye,[e("h3",he,[t(_,{icon:["fas","dumpster"],class:"text-yellow-600"}),b(" - Total Waste Generation ")]),e("p",ve,a(u(p)(s.consumption))+" Lbs ",1)])]),_:1}),t(c,{toggleable:"",class:"col-span-2"},{header:l(()=>[ge]),default:l(()=>[e("div",we,[t(j,{filters:v.value,"onUpdate:filters":r[3]||(r[3]=o=>v.value=o),value:s.distributionByCategory,tableStyle:"min-width: 50rem",rows:10,paginator:"","global-filter-fields":["organizationName","categoryName"]},{header:l(()=>[e("div",ke,[t(k,{modelValue:v.value.categoryName.value,"onUpdate:modelValue":r[2]||(r[2]=o=>v.value.categoryName.value=o),options:S.value,"option-label":"name","option-value":"value",placeholder:"Select Category"},null,8,["modelValue","options"])])]),expandedRow:l(o=>
1[e("div",De,[e("h4",Ce,a(o.data.organizationName)+" - "+a(o.data.categoryName)+" Details ",1),e("ul",null,[(d(!0),y(B,null,q(o.data.metrics,(D,x)=>(d(),y("li",{key:x},a(x)+": "+a(u(p)(D)),1))),128))])])]),default:l(()=>[t(f,{field:"organizationName",header:"Organization",sortable:""}),t(f,{field:"categoryName",header:"Category",sortable:""}),t(f,{header:"Metrics",sortable:""},{body:l(o=>[e("ul",null,[(d(!0),y(B,null,q(o.data.metrics,(D,x)=>(d(),y("li",{key:x},a(x)+": "+a(u(p)(D)),1))),128))])]),_:1}),t(f,{field:"total",header:"Total by Category",sortable:""},{body:l(o=>[e("strong",null,a(u(p)(o.data.total)),1)]),_:1})]),_:1},8,["filters","value"])])]),_:1})])]),_:1})])])])]),_:1})}}},Ie=L(Se,[["__scopeId","data-v-814b45bb"]]);export{Ie 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.