1import{_ as M}from"./BsmaGs9w.js";import h from"./BxImZTRj.js";import{u as C}from"./pa3fC92B.js";import{d as S,o as R,aw as V,az as f,aA as b,aB as t,ax as d,aV as c,a$ as L,j as s,b2 as y,aG as q,aI as l,b3 as g,f as m,k as x}from"./D8VVhd3u.js";import{CanvasRenderer as z}from"./BO5hb2Hd.js";import{LineChart as B}from"./BC9bZxnr.js";import{i as j}from"./B4TwYMSv.js";import{TitleComponent as A,TooltipComponent as N,LegendComponent as $,GridComponent as D}from"./BD4wRRLv.js";import{u as H}from"./C_l9227h.js";import"./NOGNhvb3.js";import"./F1hszqb7.js";import"./BrFyoJBL.js";import"./D6DbGNxf.js";import"./DTT9dHxp.js";import"./BfejGu4n.js";import"./MT2so_3A.js";const P={class:"min-h-screen bg-gradient-to-br from-blue-50 via-white to-purple-50 dark:from-gray-900 dark:via-gray-900 dark:to-gray-800"},T={class:"mx-auto max-w-7xl px-4 py-8 sm:px-6 lg:px-8"},O={class:"mb-8"},E={class:"mb-6 flex items-center justify-between"},I={class:"mb-6 flex gap-3 overflow-x-auto rounded-lg bg-white dark:bg-surface-dark p-2 shadow-sm ring-1 ring-gray-200 dark:ring-gray-700"},F={key:0,class:"rounded-lg bg-yellow-50 dark:bg-yellow-900/20 p-4 shadow-sm ring-1 ring-yellow-100 dark:ring-yellow-800"},G={class:"mb-8 grid gap-6 sm:grid-cols-2 lg:grid-cols-4"},U={class:"group relative overflow-hidden rounded-2xl bg-gradient-to-br from-blue-500 to-blue-600 p-6 shadow-xl transition-all hover:scale-105"},W={class:"relative"},K={class:"mt-2 text-4xl font-bold text-white"},Q={class:"mt-2 text-sm text-blue-100"},J={class:"group relative overflow-hidden rounded-2xl bg-gradient-to-br from-purple-500 to-purple-600 p-6 shadow-xl transition-all hover:scale-105"},X={class:"relative"},Y={class:"mt-2 text-4xl font-bold text-white"},Z={class:"mt-2 text-sm text-purple-100"},tt={class:"group relative overflow-hidden rounded-2xl bg-gradient-to-br from-emerald-500 to-emerald-600 p-6 shadow-xl transition-all hover:scale-105"},et={class:"relative"},at={class:"mt-2 text-4xl font-bold text-white"},st={class:"mt-2 text-sm text-emerald-100"},ot={class:"group relative overflow-hidden rounded-2xl bg-gradient-to-br from-orange-500 to-orange-600 p-6 shadow-xl transition-all hover:scale-105"},rt={class:"relative"},lt={class:"mt-2 text-4xl font-bold text-white"},nt={class:"mt-2 text-sm text-orange-100"},it={class:"space-y-6"},dt={class:"rounded-2xl bg-white dark:bg-surface-dark p-8 shadow-xl ring-1 ring-gray-200 dark:ring-gray-700"},ut={class:"h-96"},ct={class:"rounded-2xl bg-white dark:bg-surface-dark p-8 shadow-xl ring-1 ring-gray-200 dark:ring-gray-700"},gt={class:"h-80"},mt={class:"grid gap-6 lg:grid-cols-2"},xt={class:"rounded-2xl bg-white dark:bg-surface-dark p-6 shadow-xl ring-1 ring-gray-200 dark:ring-gray-700"},pt={class:"space-y-4"},vt={class:"flex items-center justify-between rounded-lg bg-blue-50 dark:bg-blue-900/30 p-4"},ht={class:"text-2xl font-bold text-blue-600 dark:text-blue-400"},ft={class:"flex items-center justify-between rounded-lg bg-purple-50 dark:bg-purple-900/30 p-4"},bt={class:"text-2xl font-bold text-purple-600 dark:text-purple-400"},yt={class:"rounded-2xl bg-white dark:bg-surface-dark p-6 shadow-xl ring-1 ring-gray-200 dark:ring-gray-700"},kt={class:"space-y-4"},wt={class:"mb-2 flex justify-between text-sm"},_t={class:"font-semibold text-blue-600 dark:text-blue-400"},Mt={class:"h-3 w-full overflow-hidden rounded-full bg-gray-200 dark:bg-gray-700"},Ct={class:"mb-2 flex justify-between text-sm"},St={class:"font-semibold text-emerald-600 dark:text-emerald-400"},Rt={class:"h-3 w-full overflow-hidden rounded-full bg-gray-200 dark:bg-gray-700"},Vt={class:"mb-2 flex justify-between text-sm"},Lt={class:"font-semibold text-orange-600 dark:text-orange-400"},qt={class:"h-3 w-full overflow-hidden rounded-full bg-gray-200 dark:bg-gray-700"},Kt=S({__name:"ceo",setup(zt){H([z,B,j,A,N,$,D]);const{authFetch:p}=C(),r=m({totalRequests:0,matched:0,matchRate:0,requests30d:0,requests7d:0,mentoring:{total:0,matched:0,matchRate:0},volunteering:{total:0,matched:0,matchRate:0}}),n=m([]),v=m(!1),o=x(()=>document.documentElement.classList.contains("dark")),k=x(()=>({backgroundColor:"transparent",tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:o.value?"#1f2937":"#fff",borderColor:o.value?"#374151":"#e5e7eb",textStyle:{color:o.value?"#f3f4f6":"#111827"}},legend:{data:["Mentoring Requests","Volunteering Requests","Mentoring Matched","Volunteering Matched"],bottom:0,textStyle:{color:o.value?"#9ca3af":"#6b7280"}},grid:{left:"3%",right:"4%",bottom:"15%",containLabel:!0},xAxis:{type:"category",data:n.value.map(a=>
1a.month),axisLine:{lineStyle:{color:o.value?"#4b5563":"#d1d5db"}},axisLabel:{color:o.value?"#9ca3af":"#6b7280"}},yAxis:{type:"value",axisLine:{lineStyle:{color:o.value?"#4b5563":"#d1d5db"}},axisLabel:{color:o.value?"#9ca3af":"#6b7280"},splitLine:{lineStyle:{color:o.value?"#374151":"#e5e7eb"}}},series:[{name:"Mentoring Requests",type:"bar",stack:"requests",data:n.value.map(a=>a.mentoring.requests),itemStyle:{color:"#10b981"}},{name:"Volunteering Requests",type:"bar",stack:"requests",data:n.value.map(a=>a.volunteering.requests),itemStyle:{color:"#f97316"}},{name:"Mentoring Matched",type:"line",data:n.value.map(a=>a.mentoring.accepted),itemStyle:{color:"#059669"},lineStyle:{width:3}},{name:"Volunteering Matched",type:"line",data:n.value.map(a=>a.volunteering.accepted),itemStyle:{color:"#ea580c"},lineStyle:{width:3}}]})),w=x(()=>({backgroundColor:"transparent",tooltip:{trigger:"axis",formatter:a=>{let e=`${a[0].axisValue}<br/>`;return a.forEach(i=>{e+=`${i.marker} ${i.seriesName}: ${i.value}%<br/>`}),e},backgroundColor:o.value?"#1f2937":"#fff",borderColor:o.value?"#374151":"#e5e7eb",textStyle:{color:o.value?"#f3f4f6":"#111827"}},legend:{data:["Mentoring Success Rate","Volunteering Success Rate"],textStyle:{color:o.value?"#9ca3af":"#6b7280"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:n.value.map(a=>a.month),axisLine:{lineStyle:{color:o.value?"#4b5563":"#d1d5db"}},axisLabel:{color:o.value?"#9ca3af":"#6b7280"}},yAxis:{type:"value",min:0,max:100,axisLabel:{formatter:"{value}%",color:o.value?"#9ca3af":"#6b7280"},axisLine:{lineStyle:{color:o.value?"#4b5563":"#d1d5db"}},splitLine:{lineStyle:{color:o.value?"#374151":"#e5e7eb"}}},series:[{name:"Mentoring Success Rate",type:"line",smooth:!0,data:n.value.map(a=>a.mentoring.rate),areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:o.value?"rgba(16, 185, 129, 0.2)":"rgba(16, 185, 129, 0.3)"},{offset:1,color:"rgba(16, 185, 129, 0.05)"}]}},itemStyle:{color:"#10b981"},lineStyle:{width:3}},{name:"Volunteering Success Rate",type:"line",smooth:!0,data:n.value.map(a=>a.volunteering.rate),areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:o.value?"rgba(249, 115, 22, 0.2)":"rgba(249, 115, 22, 0.3)"},{offset:1,color:"rgba(249, 115, 22, 0.05)"}]}},itemStyle:{color:"#f97316"},lineStyle:{width:3}}]}));async function _(){try{const[a,e]=await Promise.all([p("/api/growni/analytics/ccm-overview"),p("/api/growni/analytics/ccm-trends",{query:{months:12}})]);r.value=a.overview,n.value=e.trends,v.value=!!(a.mock||e.mock)}catch(a){console.error("Failed to load CEO dashboard:",a)}}function u(a){return new Intl.NumberFormat("sk-SK").format(Math.round(a))}return R(()=>{_()}),V({title:"CEO Dashboard - GROWNi Platform"}),(a,e)=>{const i=M;return f(),b("div",P,[t("div",T,[t("div",O,[t("div",E,[e[1]||(e[1]=t("div",null,[t("h1",{class:"bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-400 dark:to-purple-400 bg-clip-text text-4xl font-bold text-transparent"}," ð± GROWNi Platform Dashboard "),t("p",{class:"mt-2 text-lg text-gray-600 dark:text-gray-400"}," Community Care Matching (CCM) ⢠Real-time Platform Insights ")],-1)),d(i,{to:"/growni",class:"inline-flex items-center rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-surface-dark px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 shadow-sm transition-all hover:bg-gray-50 dark:hover:bg-gray-700"},{default:c(()=>[...e[0]||(e[0]=[t("svg",{class:"mr-2 h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 19l-7-7m0 0l7-7m-7 7h18"})],-1),L(" Back to Portal ",-1)])]),_:1})]),t("div",I,[d(i,{to:"/growni/analytics",class:"flex-shrink-0 rounded-lg px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 transition-colors hover:bg-gray-50 dark:hover:bg-gray-700"},{default:c(()=>[...e[2]||(e[2]=[t("div",{class:"flex items-center gap-2"},[t("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})]),t("span",null,"User Analytics")],-1)])]),_:1}),d(i,{to:"/growni/ceo",class:"flex-shrink-0 rounded-lg bg-blue-50 dark:bg-blue-900/30 px-4 py-2 text-sm font-medium text-blue-700 dark:text-blue-400 ring-1 ring-blue-200 dark:ring-blue-800"},{default:c(()=>[...e[3]||(e[3]=[t("div",{class:"flex items-center gap-2"},[t("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})]),t("span",null,"CCM Dashboard")],-1)])]),_:1}),d(i,{to:"/growni/analytics/platform",class:"flex-shrink-0 rounded-lg px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 transition-colors hover:bg-gray-50 dark:hover:bg-gray-700"},{default:c(()=>[...e[4]||(e[4]=[t("div",{class:"flex items-center gap-2"},[t("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})]),t("span",null,"Platform Traction")],-1)])]),_:1}),d(i,{to:"/growni/analytics/insights",class:"flex-shrink-0 rounded-lg px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 transition-colors hover:bg-gray-50 dark:hover:bg-gray-700"},{default:c(()=>[...e[5]||(e[5]=[t("div",{class:"flex items-center gap-2"},[t("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"})]),t("span",null,"Insights")],-1)])]),_:1})]),s(v)?(f(),b("div",F,[...e[6]||(e[6]=[y('<div class="flex items-start"><svg class="h-5 w-5 flex-shrink-0 text-yellow-600 dark:text-yellow-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
1<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path></svg><div class="ml-3"><h3 class="text-sm font-medium text-yellow-800 dark:text-yellow-200">Using Sample Data</h3><p class="mt-1 text-sm text-yellow-700 dark:text-yellow-300"> Connect to BigQuery to see live platform data. </p></div></div>',1)])])):q("",!0)]),t("div",G,[t("div",U,[e[8]||(e[8]=t("div",{class:"absolute right-0 top-0 h-32 w-32 -translate-y-8 translate-x-8 transform opacity-10"},[t("svg",{fill:"currentColor",viewBox:"0 0 20 20",class:"text-white"},[t("path",{d:"M9 6a3 3 0 11-6 0 3 3 0 016 0zM17 6a3 3 0 11-6 0 3 3 0 016 0zM12.93 17c.046-.327.07-.66.07-1a6.97 6.97 0 00-1.5-4.33A5 5 0 0119 16v1h-6.07zM6 11a5 5 0 015 5v1H1v-1a5 5 0 015-5z"})])],-1)),t("div",W,[e[7]||(e[7]=t("p",{class:"text-sm font-medium text-blue-100"},"Total Matches Made",-1)),t("p",K,l(u(s(r).matched)),1),t("p",Q,l(s(r).matchRate)+"% success rate ",1)])]),t("div",J,[e[10]||(e[10]=t("div",{class:"absolute right-0 top-0 h-32 w-32 -translate-y-8 translate-x-8 transform opacity-10"},[t("svg",{fill:"currentColor",viewBox:"0 0 20 20",class:"text-white"},[t("path",{"fill-rule":"evenodd",d:"M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z"})])],-1)),t("div",X,[e[9]||(e[9]=t("p",{class:"text-sm font-medium text-purple-100"},"All-Time Requests",-1)),t("p",Y,l(u(s(r).totalRequests)),1),t("p",Z,l(s(r).requests30d)+" in last 30 days ",1)])]),t("div",tt,[e[12]||(e[12]=t("div",{class:"absolute right-0 top-0 h-32 w-32 -translate-y-8 translate-x-8 transform opacity-10"},[t("svg",{fill:"currentColor",viewBox:"0 0 20 20",class:"text-white"},[t("path",{d:"M10.394 2.08a1 1 0 00-.788 0l-7 3a1 1 0 000 1.84L5.25 8.051a.999.999 0 01.356-.257l4-1.714a1 1 0 11.788 1.838L7.667 9.088l1.94.831a1 1 0 00.787 0l7-3a1 1 0 000-1.838l-7-3zM3.31 9.397L5 10.12v4.102a8.969 8.969 0 00-1.05-.174 1 1 0 01-.89-.89 11.115 11.115 0 01.25-3.762zM9.3 16.573A9.026 9.026 0 007 14.935v-3.957l1.818.78a3 3 0 002.364 0l5.508-2.361a11.026 11.026 0 01.25 3.762 1 1 0 01-.89.89 8.968 8.968 0 00-5.35 2.524 1 1 0 01-1.4 0zM6 18a1 1 0 001-1v-2.065a8.935 8.935 0 00-2-.712V17a1 1 0 001 1z"})])],-1)),t("div",et,[e[11]||(e[11]=t("p",{class:"text-sm font-medium text-emerald-100"},"Mentoring Matches",-1)),t("p",at,l(u(s(r).mentoring.matched)),1),t("p",st,l(s(r).mentoring.matchRate)+"% of "+l(u(s(r).mentoring.total))+" requests ",1)])]),t("div",ot,[e[14]||(e[14]=t("div",{class:"absolute right-0 top-0 h-32 w-32 -translate-y-8 translate-x-8 transform opacity-10"},[t("svg",{fill:"currentColor",viewBox:"0 0 20 20",class:"text-white"},[t("path",{"fill-rule":"evenodd",d:"M3.172 5.172a4 4 0 015.656 0L10 6.343l1.172-1.171a4 4 0 115.656 5.656L10 17.657l-6.828-6.829a4 4 0 010-5.656z"})])],-1)),t("div",rt,[e[13]||(e[13]=t("p",{class:"text-sm font-medium text-orange-100"},"Volunteering Matches",-1)),t("p",lt,l(u(s(r).volunteering.matched)),1),t("p",nt,l(s(r).volunteering.matchRate)+"% of "+l(u(s(r).volunteering.total))+" requests ",1)])])]),t("div",it,[t("div",dt,[e[15]||(e[15]=y('<div class="mb-6 flex items-center justify-between"><div><h3 class="text-2xl font-semibold text-gray-900 dark:text-white"> Community Care Matching Trends </h3><p class="mt-1 text-sm text-gray-600 dark:text-gray-400"> Monthly requests and acceptance rates over the last 12 months </p></div><div class="flex gap-4"><div class="flex items-center gap-2"><div class="h-3 w-3 rounded-full bg-emerald-500"></div><span class="text-sm text-gray-600 dark:text-gray-400">Mentoring</span></div><div class="flex items-center gap-2"><div class="h-3 w-3 rounded-full bg-orange-500"></div><span class="text-sm text-gray-600 dark:text-gray-400">Volunteering</span></div></div></div>',1)),t("div",ut,[d(s(h),{option:s(k),autoresize:""},null,8,["option"])])]),t("div",ct,[e[16]||(e[16]=t("div",{class:"mb-6"},[t("h3",{class:"text-2xl font-semibold text-gray-900 dark:text-white"}," Match Success Rates "),t("p",{class:"mt-1 text-sm text-gray-600 dark:text-gray-400"}," Percentage of requests successfully matched each month ")],-1)),t("div",gt,[d(s(h),{option:s(w),autoresize:""},null,8,["option"])])]),t("div",mt,[t("div",xt,[e[21]||(e[21]=t("h3",{class:"mb-4 text-lg font-semibold text-gray-900 dark:text-white"}," ð Recent Activity ",-1)),t("div",pt,[t("div",vt,[t("div",null,[e[17]||(e[17]=t("p",{class:"text-sm font-medium text-gray-600 dark:text-gray-400"},"Last 7 Days",-1)),t("p",ht,l(s(r).requests7d)+" requests",1)]),e[18]||(e[18]=t("div",{class:"rounded-full bg-blue-100 dar
1k:bg-blue-900/50 p-3"},[t("svg",{class:"h-6 w-6 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"})])],-1))]),t("div",ft,[t("div",null,[e[19]||(e[19]=t("p",{class:"text-sm font-medium text-gray-600 dark:text-gray-400"},"Last 30 Days",-1)),t("p",bt,l(s(r).requests30d)+" requests",1)]),e[20]||(e[20]=t("div",{class:"rounded-full bg-purple-100 dark:bg-purple-900/50 p-3"},[t("svg",{class:"h-6 w-6 text-purple-600 dark:text-purple-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})])],-1))])])]),t("div",yt,[e[25]||(e[25]=t("h3",{class:"mb-4 text-lg font-semibold text-gray-900 dark:text-white"}," ð¯ Platform Impact ",-1)),t("div",kt,[t("div",null,[t("div",wt,[e[22]||(e[22]=t("span",{class:"font-medium text-gray-700 dark:text-gray-300"},"Overall Success Rate",-1)),t("span",_t,l(s(r).matchRate)+"%",1)]),t("div",Mt,[t("div",{class:"h-full rounded-full bg-gradient-to-r from-blue-500 to-purple-500",style:g({width:s(r).matchRate+"%"})},null,4)])]),t("div",null,[t("div",Ct,[e[23]||(e[23]=t("span",{class:"font-medium text-gray-700 dark:text-gray-300"},"Mentoring Success",-1)),t("span",St,l(s(r).mentoring.matchRate)+"%",1)]),t("div",Rt,[t("div",{class:"h-full rounded-full bg-emerald-500",style:g({width:s(r).mentoring.matchRate+"%"})},null,4)])]),t("div",null,[t("div",Vt,[e[24]||(e[24]=t("span",{class:"font-medium text-gray-700 dark:text-gray-300"},"Volunteering Success",-1)),t("span",Lt,l(s(r).volunteering.matchRate)+"%",1)]),t("div",qt,[t("div",{class:"h-full rounded-full bg-orange-500",style:g({width:s(r).volunteering.matchRate+"%"})},null,4)])])])])])])])])}}});export{Kt as default}; 2//# sourceMappingURL=DeNOq1V1.js.map
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.