PageSourceSearch

https://dmvmusicalliance.org/assets/AdminOverview-B8no3WNb.js

js dmvmusicalliance.org collected 2026-10-04 08:50:50 UTC 5,352 bytes, 1 lines download raw bytes

1import{r as u,s as c,j as e,B as h,L as b,w as x}from"./index-BfjHogyd.js";import{A as j}from"./AdminDashboardLayout-ShOiuPYg.js";import"./PageLayout-C4FFeSGk.js";import"./SiteFooter-BpkKuvEO.js";import"./ChatWidget-B0pHQBe1.js";import"./blue-control-room-wide-CIQ9u9e1.js";import"./concert-crowd-acdc-B2NaYUQ0.js";import"./violin-underwater-DPdNnEP6.js";import"./heroTitle-Clu977N3.js";const o=({to:a,title:m,value:t,description:i})=>e.jsxs(b,{to:a,className:"block rounded-lg border border-border bg-[aliceblue] p-5 hover:bg-[aliceblue] transition-colors",children:[e.jsx("p",{className:"text-xs uppercase tracking-widest text-muted-foreground font-heading",children:m}),e.jsx("p",{className:"text-3xl font-heading mt-1 text-foreground",children:t}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:i})]}),C=()=>{const[a,m]=u.useState({users:null,applications:null,drafts:null,submitted:null,messages:null});u.useEffect(()=>{(async()=>{var l,d;const[n,s,g,r,p]=await Promise.all([c.from("volunteer_applications").select("id",{count:"exact",head:!0}),c.from("volunteer_applications").select("id",{count:"exact",head:!0}).eq("status","draft"),c.from("volunteer_applications").select("id",{count:"exact",head:!0}).eq("status","submitted"),c.functions.invoke("admin-manage-users",{body:{action:"list"}}),c.from("contact_messages").select("id",{count:"exact",head:!0})]);m({users:((d=(l=r.data)==null?void 0:l.users)==null?void 0:d.length)??null,applications:n.count??null,drafts:s.count??null,submitted:g.count??null,messages:p.count??null})})()},[]);const t=n=>n==null?"—":n.toLocaleString(),i=({title:n,children:s})=>e.jsxs("section",{className:"space-y-3",children:[e.jsx("h3",{className:"font-heading text-sm uppercase tracking-widest text-muted-foreground",children:n}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:s})]});return e.jsxs(j,{pageTitle:"Admin Overview",children:[e.jsx("h2",{className:"font-heading text-3xl uppercase tracking-wider text-foreground mb-6",children:"Admin Overview"}),e.jsxs("div",{className:"space-y-8",children:[e.jsx(i,{title:"Analytics",children:e.jsxs("a",{href:"https://analytics.google.com/analytics/web/#/p273274842/realtime/overview",target:"_blank",rel:"noopener noreferrer",className:"block rounded-lg border border-border bg-[aliceblue] p-5 hover:bg-[hsl(208_80%_92%)] transition-colors",children:[e.jsx("p",{className:"text-xs uppercase tracking-widest text-muted-foreground font-heading",children:"Google Analytics"}),e.jsx("p",{className:"text-3xl font-heading mt-1 text-[#0000ff]",children:"Open"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"View traffic & visitor data (opens in new tab)"})]})}),e.jsxs(i,{title:"Web Development",children:[e.jsx(o,{to:"/dashboard/admin/forms-audit",title:"Forms Audit",value:"11",description:"All site forms & where they go"}),e.jsx(o,{to:"/dashboard/admin/todo",title:"To Do",value:"2",description:"Open decisions & follow-ups"})]}),e.jsxs(i,{title:"Human Resources",children:[e.jsx(o,{to:"/dashboard/admin/users",title:"Users",value:t(a.users),description:"Manage roles & accounts"}),e.jsx(o,{to:"/dashboard/admin/applications",title:"Applications",value:t(a.applications),description:"All volunteer applications"}),e.jsx(o,{to:"/dashboard/admin/applications",title:"Submitted",value:t(a.submitted),description:"Awaiting review"}),e.jsx(o,{to:"/dashboard/admin/applications",title:"Drafts",value:t(a.drafts),description:"In progress"})]}),e.jsx(i,{title:"Messages",children:e.jsx(o,{to:"/dashboard/admin/contact-messages",title:"Contact Messages",value:t(a.messages),description:"Form submissions"})}),e.jsx(v,{})]})]})},v=()=>{const[a,m]=u.useState([]),[t,i]=u.useState(null);u.useEffect(()=>{c.from("springboard_staff_invites").select("email").order("email").then(({data:s})=>m(s??[]))},[]);const n=async(s,g)=>{i(g);try{const{data:r,error:p}=await c.functions.invoke("send-springboard-staff-welcome",{body:{emails:s}});if(p)throw p;const l=(r==null?void 0:r.results)??[],d=l.filter(f=>!f.ok);d.length?(x.error(`Sent ${l.length-d.length}/${l.length}
1. Some failed.`),console.error("Staff welcome send failures",d)):x.success(`Welcome email sent to ${l.length} recipient(s)`)}catch(r){x.error(r.message||"Send failed")}finally{i(null)}};return e.jsxs("section",{className:"space-y-3",children:[e.jsx("h3",{className:"font-heading text-sm uppercase tracking-widest text-muted-foreground",children:"Springboard Staff Access"}),e.jsxs("div",{className:"rounded-lg border border-border bg-[aliceblue] p-5 space-y-3",children:[e.jsxs("p",{className:"text-sm text-foreground",children:["These emails are auto-granted ",e.jsx("strong",{children:"springboard_staff"})," access when they sign up (or immediately if they already have an account)."]}),e.jsx("ul",{className:"text-sm space-y-1",children:a.map(s=>e.jsxs("li",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"font-mono",children:s.email}),e.jsx(h,{size:"sm",variant:"outline",disabled:t!==null,onClick:()=>n([s.email],s.email),children:t===s.email?"Sending…":"Send welcome email"})]},s.email))}),e.jsx("div",{children:e.jsx(h,{size:"sm",disabled:t!==null||a.length===0,onClick:()=>n(a.map(s=>s.email),"all"),children:t==="all"?"Sending…":"Send to all"})})]})]})};export{C 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.