PageSourceSearch

https://bsquared.ai/assets/dashboard-CYWeCi0k.js

js bsquared.ai collected 2026-10-05 15:20:02 UTC 15,512 bytes, 1 lines download raw bytes

1import{c as D,b as U,r as y,d as V,f as E,g as R,u as B,h as F,j as e,U as O,C as i,i as n,k as c,S as T,l as A,m as d,L as a,B as s,T as L,n as q,I as H,o as G,p as Y,s as m,t as C,v as N,P as t,D as k,Z as Q,e as x,A as p,w as M,x as h,y as S,z,E as W,F as Z,G as $}from"./index-DhwrhnZy.js";import{S as j}from"./stat-card-D6RLI4nl.js";import{N as K,M as J,H as X}from"./navigation-D92oE7YS.js";import{C as _}from"./circle-help-B0lOEjtj.js";function de(){const{user:r,logoutMutation:ee}=D(),[,v]=U(),[o,b]=y.useState(""),{toast:u}=V(),{billingPlan:I,canUpgrade:se,upgradeMessage:ae,hasAccess:re}=E(),{organization:g}=R();if(y.useEffect(()=>{(r==null?void 0:r.role)==="client"&&v("/assistant")},[r==null?void 0:r.role,v]),(r==null?void 0:r.role)==="client")return null;const{data:w=[]}=B({queryKey:["/api/voice-agents"]}),f=F({mutationFn:async l=>await(await $("POST","/api/setup-admin",{email:l})).json(),onSuccess:l=>{u({title:"Admin access granted",description:`${o} has been upgraded to admin role.`}),b("")},onError:l=>{u({title:"Setup failed",description:l.message,variant:"destructive"})}}),P=l=>{if(l.preventDefault(),!o.trim()){u({title:"Email required",description:"Please enter an email address.",variant:"destructive"});return}f.mutate(o.trim())};return e.jsx(O,{title:`Welcome back, ${(r==null?void 0:r.name)||"User"}!`,subtitle:"Manage your AI automation workflows and track performance",children:e.jsxs("div",{className:"space-y-8 lg:space-y-12",children:[(r==null?void 0:r.role)==="admin"&&e.jsxs(i,{className:"bg-gradient-to-br from-rose-500/[0.04] via-rose-500/[0.03] to-pink-500/[0.04] border-rose-500/20",children:[e.jsxs(n,{children:[e.jsxs(c,{className:"flex items-center gap-2 tracking-tight",children:[e.jsx(T,{className:"h-5 w-5 text-rose-500"}),"Admin Tools & Navigation Dashboard"]}),e.jsx(A,{children:"Administrative tools and access to all platform features"})]}),e.jsx(d,{children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 lg:gap-6",children:[e.jsxs("div",{className:"bg-background p-5 rounded-xl border border-border/60 shadow-sm",children:[e.jsx("div",{className:"flex items-center justify-between mb-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-rose-500/10 rounded-lg",children:e.jsx(K,{className:"h-5 w-5 text-rose-500"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold",children:"Navigation Dashboard"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Access all 60+ platform features"})]})]})}),e.jsx(a,{href:"/navigation-hub",children:e.jsxs(s,{className:"w-full",children:[e.jsx(L,{className:"w-4 h-4 mr-2"}),"View All Features"]})})]}),e.jsxs("div",{className:"bg-background p-5 rounded-xl border border-border/60 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"p-2 bg-primary/10 rounded-lg",children:e.jsx(q,{className:"h-5 w-5 text-primary"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold",children:"User Management"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Grant admin access to users"})]})]}),e.jsxs("form",{onSubmit:P,className:"space-y-3",children:[e.jsx(H,{type:"email",value:o,onChange:l=>b(l.target.value),placeholder:"[email protected]",className:"w-full"}),e.jsx(s,{type:"submit",disabled:f.isPending,className:"w-full",children:f.isPending?"Upgrading...":e.jsxs(e.Fragment,{children:[e.jsx(G,{className:"w-4 h-4 mr-2"}),"Grant Admin Access"]})})]})]})]})})]}),I==="free"&&e.jsxs(i,{className:"bg-gradient-to-br from-primary/[0.04] via-brand-500/[0.03] to-blue-500/[0.04] border-primary/20",children:[e.jsx(n,{children:e.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[e.jsxs("div",{children:[e.jsxs(c,{className:"flex items-center gap-2 tracking-tight",children:[e.jsx(Y,{className:"h-5 w-5 text-primary"}),"Welcome to BSquared AI!"]}),e.jsxs(A,{className:"mt-1",children:[`You're on the Free plan for "`,(g==null?void 0:g.name)||"Your Organization",'"']})]}),e.jsxs(m,{variant:"outline",children:[e.jsx(C,{className:"w-3 h-3 mr-1"}),"Free Tier"]})]})}),e.jsxs(d,{children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-6",children:[e.jsxs("div",{className:"bg-background/60 p-4 rounded-xl border border-border/60",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(N,{className:"h-4 w-4 text-primary"}),e.jsx("span",{className:"font-medium",children:"1 Voice Agent"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Create your first AI voice agent"})]}),e.jsxs("div",{className:"bg-background/60 p-4 rounded-xl border border-border/60",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(t,{className:"h-4 w-4 text-primary"}),e.jsx("span",{className:"font-medium",children:"100 Call Minutes"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Monthly call minutes included"})]}),e.jsxs("div",{className:"bg-background/60 p-4 rounded-xl border border-border/60",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(k,{className:"h-4 w-4 text-primary"}),e.jsx("span",{className:"font-medium",children:"Basic CRM"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage contacts & deals"})]})]}),e.jsx("div",{className:"bg-gradient-to-br from-primary to-brand-600 rounded-xl p-5 text-primary-foreground shadow-sm",children:e.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-4",children:[e.jsxs("div",{children:[e.jsxs("h4",{className:"font-semibold flex items-center gap-2",children:[e.jsx(Q,{className:"h-4 w-4"}),"Unlock More Power"]}
1),e.jsx("p",{className:"text-primary-foreground/80 text-sm mt-1",children:"Upgrade to Starter for analytics, automation, SMS & more"})]}),e.jsx(a,{href:"/settings",children:e.jsxs(s,{variant:"secondary",className:"shadow-sm",children:[e.jsx(C,{className:"w-4 h-4 mr-2"}),"Upgrade Plan"]})})]})}),e.jsxs("div",{className:"mt-4 grid grid-cols-2 md:grid-cols-4 gap-3 text-center text-sm",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 text-muted-foreground",children:[e.jsx(x,{className:"w-3 h-3"}),e.jsx("span",{children:"Analytics"})]}),e.jsxs("div",{className:"flex items-center justify-center gap-1 text-muted-foreground",children:[e.jsx(x,{className:"w-3 h-3"}),e.jsx("span",{children:"Automations"})]}),e.jsxs("div",{className:"flex items-center justify-center gap-1 text-muted-foreground",children:[e.jsx(x,{className:"w-3 h-3"}),e.jsx("span",{children:"SMS"})]}),e.jsxs("div",{className:"flex items-center justify-center gap-1 text-muted-foreground",children:[e.jsx(x,{className:"w-3 h-3"}),e.jsx("span",{children:"Phone Numbers"})]})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 lg:gap-6",children:[e.jsxs(i,{className:"transition-all duration-200 hover:shadow-md hover:-translate-y-0.5",children:[e.jsx(n,{className:"pb-3",children:e.jsxs(c,{className:"flex items-center gap-2 tracking-tight",children:[e.jsx("div",{className:"p-2 rounded-lg bg-primary/10",children:e.jsx(k,{className:"h-4 w-4 text-primary"})}),"CRM Dashboard"]})}),e.jsxs(d,{children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-4 leading-relaxed",children:"Access comprehensive CRM with contacts, deals, and analytics"}),e.jsx(a,{href:"/crm-dashboard",children:e.jsxs(s,{className:"w-full",children:["Open CRM",e.jsx(p,{className:"w-4 h-4 ml-2"})]})})]})]}),e.jsxs(i,{className:"transition-all duration-200 hover:shadow-md hover:-translate-y-0.5",children:[e.jsx(n,{className:"pb-3",children:e.jsxs(c,{className:"flex items-center gap-2 tracking-tight",children:[e.jsx("div",{className:"p-2 rounded-lg bg-primary/10",children:e.jsx(M,{className:"h-4 w-4 text-primary"})}),"boom video"]})}),e.jsxs(d,{children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-4 leading-relaxed",children:"AI-powered video conferencing with live transcription"}),e.jsx(a,{href:"/boom-dev",children:e.jsxs(s,{className:"w-full",children:["Launch Video",e.jsx(p,{className:"w-4 h-4 ml-2"})]})})]})]}),e.jsxs(i,{className:"transition-all duration-200 hover:shadow-md hover:-translate-y-0.5",children:[e.jsx(n,{className:"pb-3",children:e.jsxs(c,{className:"flex items-center gap-2 tracking-tight",children:[e.jsx("div",{className:"p-2 rounded-lg bg-emerald-500/10",children:e.jsx(t,{className:"h-4 w-4 text-emerald-600"})}),"bam dialer"]})}),e.jsxs(d,{children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-4 leading-relaxed",children:"Enterprise phone dialer with call recording and analytics"}),e.jsx(a,{href:"/enterprise-dialer",children:e.jsxs(s,{className:"w-full",children:["Open Dialer",e.jsx(p,{className:"w-4 h-4 ml-2"})]})})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[e.jsx(j,{value:3,label:"Active AI Agents",delta:"Voice agents configured",icon:e.jsx(N,{className:"h-4 w-4"})}),e.jsx(j,{value:14,label:"Phone Numbers",delta:"0 assigned to agents",icon:e.jsx(t,{className:"h-4 w-4"})}),e.jsx(j,{value:154,label:"Total Calls",delta:"91 completed calls",icon:e.jsx(h,{className:"h-4 w-4"})}),e.jsx(j,{value:0,label:"CRM Contacts",delta:"0 memory entries",icon:e.jsx(S,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 lg:gap-8",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-baseline sm:justify-between gap-1 mb-6",children:[e.jsx("h2",{className:"text-2xl lg:text-3xl font-semibold tracking-tight",children:"Your AI Agents"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage and monitor your active AI automation agents"})]}
vendor: 5,735 bytes, line 1
1),e.jsxs("div",{className:"grid gap-3",children:[w.map(l=>e.jsx(i,{className:"p-4 transition-all duration-200 hover:shadow-md",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-primary/10 rounded-lg flex items-center justify-center",children:e.jsx(t,{className:"w-5 h-5 text-primary"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-medium",children:l.name}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Voice AI agent"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(m,{className:"bg-emerald-500/10 text-emerald-700 border-transparent hover:bg-emerald-500/15",children:"Active"}),e.jsx(s,{variant:"outline",size:"sm",children:"Configure"})]})]})},l.id)),w.length===0&&e.jsxs(e.Fragment,{children:[e.jsx(i,{className:"p-4 transition-all duration-200 hover:shadow-md",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-primary/10 rounded-lg flex items-center justify-center",children:e.jsx(t,{className:"w-5 h-5 text-primary"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-medium",children:"Davis"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Voice AI agent"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(m,{className:"bg-emerald-500/10 text-emerald-700 border-transparent hover:bg-emerald-500/15",children:"Active"}),e.jsx(s,{variant:"outline",size:"sm",children:"Configure"})]})]})}),e.jsx(i,{className:"p-4 transition-all duration-200 hover:shadow-md",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-emerald-500/10 rounded-lg flex items-center justify-center",children:e.jsx(z,{className:"w-5 h-5 text-emerald-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-medium",children:"Mike - Inbound Support Agent"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Voice AI agent"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(m,{className:"bg-emerald-500/10 text-emerald-700 border-transparent hover:bg-emerald-500/15",children:"Active"}),e.jsx(s,{variant:"outline",size:"sm",children:"Configure"})]})]})}),e.jsx(i,{className:"p-4 transition-all duration-200 hover:shadow-md",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-primary/10 rounded-lg flex items-center justify-center",children:e.jsx(h,{className:"w-5 h-5 text-primary"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-medium",children:"Sarah - Outbound Sales Agent"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Voice AI agent"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(m,{className:"bg-emerald-500/10 text-emerald-700 border-transparent hover:bg-emerald-500/15",children:"Active"}),e.jsx(s,{variant:"outline",size:"sm",children:"Configure"})]})]})})]})]})]}),e.jsxs("div",{className:"lg:col-span-1",children:[e.jsx("h2",{className:"text-2xl lg:text-3xl font-semibold tracking-tight mb-6",children:"Quick Actions"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(a,{href:"/chatbot-config",children:e.jsxs(s,{variant:"outline",className:"w-full justify-start",size:"sm",children:[e.jsx(N,{className:"w-4 h-4 mr-3"}),"Configure Chatbot"]})}),e.jsx(a,{href:"/boom-dev",children:e.jsxs(s,{variant:"outline",className:"w-full justify-start",size:"sm",children:[e.jsx(M,{className:"w-4 h-4 mr-3"}),"BOOM Video Conference"]})}),e.jsx(a,{href:"/ai-sales-agent",children:e.jsxs(s,{variant:"outline",className:"w-full justify-start",size:"sm",children:[e.jsx(z,{className:"w-4 h-4 mr-3"}),"AI Sales Agent"]})}),e.jsx(a,{href:"/voice-platform",children:e.jsxs(s,{variant:"outline",className:"w-full justify-start",size:"sm",children:[e.jsx(t,{className:"w-4 h-4 mr-3"}),"Voice Agent Platform"]})}),e.jsx(a,{href:"/enterprise-dialer",children:e.jsxs(s,{variant:"outline",className:"w-full justify-start",size:"sm",children:[e.jsx(h,{className:"w-4 h-4 mr-3"}),"Enterprise Dialer"]})}),e.jsx(a,{href:"/dialers",children:e.jsxs(s,{variant:"outline",className:"w-full justify-start",size:"sm",children:[e.jsx(W,{className:"w-4 h-4 mr-3"}),"Choose Dialer Interface"]})}),e.jsx(a,{href:"/unified-communications-dashboard",children:e.jsxs(s,{variant:"outline",className:"w-full justify-start bg-green-50 border-green-200 hover:bg-green-100 text-green-700",size:"sm",children:[e.jsx(h,{className:"w-4 h-4 mr-3"}),"🎯 VoIP Platform"]})}),e.jsx(a,{href:"/crm-dashboard",children:e.jsxs(s,{variant:"outline",className:"w-full justify-start",size:"sm",children:[e.jsx(S,{className:"w-4 h-4 mr-3"}),"CRM Dashboard"]})}),e.jsx(a,{href:"/chat-memory",children:e.jsxs(s,{variant:"outline",className:"w-full justify-start",size:"sm",children:[e.jsx(J,{className:"w-4 h-4 mr-3"}),"Chat Memory & Analytics"]})}),e.jsx(a,{href:"/contact",children:e.jsxs(s,{variant:"outline",className:"w-full justify-start",size:"sm",children:[e.jsx(_,{className:"w-4 h-4 mr-3"}),"Contact Support"]})}),e.jsx(a,{href:"/crm-calendar",children:e.jsxs(s,{variant:"outline",className:"w-full justify-start",size:"sm",children:[e.jsx(Z,{className:"w-4 h-4 mr-3"}),"Calendar"]})}),e.jsx(a,{href:"/phone-numbers",children:e.jsxs(s,{variant:"outline",className:"w-full justify-start",size:"sm",children:[e.jsx(X,{className:"w-4 h-4 mr-3"}),"Phone Numbers"]})})]})]})]})]})})}export{de 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.