PageSourceSearch

https://www.bizware.ai/assets/meetings-CWea0ygf.js

js bizware.ai collected 2026-10-05 11:52:42 UTC 15,593 bytes, 1 lines download raw bytes

1import{i as A,k as H,l as q,r as n,j as e,B as c,t as g,L as V}from"./index-BI34Wull.js";import{u as k}from"./useServerFn-CCokYi5s.js";import{r as te,g as se,B as Z,M as ae,s as ne,a as ie}from"./recall.functions-CHA-tNTN.js";import{C as re,P as oe}from"./play-BUHTa254.js";import{C as G}from"./chevron-right-FiTzcUYL.js";import{L as F}from"./loader-circle-RJ_lzir4.js";import{c as U}from"./createLucideIcon-4AT48GiE.js";import{C as ce}from"./chevron-down-M6ruW4D9.js";import{F as J}from"./file-text-DvJ7lfg-.js";import{E as le}from"./external-link-Bxe1ZwP_.js";import{C as de}from"./copy-Bm8JrS-i.js";import{S as he}from"./sparkles-5BKEcR93.js";import{I as K}from"./input-DSEt1Ik3.js";import{L as P}from"./label-B11EJTGs.js";import{D as ue,f as ge,a as xe,b as me,c as pe}from"./dialog-CchBIL7t.js";import{P as fe}from"./plug-DX40JeVp.js";import"./index-Bv6t4qTQ.js";import"./index-CneZgM9-.js";import"./index-DYIppBmS.js";import"./Combination-BhuTL0bJ.js";import"./index-B4j4u9tl.js";import"./x-CYSo_sK4.js";const je=[["path",{d:"M13.67 8H18a2 2 0 0 1 2 2v4.33",key:"7az073"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M22 22 2 2",key:"1r8tn9"}],["path",{d:"M8 8H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 1.414-.586",key:"s09a7a"}],["path",{d:"M9 13v2",key:"rq6x2g"}],["path",{d:"M9.67 4H12v2.33",key:"110xot"}]],Q=U("bot-off",je);const we=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],ve=U("calendar-days",we);const ye=[["path",{d:"M16 19h6",key:"xwg31i"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M19 16v6",key:"tddt3s"}],["path",{d:"M21 12.598V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8.5",key:"1glfrc"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}]],be=U("calendar-plus",ye),Ne=A({method:"POST"}).middleware([H]).handler(q("3637c405af32cda7e606ae12450853996f1ecf672d1f59c30e920d76e03fc839")),ke=A({method:"POST"}).middleware([H]).handler(q("633ea036104106b0b87888c3b47e49bc4adf68392f18a4eaf1b0765ee852a705")),_e=A({method:"POST"}).middleware([H]).handler(q("ec7384eb149d9169f7b9d8f109be29763e7d1d4d6c6cca4b1b15a377a01d9cdc"));function E(i){const a=new Date(i);return a.setHours(0,0,0,0),a}function _(i,a){const l=new Date(i);return l.setDate(l.getDate()+a),l}function Ce(i){const a=E(i);return _(a,-a.getDay())}function Me(i){const a=E(i);return a.setDate(1),a}function Se(i,a){if(i==="today"){const f=E(a);return{from:f,to:_(f,1)}}if(i==="week"){const f=Ce(a);return{from:f,to:_(f,7)}}const l=Me(a),x=new Date(l);return x.setMonth(x.getMonth()+1),{from:l,to:x}}function X(i,a,l){if(i==="today")return _(a,l);if(i==="week")return _(a,7*l);const x=new Date(a);return x.setMonth(x.getMonth()+l),x}const Y=i=>new Date(i).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"}),T=i=>i.toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric"});function ze({compact:i=!1}){const a=k(Ne),l=k(ke),x=k(_e),f=k(te),D=k(se),[m,I]=n.useState("week"),[v,b]=n.useState(()=>new Date),[C,M]=n.useState([]),[L,S]=n.useState(!0),[y,j]=n.useState(null),[B,$]=n.useState(null),{from:N,to:z}=n.useMemo(()=>Se(m,v),[m,v]),p=n.useCallback(async()=>{S(!0);try{const s=await a({data:{from:N.toISOString(),to:z.toISOString()}});M(s.meetings)}catch{M([])}finally{S(!1)}},[a,N,z]);n.useEffect(()=>{p()},[p]);async function O(s){j(s.id);const o=!(s.auto_record&&s.bot_status!=="cancelled");try{await l({data:{meeting_id:s.id,enabled:o}}),g.success(o?"Recording on — Coaching and Notes are on too. Biz will join this meeting.":"Not recording — Coaching and Notes are off. Biz will skip this meeting."),await p()}catch(t){g.error(t instanceof Error?t.message:"Could not update this meeting")}finally{j(null)}}
1async function r(s,o){const t=s.auto_record&&s.bot_status!=="cancelled",d={want_coaching:t&&s.want_coaching,want_notes:t&&s.want_notes},h=o==="coaching"?{...d,want_coaching:!d.want_coaching}:{...d,want_notes:!d.want_notes};j(s.id);try{await x({data:{meeting_id:s.id,...h}});const w=t?"":" Recording is on — Biz will join.";g.success(!h.want_coaching&&!h.want_notes?"Biz will skip this meeting.":h.want_coaching&&h.want_notes?`Biz will send coaching and notes.${w}`:h.want_coaching?`Biz will send coaching only.${w}`:`Biz will send notes only.${w}`),await p()}catch(w){g.error(w instanceof Error?w.message:"Could not update this meeting")}finally{j(null)}}async function u(s){if(s.bot_id){j(s.id);try{await f({data:{bot_id:s.bot_id}}),g.success("Transcript requested — it will appear in My Calls shortly."),await p()}catch(o){g.error(o instanceof Error?o.message:"Could not get the transcript")}finally{j(null)}}}async function R(s){if(s.bot_id){j(s.id);try{await D({data:{bot_id:s.bot_id}}),g.success("Biz scored this call. Open My Calls to see the coaching."),await p()}catch(o){g.error(o instanceof Error?o.message:"Could not score this call")}finally{j(null)}}}const W=n.useMemo(()=>{const s=new Map;for(const o of C){const t=E(new Date(o.starts_at)).toISOString(),d=s.get(t)??[];d.push(o),s.set(t,d)}return[...s.entries()].sort((o,t)=>o[0].localeCompare(t[0]))},[C]),ee=m==="today"?T(N):m==="week"?`${T(N)} – ${T(_(z,-1))}`:N.toLocaleDateString(void 0,{month:"long",year:"numeric"});return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.jsx("div",{className:"inline-flex rounded-lg border border-border p-0.5",children:["today","week","month"].map(s=>e.jsx("button",{type:"button",onClick:()=>{I(s),b(new Date)},className:`rounded-md px-3 py-1 text-xs font-semibold capitalize transition ${m===s?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"}`,children:s==="today"?"Today":`This ${s}`},s))}),e.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[e.jsx(c,{variant:"ghost",size:"icon",onClick:()=>b(s=>X(m,s,-1)),children:e.jsx(re,{className:"h-4 w-4"})}),e.jsx("span",{className:"min-w-[11rem] text-center text-sm font-medium",children:ee}),e.jsx(c,{variant:"ghost",size:"icon",onClick:()=>b(s=>X(m,s,1)),children:e.jsx(G,{className:"h-4 w-4"})}),e.jsx(c,{variant:"outline",size:"sm",onClick:()=>b(new Date),children:"Today"})]})]}),L?e.jsx("div",{className:"flex justify-center py-12",children:e.jsx(F,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):W.length===0?e.jsxs("div",{className:"rounded-xl border border-dashed border-border p-8 text-center text-sm text-muted-foreground",children:[e.jsx(ve,{className:"mx-auto mb-2 h-6 w-6 opacity-60"}),"No meetings in this range. Connect a calendar or paste a meeting link in My Calls and it will show up here."]}):e.jsx("div",{className:"space-y-5",children:W.map(([s,o])=>e.jsxs("div",{children:[e.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:T(new Date(s))}),e.jsx("div",{className:i?"space-y-1.5":"space-y-2",children:o.map(t=>{const d=new Date(t.ends_at).getTime()<Date.now(),h=t.auto_record&&t.bot_status!=="cancelled",w=B===t.id;return e.jsxs("div",{className:"rounded-xl border border-border p-3",style:{background:"var(--gradient-card)"},children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("div",{className:"w-20 shrink-0 text-sm font-semibold",children:Y(t.starts_at)}),e.jsxs("button",{type:"button",onClick:()=>$(w?null:t.id),className:"min-w-[10rem] flex-1 text-left",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[w?e.jsx(ce,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}):e.jsx(G,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),e.jsx("span",{className:"truncate text-sm font-medium",children:t.title??"Meeting"})]}),e.jsxs("div",{className:"pl-5 text-xs text-muted-foreground",children:[t.platform??"call",d?t.recording?.score!=null?` · scored ${t.recording.score}`:" · past":h?t.want_coaching&&t.want_notes?" · coaching + notes":t.want_coaching?" · co
1aching only":t.want_notes?" · notes only":" · Biz will join":" · Biz will skip",t.bot_status?` · bot ${t.bot_status}`:""]})]}),d?e.jsxs("div",{className:"flex items-center gap-1.5",children:[t.recording?.recording_url&&e.jsx("a",{href:t.recording.recording_url,target:"_blank",rel:"noreferrer",children:e.jsxs(c,{variant:"outline",size:"sm",className:"gap-1.5",children:[e.jsx(oe,{className:"h-3.5 w-3.5"})," Audio"]})}),t.recording?.has_transcript&&e.jsx("a",{href:"/app/calls",children:e.jsxs(c,{variant:"outline",size:"sm",className:"gap-1.5",children:[e.jsx(J,{className:"h-3.5 w-3.5"})," Transcript"]})})]}):e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[e.jsx(c,{variant:h&&t.want_coaching?"default":"outline",size:"sm",disabled:y===t.id,onClick:()=>{r(t,"coaching")},children:"Coaching"}),e.jsx(c,{variant:h&&t.want_notes?"default":"outline",size:"sm",disabled:y===t.id,onClick:()=>{r(t,"notes")},children:"Notes"}),t.meeting_url&&e.jsx("a",{href:t.meeting_url,target:"_blank",rel:"noreferrer",children:e.jsxs(c,{variant:"ghost",size:"sm",className:"gap-1.5",children:[e.jsx(le,{className:"h-3.5 w-3.5"})," Join"]})}),e.jsxs(c,{variant:h?"default":"outline",size:"sm",disabled:y===t.id,onClick:()=>{O(t)},className:"gap-1.5",children:[y===t.id?e.jsx(F,{className:"h-3.5 w-3.5 animate-spin"}):h?e.jsx(Z,{className:"h-3.5 w-3.5"}):e.jsx(Q,{className:"h-3.5 w-3.5"}),h?"Recording":"Not recording"]})]})]}),w&&e.jsxs("div",{className:"mt-3 space-y-3 border-t border-border/60 pt-3 text-xs",children:[e.jsxs("div",{className:"grid gap-2 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground",children:"When"}),e.jsxs("div",{className:"text-foreground",children:[new Date(t.starts_at).toLocaleString()," – ",Y(t.ends_at)]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground",children:"Biz status"}),e.jsx("div",{className:"text-foreground",children:d?t.recording?`Recording ${t.recording.status}${t.recording.score!=null?` · score ${t.recording.score}`:""}`:"No recording saved":h?t.bot_id?`Scheduled (${t.bot_status??"pending"})`:"Will be scheduled":"Biz will not join this meeting"})]}),t.organizer_email&&e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground",children:"Organizer"}),e.jsx("div",{className:"truncate text-foreground",children:t.organizer_email})]}),t.attendees.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground",children:"Attendees"}),e.jsx("div",{className:"text-foreground",children:t.attendees.join(", ")})]})]}),t.meeting_url&&e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground",children:"Meeting link"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("a",{href:t.meeting_url,target:"_blank",rel:"noreferrer",className:"max-w-full truncate text-primary hover:underline",children:t.meeting_url}),e.jsxs(c,{variant:"ghost",size:"sm",className:"h-7 gap-1.5 px-2",onClick:()=>{navigator.clipboard.writeText(t.meeting_url),g.success("Meeting link copied")},children:[e.jsx(de,{className:"h-3.5 w-3.5"})," Copy"]})]})]}),t.description&&e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground",children:"Details"}),e.jsx("p",{className:"max-h-40 overflow-auto whitespace-pre-wrap text-foreground",children:t.description})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 pt-1",children:[d&&t.bot_id&&!t.recording?.has_transcript&&e.jsxs(c,{variant:"outline",size:"sm",disabled:y===t.id,onClick:()=>{u(t)},className:"gap-1.5",children:[e.jsx(ae,{className:"h-3.5 w-3.5"})," Get transcript"]}),d&&t.bot_id&&t.recording?.has_transcript&&t.recording.score==null&&e.jsxs(c,{size:"sm",disabled:y===t.id,onClick:()=>{R(t)},className:"gap-1.5",children:[e.jsx(he,{className:"h-3.5 w-3.5"})," Score this call"]}),d&&e.jsx("a",{href:"/app/calls",children:e.jsxs(c,{variant:"ghost",size:"sm",className:"gap-1.5",children:[e.jsx(J,{className:"h-3.5 w-3.5"})," Open in My Calls"]})}),!d&&h&&e.jsxs(c,{variant:"ghost",size:"sm",disabled:y===t.id,onClick:()=>{O(t)},className:"gap-1.5 text-muted-foreground",children:[e.jsx(Q,{className:"h-3.5 w-3.5"})," Unschedule Biz"]})]})]})]},t.id)})})]},s))})]})}function Ye(){const i=k(ne),a=k(ie),[l,x]=n.useState(""),[f,D]=n.useState(""),[m,I]=n.useState(""),[v,b]=n.useState(""),[C,M]=n.useState(!1),[L,S]=n.useState(!1),[y,j]=n.useState([]),[B,$]=n.useState([]),[N,z]=n.useState(0);n.useEffect(()=>{async function r(){try{const u=await a();j(u.clients),$(u.stages),u.clients.length&&I(R=>R||u.clients[0].id)}catch(u){g.error(u instanceof Error?u.message:"Could not load meeting options")}}r()},[a]);const p=n.useMemo(()=>B.filter(r=>r.client_id===m),[B,m]);n.useEffect(()=>{p.length&&!p.find(r=>r.id===v)&&b(p[0].id)},[p,v]);async function O(r){if(r.preventDefault(),!m||!v){g.error("Pick a stage first.");return}M(!0);try{await i({data:{meeting_url:l.trim(),title:f.trim()||void 0,client_id:m,stage_id:v}}),g.success("Biz is on the way to the call."),x(""),D(""),S(!1),z(u=>u+1)}catch(u){g.error(u instanceof Error?u.message:"Could not schedule bot")}finally{M(!1)}}return e.jsxs("div",{className:"container mx-auto max-w-5xl px-6 py-10",children:[e.jsxs("div",{className:"mb-8 flex flex-wrap items-end justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-4xl font-bold tracking-tight",children:"Meetings"}),e.jsx("p",{className:"mt-2 max-w-2xl text-sm text-muted-foreground",children:"Choose which calls Biz joins and whether each one receives coaching, notes, or both."})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(V,{to:"/app/connections",children:e.jsxs(c,{variant:"outline",className:"gap-2",children:[e.jsx(fe,{className:"h-4 w-4"})," Integrations"]})}),e.jsxs(ue,{open:L,onOpenChange:S,children:[e.jsx(ge,{asChild:!0,children:e.jsxs(c,{className:"gap-2",children:[e.jsx(be,{className:"h-4 w-4"})," Add meeting link"]})}),e.jsxs(xe,{className:"max-w-xl",children:[e.jsx(me,{children:e.jsx(pe,{children:"Send Biz to a meeting"})}),e.jsxs("form",{onSubmit:O,className:"space-y-4 pt-2",children:[e.jsxs("div",{children:[e.jsx(P,{className:"mb-1 block text-xs",children:"Meeting URL"}
1),e.jsx(K,{required:!0,value:l,onChange:r=>x(r.target.value),placeholder:"https://zoom.us/j/..."})]}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx(P,{className:"mb-1 block text-xs",children:"Title (optional)"}),e.jsx(K,{value:f,onChange:r=>D(r.target.value),placeholder:"Acme — discovery"})]}),e.jsxs("div",{children:[e.jsx(P,{className:"mb-1 block text-xs",children:"Stage to grade against"}),e.jsx("select",{value:v,onChange:r=>b(r.target.value),className:"h-10 w-full rounded-md border border-input bg-background px-3 text-sm",children:p.map(r=>e.jsx("option",{value:r.id,children:r.title},r.id))})]})]}),e.jsxs(c,{type:"submit",disabled:C||!l||!v,className:"w-full gap-2",children:[C?e.jsx(F,{className:"h-4 w-4 animate-spin"}):e.jsx(Z,{className:"h-4 w-4"})," Send Biz"]})]})]})]})]})]}),e.jsx(ze,{},N),e.jsxs("p",{className:"mt-6 text-center text-sm text-muted-foreground",children:["Finished meetings, scores, coaching, and notes are available in ",e.jsx(V,{to:"/app/calls",className:"font-semibold text-primary hover:underline",children:"My Calls"}),"."]})]})}export{Ye as component};

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.