@zeniai/web-app-ui 5.0.86-dev → 5.0.86-qa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AddressRoutes-CGo30rdJ.js → AddressRoutes-DgEY9uyX.js} +1 -1
- package/dist/assets/{AddressScreen-DqNplF9n.js → AddressScreen-CnGdseVP.js} +1 -1
- package/dist/assets/{AiCfoScreen-DY2bTh5X.js → AiCfoScreen-C2gUHPZf.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-BcGyYnYz.js → BillPayApprovalRoutes-9-Csp2U9.js} +1 -1
- package/dist/assets/{BillPayRoutes-Dksq93Nt.js → BillPayRoutes-q1G-HOG9.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-YDSaAbpW.js → BusinessVerificationPageScreen-D4q4raDT.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-o064oMRW.js → ChargeCardRoutes-B9R8GuRe.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-BLW99zDL.js → CompanyPassportScreen-ByZS8ECt.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-Bd0F-_VJ.js → ConnectionAuthScreen-DXMFv4zF.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-Cb43qCFz.js → CustomerOnboardingAuthScreen-knI9lPPe.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-DJIij8xf.js → CustomerOnboardingRoutes-YAUJymHi.js} +1 -1
- package/dist/assets/{DashboardRoutes-CS6nJI2P.js → DashboardRoutes-CR_Eiq9o.js} +1 -1
- package/dist/assets/{DefaultTenantHome-Bl9eDQpG.js → DefaultTenantHome-DwlSdo4L.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-CQO9Kbrv.js → DomesticWireDetailScreen-U7m2J1ru.js} +1 -1
- package/dist/assets/{DrawerScreen-E9PcStEO.js → DrawerScreen-_gX7HdVn.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-zw7M1lwQ.js → EntityDetailRoutes-DqZ47hHU.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-BHuRnA1t.js → ExpenseAutomationRoutes-CVojfTBC.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-DtxT93sy.js → FeaturePreviewScreen-DKtIkE5j.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-DvdLNXNC.js → HubSpotOAuthCallbackScreen-WWoFOb2m.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-BszO-d0K.js → MagicLinkRoutes-BZEud5Lo.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-C_x0l97F.js → MagicLinkSignInScreen-D0oZcrz4.js} +1 -1
- package/dist/assets/{MobileAppDrawer-D8M7VXe9.js → MobileAppDrawer-DrIh5jJg.js} +1 -1
- package/dist/assets/{NotFoundScreen-BHqd2QHQ.js → NotFoundScreen-BBj2rX_R.js} +1 -1
- package/dist/assets/{NotificationRoutes-BF1vgjUU.js → NotificationRoutes-DVHpj6YG.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-BR0rJGBP.js → OAuthConsentScreen-BzjWhRQg.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-DY76dKM1.js → PandLWithForecastRoutes-7aSf0ep-.js} +1 -1
- package/dist/assets/{PeopleRoutes-BtQrBjKV.js → PeopleRoutes-CSEkDDLu.js} +1 -1
- package/dist/assets/{PerformanceRoutes-DMpi0fOi.js → PerformanceRoutes-CDlljgVc.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-vJXVqwWm.js → QBOConnectionScreen-BmMKTrMs.js} +1 -1
- package/dist/assets/{ReferralListScreen-DMiRiZiL.js → ReferralListScreen-C51C5goG.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-CkwYBtEW.js → ReimbursementApprovalRoutes-BbC6CIcT.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CmXeAJ2V.js → ReimbursementApprovalRuleDetailScreen-BbYEUJEU.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-C8zQyJK2.js → ReimbursementRoutes-D-0FZjs9.js} +1 -1
- package/dist/assets/{ReportsRoutes-BexYmhra.js → ReportsRoutes-BEw8kZp5.js} +1 -1
- package/dist/assets/{RewardsRoutes-DjXjgRiO.js → RewardsRoutes-CkpiNxLy.js} +1 -1
- package/dist/assets/{ScreenRoutes-BoNP2LIP.js → ScreenRoutes-Dc0UseAg.js} +2 -2
- package/dist/assets/{SettingsRoutes-DNp9Aol7.js → SettingsRoutes-CEbVRwbt.js} +1 -1
- package/dist/assets/{SetupPagesScreen-D1bk7eBP.js → SetupPagesScreen-P0OPONPn.js} +1 -1
- package/dist/assets/{SignInScreen-Cgfdytgb.js → SignInScreen-DB6Z1J1V.js} +1 -1
- package/dist/assets/{SignOutScreen-kKi84Hfg.js → SignOutScreen-BB84FKCU.js} +1 -1
- package/dist/assets/{TaskListScreen-BVNYZTXx.js → TaskListScreen-Bp2ScJrS.js} +1 -1
- package/dist/assets/{TaskRoutes-BrThx6o_.js → TaskRoutes-CWhPTaiP.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-6MCXCmqq.js → TransactionDetailRoutes-CxlUtejM.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-DWs7y2E7.js → TransactionDetailScreen-Ci7wUJ8m.js} +1 -1
- package/dist/assets/{TransactionListRoutes-Y2-dK5Nn.js → TransactionListRoutes-BCPHc0EZ.js} +1 -1
- package/dist/assets/{TreasuryRoutes-DlQvHZ4w.js → TreasuryRoutes-BtYQynDf.js} +1 -1
- package/dist/assets/{VendorsRoutes-HIQQTQSi.js → VendorsRoutes-RYVvqvwk.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-C646Mco3.js → WiseConfirmationScreen-RH0Xu2QX.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-Kwn8sr_a.js → ZeniAccountRoutes-BJIy1chm.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-BmEJTL09.js → ZeniAccountStatementScreen-BtroA3vI.js} +1 -1
- package/dist/assets/{analyticsHelper-BEEOw1D6.js → analyticsHelper-ClnSplSs.js} +1 -1
- package/dist/assets/{getLocaleForTenant-Dc-_DzRm.js → getLocaleForTenant-BVN8Zhv2.js} +1 -1
- package/dist/assets/{index-Dr8ZNfvJ.js → index-Cc13Ni3u.js} +5 -5
- package/dist/assets/{routePaths-Dx_nnKk7.js → routePaths-CYWO_4aN.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-BxShjiqA.js → useAskAiCfoHostNavButtonProps-CQ5wXGV2.js} +1 -1
- package/dist/assets/{useFetchSuggestedQuestionsWhenReady-DWTRn_Lu.js → useFetchSuggestedQuestionsWhenReady-C8wykHii.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-WHG7gHcH.js → useInitialThreadRequest-DTnvA37x.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-DcRhIgzv.js → withTransactionSidePanel-BLrf1QAn.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-Hyy2O23M.js";import{A as i}from"./AddressScreen-
|
|
1
|
+
import{j as e}from"./liveblocks-Hyy2O23M.js";import{A as i}from"./AddressScreen-CnGdseVP.js";import s from"./NotFoundScreen-BBj2rX_R.js";import"./sentry-BTyPPF0t.js";import{n as d,o as r}from"./core-D1cXuJMi.js";import"./zeni-epic-state-CbUjX_b3.js";import"./recharts-CrZf7bKF.js";import"./index-Cc13Ni3u.js";import"./mui-B2prtfNk.js";import"./analytics-BE9oUBzD.js";import"./plaid-4w70Yh4I.js";import"./dnd-DbPPTppj.js";import"./stripe-DMRn4zHo.js";import"./lottie-qu8VyEpw.js";import"./lexical-Du70nM1B.js";import"./pdf-Cvwxd6W6.js";import"./utils-C_-saZ2j.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="624154e3-3694-4a3c-b645-a66b8e12404c",t._sentryDebugIdIdentifier="sentry-dbid-624154e3-3694-4a3c-b645-a66b8e12404c")}catch{}})();function _(){return e.jsxs(d,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(i,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(i,{})}),e.jsx(r,{path:"*",element:e.jsx(s,{})})]})}export{_ as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-Hyy2O23M.js";import{a as h}from"./sentry-BTyPPF0t.js";import{j as T,h as _,u as j,l as E,g as B,k as K}from"./core-D1cXuJMi.js";import{K as M,m as $,z as D,c as L,B as R,x as z,d as C,f as S,v as F,h as b,p as N}from"./index-
|
|
1
|
+
import{j as d}from"./liveblocks-Hyy2O23M.js";import{a as h}from"./sentry-BTyPPF0t.js";import{j as T,h as _,u as j,l as E,g as B,k as K}from"./core-D1cXuJMi.js";import{K as M,m as $,z as D,c as L,B as R,x as z,d as C,f as S,v as F,h as b,p as N}from"./index-Cc13Ni3u.js";import{K7 as k,gY as U,eQ as G,K8 as O,c2 as V,K9 as q,ki as H}from"./zeni-epic-state-CbUjX_b3.js";import{n as Q}from"./mui-B2prtfNk.js";import Y from"./NotFoundScreen-BBj2rX_R.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9bce04c9-cccc-42bc-9422-29963470bf98",e._sentryDebugIdIdentifier="sentry-dbid-9bce04c9-cccc-42bc-9422-29963470bf98")}catch{}})();const J=Q.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-Hyy2O23M.js";import{a as l}from"./sentry-BTyPPF0t.js";import{h as ue,j as me,u as pe,g as N,l as he,k as fe}from"./core-D1cXuJMi.js";import{R as Se,cJ as ge,z as Ce,K as ke,cK as be,cL as we,cM as V,cN as Ie,cO as Y,p as U,x as q,d as T,cP as z,cQ as Ee,W as Pe,f as Te,a3 as xe,cR as ye,X as _e,j as ve,aY as Oe,cS as Ae}from"./index-
|
|
1
|
+
import{j as h}from"./liveblocks-Hyy2O23M.js";import{a as l}from"./sentry-BTyPPF0t.js";import{h as ue,j as me,u as pe,g as N,l as he,k as fe}from"./core-D1cXuJMi.js";import{R as Se,cJ as ge,z as Ce,K as ke,cK as be,cL as we,cM as V,cN as Ie,cO as Y,p as U,x as q,d as T,cP as z,cQ as Ee,W as Pe,f as Te,a3 as xe,cR as ye,X as _e,j as ve,aY as Oe,cS as Ae}from"./index-Cc13Ni3u.js";import{fG as Qe,f5 as J,eQ as Ue,hC as je,QK as De,eP as Fe,hM as Re,hI as Be,fw as W,fq as Le,fj as Me,fn as H,fr as Ge,fs as $e,ft as Ne,fu as Ve,fv as qe}from"./zeni-epic-state-CbUjX_b3.js";import{D as ze,n as b,S as We,P as He}from"./mui-B2prtfNk.js";import{p as Ke}from"./pathToGoBack-C7gPpVBh.js";import"./recharts-CrZf7bKF.js";import"./analytics-BE9oUBzD.js";import"./plaid-4w70Yh4I.js";import"./dnd-DbPPTppj.js";import"./stripe-DMRn4zHo.js";import"./lottie-qu8VyEpw.js";import"./lexical-Du70nM1B.js";import"./pdf-Cvwxd6W6.js";import"./utils-C_-saZ2j.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new s.Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="85bd0272-d7a8-41fb-bfd6-35ec508f1600",s._sentryDebugIdIdentifier="sentry-dbid-85bd0272-d7a8-41fb-bfd6-35ec508f1600")}catch{}})();const X="chat-response-generated",Ye=fe(function(s,r){const t=J(s),m=r.isSubmitting;return{showSampleQuestions:r.sessionFromUrl==="explore"&&t.uiState.currentChatSessionId==null,aiCfoView:t,isSubmitting:m,isNewChatSession:r.sessionFromUrl==="new_chat"||r.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${_e}/tableDownload`,emailLinkQuestion:r.emailLinkQuestion,autoSubmitEmailLinkQuestion:r.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:r.onEmailLinkQuestionProcessed,isFileUploadEnabled:r.isFileUploadEnabled,isUploadPromoVisible:r.isUploadPromoVisible,onUploadPromoClose:r.onUploadPromoClose}},function(s,r){const{location:t,currentTenant:m,userId:c,navigate:S,currentChatSessionId:f,allSessionsWithOrderedQuestionAnswers:C,setIsAiCfoOpen:d}=r;return{onEventReceived:(e,o)=>{if(e===X&&typeof o.text=="string"&&typeof o.metadata=="object"){const n=o,p=$e(n.type),u=n.metadata.chat_session_id??null,{currentChatSession:a,currentQuestionAnswer:w,currentQuestionAnswerSummary:x}=Y(C,u);p!=="answer"?T.trackAICFOChatResponseGenerated(p,w?.question.questionText??"",n.text,u,Ae(x,a),n.metadata.message_id??null):T.trackAICFOChatAnswerGenerated(n.text,w?.question.questionText??"",(n.follow_up_questions?.length??0)>0,!!n.assumptions,!!n.insights,n.visualization!=null,Ne(n.visualization?.type??"")??null,u,n.summarized_title,n.metadata.message_id??null),s(Ve({chatSessionId:n.metadata.chat_session_id,responseType:p,fetchState:{fetchState:"Completed",error:void 0}})),s(qe({chatSessionId:n.metadata.chat_session_id,answerPayload:n,userId:c}))}},onSubmit:(e,o,n,p)=>{e&&Oe(s,e,o,f,C,c,p,n)},updateCurrentInput:e=>{s(H(e))},onStopSubmit:()=>{},onUpdateScrollYOffset:e=>{s(Ge(e))},onSelectSampleQuestion:()=>{},onBackClick:()=>{S(-1)},onCloseClick:()=>{const e=U(t.state?.pathnameStackToGoBack),o=e.poppedPathname??Ke(1);S(o,{state:{...t.state,pathnameStackToGoBack:e.newStack}}),s(H(""))},togglePageView:()=>{const e=U(t.state?.pathnameStackToGoBack),o=e.poppedPathname??`/${m.tenantEmailDomain}/dashboard`;S(o,{state:{...t.state,pathnameStackToGoBack:e.newStack,message:"open_ai_cfo_drawer"}}),d(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{S(-1)},onNewChatClick:()=>{f!=null&&s(Me());const e=ve(t.state?.pathnameStackToGoBack,t.pathname);S(`/${m.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:e.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(e,o)=>{s(Le({questionAnswerId:e,isCollapsed:o}))},onMenuClick:r.onMenuClick}})(xe(ye)),gt=({isFileUploadEnabled:s})=>{const{setIsAiCfoOpen:r}=Se(),t=ue(),m=me(),c=pe(),[S,f]=l.useState(!1);l.useEffect(()=>{t(Qe())},[t]);const{customPageTitle:C}=ge(),d=N(i=>J(i)),e=Ce.getSignedInUser(),{session_id:o}=he(),n=ke(),p=Pe(n),u=N(i=>Ue(i)),a=d.uiState.currentChatSessionId,w=u.tenantEmailDomain,{handleUploadPromoClose:x,isUploadPromoVisible:Z}=be({isFileUploadEnabled:s,tenantEmailDomain:w}),y=we({currentTenant:u,currentChatSessionId:a,aiCfoView:d}),I=c.state,E=I?.aiCfoInitialQuestion,j=!!I?.aiCfoShouldSubmit;l.useEffect(()=>{const i=c.state;if(i?.[V]!==!0)return;f(!0);const g={...i};delete g[V],m(c,{replace:!0,state:g})},[c.pathname,c.search,c.state,m]);const[ee,_]=l.useState(null),[te,v]=l.useState(!1),D=l.useRef(!1);l.useEffect(()=>{D.current||E==null||E===""||(_(E),v(j),D.current=!0)},[E,j]);const ae=l.useCallback(()=>{_(null),v(!1)},[]),F=l.useMemo(()=>new URLSearchParams(c.search),[c.search]),R=F.get("ref")??I?.aiCfoRef,O=F.get("emailRefId")??I?.aiCfoEmailRefId,B=l.useRef(!1);l.useEffect(()=>{B.current||R!=="month-end-email"||O==null||a!=null||e==null||(t(je("controller",e.userId,O,"MONTH_END_EMAIL")),B.current=!0)},[R,O,a,t,e]);const P=d.uiState.lastContextMessage;l.useEffect(()=>{P!=null&&P!==""&&a!=null&&(_(P),v(!0),t(De()))},[P,a,t]);const se=u.masterTOSInfo,k=se?.isMasterTOSAccepted??!1,{visitedSessions:L}=Ie(a),A=d.fetchState,Q=d.uiState.chatSessionsNextPageToken.hasMore||!d.uiState.chatSessionsFirstPageFetched,M=a!=null?d.fetchChatSessionHistoryByChatSessionId?.[a]?.fetchState??"Not-Started":"Not-Started",G=a==null||(d.uiState.chatHistoryNextPageToken[a]?.hasMore??!0),$=d.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:oe}=Y($,a),ne=oe.length===0;l.useEffect(()=>{k||p||m("../dashboard",{state:{...c.state,message:"open_ai_cfo_drawer"}})},[k,p,m,c.state]);const ie=l.useCallback(()=>{const i=U(c.state?.pathnameStackToGoBack),g=u.tenantEmailDomain;m(i.poppedPathname??(g!=null?`/${g}/dashboard`:".."),{state:{...c.state,pathnameStackToGoBack:i.newStack}})},[u.tenantEmailDomain,c.state,m]);l.useEffect(()=>{a!=null&&o!==a&&m(`../ai-cfo/${a}`,{state:{...c.state}})},[a,o]),l.useEffect(()=>{o!=null&&a==null&&o!=="new_chat"&&o!=="explore"&&t(Fe({sessionId:o,agentId:"controller"}))},[]);const le=l.useMemo(()=>({events:L.map(i=>`private-encrypted-chat-${i}.${X}`),eventCallback:(i,g,de)=>de.onEventReceived(i,g)}),[L]);l.useEffect(()=>{A!=="In-Progress"&&Q&&t(Re())},[A,Q,t]),l.useEffect(()=>{a!=null&&M!=="In-Progress"&&G&&e!=null&&A==="Completed"&&!Q&&t(Be(a,e.userId))},[M,G,a,e,t]);const re=i=>i.trackAICFOOnboardingScreenStateChanged("open","first_visit");if(e==null||o==null)throw Error("Can't access AI Controller page without signing in...");const ce=a!=null&&d.responseStateByChatSessionId?.[a]?.answer?.fetchState==="In-Progress";return!k&&p?h.jsxs(Xe,{children:[h.jsx(q,{analytics:T,onLoad:re}),y.drawerElement,h.jsx(Ze,{children:h.jsx(K,{children:h.jsx(z,{isTOSAccepted:!1,acceptMasterTOSState:d.masterTOSAcceptanceState,customPageTitle:C,onCloseClick:ie,onCompleteClick:()=>{u.userRoleId!=null&&t(W(u.userRoleId))}})})})]}):h.jsxs(Je,{children:[h.jsx(q,{analytics:T,onLoad:i=>i.trackPageLoaded(Te.Event.aiCFOPage)}),p&&y.drawerElement,h.jsx(Ye,{...le,currentChatSessionId:a,allSessionsWithOrderedQuestionAnswers:$,openOnboardingPage:()=>f(!0),userId:e.userId,setIsAiCfoOpen:r,navigate:m,sessionFromUrl:o,location:c,isSubmitting:ce,isEmptyChatWithSession:ne,customPageTitle:C,currentTenant:u,emailLinkQuestion:ee??void 0,autoSubmitEmailLinkQuestion:te,onEmailLinkQuestionProcessed:ae,onMenuClick:p?y.open:void 0,isFileUploadEnabled:s,isUploadPromoVisible:Z,onUploadPromoClose:x}),h.jsx(ze,{anchor:"right",open:S,transitionDuration:250,PaperProps:{component:et,style:{width:p?"100%":`${Ee}vw`}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>f(!1),children:h.jsx(K,{onClick:i=>i.stopPropagation(),children:h.jsx(z,{isTOSAccepted:k,acceptMasterTOSState:d.masterTOSAcceptanceState,customPageTitle:C,onCloseClick:()=>f(!1),onCompleteClick:()=>{k||u.userRoleId==null||t(W(u.userRoleId)),f(!1)}})})})]})},K=b(We)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-Hyy2O23M.js";import{a as y}from"./sentry-BTyPPF0t.js";import{j as B,u as U,h as j,g as v,N,k as T,l as O,n as $,o as h}from"./core-D1cXuJMi.js";import{eQ as F,Nq as R,N6 as b,xQ as x,xK as L,xO as I,xD as q,N8 as z,xG as Q,xS as W,xR as E}from"./zeni-epic-state-CbUjX_b3.js";import{m as P,z as k,B as V,a3 as G,by as K,ac as _,bz as H}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-Hyy2O23M.js";import{a as y}from"./sentry-BTyPPF0t.js";import{j as B,u as U,h as j,g as v,N,k as T,l as O,n as $,o as h}from"./core-D1cXuJMi.js";import{eQ as F,Nq as R,N6 as b,xQ as x,xK as L,xO as I,xD as q,N8 as z,xG as Q,xS as W,xR as E}from"./zeni-epic-state-CbUjX_b3.js";import{m as P,z as k,B as V,a3 as G,by as K,ac as _,bz as H}from"./index-Cc13Ni3u.js";import"./mui-B2prtfNk.js";import{i as J}from"./ReimbursementApprovalRuleDetailScreen-BbYEUJEU.js";import M from"./NotFoundScreen-BBj2rX_R.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="de21b83e-88da-4db5-9623-eceee54dfdf4",e._sentryDebugIdIdentifier="sentry-dbid-de21b83e-88da-4db5-9623-eceee54dfdf4")}catch{}})();const w="bill-approval-rule-update",X=T(function(e){return{approvalView:R(e),billPaySetupApproverViewUpdateData:b(e).billPaySetupApproverViewUpdateData}},function(e,o){const{navigate:t,location:p}=o;return{onApprovalRulesEventReceived:a=>{a.endsWith(w)&&e(z(!1))},onBackClick:()=>{_(p)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(q(a))},onEditRuleClick:a=>{a!=null?(e(I(a)),t(`./${a}/edit`)):(e(I()),t("./new"))}}})(G(K)),Y=()=>{const e=B(),o=U(),t=j(),[p,a]=y.useState(!1),[u,s]=y.useState(!1),d=P(),n=v(i=>i.billPaySetupApproverViewState.fetchState),c=v(i=>F(i)),r=v(i=>R(i)),g=v(i=>b(i).billPaySetupApproverViewUpdateData);if(y.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&t(x())},[g]),y.useEffect(()=>{p||n!=="Not-Started"||(a(!0),t(L(!0)))},[p,n,t]),k.getSignedInUser()==null)throw Error("Can't access billpay approval without signing in...");y.useEffect(()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(u||(s(!0),t(I())),e("./new"))},[u,r,t]);const f={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${w}`]:[],eventCallback:(i,A,m)=>{i.endsWith(w)&&m.onApprovalRulesEventReceived(i)}};return c.companyBillPayInfo?.info?.isBillPayTOSAccepted===!1?l.jsx(N,{to:"../../promo"}):c.companyBillPayInfo?.info?.isBillPayTOSAccepted!==!0||r.fetchState!=="Completed"&&r.fetchState!=="Error"?l.jsx(V,{fetchState:"In-Progress",style:{backgroundColor:d.colors.grey5}}):l.jsx(X,{currentTenant:c,location:o,navigate:e,...f})},Z=T(function(e,o){const t=b(e),p=t.billPaySetupApproverViewUpdateData?.type??"approval_create",a=p==="approval_create"&&t.allApprovalRules.length!==0;let u=t.allApprovalRules.length===0;return o.approvalRuleId&&(u=t.allApprovalRules.findIndex(s=>s.approvalRuleId===o.approvalRuleId)===0),{localData:t,hideUpperBoundField:a,isLowerBoundDisabled:u,approvalUpdateActionType:p}},function(e,o){const{navigate:t,approvalUpdateDataView:p,approverViewData:a,approvalRuleId:u}=o,s=p.billPaySetupApproverViewUpdateData?.type,d=_(o.location);return{onApprovalRuleDataUpdated:n=>{const c=r=>{const g=[];return r.forEach(f=>{const i=f.actors.selectedUsers.map(S=>({type:"user",userId:S.userId,isImplicitActor:!1})),A=f.actors.selectedNonUsers.map(S=>{const D=!!J(S.value);return{type:D?"attribute":"role",subType:S.value,userId:void 0,idType:void 0,isImplicitActor:!D}}),m=i.concat(A);g.push({action:f.stepType.selectedOption,actors:m,operator:m.length>1?f.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),g};if(s==="approval_create"){const r={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(E(r))}else{const r={approvalRuleId:u,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(E(r))}},onResetClick:()=>{e(x()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(x()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(W())},onSaveRuleSuccess:()=>{t("../")}}})(H);function C(){const e=B(),o=j(),t=U(),{approvalRuleId:p}=O(),a=k.getSignedInUser(),u=P(),s=v(r=>b(r)),d=v(r=>R(r)),[n,c]=y.useState(!1);if(y.useEffect(()=>{n||(c(!0),o(Q(!0)))}),y.useEffect(()=>{d.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[d,p]),a==null)throw Error("Can't access address page without signing in...");return s.approverListFetchStatus.fetchState=="Not-Started"||s.approverListFetchStatus.fetchState==="In-Progress"?l.jsx(V,{fetchState:s.approverListFetchStatus.fetchState,style:{backgroundColor:u.colors.grey5}}):l.jsx(Z,{navigate:e,approvalUpdateDataView:s,approvalRuleId:p,approverViewData:d,location:t})}function se(){return l.jsxs($,{children:[l.jsx(h,{path:"/",element:l.jsx(Y,{})}),l.jsx(h,{path:"/new",element:l.jsx(C,{})}),l.jsx(h,{path:"/:approvalRuleId/edit",element:l.jsx(C,{})}),l.jsx(h,{path:"*",element:l.jsx(M,{})})]})}export{se as B};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-Hyy2O23M.js";import{j as J,h as se,u as Y,l as ae,g as v,N as te,k as Q,i as na,n as ia,o as S}from"./core-D1cXuJMi.js";import{eQ as Z,MI as _e,bv as It,HC as oa,bo as wt,bF as pe,MJ as Ct,x8 as xt,yi as $e,xH as la,bn as De,MK as sa,ML as ra,c2 as ca,MM as da,jC as Bt,MN as At,MO as Et,yT as Me,xn as Be,MP as ua,wY as tt,MQ as pa,C3 as ma,x0 as ba,x6 as Dt,MR as ke,MS as Ne,yj as Ge,MT as ha,MU as ga,ym as Oe,MV as ya,yz as Sa,MW as jt,y3 as at,y8 as fa,MX as ka,MY as ue,MZ as Tt,M_ as Pt,M$ as Ft,fK as va,xs as Ue,cx as Rt,N0 as Ia,gO as wa,N1 as Ca,N2 as xa,eW as Vt,eU as $t,N3 as ze,N4 as Ba,N5 as Aa,Kr as Ze,N6 as Ea,Ks as oe,Kt as He,N7 as Da,N8 as ja,N9 as Ta,ya as nt,y7 as Pa,Na as Fa,Nb as Ra,Nc as Va,xV as $a,Nd as Ua,Ne as La,Nf as _a,cl as Ut,cN as Lt,jN as Ma,bL as Na,bq as _t,bM as Mt,we as Ga,Ng as Oa,BS as za,BY as Za,sJ as Ha,yk as Wa,y_ as qa,j_ as fe,Nh as Ka,Ni as Nt,ks as Ja,jU as Gt,kd as Ot,kc as it,bE as be,bK as Ya,Nj as Qa,Nk as ve,ix as Xa,Nl as ot,Nm as en,iB as tn,iW as an,zc as nn,Nn as on,kl as ln,z2 as sn,No as lt,z6 as rn,zb as cn,z8 as dn,z0 as un,Np as zt,xh as pn,Nq as mn,Nr as bn,fC as hn,fB as gn,fA as yn,k1 as Sn,kj as st,ku as fn,q9 as kn,ka as vn,z4 as In,iH as wn,kz as Cn,Ns as xn,iz as Bn,q0 as An,Nt as En,x$ as Dn,bG as jn,bs as Tn,Jm as Pn,cP as Fn,cO as Rn,cw as Vn,cC as $n}from"./zeni-epic-state-CbUjX_b3.js";import{m as me,z as V,c as Ie,C as le,A as y,aK as Ae,B as re,o as A,x as je,d as D,b5 as Un,p as z,X as We,j as E,K as we,b6 as rt,b7 as ct,b8 as Ln,ah as _n,I as Mn,aE as Nn,E as Zt,D as qe,J as Ke,b9 as Gn,aq as Ht,ba as On,U as zn,f as Wt,a3 as Zn,bb as Hn,bc as Wn,bd as qn,be as Kn,bf as Jn,bg as Yn,bh as Qn,bi as Xn,bj as ei,n as ti,bk as ai,b1 as ni,bl as ii,bm as oi,a6 as li}from"./index-Dr8ZNfvJ.js";import{n as L,S as si}from"./mui-B2prtfNk.js";import{A as dt}from"./AddressScreen-DqNplF9n.js";import{g as ie,a as Te,i as qt,V as Je,b as Ye,c as ri,v as ci,d as di,A as he,D as ge}from"./DomesticWireDetailScreen-CQO9Kbrv.js";import{a as f}from"./sentry-BTyPPF0t.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-BxShjiqA.js";import{c as Xe}from"./useFetchSuggestedQuestionsWhenReady-DWTRn_Lu.js";import{u as Kt}from"./useInitialThreadRequest-WHG7gHcH.js";import Ee from"./NotFoundScreen-BHqd2QHQ.js";import{D as ui}from"./DrawerScreen-E9PcStEO.js";import{M as Jt}from"./MobileAppDrawer-D8M7VXe9.js";import{F as Yt}from"./FeaturePreviewScreen-DtxT93sy.js";import{S as Pe}from"./SetupPagesScreen-D1bk7eBP.js";import{B as pi}from"./BillPayApprovalRoutes-BcGyYnYz.js";import{FallBackRoute as mi}from"./ScreenRoutes-BoNP2LIP.js";import"./recharts-CrZf7bKF.js";import"./analytics-BE9oUBzD.js";import"./plaid-4w70Yh4I.js";import"./dnd-DbPPTppj.js";import"./stripe-DMRn4zHo.js";import"./lottie-qu8VyEpw.js";import"./lexical-Du70nM1B.js";import"./pdf-Cvwxd6W6.js";import"./utils-C_-saZ2j.js";import"./analyticsHelper-BEEOw1D6.js";import"./routePaths-Dx_nnKk7.js";import"./BusinessVerificationPageScreen-YDSaAbpW.js";import"./ReimbursementApprovalRuleDetailScreen-CmXeAJ2V.js";import"./getLocaleForTenant-Dc-_DzRm.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4ad2fd87-6534-4d3b-afb7-8c0663fd5563",e._sentryDebugIdIdentifier="sentry-dbid-4ad2fd87-6534-4d3b-afb7-8c0663fd5563")}catch{}})();const bi=Q(function(e,t){const l=_e(e,t.billId),i=V.getSignedInUser(),c=e.tenantState.currentTenantId,r={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},u=z(t.location.state?.pathnameStackToGoBack);let o=!0;u.poppedPathname?.includes("bills")===!0&&(o=!1);let s=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`;const n=De(i);n||!l.createdBy?.email?.includes("zeni.ai")||(s="Zeni");let d=!1,p=!1;if(l?.billActivities.length>0){const{isApprovalorRejectBtnVisible:g,isMarkAsPaidBtnVisible:b}=sa(l.billActivities,ra(t.currentTenant),i);d=g,p=b}const m=ca(t.currentTenant?.userRole??[]),h=l.transactionDetails!=null&&da(l.transactionDetails,m,i);return{billDetails:l,isAccountingClassesEnabled:Bt(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${We}/transaction_attachment`,signedInUser:i,showBackButton:o,isAdmin:m,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,showApproveRejectBtns:d,showMarkAsPaidButtonToApprover:p,hasZeniAssistAccess:t.hasZeniAssistAccess,analytics:D,showMarkAsPaidButtonToCreator:h,isZeniUser:n}},function(e,t){const{billId:l,currentTenant:i,location:c,navigate:r}=t,{tenantEmailDomain:u}=i;return{redirectToBillsScreen:()=>{const o=ie(u),s=E(c.state?.pathnameStackToGoBack,c.pathname);r(o,{state:{pathnameStackToGoBack:s}})},redirectToEditableBillScreen:()=>{const o=E(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}})},discardBillDetailsFromLocalStore:()=>{e(ke({}))},deleteBill:o=>{D.trackBillPayDeleteBill(l,o),e(Dt(l))},cancelAndDeleteBill:(o,s)=>{s===!0?D.trackBillPayCancelAndDeleteBill(l,o):D.trackBillPayCancelBill(l),e(ba(l,s))},onSaveRealTimeApprovals:o=>{e(ma(l,"bill_pay",o))},updateEditRealTimeApproverClicked:o=>{e(pa({isEdit:o,entityId:l,entityType:"bill_pay"}))},approveOrRejectBill:o=>{o.type==="approved"?e(tt(l,o.type,"")):e(tt(l,o.type,o.description??""))},retryOrRefundBill:o=>{o.type==="retry"?e(Be(l,"retry")):e(Be(l,"refund"))},onAddNewRule:()=>{r("../../bills/approval-rules")},onAttachmentClick:(o,s)=>{const n=Te(u,o,s),d=E(c.state?.pathnameStackToGoBack,c.pathname);r(n,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{const o=z(t.location.state?.pathnameStackToGoBack),s=o.poppedPathname??ie(u);r(s,{state:{pathnameStackToGoBack:o.newStack}})},onRetryPaymentClick:()=>{const o=E(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}}),e(ua({billId:t.billId}))},onRefundPaymentClick:()=>{e(Be(t.billId,"refund"))},saveBillDetails:(o,s,n)=>{o&&e(Et({data:n,billId:l})),e(Me(o?"paid":"pending_approval",o,s,l))},discardOutsideZeniPaymentData:()=>{e(At({billId:l}))}}})(Un);function hi(){const e=J(),t=se(),l=Y(),{billId:i}=ae(),c=me(),r=V.getSignedInUser(),u=Ie(),o=v(G=>Z(G)),s=v(G=>_e(G,i??"")),n=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Kt(o?.companyId,{clearParams:s.fetchState==="Completed"&&!n}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:m}=Qe({mobileExploreReferrer:"Bill Details"});Xe({isDataReady:s.fetchState==="Completed"});const h=o?.userRole!=null&&It(o?.userRole),g=o?.company==null||o.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!h,[b,k]=f.useState(!1),[j,C]=f.useState(!1),[x,M]=f.useState(!1),{useFeatureGate:T,useDynamicConfig:_}=le(),{isFeatureEnabled:$}=T(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=T(y.isBillPayCommentingEnabled),{isFeatureEnabled:H}=T(y.isBillPayDetectInsufficientFundsEnabled),{configValue:N}=_(Ae.zeniAssistConfig),B=oa(o),q=wt(o.userRole),W=g&&pe(u?.loggedInUserRoleMap),U=N.user_ids!=null&&r?.userId!=null&&N.user_ids.includes(r?.userId),{isFeatureEnabled:K}=T(y.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:X}=T(y.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{$&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&B===!1?M(!1):M(s.billActivities[0]?.isRealTimeApprovalEnabled&&(q||W||s.allApprovers.find(G=>G.user.userId===r?.userId)!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))},[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,q,W,o.isZeni,B,r]),f.useEffect(()=>{i!=null&&t(Ct(i))},[i]),f.useEffect(()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(k(!0),t(xt(i??"",$,U,!1)))},[b,s,i,t]),f.useEffect(()=>{j||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(C(!0),t($e(!1,$,U,X,i)),s.billActivities[0]?.isRealTimeApprovalEnabled===!0&&t(la()))},[j,s,i,t]),r==null)throw Error("Can't access address page without signing in...");return s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1?a.jsx(te,{to:`./edit${l.search}`}):s.deleteStatus.fetchState==="In-Progress"||s.cancelAndDeleteStatus.fetchState==="In-Progress"||s.cancelStatus.fetchState==="In-Progress"?a.jsx(re,{fetchState:s.deleteStatus.fetchState,style:{boxShadow:`0px 2px ${A.sp1} ${c.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[a.jsx(je,{analytics:D,onLoad:G=>(ee=>{i!=null&&ee.trackBillPayBillDetails(i,s.isRecurring)})(G)}),a.jsx(bi,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:$,location:l,navigate:e,isBillPayCommentingEnabled:I,isRealTimeApprovalEnabled:x,currentTenant:o,billId:i??"",isInternationalPaymentShaVsOurEnabled:K,hasZeniAssistAccess:U,isDetectInsufficientFundsEnabled:H,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const ye=qe.getLocalizedStrings().spendManagement.billPay.billDetails,gi={containerWidth:new Zt(100,58)},ut=Q(function(e,t){const l=V.getSignedInUser(),i=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i??""},r=t.showActionButtons,u=r&&t.file==null;return{uploadInvoiceEndPoint:`${Ht.communicationAgentMicroServiceBaseUrl}`,authParams:c,billId:t.billId,file:t.file,showAutofill:t.showAutofill,analytics:D,entityId:t.billId,showTitlebarIcon:r,showTitlebar:r&&t?.file!=null,uploadStatus:t.uploadStatus,shouldNotShowAttachment:u,style:{paddingTop:A.sp10,paddingRight:A.sp3,paddingBottom:"15px",paddingLeft:A.sp5,...t.showAutofill?{}:{backgroundColor:t.backgroundColor,paddingBottom:"128px"}}}},function(e,t){const l=V.getSignedInUser();return{onInvoiceUpload:i=>{i!=null&&(t.file!=null||t.billId!=null||t.isInitialEdit?(t.setPayload(i),t.setShowConfirmationPopup(!0)):e(Oe(i,t.isVendorRecommendationEnabled,t.billId)))},updateInvoiceUploadFetchState:i=>{e(Sa({fetchState:{fetchState:i,error:void 0},billId:t.billId}))},onSkipAutofill:i=>{D?.trackBillPaySkipAutofill(),e(Ge(i))},onDeleteClick:()=>{e(ya({billId:t.billId})),D?.trackInvoiceActionClick(t.billStage??"","delete",l?.userEmail??"",null)}}})(Nn);function w({appContent:e}){const t=se(),l=J(),{billId:i}=ae(),c=Y(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=we(),s=me(),n=V.getSignedInUser(),{useFeatureGate:d,useDynamicConfig:p}=le(),{isFeatureEnabled:m}=d(y.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:h}=d(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:g}=d(y.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(y.billPaySetupShowInternationalPaymentByWise),{configValue:k}=p(Ae.zeniAssistConfig),j=k.user_ids!=null&&n?.userId!=null&&k.user_ids.includes(n?.userId),C=v(F=>Z(F)),[x,M]=f.useState(!1),[T,_]=f.useState(!1),[$,I]=f.useState(!1),[H,N]=f.useState(),B=v(F=>Ne(F,m,g,i));let q=B.fetchState,W=B.file,U=B.showAutofill;const K=v(F=>_e(F,i??""));u===!1&&(q=K.fetchState,W=K.transactionDetails?.attachments?.[0],U=!1);const X=B.billPayInfo!=null&&B.billPayInfo.stage.code==="pending_approval"?B.billPayInfo.billStatus.code:B.billStage;f.useEffect(()=>{i==null&&t(Ge(!0))},[i,t]),f.useEffect(()=>{q==="Not-Started"&&(u&&T?_(!1):!u&&x&&M(!1))},[i]),f.useEffect(()=>{x||i==null||u||(M(!0),t(xt(i,h,j,!1)),T||(_(!0),t($e(!1,h,j,b,i)))),u&&!T&&(_(!0),t($e(!1,h,j,b,i)))},[x,T,u,i,t]);const G={onOkClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(X??"",F,n?.userEmail??"","yes"),t(ga({replaceBillData:!0,billId:i})),t(Oe(H,m,i))},onCancelClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(X??"",F,n?.userEmail??"","no"),t(ha({file:H,billId:i}))}},ee=f.useCallback(()=>{const F=z(c.state?.pathnameStackToGoBack),ce=F.poppedPathname??ie(C.tenantEmailDomain);t(ke({billId:i})),l(ce,{state:{pathnameStackToGoBack:F.newStack}})},[c.state,C.tenantEmailDomain,i,t,l]);if(n==null)throw Error("Can't access address page without signing in...");if(q==="Error"||K.fetchState==="Error")return a.jsx(Ee,{});if(q!="Completed")return i==null&&o!=="small"?a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[a.jsx(mt,{}),a.jsx(Re,{}),a.jsx(ut,{backgroundColor:s.colors.grey4,billId:i,file:W,showAutofill:!0,uploadStatus:B.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:I,setPayload:N,showActionButtons:!1,isInitialEdit:!!B.isInitialEdit,billStage:X}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:!0})})]})}):a.jsxs(Fe,{windowSize:o,children:[o==="small"||U?null:a.jsx(pt,{children:a.jsx(Qt,{onClick:ee,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(Ln,{}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:i==null})})]});{const F=B.billPayInfo!=null&&B.billPayInfo.stage.code==="pending_approval"?B.billPayInfo.billStatus.code:B.billStage;return a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[U&&o!=="small"?a.jsx(mt,{}):null,$?a.jsx(_n,{titleComponent:a.jsx(wi,{children:ye.overwriteTitle}),descriptionComponent:a.jsx(Ci,{children:ye.overwriteDescription}),primaryButtonText:ye.buttons.yes,secondaryButtonText:ye.buttons.no,action:G,isEditPopup:!0}):null,o==="small"||U?null:a.jsx(pt,{children:a.jsx(yi,{})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(ut,{backgroundColor:s.colors.grey4,billId:i,file:W,showAutofill:U,uploadStatus:B.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:Si(u,K,B),setShowConfirmationPopup:I,setPayload:N,showActionButtons:fi(u,B),isInitialEdit:!!B.isInitialEdit,billStage:F}),a.jsx(Ve,{windowSize:o,children:e})]})})}}function yi(){const{triggerBack:e}=Gn();return a.jsx(Qt,{onClick:e,"data-testid":"nav-bar-back-click"})}function Si(e,t,l){let i,c;return e?(i=l.recurringConfig?.currentInstance,c=l.recurringConfig?.totalPaymentCycles):(i=t.transactionDetails?.recurringBillInstance,c=t.recurringBillConfigDetail?.totalPaymentCycles),t?.isRecurring===!0?a.jsxs(ki,{children:[a.jsx(vi,{children:`${ye.recurringBill.recurringCycle}
|
|
1
|
+
import{j as a}from"./liveblocks-Hyy2O23M.js";import{j as J,h as se,u as Y,l as ae,g as v,N as te,k as Q,i as na,n as ia,o as S}from"./core-D1cXuJMi.js";import{eQ as Z,MI as _e,bv as It,HC as oa,bo as wt,bF as pe,MJ as Ct,x8 as xt,yi as $e,xH as la,bn as De,MK as sa,ML as ra,c2 as ca,MM as da,jC as Bt,MN as At,MO as Et,yT as Me,xn as Be,MP as ua,wY as tt,MQ as pa,C3 as ma,x0 as ba,x6 as Dt,MR as ke,MS as Ne,yj as Ge,MT as ha,MU as ga,ym as Oe,MV as ya,yz as Sa,MW as jt,y3 as at,y8 as fa,MX as ka,MY as ue,MZ as Tt,M_ as Pt,M$ as Ft,fK as va,xs as Ue,cx as Rt,N0 as Ia,gO as wa,N1 as Ca,N2 as xa,eW as Vt,eU as $t,N3 as ze,N4 as Ba,N5 as Aa,Kr as Ze,N6 as Ea,Ks as oe,Kt as He,N7 as Da,N8 as ja,N9 as Ta,ya as nt,y7 as Pa,Na as Fa,Nb as Ra,Nc as Va,xV as $a,Nd as Ua,Ne as La,Nf as _a,cl as Ut,cN as Lt,jN as Ma,bL as Na,bq as _t,bM as Mt,we as Ga,Ng as Oa,BS as za,BY as Za,sJ as Ha,yk as Wa,y_ as qa,j_ as fe,Nh as Ka,Ni as Nt,ks as Ja,jU as Gt,kd as Ot,kc as it,bE as be,bK as Ya,Nj as Qa,Nk as ve,ix as Xa,Nl as ot,Nm as en,iB as tn,iW as an,zc as nn,Nn as on,kl as ln,z2 as sn,No as lt,z6 as rn,zb as cn,z8 as dn,z0 as un,Np as zt,xh as pn,Nq as mn,Nr as bn,fC as hn,fB as gn,fA as yn,k1 as Sn,kj as st,ku as fn,q9 as kn,ka as vn,z4 as In,iH as wn,kz as Cn,Ns as xn,iz as Bn,q0 as An,Nt as En,x$ as Dn,bG as jn,bs as Tn,Jm as Pn,cP as Fn,cO as Rn,cw as Vn,cC as $n}from"./zeni-epic-state-CbUjX_b3.js";import{m as me,z as V,c as Ie,C as le,A as y,aK as Ae,B as re,o as A,x as je,d as D,b5 as Un,p as z,X as We,j as E,K as we,b6 as rt,b7 as ct,b8 as Ln,ah as _n,I as Mn,aE as Nn,E as Zt,D as qe,J as Ke,b9 as Gn,aq as Ht,ba as On,U as zn,f as Wt,a3 as Zn,bb as Hn,bc as Wn,bd as qn,be as Kn,bf as Jn,bg as Yn,bh as Qn,bi as Xn,bj as ei,n as ti,bk as ai,b1 as ni,bl as ii,bm as oi,a6 as li}from"./index-Cc13Ni3u.js";import{n as L,S as si}from"./mui-B2prtfNk.js";import{A as dt}from"./AddressScreen-CnGdseVP.js";import{g as ie,a as Te,i as qt,V as Je,b as Ye,c as ri,v as ci,d as di,A as he,D as ge}from"./DomesticWireDetailScreen-U7m2J1ru.js";import{a as f}from"./sentry-BTyPPF0t.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-CQ5wXGV2.js";import{c as Xe}from"./useFetchSuggestedQuestionsWhenReady-C8wykHii.js";import{u as Kt}from"./useInitialThreadRequest-DTnvA37x.js";import Ee from"./NotFoundScreen-BBj2rX_R.js";import{D as ui}from"./DrawerScreen-_gX7HdVn.js";import{M as Jt}from"./MobileAppDrawer-DrIh5jJg.js";import{F as Yt}from"./FeaturePreviewScreen-DKtIkE5j.js";import{S as Pe}from"./SetupPagesScreen-P0OPONPn.js";import{B as pi}from"./BillPayApprovalRoutes-9-Csp2U9.js";import{FallBackRoute as mi}from"./ScreenRoutes-Dc0UseAg.js";import"./recharts-CrZf7bKF.js";import"./analytics-BE9oUBzD.js";import"./plaid-4w70Yh4I.js";import"./dnd-DbPPTppj.js";import"./stripe-DMRn4zHo.js";import"./lottie-qu8VyEpw.js";import"./lexical-Du70nM1B.js";import"./pdf-Cvwxd6W6.js";import"./utils-C_-saZ2j.js";import"./analyticsHelper-ClnSplSs.js";import"./routePaths-CYWO_4aN.js";import"./BusinessVerificationPageScreen-D4q4raDT.js";import"./ReimbursementApprovalRuleDetailScreen-BbYEUJEU.js";import"./getLocaleForTenant-BVN8Zhv2.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4ad2fd87-6534-4d3b-afb7-8c0663fd5563",e._sentryDebugIdIdentifier="sentry-dbid-4ad2fd87-6534-4d3b-afb7-8c0663fd5563")}catch{}})();const bi=Q(function(e,t){const l=_e(e,t.billId),i=V.getSignedInUser(),c=e.tenantState.currentTenantId,r={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},u=z(t.location.state?.pathnameStackToGoBack);let o=!0;u.poppedPathname?.includes("bills")===!0&&(o=!1);let s=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`;const n=De(i);n||!l.createdBy?.email?.includes("zeni.ai")||(s="Zeni");let d=!1,p=!1;if(l?.billActivities.length>0){const{isApprovalorRejectBtnVisible:g,isMarkAsPaidBtnVisible:b}=sa(l.billActivities,ra(t.currentTenant),i);d=g,p=b}const m=ca(t.currentTenant?.userRole??[]),h=l.transactionDetails!=null&&da(l.transactionDetails,m,i);return{billDetails:l,isAccountingClassesEnabled:Bt(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${We}/transaction_attachment`,signedInUser:i,showBackButton:o,isAdmin:m,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,showApproveRejectBtns:d,showMarkAsPaidButtonToApprover:p,hasZeniAssistAccess:t.hasZeniAssistAccess,analytics:D,showMarkAsPaidButtonToCreator:h,isZeniUser:n}},function(e,t){const{billId:l,currentTenant:i,location:c,navigate:r}=t,{tenantEmailDomain:u}=i;return{redirectToBillsScreen:()=>{const o=ie(u),s=E(c.state?.pathnameStackToGoBack,c.pathname);r(o,{state:{pathnameStackToGoBack:s}})},redirectToEditableBillScreen:()=>{const o=E(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}})},discardBillDetailsFromLocalStore:()=>{e(ke({}))},deleteBill:o=>{D.trackBillPayDeleteBill(l,o),e(Dt(l))},cancelAndDeleteBill:(o,s)=>{s===!0?D.trackBillPayCancelAndDeleteBill(l,o):D.trackBillPayCancelBill(l),e(ba(l,s))},onSaveRealTimeApprovals:o=>{e(ma(l,"bill_pay",o))},updateEditRealTimeApproverClicked:o=>{e(pa({isEdit:o,entityId:l,entityType:"bill_pay"}))},approveOrRejectBill:o=>{o.type==="approved"?e(tt(l,o.type,"")):e(tt(l,o.type,o.description??""))},retryOrRefundBill:o=>{o.type==="retry"?e(Be(l,"retry")):e(Be(l,"refund"))},onAddNewRule:()=>{r("../../bills/approval-rules")},onAttachmentClick:(o,s)=>{const n=Te(u,o,s),d=E(c.state?.pathnameStackToGoBack,c.pathname);r(n,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{const o=z(t.location.state?.pathnameStackToGoBack),s=o.poppedPathname??ie(u);r(s,{state:{pathnameStackToGoBack:o.newStack}})},onRetryPaymentClick:()=>{const o=E(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}}),e(ua({billId:t.billId}))},onRefundPaymentClick:()=>{e(Be(t.billId,"refund"))},saveBillDetails:(o,s,n)=>{o&&e(Et({data:n,billId:l})),e(Me(o?"paid":"pending_approval",o,s,l))},discardOutsideZeniPaymentData:()=>{e(At({billId:l}))}}})(Un);function hi(){const e=J(),t=se(),l=Y(),{billId:i}=ae(),c=me(),r=V.getSignedInUser(),u=Ie(),o=v(G=>Z(G)),s=v(G=>_e(G,i??"")),n=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Kt(o?.companyId,{clearParams:s.fetchState==="Completed"&&!n}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:m}=Qe({mobileExploreReferrer:"Bill Details"});Xe({isDataReady:s.fetchState==="Completed"});const h=o?.userRole!=null&&It(o?.userRole),g=o?.company==null||o.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!h,[b,k]=f.useState(!1),[j,C]=f.useState(!1),[x,M]=f.useState(!1),{useFeatureGate:T,useDynamicConfig:_}=le(),{isFeatureEnabled:$}=T(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=T(y.isBillPayCommentingEnabled),{isFeatureEnabled:H}=T(y.isBillPayDetectInsufficientFundsEnabled),{configValue:N}=_(Ae.zeniAssistConfig),B=oa(o),q=wt(o.userRole),W=g&&pe(u?.loggedInUserRoleMap),U=N.user_ids!=null&&r?.userId!=null&&N.user_ids.includes(r?.userId),{isFeatureEnabled:K}=T(y.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:X}=T(y.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{$&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&B===!1?M(!1):M(s.billActivities[0]?.isRealTimeApprovalEnabled&&(q||W||s.allApprovers.find(G=>G.user.userId===r?.userId)!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))},[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,q,W,o.isZeni,B,r]),f.useEffect(()=>{i!=null&&t(Ct(i))},[i]),f.useEffect(()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(k(!0),t(xt(i??"",$,U,!1)))},[b,s,i,t]),f.useEffect(()=>{j||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(C(!0),t($e(!1,$,U,X,i)),s.billActivities[0]?.isRealTimeApprovalEnabled===!0&&t(la()))},[j,s,i,t]),r==null)throw Error("Can't access address page without signing in...");return s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1?a.jsx(te,{to:`./edit${l.search}`}):s.deleteStatus.fetchState==="In-Progress"||s.cancelAndDeleteStatus.fetchState==="In-Progress"||s.cancelStatus.fetchState==="In-Progress"?a.jsx(re,{fetchState:s.deleteStatus.fetchState,style:{boxShadow:`0px 2px ${A.sp1} ${c.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[a.jsx(je,{analytics:D,onLoad:G=>(ee=>{i!=null&&ee.trackBillPayBillDetails(i,s.isRecurring)})(G)}),a.jsx(bi,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:$,location:l,navigate:e,isBillPayCommentingEnabled:I,isRealTimeApprovalEnabled:x,currentTenant:o,billId:i??"",isInternationalPaymentShaVsOurEnabled:K,hasZeniAssistAccess:U,isDetectInsufficientFundsEnabled:H,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const ye=qe.getLocalizedStrings().spendManagement.billPay.billDetails,gi={containerWidth:new Zt(100,58)},ut=Q(function(e,t){const l=V.getSignedInUser(),i=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i??""},r=t.showActionButtons,u=r&&t.file==null;return{uploadInvoiceEndPoint:`${Ht.communicationAgentMicroServiceBaseUrl}`,authParams:c,billId:t.billId,file:t.file,showAutofill:t.showAutofill,analytics:D,entityId:t.billId,showTitlebarIcon:r,showTitlebar:r&&t?.file!=null,uploadStatus:t.uploadStatus,shouldNotShowAttachment:u,style:{paddingTop:A.sp10,paddingRight:A.sp3,paddingBottom:"15px",paddingLeft:A.sp5,...t.showAutofill?{}:{backgroundColor:t.backgroundColor,paddingBottom:"128px"}}}},function(e,t){const l=V.getSignedInUser();return{onInvoiceUpload:i=>{i!=null&&(t.file!=null||t.billId!=null||t.isInitialEdit?(t.setPayload(i),t.setShowConfirmationPopup(!0)):e(Oe(i,t.isVendorRecommendationEnabled,t.billId)))},updateInvoiceUploadFetchState:i=>{e(Sa({fetchState:{fetchState:i,error:void 0},billId:t.billId}))},onSkipAutofill:i=>{D?.trackBillPaySkipAutofill(),e(Ge(i))},onDeleteClick:()=>{e(ya({billId:t.billId})),D?.trackInvoiceActionClick(t.billStage??"","delete",l?.userEmail??"",null)}}})(Nn);function w({appContent:e}){const t=se(),l=J(),{billId:i}=ae(),c=Y(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=we(),s=me(),n=V.getSignedInUser(),{useFeatureGate:d,useDynamicConfig:p}=le(),{isFeatureEnabled:m}=d(y.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:h}=d(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:g}=d(y.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(y.billPaySetupShowInternationalPaymentByWise),{configValue:k}=p(Ae.zeniAssistConfig),j=k.user_ids!=null&&n?.userId!=null&&k.user_ids.includes(n?.userId),C=v(F=>Z(F)),[x,M]=f.useState(!1),[T,_]=f.useState(!1),[$,I]=f.useState(!1),[H,N]=f.useState(),B=v(F=>Ne(F,m,g,i));let q=B.fetchState,W=B.file,U=B.showAutofill;const K=v(F=>_e(F,i??""));u===!1&&(q=K.fetchState,W=K.transactionDetails?.attachments?.[0],U=!1);const X=B.billPayInfo!=null&&B.billPayInfo.stage.code==="pending_approval"?B.billPayInfo.billStatus.code:B.billStage;f.useEffect(()=>{i==null&&t(Ge(!0))},[i,t]),f.useEffect(()=>{q==="Not-Started"&&(u&&T?_(!1):!u&&x&&M(!1))},[i]),f.useEffect(()=>{x||i==null||u||(M(!0),t(xt(i,h,j,!1)),T||(_(!0),t($e(!1,h,j,b,i)))),u&&!T&&(_(!0),t($e(!1,h,j,b,i)))},[x,T,u,i,t]);const G={onOkClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(X??"",F,n?.userEmail??"","yes"),t(ga({replaceBillData:!0,billId:i})),t(Oe(H,m,i))},onCancelClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(X??"",F,n?.userEmail??"","no"),t(ha({file:H,billId:i}))}},ee=f.useCallback(()=>{const F=z(c.state?.pathnameStackToGoBack),ce=F.poppedPathname??ie(C.tenantEmailDomain);t(ke({billId:i})),l(ce,{state:{pathnameStackToGoBack:F.newStack}})},[c.state,C.tenantEmailDomain,i,t,l]);if(n==null)throw Error("Can't access address page without signing in...");if(q==="Error"||K.fetchState==="Error")return a.jsx(Ee,{});if(q!="Completed")return i==null&&o!=="small"?a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[a.jsx(mt,{}),a.jsx(Re,{}),a.jsx(ut,{backgroundColor:s.colors.grey4,billId:i,file:W,showAutofill:!0,uploadStatus:B.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:I,setPayload:N,showActionButtons:!1,isInitialEdit:!!B.isInitialEdit,billStage:X}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:!0})})]})}):a.jsxs(Fe,{windowSize:o,children:[o==="small"||U?null:a.jsx(pt,{children:a.jsx(Qt,{onClick:ee,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(Ln,{}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:i==null})})]});{const F=B.billPayInfo!=null&&B.billPayInfo.stage.code==="pending_approval"?B.billPayInfo.billStatus.code:B.billStage;return a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[U&&o!=="small"?a.jsx(mt,{}):null,$?a.jsx(_n,{titleComponent:a.jsx(wi,{children:ye.overwriteTitle}),descriptionComponent:a.jsx(Ci,{children:ye.overwriteDescription}),primaryButtonText:ye.buttons.yes,secondaryButtonText:ye.buttons.no,action:G,isEditPopup:!0}):null,o==="small"||U?null:a.jsx(pt,{children:a.jsx(yi,{})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(ut,{backgroundColor:s.colors.grey4,billId:i,file:W,showAutofill:U,uploadStatus:B.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:Si(u,K,B),setShowConfirmationPopup:I,setPayload:N,showActionButtons:fi(u,B),isInitialEdit:!!B.isInitialEdit,billStage:F}),a.jsx(Ve,{windowSize:o,children:e})]})})}}function yi(){const{triggerBack:e}=Gn();return a.jsx(Qt,{onClick:e,"data-testid":"nav-bar-back-click"})}function Si(e,t,l){let i,c;return e?(i=l.recurringConfig?.currentInstance,c=l.recurringConfig?.totalPaymentCycles):(i=t.transactionDetails?.recurringBillInstance,c=t.recurringBillConfigDetail?.totalPaymentCycles),t?.isRecurring===!0?a.jsxs(ki,{children:[a.jsx(vi,{children:`${ye.recurringBill.recurringCycle}
|
|
2
2
|
${i}/${c}`}),a.jsx(Ii,{})]}):void 0}function fi(e,t){const l=t.billActivities?.[0],i=t.billStage==="pending_approval"&&l?.areApprovalsSerialized===!0&&l?.currentPendingStepIndex===0;return e&&(t.billStage==="draft"||i)}const pt=L.div`
|
|
3
3
|
margin-bottom: 20px;
|
|
4
4
|
margin-top: 20px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as T}from"./liveblocks-Hyy2O23M.js";import{a as V}from"./sentry-BTyPPF0t.js";import{j as ae,u as ne,h as se,l as ie,g as C,N as oe,k as re}from"./core-D1cXuJMi.js";import{c as ce,C as ue,aK as de,z as E,x as pe,d as z,ac as x,f as B,bu as le,aq as me,j as P,ar as R}from"./index-
|
|
1
|
+
import{j as T}from"./liveblocks-Hyy2O23M.js";import{a as V}from"./sentry-BTyPPF0t.js";import{j as ae,u as ne,h as se,l as ie,g as C,N as oe,k as re}from"./core-D1cXuJMi.js";import{c as ce,C as ue,aK as de,z as E,x as pe,d as z,ac as x,f as B,bu as le,aq as me,j as P,ar as R}from"./index-Cc13Ni3u.js";import{Ne as fe,eQ as G,s8 as ye,HG as Se,xV as ge,AC as Ie,D9 as he,DO as be,EH as De,NB as Oe,NC as ke,ND as Te,NE as Ce,NF as Ve,K8 as Ne,MD as we,Kk as Ae,ki as _e,fC as Fe,fB as ve,fA as xe,q9 as Be,q0 as Ee,pZ as ze,ka as Pe,sh as Re,sf as M,bE as L,st as U,cv as Me}from"./zeni-epic-state-CbUjX_b3.js";import{n as Le}from"./mui-B2prtfNk.js";import{d as j}from"./routePaths-CYWO_4aN.js";import{M as Ue}from"./MobileAppDrawer-DrIh5jJg.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="c689f406-449a-432a-b9cc-8e70f3114388",e._sentryDebugIdIdentifier="sentry-dbid-c689f406-449a-432a-b9cc-8e70f3114388")}catch{}})();const je=Le.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Hyy2O23M.js";import{j as le,l as ia,h as ue,g as y,u as ge,k as pe,N as ga,q as ut,n as Wt,o as te}from"./core-D1cXuJMi.js";import{eQ as ie,bs as Re,P9 as ka,eU as be,eV as ye,eW as Se,fR as $e,cs as ze,Pa as Ye,Pb as Ma,tn as ba,jK as ya,Pc as Sa,gO as oa,zV as Xe,zX as Ga,zY as $a,jA as mt,Pd as Ze,zJ as Ct,Pe as qt,Pf as Jt,zM as Da,Pg as Qt,Ny as _a,rz as pt,zS as za,gZ as Xt,Ph as ht,Pi as Ke,bq as en,Pj as an,fC as Pa,fB as wa,Aq as tn,fA as Ta,Ne as nn,Pk as ft,cl as gt,cN as rn,Nx as da,B0 as sn,Pl as tt,AC as Fa,Pm as bt,B1 as on,NZ as cn,B2 as dn,BY as ln,sJ as un,BS as mn,Ab as yt,A4 as Cn,Pn as pn,fT as hn,Ak as St,Ao as It,fS as fn,Po as gn,AO as At,Pp as bn,Pq as yn,Pr as Sn,Am as Et,A7 as kt,zP as Dt,Ag as _t,Ae as Pt,Ai as In,zW as nt,Ps as wt,Pt as va,Az as Ia,Kd as Tt,cO as Ya,Pu as An,Pv as En,Pw as kn,Px as Dn,Aw as Na,AV as _n,AR as Pn,As as wn,AT as Tn,AJ as Fn,AL as vn,Py as Ft,A$ as vt,HC as xn,Pz as Bn,PA as Ln,PB as Un,PC as xt,PD as Rn,Bm as On,AB as Bt,Av as ca,AA as jn,PE as Nn,PF as Vn,zG as Hn,PG as Lt,PH as Ut,PI as Mn,zI as Gn,zH as rt,PJ as $n,PK as zn,PL as Yn,K9 as Zn,PM as Za,PN as Kn,wh as Rt,ki as Wn,gP as qn,Br as Jn,PO as Ot,PP as Qn,Bs as Xn,PQ as er,df as ar,th as tr,Bh as nr,Bb as Ue,bv as rr,bF as sr,cx as or,bG as cr,Jm as ir}from"./zeni-epic-state-CbUjX_b3.js";import{z as X,c as je,C as ce,A as Y,B as la,bY as xa,c7 as dr,p as ve,c8 as lr,c9 as ur,K as ua,aK as Fe,j as fe,bf as Ka,ca as mr,E as ma,h as Ba,m as Wa,d as J,D as qa,cb as Cr,an as Ja,br as Je,cc as Va,cd as pr,x as Qa,a3 as hr,ce as fr,aq as jt,X as Ha,U as Nt,f as Vt,cf as gr,cg as br,ch as yr,ci as Sr,cj as Ir,ck as Ar,o as Aa,cl as Er,cm as kr,cn as Ra,n as Dr,co as _r,cp as Pr,cq as wr,cr as Tr,cs as Fr,a6 as vr}from"./index-Dr8ZNfvJ.js";import{n as _e,D as Ht,S as xr}from"./mui-B2prtfNk.js";import{a as i}from"./sentry-BTyPPF0t.js";import{g as Ce,a as Ca,b as Mt,c as Ie,d as Ae,e as Oe,f as Ne,A as Br,h as Xa,P as Lr,i as et,s as Qe,j as Gt,k as Me,l as $t,m as Ur,n as zt,p as Rr,S as st}from"./SetupPagesScreen-D1bk7eBP.js";import La from"./NotFoundScreen-BHqd2QHQ.js";import{M as Ge}from"./MobileAppDrawer-D8M7VXe9.js";import{u as Yt}from"./useAskAiCfoHostNavButtonProps-BxShjiqA.js";import{c as Zt}from"./useFetchSuggestedQuestionsWhenReady-DWTRn_Lu.js";import{v as ot}from"./utils-C_-saZ2j.js";import{t as Or}from"./AddressScreen-DqNplF9n.js";import"./recharts-CrZf7bKF.js";import"./analytics-BE9oUBzD.js";import"./plaid-4w70Yh4I.js";import"./dnd-DbPPTppj.js";import"./stripe-DMRn4zHo.js";import"./lottie-qu8VyEpw.js";import"./lexical-Du70nM1B.js";import"./pdf-Cvwxd6W6.js";import"./analyticsHelper-BEEOw1D6.js";import"./routePaths-Dx_nnKk7.js";import"./BusinessVerificationPageScreen-YDSaAbpW.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2d2dcdec-b59e-4dba-ad1d-1afe1fad94fb",e._sentryDebugIdIdentifier="sentry-dbid-2d2dcdec-b59e-4dba-ad1d-1afe1fad94fb")}catch{}})();function jr(){const e=le(),{cardId:t}=ia(),a=ue(),r=X.getSignedInUser(),n=y(Q=>ie(Q)),C=je(),p=Re(C?.loggedInUserRoleMap),{useFeatureGate:u}=ce();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[S,o]=i.useState(!1),c=y(Q=>ka(Q).firstViewAfterActivation);if(t==null)throw Error("Empty card id is not valid...");const _=n.userRole.includes("charge_card_user"),{isFeatureEnabled:A}=u(Y.isChargeCardFeatureEnabled),f=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:R}=u(Y.isDebitCardFeatureEnabled),F=be(n),k=ye(n),h=Se(R,n),b=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,g=Ie({isDebitCardFeatureEnabled:R,isBankingOnlyTenant:h}),d=Ae({isCardsOnlyTenant:F,isChargeCardFeatureEnabled:A,isBookKeepingTenant:k,isDebitCardProductVisible:g,chargeCardsCreditAccountLimit:b}),D=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,v=y(Q=>$e(Q,n.companyId)),N=ze(v.controllers),{creditAccount:L,creditAccountRepayment:w}=y(Q=>Ye(Q)),V=y(Q=>Q.classListState.fetchState),m=!_&&d&&f,l=y(Q=>Ma(Q,t,m,d)),[P,T]=i.useState(!1),H=l.chargeCard,U=H?.cardCreatedByUser?.userId,K=y(Q=>U!=null?ba(Q.userRoleState,U):void 0),I=K?.accountingClassIDs[0],B=y(Q=>I!=null?ya(Q.classState,{classId:I,reportId:"class_list"}):void 0),j=H?.cardHolderUser?.userId,O=y(Q=>j!=null?ba(Q.userRoleState,j):void 0),W=O?.accountingClassIDs[0],E=y(Q=>W!=null?ya(Q.classState,{classId:W,reportId:"class_list"}):void 0),z=H?.type.code==="business_physical_credit_card"||H?.type.code==="business_physical_debit_card",q=H?.type.code==="business_physical_debit_card";i.useEffect(()=>{c&&S===!1&&z&&(o(!0),setTimeout(()=>{a(Sa()),q&&a(oa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[c,S,z,q]),i.useEffect(()=>{P||l.fetchState==="Completed"||l.fetchState==="In-Progress"||t==null||(T(!0),a(Xe(t,m,!1)))},[P,l,t,a]),i.useEffect(()=>{if(l.fetchState==="Completed"&&(z===!1||z&&H?.status?.code!=="active"||H?.cardHolderUserId!==r.userId||c===!1&&S===!1||H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card")){const Q=Ce(n.tenantEmailDomain,t,r,H,c);e(Q)}},[l.fetchState,c,z]),i.useEffect(()=>{L.fetchState!=="Completed"&&L.fetchState!=="In-Progress"&&d&&f&&p&&a(Ga()),w.fetchState!=="Completed"&&w.fetchState!=="In-Progress"&&d&&f&&p&&a($a()),V!=="Completed"&&V!=="In-Progress"&&a(mt())},[L.fetchState,w.fetchState,a,d,f,p,V]);const $=()=>{if(r!=null&&t!=null){a(Sa());const Q=Ce(n.tenantEmailDomain,t,r);e(Q)}},x=H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card",se=Oe(d,g,D,f),ae=Ca(d,f,p,L,w),ne=Mt(x,l);return l.fetchState!=="Completed"?s.jsx(la,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(xa,{showConfetti:c}),s.jsx(dr,{onGotItClick:$,isDebitCard:H?.type.code==="business_physical_debit_card",controllerEmails:N,isChargeCardFeatureEnabled:d,isDebitCardFeatureEnabled:g,isDebitCardSetupEnabled:D,isChargeCardSetupEnabled:f,productInformation:se,creditAccountInformation:ae,debitAccountInformation:ne,chargeCardDetailView:l,creditAccount:L,classListFetchState:V,creditAccountRepayment:w,cardIssuedByRoles:K?.userRoles,cardIssuedByDepartmentName:B?.className,cardHolderRoles:O?.userRoles,cardHolderDepartmentName:E?.className})]})}const Nr=pe(function(e){const t=Ze(e);return{insightsData:t.insight,cashbackByPeriod:t.cashbackByPeriod,uiState:t.uiState,cashbackSummary:t.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(t,a)=>{e(qt({uiState:{sortKey:t,sortOrder:a}}))}}})(ur);function Vr(){const e=le(),t=ue(),a=ge(),r=X.getSignedInUser(),n=y(o=>ie(o)),[C,p]=i.useState(!1),u=y(o=>Ze(o)),S=i.useCallback(()=>{const o=ve(a.state?.pathnameStackToGoBack),c=o.poppedPathname??Hr(n.tenantEmailDomain);e(c,{state:{pathnameStackToGoBack:o.newStack}})},[e,a,n.tenantEmailDomain]);if(i.useEffect(()=>{C||u.fetchState==="Completed"||u.fetchState==="In-Progress"||(p(!0),t(Ct()))},[C,u,t]),r==null)throw Error("Can't access cashback detail page without signing in...");return u.fetchState==="In-Progress"?s.jsx(lr,{onBackClick:S}):u.cashbackSummary.cashbackEarned.amount===0&&u.fetchState==="Completed"?s.jsx(La,{}):s.jsx(Nr,{onBackClick:S})}const Hr=e=>`/${e}/cards`,Mr={containerWidth:new ma(100,58)},Gr=({appContent:e})=>{const t=ua(),a=ue(),r=le(),{cardId:n}=ia(),C=ge(),{useDynamicConfig:p}=ce(),[u,S]=i.useState(!1),[o,c]=i.useState(!1),[_,A]=i.useState(!1),[f,R]=i.useState(!1),F=X.getSignedInUser();if(F==null)throw Error("Can't access onboarding card page without signing in...");const k=y(E=>ie(E));if(n==null)throw Error("Empty card id is not valid...");const{configValue:h}=p(Fe.zeniCardsConfig),b=h.max_charge_card_activation_attempts_by_card_id,g=y(E=>Jt(E,n)),d=g.chargeCard,D=y(E=>E.chargeCardConfigState.fetchState),{useFeatureGate:v}=ce(),{isFeatureEnabled:N}=v(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:L}=v(Y.isDebitCardFeatureEnabled),w=Se(L,k),V=Ie({isDebitCardFeatureEnabled:L,isBankingOnlyTenant:w}),m=!!k.companyChargeCardInfo?.info?.isChargeCardEnabled,l=k.userRole.includes("charge_card_user"),P=be(k),T=ye(k),H=k.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,U=Ae({isCardsOnlyTenant:P,isChargeCardFeatureEnabled:N,isBookKeepingTenant:T,isDebitCardProductVisible:V,chargeCardsCreditAccountLimit:H}),K=!l&&U&&m;i.useEffect(()=>{u===!1&&D!=="In-Progress"&&D!=="Completed"&&(a(Da()),S(!0)),o===!1&&g.fetchState==="Not-Started"&&(c(!0),a(Xe(n,K,U)))},[o,g.fetchState,u,D]);const I=d?.type.code==="business_physical_credit_card"||d?.type.code==="business_physical_debit_card";i.useEffect(()=>{if(g.fetchState==="Completed"){if(_===!1&&(I===!1||I&&d?.status?.code!=="inactive"||d?.cardHolderUserId!==F.userId)){const E=Ce(k.tenantEmailDomain,n,F,d,!0),z=fe(C.state?.pathnameStackToGoBack,C.pathname);r(E,{state:{pathnameStackToGoBack:z}})}else if(_&&g.isRefreshingViewInBackground===!1&&d?.status?.code==="active"){a(Qt({chargeCardId:n}));const E=Ce(k.tenantEmailDomain,n,F,d,!0),z=fe(C.state?.pathnameStackToGoBack,C.pathname);a(_a()),r(E,{state:{pathnameStackToGoBack:z}})}}},[g.fetchState,d?.type.code,_,g.isRefreshingViewInBackground]);const B=X.getZeniOtpTokenForCardHolder(n),j=y(E=>pt(E.userState,F.userId)),O=()=>{d?.status?.code!=="active"&&a(za(n,!0))};i.useEffect(()=>{g.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&d?.cardActivationAttemptHistory.some(E=>E.statusCode==="success")===!0&&_===!1&&(setTimeout(O,3e3),A(!0))},[g.updatePhysicalChargeCardAttemptFetchState.fetchState,d?.cardActivationAttemptHistory]);const W=E=>{R(E)};if(D!=="Completed"||d==null)return s.jsx(la,{fetchState:"In-Progress"});if(d.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(j?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Yr,{children:[s.jsx(Ge,{isAppContentDrawerOpen:f,handleDrawerToggle:W}),s.jsx($r,{cardId:n,card:d,shippingAddressId:d.shippingAddressId,phone:j.phone,signedInUser:F,isSandboxEnv:Ka(),chargeCardDetailState:g,signedInUserToken:B,navigate:r,currentTenant:k,location:C,maxChargeCardActivationAttempts:b[n]!=null?b[n]:h.default_max_charge_card_activation_attempts!=null?h.default_max_charge_card_activation_attempts:3,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{W(!0)}}),e!=null?s.jsx(zr,{windowSize:t,children:e}):null]})},$r=pe(function(e,{chargeCardDetailState:t,shippingAddressId:a,location:r,cardId:n}){const C=Xt(e.addressState,a);if(C==null)throw Error("Can't access shippingAddress.");const p=ht(e,n),u=t.updateStatus,S=Ke(e,!1,!1,!1);let o=!1;S.fetchState==="Completed"&&S.cards.length<=1&&(o=!0);const c=r.state?.message==="comingFromV2UrlPath";return{showActivatePage:t.chargeCard?.providerCardCreateTime!=null&&t.chargeCard.providerCardCreateTime.add(24,"h").isBefore(en())||c,showMenuIcon:o,shippingAddress:C,vgsVaultId:Ba.cardVaultId,twoFAView:p,activationWaitStatus:u,isRefreshingViewInBackground:t.isRefreshingViewInBackground}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:C,chargeCardDetailState:p}=t,u=p.chargeCard?.cardProviderID,{tenantEmailDomain:S}=C;return{onGetOtp:o=>{u!=null&&e(Ta(o,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:o=>{e(tn(r,o))},onResendOtp:o=>{u!=null&&e(wa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,c)=>{u!=null&&e(Pa(o,c,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&X.saveZeniOtpTokenForCardHolder(o,r)},onCVVActivateSuccess:()=>{e(an({chargeCardId:r}))},onBackClick:()=>{const o=ve(n.state?.pathnameStackToGoBack),c=o.poppedPathname==null||o.poppedPathname.includes("onboard")===!0?Ne(S):o.poppedPathname;a(c,{state:{pathnameStackToGoBack:o.newStack}})}}})(mr),zr=_e.div`
|
|
1
|
+
import{j as s}from"./liveblocks-Hyy2O23M.js";import{j as le,l as ia,h as ue,g as y,u as ge,k as pe,N as ga,q as ut,n as Wt,o as te}from"./core-D1cXuJMi.js";import{eQ as ie,bs as Re,P9 as ka,eU as be,eV as ye,eW as Se,fR as $e,cs as ze,Pa as Ye,Pb as Ma,tn as ba,jK as ya,Pc as Sa,gO as oa,zV as Xe,zX as Ga,zY as $a,jA as mt,Pd as Ze,zJ as Ct,Pe as qt,Pf as Jt,zM as Da,Pg as Qt,Ny as _a,rz as pt,zS as za,gZ as Xt,Ph as ht,Pi as Ke,bq as en,Pj as an,fC as Pa,fB as wa,Aq as tn,fA as Ta,Ne as nn,Pk as ft,cl as gt,cN as rn,Nx as da,B0 as sn,Pl as tt,AC as Fa,Pm as bt,B1 as on,NZ as cn,B2 as dn,BY as ln,sJ as un,BS as mn,Ab as yt,A4 as Cn,Pn as pn,fT as hn,Ak as St,Ao as It,fS as fn,Po as gn,AO as At,Pp as bn,Pq as yn,Pr as Sn,Am as Et,A7 as kt,zP as Dt,Ag as _t,Ae as Pt,Ai as In,zW as nt,Ps as wt,Pt as va,Az as Ia,Kd as Tt,cO as Ya,Pu as An,Pv as En,Pw as kn,Px as Dn,Aw as Na,AV as _n,AR as Pn,As as wn,AT as Tn,AJ as Fn,AL as vn,Py as Ft,A$ as vt,HC as xn,Pz as Bn,PA as Ln,PB as Un,PC as xt,PD as Rn,Bm as On,AB as Bt,Av as ca,AA as jn,PE as Nn,PF as Vn,zG as Hn,PG as Lt,PH as Ut,PI as Mn,zI as Gn,zH as rt,PJ as $n,PK as zn,PL as Yn,K9 as Zn,PM as Za,PN as Kn,wh as Rt,ki as Wn,gP as qn,Br as Jn,PO as Ot,PP as Qn,Bs as Xn,PQ as er,df as ar,th as tr,Bh as nr,Bb as Ue,bv as rr,bF as sr,cx as or,bG as cr,Jm as ir}from"./zeni-epic-state-CbUjX_b3.js";import{z as X,c as je,C as ce,A as Y,B as la,bY as xa,c7 as dr,p as ve,c8 as lr,c9 as ur,K as ua,aK as Fe,j as fe,bf as Ka,ca as mr,E as ma,h as Ba,m as Wa,d as J,D as qa,cb as Cr,an as Ja,br as Je,cc as Va,cd as pr,x as Qa,a3 as hr,ce as fr,aq as jt,X as Ha,U as Nt,f as Vt,cf as gr,cg as br,ch as yr,ci as Sr,cj as Ir,ck as Ar,o as Aa,cl as Er,cm as kr,cn as Ra,n as Dr,co as _r,cp as Pr,cq as wr,cr as Tr,cs as Fr,a6 as vr}from"./index-Cc13Ni3u.js";import{n as _e,D as Ht,S as xr}from"./mui-B2prtfNk.js";import{a as i}from"./sentry-BTyPPF0t.js";import{g as Ce,a as Ca,b as Mt,c as Ie,d as Ae,e as Oe,f as Ne,A as Br,h as Xa,P as Lr,i as et,s as Qe,j as Gt,k as Me,l as $t,m as Ur,n as zt,p as Rr,S as st}from"./SetupPagesScreen-P0OPONPn.js";import La from"./NotFoundScreen-BBj2rX_R.js";import{M as Ge}from"./MobileAppDrawer-DrIh5jJg.js";import{u as Yt}from"./useAskAiCfoHostNavButtonProps-CQ5wXGV2.js";import{c as Zt}from"./useFetchSuggestedQuestionsWhenReady-C8wykHii.js";import{v as ot}from"./utils-C_-saZ2j.js";import{t as Or}from"./AddressScreen-CnGdseVP.js";import"./recharts-CrZf7bKF.js";import"./analytics-BE9oUBzD.js";import"./plaid-4w70Yh4I.js";import"./dnd-DbPPTppj.js";import"./stripe-DMRn4zHo.js";import"./lottie-qu8VyEpw.js";import"./lexical-Du70nM1B.js";import"./pdf-Cvwxd6W6.js";import"./analyticsHelper-ClnSplSs.js";import"./routePaths-CYWO_4aN.js";import"./BusinessVerificationPageScreen-D4q4raDT.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2d2dcdec-b59e-4dba-ad1d-1afe1fad94fb",e._sentryDebugIdIdentifier="sentry-dbid-2d2dcdec-b59e-4dba-ad1d-1afe1fad94fb")}catch{}})();function jr(){const e=le(),{cardId:t}=ia(),a=ue(),r=X.getSignedInUser(),n=y(Q=>ie(Q)),C=je(),p=Re(C?.loggedInUserRoleMap),{useFeatureGate:u}=ce();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[S,o]=i.useState(!1),c=y(Q=>ka(Q).firstViewAfterActivation);if(t==null)throw Error("Empty card id is not valid...");const _=n.userRole.includes("charge_card_user"),{isFeatureEnabled:A}=u(Y.isChargeCardFeatureEnabled),f=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:R}=u(Y.isDebitCardFeatureEnabled),F=be(n),k=ye(n),h=Se(R,n),b=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,g=Ie({isDebitCardFeatureEnabled:R,isBankingOnlyTenant:h}),d=Ae({isCardsOnlyTenant:F,isChargeCardFeatureEnabled:A,isBookKeepingTenant:k,isDebitCardProductVisible:g,chargeCardsCreditAccountLimit:b}),D=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,v=y(Q=>$e(Q,n.companyId)),N=ze(v.controllers),{creditAccount:L,creditAccountRepayment:w}=y(Q=>Ye(Q)),V=y(Q=>Q.classListState.fetchState),m=!_&&d&&f,l=y(Q=>Ma(Q,t,m,d)),[P,T]=i.useState(!1),H=l.chargeCard,U=H?.cardCreatedByUser?.userId,K=y(Q=>U!=null?ba(Q.userRoleState,U):void 0),I=K?.accountingClassIDs[0],B=y(Q=>I!=null?ya(Q.classState,{classId:I,reportId:"class_list"}):void 0),j=H?.cardHolderUser?.userId,O=y(Q=>j!=null?ba(Q.userRoleState,j):void 0),W=O?.accountingClassIDs[0],E=y(Q=>W!=null?ya(Q.classState,{classId:W,reportId:"class_list"}):void 0),z=H?.type.code==="business_physical_credit_card"||H?.type.code==="business_physical_debit_card",q=H?.type.code==="business_physical_debit_card";i.useEffect(()=>{c&&S===!1&&z&&(o(!0),setTimeout(()=>{a(Sa()),q&&a(oa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[c,S,z,q]),i.useEffect(()=>{P||l.fetchState==="Completed"||l.fetchState==="In-Progress"||t==null||(T(!0),a(Xe(t,m,!1)))},[P,l,t,a]),i.useEffect(()=>{if(l.fetchState==="Completed"&&(z===!1||z&&H?.status?.code!=="active"||H?.cardHolderUserId!==r.userId||c===!1&&S===!1||H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card")){const Q=Ce(n.tenantEmailDomain,t,r,H,c);e(Q)}},[l.fetchState,c,z]),i.useEffect(()=>{L.fetchState!=="Completed"&&L.fetchState!=="In-Progress"&&d&&f&&p&&a(Ga()),w.fetchState!=="Completed"&&w.fetchState!=="In-Progress"&&d&&f&&p&&a($a()),V!=="Completed"&&V!=="In-Progress"&&a(mt())},[L.fetchState,w.fetchState,a,d,f,p,V]);const $=()=>{if(r!=null&&t!=null){a(Sa());const Q=Ce(n.tenantEmailDomain,t,r);e(Q)}},x=H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card",se=Oe(d,g,D,f),ae=Ca(d,f,p,L,w),ne=Mt(x,l);return l.fetchState!=="Completed"?s.jsx(la,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(xa,{showConfetti:c}),s.jsx(dr,{onGotItClick:$,isDebitCard:H?.type.code==="business_physical_debit_card",controllerEmails:N,isChargeCardFeatureEnabled:d,isDebitCardFeatureEnabled:g,isDebitCardSetupEnabled:D,isChargeCardSetupEnabled:f,productInformation:se,creditAccountInformation:ae,debitAccountInformation:ne,chargeCardDetailView:l,creditAccount:L,classListFetchState:V,creditAccountRepayment:w,cardIssuedByRoles:K?.userRoles,cardIssuedByDepartmentName:B?.className,cardHolderRoles:O?.userRoles,cardHolderDepartmentName:E?.className})]})}const Nr=pe(function(e){const t=Ze(e);return{insightsData:t.insight,cashbackByPeriod:t.cashbackByPeriod,uiState:t.uiState,cashbackSummary:t.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(t,a)=>{e(qt({uiState:{sortKey:t,sortOrder:a}}))}}})(ur);function Vr(){const e=le(),t=ue(),a=ge(),r=X.getSignedInUser(),n=y(o=>ie(o)),[C,p]=i.useState(!1),u=y(o=>Ze(o)),S=i.useCallback(()=>{const o=ve(a.state?.pathnameStackToGoBack),c=o.poppedPathname??Hr(n.tenantEmailDomain);e(c,{state:{pathnameStackToGoBack:o.newStack}})},[e,a,n.tenantEmailDomain]);if(i.useEffect(()=>{C||u.fetchState==="Completed"||u.fetchState==="In-Progress"||(p(!0),t(Ct()))},[C,u,t]),r==null)throw Error("Can't access cashback detail page without signing in...");return u.fetchState==="In-Progress"?s.jsx(lr,{onBackClick:S}):u.cashbackSummary.cashbackEarned.amount===0&&u.fetchState==="Completed"?s.jsx(La,{}):s.jsx(Nr,{onBackClick:S})}const Hr=e=>`/${e}/cards`,Mr={containerWidth:new ma(100,58)},Gr=({appContent:e})=>{const t=ua(),a=ue(),r=le(),{cardId:n}=ia(),C=ge(),{useDynamicConfig:p}=ce(),[u,S]=i.useState(!1),[o,c]=i.useState(!1),[_,A]=i.useState(!1),[f,R]=i.useState(!1),F=X.getSignedInUser();if(F==null)throw Error("Can't access onboarding card page without signing in...");const k=y(E=>ie(E));if(n==null)throw Error("Empty card id is not valid...");const{configValue:h}=p(Fe.zeniCardsConfig),b=h.max_charge_card_activation_attempts_by_card_id,g=y(E=>Jt(E,n)),d=g.chargeCard,D=y(E=>E.chargeCardConfigState.fetchState),{useFeatureGate:v}=ce(),{isFeatureEnabled:N}=v(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:L}=v(Y.isDebitCardFeatureEnabled),w=Se(L,k),V=Ie({isDebitCardFeatureEnabled:L,isBankingOnlyTenant:w}),m=!!k.companyChargeCardInfo?.info?.isChargeCardEnabled,l=k.userRole.includes("charge_card_user"),P=be(k),T=ye(k),H=k.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,U=Ae({isCardsOnlyTenant:P,isChargeCardFeatureEnabled:N,isBookKeepingTenant:T,isDebitCardProductVisible:V,chargeCardsCreditAccountLimit:H}),K=!l&&U&&m;i.useEffect(()=>{u===!1&&D!=="In-Progress"&&D!=="Completed"&&(a(Da()),S(!0)),o===!1&&g.fetchState==="Not-Started"&&(c(!0),a(Xe(n,K,U)))},[o,g.fetchState,u,D]);const I=d?.type.code==="business_physical_credit_card"||d?.type.code==="business_physical_debit_card";i.useEffect(()=>{if(g.fetchState==="Completed"){if(_===!1&&(I===!1||I&&d?.status?.code!=="inactive"||d?.cardHolderUserId!==F.userId)){const E=Ce(k.tenantEmailDomain,n,F,d,!0),z=fe(C.state?.pathnameStackToGoBack,C.pathname);r(E,{state:{pathnameStackToGoBack:z}})}else if(_&&g.isRefreshingViewInBackground===!1&&d?.status?.code==="active"){a(Qt({chargeCardId:n}));const E=Ce(k.tenantEmailDomain,n,F,d,!0),z=fe(C.state?.pathnameStackToGoBack,C.pathname);a(_a()),r(E,{state:{pathnameStackToGoBack:z}})}}},[g.fetchState,d?.type.code,_,g.isRefreshingViewInBackground]);const B=X.getZeniOtpTokenForCardHolder(n),j=y(E=>pt(E.userState,F.userId)),O=()=>{d?.status?.code!=="active"&&a(za(n,!0))};i.useEffect(()=>{g.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&d?.cardActivationAttemptHistory.some(E=>E.statusCode==="success")===!0&&_===!1&&(setTimeout(O,3e3),A(!0))},[g.updatePhysicalChargeCardAttemptFetchState.fetchState,d?.cardActivationAttemptHistory]);const W=E=>{R(E)};if(D!=="Completed"||d==null)return s.jsx(la,{fetchState:"In-Progress"});if(d.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(j?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Yr,{children:[s.jsx(Ge,{isAppContentDrawerOpen:f,handleDrawerToggle:W}),s.jsx($r,{cardId:n,card:d,shippingAddressId:d.shippingAddressId,phone:j.phone,signedInUser:F,isSandboxEnv:Ka(),chargeCardDetailState:g,signedInUserToken:B,navigate:r,currentTenant:k,location:C,maxChargeCardActivationAttempts:b[n]!=null?b[n]:h.default_max_charge_card_activation_attempts!=null?h.default_max_charge_card_activation_attempts:3,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{W(!0)}}),e!=null?s.jsx(zr,{windowSize:t,children:e}):null]})},$r=pe(function(e,{chargeCardDetailState:t,shippingAddressId:a,location:r,cardId:n}){const C=Xt(e.addressState,a);if(C==null)throw Error("Can't access shippingAddress.");const p=ht(e,n),u=t.updateStatus,S=Ke(e,!1,!1,!1);let o=!1;S.fetchState==="Completed"&&S.cards.length<=1&&(o=!0);const c=r.state?.message==="comingFromV2UrlPath";return{showActivatePage:t.chargeCard?.providerCardCreateTime!=null&&t.chargeCard.providerCardCreateTime.add(24,"h").isBefore(en())||c,showMenuIcon:o,shippingAddress:C,vgsVaultId:Ba.cardVaultId,twoFAView:p,activationWaitStatus:u,isRefreshingViewInBackground:t.isRefreshingViewInBackground}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:C,chargeCardDetailState:p}=t,u=p.chargeCard?.cardProviderID,{tenantEmailDomain:S}=C;return{onGetOtp:o=>{u!=null&&e(Ta(o,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:o=>{e(tn(r,o))},onResendOtp:o=>{u!=null&&e(wa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,c)=>{u!=null&&e(Pa(o,c,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&X.saveZeniOtpTokenForCardHolder(o,r)},onCVVActivateSuccess:()=>{e(an({chargeCardId:r}))},onBackClick:()=>{const o=ve(n.state?.pathnameStackToGoBack),c=o.poppedPathname==null||o.poppedPathname.includes("onboard")===!0?Ne(S):o.poppedPathname;a(c,{state:{pathnameStackToGoBack:o.newStack}})}}})(mr),zr=_e.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: ${e=>`${Mr.containerWidth.value(e.windowSize)}%`};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-Hyy2O23M.js";import{a as g}from"./sentry-BTyPPF0t.js";import{j as w,h as k,u as x,l as T,g as O,k as E}from"./core-D1cXuJMi.js";import{z as D,b1 as F,x as P,d as V,f as j,ac as C,b2 as A,aq as L,ar as M,j as U}from"./index-
|
|
1
|
+
import{j as m}from"./liveblocks-Hyy2O23M.js";import{a as g}from"./sentry-BTyPPF0t.js";import{j as w,h as k,u as x,l as T,g as O,k as E}from"./core-D1cXuJMi.js";import{z as D,b1 as F,x as P,d as V,f as j,ac as C,b2 as A,aq as L,ar as M,j as U}from"./index-Cc13Ni3u.js";import{eQ as h,fE as B,s8 as R,fz as _,c2 as z,MD as G,bn as q,q9 as Y,pZ as Z,ka as H,lG as S,ME as Q,bE as $,cv as N,lO as J,lR as K}from"./zeni-epic-state-CbUjX_b3.js";import"./mui-B2prtfNk.js";import{d as W}from"./routePaths-CYWO_4aN.js";import{M as X}from"./MobileAppDrawer-DrIh5jJg.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="97044350-ffdd-4a21-90d9-df094427a9c3",a._sentryDebugIdIdentifier="sentry-dbid-97044350-ffdd-4a21-90d9-df094427a9c3")}catch{}})();const ee=E(function(a){const t=_(a),i=D.getSignedInUser(),l=h(a),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=z(l?.userRole??[])&&t.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=G(a.companyConfigState),n=a.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:t.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:t,allIndustries:e.companyIndustries??[],allNationalityCountries:n,isDisabled:f,authParams:p,filesEndPoint:`${L.fileMicroServiceBaseUrl}`,isZeniUser:q(i)}},function(a,t){const{companyId:i,currentTenant:l,navigate:c,location:p}=t,{tenantEmailDomain:f}=l;return{onScheduleClick:e=>{let n=e.href;n.includes("http")||(n="https://".concat(n)),window.open(n,"_blank")},onSaveAll:()=>{a(K())},onAddressClick:e=>{const n=W(f,e),o=U(p.state?.pathnameStackToGoBack,p.pathname);c(n,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{a(J({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:n,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=n,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:b}=r,v={companyInfo:{...n,website:u!=""&&u!=null?N(u):void 0,meetingLink:y!=""&&y!=null?N(y):void 0,industry:n.industry.selectedOption,companyIndustryType:n.companyIndustryType?.selectedOption??void 0,companySubIndustry:n.companySubIndustry?.selectedOption??void 0,businessModel:n.businessModel.selectedOption??"",companySourceOfFunds:n.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:n.companySourceOfFundsDescription??void 0,countriesOfOperations:n.countriesOfOperations?.selectedOptions?.map(I=>I.length===2?I:M(I))??[],transactionVolume:n.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:n.transactionVolumeDescription??void 0,regulatedStatus:n.regulatedStatus??void 0,regulatedStatusDescription:n.regulatedStatusDescription??void 0,usNexus:n.usNexus??void 0,usNexusTypes:n.usNexusTypes?.selectedOptions??[],purposeOfAccount:n.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:n.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?$(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:b.selectedOptions.map(I=>parseInt(I)),fileId:r.fileIds[0]}};a(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{a(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{a(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{a(Q(e))},onCompanyOfficerUpdated:e=>{a(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{a(H({files:e}))},onDeleteFile:e=>{a(Z(e))},onEditFileName:(e,n)=>{a(Y(e,n.split(".")[0]))}}})(A);function de(){const a=w(),t=k(),i=x(),{tenantEmailDomain:l}=T(),[c,p]=g.useState(!1),[f,e]=g.useState(!1),n=O(s=>s.companyViewState.passportView.fetchState),o=O(s=>s.companyConfigState.fetchState),r=O(s=>h(s)),d=r.companyId??D.getSignedInUserTenant(l)?.companyId;if(D.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect(()=>{c||n!=="Not-Started"||d==null||(p(!0),t(B(d)))},[c,n,d,t]),g.useEffect(()=>{o==="Not-Started"&&t(R())},[o,t]);const u=s=>{e(s)},y=n==="Not-Started"||n==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&n==="Error"?m.jsx(F,{onGoHome:()=>a("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:V,onLoad:s=>s.trackPageLoaded(j.Event.companyPassport,C(i)?"Settings":"Company Passport")}),C(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:a,location:i,isLoading:y,currentTenant:r,isSettings:C(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-Hyy2O23M.js";import{a}from"./sentry-BTyPPF0t.js";import{h as D,u as v,g as u,N as w}from"./core-D1cXuJMi.js";import{Ji as A,eQ as O,fl as U,mS as _,fN as h,fk as j,eR as L,Jp as k}from"./zeni-epic-state-CbUjX_b3.js";import{u as F,z as f,L as g,D as $,o as H}from"./index-
|
|
1
|
+
import{j as C}from"./liveblocks-Hyy2O23M.js";import{a}from"./sentry-BTyPPF0t.js";import{h as D,u as v,g as u,N as w}from"./core-D1cXuJMi.js";import{Ji as A,eQ as O,fl as U,mS as _,fN as h,fk as j,eR as L,Jp as k}from"./zeni-epic-state-CbUjX_b3.js";import{u as F,z as f,L as g,D as $,o as H}from"./index-Cc13Ni3u.js";import{n as R}from"./mui-B2prtfNk.js";import{t as z}from"./getLocaleForTenant-BVN8Zhv2.js";import{g as Q,Q as J}from"./QBOConnectionScreen-BmMKTrMs.js";import"./recharts-CrZf7bKF.js";import"./analytics-BE9oUBzD.js";import"./plaid-4w70Yh4I.js";import"./dnd-DbPPTppj.js";import"./stripe-DMRn4zHo.js";import"./lottie-qu8VyEpw.js";import"./lexical-Du70nM1B.js";import"./pdf-Cvwxd6W6.js";import"./utils-C_-saZ2j.js";import"./empty-CfqAKA3M.js";import"./pdf-lib-D1w2Ub95.js";import"./index-n6IrYjfy.js";import"./url-CsQlFR2d.js";import"./index-3aBFjHPN.js";import"./decodeURIComponentSafe-Did0aZyt.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="d55d33af-269d-4d24-96da-fe8aad705190",t._sentryDebugIdIdentifier="sentry-dbid-d55d33af-269d-4d24-96da-fe8aad705190")}catch{}})();const P=R.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex: 1 1 auto;
|
|
4
4
|
flex-direction: row;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-Hyy2O23M.js";import{z as a}from"./index-
|
|
1
|
+
import{j as i}from"./liveblocks-Hyy2O23M.js";import{z as a}from"./index-Cc13Ni3u.js";import{g as n}from"./QBOConnectionScreen-BmMKTrMs.js";import"./sentry-BTyPPF0t.js";import{u as p,N as s}from"./core-D1cXuJMi.js";import"./zeni-epic-state-CbUjX_b3.js";import"./recharts-CrZf7bKF.js";import"./mui-B2prtfNk.js";import"./analytics-BE9oUBzD.js";import"./plaid-4w70Yh4I.js";import"./dnd-DbPPTppj.js";import"./stripe-DMRn4zHo.js";import"./lottie-qu8VyEpw.js";import"./lexical-Du70nM1B.js";import"./pdf-Cvwxd6W6.js";import"./utils-C_-saZ2j.js";import"./empty-CfqAKA3M.js";import"./pdf-lib-D1w2Ub95.js";import"./index-n6IrYjfy.js";import"./url-CsQlFR2d.js";import"./index-3aBFjHPN.js";import"./decodeURIComponentSafe-Did0aZyt.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="8d904e89-6b8e-4c86-980c-585a84d9d789",t._sentryDebugIdIdentifier="sentry-dbid-8d904e89-6b8e-4c86-980c-585a84d9d789")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),d=a.getSignedInUser()?.userId??"";if(f(o,r,e,d)===!0){const m=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(s,{to:m})}return i.jsx(s,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
|
package/dist/assets/{CustomerOnboardingRoutes-DJIij8xf.js → CustomerOnboardingRoutes-YAUJymHi.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-Hyy2O23M.js";import{t as Ke,A as Ce}from"./AddressScreen-
|
|
1
|
+
import{j as a}from"./liveblocks-Hyy2O23M.js";import{t as Ke,A as Ce}from"./AddressScreen-CnGdseVP.js";import $e from"./NotFoundScreen-BBj2rX_R.js";import{a as g}from"./sentry-BTyPPF0t.js";import{j as oe,u as se,h as ie,l as re,g as D,N as E,k as ce,i as ze,n as Me,o as z}from"./core-D1cXuJMi.js";import{n as de,c as le,z as B,C as ue,m as Qe,A as _,j as V,x as W,d as N,B as we,f as X,am as qe,K as Ze,an as ke,h as te,ao as He,ap as Ie,o as We,aq as Je,ar as Ee,as as Xe}from"./index-Cc13Ni3u.js";import{bn as Ye,eQ as ee,fd as et,eW as pe,eU as me,bv as tt,mQ as at,f9 as nt,bO as ot,je as ae,jh as ve,JO as st,bT as it,c2 as ge,sm as he,s7 as rt,Ki as Y,sn as _e,HG as ct,ki as Ue,Kj as Ve,Kk as dt,Kl as lt,Km as ut,jc as pt,jf as mt,s9 as Be,sl as gt,bE as Te,cv as ht,sz as xe,q9 as ft,pZ as yt,ka as St,fC as bt,fB as Ct,fA as kt,Kn as It,s1 as Et,sA as Tt,sD as xt,sG as Ot,sM as At,cU as Pt}from"./zeni-epic-state-CbUjX_b3.js";import{n as fe}from"./mui-B2prtfNk.js";import{g as Dt,h as Ft,q as ne}from"./QBOConnectionScreen-BmMKTrMs.js";import"./recharts-CrZf7bKF.js";import"./analytics-BE9oUBzD.js";import"./plaid-4w70Yh4I.js";import"./dnd-DbPPTppj.js";import"./stripe-DMRn4zHo.js";import"./lottie-qu8VyEpw.js";import"./lexical-Du70nM1B.js";import"./pdf-Cvwxd6W6.js";import"./utils-C_-saZ2j.js";import"./empty-CfqAKA3M.js";import"./pdf-lib-D1w2Ub95.js";import"./index-n6IrYjfy.js";import"./url-CsQlFR2d.js";import"./index-3aBFjHPN.js";import"./decodeURIComponentSafe-Did0aZyt.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="76c90c0a-afee-4cd5-8b4a-9ad21614f205",t._sentryDebugIdIdentifier="sentry-dbid-76c90c0a-afee-4cd5-8b4a-9ad21614f205")}catch{}})();const jt=ce(function(t,o){const s=[];o.isApAgingFeatureEnabled===!1&&s.push("accounts_payable_aging"),o.isArAgingFeatureEnabled===!1&&s.push("accounts_receivable_aging"),o.shouldFetchZeniAccountsPromoCard===!1&&s.push("zeni_accounts_promo_card"),o.shouldFetchRewardsPlanCard===!1&&s.push("rewards_card"),o.isExpenseAutomationEnabledForUser===!1&&s.push("expense_automation_card");const u=nt(t,s,o.signedInUser,o.isExpenseAutomationFeatureEnabledV2,o.isExpenseAutomationEnabledForUser,o.isTreasuryEnabled);return{dashboardFetchState:ot(u.reportsInOrder.map(d=>({fetchState:d.fetchState,error:d.error}))).fetchState}},function(t,o){const{themeState:s,navigate:u,location:d}=o;return{onZeniLogoClick:()=>{s.toggle()},onDashboardFetchDone:()=>{const r=V(d.state?.pathnameStackToGoBack,d.pathname);u("../../dashboard",{state:{pathnameStackToGoBack:r,message:"activation"}})}}})(qe),wt=()=>{const t=oe(),o=se(),s=ie(),u=de(),[d,r]=g.useState(!1),[p,S]=g.useState(!1),{tenantEmailDomain:e}=re(),n=le(),i=B.getSignedInUser(),h=Ye(i),{useFeatureGate:m}=ue(),I=Qe(),{isFeatureEnabled:T}=m(_.isApAgingFeatureEnabled),{isFeatureEnabled:x}=m(_.isArAgingFeatureEnabled),{isFeatureEnabled:k}=m(_.isDepositAccountsFeatureEnabled),{isFeatureEnabled:f}=m(_.isReferralFeatureEnabled),{isFeatureEnabled:U}=m(_.isExpenseAutomationEnabled),{isFeatureEnabled:C}=m(_.isExpenseAutomationEnabledV2),{isFeatureEnabled:F}=m(_.isDebitCardFeatureEnabled),K=C||U&&h,c=D(l=>ee(l)),{isFeatureEnabled:L}=m(_.isTreasuryEnabled),j=c.company!=null&&et(c.company),G=L&&j,O=D(l=>l.onboardingCustomerViewState.fetchState),b=c.excludedResources,R=c.companyId??B.getSignedInUserTenant(e)?.companyId;if(i==null)throw Error("Can't access onboarding flow without signing in...");const w=pe(F,c),A=me(c),P=[],q=b?.resources?.find(l=>l.resource==="/reports/top_expenses")==null,$=b?.resources?.find(l=>l.resource==="/reports/task_card")==null,M=c?.userRole!=null&&tt(c?.userRole),v=b?.resources?.find(l=>l.resource==="/bills")==null&&!M,Q=b?.resources?.find(l=>l.resource==="/reimbursements")==null;if(q===!1&&P.push("top_expenses"),$===!1&&P.push("task_card"),v===!1&&P.push("bill_pay_card","bill_pay_promo_card"),Q===!1&&P.push("reimbursement_card","reimbursement_promo_card"),k===!1&&P.push("zeni_accounts_promo_card"),f===!1&&P.push("rewards_card"),g.useEffect(()=>{O!=="Completed"||d||w||A||(r(!0),s(at(i.userId,R,c.tenantId,!0,!1,P)))},[d,O,w,A,i,c.tenantId,s]),g.useEffect(()=>{(w||A)&&setTimeout(()=>{S(!0)},5e3)},[w,A]),O!=="Completed")return a.jsx(E,{to:"../"});if(O==="Completed"&&p){const l=V(o.state?.pathnameStackToGoBack,o.pathname);if(w)return a.jsx(E,{to:"../../checking",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}});if(A)return a.jsx(E,{to:"../../cards",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}})}return n?.loggedInUserRoleMap!=null?a.jsxs(a.Fragment,{children:[a.jsx(W,{analytics:N,onLoad:l=>(Z=>Z.trackPageLoaded(X.Event.onboardingDashboardActivation))(l)}),a.jsx(jt,{navigate:t,location:o,themeState:u,signedInUser:i,isApAgingFeatureEnabled:T,isArAgingFeatureEnabled:x,shouldFetchZeniAccountsPromoCard:k,shouldFetchRewardsPlanCard:f,isExpenseAutomationEnabledForUser:K,isExpenseAutomationFeatureEnabledV2:C,isTreasuryEnabled:G,loggedInUserRoleMap:n?.loggedInUserRoleMap})]}):a.jsx(we,{fetchState:"In-Progress",style:{backgroundColor:I.colors.grey5}})},Oe=fe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
background-color: ${t=>t.theme.colors.grey4};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-Hyy2O23M.js";import{l as z,g as S,u as q,h as $,j as Z,k as H,s as Ka,n as st,o as w}from"./core-D1cXuJMi.js";import{eQ as j,KD as Ve,bE as Gt,bq as he,LQ as qa,i2 as Za,LR as wt,LS as Qa,i5 as rt,LT as Le,LU as Ha,ia as Xa,LV as Dt,LW as Wa,ie as it,LX as Ue,LY as Ja,cl as lt,LZ as en,L_ as tn,KX as an,j8 as nn,L$ as on,bn as Ee,M0 as Nt,Kr as ae,bc as $t,jm as zt,m_ as Kt,j5 as qt,Kt as ne,Ks as Q,f5 as sn,eN as rn,fn as cn,M1 as ln,M2 as dn,M3 as Zt,M4 as _e,ug as Ie,uh as Te,uE as fe,uy as oe,ul as xe,M5 as un,M6 as mn,M7 as pn,M8 as Qt,M9 as ke,Ma as hn,dE as Ge,qJ as Ht,Mb as fn,Mc as gn,Md as bn,Me as dt,JQ as ut,jC as ge,uM as mt,qR as Cn,Mf as _n,ui as Ft,qM as me,qI as Xt,Mg as ie,Mh as kn,Mi as pt,JP as ht,sQ as Wt,Mj as Sn,Mk as yn,Ml as An,Mm as ft,t1 as vn,Mn as En,uk as Pt,sP as Jt,Mo as ce,Mp as In,bv as ea,uQ as ta,Mq as Tn,Mr as xn,Ms as wn,Mt as gt,uL as Dn,Mu as Fn,uj as Ot,uP as aa,Mv as le,Mw as Pn,Mx as On,My as na,jr as oa,mX as sa,jw as ra,mV as ia,mU as ca,mT as la,sc as Mn,fd as Rn,cO as Bn,cP as jn,mQ as Ln,f9 as Un,n5 as Yn,DU as Mt,Mz as Vn,MA as Gn,MB as Nn,MC as $n,b5 as bt,f0 as zn,gM as Kn,fE as qn,m$ as Zn,i_ as Qn,mY as Hn,mW as Xn,eW as Wn,eU as Jn}from"./zeni-epic-state-CbUjX_b3.js";import{z as R,X,j as D,d as I,D as K,aR as eo,x as we,aS as da,f as G,aT as to,c as De,aU as ua,C as Fe,A as B,m as ao,aV as no,aW as oo,R as ma,K as so,a as pa,a1 as ro,aK as ha,aX as io,aY as co,W as lo,aZ as uo,a_ as mo,an as po,p as ho,U as fo,a$ as go,b0 as ye}from"./index-Dr8ZNfvJ.js";import{n as Ct}from"./mui-B2prtfNk.js";import{a as C}from"./sentry-BTyPPF0t.js";import{w as fa}from"./withTransactionSidePanel-DcRhIgzv.js";import{c as ga,t as be,f as se,a as _t,v as bo}from"./routePaths-Dx_nnKk7.js";import{u as W}from"./useAskAiCfoHostNavButtonProps-BxShjiqA.js";import{c as Pe,b as Co,u as _o}from"./useFetchSuggestedQuestionsWhenReady-DWTRn_Lu.js";import ve from"./NotFoundScreen-BHqd2QHQ.js";import{u as ko}from"./useInitialThreadRequest-WHG7gHcH.js";import{t as ba}from"./analyticsHelper-BEEOw1D6.js";import{C as So}from"./CompanyPassportScreen-BLW99zDL.js";import{F as yo}from"./FeaturePreviewScreen-DtxT93sy.js";import{R as Ao}from"./ReferralListScreen-DMiRiZiL.js";import"./recharts-CrZf7bKF.js";import"./analytics-BE9oUBzD.js";import"./plaid-4w70Yh4I.js";import"./dnd-DbPPTppj.js";import"./stripe-DMRn4zHo.js";import"./lottie-qu8VyEpw.js";import"./lexical-Du70nM1B.js";import"./pdf-Cvwxd6W6.js";import"./utils-C_-saZ2j.js";import"./TransactionDetailScreen-DWs7y2E7.js";import"./decodeURIComponentSafe-Did0aZyt.js";import"./MobileAppDrawer-D8M7VXe9.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="73a4bee5-23f3-4a3b-bbf2-234280a5dba2",e._sentryDebugIdIdentifier="sentry-dbid-73a4bee5-23f3-4a3b-bbf2-234280a5dba2")}catch{}})();const vo=fa(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=z(),s=R.getSignedInUser(),i=S(v=>v.tenantState.currentTenantId),d=S(v=>j(v)),{tenantEmailDomain:p}=z(),_=q(),b=d?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=C.useMemo(()=>({authParams:u,companyName:b,downloadEndPoint:`${X}/agingDetailedReport`,timezone:Ve()}),[]),m=C.useMemo(()=>r!=null?Gt(r):he(),[r]),h=$(),f=Z(),k=S(v=>qa(v,m,o)),y=C.useCallback(()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&h(Za(o,m))},[m]),g=C.useCallback(()=>{f("../../",{relative:"path"})},[]),A=C.useCallback((v,L)=>{h(wt({sortKey:v,sortOrder:L}))},[]),P=C.useCallback(v=>{h(wt({downloadState:v}))},[]),U=C.useCallback(v=>{if(e)e(v.transactionId,v.transactionType);else if(p!=null){const L=ga({id:v.transactionId,type:v.transactionType},p);f(L);const de=D(_.state?.pathnameStackToGoBack,_.pathname);f(L,{state:{pathnameStackToGoBack:de}})}},[p,e]),T=C.useCallback(()=>{k.vendor!=null&&I.trackApAgingDetail("AP Aging",m.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)},[k.vendor,m]);return C.useEffect(()=>{y()},[]),C.useEffect(()=>{k.fetchState==="Completed"&&T()},[T,k.fetchState]),l.jsx(eo,{apAgingDetail:k,downloadParams:c,reportDate:m,analytics:I,onTransactionClick:U,onReload:y,onBackClick:g,onColumnSortConfigChanged:A,updateDownloadStateHandler:P,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Eo=()=>{const e=$(),a=Z(),t=S(A=>Qa(A)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=W({mobileExploreReferrer:"AP Aging"});Pe({isDataReady:t.fetchState==="Completed"});const r=R.getSignedInUser(),s=S(A=>A.tenantState.currentTenantId),i=S(A=>j(A)),d=i?.companyName??"",p={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},_=C.useMemo(()=>({authParams:p,companyName:d,downloadEndPoint:`${X}/agingReport`,timezone:Ve()}),[]),b=t.apAgingUIState.selectedDate??he(),u=C.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(rt(b))},[]);C.useEffect(()=>{u()},[]);const c=C.useCallback(()=>{a("../",{relative:"path"})},[]),m=C.useCallback(A=>{e(Le({searchString:A}))},[]),h=C.useCallback((A,P)=>{e(Le({sortKey:P,sortOrder:A}))},[]),f=C.useCallback(A=>{a(`./${A}/${b.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[b]),k=C.useCallback(A=>{e(Le({downloadState:A}))},[]),y=C.useCallback((A,P)=>{},[]),g=C.useCallback((A,P)=>{e(Le({selectedDate:A,agingDateSelectionType:P})),e(rt(A))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(we,{analytics:I,onLoad:A=>A.trackPageLoaded(G.Event.agingReport,"AP Aging")}):null,l.jsx(da,{uiState:t.apAgingUIState,report:t,downloadParams:_,analytics:I,onReloadReport:u,onBackClick:c,onSearchTextChange:m,onSortOrderChange:h,onEntityNameClick:f,updateDownloadStateHandler:k,onSelectedDateChanged:g,onNodeCollapseToggled:y,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Io=fa(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=z(),s=R.getSignedInUser(),i=S(T=>j(T)),{tenantEmailDomain:d}=z(),p=q(),_=i.companyName,b={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=C.useMemo(()=>({authParams:b,companyName:_,downloadEndPoint:`${X}/agingDetailedReport`,timezone:Ve()}),[]),c=C.useMemo(()=>r!=null?Gt(r):he(),[r]),m=$(),h=Z(),f=S(T=>Ha(T,c,o)),k=C.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&m(Xa(o,c))},[c]),y=C.useCallback(()=>{h("../../",{relative:"path"})},[]),g=C.useCallback((T,v)=>{m(Dt({sortKey:T,sortOrder:v}))},[]),A=C.useCallback(T=>{m(Dt({downloadState:T}))},[]),P=C.useCallback(T=>{if(e)e(T.transactionId,T.transactionType);else if(d!=null){const v=ga({id:T.transactionId,type:T.transactionType},d);h(v);const L=D(p.state?.pathnameStackToGoBack,p.pathname);h(v,{state:{pathnameStackToGoBack:L}})}},[d,e]),U=C.useCallback(()=>{f.customer!=null&&I.trackArAgingDetail("AR Aging",c.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.customer.id,f.customer.name)},[f.customer,c]);return C.useEffect(()=>{k()},[]),C.useEffect(()=>{f.fetchState==="Completed"&&U()},[f.fetchState,U]),l.jsx(to,{arAgingDetail:f,downloadParams:u,reportDate:c,analytics:I,onTransactionClick:P,onReload:k,onBackClick:y,onColumnSortConfigChanged:g,updateDownloadStateHandler:A,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),To=()=>{const e=$(),a=Z(),t=S(g=>Wa(g)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=W({mobileExploreReferrer:"AR Aging"});Pe({isDataReady:t.fetchState==="Completed"});const r=R.getSignedInUser(),s=S(g=>j(g)),i=s.companyName,d={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},p=C.useMemo(()=>({authParams:d,companyName:i,downloadEndPoint:`${X}/agingReport`,timezone:Ve()}),[]),_=t.arAgingUIState.selectedDate??he(),b=C.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(it(_))},[]);C.useEffect(()=>{b()},[]);const u=C.useCallback(()=>{a("../",{relative:"path"})},[]),c=C.useCallback(g=>{e(Ue({searchString:g}))},[]),m=C.useCallback((g,A)=>{e(Ue({sortKey:A,sortOrder:g}))},[]),h=C.useCallback(g=>{a(`./${g}/${_.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[_]),f=C.useCallback(g=>{e(Ue({downloadState:g}))},[]),k=C.useCallback((g,A)=>{e(Ue({selectedDate:g,agingDateSelectionType:A})),e(it(g))},[]),y=C.useCallback((g,A)=>{e(Ja({nodeId:g,isCollapsed:A}))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(we,{analytics:I,onLoad:g=>g.trackPageLoaded(G.Event.agingReport,"AR Aging")}):null,l.jsx(da,{uiState:t.arAgingUIState,report:t,downloadParams:p,analytics:I,onReloadReport:b,onBackClick:u,onSearchTextChange:c,onSortOrderChange:m,onEntityNameClick:h,updateDownloadStateHandler:f,onSelectedDateChanged:k,onNodeCollapseToggled:y,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ca=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function _a(e,a){const t=an(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=be(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(nn(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?I.trackZeniAccountsCashBalancePromoClicked("Move Money"):(I.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else I.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const xo=H(function(e){const a=en(e).accountsInOrder.map((n,o)=>Ca(n,o)),t=tn(e);return{sectionTitle:K.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:I}},_a)(ua),wo=H(function(e){const a=on(e).accountsInOrder.map((o,r)=>Ca(o,r)),t=R.getSignedInUser(),n=Ee(t);return{sectionTitle:K.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:I}},_a)(ua);function Do(){const e=Z(),a=q(),{tenantEmailDomain:t}=z(),n=De(),o=S(s=>j(s).company?.companyInfo.firstMonthOfFY??1),r=lt(n?.loggedInUserRoleMap);return S(s=>s.cashBalanceState.fetchState)==="Error"?l.jsx(ve,{}):l.jsx(xo,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function Fo(){const e=Z(),a=q(),{tenantEmailDomain:t}=z(),n=De(),o=lt(n?.loggedInUserRoleMap),r=S(s=>j(s).company?.companyInfo.firstMonthOfFY??1);return S(s=>s.cardBalanceState.fetchState)==="Error"?l.jsx(ve,{}):l.jsx(wo,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const Po=Ct.div`
|
|
1
|
+
import{j as l}from"./liveblocks-Hyy2O23M.js";import{l as z,g as S,u as q,h as $,j as Z,k as H,s as Ka,n as st,o as w}from"./core-D1cXuJMi.js";import{eQ as j,KD as Ve,bE as Gt,bq as he,LQ as qa,i2 as Za,LR as wt,LS as Qa,i5 as rt,LT as Le,LU as Ha,ia as Xa,LV as Dt,LW as Wa,ie as it,LX as Ue,LY as Ja,cl as lt,LZ as en,L_ as tn,KX as an,j8 as nn,L$ as on,bn as Ee,M0 as Nt,Kr as ae,bc as $t,jm as zt,m_ as Kt,j5 as qt,Kt as ne,Ks as Q,f5 as sn,eN as rn,fn as cn,M1 as ln,M2 as dn,M3 as Zt,M4 as _e,ug as Ie,uh as Te,uE as fe,uy as oe,ul as xe,M5 as un,M6 as mn,M7 as pn,M8 as Qt,M9 as ke,Ma as hn,dE as Ge,qJ as Ht,Mb as fn,Mc as gn,Md as bn,Me as dt,JQ as ut,jC as ge,uM as mt,qR as Cn,Mf as _n,ui as Ft,qM as me,qI as Xt,Mg as ie,Mh as kn,Mi as pt,JP as ht,sQ as Wt,Mj as Sn,Mk as yn,Ml as An,Mm as ft,t1 as vn,Mn as En,uk as Pt,sP as Jt,Mo as ce,Mp as In,bv as ea,uQ as ta,Mq as Tn,Mr as xn,Ms as wn,Mt as gt,uL as Dn,Mu as Fn,uj as Ot,uP as aa,Mv as le,Mw as Pn,Mx as On,My as na,jr as oa,mX as sa,jw as ra,mV as ia,mU as ca,mT as la,sc as Mn,fd as Rn,cO as Bn,cP as jn,mQ as Ln,f9 as Un,n5 as Yn,DU as Mt,Mz as Vn,MA as Gn,MB as Nn,MC as $n,b5 as bt,f0 as zn,gM as Kn,fE as qn,m$ as Zn,i_ as Qn,mY as Hn,mW as Xn,eW as Wn,eU as Jn}from"./zeni-epic-state-CbUjX_b3.js";import{z as R,X,j as D,d as I,D as K,aR as eo,x as we,aS as da,f as G,aT as to,c as De,aU as ua,C as Fe,A as B,m as ao,aV as no,aW as oo,R as ma,K as so,a as pa,a1 as ro,aK as ha,aX as io,aY as co,W as lo,aZ as uo,a_ as mo,an as po,p as ho,U as fo,a$ as go,b0 as ye}from"./index-Cc13Ni3u.js";import{n as Ct}from"./mui-B2prtfNk.js";import{a as C}from"./sentry-BTyPPF0t.js";import{w as fa}from"./withTransactionSidePanel-BLrf1QAn.js";import{c as ga,t as be,f as se,a as _t,v as bo}from"./routePaths-CYWO_4aN.js";import{u as W}from"./useAskAiCfoHostNavButtonProps-CQ5wXGV2.js";import{c as Pe,b as Co,u as _o}from"./useFetchSuggestedQuestionsWhenReady-C8wykHii.js";import ve from"./NotFoundScreen-BBj2rX_R.js";import{u as ko}from"./useInitialThreadRequest-DTnvA37x.js";import{t as ba}from"./analyticsHelper-ClnSplSs.js";import{C as So}from"./CompanyPassportScreen-ByZS8ECt.js";import{F as yo}from"./FeaturePreviewScreen-DKtIkE5j.js";import{R as Ao}from"./ReferralListScreen-C51C5goG.js";import"./recharts-CrZf7bKF.js";import"./analytics-BE9oUBzD.js";import"./plaid-4w70Yh4I.js";import"./dnd-DbPPTppj.js";import"./stripe-DMRn4zHo.js";import"./lottie-qu8VyEpw.js";import"./lexical-Du70nM1B.js";import"./pdf-Cvwxd6W6.js";import"./utils-C_-saZ2j.js";import"./TransactionDetailScreen-Ci7wUJ8m.js";import"./decodeURIComponentSafe-Did0aZyt.js";import"./MobileAppDrawer-DrIh5jJg.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="73a4bee5-23f3-4a3b-bbf2-234280a5dba2",e._sentryDebugIdIdentifier="sentry-dbid-73a4bee5-23f3-4a3b-bbf2-234280a5dba2")}catch{}})();const vo=fa(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=z(),s=R.getSignedInUser(),i=S(v=>v.tenantState.currentTenantId),d=S(v=>j(v)),{tenantEmailDomain:p}=z(),_=q(),b=d?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=C.useMemo(()=>({authParams:u,companyName:b,downloadEndPoint:`${X}/agingDetailedReport`,timezone:Ve()}),[]),m=C.useMemo(()=>r!=null?Gt(r):he(),[r]),h=$(),f=Z(),k=S(v=>qa(v,m,o)),y=C.useCallback(()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&h(Za(o,m))},[m]),g=C.useCallback(()=>{f("../../",{relative:"path"})},[]),A=C.useCallback((v,L)=>{h(wt({sortKey:v,sortOrder:L}))},[]),P=C.useCallback(v=>{h(wt({downloadState:v}))},[]),U=C.useCallback(v=>{if(e)e(v.transactionId,v.transactionType);else if(p!=null){const L=ga({id:v.transactionId,type:v.transactionType},p);f(L);const de=D(_.state?.pathnameStackToGoBack,_.pathname);f(L,{state:{pathnameStackToGoBack:de}})}},[p,e]),T=C.useCallback(()=>{k.vendor!=null&&I.trackApAgingDetail("AP Aging",m.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)},[k.vendor,m]);return C.useEffect(()=>{y()},[]),C.useEffect(()=>{k.fetchState==="Completed"&&T()},[T,k.fetchState]),l.jsx(eo,{apAgingDetail:k,downloadParams:c,reportDate:m,analytics:I,onTransactionClick:U,onReload:y,onBackClick:g,onColumnSortConfigChanged:A,updateDownloadStateHandler:P,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Eo=()=>{const e=$(),a=Z(),t=S(A=>Qa(A)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=W({mobileExploreReferrer:"AP Aging"});Pe({isDataReady:t.fetchState==="Completed"});const r=R.getSignedInUser(),s=S(A=>A.tenantState.currentTenantId),i=S(A=>j(A)),d=i?.companyName??"",p={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},_=C.useMemo(()=>({authParams:p,companyName:d,downloadEndPoint:`${X}/agingReport`,timezone:Ve()}),[]),b=t.apAgingUIState.selectedDate??he(),u=C.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(rt(b))},[]);C.useEffect(()=>{u()},[]);const c=C.useCallback(()=>{a("../",{relative:"path"})},[]),m=C.useCallback(A=>{e(Le({searchString:A}))},[]),h=C.useCallback((A,P)=>{e(Le({sortKey:P,sortOrder:A}))},[]),f=C.useCallback(A=>{a(`./${A}/${b.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[b]),k=C.useCallback(A=>{e(Le({downloadState:A}))},[]),y=C.useCallback((A,P)=>{},[]),g=C.useCallback((A,P)=>{e(Le({selectedDate:A,agingDateSelectionType:P})),e(rt(A))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(we,{analytics:I,onLoad:A=>A.trackPageLoaded(G.Event.agingReport,"AP Aging")}):null,l.jsx(da,{uiState:t.apAgingUIState,report:t,downloadParams:_,analytics:I,onReloadReport:u,onBackClick:c,onSearchTextChange:m,onSortOrderChange:h,onEntityNameClick:f,updateDownloadStateHandler:k,onSelectedDateChanged:g,onNodeCollapseToggled:y,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Io=fa(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=z(),s=R.getSignedInUser(),i=S(T=>j(T)),{tenantEmailDomain:d}=z(),p=q(),_=i.companyName,b={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=C.useMemo(()=>({authParams:b,companyName:_,downloadEndPoint:`${X}/agingDetailedReport`,timezone:Ve()}),[]),c=C.useMemo(()=>r!=null?Gt(r):he(),[r]),m=$(),h=Z(),f=S(T=>Ha(T,c,o)),k=C.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&m(Xa(o,c))},[c]),y=C.useCallback(()=>{h("../../",{relative:"path"})},[]),g=C.useCallback((T,v)=>{m(Dt({sortKey:T,sortOrder:v}))},[]),A=C.useCallback(T=>{m(Dt({downloadState:T}))},[]),P=C.useCallback(T=>{if(e)e(T.transactionId,T.transactionType);else if(d!=null){const v=ga({id:T.transactionId,type:T.transactionType},d);h(v);const L=D(p.state?.pathnameStackToGoBack,p.pathname);h(v,{state:{pathnameStackToGoBack:L}})}},[d,e]),U=C.useCallback(()=>{f.customer!=null&&I.trackArAgingDetail("AR Aging",c.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.customer.id,f.customer.name)},[f.customer,c]);return C.useEffect(()=>{k()},[]),C.useEffect(()=>{f.fetchState==="Completed"&&U()},[f.fetchState,U]),l.jsx(to,{arAgingDetail:f,downloadParams:u,reportDate:c,analytics:I,onTransactionClick:P,onReload:k,onBackClick:y,onColumnSortConfigChanged:g,updateDownloadStateHandler:A,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),To=()=>{const e=$(),a=Z(),t=S(g=>Wa(g)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=W({mobileExploreReferrer:"AR Aging"});Pe({isDataReady:t.fetchState==="Completed"});const r=R.getSignedInUser(),s=S(g=>j(g)),i=s.companyName,d={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},p=C.useMemo(()=>({authParams:d,companyName:i,downloadEndPoint:`${X}/agingReport`,timezone:Ve()}),[]),_=t.arAgingUIState.selectedDate??he(),b=C.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(it(_))},[]);C.useEffect(()=>{b()},[]);const u=C.useCallback(()=>{a("../",{relative:"path"})},[]),c=C.useCallback(g=>{e(Ue({searchString:g}))},[]),m=C.useCallback((g,A)=>{e(Ue({sortKey:A,sortOrder:g}))},[]),h=C.useCallback(g=>{a(`./${g}/${_.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[_]),f=C.useCallback(g=>{e(Ue({downloadState:g}))},[]),k=C.useCallback((g,A)=>{e(Ue({selectedDate:g,agingDateSelectionType:A})),e(it(g))},[]),y=C.useCallback((g,A)=>{e(Ja({nodeId:g,isCollapsed:A}))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(we,{analytics:I,onLoad:g=>g.trackPageLoaded(G.Event.agingReport,"AR Aging")}):null,l.jsx(da,{uiState:t.arAgingUIState,report:t,downloadParams:p,analytics:I,onReloadReport:b,onBackClick:u,onSearchTextChange:c,onSortOrderChange:m,onEntityNameClick:h,updateDownloadStateHandler:f,onSelectedDateChanged:k,onNodeCollapseToggled:y,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ca=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function _a(e,a){const t=an(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=be(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(nn(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?I.trackZeniAccountsCashBalancePromoClicked("Move Money"):(I.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else I.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const xo=H(function(e){const a=en(e).accountsInOrder.map((n,o)=>Ca(n,o)),t=tn(e);return{sectionTitle:K.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:I}},_a)(ua),wo=H(function(e){const a=on(e).accountsInOrder.map((o,r)=>Ca(o,r)),t=R.getSignedInUser(),n=Ee(t);return{sectionTitle:K.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:I}},_a)(ua);function Do(){const e=Z(),a=q(),{tenantEmailDomain:t}=z(),n=De(),o=S(s=>j(s).company?.companyInfo.firstMonthOfFY??1),r=lt(n?.loggedInUserRoleMap);return S(s=>s.cashBalanceState.fetchState)==="Error"?l.jsx(ve,{}):l.jsx(xo,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function Fo(){const e=Z(),a=q(),{tenantEmailDomain:t}=z(),n=De(),o=lt(n?.loggedInUserRoleMap),r=S(s=>j(s).company?.companyInfo.firstMonthOfFY??1);return S(s=>s.cardBalanceState.fetchState)==="Error"?l.jsx(ve,{}):l.jsx(wo,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const Po=Ct.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex: 1 1 auto;
|
|
4
4
|
min-height: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as v}from"./liveblocks-Hyy2O23M.js";import{a as u}from"./sentry-BTyPPF0t.js";import{h as y,g as b,k as w,u as A,N as k}from"./core-D1cXuJMi.js";import{Ji as N,eQ as _,fl as U,Jj as L,mS as R,Jk as z}from"./zeni-epic-state-CbUjX_b3.js";import{u as j,z as f,L as T,t as I,D as O,b as $}from"./index-
|
|
1
|
+
import{j as v}from"./liveblocks-Hyy2O23M.js";import{a as u}from"./sentry-BTyPPF0t.js";import{h as y,g as b,k as w,u as A,N as k}from"./core-D1cXuJMi.js";import{Ji as N,eQ as _,fl as U,Jj as L,mS as R,Jk as z}from"./zeni-epic-state-CbUjX_b3.js";import{u as j,z as f,L as T,t as I,D as O,b as $}from"./index-Cc13Ni3u.js";import"./mui-B2prtfNk.js";import{t as P}from"./getLocaleForTenant-BVN8Zhv2.js";import"./recharts-CrZf7bKF.js";import"./analytics-BE9oUBzD.js";import"./plaid-4w70Yh4I.js";import"./dnd-DbPPTppj.js";import"./stripe-DMRn4zHo.js";import"./lottie-qu8VyEpw.js";import"./lexical-Du70nM1B.js";import"./pdf-Cvwxd6W6.js";import"./utils-C_-saZ2j.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="0c4bc90e-ecb8-4a19-91ce-6d85866e1c12",t._sentryDebugIdIdentifier="sentry-dbid-0c4bc90e-ecb8-4a19-91ce-6d85866e1c12")}catch{}})();const Q=w(function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}})(function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map(l=>l.tenantEmailDomain),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce((l,F)=>l||i.split("/").find(D=>D===F)!=null,!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(k,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}});function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b(e=>N(e)),n=b(e=>e.tenantState.fetchState),i=b(e=>e.tenantState.error),a=b(e=>e.tenantState.activeTenantFetchState.fetchState),c=b(e=>_(e)),d=f.getSignedInUser();return u.useLayoutEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)},[a,n]),u.useEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(U(d.userId,e))))},[n,a,d,t]),u.useEffect(()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))},[n,a,i,d,t]),u.useEffect(()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())},[m.tenantsCoreDetailsInOrder,n]),u.useEffect(()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())},[n,a,c]),v.jsx(Q,{})}const J=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of J)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
|
package/dist/assets/{DomesticWireDetailScreen-CQO9Kbrv.js → DomesticWireDetailScreen-U7m2J1ru.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-Hyy2O23M.js";import{j as w,u as C,g as h,k as A,l as P}from"./core-D1cXuJMi.js";import{Nk as k,Nr as K,fC as q,fB as M,fA as Q,iz as W,Ks as J,q0 as L,eQ as V,MS as D,ix as T,Nl as S,Nu as F,iv as G,iS as N}from"./zeni-epic-state-CbUjX_b3.js";import{bn as X,K as j,C as R,z as U,m as z,p,A as v,B as O,bo as Y,o as Z,bp as ee,j as te}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-Hyy2O23M.js";import{j as w,u as C,g as h,k as A,l as P}from"./core-D1cXuJMi.js";import{Nk as k,Nr as K,fC as q,fB as M,fA as Q,iz as W,Ks as J,q0 as L,eQ as V,MS as D,ix as T,Nl as S,Nu as F,iv as G,iS as N}from"./zeni-epic-state-CbUjX_b3.js";import{bn as X,K as j,C as R,z as U,m as z,p,A as v,B as O,bo as Y,o as Z,bp as ee,j as te}from"./index-Cc13Ni3u.js";import{n as H}from"./mui-B2prtfNk.js";import"./sentry-BTyPPF0t.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="bb419e81-dcb4-45b7-844e-b6db493b6a2d",e._sentryDebugIdIdentifier="sentry-dbid-bb419e81-dcb4-45b7-844e-b6db493b6a2d")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(W(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(J("common")),n!=null&&e(L(n))},onGetOtp:n=>{e(Q(n,"BillPayVendor"))},onResendOtp:n=>{e(M(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(q(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(K(n,a,o))}}})(X);function _({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(d=>k(d,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=H.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-Hyy2O23M.js";import{K as c,E as l,m as f}from"./index-
|
|
1
|
+
import{j as i}from"./liveblocks-Hyy2O23M.js";import{K as c,E as l,m as f}from"./index-Cc13Ni3u.js";import{D as b}from"./mui-B2prtfNk.js";import"./sentry-BTyPPF0t.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="b4f83c93-6b8c-4125-b836-c9db747f101c",e._sentryDebugIdIdentifier="sentry-dbid-b4f83c93-6b8c-4125-b836-c9db747f101c")}catch{}})();const p={drawerLeftMargin:new l(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:s}=e,n=c(),a=o?.valuePx(n)??p.drawerLeftMargin.valuePx(n),d=f();return i.jsx(b,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${a})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:s,children:t})}export{m as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Hyy2O23M.js";import{a as d}from"./sentry-BTyPPF0t.js";import{j as B,h as G,u as F,l as q,g as l,N as z,k as K,n as L,o as N}from"./core-D1cXuJMi.js";import{Lz as O,eQ as _,KY as Y,kC as H,Hy as b,LE as M,Kr as R,jC as W,Hz as S,L1 as $,L2 as Q,Kt as V,Ks as J}from"./zeni-epic-state-CbUjX_b3.js";import{aO as U,d as X,p as Z,j as tt}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-Hyy2O23M.js";import{a as d}from"./sentry-BTyPPF0t.js";import{j as B,h as G,u as F,l as q,g as l,N as z,k as K,n as L,o as N}from"./core-D1cXuJMi.js";import{Lz as O,eQ as _,KY as Y,kC as H,Hy as b,LE as M,Kr as R,jC as W,Hz as S,L1 as $,L2 as Q,Kt as V,Ks as J}from"./zeni-epic-state-CbUjX_b3.js";import{aO as U,d as X,p as Z,j as tt}from"./index-Cc13Ni3u.js";import"./mui-B2prtfNk.js";import{d as k}from"./decodeURIComponentSafe-Did0aZyt.js";import{w as et}from"./withTransactionSidePanel-BLrf1QAn.js";import{f as at,c as nt}from"./routePaths-CYWO_4aN.js";import"./recharts-CrZf7bKF.js";import"./analytics-BE9oUBzD.js";import"./plaid-4w70Yh4I.js";import"./dnd-DbPPTppj.js";import"./stripe-DMRn4zHo.js";import"./lottie-qu8VyEpw.js";import"./lexical-Du70nM1B.js";import"./pdf-Cvwxd6W6.js";import"./utils-C_-saZ2j.js";import"./useAskAiCfoHostNavButtonProps-CQ5wXGV2.js";import"./useFetchSuggestedQuestionsWhenReady-C8wykHii.js";import"./TransactionDetailScreen-Ci7wUJ8m.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="a56d188e-0204-4aae-be4f-810e03ba92cb",a._sentryDebugIdIdentifier="sentry-dbid-a56d188e-0204-4aae-be4f-810e03ba92cb")}catch{}})();const ot=K(function(a,t){const e=t.entity,o=M(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:R(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:W(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(V({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(J("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a($()),a(Q()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??C();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(b(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(U),it=et(function({entityType:a,...t}){const e=B(),o=G(),c=F(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:I,entityIdEncoded:j,entityNameEncoded:x}=q(),r=k(j??""),p=k(x??""),u=rt(r,p),w=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=l(n=>O(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),v=l(n=>_(n).company?.companyInfo.firstMonthOfFY??1),f=l(n=>Y(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(H(i)))},[m,u,i]);const E=l(n=>n.trendState.fetchState),P=f?.selectedPeriod?.timePeriod??g,A=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(f?.selectedPeriod?.timePeriod,g);return d.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(b(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:I,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:A,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(z,{to:C(w.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,C=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function xt({entityType:a}){return s.jsx(L,{children:s.jsx(N,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-BHuRnA1t.js → ExpenseAutomationRoutes-CVojfTBC.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-Hyy2O23M.js";import xn from"./NotFoundScreen-
|
|
1
|
+
import{j as C}from"./liveblocks-Hyy2O23M.js";import xn from"./NotFoundScreen-BBj2rX_R.js";import{a,b as Pt}from"./sentry-BTyPPF0t.js";import{n as Fe,S as Rn}from"./mui-B2prtfNk.js";import{h as ce,j as wt,u as qe,g as U,k as Dn,l as rt,n as Un,o as Le}from"./core-D1cXuJMi.js";import{eQ as Re,PW as Fn,n0 as Se,fg as Bn,qD as _n,ni as xt,nD as Rt,PX as Dt,nN as Mn,PY as Ut,nb as Vn,q9 as On,e$ as pe,PZ as De,sJ as Ft,BY as Bt,P_ as _t,P$ as jn,pQ as Ge,LA as dt,LC as Ln,jF as zn,LD as Qn,jM as $n,cW as qn,tQ as Je,no as Mt,nS as Ue,Q0 as Gn,Kt as ut,Ks as Pe,Q1 as mt,k1 as Jn,Q2 as Yn,Q3 as Nn,Q4 as Kn,Q5 as Wn,nv as Hn,ng as ie,nV as we,Q6 as Xn,Q7 as Zn,Q8 as ea,o0 as ta,jQ as na,jH as aa,Q9 as oa,jP as ht,LK as sa,Qa as ca,Qb as ia,pM as la,pr as ra,nT as ge,pq as ze,Qc as da,Qd as ua,lk as ma,bq as ha,lf as pt,l1 as pa,Qe as ga,gO as gt,fS as Ca,lc as Sa,vJ as Ia,Qf as fa,or as ka,om as Ea,oq as va,ob as ya,Qg as ba,f2 as Vt,nG as Aa,nr as Ta,fh as Ct,nX as Pa,Qh as wa,nU as Ot,Qi as xa,Qj as Ra,Qk as Da,Ql as Ua,Qm as St,pY as Fa,ph as Ba,Kr as _a,jO as Ma,Qn as Va,Gu as Oa,jN as ja,jC as La,f1 as za,oS as jt,p9 as Qa,nR as It,nW as $a,bE as qa,l9 as Ga,l6 as Ja,Qo as Ya,oa as ft,p7 as kt,p5 as Na,oX as Ka,oC as Wa,p8 as Ha,Qp as Xa,Qq as Za,oG as eo,Qr as to,ow as no,oF as ao,oD as oo,pc as so}from"./zeni-epic-state-CbUjX_b3.js";import{C as Lt,A as Ce,d as L,j as W,U as zt,cw as co,z as Be,cx as io,aq as xe,cy as lo,aQ as Et,B as Qt,cz as ro,an as Qe,D as uo,cA as mo,X as ho,cB as po,R as go,cC as Co,cD as So,n as Io,c as fo,aK as ko,b1 as Eo,E as vo,cE as yo}from"./index-Cc13Ni3u.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-CQ5wXGV2.js";import{c as qt}from"./useFetchSuggestedQuestionsWhenReady-C8wykHii.js";import{c as vt,C as bo}from"./TransactionDetailScreen-Ci7wUJ8m.js";import{w as Ao}from"./withTransactionSidePanel-BLrf1QAn.js";import{h as To,v as Po}from"./routePaths-CYWO_4aN.js";import{g as $e}from"./accountMappingHelper-5LvFlOj7.js";import{D as wo}from"./DrawerScreen-_gX7HdVn.js";import"./recharts-CrZf7bKF.js";import"./analytics-BE9oUBzD.js";import"./plaid-4w70Yh4I.js";import"./dnd-DbPPTppj.js";import"./stripe-DMRn4zHo.js";import"./lottie-qu8VyEpw.js";import"./lexical-Du70nM1B.js";import"./pdf-Cvwxd6W6.js";import"./utils-C_-saZ2j.js";import"./decodeURIComponentSafe-Did0aZyt.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="ab98aa9d-4062-4a98-ae60-35f18cbd6602",t._sentryDebugIdIdentifier="sentry-dbid-ab98aa9d-4062-4a98-ae60-35f18cbd6602")}catch{}})();const xo=()=>{const t=ce(),i=wt(),A=qe(),f=U(d=>Re(d)),{useFeatureGate:E}=Lt(),{isFeatureEnabled:g}=E(Ce.isRealtimeInsightsFeatureEnabled),u=U(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),o=U(d=>Fn(d,f.tenantId)),{isAiCfoAccessEnabled:v,onAskAiCfoClick:S}=$t({mobileExploreReferrer:"Month-End Close Overview"}),m=a.useCallback((d,R,N=!1)=>{t(Se({tenantId:R,period:{month:d.month,year:d.year},refreshViewInBackground:N}))},[]),y=a.useCallback(d=>{const R=A.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(d.month,d.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,R??null),t(Bn(f.tenantId,d))},[f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),r=u[f.tenantId],B=a.useCallback(()=>{const d=A.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(r.month,r.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),m(r,f.tenantId,!0)},[m,r,f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),h=W(A.state?.pathnameStackToGoBack,A.pathname),T=a.useCallback(()=>{if(o.monthEndCloseChecks!=null&&r!=null){const d=o.monthEndCloseChecks.monthEndCloseCheckList.find(R=>R.progress<100);if(d!=null)return void i(`./${d.id}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}});i(`./month_end_insights/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}})}},[o.monthEndCloseChecks,r]),{areTenantIdsInSync:I}=zt();return qt({isDataReady:o.fetchState==="Completed"}),a.useEffect(()=>{r!=null&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&I&&m(r,f.tenantId)},[m,r,o.fetchState,f.tenantId,I]),a.useEffect(()=>{r!=null&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&I&&t(_n(r))},[r,o.monthClosePerformanceTrendFetchStatus.fetchState,I]),a.useEffect(()=>{const d=setInterval(()=>{o.fetchState!=="In-Progress"&&o.fetchState==="Completed"&&B()},3e5);return()=>clearInterval(d)},[o.fetchState]),a.useEffect(()=>{if(o.fetchState==="Completed"&&o.monthEndCloseChecks?.auditSummary!=null){const d=A.state?.referrer;L.trackMonthCloseAuditPage(o.selectedPeriod.month,o.selectedPeriod.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[o.fetchState,o.selectedPeriod,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),C.jsx(Ro,{children:C.jsx(co,{monthEndCloseChecksView:o,isRealtimeInsightsFeatureEnabled:g,onMonthEndCheckClick:d=>{i(`./${d}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:y,handleReviewButtonClick:T,onBackClick:()=>{i("../../dashboard")},onReload:B,isAiCfoAccessEnabled:v,onAskAiCfoClick:S})})},Ro=Fe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Hyy2O23M.js";import{a as r}from"./sentry-BTyPPF0t.js";import{Y as b,Z as c,a0 as l,p}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-Hyy2O23M.js";import{a as r}from"./sentry-BTyPPF0t.js";import{Y as b,Z as c,a0 as l,p}from"./index-Cc13Ni3u.js";import"./mui-B2prtfNk.js";import f from"./NotFoundScreen-BBj2rX_R.js";import{j as m,u}from"./core-D1cXuJMi.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="522ccb8b-3268-4411-ab09-d52d0fbb31a8",e._sentryDebugIdIdentifier="sentry-dbid-522ccb8b-3268-4411-ab09-d52d0fbb31a8")}catch{}})();const D=()=>{const e=m(),a=u(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),d=r.useCallback(()=>{(()=>{const n=p(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=b(a.pathname);return o!=null?s.jsx(c,{menuItem:l(o),onDemoClick:t,onGoBack:d}):s.jsx(f,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{D as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./sentry-BTyPPF0t.js";import{h as f,j as l,u as m}from"./core-D1cXuJMi.js";import{gv as p,JG as g,JH as _}from"./zeni-epic-state-CbUjX_b3.js";import{u as b,L as h,z as y}from"./index-
|
|
1
|
+
import{a as r}from"./sentry-BTyPPF0t.js";import{h as f,j as l,u as m}from"./core-D1cXuJMi.js";import{gv as p,JG as g,JH as _}from"./zeni-epic-state-CbUjX_b3.js";import{u as b,L as h,z as y}from"./index-Cc13Ni3u.js";import"./liveblocks-Hyy2O23M.js";import"./recharts-CrZf7bKF.js";import"./mui-B2prtfNk.js";import"./analytics-BE9oUBzD.js";import"./plaid-4w70Yh4I.js";import"./dnd-DbPPTppj.js";import"./stripe-DMRn4zHo.js";import"./lottie-qu8VyEpw.js";import"./lexical-Du70nM1B.js";import"./pdf-Cvwxd6W6.js";import"./utils-C_-saZ2j.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f6445ad3-e429-456d-bf84-6ed211afb1c4",e._sentryDebugIdIdentifier="sentry-dbid-f6445ad3-e429-456d-bf84-6ed211afb1c4")}catch{}})();function C(){const e=f(),n=l(),o=m(),{setLoading:i,clearAllLoading:c}=b(),s=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{C as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-Hyy2O23M.js";import{l as S,k as x,j as C,u as y,h as ee,q as te,g as L,N as ae,n as ne,o as p}from"./core-D1cXuJMi.js";import{Jz as k,JA as v,JB as T,zz as z,zl as G,JC as B,JD as oe,JE as se,zp as ie,eR as $,zw as le,zt as de}from"./zeni-epic-state-CbUjX_b3.js";import{K as g,o as d,w as re,d as j,h as J,v as ce,p as me,$ as pe,j as H,C as ue,A as he,k as xe,n as ge,m as fe,q as we,B as be,x as Se,T as ye,S as ke,y as ve,E as je,F as $e}from"./index-
|
|
1
|
+
import{j as t}from"./liveblocks-Hyy2O23M.js";import{l as S,k as x,j as C,u as y,h as ee,q as te,g as L,N as ae,n as ne,o as p}from"./core-D1cXuJMi.js";import{Jz as k,JA as v,JB as T,zz as z,zl as G,JC as B,JD as oe,JE as se,zp as ie,eR as $,zw as le,zt as de}from"./zeni-epic-state-CbUjX_b3.js";import{K as g,o as d,w as re,d as j,h as J,v as ce,p as me,$ as pe,j as H,C as ue,A as he,k as xe,n as ge,m as fe,q as we,B as be,x as Se,T as ye,S as ke,y as ve,E as je,F as $e}from"./index-Cc13Ni3u.js";import{n as m}from"./mui-B2prtfNk.js";import f from"./NotFoundScreen-BBj2rX_R.js";import{a as I}from"./sentry-BTyPPF0t.js";import"./recharts-CrZf7bKF.js";import"./analytics-BE9oUBzD.js";import"./plaid-4w70Yh4I.js";import"./dnd-DbPPTppj.js";import"./stripe-DMRn4zHo.js";import"./lottie-qu8VyEpw.js";import"./lexical-Du70nM1B.js";import"./pdf-Cvwxd6W6.js";import"./utils-C_-saZ2j.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="808a9ff1-63b3-4c4d-a66e-1c2c94840d1d",e._sentryDebugIdIdentifier="sentry-dbid-808a9ff1-63b3-4c4d-a66e-1c2c94840d1d")}catch{}})();const Ie=m.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|