PageSourceSearch

https://fieldserviceiq.ai/assets/AdminDashboard-B_oVhivm.js

js fieldserviceiq.ai collected 2026-10-05 13:10:39 UTC 3,084 bytes, 1 lines download raw bytes

1import{u as a,j as e}from"./vendor-data-_Pz25YLs.js";import{ay as t,aT as c,q as j,s as o}from"./index-C15KveKt.js";import{C as i,a as l,b as d,c as u}from"./card-DKtZ9FmL.js";import{T as p}from"./trending-up-HCdPYmps.js";import{L as n}from"./vendor-react-C5ET9VRQ.js";function C(){const{data:m=0}=a({queryKey:["admin-orgs-count"],queryFn:async()=>{const{count:r,error:s}=await o.from("organizations").select("*",{count:"exact",head:!0});if(s)throw s;return r||0}}),{data:x=0}=a({queryKey:["admin-users-count"],queryFn:async()=>{const{count:r,error:s}=await o.from("profiles").select("*",{count:"exact",head:!0});if(s)throw s;return r||0}}),{data:h=0}=a({queryKey:["admin-jobs-count"],queryFn:async()=>{const{count:r,error:s}=await o.from("jobs").select("*",{count:"exact",head:!0});if(s)throw s;return r||0}}),{data:f=0}=a({queryKey:["admin-contractors-count"],queryFn:async()=>{const{count:r,error:s}=await o.from("contractors").select("*",{count:"exact",head:!0});if(s)throw s;return r||0}}),g=[{label:"Organizations",value:m,icon:t,href:"/admin/organizations",color:"text-primary"},{label:"Total Users",value:x,icon:c,href:"/admin/users",color:"text-blue-500"},{label:"Total Jobs",value:h,icon:j,color:"text-green-500"},{label:"Contractors",value:f,icon:p,color:"text-orange-500"}];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold text-foreground",children:"Super Admin Dashboard"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Overview of all organizations and users"})]}),e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:g.map(r=>{const s=e.jsxs(i,{className:`transition-colors ${r.href?"hover:bg-accent/50 cursor-pointer":""}`,children:[e.jsxs(l,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(d,{className:"text-sm font-medium text-muted-foreground",children:r.label}),e.jsx(r.icon,{className:`h-5 w-5 ${r.color}`})]}),e.jsx(u,{children:e.jsx("div",{className:"text-3xl font-bold",children:r.value})})]});return r.href?e.jsx(n,{to:r.href,children:s},r.label):e.jsx("div",{children:s},r.label)})}),e.jsxs(i,{children:[e.jsx(l,{children:e.jsx(d,{children:"Quick Actions"})}),e.jsxs(u,{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs(n,{to:"/admin/organizations",className:"flex items-center gap-4 p-4 rounded-lg border hover:bg-accent/50 transition-colors",children:[e.jsx(t,{className:"h-8 w-8 text-primary"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold",children:"Manage Organizations"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Create and manage builder organizations"})]})]}),e.jsxs(n,{to:"/admin/users",className:"flex items-center gap-4 p-4 rounded-lg border hover:bg-accent/50 transition-colors",children:[e.jsx(c,{className:"h-8 w-8 text-blue-500"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold",children:"Manage Users"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"View and manage all platform users"})]})]})]})]})]})}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.