@zeniai/web-app-ui 5.0.23-qa → 5.0.24-dev
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-CWm4LI2A.js +1 -0
- package/dist/assets/AddressScreen-BRfd-CkJ.js +9 -0
- package/dist/assets/{AiCfoScreen-VeT_S5hK.js → AiCfoScreen-CSI2_D3j.js} +1 -1
- package/dist/assets/BillPayApprovalRoutes-CVMR--P9.js +1 -0
- package/dist/assets/{BillPayRoutes-Vb4S1Y8K.js → BillPayRoutes-CiAJiA46.js} +5 -5
- package/dist/assets/{BusinessVerificationPageScreen-B2ABlcef.js → BusinessVerificationPageScreen-surI_CG-.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-0wgJAAT_.js → ChargeCardRoutes-DfK6AK1Y.js} +8 -8
- package/dist/assets/CompanyPassportScreen-D3MdOGSR.js +1 -0
- package/dist/assets/{ConnectionAuthScreen-DTlZGYMJ.js → ConnectionAuthScreen-m1ZrPmfY.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-C_ov5V1M.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-CR3VCOF1.js → CustomerOnboardingRoutes-igtoru6q.js} +3 -3
- package/dist/assets/{DashboardRoutes-D3n4VoSd.js → DashboardRoutes-btp07KOK.js} +3 -3
- package/dist/assets/{DefaultTenantHome-D7hhMq-x.js → DefaultTenantHome-wOBWCdoB.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-D2qfhgns.js → DomesticWireDetailScreen-Cq9OTpl5.js} +3 -3
- package/dist/assets/DrawerScreen-BddqtTBk.js +1 -0
- package/dist/assets/EntityDetailRoutes-J5KxaFpN.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-v2u24arD.js → ExpenseAutomationRoutes-XSCKWGJC.js} +3 -3
- package/dist/assets/FeaturePreviewScreen-C7s5EUEI.js +1 -0
- package/dist/assets/{MagicLinkRoutes-CXWkfGXB.js → MagicLinkRoutes-Bnt1hH7o.js} +6 -6
- package/dist/assets/MagicLinkSignInScreen-CiUBjUKX.js +12 -0
- package/dist/assets/{MobileAppDrawer-Jd5aa9gg.js → MobileAppDrawer-BTO_dO8H.js} +1 -1
- package/dist/assets/NotFoundScreen-CQPWWkLY.js +1 -0
- package/dist/assets/{NotificationRoutes-BZkZ0nNy.js → NotificationRoutes-DfFcHUc_.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-DuWjgRje.js → PandLWithForecastRoutes-CY2JRBex.js} +1 -1
- package/dist/assets/PeopleRoutes-Ah1x0pI6.js +22 -0
- package/dist/assets/PerformanceRoutes-D-In2h69.js +1 -0
- package/dist/assets/{Preview-C3YwU0I2.js → Preview-1xmWdeBW.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CBYjGz6H.js → QBOConnectionScreen-D6CMF20W.js} +1 -1
- package/dist/assets/ReferralListScreen-D4dSsS9f.js +5 -0
- package/dist/assets/{ReimbursementApprovalRoutes-BxtQgQ3i.js → ReimbursementApprovalRoutes-CQWk5hg2.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DPNcDo-z.js → ReimbursementApprovalRuleDetailScreen-CLK4qljf.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-C4Oi6zv2.js → ReimbursementRoutes-Dle1xRUS.js} +1 -1
- package/dist/assets/{ReportsRoutes-BebY5YS1.js → ReportsRoutes-BVE7O3pM.js} +1 -1
- package/dist/assets/RewardsRoutes-BUOQCgBW.js +1 -0
- package/dist/assets/{ScreenRoutes-DAveqqpw.js → ScreenRoutes-CU85YNC5.js} +2 -2
- package/dist/assets/{SettingsRoutes-C_1R1lRs.js → SettingsRoutes-C1UlKVfn.js} +4 -4
- package/dist/assets/{SetupPagesScreen-BatnW9Lm.js → SetupPagesScreen-D5f_S2gA.js} +1 -1
- package/dist/assets/SignInScreen-nIZ9894Z.js +1 -0
- package/dist/assets/SignOutScreen-BBR56tjP.js +9 -0
- package/dist/assets/{TaskListScreen-CR9B7ON8.js → TaskListScreen-vtDblzrs.js} +2 -2
- package/dist/assets/TaskRoutes-6NyFYqIE.js +9 -0
- package/dist/assets/TransactionDetailRoutes-D3tlJJHj.js +1 -0
- package/dist/assets/{TransactionDetailScreen-DZUEdFp2.js → TransactionDetailScreen-DORvf_A0.js} +2 -2
- package/dist/assets/{TransactionListRoutes-DA-II3iy.js → TransactionListRoutes-Dm17WsQR.js} +1 -1
- package/dist/assets/TreasuryRoutes-B_ttsGpb.js +37 -0
- package/dist/assets/{VendorsRoutes-SiTspMG6.js → VendorsRoutes-xehzdyOP.js} +13 -13
- package/dist/assets/WiseConfirmationScreen-BURwrNzz.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-4nO_DRj9.js → ZeniAccountRoutes-D4VHQXPj.js} +10 -10
- package/dist/assets/ZeniAccountStatementScreen-DCQ_lEqk.js +9 -0
- package/dist/assets/{accountMappingHelper-CJzGKxCi.js → accountMappingHelper-Dr0t2P70.js} +1 -1
- package/dist/assets/{analytics-B8BYlogo.js → analytics-Cm9Z6TfJ.js} +1 -1
- package/dist/assets/{analyticsHelper-D2Lkt_0_.js → analyticsHelper-ByMo5A8t.js} +1 -1
- package/dist/assets/{core-C_FlMzhB.js → core-CNZua1e0.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-Bq-dYOxp.js → decodeURIComponentSafe-Dac6kcoy.js} +1 -1
- package/dist/assets/{dnd-CTZ8xt4P.js → dnd-Dmzop572.js} +1 -1
- package/dist/assets/{empty-8tyTORBQ.js → empty-BLoZtodd.js} +1 -1
- package/dist/assets/{empty-Ba3wQ_0C.js → empty-LpcvzIsm.js} +1 -1
- package/dist/assets/{emptyVideoElement-CMq3v722.js → emptyVideoElement-BStHdDf2.js} +1 -1
- package/dist/assets/{epic-DcM6ZH0h.js → epic-D5Ru76Np.js} +1 -1
- package/dist/assets/getLocaleForTenant-BYC6p0GO.js +1 -0
- package/dist/assets/{index-C2TFXiJV.js → index-CUFof7Jj.js} +1 -1
- package/dist/assets/{index-BabuXr6y.js → index-Co04ey3-.js} +10566 -10403
- package/dist/assets/{index-DlR0ZNoW.js → index-DFcSZnAP.js} +1 -1
- package/dist/assets/{index-DKffoxhZ.js → index-DdDiPMGa.js} +1 -1
- package/dist/assets/{index-8DvIGOR_.js → index-QWM1qpc0.js} +1 -1
- package/dist/assets/{index-BU1P3OoO.js → index-jE-fly2Z.js} +1 -1
- package/dist/assets/{index-6WoOptp-.js → index-rFuUBpwP.js} +2 -2
- package/dist/assets/{lexical-BmFHbDfb.js → lexical-Dt1gfKRx.js} +1 -1
- package/dist/assets/{liveblocks-DXiLz49w.js → liveblocks-CGYcZ7Lh.js} +1 -1
- package/dist/assets/{lottie-Bi_BmPss.js → lottie-BoyaSool.js} +1 -1
- package/dist/assets/{mui-D4wswOer.js → mui-DtCOffvy.js} +1 -1
- package/dist/assets/{pathToGoBack-D9SmrC7Q.js → pathToGoBack-gmEN-6lU.js} +1 -1
- package/dist/assets/{pdf-BUMfUQyN.js → pdf-DPV5Ar9D.js} +4 -4
- package/dist/assets/{pdf-lib-BiL5LzBn.js → pdf-lib-CE0iOBgb.js} +1 -1
- package/dist/assets/{plaid-CknlBCWN.js → plaid-DpI35xEc.js} +1 -1
- package/dist/assets/{pusher-919nhfWF.js → pusher-B4AT968C.js} +1 -1
- package/dist/assets/{react-CO9qvT1d.js → react-BTtkL9eY.js} +1 -1
- package/dist/assets/{react-BegT7c31.js → react-CSl1Gs8y.js} +1 -1
- package/dist/assets/{react-CxtHJFJc.js → react-Cuwn10s4.js} +1 -1
- package/dist/assets/{react-DORUVTyV.js → react-DbRkstrq.js} +1 -1
- package/dist/assets/{react-tG70id2q.js → react-gN9MAt-j.js} +1 -1
- package/dist/assets/{react-OYc9lUHZ.js → react-xRWOC5n2.js} +1 -1
- package/dist/assets/{recharts-BjJxsXby.js → recharts-Dq7pGiC-.js} +1 -1
- package/dist/assets/{routePaths-Du0f4vF0.js → routePaths-CHVZiiJU.js} +1 -1
- package/dist/assets/{sentry-C8WyuRaf.js → sentry-DCGk37l1.js} +1 -1
- package/dist/assets/{url-CK7SN0RL.js → url-C3uYKzo6.js} +1 -1
- package/dist/assets/{url-rqOciRjJ.js → url-Cg5cCxLh.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-CM6KSCVu.js → useAskAiCfoHostNavButtonProps-BW2SwSZE.js} +1 -1
- package/dist/assets/{useDeviceId-DFIMsX1U.js → useDeviceId-SQLvKnL0.js} +1 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-cPo0or_6.js +1 -0
- package/dist/assets/{useInitialThreadRequest-PIljdErr.js → useInitialThreadRequest-BV4XmA3t.js} +1 -1
- package/dist/assets/{utils-l6Jt_9tl.js → utils-DWAOcXZK.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-BeLe_Kr7.js → withTransactionSidePanel-ykEXkuoH.js} +3 -3
- package/dist/assets/{zeni-epic-state-BP6Uj047.js → zeni-epic-state-eW2EQdSt.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/AddressRoutes-BUvoDB1G.js +0 -1
- package/dist/assets/AddressScreen-eeo6LcCG.js +0 -9
- package/dist/assets/BillPayApprovalRoutes-B3yMYaND.js +0 -1
- package/dist/assets/CompanyPassportScreen-DVWLNjCs.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-v9d5sdON.js +0 -1
- package/dist/assets/DrawerScreen-B4dcA_LN.js +0 -1
- package/dist/assets/EntityDetailRoutes-6Vf4c0CK.js +0 -1
- package/dist/assets/FeaturePreviewScreen-3Jf-sujQ.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-D1VdpvOF.js +0 -12
- package/dist/assets/NotFoundScreen-DG_ouxiW.js +0 -1
- package/dist/assets/PeopleRoutes-DAqZunqX.js +0 -22
- package/dist/assets/PerformanceRoutes-ArSreWe6.js +0 -1
- package/dist/assets/ReferralListScreen-D6S_Namj.js +0 -5
- package/dist/assets/RewardsRoutes-D3ZdanqE.js +0 -1
- package/dist/assets/SignInScreen-DztMfSvO.js +0 -1
- package/dist/assets/SignOutScreen-DMjdePlb.js +0 -9
- package/dist/assets/TaskRoutes-C3kXaPvb.js +0 -9
- package/dist/assets/TransactionDetailRoutes-v7cR8Xnn.js +0 -1
- package/dist/assets/TreasuryRoutes-CO1mD9L_.js +0 -37
- package/dist/assets/WiseConfirmationScreen-9IfsZKyz.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-CFC4jyF3.js +0 -9
- package/dist/assets/getLocaleForTenant-BZmydyUi.js +0 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-CqG_ou6v.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-
|
|
1
|
+
import{j as t}from"./liveblocks-CGYcZ7Lh.js";import I from"./NotFoundScreen-CQPWWkLY.js";import{a as p}from"./sentry-DCGk37l1.js";import{j as R,u as C,h as A,g as c,N as E,k,n as D,o as u}from"./core-CNZua1e0.js";import{eM as T,Mo as g,ME as S,Ck as V,Bt as M,Cj as m,Ca as U,MT as _}from"./zeni-epic-state-eW2EQdSt.js";import{h as $,z as B,x as N,a1 as O,bI as W,aa as z}from"./index-Co04ey3-.js";import"./mui-DtCOffvy.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-CLK4qljf.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]="3c29e7bd-8b17-450e-a347-b5ea5cec1c02",e._sentryDebugIdIdentifier="sentry-dbid-3c29e7bd-8b17-450e-a347-b5ea5cec1c02")}catch{}})();const d="reimbursement-approval-rule-update",P=k(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:n=>{n.endsWith(d)&&e(_(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:n=>{e(U(n))},onEditRuleClick:n=>{n!=null?(e(m(n)),a(`./${n}/edit`)):(e(m()),a("./new"))}}})(O(W)),q=()=>{const e=R(),r=C(),a=A(),[l,n]=p.useState(!1),[f,y]=p.useState(!1),b=c(s=>s.remiSetupApproverViewState.fetchState),o=c(s=>T(s)),w=$(),i=c(s=>g(s)),h=c(s=>S(s).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(V())},[h]),p.useEffect(()=>{l||b!=="Not-Started"||(n(!0),a(M(!0)))},[l,b,a]),B.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(f||(y(!0),a(m())),e("./new"))},[f,i,a]);const j={events:o.companyId!=null?[`private-${o.companyId}.${d}`]:[],eventCallback:(s,F,x)=>{s.endsWith(d)&&x.onApprovalRulesEventReceived(s)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(E,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(N,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(P,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(D,{children:[t.jsx(u,{path:"/",element:t.jsx(q,{})}),t.jsx(u,{path:"/new",element:t.jsx(v,{})}),t.jsx(u,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(u,{path:"*",element:t.jsx(I,{})})]})}export{Z as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-
|
|
1
|
+
import{j as g}from"./liveblocks-CGYcZ7Lh.js";import{a as y}from"./sentry-DCGk37l1.js";import{j as w,h as A,u as C,l as T,g as b,k as E}from"./core-CNZua1e0.js";import{ME as R,Mo as U,Cd as x,Cm as _,Ck as S,Cl as h,MF as k}from"./zeni-epic-state-eW2EQdSt.js";import{z as B,h as V,x as F,bz as j,aa as O}from"./index-Co04ey3-.js";import"./mui-DtCOffvy.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]="ebf360d7-6969-4ae2-b347-ab42ab2a421c",e._sentryDebugIdIdentifier="sentry-dbid-ebf360d7-6969-4ae2-b347-ab42ab2a421c")}catch{}})();function $(e){return k(e)==null}const M=E(function(e,a){const t=R(e),s=t.remiSetupApproverViewUpdateData?.type??"approval_create",n=s==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return a.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===a.approvalRuleId)===0),{localData:t,hideUpperBoundField:n,isLowerBoundDisabled:l,approvalUpdateActionType:s}},function(e,a){const{navigate:t,approvalUpdateDataView:s,approverViewData:n,approvalRuleId:l}=a,r=s.remiSetupApproverViewUpdateData?.type,i=O(a.location);return{onApprovalRuleDataUpdated:o=>{const u=p=>{const v=[];return p.forEach(c=>{const D=c.actors.selectedUsers.map(d=>({type:"user",subType:void 0,userId:d.userId,idType:"user",isImplicitActor:!1})),I=c.actors.selectedNonUsers.map(d=>{const f=!!$(d.value);return{type:f?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!f}}),m=D.concat(I);v.push({action:c.stepType.selectedOption,actors:m,operator:m.length>1?c.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),v};if(r==="approval_create"){const p={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}else{const p={approvalRuleId:l,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}},onResetClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(_())},onSaveRuleSuccess:()=>{t("../")}}})(j);function H(){const e=w(),a=A(),t=C(),{approvalRuleId:s}=T(),n=B.getSignedInUser(),l=V(),r=b(p=>R(p)),i=b(p=>U(p)),[o,u]=y.useState(!1);if(y.useEffect(()=>{o||(u(!0),a(x(!0)))}),y.useEffect(()=>{i.fetchState==="Not-Started"&&e(s!=null?"../../":"../")},[i,s]),n==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(F,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):g.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{H as R,$ as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DXiLz49w.js";import{j as J,h as le,u as V,l as X,g as w,N as $,k as K,i as ut,n as pt,o as B}from"./core-C_FlMzhB.js";import{eM as W,MU as me,b$ as ce,Bo as xe,jx as bt,BB as ae,BA as se,MV as gt,bm as de,fG as Te,MW as ht,Jg as ft,jm as je,Jh as Se,Ji as St,ig as It,Ma as yt,iw as Rt,Bc as At,s1 as Ct,io as vt,BY as De,MX as Fe,MY as kt,MZ as Et,M_ as Bt,M$ as wt,N0 as xt,BI as Ie,iC as Tt,Mj as jt,BC as Dt,Bm as Ft,N1 as Ut,Bl as Lt,N2 as Nt,Bu as ye,BM as Mt,BL as Pt,BH as $t,N3 as Ue,Gz as _t,bn as Ot,Bx as zt,Ce as Gt,N4 as Ht,N5 as Zt,BU as Vt,BR as Re,LF as Wt,Bj as Jt,N6 as Le,CD as Ae,CL as Kt,N7 as qt,N8 as H,N9 as Yt,Na as Ne,Nb as Qt,Nc as Me,Nd as Pe,C4 as ie,bs as Xt,bD as ue,cy as pe,eS as $e,eQ as _e,Ne as en,gy as tn,LS as nn,Nf as an,Ng as Oe,LW as sn,ME as on,Nh as rn,MT as ln,CI as Ce,CH as mn,Ni as cn,Nj as dn,Nk as un,Nl as pn,Nm as bn,Mp as gn,Cy as hn,CC as fn,bu as Sn,bC as In,ct as yn,cN as Rn,br as An,If as Cn,cJ as vn,cL as kn,cK as En,cs as Bn}from"./zeni-epic-state-BP6Uj047.js";import{E as ze,K as Ge,s as ee,c as C,z as M,bJ as He,v as te,d as v,aC as ve,o as U,ao as Q,F as wn,D as Ze,bK as xn,r as Z,I as Ve,bL as Tn,S as ne,bM as jn,J as Dn,A as Fn,B as be,f as We,a1 as Un,ba as Ln,T as Nn,h as Je,bN as Mn,a4 as Pn}from"./index-BabuXr6y.js";import{n as _,S as $n}from"./mui-D4wswOer.js";import oe from"./NotFoundScreen-DG_ouxiW.js";import{S as ke}from"./SetupPagesScreen-BatnW9Lm.js";import{F as Ke}from"./FeaturePreviewScreen-3Jf-sujQ.js";import{a as g}from"./sentry-C8WyuRaf.js";import{u as qe}from"./useInitialThreadRequest-PIljdErr.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-CM6KSCVu.js";import{c as Qe}from"./useFetchSuggestedQuestionsWhenReady-CqG_ou6v.js";import{D as _n}from"./DrawerScreen-B4dcA_LN.js";import{M as Xe}from"./MobileAppDrawer-Jd5aa9gg.js";import{R as On}from"./ReimbursementApprovalRoutes-BxtQgQ3i.js";import{FallBackRoute as zn}from"./ScreenRoutes-DAveqqpw.js";import"./recharts-BjJxsXby.js";import"./analytics-B8BYlogo.js";import"./plaid-CknlBCWN.js";import"./dnd-CTZ8xt4P.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bi_BmPss.js";import"./lexical-BmFHbDfb.js";import"./pdf-BUMfUQyN.js";import"./utils-l6Jt_9tl.js";import"./analyticsHelper-D2Lkt_0_.js";import"./routePaths-Du0f4vF0.js";import"./BusinessVerificationPageScreen-B2ABlcef.js";import"./ReimbursementApprovalRuleDetailScreen-DPNcDo-z.js";import"./getLocaleForTenant-BZmydyUi.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]="6b91b095-2731-4bc9-b38b-bd2e283150cf",e._sentryDebugIdIdentifier="sentry-dbid-6b91b095-2731-4bc9-b38b-bd2e283150cf")}catch{}})();const et=e=>`/${e}/reimbursements`,Gn=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=Ze.getLocalizedStrings(),Hn=K(function(e,t){const n=t.currentTenant?.companyId,r=gt(e.plaidAccountViewState,"user_reimbursement_account"),c=M.getSignedInUser(),d=de(c),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=me(e,t.reimbursementId),p=ht(e,c?.userId??"");let I=`${c?.firstName} ${c?.lastName}`,S=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,S=c?.userId===l.createdBy?.userId);const x=e.entityAutoCompleteState?.autoCompleteText?.common,R=ft(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:x,entityAutoCompleteView:R},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:ce(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:S,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:je(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=M.getSignedInUser();return{onReceiptsUpload:(i,l,p)=>{i!=null&&e(se(i,l,p,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e($t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Pt())},clearRemiSaveStatus:()=>{e(Mt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ye(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Nt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Lt(l,i,n))},updateReimbursementType:(i,l,p)=>{e(Ut({reimbursementId:p,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,p)=>{e(Ft({reimbursementId:p,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Dt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(jt({data:l}))},onFetchBankName:i=>{e(Tt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(xt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ae({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(wt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Bt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(Et({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(kt());const i=et(o),l=Z(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(De(n)))},onSaveBankAccount:()=>{a?.userId&&e(vt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(Ct("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(At(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(Rt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(It({fetchState:"Not-Started"})),e(yt())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(St({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(xn);function Ee(){const e=J(),t=le(),n=V(),{reimbursementId:r}=X(),c=ze(),d=Ge(),[m,o]=g.useState(r==null),[a,i]=g.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:p}=l(C.isLimitedCategoryForReimbursement),{isFeatureEnabled:I}=l(C.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:S}=l(C.isReimbursementCommentingEnabled),x=V().pathname,R=x.includes("edit"),j=x.includes("reimbursement/new"),[b,k]=g.useState(!1),y=M.getSignedInUser(),T=w(u=>W(u)),f=w(u=>me(u,r)),D=qe(T?.companyId,{clearParams:f.fetchState==="Completed"}),P=ce(T?.userRole??[]);g.useEffect(()=>{(j&&!b||R&&f.fetchState!="Completed"&&f.fetchState!="In-Progress")&&(k(!0),t(xe(!1,p,I,r)))});const A=w(u=>bt(u.accountState,u.accountListState,"reimbursementAccountList"));if(y==null)throw Error("Can't access address page without signing in...");const F={pathname:`../${r}`,search:n.search};return f.isDeleted===!0||f.billStage=="paid"||f.billStage=="scheduled"||f.fetchState=="Not-Started"||P&&f.billStatus==="rejected"||P===!1&&f.billStage==="pending_approval"&&f.billStatus!=="rejected"?s.jsx($,{to:F}):f.deleteStatus.fetchState==="In-Progress"||f.fetchState!=="Completed"?s.jsx(He,{isNewReimbursement:r==null}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(te,{analytics:v,onLoad:u=>(N=>{r!=null&&f.deleteStatus.fetchState!=="Completed"&&N.trackReimbursementEditReimbursement(r)})(u)}),m&&d!=="small"?s.jsx(Vn,{}):null,m&&d!=="small"?s.jsx(Wn,{children:s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:T?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:u=>{u!=null&&t(se(u,a,!0,r,y?.userId))},updateInvoiceUploadFetchState:u=>{t(ae({reimbursementId:r,fetchState:u}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:U.sp3,paddingBottom:"15px",paddingLeft:U.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&d==="small"?s.jsxs(Jn,{children:[s.jsx(Kn,{onClick:()=>o(!1),children:s.jsx(Gn,{})}),s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:T?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:u=>{u!=null&&t(se(u,a,!0,r,y?.userId))},updateInvoiceUploadFetchState:u=>{t(ae({reimbursementId:r,fetchState:u}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:U.sp5,paddingRight:U.sp3,paddingBottom:U.sp5,paddingLeft:U.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(qn,{windowSize:d,children:s.jsx(Hn,{initialOpenThreadRequest:D??void 0,isReimbursementCommentingEnabled:S,location:n,navigate:e,currentTenant:T,reimbursementId:r,themeState:c,uncategorizedAccounts:A,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i})})]})}const Zn=_.div`
|
|
1
|
+
import{j as s}from"./liveblocks-CGYcZ7Lh.js";import{j as J,h as le,u as V,l as X,g as w,N as $,k as K,i as ut,n as pt,o as B}from"./core-CNZua1e0.js";import{eM as W,MU as me,b$ as ce,Bo as xe,jx as bt,BB as ae,BA as se,MV as gt,bm as de,fG as Te,MW as ht,Jg as ft,jm as je,Jh as Se,Ji as St,ig as It,Ma as yt,iw as Rt,Bc as At,s1 as Ct,io as vt,BY as De,MX as Fe,MY as kt,MZ as Et,M_ as Bt,M$ as wt,N0 as xt,BI as Ie,iC as Tt,Mj as jt,BC as Dt,Bm as Ft,N1 as Ut,Bl as Lt,N2 as Nt,Bu as ye,BM as Mt,BL as Pt,BH as $t,N3 as Ue,Gz as _t,bn as Ot,Bx as zt,Ce as Gt,N4 as Ht,N5 as Zt,BU as Vt,BR as Re,LF as Wt,Bj as Jt,N6 as Le,CD as Ae,CL as Kt,N7 as qt,N8 as H,N9 as Yt,Na as Ne,Nb as Qt,Nc as Me,Nd as Pe,C4 as ie,bs as Xt,bD as ue,cy as pe,eS as $e,eQ as _e,Ne as en,gy as tn,LS as nn,Nf as an,Ng as Oe,LW as sn,ME as on,Nh as rn,MT as ln,CI as Ce,CH as mn,Ni as cn,Nj as dn,Nk as un,Nl as pn,Nm as bn,Mp as gn,Cy as hn,CC as fn,bu as Sn,bC as In,ct as yn,cN as Rn,br as An,If as Cn,cJ as vn,cL as kn,cK as En,cs as Bn}from"./zeni-epic-state-eW2EQdSt.js";import{v as ze,K as Ge,i as ee,c as C,z as M,bJ as He,y as te,d as v,aC as ve,o as U,ao as Q,F as wn,D as Ze,bK as xn,n as Z,H as Ve,bL as Tn,S as ne,bM as jn,I as Dn,C as Fn,x as be,f as We,a1 as Un,ba as Ln,M as Nn,h as Je,bN as Mn,a4 as Pn}from"./index-Co04ey3-.js";import{n as _,S as $n}from"./mui-DtCOffvy.js";import oe from"./NotFoundScreen-CQPWWkLY.js";import{S as ke}from"./SetupPagesScreen-D5f_S2gA.js";import{F as Ke}from"./FeaturePreviewScreen-C7s5EUEI.js";import{a as g}from"./sentry-DCGk37l1.js";import{u as qe}from"./useInitialThreadRequest-BV4XmA3t.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-BW2SwSZE.js";import{c as Qe}from"./useFetchSuggestedQuestionsWhenReady-cPo0or_6.js";import{D as _n}from"./DrawerScreen-BddqtTBk.js";import{M as Xe}from"./MobileAppDrawer-BTO_dO8H.js";import{R as On}from"./ReimbursementApprovalRoutes-CQWk5hg2.js";import{FallBackRoute as zn}from"./ScreenRoutes-CU85YNC5.js";import"./recharts-Dq7pGiC-.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.js";import"./analyticsHelper-ByMo5A8t.js";import"./routePaths-CHVZiiJU.js";import"./BusinessVerificationPageScreen-surI_CG-.js";import"./ReimbursementApprovalRuleDetailScreen-CLK4qljf.js";import"./getLocaleForTenant-BYC6p0GO.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]="34b170fe-4592-4c34-b437-21eff6f95aa5",e._sentryDebugIdIdentifier="sentry-dbid-34b170fe-4592-4c34-b437-21eff6f95aa5")}catch{}})();const et=e=>`/${e}/reimbursements`,Gn=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=Ze.getLocalizedStrings(),Hn=K(function(e,t){const n=t.currentTenant?.companyId,r=gt(e.plaidAccountViewState,"user_reimbursement_account"),c=M.getSignedInUser(),d=de(c),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=me(e,t.reimbursementId),p=ht(e,c?.userId??"");let I=`${c?.firstName} ${c?.lastName}`,S=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,S=c?.userId===l.createdBy?.userId);const x=e.entityAutoCompleteState?.autoCompleteText?.common,R=ft(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:x,entityAutoCompleteView:R},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:ce(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:S,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:je(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=M.getSignedInUser();return{onReceiptsUpload:(i,l,p)=>{i!=null&&e(se(i,l,p,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e($t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Pt())},clearRemiSaveStatus:()=>{e(Mt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ye(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Nt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Lt(l,i,n))},updateReimbursementType:(i,l,p)=>{e(Ut({reimbursementId:p,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,p)=>{e(Ft({reimbursementId:p,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Dt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(jt({data:l}))},onFetchBankName:i=>{e(Tt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(xt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ae({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(wt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Bt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(Et({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(kt());const i=et(o),l=Z(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(De(n)))},onSaveBankAccount:()=>{a?.userId&&e(vt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(Ct("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(At(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(Rt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(It({fetchState:"Not-Started"})),e(yt())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(St({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(xn);function Ee(){const e=J(),t=le(),n=V(),{reimbursementId:r}=X(),c=ze(),d=Ge(),[m,o]=g.useState(r==null),[a,i]=g.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:p}=l(C.isLimitedCategoryForReimbursement),{isFeatureEnabled:I}=l(C.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:S}=l(C.isReimbursementCommentingEnabled),x=V().pathname,R=x.includes("edit"),j=x.includes("reimbursement/new"),[b,k]=g.useState(!1),y=M.getSignedInUser(),T=w(u=>W(u)),f=w(u=>me(u,r)),D=qe(T?.companyId,{clearParams:f.fetchState==="Completed"}),P=ce(T?.userRole??[]);g.useEffect(()=>{(j&&!b||R&&f.fetchState!="Completed"&&f.fetchState!="In-Progress")&&(k(!0),t(xe(!1,p,I,r)))});const A=w(u=>bt(u.accountState,u.accountListState,"reimbursementAccountList"));if(y==null)throw Error("Can't access address page without signing in...");const F={pathname:`../${r}`,search:n.search};return f.isDeleted===!0||f.billStage=="paid"||f.billStage=="scheduled"||f.fetchState=="Not-Started"||P&&f.billStatus==="rejected"||P===!1&&f.billStage==="pending_approval"&&f.billStatus!=="rejected"?s.jsx($,{to:F}):f.deleteStatus.fetchState==="In-Progress"||f.fetchState!=="Completed"?s.jsx(He,{isNewReimbursement:r==null}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(te,{analytics:v,onLoad:u=>(N=>{r!=null&&f.deleteStatus.fetchState!=="Completed"&&N.trackReimbursementEditReimbursement(r)})(u)}),m&&d!=="small"?s.jsx(Vn,{}):null,m&&d!=="small"?s.jsx(Wn,{children:s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:T?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:u=>{u!=null&&t(se(u,a,!0,r,y?.userId))},updateInvoiceUploadFetchState:u=>{t(ae({reimbursementId:r,fetchState:u}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:U.sp3,paddingBottom:"15px",paddingLeft:U.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&d==="small"?s.jsxs(Jn,{children:[s.jsx(Kn,{onClick:()=>o(!1),children:s.jsx(Gn,{})}),s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:T?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:u=>{u!=null&&t(se(u,a,!0,r,y?.userId))},updateInvoiceUploadFetchState:u=>{t(ae({reimbursementId:r,fetchState:u}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:U.sp5,paddingRight:U.sp3,paddingBottom:U.sp5,paddingLeft:U.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(qn,{windowSize:d,children:s.jsx(Hn,{initialOpenThreadRequest:D??void 0,isReimbursementCommentingEnabled:S,location:n,navigate:e,currentTenant:T,reimbursementId:r,themeState:c,uncategorizedAccounts:A,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i})})]})}const Zn=_.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-DXiLz49w.js";import{u as x,j as fe,h as ue,l as _e,g as f,k as he,n as be,o as z}from"./core-C_FlMzhB.js";import{eM as P,f7 as g,IC as Ie,pE as O,ja as ye,ic as Ce,s_ as ge,pJ as Se,bu as we,ID as Te,IE as Re,jm as Oe,bm as Fe,u0 as ke,IF as Ae,IG as De,sV as Ee,sZ as je,IH as G,II as Pe,IJ as Le,IK as Me,IL as Be,IM as S,IN as F,IO as k,IP as H,IQ as A,IR as D,dA as ve,tI as Ue,tw as N,tx as Y,tO as Ve,tB as $,tU as xe,IS as ze,IT as Ge,IU as He,IV as Ne,IW as Ye,eS as $e,eQ as qe}from"./zeni-epic-state-BP6Uj047.js";import{H as Qe,I as Je,K as Ze,s as J,c as E,z as Z,J as Ke,S as We,a as Xe,v as ea,d as j,f as aa,r as K,N as sa,Q as ta,T as oa}from"./index-BabuXr6y.js";import"./mui-D4wswOer.js";import na from"./NotFoundScreen-DG_ouxiW.js";import{F as ra}from"./FeaturePreviewScreen-3Jf-sujQ.js";import{a as h}from"./sentry-C8WyuRaf.js";import{u as ia,a as la,b as ca,c as da}from"./useFetchSuggestedQuestionsWhenReady-CqG_ou6v.js";import{u as pa}from"./useInitialThreadRequest-PIljdErr.js";import{t as q,a as Q}from"./routePaths-Du0f4vF0.js";import{M as ma}from"./MobileAppDrawer-Jd5aa9gg.js";import"./recharts-BjJxsXby.js";import"./analytics-B8BYlogo.js";import"./plaid-CknlBCWN.js";import"./dnd-CTZ8xt4P.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bi_BmPss.js";import"./lexical-BmFHbDfb.js";import"./pdf-BUMfUQyN.js";import"./utils-l6Jt_9tl.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]="6db0da63-4cb0-4d70-8946-ccc4195f2204",e._sentryDebugIdIdentifier="sentry-dbid-6db0da63-4cb0-4d70-8946-ccc4195f2204")}catch{}})();const fa=["profit_loss","balance_sheet","cash_flow"],I=e=>{e(D({resetLeftScroll:!0})),e(A({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(F({resetLeftScroll:!0}))},ua=e=>{e(Ge()),e(He()),e(Ne()),e(Ye())},_a=he(function(e){const o=Z.getSignedInUser(),p=e.tenantState.currentTenantId,u=P(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:p??""},t=g(e),r=Te(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:j,isZeniUser:Fe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:Oe(e),isAccountingProjectsEnabled:Re(e),currentTenantCompanyName:a,statementEndPoint:`${oa}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:p,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(O(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(ze(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(xe(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:m,balancesRange:l}=c;let i=[...m];a==="year"&&(i=i.filter(y=>y!=="this_period_vs_same_period_last_year"&&y!=="this_period_vs_same_period_last_year_percent"&&y!=="same_period_last_year")),e(N(o.firstMonthOfFY,r,l.numberOfPeriods<4?4:l.numberOfPeriods,i)),m.length>0&&e(Y(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<4?4:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>I(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(S(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e($({numberOfPeriods:4,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(G({classViewLayout:"vertical"})),I(e)},onCOABalancesRangeChanged:(a,s)=>{e($(a,s)),I(e)},onThisPeriodChanged:(a,s,t)=>{e(Ve(o.firstMonthOfFY,a,s<4?4:s)),t!==!0&&I(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(N(o.firstMonthOfFY,a,t<4?4:t,s)),s.length>0&&e(Y(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<4?4:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>I(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(Ue({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<4?4:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=ve(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return Q(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,c):a.accountType!=null?q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c):void 0})();if(l!=null){const i=K(o.location.state?.pathnameStackToGoBack,o.location.pathname);p(l,{state:{pathnameStackToGoBack:i,referrer:w(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(D({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(A({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(H({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(F({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{p("../../")},onUpdateAccountViewMode:a=>{e(Me({viewMode:a})),e(Be({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",w(o.selectedReportID)),e(S("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",w(o.selectedReportID)),e(S("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",w(o.selectedReportID)),e(S("profit_and_loss"))),I(e)},onUpdateClassesToFilterOut:a=>{e(Le({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Pe({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(G({classViewLayout:a}))},onOpenAccountViewMode:()=>{e(Ee()),e(je())},onUpdateDisplayOrder:a=>{e(De(a))},onUpdateReportFormat:a=>{ua(e),e(Ae(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(ke("profit_and_loss_by_classes"))}}})(sa);function ha(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Je(),p=Ze(),u=ta(p),a=fe(),s=ue(),t=x(),{tenantEmailDomain:r}=_e(),{useFeatureGate:c}=J(),{isFeatureEnabled:m}=c(E.isReportsHorizontalClassLayoutSwitchEnabled),l=Z.getSignedInUser(),[i,y]=h.useState(!1),[L,W]=h.useState(!1),{isFeatureEnabled:M}=c(E.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const B=f(n=>P(n)),X=B.company?.companyInfo.firstMonthOfFY??1,ee=pa(M?B?.companyId:void 0),C=f(n=>g(n).fetchState),ae=f(n=>Ie(n)),{areTenantIdsInSync:b}=Ke(),T=f(n=>n.financeStatementState.selectedReportId),se=f(n=>g(n).isCompareModeOn),_=f(n=>g(n).filter),R=f(n=>g(n).selectedReportAndTimeframeFetchState),te=f(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);h.useEffect(()=>{!i&&b&&(y(!0),s(O(l.userId,!0,!0,!1)))},[i,l,s,b]),h.useEffect(()=>{i&&!L&&C==="Completed"&&b&&(s(O(l.userId,!1,!0,!1)),W(!0))},[i,L,C,b]),h.useEffect(()=>{if(i&&R.fetchState==="Not-Started"&&_.timeframe!=="free_range"&&_.timeframe!=="week"&&b)switch(T){case"profit_and_loss":case"profit_and_loss_by_classes":s(Se(_.timeframe));break;case"profit_and_loss_by_projects":s(ge(_.timeframe));break;case"balance_sheet":s(Ce(_.timeframe));break;case"cash_flow":s(ye(_.timeframe))}},[i,T,R,b]);const v=We(),oe=v?.loggedInUserRole!=null&&we(v?.loggedInUserRole)!==!0,[ne,re]=h.useState(!1),U=n=>{re(n)},ie=Xe(),le=ca();return function(n){const{isDataReady:ce}=n,{pathname:de}=x(),V=Qe(de??"")==="reports",pe=ia(ce),me=h.useMemo(()=>V?fa:void 0,[V]);la({canFetchSuggestedQuestions:pe,pageContexts:me})}({isDataReady:C==="Completed"}),da({isDataReady:C==="Completed"}),d.jsxs(d.Fragment,{children:[C==="Completed"?d.jsx(ea,{analytics:j,onLoad:n=>n.trackPageLoaded(aa.Event.reports)}):null,d.jsx(ma,{isAppContentDrawerOpen:ne,handleDrawerToggle:U}),d.jsx(_a,{firstMonthOfFY:X,tenantEmailDomain:r,location:t,navigate:a,windowSize:p,classViewLayout:te,selectedReportID:T,analytics:j,filter:_,isCompareModeOn:se,hasTransactionAccess:oe,signedInUser:l,selectedReportAndTimeframeFetchState:R,handleDrawerToggle:U,reportsResyncFetchState:ae.reportsResyncFetchState,isAiCfoAccessEnabled:le&&ie&&!e,onAskAiCfoClick:()=>{if(u){const n=K(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:M,initialOpenThreadRequest:ee})]})}const w=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function Ua(){const e=f(s=>P(s)),{useFeatureGate:o}=J(),{isFeatureEnabled:p}=o(E.isDebitCardFeatureEnabled),u=$e(p,e),a=qe(e);return u===!0||a===!0?d.jsx(ra,{}):d.jsxs(be,{children:[d.jsx(z,{path:"/",element:d.jsx(ha,{})}),d.jsx(z,{path:"*",element:d.jsx(na,{})})]})}export{Ua as default};
|
|
1
|
+
import{j as d}from"./liveblocks-CGYcZ7Lh.js";import{u as x,j as fe,h as ue,l as _e,g as f,k as he,n as be,o as z}from"./core-CNZua1e0.js";import{eM as M,f7 as g,IC as Ie,pE as O,ja as ye,ic as Ce,s_ as ge,pJ as Se,bu as we,ID as Re,IE as Te,jm as Oe,bm as Fe,u0 as ke,IF as Ae,IG as De,sV as Ee,sZ as je,IH as G,II as Me,IJ as Pe,IK as Le,IL as Be,IM as S,IN as F,IO as k,IP as H,IQ as A,IR as D,dA as Ue,tI as ve,tw as Y,tx as N,tO as Ve,tB as $,tU as xe,IS as ze,IT as Ge,IU as He,IV as Ye,IW as Ne,eS as $e,eQ as qe}from"./zeni-epic-state-eW2EQdSt.js";import{G as Qe,H as Je,K as Ze,i as J,c as E,z as Z,I as Ke,S as We,a as Xe,y as ea,d as j,f as aa,n as K,U as sa,J as ta,M as oa}from"./index-Co04ey3-.js";import"./mui-DtCOffvy.js";import na from"./NotFoundScreen-CQPWWkLY.js";import{F as ra}from"./FeaturePreviewScreen-C7s5EUEI.js";import{a as h}from"./sentry-DCGk37l1.js";import{u as ia,a as la,b as ca,c as da}from"./useFetchSuggestedQuestionsWhenReady-cPo0or_6.js";import{u as pa}from"./useInitialThreadRequest-BV4XmA3t.js";import{t as q,a as Q}from"./routePaths-CHVZiiJU.js";import{M as ma}from"./MobileAppDrawer-BTO_dO8H.js";import"./recharts-Dq7pGiC-.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.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]="62081487-4a72-405b-97c9-5f9100814494",e._sentryDebugIdIdentifier="sentry-dbid-62081487-4a72-405b-97c9-5f9100814494")}catch{}})();const fa=["profit_loss","balance_sheet","cash_flow"],I=e=>{e(D({resetLeftScroll:!0})),e(A({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(F({resetLeftScroll:!0}))},ua=e=>{e(Ge()),e(He()),e(Ye()),e(Ne())},_a=he(function(e){const o=Z.getSignedInUser(),p=e.tenantState.currentTenantId,u=M(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:p??""},t=g(e),r=Re(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:j,isZeniUser:Fe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:Oe(e),isAccountingProjectsEnabled:Te(e),currentTenantCompanyName:a,statementEndPoint:`${oa}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:p,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(O(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(ze(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(xe(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:m,balancesRange:l}=c;let i=[...m];a==="year"&&(i=i.filter(y=>y!=="this_period_vs_same_period_last_year"&&y!=="this_period_vs_same_period_last_year_percent"&&y!=="same_period_last_year")),e(Y(o.firstMonthOfFY,r,l.numberOfPeriods<4?4:l.numberOfPeriods,i)),m.length>0&&e(N(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<4?4:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>I(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(S(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e($({numberOfPeriods:4,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(G({classViewLayout:"vertical"})),I(e)},onCOABalancesRangeChanged:(a,s)=>{e($(a,s)),I(e)},onThisPeriodChanged:(a,s,t)=>{e(Ve(o.firstMonthOfFY,a,s<4?4:s)),t!==!0&&I(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(Y(o.firstMonthOfFY,a,t<4?4:t,s)),s.length>0&&e(N(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<4?4:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>I(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(ve({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<4?4:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return Q(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,c):a.accountType!=null?q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c):void 0})();if(l!=null){const i=K(o.location.state?.pathnameStackToGoBack,o.location.pathname);p(l,{state:{pathnameStackToGoBack:i,referrer:w(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(D({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(A({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(H({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(F({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{p("../../")},onUpdateAccountViewMode:a=>{e(Le({viewMode:a})),e(Be({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",w(o.selectedReportID)),e(S("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",w(o.selectedReportID)),e(S("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",w(o.selectedReportID)),e(S("profit_and_loss"))),I(e)},onUpdateClassesToFilterOut:a=>{e(Pe({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Me({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(G({classViewLayout:a}))},onOpenAccountViewMode:()=>{e(Ee()),e(je())},onUpdateDisplayOrder:a=>{e(De(a))},onUpdateReportFormat:a=>{ua(e),e(Ae(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(ke("profit_and_loss_by_classes"))}}})(sa);function ha(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Je(),p=Ze(),u=ta(p),a=fe(),s=ue(),t=x(),{tenantEmailDomain:r}=_e(),{useFeatureGate:c}=J(),{isFeatureEnabled:m}=c(E.isReportsHorizontalClassLayoutSwitchEnabled),l=Z.getSignedInUser(),[i,y]=h.useState(!1),[P,W]=h.useState(!1),{isFeatureEnabled:L}=c(E.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const B=f(n=>M(n)),X=B.company?.companyInfo.firstMonthOfFY??1,ee=pa(L?B?.companyId:void 0),C=f(n=>g(n).fetchState),ae=f(n=>Ie(n)),{areTenantIdsInSync:b}=Ke(),R=f(n=>n.financeStatementState.selectedReportId),se=f(n=>g(n).isCompareModeOn),_=f(n=>g(n).filter),T=f(n=>g(n).selectedReportAndTimeframeFetchState),te=f(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);h.useEffect(()=>{!i&&b&&(y(!0),s(O(l.userId,!0,!0,!1)))},[i,l,s,b]),h.useEffect(()=>{i&&!P&&C==="Completed"&&b&&(s(O(l.userId,!1,!0,!1)),W(!0))},[i,P,C,b]),h.useEffect(()=>{if(i&&T.fetchState==="Not-Started"&&_.timeframe!=="free_range"&&_.timeframe!=="week"&&b)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Se(_.timeframe));break;case"profit_and_loss_by_projects":s(ge(_.timeframe));break;case"balance_sheet":s(Ce(_.timeframe));break;case"cash_flow":s(ye(_.timeframe))}},[i,R,T,b]);const U=We(),oe=U?.loggedInUserRole!=null&&we(U?.loggedInUserRole)!==!0,[ne,re]=h.useState(!1),v=n=>{re(n)},ie=Xe(),le=ca();return function(n){const{isDataReady:ce}=n,{pathname:de}=x(),V=Qe(de??"")==="reports",pe=ia(ce),me=h.useMemo(()=>V?fa:void 0,[V]);la({canFetchSuggestedQuestions:pe,pageContexts:me})}({isDataReady:C==="Completed"}),da({isDataReady:C==="Completed"}),d.jsxs(d.Fragment,{children:[C==="Completed"?d.jsx(ea,{analytics:j,onLoad:n=>n.trackPageLoaded(aa.Event.reports)}):null,d.jsx(ma,{isAppContentDrawerOpen:ne,handleDrawerToggle:v}),d.jsx(_a,{firstMonthOfFY:X,tenantEmailDomain:r,location:t,navigate:a,windowSize:p,classViewLayout:te,selectedReportID:R,analytics:j,filter:_,isCompareModeOn:se,hasTransactionAccess:oe,signedInUser:l,selectedReportAndTimeframeFetchState:T,handleDrawerToggle:v,reportsResyncFetchState:ae.reportsResyncFetchState,isAiCfoAccessEnabled:le&&ie&&!e,onAskAiCfoClick:()=>{if(u){const n=K(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:L,initialOpenThreadRequest:ee})]})}const w=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function va(){const e=f(s=>M(s)),{useFeatureGate:o}=J(),{isFeatureEnabled:p}=o(E.isDebitCardFeatureEnabled),u=$e(p,e),a=qe(e);return u===!0||a===!0?d.jsx(ra,{}):d.jsxs(be,{children:[d.jsx(z,{path:"/",element:d.jsx(ha,{})}),d.jsx(z,{path:"*",element:d.jsx(na,{})})]})}export{va as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as a}from"./liveblocks-CGYcZ7Lh.js";import{i as x,z as w,aI as y,y as E,d as p,f as F,cC as P,c as L}from"./index-Co04ey3-.js";import"./mui-DtCOffvy.js";import l from"./NotFoundScreen-CQPWWkLY.js";import{a as f}from"./sentry-DCGk37l1.js";import{h as T,g as b,j as V,u as A,k as R,n as U,o as d}from"./core-CNZua1e0.js";import{eM as z,Pd as C,M3 as Y,Pe as k,tn as M,eY as G,Pf as O,tl as q}from"./zeni-epic-state-eW2EQdSt.js";import{R as j}from"./ReferralListScreen-D4dSsS9f.js";import"./recharts-Dq7pGiC-.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.js";import"./useAskAiCfoHostNavButtonProps-BW2SwSZE.js";import"./useFetchSuggestedQuestionsWhenReady-cPo0or_6.js";import"./MobileAppDrawer-BTO_dO8H.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]="b9fefdf8-66b1-4071-8334-ca4a3e6ada48",e._sentryDebugIdIdentifier="sentry-dbid-b9fefdf8-66b1-4071-8334-ca4a3e6ada48")}catch{}})();const B=R(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,o=w.getSignedInUser();return{onDismissClick:()=>{e(k()),n("..")},onSendClick:()=>{if(o!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(q())},onUpdateInviteFormLocalData:s=>{e(O({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{o!=null&&p.trackInviteEmailClicked("cancel")}}})(P),H=()=>{const e=T(),[t,n]=f.useState(!1),[o,s]=f.useState(!1),r=b(i=>z(i)),c=V(),_=A(),{useDynamicConfig:g}=x(),u=w.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const m=b(i=>C(i)),v=u?.firstName!=null?u.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:D}=g(y.zeniAccountsConfig),I=Y(D);f.useEffect(()=>{e(k()),r?.rewardsLastViewedTime==null&&o===!1&&(e(M()),s(!0))},[]),f.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(G(!0)))},[m.fetchState,e]);const N=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:i=>(S=>S.trackPageLoaded(F.Event.inviteEmailViewed))(i)}):null,a.jsx(B,{navigate:c,location:_,currentTenant:r,companyName:N,userName:v,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:I.maxAnnualPercentageYield})]})};function ue(){const{useFeatureGate:e}=x(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(d,{path:"/",element:t?a.jsx(j,{}):a.jsx(l,{})}),a.jsx(d,{path:"how-it-works",element:t?a.jsx(j,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(H,{}):a.jsx(l,{})}),a.jsx(d,{path:"*",element:a.jsx(l,{})})]})}export{ue as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-
|
|
2
|
-
import{_ as a,bm as os,eM as ls,eS as cs,eQ as ds,eR as ms,fC as us,eO as _s,cM as Ae,ct as As,f8 as Es,cl as ps,bB as Is,bp as gs,fd as xs,v as Ts,Ie as hs,bu as js,If as Us,bD as bs,fa as Hs,bC as Rs,br as Ds,cN as fs,Ig as ys,Ih as Cs,cJ as vs,cL as Os,cK as Ps,cs as Fs,cy as Ls,mh as Ee,eN as pe,Ii as Bs,fh as Ie,fI as ge,fJ as xe,fi as ks}from"./zeni-epic-state-BP6Uj047.js";import{j as e}from"./liveblocks-DXiLz49w.js";import{a as v}from"./sentry-C8WyuRaf.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as z,i as Te,N as c,n as Zs,o as t}from"./core-C_FlMzhB.js";import{h as ws,u as zs,z as H,s as Gs,a as $s,O as Ys,c as L,S as Ws,L as B,D as he,t as _,P as qs,d as X,l}from"./index-BabuXr6y.js";import"./mui-D4wswOer.js";import{f as je}from"./analyticsHelper-D2Lkt_0_.js";import{t as Js}from"./getLocaleForTenant-BZmydyUi.js";import"./recharts-BjJxsXby.js";import"./analytics-B8BYlogo.js";import"./plaid-CknlBCWN.js";import"./dnd-CTZ8xt4P.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bi_BmPss.js";import"./lexical-BmFHbDfb.js";import"./pdf-BUMfUQyN.js";import"./utils-l6Jt_9tl.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="85265dfb-e1fc-49bb-9168-4f7732d0cf57",i._sentryDebugIdIdentifier="sentry-dbid-85265dfb-e1fc-49bb-9168-4f7732d0cf57")}catch{}})();const Ks={dashboard:()=>a(()=>import("./DashboardRoutes-D3n4VoSd.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>a(()=>import("./BillPayRoutes-Vb4S1Y8K.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>a(()=>import("./ReimbursementRoutes-C4Oi6zv2.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,24,9,10,25,32,29,30,20])),transactions:()=>a(()=>import("./TransactionListRoutes-DA-II3iy.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>a(()=>import("./SettingsRoutes-C_1R1lRs.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20])),reports:()=>a(()=>import("./ReportsRoutes-BebY5YS1.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>a(()=>import("./ChargeCardRoutes-0wgJAAT_.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>a(()=>import("./PeopleRoutes-DAqZunqX.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>a(()=>import("./ExpenseAutomationRoutes-v2u24arD.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>a(()=>import("./TreasuryRoutes-CO1mD9L_.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>a(()=>import("./VendorsRoutes-SiTspMG6.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20])),zeniAccounts:()=>a(()=>import("./ZeniAccountRoutes-4nO_DRj9.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>a(()=>import("./ReportsRoutes-BebY5YS1.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),ea=l(()=>a(()=>import("./AddressRoutes-BUvoDB1G.js"),__vite__mapDeps([50,1,2,3,22,4,5,6,7,14,20]))),sa=l(()=>a(()=>import("./PeopleRoutes-DAqZunqX.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20]))),aa=l(()=>a(()=>import("./PandLWithForecastRoutes-DuWjgRje.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),na=l(()=>a(()=>import("./CustomerOnboardingRoutes-CR3VCOF1.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,14,37,38,39,40,41,12,20]))),ta=l(()=>a(()=>import("./VendorsRoutes-SiTspMG6.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20]))),ia=l(()=>a(()=>import("./TransactionDetailRoutes-v7cR8Xnn.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>a(()=>import("./EntityDetailRoutes-6Vf4c0CK.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),ra=l(()=>a(()=>import("./DashboardRoutes-D3n4VoSd.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),be=l(()=>a(()=>import("./BillPayRoutes-Vb4S1Y8K.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),oa=l(()=>a(()=>import("./SettingsRoutes-C_1R1lRs.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20]))),He=l(()=>a(()=>import("./ReimbursementRoutes-C4Oi6zv2.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,24,9,10,25,32,29,30,20]))),la=l(()=>a(()=>import("./ZeniAccountRoutes-4nO_DRj9.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),ca=l(()=>a(()=>import("./TreasuryRoutes-CO1mD9L_.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),da=l(()=>a(()=>import("./TransactionListRoutes-DA-II3iy.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),ma=l(()=>a(()=>import("./ChargeCardRoutes-0wgJAAT_.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),ua=l(()=>a(()=>import("./NotificationRoutes-BZkZ0nNy.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),_a=l(()=>a(()=>import("./PerformanceRoutes-ArSreWe6.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),Aa=l(()=>a(()=>import("./ExpenseAutomationRoutes-v2u24arD.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),Ea=l(()=>a(()=>import("./RewardsRoutes-D3ZdanqE.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),pa=l(()=>a(()=>import("./TaskRoutes-C3kXaPvb.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),Ia=l(()=>a(()=>import("./AiCfoScreen-VeT_S5hK.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,20]))),f=l(()=>a(()=>import("./NotFoundScreen-DG_ouxiW.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),ga=l(()=>a(()=>import("./TaskListScreen-CR9B7ON8.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function Za({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:y,clearAllLoading:O,clearLoading:Z}=zs(),D=H.getSignedInUserTenant(o)?.tenantId,h=H.getSignedInUser(),J=os(h),G=Ms(),[N,De]=v.useState(!1),r=z(n=>ls(n)),{useFeatureGate:P}=Gs(),K=$s(),fe=Ys(),{isFeatureEnabled:ye}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||ye&&J,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=z(n=>n.tenantState.fetchState),E=z(n=>n.tenantState.activeTenantFetchState.fetchState),u=E==="Completed"||j==="Completed"?cs(se,r):void 0,$=E==="Completed"||j==="Completed"?ds(r):void 0,Le=E==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),Y=z(n=>us(n));if(o!=null){const n=H.getSignedInUserTenant(o);h!=null&&n!=null&&je(h,r,S)}const w={tenantId:D,userId:h?.userId,sessionId:h?.zeniSessionId},ae=_s(),A=Ws(),Se=r.company==null||A?.loggedInUserRoleMap!=null&&Ae(A.loggedInUserRole),Ne=As(A?.loggedInUserRoleMap),ne=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,Q=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(n=>w.tenantId!=null?Es(n,w.tenantId):void 0);v.useEffect(()=>{y(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(Q!=null&&D!=null){const n=Q.params.selectedPeriod;if(n!=null){const b=n.split("-");if(b.length===2){const d=ps(Number(b[0])),s=Number(b[1]),m=Is(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=gs();m.isAfter(M,"month")===!1?U(xs(D,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[Q,D]),v.useEffect(()=>{N||(De(!0),y(B.TENANT_FETCHING)),ne.current?ne.current=!1:!Ts(ae,w)&&H.isSignedIn()&&(y(B.TENANT_FETCHING),function(n,b,d,s){if(pe(b?.userId,b?.zeniSessionId,n.tenantId),d(Bs(!0)),d(Ie(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const m=H.getSignedInUserTenantWithId(n.tenantId);s&&he.updateAppLocaleID(Js(s)),m?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}n.userId!=null?X.identify(n.userId,{tenant_id:n.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ae,h,U,H]),v.useEffect(()=>{H.isSignedIn()&&(y(B.TENANT_FETCHING),function(n,b,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(W&&ts){k(Ie(s));const q=H.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(q?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)))}else W&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),W&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)));if(W){X.identify(m.userId,{tenant_id:s});const q=s==null||s!=null&&(b==="Completed"||b==="Error");n==="Completed"||b!=="Not-Started"&&b!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ee(m.userId,m.zeniSessionId)))}}(j,E,r,D,h,y,U))},[D,E]),v.useEffect(()=>{H.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),H.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{E==="In-Progress"&&y(B.TENANT_FETCHING),E!=="Completed"&&E!=="Error"||(E==="Completed"&&D!=null?(O(),_.markActiveTenantFetchCompleted(D)):E==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[E,j,D,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&E==="Completed"&&N&&(ie.current=!0,function(n=Qs,b=3e3){setTimeout(()=>{const d=s=>{if(s>=n.length)return;const m=n[s],M=Ks[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},b)}())},[E,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ae(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,Ge=Us(A?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&bs(A?.loggedInUserRoleMap),me=Oe&&!C,Ye=r.company!=null&&Hs(r.company),We=Pe&&Ye===!0&&!C,qe=re&&Rs(A?.loggedInUserRoleMap),Je=oe&&Ds(A?.loggedInUserRoleMap),Ke=me&&fs(A?.loggedInUserRoleMap),Qe=ys(A?.loggedInUserRoleMap),Xe=Cs(A?.loggedInUserRoleMap),p=vs(A?.loggedInUserRoleMap),I=Os(A?.loggedInUserRoleMap),g=Ps(A?.loggedInUserRoleMap),x=Fs(A?.loggedInUserRoleMap),T=Ls(A?.loggedInUserRoleMap),ue=re&&x,_e=ce&&T,es=me&&p,ss=We&&I,as=oe&&g,ns=r.excludedResources?.resources?.find(n=>n.resource==="/invites")!=null||Ne===!0||Ge===!0||Qe===!0||Xe===!0;return H.isSignedIn()?D==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ee(h.userId,h.zeniSessionId)),null):E!=="In-Progress"&&E!=="Not-Started"||j==="Completed"?(le===!0||J&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||J?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(A.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(qs,{}),children:[e.jsx(t,{path:"/",element:e.jsx(xa,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(ra,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:ns||F?e.jsx(sa,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(aa,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(na,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||ze?e.jsx(ia,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(da,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:I,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(ga,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(pa,{})}),e.jsx(t,{path:"address/*",element:qe||de||Ke||Je?e.jsx(ea,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(la,{}):e.jsx(f,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(ca,{}):e.jsx(f,{})}),e.jsx(t,{path:"performance",element:fe?e.jsx(_a,{}):e.jsx(Re,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(Aa,{}):e.jsx(Re,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(ua,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(ta,{}):e.jsx(f,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(be,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(be,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(oa,{hasAdminLevelAccess:de}):e.jsx(f,{})}),e.jsx(t,{path:"cards/*",element:as?e.jsx(ma,{}):e.jsx(f,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(Ea,{}):e.jsx(f,{})}),e.jsx(t,{path:"/ai-cfo",element:K?e.jsx(c,{to:"explore"}):e.jsx(f,{})}),e.jsx(t,{path:"/ai-cfo/",element:K?e.jsx(c,{to:"explore"}):e.jsx(f,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:K?e.jsx(Ia,{isFileUploadEnabled:Ve}):e.jsx(f,{})}),e.jsx(t,{path:"*",element:e.jsx(f,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}const xa=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:y,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):y?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),R=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:y,tenantEmailDomain:O})=>y===!0||i?e.jsx(Ua,{tenantEmailDomain:O}):S?e.jsx(ja,{tenantEmailDomain:O}):U?e.jsx(ba,{tenantEmailDomain:O}):V?e.jsx(ha,{tenantEmailDomain:O}):o?e.jsx(Ta,{tenantEmailDomain:O}):e.jsx(f,{}),Ta=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),ja=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Ua=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),ba=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),Re=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{R as FallBackRoute,Za as default};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-btp07KOK.js","assets/sentry-DCGk37l1.js","assets/core-CNZua1e0.js","assets/zeni-epic-state-eW2EQdSt.js","assets/index-Co04ey3-.js","assets/mui-DtCOffvy.js","assets/analytics-Cm9Z6TfJ.js","assets/utils-DWAOcXZK.js","assets/withTransactionSidePanel-ykEXkuoH.js","assets/useAskAiCfoHostNavButtonProps-BW2SwSZE.js","assets/useFetchSuggestedQuestionsWhenReady-cPo0or_6.js","assets/TransactionDetailScreen-DORvf_A0.js","assets/decodeURIComponentSafe-Dac6kcoy.js","assets/routePaths-CHVZiiJU.js","assets/NotFoundScreen-CQPWWkLY.js","assets/analyticsHelper-ByMo5A8t.js","assets/CompanyPassportScreen-D3MdOGSR.js","assets/MobileAppDrawer-BTO_dO8H.js","assets/FeaturePreviewScreen-C7s5EUEI.js","assets/ReferralListScreen-D4dSsS9f.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-CiAJiA46.js","assets/AddressScreen-BRfd-CkJ.js","assets/DomesticWireDetailScreen-Cq9OTpl5.js","assets/useInitialThreadRequest-BV4XmA3t.js","assets/DrawerScreen-BddqtTBk.js","assets/SetupPagesScreen-D5f_S2gA.js","assets/BusinessVerificationPageScreen-surI_CG-.js","assets/BillPayApprovalRoutes-CVMR--P9.js","assets/ReimbursementApprovalRuleDetailScreen-CLK4qljf.js","assets/getLocaleForTenant-BYC6p0GO.js","assets/ReimbursementRoutes-Dle1xRUS.js","assets/ReimbursementApprovalRoutes-CQWk5hg2.js","assets/TransactionListRoutes-Dm17WsQR.js","assets/ZeniAccountStatementScreen-DCQ_lEqk.js","assets/SettingsRoutes-C1UlKVfn.js","assets/accountMappingHelper-Dr0t2P70.js","assets/QBOConnectionScreen-D6CMF20W.js","assets/empty-BLoZtodd.js","assets/index-QWM1qpc0.js","assets/url-C3uYKzo6.js","assets/index-jE-fly2Z.js","assets/ReportsRoutes-BVE7O3pM.js","assets/ChargeCardRoutes-DfK6AK1Y.js","assets/PeopleRoutes-Ah1x0pI6.js","assets/ExpenseAutomationRoutes-XSCKWGJC.js","assets/TreasuryRoutes-B_ttsGpb.js","assets/VendorsRoutes-xehzdyOP.js","assets/pathToGoBack-gmEN-6lU.js","assets/ZeniAccountRoutes-D4VHQXPj.js","assets/AddressRoutes-CWm4LI2A.js","assets/PandLWithForecastRoutes-CY2JRBex.js","assets/CustomerOnboardingRoutes-igtoru6q.js","assets/TransactionDetailRoutes-D3tlJJHj.js","assets/EntityDetailRoutes-J5KxaFpN.js","assets/NotificationRoutes-DfFcHUc_.js","assets/PerformanceRoutes-D-In2h69.js","assets/RewardsRoutes-BUOQCgBW.js","assets/TaskRoutes-6NyFYqIE.js","assets/TaskListScreen-vtDblzrs.js","assets/AiCfoScreen-CSI2_D3j.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as a,bm as os,eM as ls,eS as cs,eQ as ds,eR as ms,fC as us,eO as _s,cM as Ae,ct as As,f8 as Es,cl as ps,bB as Is,bp as gs,fd as xs,v as Ts,Ie as hs,bu as js,If as Us,bD as bs,fa as Hs,bC as Rs,br as Ds,cN as ys,Ig as fs,Ih as Cs,cJ as vs,cL as Os,cK as Ps,cs as Fs,cy as Ls,mh as Ee,eN as pe,Ii as Bs,fh as Ie,fI as ge,fJ as xe,fi as ks}from"./zeni-epic-state-eW2EQdSt.js";import{j as e}from"./liveblocks-CGYcZ7Lh.js";import{a as v}from"./sentry-DCGk37l1.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as z,i as Te,N as c,n as Zs,o as t}from"./core-CNZua1e0.js";import{h as ws,u as zs,z as H,i as Gs,a as $s,O as Ys,c as L,S as Ws,L as B,D as he,t as _,P as qs,d as X,l}from"./index-Co04ey3-.js";import"./mui-DtCOffvy.js";import{f as je}from"./analyticsHelper-ByMo5A8t.js";import{t as Js}from"./getLocaleForTenant-BYC6p0GO.js";import"./recharts-Dq7pGiC-.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="cad5393c-b6b6-4bc1-a2f8-f1347efa019b",i._sentryDebugIdIdentifier="sentry-dbid-cad5393c-b6b6-4bc1-a2f8-f1347efa019b")}catch{}})();const Ks={dashboard:()=>a(()=>import("./DashboardRoutes-btp07KOK.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>a(()=>import("./BillPayRoutes-CiAJiA46.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>a(()=>import("./ReimbursementRoutes-Dle1xRUS.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,24,9,10,25,32,29,30,20])),transactions:()=>a(()=>import("./TransactionListRoutes-Dm17WsQR.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>a(()=>import("./SettingsRoutes-C1UlKVfn.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20])),reports:()=>a(()=>import("./ReportsRoutes-BVE7O3pM.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>a(()=>import("./ChargeCardRoutes-DfK6AK1Y.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>a(()=>import("./PeopleRoutes-Ah1x0pI6.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>a(()=>import("./ExpenseAutomationRoutes-XSCKWGJC.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>a(()=>import("./TreasuryRoutes-B_ttsGpb.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>a(()=>import("./VendorsRoutes-xehzdyOP.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20])),zeniAccounts:()=>a(()=>import("./ZeniAccountRoutes-D4VHQXPj.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>a(()=>import("./ReportsRoutes-BVE7O3pM.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),ea=l(()=>a(()=>import("./AddressRoutes-CWm4LI2A.js"),__vite__mapDeps([50,1,2,3,22,4,5,6,7,14,20]))),sa=l(()=>a(()=>import("./PeopleRoutes-Ah1x0pI6.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20]))),aa=l(()=>a(()=>import("./PandLWithForecastRoutes-CY2JRBex.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),na=l(()=>a(()=>import("./CustomerOnboardingRoutes-igtoru6q.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,14,37,38,39,40,41,12,20]))),ta=l(()=>a(()=>import("./VendorsRoutes-xehzdyOP.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20]))),ia=l(()=>a(()=>import("./TransactionDetailRoutes-D3tlJJHj.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>a(()=>import("./EntityDetailRoutes-J5KxaFpN.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),ra=l(()=>a(()=>import("./DashboardRoutes-btp07KOK.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),be=l(()=>a(()=>import("./BillPayRoutes-CiAJiA46.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),oa=l(()=>a(()=>import("./SettingsRoutes-C1UlKVfn.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20]))),He=l(()=>a(()=>import("./ReimbursementRoutes-Dle1xRUS.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,24,9,10,25,32,29,30,20]))),la=l(()=>a(()=>import("./ZeniAccountRoutes-D4VHQXPj.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),ca=l(()=>a(()=>import("./TreasuryRoutes-B_ttsGpb.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),da=l(()=>a(()=>import("./TransactionListRoutes-Dm17WsQR.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),ma=l(()=>a(()=>import("./ChargeCardRoutes-DfK6AK1Y.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),ua=l(()=>a(()=>import("./NotificationRoutes-DfFcHUc_.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),_a=l(()=>a(()=>import("./PerformanceRoutes-D-In2h69.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),Aa=l(()=>a(()=>import("./ExpenseAutomationRoutes-XSCKWGJC.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),Ea=l(()=>a(()=>import("./RewardsRoutes-BUOQCgBW.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),pa=l(()=>a(()=>import("./TaskRoutes-6NyFYqIE.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),Ia=l(()=>a(()=>import("./AiCfoScreen-CSI2_D3j.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,20]))),y=l(()=>a(()=>import("./NotFoundScreen-CQPWWkLY.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),ga=l(()=>a(()=>import("./TaskListScreen-vtDblzrs.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function Za({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=zs(),D=H.getSignedInUserTenant(o)?.tenantId,h=H.getSignedInUser(),J=os(h),G=Ms(),[N,De]=v.useState(!1),r=z(n=>ls(n)),{useFeatureGate:P}=Gs(),K=$s(),ye=Ys(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&J,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=z(n=>n.tenantState.fetchState),E=z(n=>n.tenantState.activeTenantFetchState.fetchState),u=E==="Completed"||j==="Completed"?cs(se,r):void 0,$=E==="Completed"||j==="Completed"?ds(r):void 0,Le=E==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),Y=z(n=>us(n));if(o!=null){const n=H.getSignedInUserTenant(o);h!=null&&n!=null&&je(h,r,S)}const w={tenantId:D,userId:h?.userId,sessionId:h?.zeniSessionId},ae=_s(),A=Ws(),Se=r.company==null||A?.loggedInUserRoleMap!=null&&Ae(A.loggedInUserRole),Ne=As(A?.loggedInUserRoleMap),ne=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,Q=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(n=>w.tenantId!=null?Es(n,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(Q!=null&&D!=null){const n=Q.params.selectedPeriod;if(n!=null){const b=n.split("-");if(b.length===2){const d=ps(Number(b[0])),s=Number(b[1]),m=Is(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=gs();m.isAfter(M,"month")===!1?U(xs(D,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[Q,D]),v.useEffect(()=>{N||(De(!0),f(B.TENANT_FETCHING)),ne.current?ne.current=!1:!Ts(ae,w)&&H.isSignedIn()&&(f(B.TENANT_FETCHING),function(n,b,d,s){if(pe(b?.userId,b?.zeniSessionId,n.tenantId),d(Bs(!0)),d(Ie(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const m=H.getSignedInUserTenantWithId(n.tenantId);s&&he.updateAppLocaleID(Js(s)),m?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}n.userId!=null?X.identify(n.userId,{tenant_id:n.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ae,h,U,H]),v.useEffect(()=>{H.isSignedIn()&&(f(B.TENANT_FETCHING),function(n,b,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(W&&ts){k(Ie(s));const q=H.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(q?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)))}else W&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),W&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)));if(W){X.identify(m.userId,{tenant_id:s});const q=s==null||s!=null&&(b==="Completed"||b==="Error");n==="Completed"||b!=="Not-Started"&&b!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ee(m.userId,m.zeniSessionId)))}}(j,E,r,D,h,f,U))},[D,E]),v.useEffect(()=>{H.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),H.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{E==="In-Progress"&&f(B.TENANT_FETCHING),E!=="Completed"&&E!=="Error"||(E==="Completed"&&D!=null?(O(),_.markActiveTenantFetchCompleted(D)):E==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[E,j,D,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&E==="Completed"&&N&&(ie.current=!0,function(n=Qs,b=3e3){setTimeout(()=>{const d=s=>{if(s>=n.length)return;const m=n[s],M=Ks[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},b)}())},[E,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ae(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,Ge=Us(A?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&bs(A?.loggedInUserRoleMap),me=Oe&&!C,Ye=r.company!=null&&Hs(r.company),We=Pe&&Ye===!0&&!C,qe=re&&Rs(A?.loggedInUserRoleMap),Je=oe&&Ds(A?.loggedInUserRoleMap),Ke=me&&ys(A?.loggedInUserRoleMap),Qe=fs(A?.loggedInUserRoleMap),Xe=Cs(A?.loggedInUserRoleMap),p=vs(A?.loggedInUserRoleMap),I=Os(A?.loggedInUserRoleMap),g=Ps(A?.loggedInUserRoleMap),x=Fs(A?.loggedInUserRoleMap),T=Ls(A?.loggedInUserRoleMap),ue=re&&x,_e=ce&&T,es=me&&p,ss=We&&I,as=oe&&g,ns=r.excludedResources?.resources?.find(n=>n.resource==="/invites")!=null||Ne===!0||Ge===!0||Qe===!0||Xe===!0;return H.isSignedIn()?D==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ee(h.userId,h.zeniSessionId)),null):E!=="In-Progress"&&E!=="Not-Started"||j==="Completed"?(le===!0||J&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||J?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(A.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(qs,{}),children:[e.jsx(t,{path:"/",element:e.jsx(xa,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(ra,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:ns||F?e.jsx(sa,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(aa,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(na,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||ze?e.jsx(ia,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(da,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:I,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(ga,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(pa,{})}),e.jsx(t,{path:"address/*",element:qe||de||Ke||Je?e.jsx(ea,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(la,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(ca,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(_a,{}):e.jsx(Re,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(Aa,{}):e.jsx(Re,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(ua,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(ta,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(be,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(be,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(oa,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:as?e.jsx(ma,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(Ea,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:K?e.jsx(Ia,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}const xa=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),R=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(Ua,{tenantEmailDomain:O}):S?e.jsx(ja,{tenantEmailDomain:O}):U?e.jsx(ba,{tenantEmailDomain:O}):V?e.jsx(ha,{tenantEmailDomain:O}):o?e.jsx(Ta,{tenantEmailDomain:O}):e.jsx(y,{}),Ta=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),ja=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Ua=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),ba=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),Re=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{R as FallBackRoute,Za as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-
|
|
1
|
+
import{j as t}from"./liveblocks-CGYcZ7Lh.js";import{a as u}from"./sentry-DCGk37l1.js";import{j as T,u as R,h as P,g as m,k as B,l as _,n as H,o as C}from"./core-CNZua1e0.js";import{bm as Ie,eM as w,gr as ce,Kf as Ce,IE as xe,jm as le,lF as Ee,gt as Ae,Kh as ke,Kg as we,MG as je,w_ as Pe,Bt as ve,Mf as Me,Mo as De,b$ as re,cD as Ue,cE as Te,Ir as Fe,MH as Re,Is as Be,vq as _e,MI as Ve,DJ as Le,B9 as Oe,B0 as de,AZ as Ne,vu as ue,B3 as pe,B6 as ge,Bc as W,s1 as X,vt as $e,i_ as Y,j1 as me,MJ as Ge,k2 as Ke,vJ as ze,Ja as Je,Jb as Ze,iY as Qe,MK as qe,i$ as He,ML as Ye,vG as We,MM as Xe,MN as en,Bq as nn,eQ as fe,eS as he,MO as tn,fv as an,ID as sn,vF as te,fA as ae,fz as on,vE as cn,fy as ln,fx as rn,MP as dn,eV as be,MQ as un,MR as pn,vM as gn,vD as se,MS as mn,fc as fn,vA as hn,bS as bn,b_ as Sn,bZ as yn,bT as In,bX as Cn,bW as xn,bV as En,bY as An,bU as kn}from"./zeni-epic-state-eW2EQdSt.js";import{i as ee,c as D,z as x,aa as Se,bA as wn,d as G,f as jn,S as V,x as ne,bB as Pn,bC as vn,al as Mn,j as ye,bD as Dn,bE as Un,bF as Tn,a4 as Fn,I as Rn,bG as Bn,n as _n,bH as Vn}from"./index-Co04ey3-.js";import{n as U}from"./mui-DtCOffvy.js";import{M as v}from"./MobileAppDrawer-BTO_dO8H.js";import{a as N,g as $,m as Ln}from"./accountMappingHelper-Dr0t2P70.js";import{t as On,A as Nn}from"./AddressScreen-BRfd-CkJ.js";import F from"./NotFoundScreen-CQPWWkLY.js";import{g as $n}from"./analyticsHelper-ByMo5A8t.js";import{B as Gn}from"./BusinessVerificationPageScreen-surI_CG-.js";import{C as Kn}from"./CompanyPassportScreen-D3MdOGSR.js";import{q as oe}from"./QBOConnectionScreen-D6CMF20W.js";import{B as zn}from"./BillPayApprovalRoutes-CVMR--P9.js";import{R as Jn}from"./ReimbursementApprovalRoutes-CQWk5hg2.js";import"./recharts-Dq7pGiC-.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.js";import"./routePaths-CHVZiiJU.js";import"./empty-BLoZtodd.js";import"./pdf-lib-CE0iOBgb.js";import"./index-QWM1qpc0.js";import"./url-C3uYKzo6.js";import"./index-jE-fly2Z.js";import"./decodeURIComponentSafe-Dac6kcoy.js";import"./ReimbursementApprovalRuleDetailScreen-CLK4qljf.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]="ca7bf522-728f-4313-8507-af2570cfc9e0",e._sentryDebugIdIdentifier="sentry-dbid-ca7bf522-728f-4313-8507-af2570cfc9e0")}catch{}})();const Zn=U.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,7 +6,7 @@ import{j as t}from"./liveblocks-DXiLz49w.js";import{a as u}from"./sentry-C8WyuRa
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,Qn=B(function(e,a){return{accountMappingView:a.accountMappingView,isFiling1099FeatureEnabled:a.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:a.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:le(e),isAccountingClassesUpdateInProgress:e.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:xe(e),meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true"}},function(e,a){const{navigate:i,location:c,isFiling1099FeatureEnabled:o}=a;return{onAccountMappingChange:n=>{const{uncategorizedAccountSection:s,billsAccountSection:r,reimbursementsAccountSection:p,vendorsAccountSection:d,filing1099Section:f}=n,{incomeAccount:b,expenseAccount:g}=s,{billPayAccount:l}=r,{reimbursementsAccount:E}=p,{prepaidExpensesAccount:y,fixedAssetsAccount:k,accruedExpensesAccount:S}=d,{bankAccount:I,expenseCategory1099:L}=f,A=N(a.accountMappingView.incomeAccountList,b.selectedOption),K=N(a.accountMappingView.expenseAccountList,g.selectedOption),
|
|
9
|
+
`,Qn=B(function(e,a){return{accountMappingView:a.accountMappingView,isFiling1099FeatureEnabled:a.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:a.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:le(e),isAccountingClassesUpdateInProgress:e.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:xe(e),meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true"}},function(e,a){const{navigate:i,location:c,isFiling1099FeatureEnabled:o}=a;return{onAccountMappingChange:n=>{const{uncategorizedAccountSection:s,billsAccountSection:r,reimbursementsAccountSection:p,vendorsAccountSection:d,filing1099Section:f}=n,{incomeAccount:b,expenseAccount:g}=s,{billPayAccount:l}=r,{reimbursementsAccount:E}=p,{prepaidExpensesAccount:y,fixedAssetsAccount:k,accruedExpensesAccount:S}=d,{bankAccount:I,expenseCategory1099:L}=f,A=N(a.accountMappingView.incomeAccountList,b.selectedOption),K=N(a.accountMappingView.expenseAccountList,g.selectedOption),z=N(a.accountMappingView.billPayAccountList,l.selectedOption),J=N(a.accountMappingView.reimbursementsAccountList,E.selectedOption),O=$(a.accountMappingView.prepaidExpensesAccountList,y.selectedOptions),h=$(a.accountMappingView.fixedAssetsAccountList,k.selectedOptions),M=$(a.accountMappingView.accruedExpensesAccountList,S.selectedOptions),Z=$(a.accountMappingView.bankAccounts1099FilingAccountList,I.selectedOptions),Q=Ln(a.accountMappingView.expenseAccounts1099FilingAccountList,L),q={selectedIncomeAccountId:A?.accountId,selectedExpenseAccountId:K?.accountId,selectedBillPayAccountId:z?.accountId,selectedReimbursementsAccountId:J?.accountId,selectedPrepaidExpensesAccountIds:O.map(j=>j.accountId),selectedFixedAssetsAccountIds:h.map(j=>j.accountId),selectedAccruedExpensesAccountIds:M.map(j=>j.accountId),selectedBankAccounts1099FilingAccountIds:Z.map(j=>j.accountId),selectedExpenseAccounts1099FilingAccountIds:Q};e(we({data:q}))},onBackClick:()=>{Se(c)===!1?(i("../../dashboard"),e(ke())):e(ce())},onSaveClick:()=>{e(Ae()),o&&G.track(jn.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:n=>{e(Ee(a.currentTenant.companyId,n))}}})(wn),qn=()=>{const e=T(),a=R(),i=P(),{useFeatureGate:c}=ee(),{isFeatureEnabled:o}=c(D.isFiling1099FeatureEnabled),{isFeatureEnabled:n}=c(D.isScheduledJEAccruedExpensesFeatureEnabled),s=x.getSignedInUser(),r=Ie(s),p=m(y=>w(y)),[d,f]=u.useState(!1),[b,g]=u.useState(!1);u.useEffect(()=>{d===!1&&(i(ce()),f(!0))},[d]);const l=m(y=>Ce(y)),E=y=>{g(y)};return t.jsxs(Zn,{children:[t.jsx(v,{isAppContentDrawerOpen:b,handleDrawerToggle:E}),t.jsx(Qn,{currentTenant:p,navigate:e,accountMappingView:l,isFiling1099FeatureEnabled:o&&r,isAccruedExpensesFeatureEnabled:n,location:a,isSettings:Se(a),onClickMenuIcon:()=>E(!0)})]})},Hn=U.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
height: 100%;
|
|
12
12
|
width: 100%;
|
|
@@ -30,7 +30,7 @@ import{j as t}from"./liveblocks-DXiLz49w.js";import{a as u}from"./sentry-C8WyuRa
|
|
|
30
30
|
flex-direction: column;
|
|
31
31
|
align-items: center;
|
|
32
32
|
background-color: ${e=>e.theme.colors.grey4};
|
|
33
|
-
`,at=B(function(e,a){const{companyId:i}=a,c=w(e),o=a.roleMap.bill_pay_admin,n=Ge(e,i),{uiState:s}=n,r=(re(c?.userRole??[])||o)&&n.setupView.accountFetchStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.accountUpdateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{billingSetupView:n,uiState:s,stripeKey:ye.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:r,analytics:G}},function(e,a){const{navigate:i,currentTenant:c,companyId:o}=a;return{onFetchLinkTokenClick:(n,s)=>{e(X("billing_setup",n,s))},onEstablishConnectionClick:n=>{e(W(n,o,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(ue("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,s,r)=>{e(ge(n,s,"billing","billing_setup",r))},onUpdatePaymentAccountLoginStatus:(n,s)=>{e(pe(!1,n,"billing","billing_setup",s))},onUpdateAccountClick:(n,s)=>{e(de(n,s,"billing","billing_setup"))},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?i("../.."):i("../")},onNavigateToDashboard:()=>{i("../dashboard")},handleCreateCardSetupIntent:n=>{e(me(n))},handleConfirmCardSetupIntent:n=>{e(He(n))},updateCardPaymentModalState:n=>{e(qe({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,s,r)=>{e(Qe(n,s,r))},handleFetchPaymentSources:()=>{e(Y())},resetCardPaymentViewState:()=>{e(Ze())},handleResetCardPaymentErrorStatuses:()=>{e(
|
|
33
|
+
`,at=B(function(e,a){const{companyId:i}=a,c=w(e),o=a.roleMap.bill_pay_admin,n=Ge(e,i),{uiState:s}=n,r=(re(c?.userRole??[])||o)&&n.setupView.accountFetchStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.accountUpdateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{billingSetupView:n,uiState:s,stripeKey:ye.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:r,analytics:G}},function(e,a){const{navigate:i,currentTenant:c,companyId:o}=a;return{onFetchLinkTokenClick:(n,s)=>{e(X("billing_setup",n,s))},onEstablishConnectionClick:n=>{e(W(n,o,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(ue("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,s,r)=>{e(ge(n,s,"billing","billing_setup",r))},onUpdatePaymentAccountLoginStatus:(n,s)=>{e(pe(!1,n,"billing","billing_setup",s))},onUpdateAccountClick:(n,s)=>{e(de(n,s,"billing","billing_setup"))},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?i("../.."):i("../")},onNavigateToDashboard:()=>{i("../dashboard")},handleCreateCardSetupIntent:n=>{e(me(n))},handleConfirmCardSetupIntent:n=>{e(He(n))},updateCardPaymentModalState:n=>{e(qe({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,s,r)=>{e(Qe(n,s,r))},handleFetchPaymentSources:()=>{e(Y())},resetCardPaymentViewState:()=>{e(Ze())},handleResetCardPaymentErrorStatuses:()=>{e(Je())},onBillingAddressSave:n=>{e(ze(n))},onAddressEditHandler:n=>{if(n!=null){const s=On(n);e(Ke({addressType:"subscription_billing_address",addressToCreate:s}))}}}})(Dn),st=()=>{const e=T(),a=R(),i=P(),{tenantEmailDomain:c}=_(),[o,n]=u.useState(!1),[s,r]=u.useState(!1),[p,d]=u.useState(!1),f=m(I=>w(I)),b=m(I=>I.cardPaymentViewState),g=m(I=>I.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState),l=Mn(b.addCardPaymentSourceStatus.fetchState),E=b.addCardPaymentSourceStatus.fetchState,y=f.companyId??x.getSignedInUserTenant(c)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const k=V();u.useEffect(()=>{y!=null&&i($e(y,!1))},[y,i]),u.useEffect(()=>{s||(r(!0),i(Y()))},[s,i]),u.useEffect(()=>{p||(me(["card"]),d(!0))},[p]),u.useEffect(()=>{l==="In-Progress"&&E==="Completed"&&i(Y())},[l,E]);const S=I=>{n(I)};return k?.loggedInUserRoleMap!=null?t.jsxs(tt,{children:[t.jsx(v,{isAppContentDrawerOpen:o,handleDrawerToggle:S}),t.jsx(at,{navigate:e,location:a,companyId:y,currentTenant:f,roleMap:k.loggedInUserRoleMap,onClickMenuIcon:()=>{S(!0)},googleAPIKey:ye.googleMapsAPIKey})]}):t.jsx(ne,{fetchState:g})},ot=B(function(){return{meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true"}},function(e,a){const{navigate:i,integrationsView:c,tenantEmailDomain:o}=a;return{onBackClick:()=>{i("../")},onNavigateToDashboard:()=>{i("../dashboard")},onReconnectQBO:()=>{oe.init("/connection/auth",o),oe.handleClick()},onRefreshClick:()=>{c.integrations.refreshQBO.fetchState!=="In-Progress"&&e(We())}}})(Un),it=()=>{const e=T(),{tenantEmailDomain:a}=_(),[i,c]=u.useState(!1),o=m(g=>g.tenantState.fetchState),n=m(g=>w(g)),s=n.companyId??x.getSignedInUserTenant(a)?.companyId,r=x.getSignedInUser(),p=V(),d=p?.loggedInUserRole.includes("admin")===!0;if(r==null)throw Error("Can't access Integrations page without signing in...");const f=g=>{c(g)},b=m(g=>Ye(g,s));return p?.loggedInUserRoleMap!=null?t.jsxs(ct,{children:[t.jsx(v,{isAppContentDrawerOpen:i,handleDrawerToggle:f}),t.jsx(ot,{navigate:e,onClickMenuIcon:()=>{f(!0)},isAdmin:d,integrationsView:b,isLoading:o==="In-Progress",tenantEmailDomain:n.tenantEmailDomain})]}):t.jsx(ne,{fetchState:o})},ct=U.div`
|
|
34
34
|
display: flex;
|
|
35
35
|
height: 100%;
|
|
36
36
|
width: 100%;
|
|
@@ -54,4 +54,4 @@ import{j as t}from"./liveblocks-DXiLz49w.js";import{a as u}from"./sentry-C8WyuRa
|
|
|
54
54
|
flex-direction: column;
|
|
55
55
|
align-items: center;
|
|
56
56
|
background-color: ${e=>e.theme.colors.grey4};
|
|
57
|
-
`,ie=({appContent:e})=>{const a=P(),i=T(),c=R(),[o,n]=u.useState(!1),s=m(h=>w(h)),{tenantEmailDomain:r}=s,p=s.companyId??x.getSignedInUserTenant(r)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:d}=ee(),{isFeatureEnabled:f}=d(D.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(D.isChargeCardFeatureEnabled),{isFeatureEnabled:g}=d(D.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=d(D.isTreasuryEnabled),E=m(h=>le(h)),y=fe(s),k=he(g,s),S=!k&&E,I=Fn(s,b,g),{areTenantIdsInSync:L}=Rn();u.useEffect(()=>{L&&a(tn(p,S))},[p,a,S,L]);const A=m(h=>an(h,S)),K=A.fetchState==="Not-Started"||A.fetchState==="In-Progress"||p==null,
|
|
57
|
+
`,ie=({appContent:e})=>{const a=P(),i=T(),c=R(),[o,n]=u.useState(!1),s=m(h=>w(h)),{tenantEmailDomain:r}=s,p=s.companyId??x.getSignedInUserTenant(r)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:d}=ee(),{isFeatureEnabled:f}=d(D.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(D.isChargeCardFeatureEnabled),{isFeatureEnabled:g}=d(D.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=d(D.isTreasuryEnabled),E=m(h=>le(h)),y=fe(s),k=he(g,s),S=!k&&E,I=Fn(s,b,g),{areTenantIdsInSync:L}=Rn();u.useEffect(()=>{L&&a(tn(p,S))},[p,a,S,L]);const A=m(h=>an(h,S)),K=A.fetchState==="Not-Started"||A.fetchState==="In-Progress"||p==null,z=sn(s),J=!!s.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,O=h=>{n(h)};return t.jsxs(dt,{children:[t.jsx(v,{isAppContentDrawerOpen:o,handleDrawerToggle:O}),e!=null?t.jsx(t.Fragment,{children:e}):t.jsx(Bn,{myProfileView:A,isAccountingClassesEnabled:E,isReimbursementDisabled:J===!1,isZeniAccountsDisabled:f===!1,isChargeCardDisabled:I===!1,isTreasuryDisabled:l===!1,isLiteRoleDisabled:z===!1,onClickMenuIcon:()=>{O(!0)},isLoading:K,isBankingOnlyTenant:k,isCardsOnlyTenant:y,onAddressClick:h=>{const M=function(Q,q){let j=`/${Q}/settings/my_profile`;return j=j.concat(`/new/${q}`),j}(r,h),Z=_n(c.state?.pathnameStackToGoBack,c.pathname);i(M,{state:{pathnameStackToGoBack:Z}})},onGetOtp:h=>{const M={...A.myProfileLocalData,phone:h};a(te({localData:M})),a(rn(h,"MyProfile"))},onResendOtp:h=>{a(ln(h,"MyProfile"))},onCancelClick:()=>{a(cn())},onSaveClick:()=>{a(ae("MyProfile",A.myProfileLocalData.phone,A.myProfileLocalData.otpChallenge,A.myProfileLocalData.dateOfBirth,A.addressData?.addressToCreate))},onVerifyOtp:(h,M)=>{a(on(h,M,"MyProfile"))},onVerifyOtpSuccess:h=>{h!=null&&x.saveZeniOtpToken(h),a(ae("MyProfile",A.myProfileLocalData.phone,A.myProfileLocalData.otpChallenge,A.myProfileLocalData.dateOfBirth,A.addressData?.addressToCreate))},updateMyProfileLocalData:h=>{a(te({localData:h}))}})]})};function ut(){const e=P(),a=m(l=>w(l)).companyId,i=m(l=>dn(l)),c=m(l=>be(l)),o=x.getSignedInUser(),[n,s]=u.useState(!1),r=u.useCallback(l=>{s(l)},[]),p=u.useCallback(l=>{e(un(l))},[]),d=u.useCallback(()=>{o?.userEmail!=null&&e(pn({loggedInUserEmail:o.userEmail}))},[o?.userEmail]),f=u.useCallback(()=>{e(gn())},[]);if(o==null)throw Error("Can't access Notification Settings page without signing in...");const b=u.useCallback(()=>{const l=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(se(l,a))},[a,c.notificationSettings.monthEndInsightsNotificationSettings.enabled]),g=u.useCallback(()=>{e(mn())},[]);return u.useEffect(()=>{if(c.fetchState==="Completed"&&i.fetchState!=="In-Progress"&&i.fetchState!=="Completed"){const l=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(se(l,a))}},[i.fetchState,a,c.notificationSettings.monthEndInsightsNotificationSettings.enabled,c.fetchState]),t.jsxs(t.Fragment,{children:[t.jsx(v,{isAppContentDrawerOpen:n,handleDrawerToggle:r}),t.jsx(Vn,{notificationSettingsView:i,onFormDataChange:p,onCancel:d,onSave:f,onClickMenuIcon:()=>{r(!0)},signedInUser:o,onRefresh:b,resetUpdateStatus:g})]})}function Jt(e){const[a,i]=u.useState(!1),c=m(l=>be(l)),o=m(l=>w(l)),n=V(),s=x.getSignedInUser(),r=P(),{useFeatureGate:p}=ee(),{isFeatureEnabled:d}=p(D.isDebitCardFeatureEnabled),f=s?.userEmail==null||c.fetchState!=="Completed"||fn(c.notificationSettings,s.userEmail,d,o);u.useEffect(()=>{c.fetchState!=="In-Progress"&&c.fetchState!=="Completed"&&a===!1&&(i(!0),r(hn()))},[c.fetchState,a]);const b=he(d,o),g=fe(o);return c.fetchState!=="In-Progress"&&c.fetchState!=="Not-Started"||f!==!0?bn(o)?t.jsxs(H,{children:[Sn(n?.loggedInUserRole??[],d,o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"accounting/*",element:t.jsx(qn,{})}),yn(n?.loggedInUserRole??[],d,o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"approval_rules/*",element:t.jsx(pt,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),In(o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"my_bank_connections",element:t.jsx(rt,{})}),Cn(o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"bank_connections",element:t.jsx(nt,{})}),xn(o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"business_verification",element:t.jsx(Gn,{productType:b?"zeni_accounts":g?"charge_cards":$n(o,n?.loggedInUserRoleMap)})}),En(n?.loggedInUserRole??[],o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"company_details",element:t.jsx(Kn,{})}),An(n?.loggedInUserRole??[],o)&&t.jsx(C,{path:"billing",element:t.jsx(st,{})}),kn(n?.loggedInUserRole??[],d,o)&&t.jsx(C,{path:"integrations",element:t.jsx(it,{})}),t.jsx(C,{path:"my_profile/new/:addressType",element:t.jsx(ie,{appContent:t.jsx(Nn,{isSubPage:!1})})}),t.jsx(C,{path:"my_profile",element:t.jsx(ie,{})}),f&&t.jsx(C,{path:"notifications",element:t.jsx(ut,{})}),t.jsx(C,{path:"*",element:t.jsx(F,{})})]}):t.jsx(H,{children:t.jsx(C,{path:"*",element:t.jsx(F,{})})}):null}function pt(e){return t.jsxs(H,{children:[t.jsx(C,{path:"/",element:t.jsx(Wn,{})}),t.jsx(C,{path:"bills/approval-rules/*",element:t.jsx(zn,{})}),t.jsx(C,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?t.jsx(Jn,{}):t.jsx(F,{})}),t.jsx(C,{path:"*",element:t.jsx(F,{})})]})}export{Jt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-
|
|
1
|
+
import{j as u}from"./liveblocks-CGYcZ7Lh.js";import{j as J,u as X,h as Y,l as W,g as w,N as M,k as G,q as Xe}from"./core-CNZua1e0.js";import{bC as Ye,cN as Ie,M3 as ye,eM as F,ct as en,x9 as Z,w_ as nn,Mf as tn,Mi as an,pA as ee,po as ne,jW as te,rz as N,Mk as Ae,fz as $e,fy as We,fx as Ge,Ml as sn,xi as on,B9 as ke,B0 as _e,AZ as ve,AQ as K,B3 as Pe,B6 as we,Bc as Ee,s1 as De,fK as cn,co as rn,eS as un,eQ as dn,eR as ln,br as pn,Mm as mn,zS as le,Au as yn,Mn as fn,bD as gn,Cp as pe,Bt as Sn,Mo as bn,Mp as hn,Ct as Cn,Cx as In,rs as An,GD as kn,D2 as Ce,DX as me,Mq as _n,Mr as vn,Ms as Pn,Mt as He,Mu as wn,IZ as En,Ls as Dn,J9 as Tn,Mv as qe,Mw as xe,Dg as Ke,k2 as Un,pr as Qe,rB as On,bB as je,rN as Me,cr as Bn,Mx as Je,fb as xn,CM as Fn,CQ as Vn,My as jn,D5 as Re,Mz as Mn,MA as Rn,MB as Nn,MC as zn,fG as Ln,yt as Zn,MD as $n,yy as Wn,yx as Gn}from"./zeni-epic-state-eW2EQdSt.js";import{S as ae,i as ie,c as de,h as Te,aI as Q,z as D,y as se,d as E,x as Ue,f as $,bp as Hn,ao as oe,bq as V,br as qn,bs as Kn,aa as Ve,bt as Qn,n as Ne,ap as ze,K as Jn,C as Xn,bu as Yn,bv as et,bw as nt,a1 as tt}from"./index-Co04ey3-.js";import{a as C}from"./sentry-DCGk37l1.js";import{n as Fe,D as at,S as it}from"./mui-DtCOffvy.js";import{M as fe}from"./MobileAppDrawer-BTO_dO8H.js";import R from"./NotFoundScreen-CQPWWkLY.js";import{a as Le}from"./analyticsHelper-ByMo5A8t.js";import{c as Ze}from"./routePaths-CHVZiiJU.js";import{B as Be}from"./BusinessVerificationPageScreen-surI_CG-.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]="6074e0a8-e5e1-46a6-82e3-9c5f3a549a36",e._sentryDebugIdIdentifier="sentry-dbid-6074e0a8-e5e1-46a6-82e3-9c5f3a549a36")}catch{}})();const st=Fe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as u}from"./liveblocks-CGYcZ7Lh.js";import{a as f,b as T,q as A}from"./sentry-DCGk37l1.js";import{h as D,j as z,g as c,u as M,N as j,k as O}from"./core-CNZua1e0.js";import{u as F,z as s,h as P,d as E,D as B,e as N,f as _,Y as V,g as $,B as q,j as v}from"./index-Co04ey3-.js";import{eM as J,Id as Q,Ie as R,eN as W,fh as Y,Ik as H,fF as G,cR as K,Il as b,Im as X,In as Z,bQ as y}from"./zeni-epic-state-eW2EQdSt.js";import"./mui-DtCOffvy.js";import{u as ee}from"./useDeviceId-SQLvKnL0.js";import{f as te}from"./analyticsHelper-ByMo5A8t.js";import{t as ne}from"./getLocaleForTenant-BYC6p0GO.js";import"./recharts-Dq7pGiC-.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.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]="75d70470-4ac9-4e91-9c31-b9695831acb1",t._sentryDebugIdIdentifier="sentry-dbid-75d70470-4ac9-4e91-9c31-b9695831acb1")}catch{}})();const ie=O(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}},function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(l),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(X(n,a)))},clearSignInError:()=>{t(b())}}})(q),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=F(),n=s.getSignedInUser();f.useLayoutEffect(()=>{g()},[g]);const a=ee(),l=c(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:C,accountUnlockTime:k}=c(e=>e.tenantState),p=c(e=>e.tenantState.fetchState),L=c(e=>e.tenantState.activeTenantFetchState.fetchState),I=c(e=>e.tenantState.signInState),o=c(e=>e.tenantState.loggedInUser),r=c(e=>J(e)),S=c(e=>Q(e)),m=M(),w=P().mode,U=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(f.useEffect(()=>{h.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))},[h.fetchState,l]),f.useEffect(()=>{t(void 0)},[]),f.useEffect(()=>{I!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(R(S.tenantsInOrder),o.zeniSessionId),W(o.userId,o.zeniSessionId,r.tenantId),i(Y(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(H("Completed")),B.updateAppLocaleID(ne(r)),te(o,r,w,void 0,S.tenantsInOrder),G().then(()=>{const e=$();e!=null&&N(e)}),setTimeout(()=>{E.trackLogin(_.Event.loginSuccess,o.authProvider??"google",K(r.productSettings))},2e3))},[I,p,L,o,r,S,w,m.state,i]),I==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return u.jsx(j,{to:e,state:{...m.state,origin:""}})}return u.jsxs(u.Fragment,{children:[u.jsx(ae,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&k!=null?u.jsx(V,{onClose:()=>i(b()),unlockDate:k}):null]})}export{ve as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-CGYcZ7Lh.js";import{a as n}from"./sentry-DCGk37l1.js";import{h as u,u as m,j as p,N as g}from"./core-CNZua1e0.js";import{z as d,x as y,t as h,d as f,f as b}from"./index-Co04ey3-.js";import{IA as I,Ii as x,IB as j}from"./zeni-epic-state-eW2EQdSt.js";import{n as w}from"./mui-DtCOffvy.js";import"./recharts-Dq7pGiC-.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.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]="4d6a3529-d313-45a2-bc67-aed997eef6c3",e._sentryDebugIdIdentifier="sentry-dbid-4d6a3529-d313-45a2-bc67-aed997eef6c3")}catch{}})();function q(){const e=u(),t=m(),i=p(),a=n.useRef(!1),c=d.isSignedIn(),r=t.state?.message==="logout",o=r||c;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{d.clearAll(),e(I()),e(x(!1)),j(),h.reset(),f.trackLogout(b.Event.logoutSuccess),f.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=w.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
height: 100vh;
|
|
4
|
+
width: 100%;
|
|
5
|
+
flex: 1 1 auto;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
+
`;export{q as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as k}from"./liveblocks-
|
|
1
|
+
import{j as k}from"./liveblocks-CGYcZ7Lh.js";import{a as m}from"./sentry-DCGk37l1.js";import{j,h as N,u as R,g as G,l as $,k as O}from"./core-CNZua1e0.js";import{H as v,z as K,i as M,c as U,y as _,d as z,f as V,cE as W,n as f,p as q}from"./index-Co04ey3-.js";import{eM as H,Pk as L,Fo as C,Pl as w,Pg as J,EP as S,Pm as Q,ET as I,Es as X,Fp as b,Pn as B,gy as Y,Fe as Z,Fj as aa,F6 as ta,F4 as ea,Fk as sa,F1 as oa,Po as na,Pp as ia,Pq as la,Pr as u,e8 as ra,Ps as ca,Pt as pa}from"./zeni-epic-state-eW2EQdSt.js";import{n as ka}from"./mui-DtCOffvy.js";import{u as ua}from"./useAskAiCfoHostNavButtonProps-BW2SwSZE.js";import{c as da}from"./useFetchSuggestedQuestionsWhenReady-cPo0or_6.js";import{M as ma}from"./MobileAppDrawer-BTO_dO8H.js";import"./recharts-Dq7pGiC-.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="052a975f-6b7b-4543-a341-74d8ff816703",t._sentryDebugIdIdentifier="sentry-dbid-052a975f-6b7b-4543-a341-74d8ff816703")}catch{}})();const fa=ka.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,4 +6,4 @@ import{j as k}from"./liveblocks-DXiLz49w.js";import{a as m}from"./sentry-C8WyuRa
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${t=>t.theme.colors.grey4};
|
|
9
|
-
`,Ta=
|
|
9
|
+
`,Ta=O(function(t,e){const o=L(t,e.isTaskTemplatesEnabled),{taskGroupId:i}=e,n=i!=null&&i!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(r=>r.taskGroupIds.includes(i))})).filter(l=>l.tasks.length>0)}:o;return{taskListView:n,tagListView:J(t),localData:n.localData,isTaskTemplatesEnabled:e.isTaskTemplatesEnabled}},function(t,e){const{navigate:o,currentTenant:i,location:n,isTaskTemplatesEnabled:l}=e,{tenantEmailDomain:r}=i,{groupByKey:T}=e.uiState;return{onTaskManagementRowClick:a=>{const s=ga(r,a),p=f(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:p}})},onReloadTasks:()=>{t(C(!0,l))},onNewTaskClick:()=>{if(e.localData.defaultTaskGroupId!=null){const a=y(r,e.localData.defaultTaskGroupId),s=f(n.state?.pathnameStackToGoBack,n.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{t(B({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{t(la({filters:a}))},onSearchTextChanged:a=>{t(ia({searchText:a}))},onReloadCards:()=>{t(C(!0,l))},onBackClick:()=>{if(n.state?.message==="triggerBackClick"){const a=q(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{t(na({localData:a}))},resetLocalData:()=>{t(w({taskGroupById:e.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{t(oa(e.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{t(ea(e.localData.selectedTaskIds,a,sa(e.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{t(ta(a))},onAddNewTaskToTaskGroup:a=>{if(e.localData.defaultTaskGroupId!=null){const s=ha(T,a);t(S({taskDetailLocalData:s}));const p=y(r,e.uiState.groupByKey==="groupName"?a:e.localData.defaultTaskGroupId),g=f(n.state?.pathnameStackToGoBack,n.pathname);o(p,{state:{pathnameStackToGoBack:g,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{t(aa(e.localData.selectedTaskIds.length>0?e.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{t(Z(a,s))},onTimeSpentUpdate:(a,s)=>{t(b({task:a,updates:s}))},onShowToast:a=>{t(Y(a))},onGroupByFilterChange:a=>{t(B({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{t(b({task:a,updates:s}))},onCreateTagClick:(a,s)=>{t(X(a,s))},handleGroupTemplateClick:a=>{t(I(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{t(I(a,[s]))},handleNewTaskInitialization:a=>{if(t(S({taskDetailLocalData:{...Q,name:a}})),e.localData.defaultTaskGroupId!=null){const s=y(r,e.localData.defaultTaskGroupId),p=f(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:p,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${r}/tasks/group/${a}`)}}})(W);function $a(){const{isAiCfoOpen:t,setIsAiCfoOpen:e}=v(),o=j(),i=N(),n=R(),l=K.getSignedInUser(),r=G(c=>H(c)),{taskGroupId:T}=$(),{useFeatureGate:a}=M(),{isFeatureEnabled:s}=a(U.isTaskTemplatesEnabled),[p,g]=m.useState(!1),[E,P]=m.useState(!1),h=G(c=>L(c,s)),D=G(c=>c.taskGroupState),d=h.fetchState,{isAiCfoAccessEnabled:F,onAskAiCfoClick:A}=ua({isAiCfoOpen:t,setIsAiCfoOpen:e,mobileExploreReferrer:"Task Checklist"});if(da({isDataReady:d==="Completed"}),m.useEffect(()=>{p||(g(!0),i(C(!1,s)))},[p,i]),m.useEffect(()=>{d==="Completed"&&i(w({taskGroupById:D.taskGroupById}))},[d,D.taskGroupById]),l==null)throw Error("Can't access task list page without signing in...");return k.jsxs(k.Fragment,{children:[d==="Completed"?k.jsx(_,{analytics:z,onLoad:c=>(x=>x.trackPageLoaded(V.Event.taskListPage))(c)}):null,k.jsxs(fa,{children:[k.jsx(ma,{isAppContentDrawerOpen:E,handleDrawerToggle:c=>{P(c)}}),k.jsx(Ta,{location:n,navigate:o,currentTenant:r,taskGroupId:T,taskGroupState:D,localData:h.localData,uiState:h.uiState,isTaskTemplatesEnabled:s,taskListFetchState:d,isAiCfoAccessEnabled:F,onAskAiCfoClick:A})]})]})}const ga=(t,e)=>`/${t}/tasks/${encodeURIComponent(e)}`,y=(t,e)=>`/${t}/tasks/new/${e}`,ha=(t,e)=>{if(t==="assignee"){const o=e.split(",");return{...u.taskDetailLocalData,assignee:o}}if(t==="priority"){const o=ra(e);return{...u.taskDetailLocalData,priority:o}}if(t==="status"){const o=ca(e);return{...u.taskDetailLocalData,status:o}}if(t==="tag"){const o=e.split(",");return{...u.taskDetailLocalData,tagIds:o}}if(t==="dueDate"){const o=pa(e);return{...u.taskDetailLocalData,dueDate:o}}return{...u.taskDetailLocalData}};export{$a as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-CGYcZ7Lh.js";import z from"./NotFoundScreen-CQPWWkLY.js";import{a as p}from"./sentry-DCGk37l1.js";import{j as A,h as M,u as V,l as $,g as f,N as _,k as O,n as R,o as u}from"./core-CNZua1e0.js";import{v as q,z as b,n as w,y as Q,d as E,f as W,cD as H,j as Z,ao as J,p as K}from"./index-Co04ey3-.js";import{eM as C,Pg as G,EL as v,Ez as X,Fb as Y,Ph as P,Pi as ee,Ev as ae,Es as te,pA as se,po as ne,jW as oe,EF as ie,Pj as re,EC as ce,EQ as le,EP as de}from"./zeni-epic-state-eW2EQdSt.js";import{n as pe}from"./mui-DtCOffvy.js";import{u as me}from"./useInitialThreadRequest-BV4XmA3t.js";import{M as ue}from"./MobileAppDrawer-BTO_dO8H.js";import ke from"./TaskListScreen-vtDblzrs.js";import"./recharts-Dq7pGiC-.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.js";import"./useAskAiCfoHostNavButtonProps-BW2SwSZE.js";import"./useFetchSuggestedQuestionsWhenReady-cPo0or_6.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]="ba92be94-29c9-4a8c-ad2c-e8cc4eeb0309",e._sentryDebugIdIdentifier="sentry-dbid-ba92be94-29c9-4a8c-ad2c-e8cc4eeb0309")}catch{}})();const fe=O(function(e,t){const{location:n,taskGroupId:c}=t,d=P(e,t.taskId),l=C(e),i=c!=null?ee(e.taskGroupState,c):void 0,m=b.getSignedInUser(),a=l.tenantId,r={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:a??""},k=G(e);return{taskDetailSelectorView:d,authParams:r,isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:J.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${Z.appUrl}${t.location.pathname}`,tagListView:k,taskGroupName:c!=null&&i!=null&&i.isDefault===!1?i.name:void 0}},function(e,t){const{taskId:n,navigate:c,currentTenant:d,location:l,taskGroupId:i}=t,{tenantEmailDomain:m}=d;return{onSaveChangesToLocalStore:a=>{e(de({taskDetailLocalData:a,taskId:n}))},onSaveDetailClick:()=>{e(le(n,i))},onArchiveTaskClick:()=>{t.taskId!=null&&e(ce(t.taskId))},onDismissClick:()=>{if(l.state?.message==="triggerBackClick"){const a=K(l.state?.pathnameStackToGoBack),r=a.poppedPathname??"../../dashboard";c(r,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=B(m),r=w(l.state?.pathnameStackToGoBack,l.pathname);c(a,{state:{pathnameStackToGoBack:r}})}e(re({taskId:n}))},onDeleteTaskClick:()=>{e(ie(n))},updateFilesEntity:a=>{e(oe({files:a}))},onDeleteFile:a=>{e(ne(a))},onEditFileName:(a,r)=>{e(se(a,r.split(".")[0]))},onReloadTaskDetailPage:()=>{e(v(!1,n))},onCreateTagClick:a=>{e(te(a,n))},onDeleteTagClick:a=>{e(ae(a,n))}}})(H);function I(){const e=A(),t=M(),n=V(),c=q(),{taskId:d,taskGroupId:l}=$(),i=f(o=>C(o)),m=me(i?.companyId),[a,r]=p.useState(!1),[k,F]=p.useState(!1),[S,L]=p.useState(!1),[j,N]=p.useState(!1),x=f(o=>G(o)),y=f(o=>o.taskGroupViewState.fetchState);p.useEffect(()=>{k||(F(!0),t(v(!1,d)))},[k,t]),p.useEffect(()=>{S||x.fetchState==="Completed"||(L(!0),t(X()))},[S,t,x.fetchState]),p.useEffect(()=>{j||y==="Completed"||(N(!0),t(Y()))},[j,t,y]);const D=f(o=>P(o,d)),g=D.fetchState,T=b.getSignedInUser();if(T==null)throw Error("Can't access task detail page without signing in...");if(g==="Error"&&D.error?.code===400){const{tenantEmailDomain:o}=i,h=B(o),U=w(n.state?.pathnameStackToGoBack,n.pathname);return s.jsx(_,{to:h,state:{pathnameStackToGoBack:U}})}return s.jsxs(s.Fragment,{children:[g==="Completed"?s.jsx(Q,{analytics:E,onLoad:o=>(h=>h.trackPageLoaded(W.Event.taskDetailPage))(o)}):null,s.jsxs(ge,{children:[s.jsx(ue,{isAppContentDrawerOpen:a,handleDrawerToggle:o=>{r(o)}}),s.jsx(fe,{analytics:E,currentTenant:i,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:m,location:n,loggedInUser:T,navigate:e,taskGroupId:l,taskId:d,taskDetailFetchState:g})]})]})}const ge=pe.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
width: 100%;
|
|
5
|
+
flex: 1 1 auto;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
+
`,B=e=>`/${e}/tasks`;function Ae(){return s.jsxs(R,{children:[s.jsx(u,{path:"/new",element:s.jsx(I,{})}),s.jsx(u,{path:"/new/:taskGroupId",element:s.jsx(I,{})}),s.jsx(u,{path:"/group/:taskGroupId",element:s.jsx(ke,{})}),s.jsx(u,{path:"/:taskId",element:s.jsx(I,{})}),s.jsx(u,{path:"*",element:s.jsx(z,{})})]})}export{Ae as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./liveblocks-CGYcZ7Lh.js";import i from"./NotFoundScreen-CQPWWkLY.js";import{T as r}from"./TransactionDetailScreen-DORvf_A0.js";import"./sentry-DCGk37l1.js";import{n as d,o as e}from"./core-CNZua1e0.js";import"./zeni-epic-state-eW2EQdSt.js";import"./recharts-Dq7pGiC-.js";import"./index-Co04ey3-.js";import"./mui-DtCOffvy.js";import"./analytics-Cm9Z6TfJ.js";import"./plaid-DpI35xEc.js";import"./dnd-Dmzop572.js";import"./stripe-DMRn4zHo.js";import"./lottie-BoyaSool.js";import"./lexical-Dt1gfKRx.js";import"./pdf-DPV5Ar9D.js";import"./utils-DWAOcXZK.js";import"./useAskAiCfoHostNavButtonProps-BW2SwSZE.js";import"./useFetchSuggestedQuestionsWhenReady-cPo0or_6.js";import"./decodeURIComponentSafe-Dac6kcoy.js";import"./routePaths-CHVZiiJU.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new o.Error().stack;n&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[n]="256f287b-7a3d-4d6d-890e-a8cb9db8b86d",o._sentryDebugIdIdentifier="sentry-dbid-256f287b-7a3d-4d6d-890e-a8cb9db8b86d")}catch{}})();function q(){return t.jsxs(d,{children:[t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(e,{path:"/*",element:t.jsx(r,{})})]})}export{q as default};
|