PageSourceSearch

https://utsniper.com/assets/Overview-Bxi4En71.js

js utsniper.com collected 2026-09-24 14:57:12 UTC 4,281 bytes, 1 lines download raw bytes

1import{r as N,j as e}from"./react-DmmmXvkf.js";import{V as b,b1 as w,aH as y,e as O,at as S,ae as C,y as l}from"./index-C1oWTp1R.js";import{e as k,D}from"./DateRangePicker-Gmnh6dyo.js";import{C as g,a as M,b as U,c as p}from"./card-BcT-hHLI.js";import{S as v}from"./skeleton-B3U8IGPm.js";import{u as R}from"./i18n-DQg7CiDt.js";import{s as T}from"./startOfDay-BRYZsaos.js";import"./query-BEXY55w7.js";import"./motion-BB-_2whf.js";import"./chevron-left-fSIKIPdO.js";import"./popover-D5T_GLpx.js";const B=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],I=b("dollar-sign",B);function o({icon:a,label:n,value:c,highlight:t}){return e.jsx(g,{className:l("overflow-hidden",t?"bg-primary/[0.07] border-primary/25":"bg-card/40 border-white/[0.07]"),children:e.jsxs(p,{className:"p-5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("span",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:n}),e.jsx("div",{className:l("w-8 h-8 rounded-lg flex items-center justify-center",t?"bg-primary/15":"bg-white/[0.05]"),children:e.jsx(a,{className:l("w-4 h-4",t?"text-primary":"text-muted-foreground")})})]}),e.jsx("div",{className:l("text-3xl font-black tracking-tight tabular-nums",t&&"text-primary"),children:c})]})})}function W(){const{t:a}=R(),[n,c]=N.useState(void 0),t=n?.from?T(n.from).toISOString():void 0,m=n?.to?k(n.to).toISOString():void 0,{data:i,isLoading:f}=w({...t?{from:t}:{},...m?{to:m}:{}}),x=!!(t||m),u=e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:a("adminOverview.title")}),e.jsx("p",{className:"text-muted-foreground",children:a("adminOverview.subtitle")})]}),e.jsx(D,{value:n,onChange:c,align:"end",className:"sm:w-auto",placeholder:`${a("dashSnipes.dateFrom")} – ${a("dashSnipes.dateTo")}`,clearLabel:a("dashSnipes.clearDates")})]});if(f)return e.jsxs("div",{className:"space-y-8",children:[u,e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-4",children:[1,2,3,4,5].map(s=>e.jsx(v,{className:"h-28 bg-card rounded-xl"},s))}),e.jsx(v,{className:"h-80 bg-card rounded-xl"})]});const d=Array.from((i?.usersByPlan??[]).reduce((s,r)=>s.set(r.planName,(s.get(r.planName)??0)+r.count),new Map),([s,r])=>({planName:s,count:r})).filter(s=>s.count>0).sort((s,r)=>r.count-s.count),h=d.reduce((s,r)=>s+r.count,0),j=Math.max(1,...d.map(s=>s.count));return e.jsxs("div",{className:"space-y-8",children:[u,e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-4",children:[e.jsx(o,{icon:y,label:a(x?"adminOverview.signupsRange":"adminOverview.totalUsers"),value:i?.totalUsers??0}),e.jsx(o,{icon:O,label:a("adminOverview.activeSubs"),value:i?.activeSubscriptions??0}),e.jsx(o,{icon:S,label:a("adminOverview.totalOrders"),value:i?.totalOrders??0}),e.jsx(o,{icon:C,label:a("adminOverview.newUsersMonth"),value:i?.newUsersThisMonth??0}),e.jsx(o,{icon:I,label:a(x?"adminOverview.revenueRange":"adminOverview.revenueMonth"),value:`€${(i?.revenueThisMonth??0).toFixed(2)}`,highlight:!0})]}),e.jsxs(g,{className:"bg-card/40 border-white/[0.07]",children:[e.jsx(M,{children:e.jsx(U,{className:"text-lg",children:a("adminOverview.usersByPlan")})}),e.jsx(p,{children:d.length>0?e.jsx("div",{className:"space-y-3",children:d.map(s=>e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-36 shrink-0 text-sm font-medium text-foreground truncate",children:s.planName}),e.jsx("div",{className:"flex-1 h-2.5 rounded-full bg-white/[0.06] overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-primary/70 to-primary",style:{width:`${s.count/j*100}%`}})}),e.jsxs("div",{className:"w-24 shrink-0 text-right text-sm tabular-nums",children:[e.jsx("span",{className:"font-bold text-foreground",children:s.count}),e.jsxs("span",{className:"text-muted-foreground ml-1",children:["(",h?Math.round(s.count/h*100):0,"%)"]})]})]},s.planName))}):e.jsx("div",{className:"py-12 text-center text-muted-foreground",children:a("adminOverview.noData")})})]})]})}export{W as AdminOverview};

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.