@zeniai/web-app-ui 5.0.91-qa → 5.0.92-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-CojtNX27.js +1 -0
- package/dist/assets/AddressScreen-CuGNy3IM.js +9 -0
- package/dist/assets/{AiCfoScreen-HGbtKnxx.js → AiCfoScreen-C9ttZvTj.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-WO8R24uy.js → BillPayApprovalRoutes-CL6D_7dw.js} +1 -1
- package/dist/assets/{BillPayRoutes-OfGi1DH5.js → BillPayRoutes-fvhaclgV.js} +28 -28
- package/dist/assets/{BusinessVerificationPageScreen-Cwb0O2iw.js → BusinessVerificationPageScreen-Lfv0XtEV.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-rGxvQDtl.js → ChargeCardRoutes-D1tC8X9c.js} +9 -9
- package/dist/assets/{CompanyPassportScreen-BLCufivU.js → CompanyPassportScreen-BwKa_LUc.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-DcxIu2av.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-D76H2W7e.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-DX7TTN0z.js → CustomerOnboardingRoutes-BjxUysyp.js} +4 -4
- package/dist/assets/{DashboardRoutes-DsB2iHa0.js → DashboardRoutes-DSV2c9Hg.js} +3 -3
- package/dist/assets/{DefaultTenantHome-s96KbqYN.js → DefaultTenantHome-BM5doKP0.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-masdKbKT.js → DomesticWireDetailScreen-XA3QzAyw.js} +3 -3
- package/dist/assets/{DrawerScreen-D7lcO0VJ.js → DrawerScreen-2PFFQiRL.js} +1 -1
- package/dist/assets/EntityDetailRoutes-Cpm2zn0V.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-BXsX48QL.js +25 -0
- package/dist/assets/{FeaturePreviewScreen-D4qKJlp2.js → FeaturePreviewScreen-DBbU3hyx.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-CLs0WVB9.js → HubSpotOAuthCallbackScreen-mukQpBXO.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-CH7xneTX.js → MagicLinkRoutes-DKenhM-1.js} +8 -8
- package/dist/assets/MagicLinkSignInScreen-0g7D-J_c.js +12 -0
- package/dist/assets/{MobileAppDrawer-Ccfg2tLY.js → MobileAppDrawer-C1owD1l4.js} +1 -1
- package/dist/assets/NotFoundScreen-CDTENjn3.js +1 -0
- package/dist/assets/{NotificationRoutes-DVhgz2MT.js → NotificationRoutes-CKh3SMt4.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-CdvqeO7v.js → OAuthConsentScreen-28eY7N8v.js} +1 -1
- package/dist/assets/PandLWithForecastRoutes-BRmUZUjI.js +1 -0
- package/dist/assets/{PeopleRoutes-DwTgxifH.js → PeopleRoutes-DhjKygIO.js} +9 -9
- package/dist/assets/PerformanceRoutes-CnVEsdqq.js +1 -0
- package/dist/assets/{Preview-CHoySpAn.js → Preview-BcfL_4SY.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-MmUXgGtM.js → QBOConnectionScreen-WmVdfC19.js} +1 -1
- package/dist/assets/{ReferralListScreen-B2ACfYZr.js → ReferralListScreen-PEBFhlmP.js} +2 -2
- package/dist/assets/{ReimbursementApprovalRoutes-CT4lWRTd.js → ReimbursementApprovalRoutes-BkLIE_PW.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CNt84ZGM.js → ReimbursementApprovalRuleDetailScreen-dkA2aqfF.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-BHzTaVBa.js → ReimbursementRoutes-BiXGzoNt.js} +4 -4
- package/dist/assets/{ReportsRoutes-BDSCsmt2.js → ReportsRoutes-C6YTBKT9.js} +1 -1
- package/dist/assets/RewardsRoutes-CvorIu5L.js +1 -0
- package/dist/assets/ScreenRoutes-Dk4hXC7S.js +2 -0
- package/dist/assets/{SettingsRoutes-B5I2T9gT.js → SettingsRoutes-D8oriWAW.js} +3 -3
- package/dist/assets/{SetupPagesScreen-CWz4vIj-.js → SetupPagesScreen-BHZjOSHJ.js} +5 -5
- package/dist/assets/SignInScreen-Y6BuxpSu.js +1 -0
- package/dist/assets/SignOutScreen-CdkUNxjq.js +9 -0
- package/dist/assets/{TaskListScreen-DgDHZCji.js → TaskListScreen-DuuYXRRr.js} +2 -2
- package/dist/assets/{TaskRoutes-1dpFKupm.js → TaskRoutes-BMtkIWCF.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-BRCYDEe1.js → TransactionDetailRoutes-C3Fb8KbQ.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-Dz99_JkB.js → TransactionDetailScreen-CUNFX6ex.js} +2 -2
- package/dist/assets/TransactionListRoutes-C4xg5Sow.js +1 -0
- package/dist/assets/{TreasuryRoutes-DjyI2oxa.js → TreasuryRoutes-DJhXjsa5.js} +5 -5
- package/dist/assets/{VendorsRoutes-Df4R1sQP.js → VendorsRoutes-WEkjdTRS.js} +19 -19
- package/dist/assets/WiseConfirmationScreen-B3-p2tMs.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-C8pdGbMJ.js → ZeniAccountRoutes-C9ludMke.js} +11 -11
- package/dist/assets/{ZeniAccountStatementScreen-DmJw_u4G.js → ZeniAccountStatementScreen-BOPEKBSK.js} +1 -1
- package/dist/assets/{accountMappingHelper-DZZWkdNS.js → accountMappingHelper-DWvcSK1C.js} +1 -1
- package/dist/assets/{analytics-BpTmj6-G.js → analytics-DYzLSwIZ.js} +1 -1
- package/dist/assets/{analyticsHelper-CWJll2iT.js → analyticsHelper-Dc1kU1of.js} +1 -1
- package/dist/assets/{core-lbYY5woS.js → core-BeBBWfga.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-Bt7TpCfB.js → decodeURIComponentSafe-OtMMCMcE.js} +1 -1
- package/dist/assets/{dnd-BBkXCQMv.js → dnd-UF85x-t5.js} +1 -1
- package/dist/assets/{empty-BXlVh-7L.js → empty-BWGTDoK6.js} +1 -1
- package/dist/assets/{empty-DuvQh38L.js → empty-BaCT02t1.js} +1 -1
- package/dist/assets/{emptyVideoElement-DsiEcnQV.js → emptyVideoElement-BnRvKEhd.js} +1 -1
- package/dist/assets/epic-n0VtNHE8.js +2 -0
- package/dist/assets/getLocaleForTenant-CXwRfDGi.js +1 -0
- package/dist/assets/{index-D5mVmx24.js → index-BHdC4ErN.js} +1 -1
- package/dist/assets/{index-CmU3R7ot.js → index-BXVcb2Xp.js} +2 -2
- package/dist/assets/{index-YSIKqInC.js → index-CjNRshif.js} +1 -1
- package/dist/assets/{index-BnCtlDzJ.js → index-CvWmMArW.js} +1 -1
- package/dist/assets/{index-DBlyACY-.js → index-DS8xe4Yw.js} +1 -1
- package/dist/assets/{index-CR1sBuly.js → index-DWCyzMUX.js} +12214 -12214
- package/dist/assets/{index-9bPjdOkz.js → index-_ohVjyws.js} +1 -1
- package/dist/assets/{index-wZ-HUxAq.js → index-u46W4WpS.js} +1 -1
- package/dist/assets/{lexical-BoKYrzBU.js → lexical-C_ylRY16.js} +1 -1
- package/dist/assets/{liveblocks-BEuWW_o5.js → liveblocks-BNlilBXq.js} +1 -1
- package/dist/assets/{lottie-DW3oQVJC.js → lottie-DbxhFPB1.js} +1 -1
- package/dist/assets/{mui-hUAh7HgW.js → mui-CnlqDSRv.js} +1 -1
- package/dist/assets/{pathToGoBack-BTgB24PY.js → pathToGoBack-CHG8tIif.js} +1 -1
- package/dist/assets/{pdf-D4eIZozg.js → pdf-Dp2xnkno.js} +4 -4
- package/dist/assets/{pdf-lib-CQ6bcQhi.js → pdf-lib-BEgmFXIU.js} +1 -1
- package/dist/assets/{plaid-DtmQg7la.js → plaid-CBNEU__p.js} +1 -1
- package/dist/assets/{pusher-BH0WSonH.js → pusher-C2HLHaTd.js} +1 -1
- package/dist/assets/{react-FJ8t_fEG.js → react-7oI-YZOA.js} +1 -1
- package/dist/assets/{react-uiz0Bf7s.js → react-CVgRRIOa.js} +1 -1
- package/dist/assets/{react-I3T6BtSv.js → react-PfdOvJhF.js} +1 -1
- package/dist/assets/{react-u3t1vzKM.js → react-QblHkUSH.js} +1 -1
- package/dist/assets/{react-DPfcpAvs.js → react-V6AXUc49.js} +1 -1
- package/dist/assets/{react-DHaugbA3.js → react-vkffk7Xs.js} +1 -1
- package/dist/assets/{recharts-aApoEySM.js → recharts-C5E4pGR4.js} +1 -1
- package/dist/assets/{routePaths-BoWQ8YXQ.js → routePaths-aWjSXoc2.js} +1 -1
- package/dist/assets/{sentry-DsHW_1mX.js → sentry-CH2pQ4tM.js} +1 -1
- package/dist/assets/{url-CPbSl3Sf.js → url-BcTKj4a2.js} +1 -1
- package/dist/assets/{url-rO4wjCNo.js → url-CBu622rf.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-Xp4UZg6R.js → useAiCfoDashboardSuggestedQuestionsChips-D5XSlLnm.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-DbBvDdaC.js +1 -0
- package/dist/assets/{useDeviceId-CUIt81hA.js → useDeviceId-W860NCQ9.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-oMQ4nobf.js → useInitialThreadRequest-DS5F5QV2.js} +1 -1
- package/dist/assets/{utils-AZPawxk4.js → utils-C2zbYn9G.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-C6lz4d-6.js → withTransactionSidePanel-Bsk-acAb.js} +2 -2
- package/dist/assets/zeni-epic-state-5fEaVO5b.js +13 -0
- package/dist/index.html +1 -1
- package/package.json +4 -3
- package/dist/assets/AddressRoutes-D5m9Txpa.js +0 -1
- package/dist/assets/AddressScreen-9ZQKW4Vc.js +0 -9
- package/dist/assets/ConnectionAuthScreen-DPjlQt6j.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-BLnBp8eI.js +0 -1
- package/dist/assets/EntityDetailRoutes-DWIHI0bf.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-Df1ZmsUn.js +0 -25
- package/dist/assets/MagicLinkSignInScreen-Ij-bum6F.js +0 -12
- package/dist/assets/NotFoundScreen-DdK7GyZ6.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-CSnkyLzm.js +0 -1
- package/dist/assets/PerformanceRoutes-BLUJTpzt.js +0 -1
- package/dist/assets/RewardsRoutes-YDsLsdCp.js +0 -1
- package/dist/assets/ScreenRoutes-r_yq8fzi.js +0 -2
- package/dist/assets/SignInScreen-Dp0TAL4V.js +0 -1
- package/dist/assets/SignOutScreen-DeydCvA_.js +0 -9
- package/dist/assets/TransactionListRoutes-C05fsgRv.js +0 -1
- package/dist/assets/WiseConfirmationScreen-W0w1BuqD.js +0 -12
- package/dist/assets/epic-CqNfoxZY.js +0 -2
- package/dist/assets/getLocaleForTenant-D8IeK8ro.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-D2I_ptqP.js +0 -1
- package/dist/assets/zeni-epic-state-DsxPZxrE.js +0 -13
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-BNlilBXq.js";import{a as o}from"./sentry-CH2pQ4tM.js";import{g as f,l as H,h as L,u as M,n as _}from"./core-BeBBWfga.js";import{m as F,K as N,z as R,b7 as W,w as U,V as $,Z as z,v as G,f as l,h as Q,a6 as Z,b8 as K}from"./index-DWCyzMUX.js";import{f0 as q,eQ as J,MG as I,MH as X,u8 as Y,t_ as g,f2 as ee,bO as re,u3 as ae,MI as ne}from"./zeni-epic-state-5fEaVO5b.js";import{D as te,e as se,n as oe,S as ie}from"./mui-CnlqDSRv.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-DbBvDdaC.js";import{M as de}from"./MobileAppDrawer-C1owD1l4.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]="b18229e6-63f3-4e04-bc88-127d5e65dc87",e._sentryDebugIdIdentifier="sentry-dbid-b18229e6-63f3-4e04-bc88-127d5e65dc87")}catch{}})();const ce={overlayWidth:new U(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:r})=>{const a=F(),n=N();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{r(!0)},u=f(d=>q(d));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:ce.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:a.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:d=>d.stopPropagation(),children:s.jsx(W,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
5
|
-
`,P="refer-and-earn-status-update",we=
|
|
5
|
+
`,P="refer-and-earn-status-update",we=_(function(e){const r=I(e),a=e.referralViewState.rewardsPlanFetchState,n=re([r,a]);return{inviteList:r.invitations,uiState:r.uiState,pendingBonus:r.pendingBonus,earnedBonus:r.earnedBonus,pendingReferrals:r.pendingReferrals,fetchState:n.fetchState,rewardsPlan:r.rewardsPlan}},function(e,r){const{navigate:a}=r;return{onColumnSortConfigChanged:(n,i)=>{e(ne({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),a("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),a("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(ae(n))},onBackClick:()=>{a("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===P&&e(g(!0,!0))}}})(Z(K));function ye({isReferralDrawerOpen:e}){const r=H(),a=L(),n=M(),[i,u]=o.useState(!1),[d,D]=o.useState(!1),[x,E]=o.useState(!1),[k,h]=o.useState(!1),w=R.getSignedInUser(),C=f(t=>J(t)),m=f(t=>I(t)),b=m.fetchState,p=f(t=>t.referralViewState.rewardsPlanFetchState),v=X([m,p]),{areTenantIdsInSync:c}=$();o.useEffect(()=>{C?.rewardsLastViewedTime==null&&x===!1&&(a(Y()),E(!0))},[]),o.useEffect(()=>{!i&&b==="Not-Started"&&c&&(u(!0),a(g(!0)))},[b,a,c]),o.useEffect(()=>{!d&&p.fetchState==="Not-Started"&&c&&(D(!0),a(ee(!0)))},[p,a,c]),o.useEffect(()=>{h(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),y=t=>{A(t)},{isAiCfoAccessEnabled:O,onAskAiCfoClick:B}=le({mobileExploreReferrer:"Rewards"});z({isDataReady:v===!0});const T={events:w?.userId!=null?[`private-encrypted-${w.userId}.${P}`]:[],eventCallback:(t,S,V)=>{V.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[v===!0?s.jsx(G,{analytics:l,onLoad:t=>(S=>{w!=null&&S.trackPageLoaded(Q.Event.rewardsPageViewed)})(t)}):null,s.jsx(de,{isAppContentDrawerOpen:j,handleDrawerToggle:y}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{h(!1),r("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:r,currentTenant:C,onClickMenuIcon:()=>{y(!0)},isAiCfoAccessEnabled:O,onAskAiCfoClick:B,...T})]})}export{ye as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-
|
|
1
|
+
import{j as t}from"./liveblocks-BNlilBXq.js";import x from"./NotFoundScreen-CDTENjn3.js";import{a as p}from"./sentry-CH2pQ4tM.js";import{l as C,u as I,h as A,g as u,N as D,n as E,o as k,p as f}from"./core-BeBBWfga.js";import{eQ as T,NA as g,NQ as S,D5 as V,Ce as N,D4 as m,CX as O,O4 as U}from"./zeni-epic-state-5fEaVO5b.js";import{m as _,z as $,B,a6 as Q,bO as W,af as z}from"./index-DWCyzMUX.js";import"./mui-CnlqDSRv.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-dkA2aqfF.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]="451f71af-9224-4da1-b9af-4870d78eb9bf",e._sentryDebugIdIdentifier="sentry-dbid-451f71af-9224-4da1-b9af-4870d78eb9bf")}catch{}})();const d="reimbursement-approval-rule-update",P=E(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(d)&&e(U(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(O(s))},onEditRuleClick:s=>{s!=null?(e(m(s)),a(`./${s}/edit`)):(e(m()),a("./new"))}}})(Q(W)),X=()=>{const e=C(),r=I(),a=A(),[l,s]=p.useState(!1),[c,y]=p.useState(!1),b=u(n=>n.remiSetupApproverViewState.fetchState),o=u(n=>T(n)),w=_(),i=u(n=>g(n)),h=u(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(V())},[h]),p.useEffect(()=>{l||b!=="Not-Started"||(s(!0),a(N(!0)))},[l,b,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(c||(y(!0),a(m())),e("./new"))},[c,i,a]);const R={events:o.companyId!=null?[`private-encrypted-${o.companyId}.${d}`]:[],eventCallback:(n,q,j)=>{n.endsWith(d)&&j.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(D,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(B,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(P,{currentTenant:o,location:r,navigate:e,...R})};function Z(){return t.jsxs(k,{children:[t.jsx(f,{path:"/",element:t.jsx(X,{})}),t.jsx(f,{path:"/new",element:t.jsx(v,{})}),t.jsx(f,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(f,{path:"*",element:t.jsx(x,{})})]})}export{Z as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-
|
|
1
|
+
import{j as g}from"./liveblocks-BNlilBXq.js";import{a as y}from"./sentry-CH2pQ4tM.js";import{l as A,h as w,u as T,i as U,g as b,n as E}from"./core-BeBBWfga.js";import{NQ as D,NA as C,C_ as _,D7 as x,D5 as S,D6 as h,NR as B}from"./zeni-epic-state-5fEaVO5b.js";import{z as k,m as N,B as V,bF as F,af as O}from"./index-DWCyzMUX.js";import"./mui-CnlqDSRv.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]="40ac391b-caf1-4bee-96a9-9e2bd7d4e925",e._sentryDebugIdIdentifier="sentry-dbid-40ac391b-caf1-4bee-96a9-9e2bd7d4e925")}catch{}})();function $(e){return B(e)==null}const j=E(function(e,a){const t=D(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 R=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=R.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(x())},onSaveRuleSuccess:()=>{t("../")}}})(F);function H(){const e=A(),a=w(),t=T(),{approvalRuleId:s}=U(),n=k.getSignedInUser(),l=N(),r=b(p=>D(p)),i=b(p=>C(p)),[o,u]=y.useState(!1);if(y.useEffect(()=>{o||(u(!0),a(_(!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(V,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):g.jsx(j,{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-BEuWW_o5.js";import{l as K,h as re,u as Z,i as Y,g as E,N as M,n as Q,k as mt,o as ct,p as k}from"./core-lbYY5woS.js";import{eQ as V,O5 as le,c2 as me,C9 as Be,jO as dt,Cm as ne,Cl as ae,O6 as ut,bn as ce,fM as Te,O7 as pt,Ks as bt,jD as De,Kt as Se,Ku as gt,iy as ht,Nm as ft,iN as St,BZ as It,sK as yt,iF as Rt,CJ as je,O8 as Fe,O9 as Ct,Oa as vt,Ob as At,Oc as kt,Od as Et,Ct as Ie,iT as wt,Nv as xt,Cn as Bt,C7 as Tt,Oe as Dt,C6 as jt,Of as Ft,Cf as ye,Cx as Ut,Cw as Lt,Cs as Ot,Og as Ue,HD as Pt,bo as $t,Ci as Mt,C$ as Nt,Oh as _t,Oi as zt,CF as Gt,CC as Re,MR as Ht,C4 as Zt,Oj as Le,Do as Ce,Dw as Vt,Ok as Wt,Ol as G,Om as Kt,On as Oe,Oo as Qt,Op as Pe,Oq as $e,CR as se,bt as qt,bG as de,cC as ue,eY as Me,eW as Ne,Or as Jt,gQ as Yt,N2 as Xt,Os as en,Ot as _e,N6 as tn,NQ as nn,Ou as an,O4 as sn,Dt as ve,Ds as on,Ov as rn,Ow as ln,Ox as mn,Oy as cn,Oz as dn,NB as un,Dj as pn,Dn as bn,bv as gn,bF as hn,cx as fn,cl as Sn,bs as In,Jn as yn,cN as Rn,cP as Cn,cO as vn,cw as An}from"./zeni-epic-state-DsxPZxrE.js";import{s as ze,K as Ge,C as X,j as v,z as P,bP as He,R as ee,c as A,aH as Ae,o as j,at as J,y as kn,D as Ze,bQ as En,n as H,_ as Ve,bR as wn,I as te,bS as xn,V as Bn,w as Tn,B as pe,e as We,a6 as Dn,bg as jn,a1 as Fn,m as Ke,bT as Un,a9 as Ln}from"./index-CR1sBuly.js";import{n as N,S as On}from"./mui-hUAh7HgW.js";import ie from"./NotFoundScreen-DdK7GyZ6.js";import{S as ke}from"./SetupPagesScreen-CWz4vIj-.js";import{F as Qe}from"./FeaturePreviewScreen-D4qKJlp2.js";import{a as f}from"./sentry-DsHW_1mX.js";import{u as be}from"./useAskAiCfoHostNavButtonProps-D2I_ptqP.js";import{u as qe}from"./useInitialThreadRequest-oMQ4nobf.js";import{D as Pn}from"./DrawerScreen-D7lcO0VJ.js";import{M as Je}from"./MobileAppDrawer-Ccfg2tLY.js";import{R as $n}from"./ReimbursementApprovalRoutes-CT4lWRTd.js";import{FallBackRoute as Mn}from"./ScreenRoutes-r_yq8fzi.js";import"./recharts-aApoEySM.js";import"./analytics-BpTmj6-G.js";import"./plaid-DtmQg7la.js";import"./dnd-BBkXCQMv.js";import"./stripe-DMRn4zHo.js";import"./lottie-DW3oQVJC.js";import"./lexical-BoKYrzBU.js";import"./pdf-D4eIZozg.js";import"./utils-AZPawxk4.js";import"./analyticsHelper-CWJll2iT.js";import"./routePaths-BoWQ8YXQ.js";import"./BusinessVerificationPageScreen-Cwb0O2iw.js";import"./ReimbursementApprovalRuleDetailScreen-CNt84ZGM.js";import"./getLocaleForTenant-D8IeK8ro.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]="26c006cb-4470-4183-a70c-96ab7ec0b9b1",e._sentryDebugIdIdentifier="sentry-dbid-26c006cb-4470-4183-a70c-96ab7ec0b9b1")}catch{}})();const Ye=e=>`/${e}/reimbursements`,Nn=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=Ze.getLocalizedStrings(),_n=Q(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=P.getSignedInUser(),c=ce(d),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=le(e,t.reimbursementId),b=pt(e,d?.userId??"");let R=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(R=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${J.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:R,isUserAdmin:me(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:A,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:De(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ae(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ot(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("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(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Dt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ne({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(kt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(At({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(vt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(Ct());const i=Ye(o),l=H(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(A.trackReimbursementDeleteReimbursement(n),e(je(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(En);function Ee(){const e=K(),t=re(),n=Z(),{reimbursementId:r}=Y(),d=ze(),c=Ge(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=X(),{isFeatureEnabled:b}=l(v.isLimitedCategoryForReimbursement),{isFeatureEnabled:R}=l(v.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(v.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=be({mobileExploreReferrer:"Reimbursement Details"}),w=Z().pathname,D=w.includes("edit"),C=w.includes("reimbursement/new"),[F,x]=f.useState(!1),B=P.getSignedInUser(),I=E(p=>V(p)),g=E(p=>le(p,r)),O=qe(I?.companyId,{clearParams:g.fetchState==="Completed"}),U=me(I?.userRole??[]);f.useEffect(()=>{(C&&!F||D&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(x(!0),t(Be(!1,b,R,r)))});const $=E(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(B==null)throw Error("Can't access address page without signing in...");const y={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||U&&g.billStatus==="rejected"||U===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(M,{to:y}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(He,{isNewReimbursement:r==null}):s.jsxs(zn,{windowSize:c,children:[s.jsx(ee,{analytics:A,onLoad:p=>(W=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&W.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Gn,{}):null,m&&c!=="small"?s.jsx(Hn,{children:s.jsx(Ae,{showAutofill:m,uploadInvoiceEndPoint:`${J.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Zn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(Nn,{})}),s.jsx(Ae,{showAutofill:m,uploadInvoiceEndPoint:`${J.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.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(Wn,{windowSize:c,children:s.jsx(_n,{initialOpenThreadRequest:O??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const zn=N.div`
|
|
1
|
+
import{j as s}from"./liveblocks-BNlilBXq.js";import{l as K,h as re,u as Z,i as Y,g as E,N as M,n as q,k as mt,o as ct,p as k}from"./core-BeBBWfga.js";import{eQ as V,O5 as le,c2 as me,C9 as Be,jO as dt,Cm as ne,Cl as ae,O6 as ut,bn as ce,fM as Te,O7 as pt,Ks as bt,jD as De,Kt as Se,Ku as gt,iy as ht,Nm as ft,iN as St,BZ as It,sM as yt,iF as Rt,CJ as je,O8 as Fe,O9 as Ct,Oa as vt,Ob as At,Oc as kt,Od as Et,Ct as Ie,iT as wt,Nv as xt,Cn as Bt,C7 as Tt,Oe as Dt,C6 as jt,Of as Ft,Cf as ye,Cx as Ut,Cw as Lt,Cs as Ot,Og as Ue,HD as Pt,bo as $t,Ci as Mt,C$ as Nt,Oh as _t,Oi as zt,CF as Gt,CC as Re,MR as Ht,C4 as Zt,Oj as Le,Do as Ce,Dw as Vt,Ok as Wt,Ol as G,Om as Kt,On as Oe,Oo as qt,Op as Pe,Oq as $e,CR as se,bt as Qt,bG as de,cC as ue,eY as Me,eW as Ne,Or as Jt,gQ as Yt,N2 as Xt,Os as en,Ot as _e,N6 as tn,NQ as nn,Ou as an,O4 as sn,Dt as ve,Ds as on,Ov as rn,Ow as ln,Ox as mn,Oy as cn,Oz as dn,NB as un,Dj as pn,Dn as bn,bv as gn,bF as hn,cx as fn,cl as Sn,bs as In,Jn as yn,cN as Rn,cP as Cn,cO as vn,cw as An}from"./zeni-epic-state-5fEaVO5b.js";import{R as ze,K as Ge,a as X,I as v,z as P,bP as He,v as ee,f as A,aH as Ae,o as j,at as J,y as kn,O as Ze,bQ as En,q as H,Z as Ve,bR as wn,d as te,bS as xn,V as Bn,w as Tn,B as pe,h as We,a6 as Dn,bg as jn,a1 as Fn,m as Ke,bT as Un,a9 as Ln}from"./index-DWCyzMUX.js";import{n as N,S as On}from"./mui-CnlqDSRv.js";import ie from"./NotFoundScreen-CDTENjn3.js";import{S as ke}from"./SetupPagesScreen-BHZjOSHJ.js";import{F as qe}from"./FeaturePreviewScreen-DBbU3hyx.js";import{a as f}from"./sentry-CH2pQ4tM.js";import{u as be}from"./useAskAiCfoHostNavButtonProps-DbBvDdaC.js";import{u as Qe}from"./useInitialThreadRequest-DS5F5QV2.js";import{D as Pn}from"./DrawerScreen-2PFFQiRL.js";import{M as Je}from"./MobileAppDrawer-C1owD1l4.js";import{R as $n}from"./ReimbursementApprovalRoutes-BkLIE_PW.js";import{FallBackRoute as Mn}from"./ScreenRoutes-Dk4hXC7S.js";import"./recharts-C5E4pGR4.js";import"./analytics-DYzLSwIZ.js";import"./plaid-CBNEU__p.js";import"./dnd-UF85x-t5.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbxhFPB1.js";import"./lexical-C_ylRY16.js";import"./pdf-Dp2xnkno.js";import"./utils-C2zbYn9G.js";import"./analyticsHelper-Dc1kU1of.js";import"./routePaths-aWjSXoc2.js";import"./BusinessVerificationPageScreen-Lfv0XtEV.js";import"./ReimbursementApprovalRuleDetailScreen-dkA2aqfF.js";import"./getLocaleForTenant-CXwRfDGi.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]="30aff1ea-1d23-4549-90e2-b3986e9e0fda",e._sentryDebugIdIdentifier="sentry-dbid-30aff1ea-1d23-4549-90e2-b3986e9e0fda")}catch{}})();const Ye=e=>`/${e}/reimbursements`,Nn=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=Ze.getLocalizedStrings(),_n=q(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=P.getSignedInUser(),c=ce(d),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=le(e,t.reimbursementId),b=pt(e,d?.userId??"");let R=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(R=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${J.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:R,isUserAdmin:me(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:A,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:De(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ae(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ot(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("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(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Dt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ne({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(kt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(At({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(vt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(Ct());const i=Ye(o),l=H(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(A.trackReimbursementDeleteReimbursement(n),e(je(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(En);function Ee(){const e=K(),t=re(),n=Z(),{reimbursementId:r}=Y(),d=ze(),c=Ge(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=X(),{isFeatureEnabled:b}=l(v.isLimitedCategoryForReimbursement),{isFeatureEnabled:R}=l(v.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(v.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=be({mobileExploreReferrer:"Reimbursement Details"}),w=Z().pathname,D=w.includes("edit"),C=w.includes("reimbursement/new"),[F,x]=f.useState(!1),B=P.getSignedInUser(),I=E(p=>V(p)),g=E(p=>le(p,r)),O=Qe(I?.companyId,{clearParams:g.fetchState==="Completed"}),U=me(I?.userRole??[]);f.useEffect(()=>{(C&&!F||D&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(x(!0),t(Be(!1,b,R,r)))});const $=E(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(B==null)throw Error("Can't access address page without signing in...");const y={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||U&&g.billStatus==="rejected"||U===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(M,{to:y}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(He,{isNewReimbursement:r==null}):s.jsxs(zn,{windowSize:c,children:[s.jsx(ee,{analytics:A,onLoad:p=>(W=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&W.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Gn,{}):null,m&&c!=="small"?s.jsx(Hn,{children:s.jsx(Ae,{showAutofill:m,uploadInvoiceEndPoint:`${J.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Zn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(Nn,{})}),s.jsx(Ae,{showAutofill:m,uploadInvoiceEndPoint:`${J.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.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(Wn,{windowSize:c,children:s.jsx(_n,{initialOpenThreadRequest:O??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const zn=N.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
@@ -53,7 +53,7 @@ import{j as s}from"./liveblocks-BEuWW_o5.js";import{l as K,h as re,u as Z,i as Y
|
|
|
53
53
|
flex-direction: column;
|
|
54
54
|
width: 100%;
|
|
55
55
|
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
56
|
-
`,Kn=
|
|
56
|
+
`,Kn=q(function(e,t){const n=Ue(e,t.reimbursementId),r=P.getSignedInUser(),d=ce(r),c=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=_t(n.remiActivities,zt(t.currentTenant),r));const i=me(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${J.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:d,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:De(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e(Fe());const a=Ye(o),i=H(d.state?.pathnameStackToGoBack,d.pathname);c(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(Zt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Ht({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(Re(n,a.type,"")):e(Re(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=H(d.state?.pathnameStackToGoBack,d.pathname);c("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{A.trackReimbursementDeleteReimbursement(n),e(je(n))},cancelAndDeleteReport:a=>{a===!0?A.trackReimbursementCancelAndDeleteReimbursement(n):A.trackReimbursementCancelReimbursement(n),e(Gt(n,a))},handleZeniLogoClick:()=>{m.toggle()}}})(wn);function qn(){const e=K(),t=re(),n=Z(),r=n.hash.substring(1),d=ze(),{reimbursementId:c}=Y(),m=P.getSignedInUser(),o=E(y=>V(y)),a=E(y=>Ue(y,c??"")),i=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=Qe(o?.companyId,{clearParams:a.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:b,onAskAiCfoClick:R}=be({mobileExploreReferrer:"Reimbursement Details"});Ve({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:h}=X(),{isFeatureEnabled:T}=h(v.isLimitedCategoryForReimbursement),[u,w]=f.useState(!1),[D,C]=f.useState(!1),[F,x]=f.useState(!1),{isFeatureEnabled:B}=h(v.isReimbursementCommentingEnabled),{isFeatureEnabled:I}=h(v.isShowDeletedReimbursementsFeatureEnabled),g=E(y=>le(y,c??"")),O=Pt(o),U=$t(o.userRole),$=a.fetchState;if(f.useEffect(()=>{u||c==null?u==1&&$==="Error"&&e("page-not-found",{replace:!0}):(w(!0),t(Mt(c,!1,I)))},[u,c,t,$]),f.useEffect(()=>{I&&a.remiDetails?.isDeleted===!0||o.isZeni===!0&&m?.userEmailDomain==="zeni.ai"&&O===!1?x(!1):x(a.remiActivities[0]?.isRealTimeApprovalEnabled&&(U||a.allApprovers.find(y=>y.user.userId===m?.userId)!=null||a.remiDetails?.lastUpdatedBy===m?.userId))},[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,U,o.isZeni,O,m]),f.useEffect(()=>{D||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||g.fetchState=="Completed"||g.fetchState=="In-Progress"||(C(!0),t(Be(!1,T,I,c)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(Nt(!1,!0,!0,a.lastUpdatedByUserId)))},[D,a,c,t]),m==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx(M,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(He,{}):s.jsxs(s.Fragment,{children:[s.jsx(ee,{analytics:A,onLoad:y=>(p=>{c!=null&&p.trackReimbursementReimbursementDetails(c)})(y)}),s.jsx(Kn,{initialOpenThreadRequest:l??void 0,scrollId:r,isReimbursementCommentingEnabled:B,isShowDeletedReimbursementEnabled:I,location:n,navigate:e,isRealTimeApprovalEnabled:F,currentTenant:o,reimbursementId:c??"",themeState:d,isAiCfoAccessEnabled:b,onAskAiCfoClick:R})]})}const Qn=q(function(e,t){return{remisReviewView:Le(e),analytics:t.analytics}},function(e,t){return{onCloseOverlay:()=>{t.navigate("./"),e(G())},onCloseReviewItem:n=>{e(Wt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Vt());break;case"approve":e(Ce("approved",r??""));break;case"reject":e(Ce("rejected",r??""))}}}})(xn);function Jn(){const e=K(),t=E(c=>c.remisBulkActionViewState.bulkSubmissionFetchState.fetchState),{remisForReview:n}=E(c=>Le(c)),r=te(),d=r?.loggedInUserRole?.includes("admin")===!0;return f.useEffect(()=>{t!=="Completed"&&n.length!==0||e("./")},[t,n.length]),s.jsx(Qn,{navigate:e,analytics:A,isAdmin:d})}const z=tn(),Xe="bulk-operation-update",oe="reimbursement-approval-rule-update",{spendManagement:Yn,common:we}=Ze.getLocalizedStrings(),xe=Yn.reimbursement.bulkActions,Xn=N.div`
|
|
57
57
|
display: flex;
|
|
58
58
|
min-height: 100%;
|
|
59
59
|
width: 100%;
|
|
@@ -61,8 +61,8 @@ import{j as s}from"./liveblocks-BEuWW_o5.js";import{l as K,h as re,u as Z,i as Y
|
|
|
61
61
|
flex-direction: column;
|
|
62
62
|
align-items: center;
|
|
63
63
|
background-color: ${e=>e.theme.colors.grey4};
|
|
64
|
-
`,ea=
|
|
64
|
+
`,ea=q(function(e,t){const n=$e(e,z,t.isBulkActionEnabled);let r=n.allSubTabs;const d=P.getSignedInUser(),c=ce(d),m=e.tenantState.currentTenantId,o=V(e),a=o?.companyName??"",i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter(h=>h!=="deleted"));const b=n.fetchState,R=nn(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter(h=>h.isDeleted===!1),isAdmin:t.isAdmin,isZeniUser:c,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:b,botEmail:n.reimbursementBotEmail,analytics:A,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:z,spendManagementEndPoint:`${Fn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:R.affectedEntityIds}},function(e,t){const{navigate:n,currentTenant:r,location:d,period:c}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(G()),e(Oe(o))},onSubtabChange:o=>{e(G()),e(Pe(o))},onTransactionClick:(o,a)=>{const i=aa(m,o,a),l=H(d.state?.pathnameStackToGoBack,d.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=na(m),a=H(d.state?.pathnameStackToGoBack,d.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;A?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=H(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:i}})},onColumnSortConfigChanged:(o,a)=>{e(dn({uiState:{sortKey:o,sortOrder:a},period:t.period}))},onSearchTextChanged:o=>{e(cn(o))},onFiltersChange:o=>{e(mn({filters:o})),o.categories.every(a=>a.field!=null&&a.values?.length!==0)&&A.trackSpendManagmentFilterChange("reimbursement",o.categories.map(a=>`${a.field}-${JSON.stringify(a.values)}`))},updateDownloadStateHandler:o=>{o==="In-Progress"&&A.trackSpendManagementDownloadClick("reimbursement"),e(ln({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(se(c,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(rn(o))},removeAllTransactionsFromBulkActionList:()=>{e(G())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(on(o,a??""));break;case"send_for_approval":e(ve("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(ve("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(oe)&&e(sn(!1))},onEventReceived:o=>{o===Xe&&e(an())}}})(Dn(jn));function ta(){const e=K(),t=re(),n=Z(),r=n.state,d=Ge(),[c,m]=f.useState(null),o=mt("/:tenantEmailDomain/reimbursements/bulk-review")!=null;f.useEffect(()=>{if(r?.tab!=null&&r?.subTab!=null){const S=Kt(r.tab.toString());S!=null?t(Oe(S)):console.log("Warning:Not a valid remiListTab");const _=qt(r.subTab.toString());_!=null?t(Pe(_)):console.log("Warning:Not a valid remiListSubTab")}return()=>{t(G())}},[]);const{useFeatureGate:a}=X(),{isFeatureEnabled:i}=a(v.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:l}=a(v.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:b}=a(v.isBillPayCommentingEnabled),{isFeatureEnabled:R}=a(v.isReimbursementCommentingEnabled),{isFeatureEnabled:h}=a(v.isReimbursementBulkActionEnabled),T=P.getSignedInUser(),u=E(S=>V(S)),[w,D]=f.useState(!1),[C,F]=f.useState(!1),x=te(),B=x?.loggedInUserRole?.includes("admin")===!0,I=E(S=>$e(S,z,h)),{areTenantIdsInSync:g}=Bn(),O=I.fetchState,{isAiCfoAccessEnabled:U,onAskAiCfoClick:$}=be({mobileExploreReferrer:"Reimbursement List"});if(Ve({isDataReady:O==="Completed"}),f.useEffect(()=>{!C&&g&&(F(!0),t(se(z,!0,l,!1,!0)))},[C,z,t,g]),T==null)throw Error("Can't access address page without signing in...");const y=!!u?.userRole&&Qt(u),p=de(x?.loggedInUserRoleMap),W=ue(x?.loggedInUserRoleMap),et=!!u.userReimbursementInfo?.isReimbursementTOSAccepted,tt=!!u.companyReimbursementInfo?.info?.isReimbursementEnabled,nt=!!u.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,at=E(S=>Te(S.companyState,u.companyId)),st=at?.company.featuresActivationInfo.connectedAccountProvider,ge=S=>{D(S)},{isFeatureEnabled:it}=a(v.isDebitCardFeatureEnabled),ot=Me(it,u),rt=Ne(u),{remisProcessed:Q,remisProcessing:he}=E(S=>Jt(S));f.useEffect(()=>{Q===he&&c!=null&&(t(Yt({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:Q>1?xe.reports:xe.report},{variableName:"_has_",variableValue:Q>1?we.texts.have:we.texts.has},{variableName:"_action_",variableValue:Xt(c)}]})),t(en()),setTimeout(()=>{t(se(z,!0,l,!1,!0,!0))},3e3),m(null))},[Q,he]);const lt={events:u.companyId!=null?[`private-encrypted-${u.companyId}.${Xe}`,`private-encrypted-${u.companyId}.${oe}`]:[],eventCallback:(S,_,fe)=>{S.endsWith(oe)?fe.onReimbursementApprovalRulesEventReceived?.(S):_.entity_type==="reimbursement"&&(m(_.operation_type),fe.onEventReceived(S))}};return n.pathname.endsWith("/reimbursements/")||n.pathname.endsWith("/reimbursements")||n.pathname.endsWith("/reimbursements/bulk-review")?ot===!0||rt===!0?s.jsx(qe,{}):tt&&(!y||p)||W&&et?s.jsxs(s.Fragment,{children:[O==="Completed"?s.jsx(ee,{analytics:A,onLoad:S=>(_=>_.trackPageLoaded(We.Event.reimbursementHome))(S)}):null,s.jsx(Je,{isAppContentDrawerOpen:w,handleDrawerToggle:ge}),s.jsxs(Xn,{windowSize:d,children:[s.jsx(Pn,{isOpen:o,drawerLeftMargin:new Tn(0,0,300,600),onClose:()=>{e("./"),t(G())},children:s.jsx(sa,{onClick:S=>S.stopPropagation(),children:s.jsx(Jn,{})})}),s.jsx(ea,{isShowDeletedBillsEnabled:i,isShowDeletedReimbursementEnabled:l,isBillPayCommentingEnabled:b,isReimbursementCommentingEnabled:R,location:n,navigate:e,currentTenant:u,period:z,isAdmin:B,isEmployee:y,entity:"reimbursement",onClickMenuIcon:()=>{ge(!0)},createdByUserList:I.createdByUserList,createdByUserListFetchState:I.createdByUserListFetchState,isDownloadEnabled:I.isDownloadEnabled,connectedAccountProvider:st,isBulkActionEnabled:h,bulkSubmissionLimit:I.remiBulkSubmissionLimit,bulkSubmissionFetchState:I.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:U,onAskAiCfoClick:$,...lt})]})]}):nt&&p?s.jsx(M,{to:"../setup"}):x!=null&&_e(u,x.loggedInUserRoleMap)?s.jsx(M,{to:"../promo"}):s.jsx(pe,{fetchState:"In-Progress"}):s.jsx(ie,{})}const na=e=>`/${e}/reimbursements/setup`,aa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},sa=N(On)`
|
|
65
65
|
display: flex;
|
|
66
66
|
min-height: 100%;
|
|
67
67
|
flex-direction: column;
|
|
68
|
-
`,ia=
|
|
68
|
+
`,ia=q(function(e,t){const{companyId:n}=t;return{reimbursementSetupView:un(e,n),analytics:A,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}},function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(bn(n))},onCreateNewRemiButtonClick:()=>{e(pn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}})(Un),oa=()=>{const e=K(),t=Z(),{tenantEmailDomain:n}=Y(),r=Ke(),[d,c]=f.useState(!1),m=E(C=>V(C)),o=P.getSignedInUserTenant(n)?.companyId??m.companyId,a=P.getSignedInUser(),i=m.userRoleId,l=!!m.userRole?.includes("reimbursements_user"),b=te(),R=de(b?.loggedInUserRoleMap),h=ue(b?.loggedInUserRoleMap),T=!!m.userReimbursementInfo?.isReimbursementTOSAccepted,u=!!m.companyReimbursementInfo?.info?.isReimbursementEnabled,w=!!m.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,D=C=>{c(C)};if(a==null)throw Error("Can't access reimbursement promo page without signing in...");return u&&h&&T?s.jsx(M,{to:"../../../reimbursements"}):w&&R?s.jsx(M,{to:"../../reimbursements/setup"}):m.companyReimbursementInfo&&!w||m.userReimbursementInfo&&h&&T===!1?s.jsxs(s.Fragment,{children:[s.jsx(ee,{analytics:A,onLoad:C=>(F=>F.trackPageLoaded(We.Event.reimbursementPromoPage))(C)}),s.jsx(Je,{isAppContentDrawerOpen:d,handleDrawerToggle:D}),s.jsx(ia,{companyId:o,navigate:e,location:t,userReimbursementInfo:m.userReimbursementInfo,userRoleId:i,isEmployee:l,onClickMenuIcon:()=>{D(!0)}})]}):s.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}})};function Oa(){const e=E(W=>V(W)),t=te(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=Ke(),d=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,c=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:m}=X(),{isFeatureEnabled:o}=m(v.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=m(v.isDebitCardFeatureEnabled),i=Me(a,e),l=Ne(e),b=e?.userRole!=null&&gn(e?.userRole),R=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!b)&&hn(t?.loggedInUserRoleMap),h=fn(t?.loggedInUserRoleMap),T=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!b,u=de(t?.loggedInUserRoleMap),w=T&&u,{isFeatureEnabled:D}=m(v.isDepositAccountsFeatureEnabled),C=D&&!b&&Sn(t?.loggedInUserRoleMap),F=Ln(e,o,a)&&!b&&In(t?.loggedInUserRoleMap),x=yn(t?.loggedInUserRoleMap),B=Rn(t?.loggedInUserRoleMap),I=Cn(t?.loggedInUserRoleMap),g=vn(t?.loggedInUserRoleMap),O=An(t?.loggedInUserRoleMap),U=ue(t?.loggedInUserRoleMap),{tenantEmailDomain:$}=Y(),y=Z(),p=n===!0&&(u||U&&c);return s.jsxs(ct,{children:[y.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(k,{path:"verification",element:s.jsx(ke,{isBillPayAdminLevelAccess:R,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:C,isChargeCardAdminLevelAccess:F,isUserHasOnlyCardAccess:x,productType:"reimbursement",type:"verification"})}),s.jsx(k,{path:"setup",element:s.jsx(ke,{isBillPayAdminLevelAccess:R,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:C,isChargeCardAdminLevelAccess:F,isUserHasOnlyCardAccess:x,productType:"reimbursement",type:"setup"})}),s.jsx(k,{path:"promo",element:s.jsx(oa,{})}),s.jsx(k,{path:"approval-rules/*",element:w?s.jsx($n,{}):s.jsx(Mn,{isUserHasZeniAccountsAccess:B,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:O,isUserHasReimbursementAccess:U,isUserHasTreasuryAccess:I,isTenantBankingOnly:i,tenantEmailDomain:$??""})}),p&&s.jsx(k,{path:"*",element:s.jsx(ta,{})}),(i===!0||l===!0)&&s.jsx(k,{path:"/*",element:s.jsx(qe,{})}),t!=null&&_e(e,t?.loggedInUserRoleMap)&&s.jsx(k,{path:"*",element:s.jsx(M,{to:"../promo"})}),d&&u&&s.jsx(k,{path:"*",element:s.jsx(M,{to:"../setup"})})]}):y.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(k,{path:"new",element:s.jsx(Ee,{})}),s.jsx(k,{path:":reimbursementId",element:s.jsx(qn,{})}),s.jsx(k,{path:":reimbursementId/edit",element:s.jsx(Ee,{})}),s.jsx(k,{path:"*",element:s.jsx(ie,{})})]}):s.jsx(k,{path:"*",element:s.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${j.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(k,{path:"*",element:s.jsx(ie,{})})]})}export{Oa as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-BEuWW_o5.js";import{u as J,l as ye,h as Ce,i as ge,g as d,n as Ie,o as we,p as Y}from"./core-lbYY5woS.js";import{eQ as L,fc as I,JQ as Se,jD as Z,tM as W,qe as F,jr as Te,iv as Re,tK as X,qj as Oe,bv as Fe,JR as Ae,bn as ke,uN as De,JS as je,JT as Ee,tC as Pe,JU as G,JV as Le,JW as Me,JX as Be,JY as ve,JZ as w,J_ as A,J$ as k,K0 as H,K1 as D,K2 as j,dE as Ve,ut as Ue,uh as K,ui as N,uz as xe,um as $,uF as ze,K3 as Je,K4 as Ye,K5 as Ge,K6 as He,K7 as Ke,eY as Ne,eW as $e}from"./zeni-epic-state-DsxPZxrE.js";import{H as qe,J as Qe,N as Ze,O as We,K as Xe,C as ee,j as E,z as ae,V as ea,I as aa,a as sa,Y as ta,_ as oa,R as na,c as P,e as ra,n as se,$ as ia,a0 as la,a1 as ca}from"./index-CR1sBuly.js";import"./mui-hUAh7HgW.js";import da from"./NotFoundScreen-DdK7GyZ6.js";import{F as pa}from"./FeaturePreviewScreen-D4qKJlp2.js";import{a as _}from"./sentry-DsHW_1mX.js";import{u as fa}from"./useInitialThreadRequest-oMQ4nobf.js";import{t as q,a as Q,b as ma}from"./routePaths-BoWQ8YXQ.js";import{M as ua}from"./MobileAppDrawer-Ccfg2tLY.js";import"./recharts-aApoEySM.js";import"./analytics-BpTmj6-G.js";import"./plaid-DtmQg7la.js";import"./dnd-BBkXCQMv.js";import"./stripe-DMRn4zHo.js";import"./lottie-DW3oQVJC.js";import"./lexical-BoKYrzBU.js";import"./pdf-D4eIZozg.js";import"./utils-AZPawxk4.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]="ffd1ac61-c269-4ad9-9416-2f9ecdf6d3b4",e._sentryDebugIdIdentifier="sentry-dbid-ffd1ac61-c269-4ad9-9416-2f9ecdf6d3b4")}catch{}})();const _a=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(A({resetLeftScroll:!0}))},ha=e=>{e(Ye()),e(Ge()),e(He()),e(Ke())},ba=Ie(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=L(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=I(e),r=Ae(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:P,isZeniUser:ke(o),showAccountGroups:r===!0,isAccountingClassesEnabled:Z(e),isAccountingProjectsEnabled:W(e),currentTenantCompanyName:a,statementEndPoint:`${ca}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Je(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ze(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter(C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="same_period_last_year")),e(K(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e(N(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(w(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e($({numberOfPeriods:1,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"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e($(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(xe(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(K(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(N(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>y(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(Ue({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=Ve(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{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,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return Q(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?ma(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:S(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(j({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({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(A({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(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({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(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(ve({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(w("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(w("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(w("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Me({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(G({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(X())},onUpdateDisplayOrder:a=>{e(Ee(a))},onUpdateReportFormat:a=>{ha(e),e(je(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ia);function ya(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=We(),f=Xe(),u=la(f),a=ye(),s=Ce(),t=J(),{tenantEmailDomain:r}=ge(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(E.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,C]=_.useState(!1),[M,te]=_.useState(!1),{isFeatureEnabled:B}=l(E.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const v=d(n=>L(n)),oe=v.company?.companyInfo.firstMonthOfFY??1,ne=fa(B?v?.companyId:void 0),g=d(n=>I(n).fetchState),re=d(n=>Se(n)),{areTenantIdsInSync:h}=ea(),T=d(n=>n.financeStatementState.selectedReportId),V=d(n=>Z(n)),R=d(n=>W(n)),ie=d(n=>I(n).isCompareModeOn),b=d(n=>I(n).filter),O=d(n=>I(n).selectedReportAndTimeframeFetchState),le=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(C(!0),s(F(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!M&&g==="Completed"&&h&&(s(F(c.userId,!1,!0,!1)),te(!0))},[i,M,g,h]),_.useEffect(()=>{if(i&&O.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(T){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(b.timeframe));break;case"profit_and_loss_by_projects":R&&s(X());break;case"balance_sheet":s(Re(b.timeframe));break;case"cash_flow":s(Te(b.timeframe))}},[i,T,O,h,V,R]);const U=aa(),ce=U?.loggedInUserRole!=null&&Fe(U?.loggedInUserRole)!==!0,[de,pe]=_.useState(!1),x=n=>{pe(n)},fe=sa(),me=ta();return function(n){const{isDataReady:ue}=n,{pathname:_e}=J(),z=qe(_e??"")==="reports",he=Qe(ue),be=_.useMemo(()=>z?_a:void 0,[z]);Ze({canFetchSuggestedQuestions:he,pageContexts:be})}({isDataReady:g==="Completed"}),oa({isDataReady:g==="Completed"}),p.jsxs(p.Fragment,{children:[g==="Completed"?p.jsx(na,{analytics:P,onLoad:n=>n.trackPageLoaded(ra.Event.reports)}):null,p.jsx(ua,{isAppContentDrawerOpen:de,handleDrawerToggle:x}),p.jsx(ba,{firstMonthOfFY:oe,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:le,selectedReportID:T,analytics:P,filter:b,isAccountingClassesEnabled:V,isAccountingProjectsEnabled:R,isCompareModeOn:ie,hasTransactionAccess:ce,signedInUser:c,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:x,reportsResyncFetchState:re.reportsResyncFetchState,isAiCfoAccessEnabled:me&&fe&&!e,onAskAiCfoClick:()=>{if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:ne})]})}const S=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=d(s=>L(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(E.isDebitCardFeatureEnabled),u=Ne(f,e),a=$e(e);return u===!0||a===!0?p.jsx(pa,{}):p.jsxs(we,{children:[p.jsx(Y,{path:"/",element:p.jsx(ya,{})}),p.jsx(Y,{path:"*",element:p.jsx(da,{})})]})}export{Ua as default};
|
|
1
|
+
import{j as p}from"./liveblocks-BNlilBXq.js";import{u as J,l as ye,h as ge,i as Ce,g as d,n as Ie,o as we,p as Y}from"./core-BeBBWfga.js";import{eQ as L,fc as I,JQ as Se,jD as Z,py as W,qg as O,jr as Te,iv as Re,tM as X,ql as Fe,bv as Oe,JR as Ae,bn as ke,uN as De,JS as Ee,JT as je,tE as Pe,JU as G,JV as Le,JW as Me,JX as Be,JY as ve,JZ as w,J_ as A,J$ as k,K0 as H,K1 as D,K2 as E,dE as Ve,ut as Ue,uh as K,ui as N,uz as xe,um as q,uF as ze,K3 as Je,K4 as Ye,K5 as Ge,K6 as He,K7 as Ke,eY as Ne,eW as qe}from"./zeni-epic-state-5fEaVO5b.js";import{F as $e,H as Qe,N as Ze,Q as We,K as Xe,a as ee,I as j,z as ae,V as ea,d as aa,c as sa,W as ta,Z as oa,v as na,f as P,h as ra,q as se,$ as ia,a0 as la,a1 as ca}from"./index-DWCyzMUX.js";import"./mui-CnlqDSRv.js";import da from"./NotFoundScreen-CDTENjn3.js";import{F as pa}from"./FeaturePreviewScreen-DBbU3hyx.js";import{a as _}from"./sentry-CH2pQ4tM.js";import{u as fa}from"./useInitialThreadRequest-DS5F5QV2.js";import{t as $,a as Q,b as ma}from"./routePaths-aWjSXoc2.js";import{M as ua}from"./MobileAppDrawer-C1owD1l4.js";import"./recharts-C5E4pGR4.js";import"./analytics-DYzLSwIZ.js";import"./plaid-CBNEU__p.js";import"./dnd-UF85x-t5.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbxhFPB1.js";import"./lexical-C_ylRY16.js";import"./pdf-Dp2xnkno.js";import"./utils-C2zbYn9G.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]="354591f5-632f-4938-9fe5-0186bc2b70cc",e._sentryDebugIdIdentifier="sentry-dbid-354591f5-632f-4938-9fe5-0186bc2b70cc")}catch{}})();const _a=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(A({resetLeftScroll:!0}))},ha=e=>{e(Ye()),e(Ge()),e(He()),e(Ke())},ba=Ie(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=L(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=I(e),r=Ae(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:P,isZeniUser:ke(o),showAccountGroups:r===!0,isAccountingClassesEnabled:Z(e),isAccountingProjectsEnabled:W(e),currentTenantCompanyName:a,statementEndPoint:`${ca}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(O(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Je(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ze(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter(g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year")),e(K(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e(N(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(w(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(q({numberOfPeriods:1,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"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(q(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(xe(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(K(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(N(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>y(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(Ue({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=Ve(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return $(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return Q(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?ma(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?$(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:S(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({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(A({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(E({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({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(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(ve({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(w("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(w("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(w("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Me({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(G({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(X())},onUpdateDisplayOrder:a=>{e(je(a))},onUpdateReportFormat:a=>{ha(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ia);function ya(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=We(),f=Xe(),u=la(f),a=ye(),s=ge(),t=J(),{tenantEmailDomain:r}=Ce(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(j.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[M,te]=_.useState(!1),{isFeatureEnabled:B}=l(j.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const v=d(n=>L(n)),oe=v.company?.companyInfo.firstMonthOfFY??1,ne=fa(B?v?.companyId:void 0),C=d(n=>I(n).fetchState),re=d(n=>Se(n)),{areTenantIdsInSync:h}=ea(),T=d(n=>n.financeStatementState.selectedReportId),V=d(n=>Z(n)),R=d(n=>W(n)),ie=d(n=>I(n).isCompareModeOn),b=d(n=>I(n).filter),F=d(n=>I(n).selectedReportAndTimeframeFetchState),le=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(g(!0),s(O(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!M&&C==="Completed"&&h&&(s(O(c.userId,!1,!0,!1)),te(!0))},[i,M,C,h]),_.useEffect(()=>{if(i&&F.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(T){case"profit_and_loss":case"profit_and_loss_by_classes":s(Fe(b.timeframe));break;case"profit_and_loss_by_projects":R&&s(X());break;case"balance_sheet":s(Re(b.timeframe));break;case"cash_flow":s(Te(b.timeframe))}},[i,T,F,h,V,R]);const U=aa(),ce=U?.loggedInUserRole!=null&&Oe(U?.loggedInUserRole)!==!0,[de,pe]=_.useState(!1),x=n=>{pe(n)},fe=sa(),me=ta();return function(n){const{isDataReady:ue}=n,{pathname:_e}=J(),z=$e(_e??"")==="reports",he=Qe(ue),be=_.useMemo(()=>z?_a:void 0,[z]);Ze({canFetchSuggestedQuestions:he,pageContexts:be})}({isDataReady:C==="Completed"}),oa({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(na,{analytics:P,onLoad:n=>n.trackPageLoaded(ra.Event.reports)}):null,p.jsx(ua,{isAppContentDrawerOpen:de,handleDrawerToggle:x}),p.jsx(ba,{firstMonthOfFY:oe,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:le,selectedReportID:T,analytics:P,filter:b,isAccountingClassesEnabled:V,isAccountingProjectsEnabled:R,isCompareModeOn:ie,hasTransactionAccess:ce,signedInUser:c,selectedReportAndTimeframeFetchState:F,handleDrawerToggle:x,reportsResyncFetchState:re.reportsResyncFetchState,isAiCfoAccessEnabled:me&&fe&&!e,onAskAiCfoClick:()=>{if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:ne})]})}const S=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=d(s=>L(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(j.isDebitCardFeatureEnabled),u=Ne(f,e),a=qe(e);return u===!0||a===!0?p.jsx(pa,{}):p.jsxs(we,{children:[p.jsx(Y,{path:"/",element:p.jsx(ya,{})}),p.jsx(Y,{path:"*",element:p.jsx(da,{})})]})}export{Ua as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./liveblocks-BNlilBXq.js";import{a as j,z as w,aN as y,v as E,f as p,h as F,cK as L,I as P}from"./index-DWCyzMUX.js";import"./mui-CnlqDSRv.js";import m from"./NotFoundScreen-CDTENjn3.js";import{a as u}from"./sentry-CH2pQ4tM.js";import{h as T,g as x,l as V,u as A,n as Q,o as R,p as d}from"./core-BeBBWfga.js";import{eQ as U,Qt as C,Nf as z,Qu as v,u8 as Y,f2 as G,Qv as K,u6 as O}from"./zeni-epic-state-5fEaVO5b.js";import{R as b}from"./ReferralListScreen-PEBFhlmP.js";import"./recharts-C5E4pGR4.js";import"./analytics-DYzLSwIZ.js";import"./plaid-CBNEU__p.js";import"./dnd-UF85x-t5.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbxhFPB1.js";import"./lexical-C_ylRY16.js";import"./pdf-Dp2xnkno.js";import"./utils-C2zbYn9G.js";import"./useAskAiCfoHostNavButtonProps-DbBvDdaC.js";import"./MobileAppDrawer-C1owD1l4.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="4a159937-4a32-4c18-864d-7de10417367c",a._sentryDebugIdIdentifier="sentry-dbid-4a159937-4a32-4c18-864d-7de10417367c")}catch{}})();const q=Q(function(a,t){const n=C(a);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(a,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{a(v()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}a(O())},onUpdateInviteFormLocalData:s=>{a(K({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(L),B=()=>{const a=T(),[t,n]=u.useState(!1),[i,s]=u.useState(!1),r=x(o=>U(o)),c=V(),_=A(),{useDynamicConfig:g}=j(),f=w.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const l=x(o=>C(o)),N=f?.firstName!=null?f.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:k}=g(y.zeniAccountsConfig),D=z(k);u.useEffect(()=>{a(v()),r?.rewardsLastViewedTime==null&&i===!1&&(a(Y()),s(!0))},[]),u.useEffect(()=>{t||l.fetchState!=="Not-Started"||(n(!0),a(G(!0)))},[l.fetchState,a]);const I=r.company?.companyInfo.companyLegalName??r.companyName;return e.jsxs(e.Fragment,{children:[l.fetchState==="Completed"?e.jsx(E,{analytics:p,onLoad:o=>(S=>S.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,e.jsx(q,{navigate:c,location:_,currentTenant:r,companyName:I,userName:N,inviteFormCompayData:l.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:D.maxAnnualPercentageYield})]})};function da(){const{useFeatureGate:a}=j(),{isFeatureEnabled:t}=a(P.isReferralFeatureEnabled);return e.jsxs(R,{children:[e.jsx(d,{path:"/",element:t?e.jsx(b,{}):e.jsx(m,{})}),e.jsx(d,{path:"how-it-works",element:t?e.jsx(b,{isReferralDrawerOpen:!0}):e.jsx(m,{})}),e.jsx(d,{path:"refer/*",element:t?e.jsx(B,{}):e.jsx(m,{})}),e.jsx(d,{path:"*",element:e.jsx(m,{})})]})}export{da as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-DSV2c9Hg.js","assets/sentry-CH2pQ4tM.js","assets/core-BeBBWfga.js","assets/zeni-epic-state-5fEaVO5b.js","assets/index-DWCyzMUX.js","assets/mui-CnlqDSRv.js","assets/analytics-DYzLSwIZ.js","assets/utils-C2zbYn9G.js","assets/withTransactionSidePanel-Bsk-acAb.js","assets/useAskAiCfoHostNavButtonProps-DbBvDdaC.js","assets/TransactionDetailScreen-CUNFX6ex.js","assets/decodeURIComponentSafe-OtMMCMcE.js","assets/routePaths-aWjSXoc2.js","assets/NotFoundScreen-CDTENjn3.js","assets/useInitialThreadRequest-DS5F5QV2.js","assets/analyticsHelper-Dc1kU1of.js","assets/CompanyPassportScreen-BwKa_LUc.js","assets/MobileAppDrawer-C1owD1l4.js","assets/useAiCfoDashboardSuggestedQuestionsChips-D5XSlLnm.js","assets/FeaturePreviewScreen-DBbU3hyx.js","assets/ReferralListScreen-PEBFhlmP.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-fvhaclgV.js","assets/AddressScreen-CuGNy3IM.js","assets/DomesticWireDetailScreen-XA3QzAyw.js","assets/DrawerScreen-2PFFQiRL.js","assets/SetupPagesScreen-BHZjOSHJ.js","assets/BusinessVerificationPageScreen-Lfv0XtEV.js","assets/BillPayApprovalRoutes-CL6D_7dw.js","assets/ReimbursementApprovalRuleDetailScreen-dkA2aqfF.js","assets/getLocaleForTenant-CXwRfDGi.js","assets/ReimbursementRoutes-BiXGzoNt.js","assets/ReimbursementApprovalRoutes-BkLIE_PW.js","assets/TransactionListRoutes-C4xg5Sow.js","assets/ZeniAccountStatementScreen-BOPEKBSK.js","assets/SettingsRoutes-D8oriWAW.js","assets/accountMappingHelper-DWvcSK1C.js","assets/QBOConnectionScreen-WmVdfC19.js","assets/empty-BaCT02t1.js","assets/index-DS8xe4Yw.js","assets/url-BcTKj4a2.js","assets/index-_ohVjyws.js","assets/ReportsRoutes-C6YTBKT9.js","assets/ChargeCardRoutes-D1tC8X9c.js","assets/PeopleRoutes-DhjKygIO.js","assets/ExpenseAutomationRoutes-BXsX48QL.js","assets/TreasuryRoutes-DJhXjsa5.js","assets/VendorsRoutes-WEkjdTRS.js","assets/pathToGoBack-CHG8tIif.js","assets/ZeniAccountRoutes-C9ludMke.js","assets/AddressRoutes-CojtNX27.js","assets/PandLWithForecastRoutes-BRmUZUjI.js","assets/CustomerOnboardingRoutes-BjxUysyp.js","assets/TransactionDetailRoutes-C3Fb8KbQ.js","assets/EntityDetailRoutes-Cpm2zn0V.js","assets/NotificationRoutes-CKh3SMt4.js","assets/PerformanceRoutes-CnVEsdqq.js","assets/RewardsRoutes-CvorIu5L.js","assets/TaskRoutes-BMtkIWCF.js","assets/TaskListScreen-DuuYXRRr.js","assets/AiCfoScreen-C9ttZvTj.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as n,bn as os,eQ as ls,eY as cs,eW as ds,eX as ms,fH as us,eR as _s,cQ as Ee,cx as Es,fd as As,cp as ps,bE as xs,bq as Is,fi as gs,v as Ts,Jm as hs,bv as js,Jn as Us,bG as Hs,ff as Rs,bF as bs,bs as Ds,cl as ys,Jo as fs,Jp as Cs,cN as vs,cP as Os,cO as Ps,cw as Fs,cC as Ls,mT as Ae,eU as pe,fR as Bs,fm as xe,fO as Ie,fP as ge,fn as ks}from"./zeni-epic-state-5fEaVO5b.js";import{j as e}from"./liveblocks-BNlilBXq.js";import{a as v}from"./sentry-CH2pQ4tM.js";import{h as Vs,l as Ss,i as Ns,u as Ms,g as G,k as Te,N as c,o as Zs,p as t}from"./core-BeBBWfga.js";import{m as ws,u as Gs,z as R,a as zs,c as $s,P as Ys,I as L,d as Js,L as B,O as he,t as _,e as Ws,f as K,l}from"./index-DWCyzMUX.js";import"./mui-CnlqDSRv.js";import{f as je}from"./analyticsHelper-Dc1kU1of.js";import{t as qs}from"./getLocaleForTenant-CXwRfDGi.js";import"./recharts-C5E4pGR4.js";import"./analytics-DYzLSwIZ.js";import"./plaid-CBNEU__p.js";import"./dnd-UF85x-t5.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbxhFPB1.js";import"./lexical-C_ylRY16.js";import"./pdf-Dp2xnkno.js";import"./utils-C2zbYn9G.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]="c50daf91-0bf8-4694-a138-15e39a9a183e",i._sentryDebugIdIdentifier="sentry-dbid-c50daf91-0bf8-4694-a138-15e39a9a183e")}catch{}})();const Qs={dashboard:()=>n(()=>import("./DashboardRoutes-DSV2c9Hg.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),bills:()=>n(()=>import("./BillPayRoutes-fvhaclgV.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-BiXGzoNt.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21])),transactions:()=>n(()=>import("./TransactionListRoutes-C4xg5Sow.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>n(()=>import("./SettingsRoutes-D8oriWAW.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21])),reports:()=>n(()=>import("./ReportsRoutes-C6YTBKT9.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-D1tC8X9c.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,9,23,21])),people:()=>n(()=>import("./PeopleRoutes-DhjKygIO.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-BXsX48QL.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>n(()=>import("./TreasuryRoutes-DJhXjsa5.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21])),vendors:()=>n(()=>import("./VendorsRoutes-WEkjdTRS.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-C9ludMke.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))},Xs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Ks=l(()=>n(()=>import("./ReportsRoutes-C6YTBKT9.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21]))),en=l(()=>n(()=>import("./AddressRoutes-CojtNX27.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,13,21]))),sn=l(()=>n(()=>import("./PeopleRoutes-DhjKygIO.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-BRmUZUjI.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-BjxUysyp.js"),__vite__mapDeps([52,1,2,3,23,4,5,6,7,13,37,38,39,40,41,11,21]))),tn=l(()=>n(()=>import("./VendorsRoutes-WEkjdTRS.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-C3Fb8KbQ.js"),__vite__mapDeps([53,1,2,3,13,4,5,6,7,10,9,11,12,21]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-Cpm2zn0V.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,11,8,9,10,12,21]))),on=l(()=>n(()=>import("./DashboardRoutes-DSV2c9Hg.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),He=l(()=>n(()=>import("./BillPayRoutes-fvhaclgV.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21]))),ln=l(()=>n(()=>import("./SettingsRoutes-D8oriWAW.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21]))),Re=l(()=>n(()=>import("./ReimbursementRoutes-BiXGzoNt.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-C9ludMke.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))),dn=l(()=>n(()=>import("./TreasuryRoutes-DJhXjsa5.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21]))),mn=l(()=>n(()=>import("./TransactionListRoutes-C4xg5Sow.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),un=l(()=>n(()=>import("./ChargeCardRoutes-D1tC8X9c.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,9,23,21]))),_n=l(()=>n(()=>import("./NotificationRoutes-CKh3SMt4.js"),__vite__mapDeps([55,1,2,3,13,4,5,6,7,9,21]))),En=l(()=>n(()=>import("./PerformanceRoutes-CnVEsdqq.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,9,17,21]))),An=l(()=>n(()=>import("./ExpenseAutomationRoutes-BXsX48QL.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),pn=l(()=>n(()=>import("./RewardsRoutes-CvorIu5L.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,13,20,9,17,21]))),xn=l(()=>n(()=>import("./TaskRoutes-BMtkIWCF.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,14,17,59,9,21]))),In=l(()=>n(()=>import("./AiCfoScreen-C9ttZvTj.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,18,48,21]))),y=l(()=>n(()=>import("./NotFoundScreen-CDTENjn3.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),gn=l(()=>n(()=>import("./TaskListScreen-DuuYXRRr.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,17,21])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=Gs(),D=R.getSignedInUserTenant(o)?.tenantId,h=R.getSignedInUser(),q=os(h),z=Ms(),[N,De]=v.useState(!1),r=G(a=>ls(a)),{useFeatureGate:P}=zs(),Q=$s(),ye=Ys(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&q,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=G(a=>a.tenantState.fetchState),A=G(a=>a.tenantState.activeTenantFetchState.fetchState),u=A==="Completed"||j==="Completed"?cs(se,r):void 0,$=A==="Completed"||j==="Completed"?ds(r):void 0,Le=A==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),Y=G(a=>us(a));if(o!=null){const a=R.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:D,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),E=Js(),Se=r.company==null||E?.loggedInUserRoleMap!=null&&Ee(E.loggedInUserRole),Ne=Es(E?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,X=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=G(a=>w.tenantId!=null?As(a,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(X!=null&&D!=null){const a=X.params.selectedPeriod;if(a!=null){const H=a.split("-");if(H.length===2){const d=ps(Number(H[0])),s=Number(H[1]),m=xs(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=Is();m.isAfter(M,"month")===!1?U(gs(D,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[X,D]),v.useEffect(()=>{N||(De(!0),f(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,d,s){if(pe(H?.userId,H?.zeniSessionId,a.tenantId),d(Bs(!0)),d(xe(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=R.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(qs(s)),m?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?K.identify(a.userId,{tenant_id:a.tenantId}):K.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,R]),v.useEffect(()=>{R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const J=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(J&&ts){k(xe(s));const W=R.getSignedInUserTenantWithId(s);W?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(W?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Ie(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(ge(m.userId,s)))}else J&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Ie(m.userId,s))),J&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(ge(m.userId,s)));if(J){K.identify(m.userId,{tenant_id:s});const W=s==null||s!=null&&(H==="Completed"||H==="Error");a==="Completed"||H!=="Not-Started"&&H!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ae(m.userId,m.zeniSessionId)))}}(j,A,r,D,h,f,U))},[D,A]),v.useEffect(()=>{R.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),R.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{A==="In-Progress"&&f(B.TENANT_FETCHING),A!=="Completed"&&A!=="Error"||(A==="Completed"&&D!=null?(O(),_.markActiveTenantFetchCompleted(D)):A==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[A,j,D,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&A==="Completed"&&N&&(ie.current=!0,function(a=Xs,H=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Qs[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},H)}())},[A,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ee(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,ze=Us(E?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&Hs(E?.loggedInUserRoleMap),me=Oe&&!C,Ye=r.company!=null&&Rs(r.company),Je=Pe&&Ye===!0&&!C,We=re&&bs(E?.loggedInUserRoleMap),qe=oe&&Ds(E?.loggedInUserRoleMap),Qe=me&&ys(E?.loggedInUserRoleMap),Xe=fs(E?.loggedInUserRoleMap),Ke=Cs(E?.loggedInUserRoleMap),p=vs(E?.loggedInUserRoleMap),x=Os(E?.loggedInUserRoleMap),I=Ps(E?.loggedInUserRoleMap),g=Fs(E?.loggedInUserRoleMap),T=Ls(E?.loggedInUserRoleMap),ue=re&&g,_e=ce&&T,es=me&&p,ss=Je&&x,ns=oe&&I,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||ze===!0||Xe===!0||Ke===!0;return R.isSignedIn()?D==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ae(h.userId,h.zeniSessionId)),null):A!=="In-Progress"&&A!=="Not-Started"||j==="Completed"?(le===!0||q&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||q?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(Ws,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Ks,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||Ge?e.jsx(rn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:x,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(gn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(xn,{})}),e.jsx(t,{path:"address/*",element:We||de||Qe||qe?e.jsx(en,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(En,{}):e.jsx(be,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(An,{}):e.jsx(be,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(He,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(He,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(Re,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(Re,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(ln,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:Q?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:Q?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Q?e.jsx(In,{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:{...z.state,message:"...",origin:z.pathname}}))}const Tn=({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"}),b=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(Hn,{tenantEmailDomain:O}):S?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Rn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(y,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Rn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),be=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{b as FallBackRoute,wn as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-BNlilBXq.js";import{a as p}from"./sentry-CH2pQ4tM.js";import{l as _,u as R,h as P,g as h,n as B,i as F,o as q,p as C}from"./core-BeBBWfga.js";import{bn as xe,eQ as j,gK as de,Lr as Ee,py as Ae,jD as ue,lW as we,gM as je,Lt as ke,Ls as Pe,NS as ve,xL as De,Ce as Me,Nr as Ue,NA as _e,c2 as X,cH as Te,cI as Re,Jy as Be,NT as Fe,Jz as Ve,wb as Oe,NU as Ne,Eu as Le,BW as $e,BN as pe,BK as Ke,wf as ge,BQ as me,BT as fe,BZ as ee,sM as ne,we as He,jf as Q,ji as he,NV as Je,kj as ze,wu as Ge,Km as Ze,Kn as We,jd as qe,NW as Qe,jg as Ye,ra as Xe,NX as en,NY as nn,re as tn,gm as an,JH as se,gt as sn,JI as on,wr as cn,NZ as rn,N_ as ln,Cb as dn,eW as be,eY as Se,N$ as un,fA as pn,JR as gn,wq as oe,fF as ie,fE as mn,wp as fn,fD as hn,fC as bn,O0 as Sn,e$ as Ie,O1 as In,O2 as yn,wx as Cn,wo as ce,O3 as xn,fh as En,wl as An,bV as wn,c1 as jn,c0 as kn,bW as Pn,b_ as vn,bZ as Dn,bY as Mn,b$ as Un,bX as _n}from"./zeni-epic-state-5fEaVO5b.js";import{a as te,I as M,z as x,af as ye,bG as Tn,f as K,h as Rn,d as V,B as ae,bH as Bn,bI as Fn,aq as Vn,j as Ce,bJ as On,bK as Nn,bL as Ln,a9 as $n,V as Kn,bM as Hn,q as Jn,bN as zn}from"./index-DWCyzMUX.js";import{n as U}from"./mui-CnlqDSRv.js";import{M as v}from"./MobileAppDrawer-C1owD1l4.js";import{a as L,g as $,m as Gn}from"./accountMappingHelper-DWvcSK1C.js";import{t as Zn,A as Wn}from"./AddressScreen-CuGNy3IM.js";import T from"./NotFoundScreen-CDTENjn3.js";import{g as qn}from"./analyticsHelper-Dc1kU1of.js";import{B as Qn}from"./BusinessVerificationPageScreen-Lfv0XtEV.js";import{C as Yn}from"./CompanyPassportScreen-BwKa_LUc.js";import{q as re}from"./QBOConnectionScreen-WmVdfC19.js";import{B as Xn}from"./BillPayApprovalRoutes-CL6D_7dw.js";import{R as et}from"./ReimbursementApprovalRoutes-BkLIE_PW.js";import"./recharts-C5E4pGR4.js";import"./analytics-DYzLSwIZ.js";import"./plaid-CBNEU__p.js";import"./dnd-UF85x-t5.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbxhFPB1.js";import"./lexical-C_ylRY16.js";import"./pdf-Dp2xnkno.js";import"./utils-C2zbYn9G.js";import"./routePaths-aWjSXoc2.js";import"./empty-BaCT02t1.js";import"./pdf-lib-BEgmFXIU.js";import"./index-DS8xe4Yw.js";import"./url-BcTKj4a2.js";import"./index-_ohVjyws.js";import"./decodeURIComponentSafe-OtMMCMcE.js";import"./ReimbursementApprovalRuleDetailScreen-dkA2aqfF.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="4f6d1257-73ff-4b21-ad68-16ef577347a1",e._sentryDebugIdIdentifier="sentry-dbid-4f6d1257-73ff-4b21-ad68-16ef577347a1")}catch{}})();const nt=U.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -30,7 +30,7 @@ import{j as a}from"./liveblocks-BEuWW_o5.js";import{a as p}from"./sentry-DsHW_1m
|
|
|
30
30
|
flex-direction: column;
|
|
31
31
|
align-items: center;
|
|
32
32
|
background-color: ${e=>e.theme.colors.grey4};
|
|
33
|
-
`,ut=B(function(e,s){const{companyId:o}=s,c=j(e),i=s.roleMap.bill_pay_admin,n=Je(e,o),{uiState:t}=n,r=(X(c?.userRole??[])||i)&&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:t,stripeKey:Ce.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:r,analytics:K}},function(e,s){const{navigate:o,currentTenant:c,companyId:i}=s;return{onFetchLinkTokenClick:(n,t)=>{e(ne("billing_setup",n,t))},onEstablishConnectionClick:n=>{e(ee(n,i,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(ge("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,t,r)=>{e(fe(n,t,"billing","billing_setup",r))},onUpdatePaymentAccountLoginStatus:(n,t)=>{e(me(!1,n,"billing","billing_setup",t))},onUpdateAccountClick:(n,t)=>{e(pe(n,t,"billing","billing_setup"))},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")},handleCreateCardSetupIntent:n=>{e(he(n))},handleConfirmCardSetupIntent:n=>{e(Ye(n))},updateCardPaymentModalState:n=>{e(
|
|
33
|
+
`,ut=B(function(e,s){const{companyId:o}=s,c=j(e),i=s.roleMap.bill_pay_admin,n=Je(e,o),{uiState:t}=n,r=(X(c?.userRole??[])||i)&&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:t,stripeKey:Ce.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:r,analytics:K}},function(e,s){const{navigate:o,currentTenant:c,companyId:i}=s;return{onFetchLinkTokenClick:(n,t)=>{e(ne("billing_setup",n,t))},onEstablishConnectionClick:n=>{e(ee(n,i,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(ge("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,t,r)=>{e(fe(n,t,"billing","billing_setup",r))},onUpdatePaymentAccountLoginStatus:(n,t)=>{e(me(!1,n,"billing","billing_setup",t))},onUpdateAccountClick:(n,t)=>{e(pe(n,t,"billing","billing_setup"))},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")},handleCreateCardSetupIntent:n=>{e(he(n))},handleConfirmCardSetupIntent:n=>{e(Ye(n))},updateCardPaymentModalState:n=>{e(Qe({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,t,r)=>{e(qe(n,t,r))},handleFetchPaymentSources:()=>{e(Q())},resetCardPaymentViewState:()=>{e(We())},handleResetCardPaymentErrorStatuses:()=>{e(Ze())},onBillingAddressSave:n=>{e(Ge(n))},onAddressEditHandler:n=>{if(n!=null){const t=Zn(n);e(ze({addressType:"subscription_billing_address",addressToCreate:t}))}}}})(On),pt=()=>{const e=_(),s=R(),o=P(),{tenantEmailDomain:c}=F(),[i,n]=p.useState(!1),[t,r]=p.useState(!1),[u,d]=p.useState(!1),g=h(y=>j(y)),f=h(y=>y.cardPaymentViewState),m=h(y=>y.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState),l=Vn(f.addCardPaymentSourceStatus.fetchState),E=f.addCardPaymentSourceStatus.fetchState,I=g.companyId??x.getSignedInUserTenant(c)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const w=V();p.useEffect(()=>{I!=null&&o(He(I,!1))},[I,o]),p.useEffect(()=>{t||(r(!0),o(Q()))},[t,o]),p.useEffect(()=>{u||(he(["card"]),d(!0))},[u]),p.useEffect(()=>{l==="In-Progress"&&E==="Completed"&&o(Q())},[l,E]);const S=y=>{n(y)};return w?.loggedInUserRoleMap!=null?a.jsxs(dt,{children:[a.jsx(v,{isAppContentDrawerOpen:i,handleDrawerToggle:S}),a.jsx(ut,{navigate:e,location:s,companyId:I,currentTenant:g,roleMap:w.loggedInUserRoleMap,onClickMenuIcon:()=>{S(!0)},googleAPIKey:Ce.googleMapsAPIKey})]}):a.jsx(ae,{fetchState:m})},Y="external_integrations",gt=B(function(e){const s=nn(e,Y);return{meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",notifyMeRegisteredSlugs:new Set(s.map(o=>o.additionalInfo).filter(o=>o!=null))}},function(e,s){const{navigate:o,integrationsView:c,signedInUserEmail:i,tenantEmailDomain:n,tenantId:t}=s;return{onBackClick:()=>{o("../")},onNavigateToDashboard:()=>{o("../dashboard")},onReconnectQBO:()=>{re.init("/connection/auth",n),re.handleClick()},onRefreshClick:()=>{c.integrations.refreshQBO.fetchState!=="In-Progress"&&e(cn())},onSaveChargeBeeCredentials:(r,u)=>{const d=c.externalConnections?.revenue?.find(g=>g.connectionName==="chargebee")?.connectionId;d!=null&&e(sn(t,d,se("revenue"),on("chargebee"),{api_key:r,site:u}))},onConnectHubSpot:(r,u)=>{const d=c.externalConnections?.revenue?.find(g=>g.connectionName==="hubspot")?.connectionId;if(d!=null){const g=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:r,client_secret:u,connection_id:d,redirect_uri:g,tenant_id:t}));const f="oauth crm.objects.deals.read crm.objects.owners.read";window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(r)}&scope=${encodeURIComponent(f)}&redirect_uri=${encodeURIComponent(g)}`}},onDisconnect:(r,u)=>{e(an(t,r,se(u)))},onNotifyMe:r=>{e(tn(Y,r,i))}}})(Nn),mt=()=>{const e=_(),s=P(),{tenantEmailDomain:o}=F(),[c,i]=p.useState(!1),n=h(l=>l.tenantState.fetchState),t=h(l=>j(l)),r=t.companyId??x.getSignedInUserTenant(o)?.companyId,u=x.getSignedInUser(),d=V(),g=X(t.userRole??[]);if(u==null)throw Error("Can't access Integrations page without signing in...");p.useEffect(()=>{s(Xe(Y))},[s]);const f=l=>{i(l)},m=h(l=>en(l,r));return d?.loggedInUserRoleMap!=null?a.jsxs(ft,{children:[a.jsx(v,{isAppContentDrawerOpen:c,handleDrawerToggle:f}),a.jsx(gt,{navigate:e,onClickMenuIcon:()=>{f(!0)},isAdmin:g,integrationsView:m,signedInUserEmail:u.userEmail??"",tenantEmailDomain:t.tenantEmailDomain??o??"",tenantId:t.tenantId,saveChargeBeeState:m.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:m.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:m.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:m.externalConnections?.saveOAuthConnectionError?.message,deleteConnectionState:m.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:m.externalConnections?.deleteConnectionError?.message,isLoading:n==="In-Progress"})]}):a.jsx(ae,{fetchState:n})},ft=U.div`
|
|
34
34
|
display: flex;
|
|
35
35
|
height: 100%;
|
|
36
36
|
width: 100%;
|
|
@@ -54,4 +54,4 @@ import{j as a}from"./liveblocks-BEuWW_o5.js";import{a as p}from"./sentry-DsHW_1m
|
|
|
54
54
|
flex-direction: column;
|
|
55
55
|
align-items: center;
|
|
56
56
|
background-color: ${e=>e.theme.colors.grey4};
|
|
57
|
-
`,le=({appContent:e})=>{const s=P(),o=_(),c=R(),[i,n]=p.useState(!1),t=h(b=>j(b)),{tenantEmailDomain:r}=t,u=t.companyId??x.getSignedInUserTenant(r)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:d}=te(),{isFeatureEnabled:g}=d(M.isDepositAccountsFeatureEnabled),{isFeatureEnabled:f}=d(M.isChargeCardFeatureEnabled),{isFeatureEnabled:m}=d(M.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=d(M.isTreasuryEnabled),E=h(b=>ue(b)),I=be(t),w=Se(m,t),S=!w&&E,y=$n(t,f,m),{areTenantIdsInSync:O}=Kn();p.useEffect(()=>{O&&s(un(u,S))},[u,s,S,O]);const A=h(b=>pn(b,S)),H=A.fetchState==="Not-Started"||A.fetchState==="In-Progress"||u==null,J=gn(t),z=!!t.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,N=b=>{n(b)};return a.jsxs(St,{children:[a.jsx(v,{isAppContentDrawerOpen:i,handleDrawerToggle:N}),e!=null?a.jsx(a.Fragment,{children:e}):a.jsx(Hn,{myProfileView:A,isAccountingClassesEnabled:E,isReimbursementDisabled:z===!1,isZeniAccountsDisabled:g===!1,isChargeCardDisabled:y===!1,isTreasuryDisabled:l===!1,isLiteRoleDisabled:J===!1,onClickMenuIcon:()=>{N(!0)},isLoading:H,isBankingOnlyTenant:w,isCardsOnlyTenant:I,onAddressClick:b=>{const D=function(Z,W){let k=`/${Z}/settings/my_profile`;return k=k.concat(`/new/${W}`),k}(r,b),G=Jn(c.state?.pathnameStackToGoBack,c.pathname);o(D,{state:{pathnameStackToGoBack:G}})},onGetOtp:b=>{const D={...A.myProfileLocalData,phone:b};s(oe({localData:D})),s(bn(b,"MyProfile"))},onResendOtp:b=>{s(hn(b,"MyProfile"))},onCancelClick:()=>{s(fn())},onSaveClick:()=>{s(ie("MyProfile",A.myProfileLocalData.phone,A.myProfileLocalData.otpChallenge,A.myProfileLocalData.dateOfBirth,A.addressData?.addressToCreate))},onVerifyOtp:(b,D)=>{s(mn(b,D,"MyProfile"))},onVerifyOtpSuccess:b=>{b!=null&&x.saveZeniOtpToken(b),s(ie("MyProfile",A.myProfileLocalData.phone,A.myProfileLocalData.otpChallenge,A.myProfileLocalData.dateOfBirth,A.addressData?.addressToCreate))},updateMyProfileLocalData:b=>{s(oe({localData:b}))}})]})};function It(){const e=P(),s=h(l=>j(l)).companyId,o=h(l=>Sn(l)),c=h(l=>Ie(l)),i=x.getSignedInUser(),[n,t]=p.useState(!1),r=p.useCallback(l=>{t(l)},[]),u=p.useCallback(l=>{e(In(l))},[]),d=p.useCallback(()=>{i?.userEmail!=null&&e(yn({loggedInUserEmail:i.userEmail}))},[i?.userEmail]),g=p.useCallback(()=>{e(Cn())},[]);if(i==null)throw Error("Can't access Notification Settings page without signing in...");const f=p.useCallback(()=>{const l=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ce(l,s))},[s,c.notificationSettings.monthEndInsightsNotificationSettings.enabled]),m=p.useCallback(()=>{e(xn())},[]);return p.useEffect(()=>{if(c.fetchState==="Completed"&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"){const l=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ce(l,s))}},[o.fetchState,s,c.notificationSettings.monthEndInsightsNotificationSettings.enabled,c.fetchState]),a.jsxs(a.Fragment,{children:[a.jsx(v,{isAppContentDrawerOpen:n,handleDrawerToggle:r}),a.jsx(zn,{notificationSettingsView:o,onFormDataChange:u,onCancel:d,onSave:g,onClickMenuIcon:()=>{r(!0)},signedInUser:i,onRefresh:f,resetUpdateStatus:m})]})}function ea(e){const[s,o]=p.useState(!1),c=h(l=>Ie(l)),i=h(l=>j(l)),n=V(),t=x.getSignedInUser(),r=P(),{useFeatureGate:u}=te(),{isFeatureEnabled:d}=u(M.isDebitCardFeatureEnabled),g=t?.userEmail==null||c.fetchState!=="Completed"||En(c.notificationSettings,t.userEmail,d,i);p.useEffect(()=>{c.fetchState!=="In-Progress"&&c.fetchState!=="Completed"&&s===!1&&(o(!0),r(An()))},[c.fetchState,s]);const f=Se(d,i),m=be(i);return c.fetchState!=="In-Progress"&&c.fetchState!=="Not-Started"||g!==!0?wn(i)?a.jsxs(
|
|
57
|
+
`,le=({appContent:e})=>{const s=P(),o=_(),c=R(),[i,n]=p.useState(!1),t=h(b=>j(b)),{tenantEmailDomain:r}=t,u=t.companyId??x.getSignedInUserTenant(r)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:d}=te(),{isFeatureEnabled:g}=d(M.isDepositAccountsFeatureEnabled),{isFeatureEnabled:f}=d(M.isChargeCardFeatureEnabled),{isFeatureEnabled:m}=d(M.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=d(M.isTreasuryEnabled),E=h(b=>ue(b)),I=be(t),w=Se(m,t),S=!w&&E,y=$n(t,f,m),{areTenantIdsInSync:O}=Kn();p.useEffect(()=>{O&&s(un(u,S))},[u,s,S,O]);const A=h(b=>pn(b,S)),H=A.fetchState==="Not-Started"||A.fetchState==="In-Progress"||u==null,J=gn(t),z=!!t.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,N=b=>{n(b)};return a.jsxs(St,{children:[a.jsx(v,{isAppContentDrawerOpen:i,handleDrawerToggle:N}),e!=null?a.jsx(a.Fragment,{children:e}):a.jsx(Hn,{myProfileView:A,isAccountingClassesEnabled:E,isReimbursementDisabled:z===!1,isZeniAccountsDisabled:g===!1,isChargeCardDisabled:y===!1,isTreasuryDisabled:l===!1,isLiteRoleDisabled:J===!1,onClickMenuIcon:()=>{N(!0)},isLoading:H,isBankingOnlyTenant:w,isCardsOnlyTenant:I,onAddressClick:b=>{const D=function(Z,W){let k=`/${Z}/settings/my_profile`;return k=k.concat(`/new/${W}`),k}(r,b),G=Jn(c.state?.pathnameStackToGoBack,c.pathname);o(D,{state:{pathnameStackToGoBack:G}})},onGetOtp:b=>{const D={...A.myProfileLocalData,phone:b};s(oe({localData:D})),s(bn(b,"MyProfile"))},onResendOtp:b=>{s(hn(b,"MyProfile"))},onCancelClick:()=>{s(fn())},onSaveClick:()=>{s(ie("MyProfile",A.myProfileLocalData.phone,A.myProfileLocalData.otpChallenge,A.myProfileLocalData.dateOfBirth,A.addressData?.addressToCreate))},onVerifyOtp:(b,D)=>{s(mn(b,D,"MyProfile"))},onVerifyOtpSuccess:b=>{b!=null&&x.saveZeniOtpToken(b),s(ie("MyProfile",A.myProfileLocalData.phone,A.myProfileLocalData.otpChallenge,A.myProfileLocalData.dateOfBirth,A.addressData?.addressToCreate))},updateMyProfileLocalData:b=>{s(oe({localData:b}))}})]})};function It(){const e=P(),s=h(l=>j(l)).companyId,o=h(l=>Sn(l)),c=h(l=>Ie(l)),i=x.getSignedInUser(),[n,t]=p.useState(!1),r=p.useCallback(l=>{t(l)},[]),u=p.useCallback(l=>{e(In(l))},[]),d=p.useCallback(()=>{i?.userEmail!=null&&e(yn({loggedInUserEmail:i.userEmail}))},[i?.userEmail]),g=p.useCallback(()=>{e(Cn())},[]);if(i==null)throw Error("Can't access Notification Settings page without signing in...");const f=p.useCallback(()=>{const l=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ce(l,s))},[s,c.notificationSettings.monthEndInsightsNotificationSettings.enabled]),m=p.useCallback(()=>{e(xn())},[]);return p.useEffect(()=>{if(c.fetchState==="Completed"&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"){const l=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ce(l,s))}},[o.fetchState,s,c.notificationSettings.monthEndInsightsNotificationSettings.enabled,c.fetchState]),a.jsxs(a.Fragment,{children:[a.jsx(v,{isAppContentDrawerOpen:n,handleDrawerToggle:r}),a.jsx(zn,{notificationSettingsView:o,onFormDataChange:u,onCancel:d,onSave:g,onClickMenuIcon:()=>{r(!0)},signedInUser:i,onRefresh:f,resetUpdateStatus:m})]})}function ea(e){const[s,o]=p.useState(!1),c=h(l=>Ie(l)),i=h(l=>j(l)),n=V(),t=x.getSignedInUser(),r=P(),{useFeatureGate:u}=te(),{isFeatureEnabled:d}=u(M.isDebitCardFeatureEnabled),g=t?.userEmail==null||c.fetchState!=="Completed"||En(c.notificationSettings,t.userEmail,d,i);p.useEffect(()=>{c.fetchState!=="In-Progress"&&c.fetchState!=="Completed"&&s===!1&&(o(!0),r(An()))},[c.fetchState,s]);const f=Se(d,i),m=be(i);return c.fetchState!=="In-Progress"&&c.fetchState!=="Not-Started"||g!==!0?wn(i)?a.jsxs(q,{children:[jn(n?.loggedInUserRole??[],d,i,n?.loggedInUserRoleMap)&&a.jsx(C,{path:"accounting/*",element:a.jsx(at,{})}),kn(n?.loggedInUserRole??[],d,i,n?.loggedInUserRoleMap)&&a.jsx(C,{path:"approval_rules/*",element:a.jsx(yt,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),Pn(i,n?.loggedInUserRoleMap)&&a.jsx(C,{path:"my_bank_connections",element:a.jsx(bt,{})}),vn(i,n?.loggedInUserRoleMap)&&a.jsx(C,{path:"bank_connections",element:a.jsx(lt,{})}),Dn(i,n?.loggedInUserRoleMap)&&a.jsx(C,{path:"business_verification",element:a.jsx(Qn,{productType:f?"zeni_accounts":m?"charge_cards":qn(i,n?.loggedInUserRoleMap)})}),Mn(n?.loggedInUserRole??[],i,n?.loggedInUserRoleMap)&&a.jsx(C,{path:"company_details",element:a.jsx(Yn,{})}),Un(n?.loggedInUserRole??[],i)&&a.jsx(C,{path:"billing",element:a.jsx(pt,{})}),_n(n?.loggedInUserRole??[],d,i)&&a.jsx(C,{path:"integrations",element:a.jsx(mt,{})}),a.jsx(C,{path:"my_profile/new/:addressType",element:a.jsx(le,{appContent:a.jsx(Wn,{isSubPage:!1})})}),a.jsx(C,{path:"my_profile",element:a.jsx(le,{})}),g&&a.jsx(C,{path:"notifications",element:a.jsx(It,{})}),a.jsx(C,{path:"*",element:a.jsx(T,{})})]}):a.jsx(q,{children:a.jsx(C,{path:"*",element:a.jsx(T,{})})}):null}function yt(e){return a.jsxs(q,{children:[a.jsx(C,{path:"/",element:a.jsx(it,{})}),a.jsx(C,{path:"bills/approval-rules/*",element:a.jsx(Xn,{})}),a.jsx(C,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?a.jsx(et,{}):a.jsx(T,{})}),a.jsx(C,{path:"*",element:a.jsx(T,{})})]})}export{ea as default};
|