@zeniai/web-app-ui 5.0.89-dev → 5.0.89-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-SY-dhjP_.js → AddressRoutes-BPwWkfcj.js} +1 -1
- package/dist/assets/{AddressScreen-Ctnukryb.js → AddressScreen-BvwS_9z2.js} +1 -1
- package/dist/assets/{AiCfoScreen-Dwnx3Zrg.js → AiCfoScreen-DnKoE3IJ.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-DWpeCKQ1.js → BillPayApprovalRoutes-ceqgfgGo.js} +1 -1
- package/dist/assets/{BillPayRoutes-CEWNKd4a.js → BillPayRoutes-Co_gm91f.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-BFP865c-.js → BusinessVerificationPageScreen-BtdKr5lT.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-DmmGBEVb.js → ChargeCardRoutes-Dyf-JF83.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-CUrTGAPx.js → CompanyPassportScreen-CA0HpKiQ.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-BAkm3SD5.js → ConnectionAuthScreen-ByYbkNFh.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-BmBMaCZh.js → CustomerOnboardingAuthScreen-Bf-cizdJ.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-DQC5OT_-.js → CustomerOnboardingRoutes-DAjpcWcH.js} +1 -1
- package/dist/assets/{DashboardRoutes-DjR4FttM.js → DashboardRoutes-CeraNzvN.js} +1 -1
- package/dist/assets/{DefaultTenantHome-BXapS7K_.js → DefaultTenantHome-C1ToVywH.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-CluJV1hP.js → DomesticWireDetailScreen-CakALOxw.js} +1 -1
- package/dist/assets/{DrawerScreen-DTfCd2en.js → DrawerScreen-CG4hw7_P.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-CjmHAAQ4.js → EntityDetailRoutes-Uemw1snV.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-CNlHRTO1.js → ExpenseAutomationRoutes-Dq-ZbuPh.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-BWUt3LEA.js → FeaturePreviewScreen-IR7Qxf41.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-CgvAaP1t.js → HubSpotOAuthCallbackScreen-D9OkD_cX.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-DTgPyHRi.js → MagicLinkRoutes-DnFJJ-m-.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-BxKlzsH1.js → MagicLinkSignInScreen-BJyrnEpT.js} +1 -1
- package/dist/assets/{MobileAppDrawer-BLGo796K.js → MobileAppDrawer-Bai_Lh0v.js} +1 -1
- package/dist/assets/{NotFoundScreen-B1k_jOem.js → NotFoundScreen-DVTblDpS.js} +1 -1
- package/dist/assets/{NotificationRoutes-yUtgb6NE.js → NotificationRoutes-BtvHwIHt.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-DSPFHGna.js → OAuthConsentScreen-_NASGa8c.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-C5G3jn5O.js → PandLWithForecastRoutes-DdCvCtlN.js} +1 -1
- package/dist/assets/{PeopleRoutes-DG9PRPQo.js → PeopleRoutes-rmnyceoy.js} +1 -1
- package/dist/assets/{PerformanceRoutes-CdqCJZzN.js → PerformanceRoutes-86j9LdIB.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-jmt8kh8_.js → QBOConnectionScreen-CKCjqZzP.js} +1 -1
- package/dist/assets/{ReferralListScreen-BKwWhmDP.js → ReferralListScreen-QLxqWfUk.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-DXxXV9_W.js → ReimbursementApprovalRoutes-BNwcJK7H.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DtFME-kz.js → ReimbursementApprovalRuleDetailScreen-a-JX63nK.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-q-LM-3Mz.js → ReimbursementRoutes-C_KcRhnd.js} +1 -1
- package/dist/assets/{ReportsRoutes-DZjJw2so.js → ReportsRoutes-D9HvTPuu.js} +1 -1
- package/dist/assets/{RewardsRoutes-D41cXIrP.js → RewardsRoutes-CSFB8rt7.js} +1 -1
- package/dist/assets/{ScreenRoutes-DrDg9CqO.js → ScreenRoutes-DUF7lq8S.js} +2 -2
- package/dist/assets/{SettingsRoutes-D7DVrB_r.js → SettingsRoutes-FuwQspoI.js} +1 -1
- package/dist/assets/{SetupPagesScreen-1j44PFay.js → SetupPagesScreen-D2dbZmg_.js} +1 -1
- package/dist/assets/{SignInScreen-CNbjT65A.js → SignInScreen-DRX2XZAN.js} +1 -1
- package/dist/assets/{SignOutScreen-CkVX4P52.js → SignOutScreen-DkeFUQXA.js} +1 -1
- package/dist/assets/{TaskListScreen-BMzXb3Gv.js → TaskListScreen-Cln-3rWs.js} +1 -1
- package/dist/assets/{TaskRoutes-D5ysh0Fw.js → TaskRoutes-C4E8P_q-.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-BLkvSFsR.js → TransactionDetailRoutes-C4YdYvtN.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-AbBGaDF8.js → TransactionDetailScreen-DMDwXid_.js} +1 -1
- package/dist/assets/{TransactionListRoutes-CWiHUsRg.js → TransactionListRoutes-qMhxhmtX.js} +1 -1
- package/dist/assets/{TreasuryRoutes-CocKL-Oj.js → TreasuryRoutes-DO-yW8sg.js} +1 -1
- package/dist/assets/{VendorsRoutes-a2NCvCPG.js → VendorsRoutes-Gx5YESzg.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-DZiJs9hh.js → WiseConfirmationScreen-D_T9Itnb.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-CEygLs18.js → ZeniAccountRoutes-7PRzJ32t.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-DLVOSwmC.js → ZeniAccountStatementScreen-DPM5oRGk.js} +1 -1
- package/dist/assets/{analyticsHelper-COFNU8CP.js → analyticsHelper-RRbpObXJ.js} +1 -1
- package/dist/assets/{getLocaleForTenant-OYWr98Zl.js → getLocaleForTenant-FDoQOl0i.js} +1 -1
- package/dist/assets/{index-CPG6ITBm.js → index-C4_7gLFp.js} +5 -5
- package/dist/assets/{routePaths-1uJ5ric0.js → routePaths-B7W4yhsS.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-DaoVDdk6.js → useAskAiCfoHostNavButtonProps-c_p-0pW7.js} +1 -1
- package/dist/assets/{useFetchSuggestedQuestionsWhenReady-IH_yzaTd.js → useFetchSuggestedQuestionsWhenReady-nzUYYA5P.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-C_MqgvcA.js → useInitialThreadRequest-qRRdn_eE.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-xau0uwsY.js → withTransactionSidePanel-CH7Cbdk4.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-D0ylGz77.js";import{A as i}from"./AddressScreen-
|
|
1
|
+
import{j as e}from"./liveblocks-D0ylGz77.js";import{A as i}from"./AddressScreen-BvwS_9z2.js";import s from"./NotFoundScreen-DVTblDpS.js";import"./sentry-C5UCCkb_.js";import{n as d,o as r}from"./core-DSsu1iyO.js";import"./zeni-epic-state-CFQMpWBE.js";import"./recharts-C7IODwRw.js";import"./index-C4_7gLFp.js";import"./mui-D9TDAUAO.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.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 r}from"./liveblocks-D0ylGz77.js";import{a as h}from"./sentry-C5UCCkb_.js";import{j as T,h as _,u as j,l as E,g as B,k as K}from"./core-DSsu1iyO.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,p as F,j as b,q as N}from"./index-
|
|
1
|
+
import{j as r}from"./liveblocks-D0ylGz77.js";import{a as h}from"./sentry-C5UCCkb_.js";import{j as T,h as _,u as j,l as E,g as B,k as K}from"./core-DSsu1iyO.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,p as F,j as b,q as N}from"./index-C4_7gLFp.js";import{K8 as k,gZ as U,eR as q,K9 as G,c2 as O,Ka as V,kj as H}from"./zeni-epic-state-CFQMpWBE.js";import{n as Z}from"./mui-D9TDAUAO.js";import J from"./NotFoundScreen-DVTblDpS.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]="d36d5ff6-d069-4d9f-9c37-58315dda5ca0",e._sentryDebugIdIdentifier="sentry-dbid-d36d5ff6-d069-4d9f-9c37-58315dda5ca0")}catch{}})();const Q=Z.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-D0ylGz77.js";import{a as l}from"./sentry-C5UCCkb_.js";import{h as ue,j as me,u as pe,g as $,l as he,k as fe}from"./core-DSsu1iyO.js";import{U 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 J,q as Q,x as q,d as T,cP as z,cQ as Ee,X as Pe,f as Te,a3 as xe,cR as ye,Y as _e,s as ve,aY as Oe,cS as Ue}from"./index-
|
|
1
|
+
import{j as h}from"./liveblocks-D0ylGz77.js";import{a as l}from"./sentry-C5UCCkb_.js";import{h as ue,j as me,u as pe,g as $,l as he,k as fe}from"./core-DSsu1iyO.js";import{U 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 J,q as Q,x as q,d as T,cP as z,cQ as Ee,X as Pe,f as Te,a3 as xe,cR as ye,Y as _e,s as ve,aY as Oe,cS as Ue}from"./index-C4_7gLFp.js";import{fH as Ae,f6 as K,eR as Qe,hD as De,QL as je,eQ as Fe,hN as Le,hJ as Be,fx as W,fr as Me,fk as Re,fo as H,fs as Ge,ft as Ne,fu as $e,fv as Ve,fw as qe}from"./zeni-epic-state-CFQMpWBE.js";import{D as ze,n as b,S as We,P as He}from"./mui-D9TDAUAO.js";import{p as Ye}from"./pathToGoBack-Ce7z8Bpw.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.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]="6502549d-78eb-4dbc-9706-7dc8602ae88f",s._sentryDebugIdIdentifier="sentry-dbid-6502549d-78eb-4dbc-9706-7dc8602ae88f")}catch{}})();const X="chat-response-generated",Je=fe(function(s,r){const t=K(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=Ne(n.type),u=n.metadata.chat_session_id??null,{currentChatSession:a,currentQuestionAnswer:w,currentQuestionAnswerSummary:x}=J(C,u);p!=="answer"?T.trackAICFOChatResponseGenerated(p,w?.question.questionText??"",n.text,u,Ue(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,$e(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=Q(t.state?.pathnameStackToGoBack),o=e.poppedPathname??Ye(1);S(o,{state:{...t.state,pathnameStackToGoBack:e.newStack}}),s(H(""))},togglePageView:()=>{const e=Q(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(Re());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(Me({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(Ae())},[t]);const{customPageTitle:C}=ge(),d=$(i=>K(i)),e=Ce.getSignedInUser(),{session_id:o}=he(),n=ke(),p=Pe(n),u=$(i=>Qe(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,D=!!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),j=l.useRef(!1);l.useEffect(()=>{j.current||E==null||E===""||(_(E),v(D),j.current=!0)},[E,D]);const ae=l.useCallback(()=>{_(null),v(!1)},[]),F=l.useMemo(()=>new URLSearchParams(c.search),[c.search]),L=F.get("ref")??I?.aiCfoRef,O=F.get("emailRefId")??I?.aiCfoEmailRefId,B=l.useRef(!1);l.useEffect(()=>{B.current||L!=="month-end-email"||O==null||a!=null||e==null||(t(De("controller",e.userId,O,"MONTH_END_EMAIL")),B.current=!0)},[L,O,a,t,e]);const P=d.uiState.lastContextMessage;l.useEffect(()=>{P!=null&&P!==""&&a!=null&&(_(P),v(!0),t(je()))},[P,a,t]);const se=u.masterTOSInfo,k=se?.isMasterTOSAccepted??!1,{visitedSessions:M}=Ie(a),U=d.fetchState,A=d.uiState.chatSessionsNextPageToken.hasMore||!d.uiState.chatSessionsFirstPageFetched,R=a!=null?d.fetchChatSessionHistoryByChatSessionId?.[a]?.fetchState??"Not-Started":"Not-Started",G=a==null||(d.uiState.chatHistoryNextPageToken[a]?.hasMore??!0),N=d.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:oe}=J(N,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=Q(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:M.map(i=>`private-encrypted-chat-${i}.${X}`),eventCallback:(i,g,de)=>de.onEventReceived(i,g)}),[M]);l.useEffect(()=>{U!=="In-Progress"&&A&&t(Le())},[U,A,t]),l.useEffect(()=>{a!=null&&R!=="In-Progress"&&G&&e!=null&&U==="Completed"&&!A&&t(Be(a,e.userId))},[R,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(Y,{children:h.jsx(z,{isTOSAccepted:!1,acceptMasterTOSState:d.masterTOSAcceptanceState,customPageTitle:C,onCloseClick:ie,onCompleteClick:()=>{u.userRoleId!=null&&t(W(u.userRoleId))}})})})]}):h.jsxs(Ke,{children:[h.jsx(q,{analytics:T,onLoad:i=>i.trackPageLoaded(Te.Event.aiCFOPage)}),p&&y.drawerElement,h.jsx(Je,{...le,currentChatSessionId:a,allSessionsWithOrderedQuestionAnswers:N,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(Y,{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)}})})})]})},Y=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-D0ylGz77.js";import{a as y}from"./sentry-C5UCCkb_.js";import{j as B,u as U,h as T,g as f,N,k as j,l as $,n as O,o as h}from"./core-DSsu1iyO.js";import{eR as L,Nr as R,N7 as b,xR as x,xL as F,xP as I,xE as z,N9 as W,xH as q,xT as H,xS as C}from"./zeni-epic-state-CFQMpWBE.js";import{m as P,z as k,B as V,a3 as G,by as J,ac as _,bz as K}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-D0ylGz77.js";import{a as y}from"./sentry-C5UCCkb_.js";import{j as B,u as U,h as T,g as f,N,k as j,l as $,n as O,o as h}from"./core-DSsu1iyO.js";import{eR as L,Nr as R,N7 as b,xR as x,xL as F,xP as I,xE as z,N9 as W,xH as q,xT as H,xS as C}from"./zeni-epic-state-CFQMpWBE.js";import{m as P,z as k,B as V,a3 as G,by as J,ac as _,bz as K}from"./index-C4_7gLFp.js";import"./mui-D9TDAUAO.js";import{i as M}from"./ReimbursementApprovalRuleDetailScreen-a-JX63nK.js";import Q from"./NotFoundScreen-DVTblDpS.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]="939b8d77-ce5d-46d4-905e-050ee1b116ed",e._sentryDebugIdIdentifier="sentry-dbid-939b8d77-ce5d-46d4-905e-050ee1b116ed")}catch{}})();const w="bill-approval-rule-update",X=j(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(W(!1))},onBackClick:()=>{_(p)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(z(a))},onEditRuleClick:a=>{a!=null?(e(I(a)),t(`./${a}/edit`)):(e(I()),t("./new"))}}})(G(J)),Y=()=>{const e=B(),o=U(),t=T(),[p,a]=y.useState(!1),[u,s]=y.useState(!1),d=P(),n=f(i=>i.billPaySetupApproverViewState.fetchState),c=f(i=>L(i)),r=f(i=>R(i)),g=f(i=>b(i).billPaySetupApproverViewUpdateData);if(y.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&t(x())},[g]),y.useEffect(()=>{p||n!=="Not-Started"||(a(!0),t(F(!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 v={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,...v})},Z=j(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(v=>{const i=v.actors.selectedUsers.map(S=>({type:"user",userId:S.userId,isImplicitActor:!1})),A=v.actors.selectedNonUsers.map(S=>{const E=!!M(S.value);return{type:E?"attribute":"role",subType:S.value,userId:void 0,idType:void 0,isImplicitActor:!E}}),m=i.concat(A);g.push({action:v.stepType.selectedOption,actors:m,operator:m.length>1?v.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(C(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(C(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(H())},onSaveRuleSuccess:()=>{t("../")}}})(K);function D(){const e=B(),o=T(),t=U(),{approvalRuleId:p}=$(),a=k.getSignedInUser(),u=P(),s=f(r=>b(r)),d=f(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(O,{children:[l.jsx(h,{path:"/",element:l.jsx(Y,{})}),l.jsx(h,{path:"/new",element:l.jsx(D,{})}),l.jsx(h,{path:"/:approvalRuleId/edit",element:l.jsx(D,{})}),l.jsx(h,{path:"*",element:l.jsx(Q,{})})]})}export{se as B};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-D0ylGz77.js";import{j as J,h as se,u as X,l as ae,g as v,N as te,k as Y,i as na,n as ia,o as S}from"./core-DSsu1iyO.js";import{eR as Z,MJ as Ne,bv as It,HD as oa,bo as wt,bF as pe,MK as xt,x9 as Ct,yj as $e,xI as la,bn as De,ML as sa,MM as ra,c2 as ca,MN as da,jD as At,MO as Bt,MP as Et,yU as _e,xo as Ae,MQ as ua,wZ as tt,MR as pa,C4 as ma,x1 as ba,x7 as Dt,MS as ke,MT as Me,yk as Ge,MU as ha,MV as ga,yn as Oe,MW as ya,yA as Sa,MX as jt,y4 as at,y9 as fa,MY as ka,MZ as ue,M_ as Tt,M$ as Pt,N0 as Ft,fL as va,xt as Le,cx as Rt,N1 as Ia,gP as wa,N2 as xa,N3 as Ca,eX as Vt,eV as $t,N4 as ze,N5 as Aa,N6 as Ba,Ks as Ze,N7 as Ea,Kt as oe,Ku as He,N8 as Da,N9 as ja,Na as Ta,yb as nt,y8 as Pa,Nb as Fa,Nc as Ra,Nd as Va,xW as $a,Ne as La,Nf as Ua,Ng as Na,cl as Lt,cN as Ut,jO as _a,bL as Ma,bq as Nt,bM as _t,wf as Ga,Nh as Oa,BT as za,BZ as Za,sK as Ha,yl as Wa,y$ as qa,j$ as fe,Ni as Ka,Nj as Mt,kt as Ja,jV as Gt,ke as Ot,kd as it,bE as be,bK as Xa,Nk as Ya,Nl as ve,iy as Qa,Nm as ot,Nn as en,iC as tn,iX as an,zd as nn,No as on,km as ln,z3 as sn,Np as lt,z7 as rn,zc as cn,z9 as dn,z1 as un,Nq as zt,xi as pn,Nr as mn,Ns as bn,fD as hn,fC as gn,fB as yn,k2 as Sn,kk as st,kv as fn,qa as kn,kb as vn,z5 as In,iI as wn,kA as xn,Nt as Cn,iA as An,q1 as Bn,Nu as En,y0 as Dn,bG as jn,bs as Tn,Jn as Pn,cP as Fn,cO as Rn,cw as Vn,cC as $n}from"./zeni-epic-state-CFQMpWBE.js";import{m as me,z as V,c as Ie,C as le,A as y,aK as Be,B as re,o as B,x as je,d as D,b5 as Ln,q as z,Y as We,s as E,K as we,b6 as rt,b7 as ct,b8 as Un,ah as Nn,G as _n,aE as Mn,E as Zt,D as qe,H as Ke,b9 as Gn,aq as Ht,ba as On,V 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 Xn,bh as Yn,bi as Qn,bj as ei,I as ti,bk as ai,b1 as ni,bl as ii,bm as oi,a6 as li}from"./index-CPG6ITBm.js";import{n as U,S as si}from"./mui-D9TDAUAO.js";import{A as dt}from"./AddressScreen-Ctnukryb.js";import{g as ie,a as Te,i as qt,V as Je,b as Xe,c as ri,v as ci,d as di,A as he,D as ge}from"./DomesticWireDetailScreen-CluJV1hP.js";import{a as f}from"./sentry-C5UCCkb_.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-DaoVDdk6.js";import{c as Qe}from"./useFetchSuggestedQuestionsWhenReady-IH_yzaTd.js";import{u as Kt}from"./useInitialThreadRequest-C_MqgvcA.js";import Ee from"./NotFoundScreen-B1k_jOem.js";import{D as ui}from"./DrawerScreen-DTfCd2en.js";import{M as Jt}from"./MobileAppDrawer-BLGo796K.js";import{F as Xt}from"./FeaturePreviewScreen-BWUt3LEA.js";import{S as Pe}from"./SetupPagesScreen-1j44PFay.js";import{B as pi}from"./BillPayApprovalRoutes-DWpeCKQ1.js";import{FallBackRoute as mi}from"./ScreenRoutes-DrDg9CqO.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.js";import"./analyticsHelper-COFNU8CP.js";import"./routePaths-1uJ5ric0.js";import"./BusinessVerificationPageScreen-BFP865c-.js";import"./ReimbursementApprovalRuleDetailScreen-DtFME-kz.js";import"./getLocaleForTenant-OYWr98Zl.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]="fa467b09-5d31-4595-94df-18d4f01bad0a",e._sentryDebugIdIdentifier="sentry-dbid-fa467b09-5d31-4595-94df-18d4f01bad0a")}catch{}})();const bi=Y(function(e,t){const l=Ne(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:At(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(Ae(l,"retry")):e(Ae(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(Ae(t.billId,"refund"))},saveBillDetails:(o,s,n)=>{o&&e(Et({data:n,billId:l})),e(_e(o?"paid":"pending_approval",o,s,l))},discardOutsideZeniPaymentData:()=>{e(Bt({billId:l}))}}})(Ln);function hi(){const e=J(),t=se(),l=X(),{billId:i}=ae(),c=me(),r=V.getSignedInUser(),u=Ie(),o=v(G=>Z(G)),s=v(G=>Ne(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}=Ye({mobileExploreReferrer:"Bill Details"});Qe({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,x]=f.useState(!1),[C,_]=f.useState(!1),{useFeatureGate:T,useDynamicConfig:N}=le(),{isFeatureEnabled:$}=T(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=T(y.isBillPayCommentingEnabled),{isFeatureEnabled:H}=T(y.isBillPayDetectInsufficientFundsEnabled),{configValue:M}=N(Be.zeniAssistConfig),A=oa(o),q=wt(o.userRole),W=g&&pe(u?.loggedInUserRoleMap),L=M.user_ids!=null&&r?.userId!=null&&M.user_ids.includes(r?.userId),{isFeatureEnabled:K}=T(y.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:Q}=T(y.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{$&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&A===!1?_(!1):_(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,A,r]),f.useEffect(()=>{i!=null&&t(xt(i))},[i]),f.useEffect(()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(k(!0),t(Ct(i??"",$,L,!1)))},[b,s,i,t]),f.useEffect(()=>{j||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(x(!0),t($e(!1,$,L,Q,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 ${B.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:C,currentTenant:o,billId:i??"",isInternationalPaymentShaVsOurEnabled:K,hasZeniAssistAccess:L,isDetectInsufficientFundsEnabled:H,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const ye=qe.getLocalizedStrings().spendManagement.billPay.billDetails,gi={containerWidth:new Zt(100,58)},ut=Y(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:B.sp10,paddingRight:B.sp3,paddingBottom:"15px",paddingLeft:B.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)}}})(Mn);function w({appContent:e}){const t=se(),l=J(),{billId:i}=ae(),c=X(),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(Be.zeniAssistConfig),j=k.user_ids!=null&&n?.userId!=null&&k.user_ids.includes(n?.userId),x=v(F=>Z(F)),[C,_]=f.useState(!1),[T,N]=f.useState(!1),[$,I]=f.useState(!1),[H,M]=f.useState(),A=v(F=>Me(F,m,g,i));let q=A.fetchState,W=A.file,L=A.showAutofill;const K=v(F=>Ne(F,i??""));u===!1&&(q=K.fetchState,W=K.transactionDetails?.attachments?.[0],L=!1);const Q=A.billPayInfo!=null&&A.billPayInfo.stage.code==="pending_approval"?A.billPayInfo.billStatus.code:A.billStage;f.useEffect(()=>{i==null&&t(Ge(!0))},[i,t]),f.useEffect(()=>{q==="Not-Started"&&(u&&T?N(!1):!u&&C&&_(!1))},[i]),f.useEffect(()=>{C||i==null||u||(_(!0),t(Ct(i,h,j,!1)),T||(N(!0),t($e(!1,h,j,b,i)))),u&&!T&&(N(!0),t($e(!1,h,j,b,i)))},[C,T,u,i,t]);const G={onOkClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(Q??"",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(Q??"",F,n?.userEmail??"","no"),t(ha({file:H,billId:i}))}},ee=f.useCallback(()=>{const F=z(c.state?.pathnameStackToGoBack),ce=F.poppedPathname??ie(x.tenantEmailDomain);t(ke({billId:i})),l(ce,{state:{pathnameStackToGoBack:F.newStack}})},[c.state,x.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:A.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:I,setPayload:M,showActionButtons:!1,isInitialEdit:!!A.isInitialEdit,billStage:Q}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:!0})})]})}):a.jsxs(Fe,{windowSize:o,children:[o==="small"||L?null:a.jsx(pt,{children:a.jsx(Yt,{onClick:ee,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(Un,{}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:i==null})})]});{const F=A.billPayInfo!=null&&A.billPayInfo.stage.code==="pending_approval"?A.billPayInfo.billStatus.code:A.billStage;return a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[L&&o!=="small"?a.jsx(mt,{}):null,$?a.jsx(Nn,{titleComponent:a.jsx(wi,{children:ye.overwriteTitle}),descriptionComponent:a.jsx(xi,{children:ye.overwriteDescription}),primaryButtonText:ye.buttons.yes,secondaryButtonText:ye.buttons.no,action:G,isEditPopup:!0}):null,o==="small"||L?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:L,uploadStatus:A.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:Si(u,K,A),setShowConfirmationPopup:I,setPayload:M,showActionButtons:fi(u,A),isInitialEdit:!!A.isInitialEdit,billStage:F}),a.jsx(Ve,{windowSize:o,children:e})]})})}}function yi(){const{triggerBack:e}=Gn();return a.jsx(Yt,{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-D0ylGz77.js";import{j as J,h as se,u as X,l as ae,g as v,N as te,k as Y,i as na,n as ia,o as S}from"./core-DSsu1iyO.js";import{eR as Z,MJ as Ne,bv as It,HD as oa,bo as wt,bF as pe,MK as xt,x9 as Ct,yj as $e,xI as la,bn as De,ML as sa,MM as ra,c2 as ca,MN as da,jD as At,MO as Bt,MP as Et,yU as _e,xo as Ae,MQ as ua,wZ as tt,MR as pa,C4 as ma,x1 as ba,x7 as Dt,MS as ke,MT as Me,yk as Ge,MU as ha,MV as ga,yn as Oe,MW as ya,yA as Sa,MX as jt,y4 as at,y9 as fa,MY as ka,MZ as ue,M_ as Tt,M$ as Pt,N0 as Ft,fL as va,xt as Le,cx as Rt,N1 as Ia,gP as wa,N2 as xa,N3 as Ca,eX as Vt,eV as $t,N4 as ze,N5 as Aa,N6 as Ba,Ks as Ze,N7 as Ea,Kt as oe,Ku as He,N8 as Da,N9 as ja,Na as Ta,yb as nt,y8 as Pa,Nb as Fa,Nc as Ra,Nd as Va,xW as $a,Ne as La,Nf as Ua,Ng as Na,cl as Lt,cN as Ut,jO as _a,bL as Ma,bq as Nt,bM as _t,wf as Ga,Nh as Oa,BT as za,BZ as Za,sK as Ha,yl as Wa,y$ as qa,j$ as fe,Ni as Ka,Nj as Mt,kt as Ja,jV as Gt,ke as Ot,kd as it,bE as be,bK as Xa,Nk as Ya,Nl as ve,iy as Qa,Nm as ot,Nn as en,iC as tn,iX as an,zd as nn,No as on,km as ln,z3 as sn,Np as lt,z7 as rn,zc as cn,z9 as dn,z1 as un,Nq as zt,xi as pn,Nr as mn,Ns as bn,fD as hn,fC as gn,fB as yn,k2 as Sn,kk as st,kv as fn,qa as kn,kb as vn,z5 as In,iI as wn,kA as xn,Nt as Cn,iA as An,q1 as Bn,Nu as En,y0 as Dn,bG as jn,bs as Tn,Jn as Pn,cP as Fn,cO as Rn,cw as Vn,cC as $n}from"./zeni-epic-state-CFQMpWBE.js";import{m as me,z as V,c as Ie,C as le,A as y,aK as Be,B as re,o as B,x as je,d as D,b5 as Ln,q as z,Y as We,s as E,K as we,b6 as rt,b7 as ct,b8 as Un,ah as Nn,G as _n,aE as Mn,E as Zt,D as qe,H as Ke,b9 as Gn,aq as Ht,ba as On,V 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 Xn,bh as Yn,bi as Qn,bj as ei,I as ti,bk as ai,b1 as ni,bl as ii,bm as oi,a6 as li}from"./index-C4_7gLFp.js";import{n as U,S as si}from"./mui-D9TDAUAO.js";import{A as dt}from"./AddressScreen-BvwS_9z2.js";import{g as ie,a as Te,i as qt,V as Je,b as Xe,c as ri,v as ci,d as di,A as he,D as ge}from"./DomesticWireDetailScreen-CakALOxw.js";import{a as f}from"./sentry-C5UCCkb_.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-c_p-0pW7.js";import{c as Qe}from"./useFetchSuggestedQuestionsWhenReady-nzUYYA5P.js";import{u as Kt}from"./useInitialThreadRequest-qRRdn_eE.js";import Ee from"./NotFoundScreen-DVTblDpS.js";import{D as ui}from"./DrawerScreen-CG4hw7_P.js";import{M as Jt}from"./MobileAppDrawer-Bai_Lh0v.js";import{F as Xt}from"./FeaturePreviewScreen-IR7Qxf41.js";import{S as Pe}from"./SetupPagesScreen-D2dbZmg_.js";import{B as pi}from"./BillPayApprovalRoutes-ceqgfgGo.js";import{FallBackRoute as mi}from"./ScreenRoutes-DUF7lq8S.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.js";import"./analyticsHelper-RRbpObXJ.js";import"./routePaths-B7W4yhsS.js";import"./BusinessVerificationPageScreen-BtdKr5lT.js";import"./ReimbursementApprovalRuleDetailScreen-a-JX63nK.js";import"./getLocaleForTenant-FDoQOl0i.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]="fa467b09-5d31-4595-94df-18d4f01bad0a",e._sentryDebugIdIdentifier="sentry-dbid-fa467b09-5d31-4595-94df-18d4f01bad0a")}catch{}})();const bi=Y(function(e,t){const l=Ne(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:At(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(Ae(l,"retry")):e(Ae(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(Ae(t.billId,"refund"))},saveBillDetails:(o,s,n)=>{o&&e(Et({data:n,billId:l})),e(_e(o?"paid":"pending_approval",o,s,l))},discardOutsideZeniPaymentData:()=>{e(Bt({billId:l}))}}})(Ln);function hi(){const e=J(),t=se(),l=X(),{billId:i}=ae(),c=me(),r=V.getSignedInUser(),u=Ie(),o=v(G=>Z(G)),s=v(G=>Ne(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}=Ye({mobileExploreReferrer:"Bill Details"});Qe({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,x]=f.useState(!1),[C,_]=f.useState(!1),{useFeatureGate:T,useDynamicConfig:N}=le(),{isFeatureEnabled:$}=T(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=T(y.isBillPayCommentingEnabled),{isFeatureEnabled:H}=T(y.isBillPayDetectInsufficientFundsEnabled),{configValue:M}=N(Be.zeniAssistConfig),A=oa(o),q=wt(o.userRole),W=g&&pe(u?.loggedInUserRoleMap),L=M.user_ids!=null&&r?.userId!=null&&M.user_ids.includes(r?.userId),{isFeatureEnabled:K}=T(y.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:Q}=T(y.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{$&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&A===!1?_(!1):_(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,A,r]),f.useEffect(()=>{i!=null&&t(xt(i))},[i]),f.useEffect(()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(k(!0),t(Ct(i??"",$,L,!1)))},[b,s,i,t]),f.useEffect(()=>{j||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(x(!0),t($e(!1,$,L,Q,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 ${B.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:C,currentTenant:o,billId:i??"",isInternationalPaymentShaVsOurEnabled:K,hasZeniAssistAccess:L,isDetectInsufficientFundsEnabled:H,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const ye=qe.getLocalizedStrings().spendManagement.billPay.billDetails,gi={containerWidth:new Zt(100,58)},ut=Y(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:B.sp10,paddingRight:B.sp3,paddingBottom:"15px",paddingLeft:B.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)}}})(Mn);function w({appContent:e}){const t=se(),l=J(),{billId:i}=ae(),c=X(),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(Be.zeniAssistConfig),j=k.user_ids!=null&&n?.userId!=null&&k.user_ids.includes(n?.userId),x=v(F=>Z(F)),[C,_]=f.useState(!1),[T,N]=f.useState(!1),[$,I]=f.useState(!1),[H,M]=f.useState(),A=v(F=>Me(F,m,g,i));let q=A.fetchState,W=A.file,L=A.showAutofill;const K=v(F=>Ne(F,i??""));u===!1&&(q=K.fetchState,W=K.transactionDetails?.attachments?.[0],L=!1);const Q=A.billPayInfo!=null&&A.billPayInfo.stage.code==="pending_approval"?A.billPayInfo.billStatus.code:A.billStage;f.useEffect(()=>{i==null&&t(Ge(!0))},[i,t]),f.useEffect(()=>{q==="Not-Started"&&(u&&T?N(!1):!u&&C&&_(!1))},[i]),f.useEffect(()=>{C||i==null||u||(_(!0),t(Ct(i,h,j,!1)),T||(N(!0),t($e(!1,h,j,b,i)))),u&&!T&&(N(!0),t($e(!1,h,j,b,i)))},[C,T,u,i,t]);const G={onOkClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(Q??"",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(Q??"",F,n?.userEmail??"","no"),t(ha({file:H,billId:i}))}},ee=f.useCallback(()=>{const F=z(c.state?.pathnameStackToGoBack),ce=F.poppedPathname??ie(x.tenantEmailDomain);t(ke({billId:i})),l(ce,{state:{pathnameStackToGoBack:F.newStack}})},[c.state,x.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:A.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:I,setPayload:M,showActionButtons:!1,isInitialEdit:!!A.isInitialEdit,billStage:Q}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:!0})})]})}):a.jsxs(Fe,{windowSize:o,children:[o==="small"||L?null:a.jsx(pt,{children:a.jsx(Yt,{onClick:ee,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(Un,{}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:i==null})})]});{const F=A.billPayInfo!=null&&A.billPayInfo.stage.code==="pending_approval"?A.billPayInfo.billStatus.code:A.billStage;return a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[L&&o!=="small"?a.jsx(mt,{}):null,$?a.jsx(Nn,{titleComponent:a.jsx(wi,{children:ye.overwriteTitle}),descriptionComponent:a.jsx(xi,{children:ye.overwriteDescription}),primaryButtonText:ye.buttons.yes,secondaryButtonText:ye.buttons.no,action:G,isEditPopup:!0}):null,o==="small"||L?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:L,uploadStatus:A.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:Si(u,K,A),setShowConfirmationPopup:I,setPayload:M,showActionButtons:fi(u,A),isInitialEdit:!!A.isInitialEdit,billStage:F}),a.jsx(Ve,{windowSize:o,children:e})]})})}}function yi(){const{triggerBack:e}=Gn();return a.jsx(Yt,{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=U.div`
|
|
3
3
|
margin-bottom: 20px;
|
|
4
4
|
margin-top: 20px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as k}from"./liveblocks-D0ylGz77.js";import{a as V}from"./sentry-C5UCCkb_.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-DSsu1iyO.js";import{c as ce,C as ue,aK as de,z as B,x as pe,d as z,ac as x,f as E,bu as le,aq as me,s as P,ar as R}from"./index-
|
|
1
|
+
import{j as k}from"./liveblocks-D0ylGz77.js";import{a as V}from"./sentry-C5UCCkb_.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-DSsu1iyO.js";import{c as ce,C as ue,aK as de,z as B,x as pe,d as z,ac as x,f as E,bu as le,aq as me,s as P,ar as R}from"./index-C4_7gLFp.js";import{Nf as fe,eR as G,s9 as ye,HH as Se,xW as ge,AD as Ie,Da as he,DP as be,EI as De,NC as Oe,ND as Te,NE as ke,NF as Ce,NG as Ve,K9 as Ne,ME as we,Kl as Ae,kj as _e,fD as Fe,fC as ve,fB as xe,qa as Ee,q1 as Be,p_ as ze,kb as Pe,si as Re,sg as M,bE as L,su as U,cv as Me}from"./zeni-epic-state-CFQMpWBE.js";import{n as Le}from"./mui-D9TDAUAO.js";import{d as j}from"./routePaths-B7W4yhsS.js";import{M as Ue}from"./MobileAppDrawer-Bai_Lh0v.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]="a389e7da-31ac-4249-9ca8-df60b1c11669",e._sentryDebugIdIdentifier="sentry-dbid-a389e7da-31ac-4249-9ca8-df60b1c11669")}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-D0ylGz77.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-DSsu1iyO.js";import{eR as ie,bs as Re,Pa as ka,eV as be,eW as ye,eX as Se,fS as $e,cs as ze,Pb as Ke,Pc as Ma,to as ba,jL as ya,Pd as Sa,gP as oa,zW as Qe,zY as Ga,zZ as $a,jB as mt,Pe as Ye,zK as Ct,Pf as qt,Pg as Jt,zN as Da,Ph as Xt,Nz as _a,rA as pt,zT as za,g_ as Qt,Pi as ht,Pj as Ze,bq as en,Pk as an,fD as Pa,fC as wa,Ar as tn,fB as Ta,Nf as nn,Pl as ft,cl as gt,cN as rn,Ny as da,B1 as sn,Pm as tt,AD as Fa,Pn as bt,B2 as on,N_ as cn,B3 as dn,BZ as ln,sK as un,BT as mn,Ac as yt,A5 as Cn,Po as pn,fU as hn,Al as St,Ap as It,fT as fn,Pp as gn,AP as At,Pq as bn,Pr as yn,Ps as Sn,An as Et,A8 as kt,zQ as Dt,Ah as _t,Af as Pt,Aj as In,zX as nt,Pt as wt,Pu as va,AA as Ia,Ke as Tt,cO as Ka,Pv as An,Pw as En,Px as kn,Py as Dn,Ax as Na,AW as _n,AS as Pn,At as wn,AU as Tn,AK as Fn,AM as vn,Pz as Ft,B0 as vt,HD as Bn,PA as xn,PB as Ln,PC as Un,PD as Bt,PE as Rn,Bn as On,AC as xt,Aw as ca,AB as jn,PF as Nn,PG as Vn,zH as Hn,PH as Lt,PI as Ut,PJ as Mn,zJ as Gn,zI as rt,PK as $n,PL as zn,PM as Kn,Ka as Yn,PN as Ya,PO as Zn,wi as Rt,kj as Wn,gQ as qn,Bs as Jn,PP as Ot,PQ as Xn,Bt as Qn,PR as er,df as ar,ti as tr,Bi as nr,Bc as Ue,bv as rr,bF as sr,cx as or,bG as cr,Jn as ir}from"./zeni-epic-state-CFQMpWBE.js";import{z as Q,c as je,C as ce,A as K,B as la,bY as Ba,c7 as dr,q as ve,c8 as lr,c9 as ur,K as ua,aK as Fe,s as fe,bf as Za,ca as mr,E as ma,j as xa,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 Xa,a3 as hr,ce as fr,aq as jt,Y as Ha,V 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,I as Dr,co as _r,cp as Pr,cq as wr,cr as Tr,cs as Fr,a6 as vr}from"./index-CPG6ITBm.js";import{n as _e,D as Ht,S as Br}from"./mui-D9TDAUAO.js";import{a as i}from"./sentry-C5UCCkb_.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 xr,h as Qa,P as Lr,i as et,s as Xe,j as Gt,k as Me,l as $t,m as Ur,n as zt,p as Rr,S as st}from"./SetupPagesScreen-1j44PFay.js";import La from"./NotFoundScreen-B1k_jOem.js";import{M as Ge}from"./MobileAppDrawer-BLGo796K.js";import{u as Kt}from"./useAskAiCfoHostNavButtonProps-DaoVDdk6.js";import{c as Yt}from"./useFetchSuggestedQuestionsWhenReady-IH_yzaTd.js";import{v as ot}from"./utils-Cd1icpH6.js";import{t as Or}from"./AddressScreen-Ctnukryb.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./analyticsHelper-COFNU8CP.js";import"./routePaths-1uJ5ric0.js";import"./BusinessVerificationPageScreen-BFP865c-.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]="a1968c25-16a7-4c20-b9c0-7015c4283040",e._sentryDebugIdIdentifier="sentry-dbid-a1968c25-16a7-4c20-b9c0-7015c4283040")}catch{}})();function jr(){const e=le(),{cardId:t}=ia(),a=ue(),r=Q.getSignedInUser(),n=y(X=>ie(X)),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(X=>ka(X).firstViewAfterActivation);if(t==null)throw Error("Empty card id is not valid...");const _=n.userRole.includes("charge_card_user"),{isFeatureEnabled:A}=u(K.isChargeCardFeatureEnabled),f=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:R}=u(K.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(X=>$e(X,n.companyId)),N=ze(v.controllers),{creditAccount:L,creditAccountRepayment:w}=y(X=>Ke(X)),V=y(X=>X.classListState.fetchState),m=!_&&d&&f,l=y(X=>Ma(X,t,m,d)),[P,T]=i.useState(!1),H=l.chargeCard,U=H?.cardCreatedByUser?.userId,Z=y(X=>U!=null?ba(X.userRoleState,U):void 0),I=Z?.accountingClassIDs[0],x=y(X=>I!=null?ya(X.classState,{classId:I,reportId:"class_list"}):void 0),j=H?.cardHolderUser?.userId,O=y(X=>j!=null?ba(X.userRoleState,j):void 0),W=O?.accountingClassIDs[0],E=y(X=>W!=null?ya(X.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(Qe(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 X=Ce(n.tenantEmailDomain,t,r,H,c);e(X)}},[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 X=Ce(n.tenantEmailDomain,t,r);e(X)}},B=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(B,l);return l.fetchState!=="Completed"?s.jsx(la,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(Ba,{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:Z?.userRoles,cardIssuedByDepartmentName:x?.className,cardHolderRoles:O?.userRoles,cardHolderDepartmentName:E?.className})]})}const Nr=pe(function(e){const t=Ye(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=Q.getSignedInUser(),n=y(o=>ie(o)),[C,p]=i.useState(!1),u=y(o=>Ye(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=Q.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(K.isChargeCardFeatureEnabled),{isFeatureEnabled:L}=v(K.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}),Z=!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(Qe(n,Z,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(Xt({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 x=Q.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(Kr,{children:[s.jsx(Ge,{isAppContentDrawerOpen:f,handleDrawerToggle:W}),s.jsx($r,{cardId:n,card:d,shippingAddressId:d.shippingAddressId,phone:j.phone,signedInUser:F,isSandboxEnv:Za(),chargeCardDetailState:g,signedInUserToken:x,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=Qt(e.addressState,a);if(C==null)throw Error("Can't access shippingAddress.");const p=ht(e,n),u=t.updateStatus,S=Ze(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:xa.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&&Q.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-D0ylGz77.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-DSsu1iyO.js";import{eR as ie,bs as Re,Pa as ka,eV as be,eW as ye,eX as Se,fS as $e,cs as ze,Pb as Ke,Pc as Ma,to as ba,jL as ya,Pd as Sa,gP as oa,zW as Qe,zY as Ga,zZ as $a,jB as mt,Pe as Ye,zK as Ct,Pf as qt,Pg as Jt,zN as Da,Ph as Xt,Nz as _a,rA as pt,zT as za,g_ as Qt,Pi as ht,Pj as Ze,bq as en,Pk as an,fD as Pa,fC as wa,Ar as tn,fB as Ta,Nf as nn,Pl as ft,cl as gt,cN as rn,Ny as da,B1 as sn,Pm as tt,AD as Fa,Pn as bt,B2 as on,N_ as cn,B3 as dn,BZ as ln,sK as un,BT as mn,Ac as yt,A5 as Cn,Po as pn,fU as hn,Al as St,Ap as It,fT as fn,Pp as gn,AP as At,Pq as bn,Pr as yn,Ps as Sn,An as Et,A8 as kt,zQ as Dt,Ah as _t,Af as Pt,Aj as In,zX as nt,Pt as wt,Pu as va,AA as Ia,Ke as Tt,cO as Ka,Pv as An,Pw as En,Px as kn,Py as Dn,Ax as Na,AW as _n,AS as Pn,At as wn,AU as Tn,AK as Fn,AM as vn,Pz as Ft,B0 as vt,HD as Bn,PA as xn,PB as Ln,PC as Un,PD as Bt,PE as Rn,Bn as On,AC as xt,Aw as ca,AB as jn,PF as Nn,PG as Vn,zH as Hn,PH as Lt,PI as Ut,PJ as Mn,zJ as Gn,zI as rt,PK as $n,PL as zn,PM as Kn,Ka as Yn,PN as Ya,PO as Zn,wi as Rt,kj as Wn,gQ as qn,Bs as Jn,PP as Ot,PQ as Xn,Bt as Qn,PR as er,df as ar,ti as tr,Bi as nr,Bc as Ue,bv as rr,bF as sr,cx as or,bG as cr,Jn as ir}from"./zeni-epic-state-CFQMpWBE.js";import{z as Q,c as je,C as ce,A as K,B as la,bY as Ba,c7 as dr,q as ve,c8 as lr,c9 as ur,K as ua,aK as Fe,s as fe,bf as Za,ca as mr,E as ma,j as xa,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 Xa,a3 as hr,ce as fr,aq as jt,Y as Ha,V 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,I as Dr,co as _r,cp as Pr,cq as wr,cr as Tr,cs as Fr,a6 as vr}from"./index-C4_7gLFp.js";import{n as _e,D as Ht,S as Br}from"./mui-D9TDAUAO.js";import{a as i}from"./sentry-C5UCCkb_.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 xr,h as Qa,P as Lr,i as et,s as Xe,j as Gt,k as Me,l as $t,m as Ur,n as zt,p as Rr,S as st}from"./SetupPagesScreen-D2dbZmg_.js";import La from"./NotFoundScreen-DVTblDpS.js";import{M as Ge}from"./MobileAppDrawer-Bai_Lh0v.js";import{u as Kt}from"./useAskAiCfoHostNavButtonProps-c_p-0pW7.js";import{c as Yt}from"./useFetchSuggestedQuestionsWhenReady-nzUYYA5P.js";import{v as ot}from"./utils-Cd1icpH6.js";import{t as Or}from"./AddressScreen-BvwS_9z2.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./analyticsHelper-RRbpObXJ.js";import"./routePaths-B7W4yhsS.js";import"./BusinessVerificationPageScreen-BtdKr5lT.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]="a1968c25-16a7-4c20-b9c0-7015c4283040",e._sentryDebugIdIdentifier="sentry-dbid-a1968c25-16a7-4c20-b9c0-7015c4283040")}catch{}})();function jr(){const e=le(),{cardId:t}=ia(),a=ue(),r=Q.getSignedInUser(),n=y(X=>ie(X)),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(X=>ka(X).firstViewAfterActivation);if(t==null)throw Error("Empty card id is not valid...");const _=n.userRole.includes("charge_card_user"),{isFeatureEnabled:A}=u(K.isChargeCardFeatureEnabled),f=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:R}=u(K.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(X=>$e(X,n.companyId)),N=ze(v.controllers),{creditAccount:L,creditAccountRepayment:w}=y(X=>Ke(X)),V=y(X=>X.classListState.fetchState),m=!_&&d&&f,l=y(X=>Ma(X,t,m,d)),[P,T]=i.useState(!1),H=l.chargeCard,U=H?.cardCreatedByUser?.userId,Z=y(X=>U!=null?ba(X.userRoleState,U):void 0),I=Z?.accountingClassIDs[0],x=y(X=>I!=null?ya(X.classState,{classId:I,reportId:"class_list"}):void 0),j=H?.cardHolderUser?.userId,O=y(X=>j!=null?ba(X.userRoleState,j):void 0),W=O?.accountingClassIDs[0],E=y(X=>W!=null?ya(X.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(Qe(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 X=Ce(n.tenantEmailDomain,t,r,H,c);e(X)}},[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 X=Ce(n.tenantEmailDomain,t,r);e(X)}},B=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(B,l);return l.fetchState!=="Completed"?s.jsx(la,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(Ba,{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:Z?.userRoles,cardIssuedByDepartmentName:x?.className,cardHolderRoles:O?.userRoles,cardHolderDepartmentName:E?.className})]})}const Nr=pe(function(e){const t=Ye(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=Q.getSignedInUser(),n=y(o=>ie(o)),[C,p]=i.useState(!1),u=y(o=>Ye(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=Q.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(K.isChargeCardFeatureEnabled),{isFeatureEnabled:L}=v(K.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}),Z=!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(Qe(n,Z,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(Xt({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 x=Q.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(Kr,{children:[s.jsx(Ge,{isAppContentDrawerOpen:f,handleDrawerToggle:W}),s.jsx($r,{cardId:n,card:d,shippingAddressId:d.shippingAddressId,phone:j.phone,signedInUser:F,isSandboxEnv:Za(),chargeCardDetailState:g,signedInUserToken:x,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=Qt(e.addressState,a);if(C==null)throw Error("Can't access shippingAddress.");const p=ht(e,n),u=t.updateStatus,S=Ze(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:xa.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&&Q.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-D0ylGz77.js";import{a as g}from"./sentry-C5UCCkb_.js";import{j as w,h as k,u as x,l as T,g as O,k as E}from"./core-DSsu1iyO.js";import{z as C,b1 as F,x as P,d as V,f as A,ac as b,b2 as j,aq as L,ar as M,s as U}from"./index-
|
|
1
|
+
import{j as m}from"./liveblocks-D0ylGz77.js";import{a as g}from"./sentry-C5UCCkb_.js";import{j as w,h as k,u as x,l as T,g as O,k as E}from"./core-DSsu1iyO.js";import{z as C,b1 as F,x as P,d as V,f as A,ac as b,b2 as j,aq as L,ar as M,s as U}from"./index-C4_7gLFp.js";import{eR as D,fF as _,s9 as B,fA as R,c2 as z,ME as G,bn as q,qa as H,p_ as Y,kb as Z,lH as S,MF as $,bE as J,cv as N,lP as K,lS as Q}from"./zeni-epic-state-CFQMpWBE.js";import"./mui-D9TDAUAO.js";import{d as W}from"./routePaths-B7W4yhsS.js";import{M as X}from"./MobileAppDrawer-Bai_Lh0v.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="5ca53598-2b1d-4059-bd25-5d45af329a76",n._sentryDebugIdIdentifier="sentry-dbid-5ca53598-2b1d-4059-bd25-5d45af329a76")}catch{}})();const ee=E(function(n){const t=R(n),i=C.getSignedInUser(),l=D(n),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(n.companyConfigState),a=n.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:t.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:t,allIndustries:e.companyIndustries??[],allNationalityCountries:a,isDisabled:f,authParams:p,filesEndPoint:`${L.fileMicroServiceBaseUrl}`,isZeniUser:q(i)}},function(n,t){const{companyId:i,currentTenant:l,navigate:c,location:p}=t,{tenantEmailDomain:f}=l;return{onScheduleClick:e=>{let a=e.href;a.includes("http")||(a="https://".concat(a)),window.open(a,"_blank")},onSaveAll:()=>{n(Q())},onAddressClick:e=>{const a=W(f,e),o=U(p.state?.pathnameStackToGoBack,p.pathname);c(a,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{n(K({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:a,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=a,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...a,website:u!=""&&u!=null?N(u):void 0,meetingLink:y!=""&&y!=null?N(y):void 0,industry:a.industry.selectedOption,companyIndustryType:a.companyIndustryType?.selectedOption??void 0,companySubIndustry:a.companySubIndustry?.selectedOption??void 0,businessModel:a.businessModel.selectedOption??"",companySourceOfFunds:a.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:a.companySourceOfFundsDescription??void 0,countriesOfOperations:a.countriesOfOperations?.selectedOptions?.map(I=>I.length===2?I:M(I))??[],transactionVolume:a.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:a.transactionVolumeDescription??void 0,regulatedStatus:a.regulatedStatus??void 0,regulatedStatusDescription:a.regulatedStatusDescription??void 0,usNexus:a.usNexus??void 0,usNexusTypes:a.usNexusTypes?.selectedOptions??[],purposeOfAccount:a.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:a.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?J(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:h.selectedOptions.map(I=>parseInt(I)),fileId:r.fileIds[0]}};n(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{n(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{n(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=>{n($(e))},onCompanyOfficerUpdated:e=>{n(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=>{n(Z({files:e}))},onDeleteFile:e=>{n(Y(e))},onEditFileName:(e,a)=>{n(H(e,a.split(".")[0]))}}})(j);function de(){const n=w(),t=k(),i=x(),{tenantEmailDomain:l}=T(),[c,p]=g.useState(!1),[f,e]=g.useState(!1),a=O(s=>s.companyViewState.passportView.fetchState),o=O(s=>s.companyConfigState.fetchState),r=O(s=>D(s)),d=r.companyId??C.getSignedInUserTenant(l)?.companyId;if(C.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect(()=>{c||a!=="Not-Started"||d==null||(p(!0),t(_(d)))},[c,a,d,t]),g.useEffect(()=>{o==="Not-Started"&&t(B())},[o,t]);const u=s=>{e(s)},y=a==="Not-Started"||a==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&a==="Error"?m.jsx(F,{onGoHome:()=>n("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:V,onLoad:s=>s.trackPageLoaded(A.Event.companyPassport,b(i)?"Settings":"Company Passport")}),b(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:n,location:i,isLoading:y,currentTenant:r,isSettings:b(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-D0ylGz77.js";import{a}from"./sentry-C5UCCkb_.js";import{h as D,u as v,g as u,N as w}from"./core-DSsu1iyO.js";import{Jj as O,eR as A,fm as _,mT as j,fO as h,fl as U,eS as L,Jq as F}from"./zeni-epic-state-CFQMpWBE.js";import{u as $,z as p,L as g,D as k,o as H}from"./index-
|
|
1
|
+
import{j as C}from"./liveblocks-D0ylGz77.js";import{a}from"./sentry-C5UCCkb_.js";import{h as D,u as v,g as u,N as w}from"./core-DSsu1iyO.js";import{Jj as O,eR as A,fm as _,mT as j,fO as h,fl as U,eS as L,Jq as F}from"./zeni-epic-state-CFQMpWBE.js";import{u as $,z as p,L as g,D as k,o as H}from"./index-C4_7gLFp.js";import{n as R}from"./mui-D9TDAUAO.js";import{t as z}from"./getLocaleForTenant-FDoQOl0i.js";import{g as J,Q as P}from"./QBOConnectionScreen-CKCjqZzP.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.js";import"./empty-CXjJmklp.js";import"./pdf-lib-DbsQH8ti.js";import"./index-XYg74ieW.js";import"./url-Bow-X1Kk.js";import"./index-CZgOkU7x.js";import"./decodeURIComponentSafe-CRFR6Y3w.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new t.Error().stack;d&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[d]="f49bc0e1-3e98-4358-b715-a70149e137a5",t._sentryDebugIdIdentifier="sentry-dbid-f49bc0e1-3e98-4358-b715-a70149e137a5")}catch{}})();const q=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-D0ylGz77.js";import{z as a}from"./index-
|
|
1
|
+
import{j as i}from"./liveblocks-D0ylGz77.js";import{z as a}from"./index-C4_7gLFp.js";import{g as n}from"./QBOConnectionScreen-CKCjqZzP.js";import"./sentry-C5UCCkb_.js";import{u as p,N as s}from"./core-DSsu1iyO.js";import"./zeni-epic-state-CFQMpWBE.js";import"./recharts-C7IODwRw.js";import"./mui-D9TDAUAO.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.js";import"./empty-CXjJmklp.js";import"./pdf-lib-DbsQH8ti.js";import"./index-XYg74ieW.js";import"./url-Bow-X1Kk.js";import"./index-CZgOkU7x.js";import"./decodeURIComponentSafe-CRFR6Y3w.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-DQC5OT_-.js → CustomerOnboardingRoutes-DAjpcWcH.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-D0ylGz77.js";import{t as Ke,A as Ce}from"./AddressScreen-
|
|
1
|
+
import{j as a}from"./liveblocks-D0ylGz77.js";import{t as Ke,A as Ce}from"./AddressScreen-BvwS_9z2.js";import $e from"./NotFoundScreen-DVTblDpS.js";import{a as g}from"./sentry-C5UCCkb_.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-DSsu1iyO.js";import{I as de,c as le,z as B,C as ue,m as qe,A as _,s as V,x as J,d as N,B as we,f as X,am as Qe,K as Ze,an as ke,j as te,ao as He,ap as Ie,o as Je,aq as We,ar as Ee,as as Xe}from"./index-C4_7gLFp.js";import{bn as Ye,eR as ee,fe as et,eX as pe,eV as me,bv as tt,mR as at,fa as nt,bO as ot,jf as ae,ji as ve,JP as st,bT as it,c2 as ge,sn as he,s8 as rt,Kj as Y,so as _e,HH as ct,kj as Ue,Kk as Ve,Kl as dt,Km as lt,Kn as ut,jd as pt,jg as mt,sa as Be,sm as gt,bE as Te,cv as ht,sA as xe,qa as ft,p_ as yt,kb as bt,fD as St,fC as Ct,fB as kt,Ko as It,s2 as Et,sB as Tt,sE as xt,sH as Ot,sN as Pt,cU as At}from"./zeni-epic-state-CFQMpWBE.js";import{n as fe}from"./mui-D9TDAUAO.js";import{g as Dt,h as Ft,q as ne}from"./QBOConnectionScreen-CKCjqZzP.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.js";import"./empty-CXjJmklp.js";import"./pdf-lib-DbsQH8ti.js";import"./index-XYg74ieW.js";import"./url-Bow-X1Kk.js";import"./index-CZgOkU7x.js";import"./decodeURIComponentSafe-CRFR6Y3w.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]="497c161b-9636-439b-826a-92fe54535a50",t._sentryDebugIdIdentifier="sentry-dbid-497c161b-9636-439b-826a-92fe54535a50")}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,b]=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),R=L&&j,O=D(l=>l.onboardingCustomerViewState.fetchState),S=c.excludedResources,G=c.companyId??B.getSignedInUserTenant(e)?.companyId;if(i==null)throw Error("Can't access onboarding flow without signing in...");const w=pe(F,c),P=me(c),A=[],Q=S?.resources?.find(l=>l.resource==="/reports/top_expenses")==null,$=S?.resources?.find(l=>l.resource==="/reports/task_card")==null,M=c?.userRole!=null&&tt(c?.userRole),v=S?.resources?.find(l=>l.resource==="/bills")==null&&!M,q=S?.resources?.find(l=>l.resource==="/reimbursements")==null;if(Q===!1&&A.push("top_expenses"),$===!1&&A.push("task_card"),v===!1&&A.push("bill_pay_card","bill_pay_promo_card"),q===!1&&A.push("reimbursement_card","reimbursement_promo_card"),k===!1&&A.push("zeni_accounts_promo_card"),f===!1&&A.push("rewards_card"),g.useEffect(()=>{O!=="Completed"||d||w||P||(r(!0),s(at(i.userId,G,c.tenantId,!0,!1,A)))},[d,O,w,P,i,c.tenantId,s]),g.useEffect(()=>{(w||P)&&setTimeout(()=>{b(!0)},5e3)},[w,P]),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(P)return a.jsx(E,{to:"../../cards",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}})}return n?.loggedInUserRoleMap!=null?a.jsxs(a.Fragment,{children:[a.jsx(J,{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:R,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-D0ylGz77.js";import{l as z,g as S,u as q,h as $,j as Z,k as Q,s as qa,n as st,o as w}from"./core-DSsu1iyO.js";import{eR as L,KE as Ve,bE as Gt,bq as he,LR as Za,i3 as Ha,LS as wt,LT as Qa,i6 as rt,LU as Le,LV as Xa,ib as Wa,LW as Dt,LX as Ja,ig as it,LY as Ue,LZ as en,cl as lt,L_ as tn,L$ as an,KY as nn,j9 as on,M0 as sn,bn as Te,M1 as Nt,Ks as ae,bc as $t,jn as zt,m$ as Kt,j6 as qt,Ku as ne,Kt as H,f6 as rn,eO as cn,fo as ln,M2 as dn,M3 as un,M4 as Zt,M5 as Se,uh as xe,ui as we,uF as fe,uz as oe,um as De,M6 as mn,M7 as pn,M8 as hn,M9 as Ht,Ma as ye,Mb as fn,dE as Ge,qK as Qt,Mc as gn,Md as bn,Me as Cn,Mf as dt,JR as ut,jD as ge,uN as mt,qS as _n,Mg as kn,uj as Ft,qN as me,qJ as Xt,Mh as ie,Mi as Sn,Mj as pt,JQ as ht,sR as Wt,Mk as yn,Ml as An,Mm as vn,Mn as ft,t2 as En,Mo as In,ul as Ot,sQ as Jt,Mp as ce,Mq as Tn,bv as ea,uR as ta,Mr as xn,Ms as wn,Mt as Dn,Mu as gt,uM as Fn,Mv as On,uk as Pt,uQ as aa,Mw as le,Mx as Pn,My as Mn,Mz as na,js as oa,mY as sa,jx as ra,mW as ia,mV as ca,mU as la,sd as Rn,fe as Bn,cO as jn,cP as Ln,mR as Un,fa as Yn,n6 as Vn,DV as Mt,MA as Gn,MB as Nn,MC as $n,MD as zn,b5 as bt,f1 as Kn,gN as qn,fF as Zn,n0 as Hn,i$ as Qn,mZ as Xn,mX as Wn,eX as Jn,eV as eo}from"./zeni-epic-state-CFQMpWBE.js";import{z as R,Y as X,s as D,d as I,D as K,aR as to,x as Fe,aS as da,f as G,aT as ao,c as be,aU as ua,C as Ce,A as B,m as no,aV as oo,aW as so,U as ma,K as ro,a as pa,a1 as io,aK as ha,aX as co,aY as lo,X as uo,aZ as mo,a_ as po,an as ho,q as fo,V as go,a$ as bo,b0 as ve}from"./index-CPG6ITBm.js";import{n as Ct}from"./mui-D9TDAUAO.js";import{a as C}from"./sentry-C5UCCkb_.js";import{w as fa}from"./withTransactionSidePanel-xau0uwsY.js";import{c as ga,t as _e,f as se,a as _t,v as Co}from"./routePaths-1uJ5ric0.js";import{u as W}from"./useAskAiCfoHostNavButtonProps-DaoVDdk6.js";import{c as Oe,b as _o,u as ko}from"./useFetchSuggestedQuestionsWhenReady-IH_yzaTd.js";import Ie from"./NotFoundScreen-B1k_jOem.js";import{u as ba}from"./useInitialThreadRequest-C_MqgvcA.js";import{t as Ca}from"./analyticsHelper-COFNU8CP.js";import{C as So}from"./CompanyPassportScreen-CUrTGAPx.js";import{F as yo}from"./FeaturePreviewScreen-BWUt3LEA.js";import{R as Ao}from"./ReferralListScreen-BKwWhmDP.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.js";import"./TransactionDetailScreen-AbBGaDF8.js";import"./decodeURIComponentSafe-CRFR6Y3w.js";import"./MobileAppDrawer-BLGo796K.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]="b5955c14-8dda-491b-ae5b-12fd053344e8",e._sentryDebugIdIdentifier="sentry-dbid-b5955c14-8dda-491b-ae5b-12fd053344e8")}catch{}})();const vo=fa(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=z(),s=R.getSignedInUser(),i=S(A=>A.tenantState.currentTenantId),d=S(A=>L(A)),{tenantEmailDomain:h}=z(),_=q(),g=d?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=C.useMemo(()=>({authParams:u,companyName:g,downloadEndPoint:`${X}/agingDetailedReport`,timezone:Ve()}),[]),m=C.useMemo(()=>r!=null?Gt(r):he(),[r]),p=$(),f=Z(),k=S(A=>Za(A,m,o)),T=C.useCallback(()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&p(Ha(o,m))},[m]),b=C.useCallback(()=>{f("../../",{relative:"path"})},[]),y=C.useCallback((A,U)=>{p(wt({sortKey:A,sortOrder:U}))},[]),F=C.useCallback(A=>{p(wt({downloadState:A}))},[]),j=C.useCallback(A=>{if(e)e(A.transactionId,A.transactionType);else if(h!=null){const U=ga({id:A.transactionId,type:A.transactionType},h);f(U);const de=D(_.state?.pathnameStackToGoBack,_.pathname);f(U,{state:{pathnameStackToGoBack:de}})}},[h,e]),v=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(()=>{T()},[]),C.useEffect(()=>{k.fetchState==="Completed"&&v()},[v,k.fetchState]),l.jsx(to,{apAgingDetail:k,downloadParams:c,reportDate:m,analytics:I,onTransactionClick:j,onReload:T,onBackClick:b,onColumnSortConfigChanged:y,updateDownloadStateHandler:F,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Eo=()=>{const e=$(),a=Z(),t=S(y=>Qa(y)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=W({mobileExploreReferrer:"AP Aging"});Oe({isDataReady:t.fetchState==="Completed"});const r=R.getSignedInUser(),s=S(y=>y.tenantState.currentTenantId),i=S(y=>L(y)),d=i?.companyName??"",h={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},_=C.useMemo(()=>({authParams:h,companyName:d,downloadEndPoint:`${X}/agingReport`,timezone:Ve()}),[]),g=t.apAgingUIState.selectedDate??he(),u=C.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(rt(g))},[]);C.useEffect(()=>{u()},[]);const c=C.useCallback(()=>{a("../",{relative:"path"})},[]),m=C.useCallback(y=>{e(Le({searchString:y}))},[]),p=C.useCallback((y,F)=>{e(Le({sortKey:F,sortOrder:y}))},[]),f=C.useCallback(y=>{a(`./${y}/${g.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),k=C.useCallback(y=>{e(Le({downloadState:y}))},[]),T=C.useCallback((y,F)=>{},[]),b=C.useCallback((y,F)=>{e(Le({selectedDate:y,agingDateSelectionType:F})),e(rt(y))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(Fe,{analytics:I,onLoad:y=>y.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:p,onEntityNameClick:f,updateDownloadStateHandler:k,onSelectedDateChanged:b,onNodeCollapseToggled:T,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(v=>L(v)),{tenantEmailDomain:d}=z(),h=q(),_=i.companyName,g={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=C.useMemo(()=>({authParams:g,companyName:_,downloadEndPoint:`${X}/agingDetailedReport`,timezone:Ve()}),[]),c=C.useMemo(()=>r!=null?Gt(r):he(),[r]),m=$(),p=Z(),f=S(v=>Xa(v,c,o)),k=C.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&m(Wa(o,c))},[c]),T=C.useCallback(()=>{p("../../",{relative:"path"})},[]),b=C.useCallback((v,A)=>{m(Dt({sortKey:v,sortOrder:A}))},[]),y=C.useCallback(v=>{m(Dt({downloadState:v}))},[]),F=C.useCallback(v=>{if(e)e(v.transactionId,v.transactionType);else if(d!=null){const A=ga({id:v.transactionId,type:v.transactionType},d);p(A);const U=D(h.state?.pathnameStackToGoBack,h.pathname);p(A,{state:{pathnameStackToGoBack:U}})}},[d,e]),j=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"&&j()},[f.fetchState,j]),l.jsx(ao,{arAgingDetail:f,downloadParams:u,reportDate:c,analytics:I,onTransactionClick:F,onReload:k,onBackClick:T,onColumnSortConfigChanged:b,updateDownloadStateHandler:y,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),To=()=>{const e=$(),a=Z(),t=S(b=>Ja(b)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=W({mobileExploreReferrer:"AR Aging"});Oe({isDataReady:t.fetchState==="Completed"});const r=R.getSignedInUser(),s=S(b=>L(b)),i=s.companyName,d={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},h=C.useMemo(()=>({authParams:d,companyName:i,downloadEndPoint:`${X}/agingReport`,timezone:Ve()}),[]),_=t.arAgingUIState.selectedDate??he(),g=C.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(it(_))},[]);C.useEffect(()=>{g()},[]);const u=C.useCallback(()=>{a("../",{relative:"path"})},[]),c=C.useCallback(b=>{e(Ue({searchString:b}))},[]),m=C.useCallback((b,y)=>{e(Ue({sortKey:y,sortOrder:b}))},[]),p=C.useCallback(b=>{a(`./${b}/${_.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[_]),f=C.useCallback(b=>{e(Ue({downloadState:b}))},[]),k=C.useCallback((b,y)=>{e(Ue({selectedDate:b,agingDateSelectionType:y})),e(it(b))},[]),T=C.useCallback((b,y)=>{e(en({nodeId:b,isCollapsed:y}))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(Fe,{analytics:I,onLoad:b=>b.trackPageLoaded(G.Event.agingReport,"AR Aging")}):null,l.jsx(da,{uiState:t.arAgingUIState,report:t,downloadParams:h,analytics:I,onReloadReport:g,onBackClick:u,onSearchTextChange:c,onSortOrderChange:m,onEntityNameClick:p,updateDownloadStateHandler:f,onSelectedDateChanged:k,onNodeCollapseToggled:T,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},_a=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function ka(e,a){const t=nn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=_e(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(on(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=Q(function(e){const a=tn(e).accountsInOrder.map((n,o)=>_a(n,o)),t=an(e);return{sectionTitle:K.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:I}},ka)(ua),wo=Q(function(e){const a=sn(e).accountsInOrder.map((o,r)=>_a(o,r)),t=R.getSignedInUser(),n=Te(t);return{sectionTitle:K.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:I}},ka)(ua);function Do(){const e=Z(),a=q(),{tenantEmailDomain:t}=z(),n=be(),o=S(s=>L(s).company?.companyInfo.firstMonthOfFY??1),r=lt(n?.loggedInUserRoleMap);return S(s=>s.cashBalanceState.fetchState)==="Error"?l.jsx(Ie,{}):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=be(),o=lt(n?.loggedInUserRoleMap),r=S(s=>L(s).company?.companyInfo.firstMonthOfFY??1);return S(s=>s.cardBalanceState.fetchState)==="Error"?l.jsx(Ie,{}):l.jsx(wo,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const Oo=Ct.div`
|
|
1
|
+
import{j as l}from"./liveblocks-D0ylGz77.js";import{l as z,g as S,u as q,h as $,j as Z,k as Q,s as qa,n as st,o as w}from"./core-DSsu1iyO.js";import{eR as L,KE as Ve,bE as Gt,bq as he,LR as Za,i3 as Ha,LS as wt,LT as Qa,i6 as rt,LU as Le,LV as Xa,ib as Wa,LW as Dt,LX as Ja,ig as it,LY as Ue,LZ as en,cl as lt,L_ as tn,L$ as an,KY as nn,j9 as on,M0 as sn,bn as Te,M1 as Nt,Ks as ae,bc as $t,jn as zt,m$ as Kt,j6 as qt,Ku as ne,Kt as H,f6 as rn,eO as cn,fo as ln,M2 as dn,M3 as un,M4 as Zt,M5 as Se,uh as xe,ui as we,uF as fe,uz as oe,um as De,M6 as mn,M7 as pn,M8 as hn,M9 as Ht,Ma as ye,Mb as fn,dE as Ge,qK as Qt,Mc as gn,Md as bn,Me as Cn,Mf as dt,JR as ut,jD as ge,uN as mt,qS as _n,Mg as kn,uj as Ft,qN as me,qJ as Xt,Mh as ie,Mi as Sn,Mj as pt,JQ as ht,sR as Wt,Mk as yn,Ml as An,Mm as vn,Mn as ft,t2 as En,Mo as In,ul as Ot,sQ as Jt,Mp as ce,Mq as Tn,bv as ea,uR as ta,Mr as xn,Ms as wn,Mt as Dn,Mu as gt,uM as Fn,Mv as On,uk as Pt,uQ as aa,Mw as le,Mx as Pn,My as Mn,Mz as na,js as oa,mY as sa,jx as ra,mW as ia,mV as ca,mU as la,sd as Rn,fe as Bn,cO as jn,cP as Ln,mR as Un,fa as Yn,n6 as Vn,DV as Mt,MA as Gn,MB as Nn,MC as $n,MD as zn,b5 as bt,f1 as Kn,gN as qn,fF as Zn,n0 as Hn,i$ as Qn,mZ as Xn,mX as Wn,eX as Jn,eV as eo}from"./zeni-epic-state-CFQMpWBE.js";import{z as R,Y as X,s as D,d as I,D as K,aR as to,x as Fe,aS as da,f as G,aT as ao,c as be,aU as ua,C as Ce,A as B,m as no,aV as oo,aW as so,U as ma,K as ro,a as pa,a1 as io,aK as ha,aX as co,aY as lo,X as uo,aZ as mo,a_ as po,an as ho,q as fo,V as go,a$ as bo,b0 as ve}from"./index-C4_7gLFp.js";import{n as Ct}from"./mui-D9TDAUAO.js";import{a as C}from"./sentry-C5UCCkb_.js";import{w as fa}from"./withTransactionSidePanel-CH7Cbdk4.js";import{c as ga,t as _e,f as se,a as _t,v as Co}from"./routePaths-B7W4yhsS.js";import{u as W}from"./useAskAiCfoHostNavButtonProps-c_p-0pW7.js";import{c as Oe,b as _o,u as ko}from"./useFetchSuggestedQuestionsWhenReady-nzUYYA5P.js";import Ie from"./NotFoundScreen-DVTblDpS.js";import{u as ba}from"./useInitialThreadRequest-qRRdn_eE.js";import{t as Ca}from"./analyticsHelper-RRbpObXJ.js";import{C as So}from"./CompanyPassportScreen-CA0HpKiQ.js";import{F as yo}from"./FeaturePreviewScreen-IR7Qxf41.js";import{R as Ao}from"./ReferralListScreen-QLxqWfUk.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.js";import"./TransactionDetailScreen-DMDwXid_.js";import"./decodeURIComponentSafe-CRFR6Y3w.js";import"./MobileAppDrawer-Bai_Lh0v.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]="b5955c14-8dda-491b-ae5b-12fd053344e8",e._sentryDebugIdIdentifier="sentry-dbid-b5955c14-8dda-491b-ae5b-12fd053344e8")}catch{}})();const vo=fa(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=z(),s=R.getSignedInUser(),i=S(A=>A.tenantState.currentTenantId),d=S(A=>L(A)),{tenantEmailDomain:h}=z(),_=q(),g=d?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=C.useMemo(()=>({authParams:u,companyName:g,downloadEndPoint:`${X}/agingDetailedReport`,timezone:Ve()}),[]),m=C.useMemo(()=>r!=null?Gt(r):he(),[r]),p=$(),f=Z(),k=S(A=>Za(A,m,o)),T=C.useCallback(()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&p(Ha(o,m))},[m]),b=C.useCallback(()=>{f("../../",{relative:"path"})},[]),y=C.useCallback((A,U)=>{p(wt({sortKey:A,sortOrder:U}))},[]),F=C.useCallback(A=>{p(wt({downloadState:A}))},[]),j=C.useCallback(A=>{if(e)e(A.transactionId,A.transactionType);else if(h!=null){const U=ga({id:A.transactionId,type:A.transactionType},h);f(U);const de=D(_.state?.pathnameStackToGoBack,_.pathname);f(U,{state:{pathnameStackToGoBack:de}})}},[h,e]),v=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(()=>{T()},[]),C.useEffect(()=>{k.fetchState==="Completed"&&v()},[v,k.fetchState]),l.jsx(to,{apAgingDetail:k,downloadParams:c,reportDate:m,analytics:I,onTransactionClick:j,onReload:T,onBackClick:b,onColumnSortConfigChanged:y,updateDownloadStateHandler:F,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Eo=()=>{const e=$(),a=Z(),t=S(y=>Qa(y)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=W({mobileExploreReferrer:"AP Aging"});Oe({isDataReady:t.fetchState==="Completed"});const r=R.getSignedInUser(),s=S(y=>y.tenantState.currentTenantId),i=S(y=>L(y)),d=i?.companyName??"",h={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},_=C.useMemo(()=>({authParams:h,companyName:d,downloadEndPoint:`${X}/agingReport`,timezone:Ve()}),[]),g=t.apAgingUIState.selectedDate??he(),u=C.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(rt(g))},[]);C.useEffect(()=>{u()},[]);const c=C.useCallback(()=>{a("../",{relative:"path"})},[]),m=C.useCallback(y=>{e(Le({searchString:y}))},[]),p=C.useCallback((y,F)=>{e(Le({sortKey:F,sortOrder:y}))},[]),f=C.useCallback(y=>{a(`./${y}/${g.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),k=C.useCallback(y=>{e(Le({downloadState:y}))},[]),T=C.useCallback((y,F)=>{},[]),b=C.useCallback((y,F)=>{e(Le({selectedDate:y,agingDateSelectionType:F})),e(rt(y))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(Fe,{analytics:I,onLoad:y=>y.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:p,onEntityNameClick:f,updateDownloadStateHandler:k,onSelectedDateChanged:b,onNodeCollapseToggled:T,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(v=>L(v)),{tenantEmailDomain:d}=z(),h=q(),_=i.companyName,g={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=C.useMemo(()=>({authParams:g,companyName:_,downloadEndPoint:`${X}/agingDetailedReport`,timezone:Ve()}),[]),c=C.useMemo(()=>r!=null?Gt(r):he(),[r]),m=$(),p=Z(),f=S(v=>Xa(v,c,o)),k=C.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&m(Wa(o,c))},[c]),T=C.useCallback(()=>{p("../../",{relative:"path"})},[]),b=C.useCallback((v,A)=>{m(Dt({sortKey:v,sortOrder:A}))},[]),y=C.useCallback(v=>{m(Dt({downloadState:v}))},[]),F=C.useCallback(v=>{if(e)e(v.transactionId,v.transactionType);else if(d!=null){const A=ga({id:v.transactionId,type:v.transactionType},d);p(A);const U=D(h.state?.pathnameStackToGoBack,h.pathname);p(A,{state:{pathnameStackToGoBack:U}})}},[d,e]),j=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"&&j()},[f.fetchState,j]),l.jsx(ao,{arAgingDetail:f,downloadParams:u,reportDate:c,analytics:I,onTransactionClick:F,onReload:k,onBackClick:T,onColumnSortConfigChanged:b,updateDownloadStateHandler:y,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),To=()=>{const e=$(),a=Z(),t=S(b=>Ja(b)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=W({mobileExploreReferrer:"AR Aging"});Oe({isDataReady:t.fetchState==="Completed"});const r=R.getSignedInUser(),s=S(b=>L(b)),i=s.companyName,d={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},h=C.useMemo(()=>({authParams:d,companyName:i,downloadEndPoint:`${X}/agingReport`,timezone:Ve()}),[]),_=t.arAgingUIState.selectedDate??he(),g=C.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(it(_))},[]);C.useEffect(()=>{g()},[]);const u=C.useCallback(()=>{a("../",{relative:"path"})},[]),c=C.useCallback(b=>{e(Ue({searchString:b}))},[]),m=C.useCallback((b,y)=>{e(Ue({sortKey:y,sortOrder:b}))},[]),p=C.useCallback(b=>{a(`./${b}/${_.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[_]),f=C.useCallback(b=>{e(Ue({downloadState:b}))},[]),k=C.useCallback((b,y)=>{e(Ue({selectedDate:b,agingDateSelectionType:y})),e(it(b))},[]),T=C.useCallback((b,y)=>{e(en({nodeId:b,isCollapsed:y}))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(Fe,{analytics:I,onLoad:b=>b.trackPageLoaded(G.Event.agingReport,"AR Aging")}):null,l.jsx(da,{uiState:t.arAgingUIState,report:t,downloadParams:h,analytics:I,onReloadReport:g,onBackClick:u,onSearchTextChange:c,onSortOrderChange:m,onEntityNameClick:p,updateDownloadStateHandler:f,onSelectedDateChanged:k,onNodeCollapseToggled:T,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},_a=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function ka(e,a){const t=nn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=_e(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(on(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=Q(function(e){const a=tn(e).accountsInOrder.map((n,o)=>_a(n,o)),t=an(e);return{sectionTitle:K.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:I}},ka)(ua),wo=Q(function(e){const a=sn(e).accountsInOrder.map((o,r)=>_a(o,r)),t=R.getSignedInUser(),n=Te(t);return{sectionTitle:K.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:I}},ka)(ua);function Do(){const e=Z(),a=q(),{tenantEmailDomain:t}=z(),n=be(),o=S(s=>L(s).company?.companyInfo.firstMonthOfFY??1),r=lt(n?.loggedInUserRoleMap);return S(s=>s.cashBalanceState.fetchState)==="Error"?l.jsx(Ie,{}):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=be(),o=lt(n?.loggedInUserRoleMap),r=S(s=>L(s).company?.companyInfo.firstMonthOfFY??1);return S(s=>s.cardBalanceState.fetchState)==="Error"?l.jsx(Ie,{}):l.jsx(wo,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const Oo=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-D0ylGz77.js";import{a as u}from"./sentry-C5UCCkb_.js";import{h as y,g as b,k as w,u as A,N as k}from"./core-DSsu1iyO.js";import{Jj as N,eR as _,fm as R,Jk as U,mT as L,Jl as z}from"./zeni-epic-state-CFQMpWBE.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-D0ylGz77.js";import{a as u}from"./sentry-C5UCCkb_.js";import{h as y,g as b,k as w,u as A,N as k}from"./core-DSsu1iyO.js";import{Jj as N,eR as _,fm as R,Jk as U,mT as L,Jl as z}from"./zeni-epic-state-CFQMpWBE.js";import{u as j,z as f,L as T,t as I,D as O,b as $}from"./index-C4_7gLFp.js";import"./mui-D9TDAUAO.js";import{t as P}from"./getLocaleForTenant-FDoQOl0i.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.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]="ff9c1764-494a-44e1-80ae-33634ddcd3fb",t._sentryDebugIdIdentifier="sentry-dbid-ff9c1764-494a-44e1-80ae-33634ddcd3fb")}catch{}})();const J=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(R(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"&&!U(i))&&t(L(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(J,{})}const Q=["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 Q)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
|
package/dist/assets/{DomesticWireDetailScreen-CluJV1hP.js → DomesticWireDetailScreen-CakALOxw.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-D0ylGz77.js";import{j as w,u as C,g as h,k as A,l as P}from"./core-DSsu1iyO.js";import{Nl as k,Ns as q,fD as K,fC as M,fB as W,iA as J,Kt as L,q1 as Q,eR as V,MT as D,iy as T,Nm as v,Nv as F,iw as G,iT as N}from"./zeni-epic-state-CFQMpWBE.js";import{bn as X,K as j,C as R,z as U,m as O,q as p,A as S,B as Z,bo as Y,o as z,bp as ee,s as te}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-D0ylGz77.js";import{j as w,u as C,g as h,k as A,l as P}from"./core-DSsu1iyO.js";import{Nl as k,Ns as q,fD as K,fC as M,fB as W,iA as J,Kt as L,q1 as Q,eR as V,MT as D,iy as T,Nm as v,Nv as F,iw as G,iT as N}from"./zeni-epic-state-CFQMpWBE.js";import{bn as X,K as j,C as R,z as U,m as O,q as p,A as S,B as Z,bo as Y,o as z,bp as ee,s as te}from"./index-C4_7gLFp.js";import{n as H}from"./mui-D9TDAUAO.js";import"./sentry-C5UCCkb_.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]="fea3c876-5c19-4a89-9e41-6b4459828b64",e._sentryDebugIdIdentifier="sentry-dbid-fea3c876-5c19-4a89-9e41-6b4459828b64")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(J(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(L("common")),n!=null&&e(Q(n))},onGetOtp:n=>{e(W(n,"BillPayVendor"))},onResendOtp:n=>{e(M(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(K(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(q(n,a,o))}}})(X);function _({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(c=>k(c,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-D0ylGz77.js";import{K as c,E as l,m as f}from"./index-
|
|
1
|
+
import{j as i}from"./liveblocks-D0ylGz77.js";import{K as c,E as l,m as f}from"./index-C4_7gLFp.js";import{D as b}from"./mui-D9TDAUAO.js";import"./sentry-C5UCCkb_.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-D0ylGz77.js";import{a as d}from"./sentry-C5UCCkb_.js";import{j as B,h as G,u as q,l as F,g as l,N as K,k as L,n as O,o as N}from"./core-DSsu1iyO.js";import{LA as _,eR as R,KZ as z,kD as H,Hz as b,LF as M,Ks as W,jD as Y,HA as S,L2 as $,L3 as V,Ku as Z,Kt as J}from"./zeni-epic-state-CFQMpWBE.js";import{aO as Q,d as U,q as X,s as tt}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-D0ylGz77.js";import{a as d}from"./sentry-C5UCCkb_.js";import{j as B,h as G,u as q,l as F,g as l,N as K,k as L,n as O,o as N}from"./core-DSsu1iyO.js";import{LA as _,eR as R,KZ as z,kD as H,Hz as b,LF as M,Ks as W,jD as Y,HA as S,L2 as $,L3 as V,Ku as Z,Kt as J}from"./zeni-epic-state-CFQMpWBE.js";import{aO as Q,d as U,q as X,s as tt}from"./index-C4_7gLFp.js";import"./mui-D9TDAUAO.js";import{d as k}from"./decodeURIComponentSafe-CRFR6Y3w.js";import{w as et}from"./withTransactionSidePanel-CH7Cbdk4.js";import{f as at,c as nt}from"./routePaths-B7W4yhsS.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.js";import"./useAskAiCfoHostNavButtonProps-c_p-0pW7.js";import"./useFetchSuggestedQuestionsWhenReady-nzUYYA5P.js";import"./TransactionDetailScreen-DMDwXid_.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]="7f0463ac-9e99-4f70-bd2b-3328a0037b59",a._sentryDebugIdIdentifier="sentry-dbid-7f0463ac-9e99-4f70-bd2b-3328a0037b59")}catch{}})();const ot=L(function(a,t){const e=t.entity,o=M(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:W(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:Y(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(Z({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(J("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a($()),a(V()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=X(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??I();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}))}}}})(Q),it=et(function({entityType:a,...t}){const e=B(),o=G(),c=q(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:x}=F(),r=k(j??""),p=k(x??""),u=rt(r,p),v=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=l(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),w=l(n=>R(n).company?.companyInfo.firstMonthOfFY??1),f=l(n=>z(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:w,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:A,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(K,{to:I(v.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function xt({entityType:a}){return s.jsx(O,{children:s.jsx(N,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-CNlHRTO1.js → ExpenseAutomationRoutes-Dq-ZbuPh.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-D0ylGz77.js";import xn from"./NotFoundScreen-
|
|
1
|
+
import{j as C}from"./liveblocks-D0ylGz77.js";import xn from"./NotFoundScreen-DVTblDpS.js";import{a,b as Pt}from"./sentry-C5UCCkb_.js";import{n as Fe,S as Rn}from"./mui-D9TDAUAO.js";import{h as ce,j as wt,u as Ge,g as U,k as Dn,l as rt,n as Un,o as Le}from"./core-DSsu1iyO.js";import{eR as Re,PX as Fn,n1 as Se,fh as Bn,qE as _n,nj as xt,nE as Rt,PY as Dt,nO as Vn,PZ as Ut,nc as On,qa as Mn,f0 as pe,P_ as De,sK as Ft,BZ as Bt,P$ as _t,Q0 as jn,pR as qe,LB as dt,LD as Ln,jG as zn,LE as Qn,jN as $n,cW as Gn,tR as Ye,np as Vt,nT as Ue,Q1 as qn,Ku as ut,Kt as Pe,Q2 as mt,k2 as Yn,Q3 as Nn,Q4 as Jn,Q5 as Kn,Q6 as Zn,nw as Hn,nh as ie,nW as we,Q7 as Wn,Q8 as Xn,Q9 as ea,o1 as ta,jR as na,jI as aa,Qa as oa,jQ as ht,LL as sa,Qb as ca,Qc as ia,pN as la,ps as ra,nU as ge,pr as ze,Qd as da,Qe as ua,ll as ma,bq as ha,lg as pt,l2 as pa,Qf as ga,gP as gt,fT as Ca,ld as Sa,vK as Ia,Qg as fa,os as ka,on as Ea,or as va,oc as ya,Qh as ba,f3 as Ot,nH as Aa,ns as Ta,fi as Ct,nY as Pa,Qi as wa,nV as Mt,Qj as xa,Qk as Ra,Ql as Da,Qm as Ua,Qn as St,pZ as Fa,pi as Ba,Ks as _a,jP as Va,Qo as Oa,Gv as Ma,jO as ja,jD as La,f2 as za,oT as jt,pa as Qa,nS as It,nX as $a,bE as Ga,la as qa,l7 as Ya,Qp as Na,ob as ft,p8 as kt,p6 as Ja,oY as Ka,oD as Za,p9 as Ha,Qq as Wa,Qr as Xa,oH as eo,Qs as to,ox as no,oG as ao,oE as oo,pd as so}from"./zeni-epic-state-CFQMpWBE.js";import{C as Lt,A as Ce,d as L,s as Z,V 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,Y as ho,cB as po,U as go,cC as Co,cD as So,I as Io,c as fo,aK as ko,b1 as Eo,E as vo,cE as yo}from"./index-C4_7gLFp.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-c_p-0pW7.js";import{c as Gt}from"./useFetchSuggestedQuestionsWhenReady-nzUYYA5P.js";import{c as vt,C as bo}from"./TransactionDetailScreen-DMDwXid_.js";import{w as Ao}from"./withTransactionSidePanel-CH7Cbdk4.js";import{h as To,v as Po}from"./routePaths-B7W4yhsS.js";import{g as $e}from"./accountMappingHelper-BEJScFAE.js";import{D as wo}from"./DrawerScreen-CG4hw7_P.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.js";import"./decodeURIComponentSafe-CRFR6Y3w.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]="6d1442eb-fc7d-491e-853e-5c6e63dc13a3",t._sentryDebugIdIdentifier="sentry-dbid-6d1442eb-fc7d-491e-853e-5c6e63dc13a3")}catch{}})();const xo=()=>{const t=ce(),i=wt(),A=Ge(),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,J=!1)=>{t(Se({tenantId:R,period:{month:d.month,year:d.year},refreshViewInBackground:J}))},[]),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=Z(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 Gt({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-D0ylGz77.js";import{a as r}from"./sentry-C5UCCkb_.js";import{Z as c,$ as l,a0 as p,q as b}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-D0ylGz77.js";import{a as r}from"./sentry-C5UCCkb_.js";import{Z as c,$ as l,a0 as p,q as b}from"./index-C4_7gLFp.js";import"./mui-D9TDAUAO.js";import f from"./NotFoundScreen-DVTblDpS.js";import{j as m,u}from"./core-DSsu1iyO.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]="7e802648-940a-45b8-8f6b-505bcbcd2ea6",e._sentryDebugIdIdentifier="sentry-dbid-7e802648-940a-45b8-8f6b-505bcbcd2ea6")}catch{}})();const D=()=>{const e=m(),a=u(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),i=r.useCallback(()=>{(()=>{const n=b(a.state?.pathnameStackToGoBack),d=n.poppedPathname??k();e(d,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=c(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:i}):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-C5UCCkb_.js";import{h as l,j as f,u as m}from"./core-DSsu1iyO.js";import{gw as p,JH as g,JI as _}from"./zeni-epic-state-CFQMpWBE.js";import{u as b,L as h,z as y}from"./index-
|
|
1
|
+
import{a as r}from"./sentry-C5UCCkb_.js";import{h as l,j as f,u as m}from"./core-DSsu1iyO.js";import{gw as p,JH as g,JI as _}from"./zeni-epic-state-CFQMpWBE.js";import{u as b,L as h,z as y}from"./index-C4_7gLFp.js";import"./liveblocks-D0ylGz77.js";import"./recharts-C7IODwRw.js";import"./mui-D9TDAUAO.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.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]="dc5cd6e0-2e55-46ef-997c-66a8c16895f0",e._sentryDebugIdIdentifier="sentry-dbid-dc5cd6e0-2e55-46ef-997c-66a8c16895f0")}catch{}})();function C(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:u}=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"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&c!=null){const t=JSON.parse(c);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}))}u();const d=y.getActiveTenantForUser();n(d?.tenantEmailDomain!=null?`/${d.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{C as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-D0ylGz77.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-DSsu1iyO.js";import{JA as k,JB as v,JC as T,zA as A,zm as G,JD as B,JE as oe,JF as se,zq as ie,eS as $,zx as le,zu as re}from"./zeni-epic-state-CFQMpWBE.js";import{K as g,o as r,_ as de,d as j,j as J,p as ce,q as me,r as pe,s as _,C as ue,A as he,O as xe,I as ge,m as fe,v 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-D0ylGz77.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-DSsu1iyO.js";import{JA as k,JB as v,JC as T,zA as A,zm as G,JD as B,JE as oe,JF as se,zq as ie,eS as $,zx as le,zu as re}from"./zeni-epic-state-CFQMpWBE.js";import{K as g,o as r,_ as de,d as j,j as J,p as ce,q as me,r as pe,s as _,C as ue,A as he,O as xe,I as ge,m as fe,v 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-C4_7gLFp.js";import{n as m}from"./mui-D9TDAUAO.js";import f from"./NotFoundScreen-DVTblDpS.js";import{a as I}from"./sentry-C5UCCkb_.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.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]="e9c27f89-f970-44c4-acbd-c27ff13f3078",e._sentryDebugIdIdentifier="sentry-dbid-e9c27f89-f970-44c4-acbd-c27ff13f3078")}catch{}})();const Ie=m.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|