PageSourceSearch

https://www.i-do.app/build/assets/Dashboard-CP6Kc0a_.js

js i-do.app collected 2026-10-08 17:11:55 UTC 3,351 bytes, 1 lines download raw bytes

1import{d as _,c as s,o as t,a as c,b as o,t as l,r as p,n as y,e as k,w as b,f as i,_ as g,F as f,g as C,h as D,i as m,j as z,k as N,l as B,D as F,m as L,u as h,p as S}from"./app-D4e5h_jY.js";import{_ as V}from"./PageHeader.vue_vue_type_script_setup_true_lang-DnQW_kEg.js";const R={class:"ad-card"},j={key:0,class:"flex flex-wrap items-center justify-between gap-3 border-b border-ad-border px-4 py-3"},I={class:"min-w-0"},q={key:0,class:"text-sm font-semibold text-ad-heading"},E={key:1,class:"mt-0.5 text-xs text-ad-muted"},M={key:0,class:"flex items-center gap-2"},A=_({__name:"AdminCard",props:{title:{},description:{},flush:{type:Boolean}},setup(e){return(n,r)=>(t(),s("section",R,[e.title||n.$slots.actions?(t(),s("header",j,[o("div",I,[e.title?(t(),s("h2",q,l(e.title),1)):c("",!0),e.description?(t(),s("p",E,l(e.description),1)):c("",!0)]),n.$slots.actions?(t(),s("div",M,[p(n.$slots,"actions")])):c("",!0)])):c("",!0),o("div",{class:y(e.flush?"":"p-4")},[p(n.$slots,"default")],2)]))}}),P={class:"flex size-11 shrink-0 items-center justify-center rounded-lg bg-ib/10 text-ib"},T={class:"min-w-0"},W={class:"truncate text-sm text-ad-muted"},G={class:"text-2xl font-semibold tabular-nums text-ad-heading"},H={key:0,class:"inline-block h-7 w-14 animate-pulse rounded bg-ad-border align-middle"},v=_({__name:"StatCard",props:{label:{},value:{},icon:{},to:{},loading:{type:Boolean}},setup(e){return(n,r)=>(t(),k(D(e.to?"RouterLink":"div"),{to:e.to,class:y(["ad-card flex items-center gap-4 p-4 transition-shadow",e.to?"hover:border-ib/40 hover:shadow-md":""])},{default:b(()=>[o("span",P,[i(g,{name:e.icon,class:"size-5.5"},null,8,["name"])]),o("div",T,[o("p",W,l(e.label),1),o("p",G,[e.loading?(t(),s("span",H)):(t(),s(f,{key:1},[C(l(e.value),1)],64))])])]),_:1},8,["to","class"]))}}),J={class:"grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-4"},K={class:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3"},O={class:"truncate"},Y=_({__name:"Dashboard",setup(e){const n=m(0),r=m(0),u=m(!0),x=new Intl.NumberFormat("de-DE"),$=z.filter(a=>a.label!=="Übersicht").flatMap(a=>a.items);return N(async()=>{try{const a=await B.query({query:F});n.value=a.data.users?.paginationInfo.totalCount??0,r.value=a.data.donations?.paginationInfo.totalCount??0}catch(a){console.error("Failed to load dashboard widgets",a)}u.value=!1}),(a,Q)=>{const w=L("RouterLink");return t(),s(f,null,[i(V,{title:"Dashboard",description:"Überblick über die Plattform"}),o("div",J,[i(v,{label:"Benutzer",icon:"users",value:h(x).format(n.value),loading:u.value,to:{name:"users.index"}},null,8,["value","loading"]),i(v,{label:"Spenden",icon:"donations",value:h(x).format(r.value),loading:u.value,to:{name:"donations.index"}},null,8,["value","loading"])]),i(A,{title:"Schnellzugriff",description:"Direkt zu den Verwaltungsbereichen",class:"mt-4"},{default:b(()=>[o("div",K,[(t(!0),s(f,null,S(h($),d=>(t(),k(w,{key:d.routeName,to:{name:d.routeName},class:"flex items-center gap-3 rounded-md border border-ad-border px-3 py-2.5 text-sm font-medium text-ad-text transition-colors hover:border-ib/40 hover:bg-ib/5 hover:text-ibd"},{default:b(()=>[i(g,{name:d.icon,class:"size-5 text-ad-muted"},null,8,["name"]),o("span",O,l(d.label),1),i(g,{name:"chevronRight",class:"ml-auto size-4 text-ad-border-strong"})]),_:2},1032,["to"]))),128))])]),_:1})],64)}}});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.