PageSourceSearch

https://app.helloprenup.com/assets/AttorneyDashboard-hxznIbQS.js

js helloprenup.com collected 2026-09-25 23:45:13 UTC 12,032 bytes, 87 lines download raw bytes

1import{j as s,a as e,am as y,ai as m,q as U,e7 as X,cj as Y,bS as J,aO as ee,ck as te,M as W,e8 as ne,L as re,E as F,bj as ie,o as oe,a2 as ae,e1 as se,s as w,e9 as de,e2 as le,t as ce,v as pe,x as b,F as R,bO as he,b6 as O,I as N}from"./index-C2-YZu1d.js";import{u as ue}from"./useGetCurrentAttorneyUser-BJYq8mg5.js";import{b as me,c as ge}from"./Header-hJY7IcXu.js";import{L}from"./Layout-CBRMav00.js";import{n as d}from"./ui-styling-D_MZUSm0.js";import{U as Ce}from"./User-D9vr-DcM.js";import{C as fe,S as xe}from"./Scales-BY5l_SHl.js";import{T as ye}from"./ThumbsUp-Bj0p8F8u.js";import{S as _,N as we}from"./AttorneyAppointments-CeaKjJSo.js";import{T as P}from"./Table-B9goMsyE.js";import{X as B}from"./react-core-DFRXio4V.js";import{e as be,h as D}from"./dateUtils-BjwS_7is.js";import{A as H}from"./AttorneyServiceTag-CKnWzJ3L.js";import{C as V}from"./ChevronRight-Dvql9Cop.js";import{C as Le}from"./components-C6tjJaPx.js";import{g as ve,a as Ae,b as Se}from"./index-Cs6vNykq.js";import{a as u}from"./clerk-D-49Phj5.js";import"./prisma-DgPwiONH.js";import"./IconContainer-CfpMeCkn.js";import"./HeadPhones-D0Ediq__.js";import"./Link-OlZVKjrv.js";import"./NavItem-B7fYMDLN.js";import"./ButtonFilter-DwG93V6T.js";import"./Search-C3XmlcCb.js";import"./ChevronLeft-3vGkqjLx.js";import"./index-DwLZ8bV4.js";import"./utils-Cb_d3l3E.js";import"./LinkButton-MgkMHKjP.js";const Te=d.div`
2  display: flex;
3  align-items: center;
4  background-color: ${U};
5  padding: 24px 16px;
6  border-radius: 8px;
7  gap: 16px;
8  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.1);
9`,Ie=d.div`
10  display: flex;
11  flex-direction: column;
12  gap: 8px;
13`,Ee=d(m)`
14  font-size: 24px;
15`,f=({icon:t,title:i,value:r})=>s(Te,{children:[t,s(Ie,{children:[e(y,{children:i}),e(Ee,{fontWeight:500,children:r})]})]}),Re=d.div`
16  margin-top: 16px;
17  display: flex;
18  gap: 16px;
19  ${W} {
20    flex-direction: column;
21  }
22`,x=d.div`
23  display: flex;
24  width: 48px;
25  height: 48px;
26  align-items: center;
27  justify-content: center;
28  background: ${({color:t})=>t};
29  border-radius: 8px;
30`,Oe=({clientsCount:t,qaCount:i,representationCount:r,reviewsRating:a})=>s(Re,{children:[e(f,{icon:e(x,{color:X,children:e(Ce,{})}),title:"Total Clients",value:t.toString()}),e(f,{icon:e(x,{color:Y,children:e(fe,{})}),title:"Q&A Session",value:i.toString()}),e(f,{icon:e(x,{color:J,children:e(xe,{})}),title:"Representation",value:r.toString()}),e(f,{icon:e(x,{color:te,children:e(ye,{})}),title:`${ee} Rating`,value:a===0?"-":a.toString()})]}),Ne=d.div`
31  width: 80px;
32  height: 80px;
33  border-radius: 12px;
34  display: flex;
35  align-items: center;
36  justify-content: center;
37  background: ${ne};
38`,v=()=>e(Ne,{children:s("svg",{width:"49",height:"20",viewBox:"0 0 49 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s("g",{clipPath:"url(#clip0_15259_57621)",children:[e("path",{d:"M0 7.56333C0.0971251 7.38755 0.0871737 7.17114 0.138921 6.97818C0.897213 4.14302 4.40048 3.89146 6.84135 4.46333C7.22268 4.55279 7.65258 4.67388 7.99411 4.85357V7.95318C6.95638 7.49185 5.78451 7.09263 4.62658 7.11021C4.16165 7.11724 3.49093 7.1938 3.45829 7.77896C3.42565 8.36411 4.12981 8.59107 4.56368 8.76177C6.36448 9.47114 8.3
38639 9.79653 8.6298 12.1055C9.01034 15.4071 5.91906 16.577 3.08253 16.3348C2.1061 16.2512 1.03932 15.9895 0.158823 15.5751V12.4368C0.993542 12.8075 1.83662 13.1778 2.74339 13.354C3.46068 13.493 5.2559 13.754 5.17191 12.611C5.13648 12.1305 4.60667 11.8907 4.21459 11.7172C3.10721 11.227 1.86568 11.0153 0.935824 10.1751C0.386908 9.67896 0.164396 9.08091 0 8.38286V7.56411L0 7.56333Z",fill:"white"}),e("path",{d:"M26.5279 0L26.5239 2.72539L23.1074 3.43086V0.701953L26.4085 0H26.5279Z",fill:"white"}),e("path",{d:"M31.1815 19.2982L27.8008 20.0002V4.44433H30.7838L30.943 5.22402L31.607 4.76386C34.0665 3.38691 36.6336 4.72441 37.6717 7.108C38.5578 9.14277 38.4575 12.3236 37.2991 14.2416C36.0357 16.3334 33.3094 17.0725 31.2631 15.5721L31.1818 15.6139V19.2982H31.1815ZM32.5257 7.18495C32.0114 7.23534 31.5055 7.45527 31.1898 7.86386L31.2193 12.6924C31.3757 13.0705 31.892 13.2885 32.286 13.3619C35.7539 14.0068 35.7408 6.87089 32.5257 7.18495Z",fill:"white"}),e("path",{d:"M48.9214 11.54H42.2795C42.3866 12.3595 42.7516 12.9966 43.5529 13.313C44.5552 13.7091 46.1454 13.5341 47.1716 13.2357C47.5545 13.1244 47.906 12.9435 48.2853 12.8263V15.4579C47.5445 15.9095 46.5848 16.1904 45.7147 16.2912C41.6474 16.7626 39.0389 14.747 38.8594 10.7013C38.7006 7.12279 40.9576 3.55443 45.032 4.29975C48.3446 4.906 49.3039 8.70092 48.9218 11.5396L48.9214 11.54ZM45.7796 9.04467C45.7203 8.49818 45.661 7.98764 45.3015 7.54467C44.4771 6.52865 42.9188 6.85912 42.4483 8.02084C42.3086 8.36615 42.2894 8.68842 42.2397 9.04467H45.7796Z",fill:"white"}),e("path",{d:"M12.6481 1.55859V4.38516L12.7078 4.44375H15.2334V7.28984H12.6481V12.1828C12.6481 12.2559 12.7197 12.5426 12.7476 12.6312C13.0656 13.6492 14.4226 13.4738 15.2334 13.216V15.9449C14.7179 16.1406 14.1754 16.282 13.6221 16.3344C11.3269 16.5508 9.44571 15.4238 9.3052 13.0426C9.15394 10.4812 9.42382 7.77891 9.3052 5.20234C9.39834 4.21641 9.32072 3.21484 9.34898 2.22344L12.6481 1.55898V1.55859Z",fill:"white"}),e("path",{d:"M22.3125 7.48577C21.3667 7.29475 20.3704 7.39866 19.7271 8.16819V16.0826L19.6674 16.1326C19.6511 16.1338 19.6376 16.1022 19.6276 16.1022H16.3066V4.44475H19.2498L19.4493 5.3803C19.6177 5.20725 19.7227 4.99866 19.9074 4.83577C20.5419 4.276 21.5406 4.15921 22.3125 4.46428V7.48577Z",fill:"white"}),e("path",{d:"M26.5279 4.44434V16.1014H23.2069C23.193 16.1014 23.1628 16.1705 23.1074 16.0818V4.44434H26.5279Z",fill:"white"})]}),e("defs",{children:e("clipPath",{id:"clip0_15259_57621",children:e("rect",{width:"49",height:"20",fill:"white"})})})]})}),A=d.div`
39  width: 100%;
40  height: 128px;
41  display: flex;
42  align-items: center;
43  justify-content: space-between;
44  flex-direction: row;
45  background: ${U};
46  border-radius: 8px;
47  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.1);
48  padding: 0px 24px;
49  margin-top: 24px;
50  ${W} {
51    flex-direction: column;
52    height: auto;
53  }
54`,S=d.div`
55  flex: 1;
56  margin-left: 32px;
57  display: flex;
58  flex-direction: column;
59  justify-content: center;
60`,_e=d(oe)`
61  font-weight: 600;
62  line-height: 24px;
63`,Pe=d(ae)`
64  min-width: 80px;
65  width: 100%;
66`,Be=d(me)`
67  height: 48px;
68  border-radius: 100px;
69  padding: 12px 24px;
70  font-weight: 600;
71  display: flex;
72  align-items: center;
73  justify-content: center;
74  min-width: 108px;
75  max-width: 140px;
76  white-space: nowrap;
77`,M=({isLoading:t=!1,error:i=void 0,onConnect:r,unresolvedRequirements:a=[],isLawFirmLead:c=!1,payoutsEnabled:l=!1})=>{const p=()=>c?l&&a.length===1&&a[0]==="individual.verification.document"?{title:"Finish Verification Now",subtitle:"Please provide the requested identity verification information to avoid having your payouts paused.",buttonText:"Verify Now",showButton:!0}:l&&a.length>0?{title:"Finish your Stripe setup",subtitle:"You are approved by Stripe, but still have some pending requirements. Please provide the requested information to avoid having your payouts paused.",buttonText:"Complete Setup",showButton:!0}:l?{title:"Manage Payments",subtitle:"Sign into Stripe Connect",buttonText:"Go to Stripe",showButton:!0}:a.length===0?{title:"Your Stripe account is connected and in review",subtitle:"Almost done setup! Stripe is reviewing your account.",buttonText:"Connect",showButton:!1}
77:{title:"Setup your Stripe Connect account",subtitle:"Set up your Stripe connect account to receive automatic payments",buttonText:"Connect",showButton:!0}:{title:"Waiting on your colleague to finish Stripe setup",subtitle:"Once your colleague finishes, you'll be able to receive payments.",buttonText:"Connect",showButton:!1};if(t)return s(A,{children:[e(v,{}),e(S,{children:e(re,{})})]});if(i)return s(A,{children:[e(v,{}),e(S,{children:e(F,{children:ie(i)})})]});const{title:n,subtitle:h,buttonText:g,showButton:C}=p();return s(A,{children:[e(v,{}),s(S,{children:[e(_e,{children:n}),e(Pe,{children:h})]}),C&&e(Be,{onClick:r,children:g})]})},De=t=>{let i=0,r=0;return t.forEach(a=>{switch(a.purchaseItem.product.productType){case"Q_A":i++;break;case"REPRESENTATION":case"POSTNUP_REPRESENTATION":r++;break}}),{qaCount:i,representationCount:r}},He=t=>new Set(t.map(i=>i.client)).size,Ve=t=>{const i=new Date,{start:r,end:a}=be(i);return t.filter(c=>{const l=new Date(c.event.eventStartAt);return l>=r&&l<=a}).sort((c,l)=>{const p=new Date(c.event.eventStartAt).getTime(),n=new Date(l.event.eventStartAt).getTime();return p-n})},Me=({clients:t,attorneyId:i})=>{const r=u.useMemo(()=>ve(t,i),[t,i]),a=u.useMemo(()=>He(r),[r]),{qaCount:c,representationCount:l}=u.useMemo(()=>De(r),[r]),p=u.useMemo(()=>Ae(r),[r]),n=u.useMemo(()=>Ve(r),[r]),h=u.useMemo(()=>Se(p),[p]);return{totalAppointments:r,visibleClientsCount:a,qaCount:c,representationCount:l,todayAppointments:p,thisWeekAppointments:n,nextAppointment:h}},ke=d(y)`
78  margin-top: 32px;
79`,k=d.div`
80  display: flex;
81  flex-direction: column;
82  width: 100%;
83  gap: 16px;
84`,G=d(Le)`
85  margin-top: 32px;
86`,mt=()=>{const{attorney:t,user:i,isLoading:r,error:a}=ue(),{data:c,isLoading:l,error:p}=se(t?{userId:t.userId,attorneyId:t.id,status:"APPROVED",includeUser:!0}:w),{data:n,isLoading:h,error:g}=de(t&&t.lawFirmId?{userId:t.userId,attorneyId:t.id,lawFirmId:t.lawFirmId}:w),{data:C,isLoading:$,error:j}=le(t?{userId:t.userId,attorneyId:t.id}:w,{pollingInterval:3e5,refetchOnFocus:!0,refetchOnReconnect:!0,skip:!t}),{visibleClientsCount:Z,qaCount:q,representationCount:K,todayAppointments:T,thisWeekAppointments:I,nextAppointment:E}=Me({clients:C??[],attorneyId:(t==null?void 0:t.id)??""}),z=r||l||$,Q=a??p??j;return z?e(L,{children:e(ce,{})}):Q||!t||!i||!c||!C?e(L,{children:e(pe,{children:e(F,{children:"Error loading attorney dashboard. Please refresh the page and try again, if the issue persists, please contact support."})})}):s(L,{children:[s(ge,{children:["Hi, ",b(i),"!"]}),e(m,{fontWeight:300,children:n!=null&&n.payoutsEnabled?"Welcome to your HelloPrenup dashboard!":"Welcome to your HelloPrenup dashboard! Here, you'll find all of the details for your services and upcoming appointments. To complete your account setup, connect to Stripe."}),n!=null&&n.payoutsEnabled?e(R,{children:t.isLawFirmLead?e(M,{isLoading:h,error:g,unresolvedRequirements:n.unresolvedRequirements,isLawFirmLead:!!t.isLawFirmLead,payoutsEnabled:!!n.payoutsEnabled,onConnect:()=>{n.connectUrl&&(window.location.href=n.connectUrl)}}):null}):e(R,{children:e(M,{isLoading:h,error:g,unresolvedRequirements:(n==null?void 0:n.unresolvedRequirements)??[],isLawFirmLead:!!t.isLawFirmLead,payoutsEnabled:!!(n!=null&&n.payoutsEnabled),onConnect:()=>{n!=null&&n.connectUrl&&(window.location.href=n.connectUrl)}})}),e(ke,{fontWeight:700,children:"Leaderboard"}),e(Oe,{clientsCount:Z,qaCount:q,representationCount:K,reviewsRating:he(c)}),T.length>0&&s(G,{children:[s(k,{children:[e(y,{fontWeight:700,children:"Today"}),e(P,{data:T,columns:[{header:"Scheduled Time",accessor:o=>e(m,{fontWeight:600,children:D(o.event,"time")})},{header:"Client",accessor:o=>e(m,{fontWeight:500,children:b(o.client,"firstLast")})},{header:"Service",accessor:o=>e(H,{service:o.purchaseItem.product,color:!0,padding:!0})},{header:"",accessor:o=>e(B,{to:`/attorney/clients/${o.client.userId}/documents/${o.client.documentId}`,children:e(_,{width:"32px",height:"32px",backgroundColor:O,children:e(V,{size:N.XS})})})}]})]}),E&&e(we,{appointment:E})]}),I.length>0&&e(G,{children:s(k,{children:[e(y,{fontWeight:700,children:"This week"}),e(P,{data:I,columns:[{header:"Scheduled Time",accessor:o=>e(m,{fontWeight:600,children:D(o.event,"short")})},{header:"Client",accessor:o=>e(m,{fontWeight:500,children:b(o.client,"firstLast")})},{header:"Service",accessor:o=>e(H,{service:o.purchaseItem.product,color:!0,padding:!0})},{header:"",accessor:o=>e(B,{to:`/attorney/clients/${o.client.userId}/documents/${o.client.documentId}`,children:e(_,{width:"32px",height:"32px",backgroundColor:O,children:e(V,{size:N.XS})})})}]})]})})]})};export{mt as default};
87//# sourceMappingURL=AttorneyDashboard-hxznIbQS.js.map

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.