@zeniai/web-app-ui 5.4.10-dev → 5.4.11-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/{AccountMappingScreen-BT4O8HTD.js → AccountMappingScreen-CMj3JkGt.js} +2 -2
- package/dist/assets/ActualMatchingMatchDetailScreen-Dd_vJSSr.js +1 -0
- package/dist/assets/AddressRoutes-7FdlQcLM.js +1 -0
- package/dist/assets/AddressScreen-BbgME8aO.js +9 -0
- package/dist/assets/{AiCfoScreen-RbcUBAdM.js → AiCfoScreen-CU1e2Oi8.js} +5 -5
- package/dist/assets/{AppDrawer-Sa4LLULj.js → AppDrawer-Dm9C8j__.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-BbNV-MR5.js → BillPayApprovalRoutes-GN_PKZBM.js} +1 -1
- package/dist/assets/{BillPayRoutes-uNYLvj5o.js → BillPayRoutes-7abJ7Y81.js} +8 -8
- package/dist/assets/{BusinessVerificationPageScreen-ibSIK2nI.js → BusinessVerificationPageScreen-8VbyEZWD.js} +2 -2
- package/dist/assets/CardsAiCfoScreen-BcEHiZtA.js +14 -0
- package/dist/assets/{ChargeCardRoutes-CO87Ou5-.js → ChargeCardRoutes-BR5_qY8y.js} +9 -9
- package/dist/assets/CompanyPassportScreen-L6OY8AwA.js +1 -0
- package/dist/assets/ConnectionAuthScreen-F-iZ536h.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-Gnqx1b1N.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-BynW3iC3.js → CustomerOnboardingRoutes-3OH4ZWPk.js} +3 -3
- package/dist/assets/{DashboardRoutes-ndbO6Qws.js → DashboardRoutes-X31R7cQf.js} +4 -4
- package/dist/assets/{DefaultTenantHome-2hNb0a3U.js → DefaultTenantHome-FpeIWNLr.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-BZbvzqXc.js +18 -0
- package/dist/assets/{DrawerScreen-b7QdOhuW.js → DrawerScreen-CmgVB1Zi.js} +1 -1
- package/dist/assets/EntityDetailRoutes-5IMi-E-b.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-C6_zyg5Q.js → ExpenseAutomationRoutes-DH5uN2wQ.js} +6 -6
- package/dist/assets/{FeaturePreviewScreen-B5U7lEG-.js → FeaturePreviewScreen-Cnh2Fe6t.js} +1 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-C94ZBMtd.js +1 -0
- package/dist/assets/InboxNotificationsProvider-CJt6vmnU.js +1 -0
- package/dist/assets/{InvoicingRoutes-C4zfN1Wc.js → InvoicingRoutes-Q-6aUqgu.js} +2 -2
- package/dist/assets/{MagicLinkRoutes-BDl3Flj2.js → MagicLinkRoutes-CR6ShXCQ.js} +20 -20
- package/dist/assets/MagicLinkSignInScreen-CBjgwG_1.js +12 -0
- package/dist/assets/{MobileAppDrawer-DVldqyUl.js → MobileAppDrawer-B4_Hh2uX.js} +1 -1
- package/dist/assets/NotFoundScreen-CxVO6BUm.js +1 -0
- package/dist/assets/{NotificationRoutes-UAhv091T.js → NotificationRoutes-CDa5TISi.js} +1 -1
- package/dist/assets/OAuthConsentScreen-D8WvwiVN.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-CiaozOzI.js +1 -0
- package/dist/assets/PaymentLinkScreen-BN13u2tw.js +21 -0
- package/dist/assets/PeopleRoutes-B5eZw1Xs.js +22 -0
- package/dist/assets/PerformanceRoutes-B5KqyHoS.js +1 -0
- package/dist/assets/{Preview-CU7aguP4.js → Preview-gj_-pUjR.js} +1 -1
- package/dist/assets/QBOConnectionScreen-BD6w4pxT.js +101 -0
- package/dist/assets/{ReimbursementApprovalRoutes-DrsMWkl8.js → ReimbursementApprovalRoutes-_wQ1m-SZ.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Dw7QQEoQ.js → ReimbursementApprovalRuleDetailScreen-CQJ7WhRf.js} +1 -1
- package/dist/assets/ReimbursementRoutes-mHGAbMEo.js +68 -0
- package/dist/assets/{ReportsRoutes-B5lACyrL.js → ReportsRoutes-DNdr9gVu.js} +1 -1
- package/dist/assets/RewardsRoutes-CRQaDmuu.js +1 -0
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-LwZh192V.js → ScheduleDetailsPrepaidExpensesScreen-Bgrqk-Br.js} +5 -5
- package/dist/assets/ScreenRoutes-Cix6ynkH.js +2 -0
- package/dist/assets/{SettingsRoutes-DEHUtOgG.js → SettingsRoutes-CXzUd0P6.js} +6 -6
- package/dist/assets/{SetupPagesScreen-Dv6lGRG5.js → SetupPagesScreen-DzLiX5R5.js} +5 -5
- package/dist/assets/SignInScreen-VX0iUVME.js +1 -0
- package/dist/assets/SignOutScreen-BXVxv4o-.js +9 -0
- package/dist/assets/{TaskListScreen-8hq6cEbk.js → TaskListScreen-Dv5TjArL.js} +2 -2
- package/dist/assets/TaskRoutes-aDI7RZCK.js +9 -0
- package/dist/assets/TransactionDetailRoutes-C0gGgGik.js +1 -0
- package/dist/assets/{TransactionDetailScreen-It6ORIbN.js → TransactionDetailScreen-BsGN3Yd5.js} +2 -2
- package/dist/assets/{TransactionListRoutes-BTjkHFVX.js → TransactionListRoutes-_bc9UoMG.js} +1 -1
- package/dist/assets/{TreasuryRoutes-Bys8F57E.js → TreasuryRoutes-C7ABXX2A.js} +6 -6
- package/dist/assets/{VendorsRoutes-abjQ1HGQ.js → VendorsRoutes-BlorNbi4.js} +11 -11
- package/dist/assets/WiseConfirmationScreen-DhPTIeWc.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-DlvpS2Bq.js → ZeniAccountRoutes-QObrERl4.js} +11 -11
- package/dist/assets/ZeniAccountStatementScreen-BHlw6cTG.js +9 -0
- package/dist/assets/{accountMappingHelper-C9fFA6EC.js → accountMappingHelper-BbISzw1n.js} +1 -1
- package/dist/assets/{analytics-C3OBHjEG.js → analytics-C4ICDJLl.js} +1 -1
- package/dist/assets/{analyticsHelper-exrV7AE9.js → analyticsHelper-CPHVprda.js} +1 -1
- package/dist/assets/{core-o-ca34AJ.js → core-C4Vfz6Ll.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-CdLVPaCS.js → decodeURIComponentSafe-CYsmEPcV.js} +1 -1
- package/dist/assets/{dnd-sqKp8sUm.js → dnd-kAQqqaX2.js} +1 -1
- package/dist/assets/{empty-CynSKeaU.js → empty-asCy4wrm.js} +1 -1
- package/dist/assets/{empty-BnmFWJHQ.js → empty-uRyODf4S.js} +1 -1
- package/dist/assets/{emptyVideoElement-BUTaximG.js → emptyVideoElement-79iYt27c.js} +1 -1
- package/dist/assets/epic-B2pHLhBD.js +2 -0
- package/dist/assets/expenseAutomationHelper-hmRJBbGd.js +1 -0
- package/dist/assets/{getLocaleForTenant-CBmE-ohA.js → getLocaleForTenant-DJIJUZ-c.js} +1 -1
- package/dist/assets/{index-BLrePuqf.js → index-BTd7WWV0.js} +1 -1
- package/dist/assets/{index-Btt0Zihe.js → index-B_kv_EmZ.js} +1 -1
- package/dist/assets/{index-Bqod5kmp.js → index-Bg8f4cim.js} +1 -1
- package/dist/assets/{index-Bx2gJO4r.js → index-CJ_pjNEa.js} +7 -7
- package/dist/assets/{index-j2p4Lnj3.js → index-Doknm_HP.js} +1 -1
- package/dist/assets/index-E3novWwq.js +1 -0
- package/dist/assets/{index-D4vHXZ_y.js → index-UMoTq5JU.js} +2 -2
- package/dist/assets/index-pA4BduR_.js +1 -0
- package/dist/assets/{lexical-CEO4_NFb.js → lexical-SeD-pdYj.js} +1 -1
- package/dist/assets/liveblocks-DZUXZ-JO.js +59 -0
- package/dist/assets/{lottie-Dl8uwTmw.js → lottie-txhqSe8x.js} +1 -1
- package/dist/assets/{mui-cK5UWUvi.js → mui-C0PYnbt1.js} +1 -1
- package/dist/assets/{pathToGoBack-Bk8jMuE9.js → pathToGoBack-DF1y-0ht.js} +1 -1
- package/dist/assets/{pdf-BNJo5ucI.js → pdf-bOGTjHnz.js} +5 -5
- package/dist/assets/{pdf-lib-C69QvBGc.js → pdf-lib-BsfRp21l.js} +1 -1
- package/dist/assets/{plaid-C8bTkbCG.js → plaid-hQES7k9Y.js} +1 -1
- package/dist/assets/{pusher-C6PXikRK.js → pusher-BoH5mrch.js} +1 -1
- package/dist/assets/{react-BgHw6ZMD.js → react-BQ6jUfzX.js} +1 -1
- package/dist/assets/{react-BCP4YdKf.js → react-BgJrrMxk.js} +1 -1
- package/dist/assets/{react-BfzBm-jN.js → react-Boil267a.js} +1 -1
- package/dist/assets/{react-CTNewL67.js → react-DXSBT-1v.js} +1 -1
- package/dist/assets/{react-UiIuY6Fo.js → react-ZM05SSz2.js} +1 -1
- package/dist/assets/{react-ixvlVzZ9.js → react-qLaRPrw4.js} +1 -1
- package/dist/assets/{recharts-DK1tbN_A.js → recharts-rN5v_P87.js} +1 -1
- package/dist/assets/{reportTimeframe-6FnDbaGY.js → reportTimeframe-C5AD1AL2.js} +1 -1
- package/dist/assets/{routePaths-DBf4ybcn.js → routePaths-DYebh4Li.js} +1 -1
- package/dist/assets/{sentry-Buwow292.js → sentry-DfoGRlTp.js} +1 -1
- package/dist/assets/{stripSplatSuffix-BKbpznmZ.js → stripSplatSuffix-Db8ayksN.js} +1 -1
- package/dist/assets/{url-B_oojQRK.js → url-B-JScRaX.js} +1 -1
- package/dist/assets/{url-C7oPARVv.js → url-BtS-4pap.js} +1 -1
- package/dist/assets/{useActualMatchingMatchDetail-DBoUtV2d.js → useActualMatchingMatchDetail-DPtaMcdm.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-D_VhexUa.js → useAiCfoDashboardSuggestedQuestionsChips-D2InIpSO.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-k11tYjVi.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-B6OwhCNo.js → useChargeCardPusherEvents-Bf7Vv0PE.js} +1 -1
- package/dist/assets/{useDeviceId-CeB6LWI8.js → useDeviceId-_3Ay4Sah.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-BCLtP2Ad.js +1 -0
- package/dist/assets/useEnsureVendorListLoaded-Bud-c91I.js +1 -0
- package/dist/assets/{useInitialThreadRequest-C3w5IRp7.js → useInitialThreadRequest-BVMcY486.js} +1 -1
- package/dist/assets/useTaskManagerAccess-Cp8R2Cu9.js +1 -0
- package/dist/assets/{useTaskManagerPusherEvents-LOx5aVW8.js → useTaskManagerPusherEvents-p1TIydvw.js} +1 -1
- package/dist/assets/utils-CmKqkYr5.js +36 -0
- package/dist/assets/{withTransactionSidePanel-CVCleugc.js → withTransactionSidePanel-btBdqPWA.js} +5 -5
- package/dist/assets/{zeni-epic-state-MQ0qdl-Q.js → zeni-epic-state-DmXGRK_Y.js} +4 -4
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/ActualMatchingMatchDetailScreen-Ce_XDU4u.js +0 -1
- package/dist/assets/AddressRoutes-BQEPn0Yr.js +0 -1
- package/dist/assets/AddressScreen-D2FVWJY-.js +0 -9
- package/dist/assets/CardsAiCfoScreen-CkEc2DEo.js +0 -14
- package/dist/assets/CompanyPassportScreen-DJeoMdCg.js +0 -1
- package/dist/assets/ConnectionAuthScreen-Bf2Ucb1Q.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-D3RbfqTk.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-BqDioG6P.js +0 -18
- package/dist/assets/EntityDetailRoutes-aGFvyTv5.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-Dr1Xep8u.js +0 -1
- package/dist/assets/InboxNotificationsProvider-Cph6MP0g.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-Bie6nkkJ.js +0 -12
- package/dist/assets/NotFoundScreen-BXfz4Cwt.js +0 -1
- package/dist/assets/OAuthConsentScreen-yv2un5zc.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-DZO_Ak_R.js +0 -1
- package/dist/assets/PaymentLinkScreen-DgjQbdJS.js +0 -21
- package/dist/assets/PeopleRoutes-CBBW0nYr.js +0 -22
- package/dist/assets/PerformanceRoutes-CIoRY1pR.js +0 -1
- package/dist/assets/QBOConnectionScreen-CI47ZrlS.js +0 -100
- package/dist/assets/ReimbursementRoutes-BiacT-VJ.js +0 -68
- package/dist/assets/RewardsRoutes-26PBDRkk.js +0 -1
- package/dist/assets/ScreenRoutes-CdEeBqiV.js +0 -2
- package/dist/assets/SignInScreen-CzvdRg4U.js +0 -1
- package/dist/assets/SignOutScreen-DfTRMdjb.js +0 -9
- package/dist/assets/TaskRoutes-C1KzEFV7.js +0 -9
- package/dist/assets/TransactionDetailRoutes-BB45JvGj.js +0 -1
- package/dist/assets/WiseConfirmationScreen-DewxnFTy.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-DVR6RIK2.js +0 -9
- package/dist/assets/epic-bBvrG0DE.js +0 -2
- package/dist/assets/expenseAutomationHelper-8n6GRk1T.js +0 -1
- package/dist/assets/index-BzW-Y7Lk.js +0 -1
- package/dist/assets/index-Cmb8jqqj.js +0 -1
- package/dist/assets/liveblocks-BdMPZzDQ.js +0 -59
- package/dist/assets/useAskAiCfoHostNavButtonProps-B6lOnQ69.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-t37-D3lN.js +0 -1
- package/dist/assets/useEnsureVendorListLoaded-BmranjK0.js +0 -1
- package/dist/assets/useTaskManagerAccess-By_NjZen.js +0 -1
- package/dist/assets/utils-D4KfE2cr.js +0 -36
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BdMPZzDQ.js";import{u as ae,j as v,h as Q,g as K,i as ie,N,l as ee,q as lt,n as mt,o as x}from"./core-o-ca34AJ.js";import{fI as H,Oe as ct,$W as ge,ca as he,Nk as Ue,me as dt,Nz as ce,Ny as de,$X as ut,bn as fe,gZ as Le,$Y as pt,XG as bt,m3 as $e,XH as Ae,XI as gt,kR as ht,ZX as ft,l4 as St,N8 as It,CE as yt,kY as Rt,NV as Ne,$Z as Pe,$_ as Ce,$$ as kt,a00 as vt,a01 as At,NF as we,la as Ct,_4 as wt,Nx as Et,Ni as xt,a02 as Bt,Nh as Tt,a03 as Dt,Np as Ee,NJ as jt,NI as Ft,NE as Ut,a04 as _e,T3 as Lt,bo as $t,Ns as Nt,Ob as Pt,a05 as _t,a06 as Mt,NR as Ot,NO as xe,Zr as zt,Nf as Zt,a07 as Me,OE as Be,OM as Gt,a08 as Vt,a09 as q,a0a as Ht,a0b as Oe,a0c as Wt,a0d as ze,a0e as Ze,O1 as ue,bv as Xt,bM as Se,cO as Ie,e1 as Ge,e0 as Ve,a0f as qt,gk as Jt,ZE as Kt,a0g as Yt,a0h as He,ZI as Qt,_r as en,a0i as tn,_Q as nn,OJ as Te,OI as an,a0j as sn,a0k as on,a0l as rn,a0m as ln,a0n as mn,_a as cn,Oz as dn,OD as un,bq as pn,bL as bn,cI as gn,cw as hn,bu as fn,V3 as Sn,dc as In,df as yn,de as Rn,cH as kn}from"./zeni-epic-state-MQ0qdl-Q.js";import{bV as vn,g as We,a0 as Xe,p as oe,c as U,z as L,cT as qe,a7 as re,m as E,aR as De,K as j,ad as se,ae as An,G as Je,cU as Cn,n as J,ar as Ke,cV as wn,V as le,cW as En,ap as xn,aa as Bn,a6 as ye,S as Ye,w as Tn,bD as Dn,au as jn,ah as Fn,cX as Un,j as Ln}from"./index-Bx2gJO4r.js";import{n as P,S as $n,u as Qe}from"./mui-cK5UWUvi.js";import pe from"./NotFoundScreen-BXfz4Cwt.js";import{S as je}from"./SetupPagesScreen-Dv6lGRG5.js";import{F as et}from"./FeaturePreviewScreen-B5U7lEG-.js";import{a as g}from"./sentry-Buwow292.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-B6lOnQ69.js";import{u as tt}from"./useInitialThreadRequest-C3w5IRp7.js";import{D as Nn}from"./DrawerScreen-b7QdOhuW.js";import{M as nt}from"./MobileAppDrawer-DVldqyUl.js";import{F as Pn}from"./ScreenRoutes-CdEeBqiV.js";import{R as _n}from"./ReimbursementApprovalRoutes-DrsMWkl8.js";import"./recharts-DK1tbN_A.js";import"./analytics-C3OBHjEG.js";import"./plaid-C8bTkbCG.js";import"./dnd-sqKp8sUm.js";import"./stripe-cKAAJElX.js";import"./lottie-Dl8uwTmw.js";import"./lexical-CEO4_NFb.js";import"./pdf-BNJo5ucI.js";import"./utils-D4KfE2cr.js";import"./BusinessVerificationPageScreen-ibSIK2nI.js";import"./routePaths-DBf4ybcn.js";import"./analyticsHelper-exrV7AE9.js";import"./InboxNotificationsProvider-Cph6MP0g.js";import"./useTaskManagerAccess-By_NjZen.js";import"./getLocaleForTenant-CBmE-ohA.js";import"./useEnsureVendorListLoaded-BmranjK0.js";import"./ReimbursementApprovalRuleDetailScreen-Dw7QQEoQ.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]="889371fc-3512-4aa6-a1fd-d8ef83438e87",e._sentryDebugIdIdentifier="sentry-dbid-889371fc-3512-4aa6-a1fd-d8ef83438e87")}catch{}})();const at=e=>`/${e}/reimbursements`,Mn=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:X,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Je.getLocalizedStrings(),On=ee((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),m=L.getSignedInUser(),c=fe(m),d=r.plaidConnectionDetails,i=Le(e.companyState,n),a=e.tenantState.currentTenantId,o={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),p=pt(e,m?.userId??"");let I=`${m?.firstName} ${m?.lastName}`,u=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=m?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,y=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:y},authParams:o,defaultCurrency:{currencySymbol:i?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:i?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:i?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:d,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:E,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:$e(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:m,navigate:c,themeState:d}=t,{tenantEmailDomain:i}=r,a=L.getSignedInUser();return{onReceiptsUpload:(o,l,p)=>{o!=null&&e(de(o,l,p,n,a?.userId))},onExistingMerchantChange:(o,l)=>{e(Ee(!1,l,n,o,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ut(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Ft())},clearRemiSaveStatus:()=>{e(jt("Not-Started",n))},onDuplicateLineClick:(o,l)=>window.open(`/${i}/reimbursement/${o}#L${l}`),onNewMerchantChange:(o,l)=>{e(Ee(!1,l,n,void 0,o))},removeFileFromLine:o=>{e(Dt({lineId:o,reimbursementId:n}))},onAmountChanged:(o,l)=>{e(Tt(l,o,n))},updateReimbursementType:(o,l,p)=>{e(Bt({reimbursementId:p,lineId:l,reimbursementType:o}))},onHomeCurrencyConversionUpdate:(o,l,p)=>{e(xt({reimbursementId:p,lineId:l,amountPayload:{amount:o.amount,currency_code:o.currencyCode,currency_symbol:o.currencySymbol}}))},onReimbursementDetailsChanged:o=>{e(Et({remiDetailLocalData:o,reimbursementId:n}))},saveRemiDetails:o=>{e(we(o,!1,n))},onUserBankDetailsUpdated:o=>{const{bankAccountSection:l}=o;e(wt({data:l}))},onFetchBankName:o=>{e(Ct(o))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:o=>{e(Ce({reimbursementId:o}))},updateInvoiceUploadFetchState:o=>{e(ce({reimbursementId:n,fetchState:o}))},clearTentativeNameForLine:o=>{e(At({reimbursementId:n,lineId:o}))},removeDuplicateReimbursementForLine:o=>{e(vt({lineId:o}))},onZeniLogoClick:()=>{d.toggle()},clearAddRemiAutoFields:o=>{e(kt({reimbursementId:n,lineId:o}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ce({}));const o=at(i),l=J(m.state?.pathnameStackToGoBack,m.pathname);c(o,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(E.trackReimbursementDeleteReimbursement(n),e(Ne(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:o=>{e(yt("user_reimbursement_account",o))},onEstablishConnectionClick:o=>{e(It(o,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:o=>{e(St(o,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,l)=>{o.trim().length>=2?e(gt({searchString:o,entityType:l,searchOrigin:"common"})):e(Ae("common"))},onCancelAutoComplete:()=>{e(Ae("common"))}}}}))(Cn);function Fe(){const e=Q(),t=ae(),n=K(),{reimbursementId:r}=ie(),m=We(),c=Xe(),d=g.useRef(!1),[i,a]=g.useState(r==null),[o,l]=g.useState(1),{useFeatureGate:p}=oe(),{isFeatureEnabled:I}=p(U.isLimitedCategoryForReimbursement),{isFeatureEnabled:u}=p(U.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:y}=Re({mobileExploreReferrer:"Reimbursement Details"}),B=K().pathname,D=B.includes("edit"),A=B.includes("reimbursement/new"),[C,R]=g.useState(!1),S=L.getSignedInUser(),w=v((b=>H(b))),h=v((b=>ge(b,r))),$=tt(w?.companyId,{clearParams:h.fetchState==="Completed"}),F=he(w?.userRole??[]);(function(){const b=ae(),M=v((Y=>H(Y))),O=M?.tenantId,{isApprovalRulesV3Enabled:z,isLoading:W}=vn(O),Z=v((Y=>Y.remiSetupApproverViewState.fetchState));g.useEffect((()=>{O==null||W||Z==="Not-Started"&&b(ct(!0,!1,!1,z))}),[O,W,z,Z,b])})(),g.useEffect((()=>{(A&&!C||D&&!C&&h.fetchState!="Completed"&&h.fetchState!="In-Progress")&&(R(!0),t(Ue(!1,I,u,r)))}));const k=v((b=>dt(b.accountState,b.accountListState,"reimbursementAccountList")));if(S==null)throw Error("Can't access address page without signing in...");const _={pathname:`../${r}`,search:n.search};return h.fetchState==="Completed"&&(d.current=!0),h.isDeleted===!0||h.billStage=="paid"||h.billStage=="scheduled"||d.current===!1&&h.fetchState==="Not-Started"||F&&h.billStatus==="rejected"||F===!1&&h.billStage==="pending_approval"&&h.billStatus!=="rejected"?s.jsx(N,{to:_}):d.current!==!1||h.deleteStatus.fetchState!=="In-Progress"&&h.fetchState==="Completed"?s.jsxs(zn,{windowSize:c,children:[s.jsx(re,{analytics:E,onLoad:b=>(M=>{r!=null&&h.deleteStatus.fetchState!=="Completed"&&M.trackReimbursementEditReimbursement(r)})(b)}),i&&c!=="small"?s.jsx(Zn,{}):null,i&&c!=="small"?s.jsx(Gn,{children:s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:X.upload,single:ne.dropReceipt.single,or:X.texts.or,multiple:ne.dropReceipt.multiple,receipts:X.texts.receipts2}})}):null,i&&c==="small"?s.jsxs(Vn,{children:[s.jsx(Hn,{onClick:()=>a(!1),children:s.jsx(Mn,{})}),s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:X.upload,single:ne.dropReceipt.single,or:X.texts.or,multiple:ne.dropReceipt.multiple,receipts:X.texts.receipts2}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:$??void 0,location:n,navigate:e,currentTenant:w,reimbursementId:r,themeState:m,uncategorizedAccounts:k,disableInternalOverlay:!0,showSkipAutoFill:i,setShowSkipAutoFill:a,onCurrentLineIdForUploadChange:l,isAiCfoAccessEnabled:T,onAskAiCfoClick:y})})]}):s.jsx(qe,{isNewReimbursement:r==null})}const zn=P.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
position: relative;
|
|
4
|
-
height: 100vh;
|
|
5
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
6
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
7
|
-
`,Zn=P.div`
|
|
8
|
-
position: fixed;
|
|
9
|
-
top: 0;
|
|
10
|
-
left: 0;
|
|
11
|
-
right: 0;
|
|
12
|
-
bottom: 0;
|
|
13
|
-
background-color: ${An.overlayBackgroundBlack};
|
|
14
|
-
z-index: 5;
|
|
15
|
-
`,Gn=P.div`
|
|
16
|
-
position: absolute;
|
|
17
|
-
top: 0;
|
|
18
|
-
left: 0;
|
|
19
|
-
width: 42%;
|
|
20
|
-
height: 100%;
|
|
21
|
-
z-index: 6;
|
|
22
|
-
display: flex;
|
|
23
|
-
background-color: transparent;
|
|
24
|
-
overflow: hidden;
|
|
25
|
-
`,Vn=P.div`
|
|
26
|
-
position: fixed;
|
|
27
|
-
top: 0;
|
|
28
|
-
left: 0;
|
|
29
|
-
right: 0;
|
|
30
|
-
bottom: 0;
|
|
31
|
-
z-index: 11;
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
overflow-y: auto;
|
|
35
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
-
`,Hn=P.button`
|
|
37
|
-
align-self: flex-end;
|
|
38
|
-
background: none;
|
|
39
|
-
border: none;
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
padding: ${j.sp2} ${j.sp3};
|
|
42
|
-
line-height: 1;
|
|
43
|
-
color: ${e=>e.theme.colors.hero};
|
|
44
|
-
&:hover {
|
|
45
|
-
color: ${e=>e.theme.colors.primary};
|
|
46
|
-
}
|
|
47
|
-
svg {
|
|
48
|
-
width: ${j.sp4};
|
|
49
|
-
height: ${j.sp4};
|
|
50
|
-
}
|
|
51
|
-
`,Wn=P.div`
|
|
52
|
-
display: flex;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
width: 100%;
|
|
55
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
56
|
-
`,Xn=ee((function(e,t){const n=_e(e,t.reimbursementId),r=L.getSignedInUser(),m=fe(r),c=e.tenantState.currentTenantId,d={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c??""},i=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=_t(n.remiActivities,Mt(t.currentTenant),r));const o=he(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:d,signedInUser:r,createdBy:i,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:o,showApproveRejectBtns:a,isZeniUser:m,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:$e(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:m,navigate:c,themeState:d}=t,{tenantEmailDomain:i}=r;return{onDuplicateLineClick:(a,o)=>window.open(`/${i}/reimbursement/${a}#L${o}`),redirectToReimbursementListScreen:()=>{e(Pe());const a=at(i),o=J(m.state?.pathnameStackToGoBack,m.pathname);c(a,{state:{pathnameStackToGoBack:o}})},onSaveRealTimeApprovals:a=>{e(Zt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(zt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(xe(n,a.type,"")):e(xe(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=J(m.state?.pathnameStackToGoBack,m.pathname);c("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{E.trackReimbursementDeleteReimbursement(n),e(Ne(n))},cancelAndDeleteReport:a=>{a===!0?E.trackReimbursementCancelAndDeleteReimbursement(n):E.trackReimbursementCancelReimbursement(n),e(Ot(n,a))},handleZeniLogoClick:()=>{d.toggle()}}}))(wn);function qn(){const e=Q(),t=ae(),n=K(),r=n.hash.substring(1),m=We(),{reimbursementId:c}=ie(),d=L.getSignedInUser(),i=v((k=>H(k))),a=v((k=>_e(k,c??""))),o=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=tt(i?.companyId,{clearParams:a.fetchState==="Completed"&&!o}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:I}=Re({mobileExploreReferrer:"Reimbursement Details"});Ke({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:u}=oe(),{isFeatureEnabled:T}=u(U.isLimitedCategoryForReimbursement),[y,B]=g.useState(!1),[D,A]=g.useState(!1),[C,R]=g.useState(!1),{isFeatureEnabled:S}=u(U.isShowDeletedReimbursementsFeatureEnabled),w=v((k=>ge(k,c??""))),h=Lt(i),$=$t(i.userRole),F=a.fetchState;if(g.useEffect((()=>{y||c==null?y==1&&F==="Error"&&e("page-not-found",{replace:!0}):(B(!0),t(Nt(c,!1,S)))}),[y,c,t,F]),g.useEffect((()=>{S&&a.remiDetails?.isDeleted===!0||i.isZeni===!0&&d?.userEmailDomain==="zeni.ai"&&h===!1?R(!1):R(a.remiActivities[0]?.isRealTimeApprovalEnabled&&($||a.allApprovers.find((k=>k.user.userId===d?.userId))!=null||a.remiDetails?.lastUpdatedBy===d?.userId))}),[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,$,i.isZeni,h,d]),g.useEffect((()=>{D||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||w.fetchState=="Completed"||w.fetchState=="In-Progress"||(A(!0),t(Ue(!1,T,S,c)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(Pt(!1,!0,!0,a.lastUpdatedByUserId)))}),[D,a,c,t]),d==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&w.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx(N,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&w.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(qe,{}):s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:E,onLoad:k=>(_=>{c!=null&&_.trackReimbursementReimbursementDetails(c)})(k)}),s.jsx(Xn,{initialOpenThreadRequest:l??void 0,scrollId:r,isShowDeletedReimbursementEnabled:S,location:n,navigate:e,isRealTimeApprovalEnabled:C,currentTenant:i,reimbursementId:c??"",themeState:m,isAiCfoAccessEnabled:p,onAskAiCfoClick:I})]})}const Jn=ee((function(e,t){return{remisReviewView:Me(e),analytics:t.analytics}}),(function(e,t){return{onCloseOverlay:()=>{t.navigate(`/${t.tenantEmailDomain}/reimbursements`),e(q())},onCloseReviewItem:n=>{e(Vt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Gt());break;case"approve":e(Be("approved",r??""));break;case"reject":e(Be("rejected",r??""))}}}}))(En);function Kn({tenantEmailDomain:e}){const t=Q(),n=v((d=>d.remisBulkActionViewState.bulkSubmissionFetchState.fetchState)),{remisForReview:r}=v((d=>Me(d))),m=le(),c=m?.loggedInUserRole?.includes("admin")===!0;return g.useEffect((()=>{n!=="Completed"&&r.length!==0||t(`/${e}/reimbursements`)}),[n,r.length,e]),s.jsx(Jn,{navigate:t,analytics:E,isAdmin:c,tenantEmailDomain:e})}const V=Qt(),st="bulk-operation-update",be="reimbursement-approval-rule-update",{spendManagement:Yn,common:me}=Je.getLocalizedStrings(),Qn=Yn.reimbursement.bulkActions,ea=P.div`
|
|
57
|
-
display: flex;
|
|
58
|
-
min-height: 100%;
|
|
59
|
-
width: 100%;
|
|
60
|
-
flex: 1 1 auto;
|
|
61
|
-
flex-direction: column;
|
|
62
|
-
align-items: center;
|
|
63
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
64
|
-
`,ta=ee((function(e,t){const n=Ze(e,V,t.isBulkActionEnabled);let r=n.allSubTabs;const m=L.getSignedInUser(),c=fe(m),d=e.tenantState.currentTenantId,i=H(e),a=i?.companyName??"",o={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:d??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter((u=>u!=="deleted")));const p=n.fetchState,I=en(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter((u=>u.isDeleted===!1)),isAdmin:t.isAdmin,isZeniUser:c,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:p,botEmail:n.reimbursementBotEmail,analytics:E,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:o,companyName:a,timePeriod:V,spendManagementEndPoint:`${jn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:I.affectedEntityIds}}),(function(e,t){const{navigate:n,currentTenant:r,location:m,period:c}=t,{tenantEmailDomain:d}=r;return{updateTabToState:i=>{e(q()),e(Oe(i))},onSubtabChange:i=>{e(q()),e(ze(i))},onTransactionClick:(i,a)=>{const o=sa(d,i,a),l=J(m.state?.pathnameStackToGoBack,m.pathname);n(o,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const i=aa(d),a=J(m.state?.pathnameStackToGoBack,m.pathname);n(i,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:i}=t.currentTenant;E?.trackReimbursementNewReimbursement();const a=`/${i}/reimbursement/new`,o=J(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:o}})},onColumnSortConfigChanged:(i,a)=>{e(mn({uiState:{sortKey:i,sortOrder:a},period:t.period}))},onSearchTextChanged:i=>{e(ln(i))},onFiltersChange:i=>{e(rn({filters:i})),i.categories.every((a=>a.field!=null&&a.values?.length!==0))&&E.trackSpendManagmentFilterChange("reimbursement",i.categories.map((a=>`${a.field}-${JSON.stringify(a.values)}`)))},updateDownloadStateHandler:i=>{i==="In-Progress"&&E.trackSpendManagementDownloadClick("reimbursement"),e(on({uiState:{downloadState:i}}))},onReloadTransactions:()=>{e(ue(c,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:i=>{e(sn(i))},removeAllTransactionsFromBulkActionList:()=>{e(q())},onProceedForBulkActionClick:(i,a)=>{switch(i){case"delete":case"cancel":e(an(i,a??""));break;case"send_for_approval":e(Te("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(Te("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:i=>{i.endsWith(be)&&e(nn(!1))},onEventReceived:i=>{i===st&&e(tn())}}}))(Tn(Dn));function na(){const e=Q(),t=ae(),n=K(),r=n.state,m=Xe(),[c,d]=g.useState(null),i=lt("/:tenantEmailDomain/reimbursements/bulk-review")!=null;g.useEffect((()=>{if(r?.tab!=null&&r?.subTab!=null){const f=Ht(r.tab.toString());f!=null?t(Oe(f)):console.log("Warning:Not a valid remiListTab");const G=Wt(r.subTab.toString());G!=null?t(ze(G)):console.log("Warning:Not a valid remiListSubTab")}return()=>{t(q())}}),[]);const{useFeatureGate:a}=oe(),{isFeatureEnabled:o}=a(U.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:l}=a(U.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:p}=a(U.isReimbursementBulkActionEnabled),I=L.getSignedInUser(),u=v((f=>H(f))),[T,y]=g.useState(!1),[B,D]=g.useState(!1),A=le(),C=A?.loggedInUserRole?.includes("admin")===!0,R=v((f=>Ze(f,V,p))),{areTenantIdsInSync:S}=xn(),w=R.fetchState,{isAiCfoAccessEnabled:h,onAskAiCfoClick:$}=Re({mobileExploreReferrer:"Reimbursement List"});if(Ke({isDataReady:w==="Completed"}),g.useEffect((()=>{!B&&S&&(D(!0),t(ue(V,!0,l,!1,!0)))}),[B,V,t,S]),I==null)throw Error("Can't access address page without signing in...");const F=!!u?.userRole&&Xt(u),k=Se(A?.loggedInUserRoleMap),_=Ie(A?.loggedInUserRoleMap),b=!!u.userReimbursementInfo?.isReimbursementTOSAccepted,M=!!u.companyReimbursementInfo?.info?.isReimbursementEnabled,O=!!u.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,z=v((f=>Le(f.companyState,u.companyId))),W=z?.company.featuresActivationInfo.connectedAccountProvider,Z=f=>{y(f)},{isFeatureEnabled:Y}=a(U.isDebitCardFeatureEnabled),it=Ge(Y,u),ot=Ve(u),{remisProcessed:te,remisProcessing:ke}=v((f=>qt(f)));g.useEffect((()=>{te===ke&&c!=null&&(t(Jt({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:te>1?me.texts.reports2:Qn.report},{variableName:"_has_",variableValue:te>1?me.texts.have:me.texts.has},{variableName:"_action_",variableValue:Kt(c)}]})),t(Yt()),setTimeout((()=>{t(ue(V,!0,l,!1,!0,!0))}),3e3),d(null))}),[te,ke]);const rt={events:u.companyId!=null?[`private-encrypted-${u.companyId}.${st}`,`private-encrypted-${u.companyId}.${be}`]:[],eventCallback:(f,G,ve)=>{f.endsWith(be)?ve.onReimbursementApprovalRulesEventReceived?.(f):G.entity_type==="reimbursement"&&(d(G.operation_type),ve.onEventReceived(f))}};return n.pathname.endsWith("/reimbursements/")||n.pathname.endsWith("/reimbursements")||n.pathname.endsWith("/reimbursements/bulk-review")?it===!0||ot===!0?s.jsx(et,{}):M&&(!F||k)||_&&b?s.jsxs(s.Fragment,{children:[w==="Completed"?s.jsx(re,{analytics:E,onLoad:f=>(G=>G.trackPageLoaded(Ye.Event.reimbursementHome))(f)}):null,s.jsx(nt,{isAppContentDrawerOpen:T,handleDrawerToggle:Z}),s.jsxs(ea,{windowSize:m,children:[s.jsx(Nn,{isOpen:i,drawerLeftMargin:new Bn(0,0,300,600),onClose:()=>{e(`/${u.tenantEmailDomain}/reimbursements`),t(q())},children:s.jsx(ia,{onClick:f=>f.stopPropagation(),children:s.jsx(Kn,{tenantEmailDomain:u.tenantEmailDomain})})}),s.jsx(ta,{isShowDeletedBillsEnabled:o,isShowDeletedReimbursementEnabled:l,location:n,navigate:e,currentTenant:u,period:V,isAdmin:C,isEmployee:F,entity:"reimbursement",onClickMenuIcon:()=>{Z(!0)},createdByUserList:R.createdByUserList,createdByUserListFetchState:R.createdByUserListFetchState,isDownloadEnabled:R.isDownloadEnabled,connectedAccountProvider:W,isBulkActionEnabled:p,bulkSubmissionLimit:R.remiBulkSubmissionLimit,bulkSubmissionFetchState:R.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:h,onAskAiCfoClick:$,...rt})]})]}):O&&k?s.jsx(N,{to:"../setup"}):A!=null&&He(u,A.loggedInUserRoleMap)?s.jsx(N,{to:"../promo"}):s.jsx(ye,{fetchState:"In-Progress"}):s.jsx(pe,{})}const aa=e=>`/${e}/reimbursements/setup`,sa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},ia=P($n)`
|
|
65
|
-
display: flex;
|
|
66
|
-
min-height: 100%;
|
|
67
|
-
flex-direction: column;
|
|
68
|
-
`,oa=ee((function(e,t){const{companyId:n}=t;return{reimbursementSetupView:cn(e,n),analytics:E,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(un(n))},onCreateNewRemiButtonClick:()=>{e(dn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}}))(Un),ra=()=>{const e=Fn(),t=Q(),n=K(),{tenantEmailDomain:r}=ie(),m=Qe(),[c,d]=g.useState(!1),i=v((C=>H(C))),a=L.getSignedInUserTenant(r)?.companyId??i.companyId,o=L.getSignedInUser(),l=i.userRoleId,p=!!i.userRole?.includes("reimbursements_user"),I=le(),u=Se(I?.loggedInUserRoleMap),T=Ie(I?.loggedInUserRoleMap),y=!!i.userReimbursementInfo?.isReimbursementTOSAccepted,B=!!i.companyReimbursementInfo?.info?.isReimbursementEnabled,D=!!i.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,A=C=>{d(C)};if(o==null)throw Error("Can't access reimbursement promo page without signing in...");return B&&T&&y?s.jsx(N,{to:"../../../reimbursements"}):D&&u?s.jsx(N,{to:"../../reimbursements/setup"}):i.companyReimbursementInfo&&!D||i.userReimbursementInfo&&T&&y===!1?s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:E,onLoad:C=>(R=>R.trackPageLoaded(Ye.Event.reimbursementPromoPage))(C)}),s.jsx(nt,{isAppContentDrawerOpen:c,handleDrawerToggle:A}),s.jsx(oa,{companyId:a,navigate:t,meetingUrl:e("reimbursement_promo"),location:n,userReimbursementInfo:i.userReimbursementInfo,userRoleId:l,isEmployee:p,onClickMenuIcon:()=>{A(!0)}})]}):s.jsx(ye,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})};function Ma(){const e=v((Z=>H(Z))),t=le(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=Qe(),m=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,c=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:d}=oe(),{isFeatureEnabled:i}=d(U.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=d(U.isDebitCardFeatureEnabled),o=Ge(a,e),l=Ve(e),p=e?.userRole!=null&&pn(e?.userRole),I=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!p)&&bn(t?.loggedInUserRoleMap),u=gn(t?.loggedInUserRoleMap),T=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!p,y=Se(t?.loggedInUserRoleMap),B=T&&y,D=!!e.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!p,A=D&&hn(t?.loggedInUserRoleMap),C=Ln(e,i,a)&&!p,R=C&&fn(t?.loggedInUserRoleMap),S=Sn(t?.loggedInUserRoleMap),w=In(t?.loggedInUserRoleMap),h=yn(t?.loggedInUserRoleMap),$=D&&w,F=e.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!p&&h,k=Rn(t?.loggedInUserRoleMap),_=kn(t?.loggedInUserRoleMap),b=Ie(t?.loggedInUserRoleMap),M=C&&k,{tenantEmailDomain:O}=ie(),z=K(),W=n===!0&&(y||b&&c);return s.jsxs(mt,{children:[z.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(x,{path:"verification",element:s.jsx(je,{isBillPayAdminLevelAccess:I,isUserHasOnlyBillPayAccess:u,isReimbursementAdminLevelAccess:B,isZeniAccountAdminLevelAccess:A,isChargeCardAdminLevelAccess:R,isUserHasOnlyCardAccess:S,productType:"reimbursement",type:"verification"})}),s.jsx(x,{path:"setup",element:s.jsx(je,{isBillPayAdminLevelAccess:I,isUserHasOnlyBillPayAccess:u,isReimbursementAdminLevelAccess:B,isZeniAccountAdminLevelAccess:A,isChargeCardAdminLevelAccess:R,isUserHasOnlyCardAccess:S,productType:"reimbursement",type:"setup"})}),s.jsx(x,{path:"promo",element:s.jsx(ra,{})}),s.jsx(x,{path:"approval-rules/*",element:B?s.jsx(_n,{}):s.jsx(Pn,{showZeniAccountRoute:$,isUserHasBillPayAccess:_,isUserHasReimbursementAccess:b,showTreasuryRoute:F,isTenantBankingOnly:o,showChargeCardRoute:M,tenantEmailDomain:O??""})}),W&&s.jsx(x,{path:"*",element:s.jsx(na,{})}),(o===!0||l===!0)&&s.jsx(x,{path:"/*",element:s.jsx(et,{})}),t!=null&&He(e,t?.loggedInUserRoleMap)&&s.jsx(x,{path:"*",element:s.jsx(N,{to:"../promo"})}),m&&y&&s.jsx(x,{path:"*",element:s.jsx(N,{to:"../setup"})})]}):z.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(x,{path:"new",element:s.jsx(Fe,{})}),s.jsx(x,{path:":reimbursementId",element:s.jsx(qn,{})}),s.jsx(x,{path:":reimbursementId/edit",element:s.jsx(Fe,{})}),s.jsx(x,{path:"*",element:s.jsx(pe,{})})]}):s.jsx(x,{path:"*",element:s.jsx(ye,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${j.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(x,{path:"*",element:s.jsx(pe,{})})]})}export{Ma as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-BdMPZzDQ.js";import{z as b,a7 as v,m as d,S as N,e6 as k,p as I,c as C}from"./index-Bx2gJO4r.js";import"./mui-cK5UWUvi.js";import g from"./NotFoundScreen-BXfz4Cwt.js";import{a as c}from"./sentry-Buwow292.js";import{u as D,j as h,h as F,g as L,l as T,n as U,o as f,N as y}from"./core-o-ca34AJ.js";import{fI as _,a32 as j,a33 as p,Em as P,q7 as V,a34 as q,Ek as z}from"./zeni-epic-state-MQ0qdl-Q.js";import"./recharts-DK1tbN_A.js";import"./analytics-C3OBHjEG.js";import"./plaid-C8bTkbCG.js";import"./dnd-sqKp8sUm.js";import"./stripe-cKAAJElX.js";import"./lottie-Dl8uwTmw.js";import"./lexical-CEO4_NFb.js";import"./pdf-BNJo5ucI.js";import"./utils-D4KfE2cr.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]="ee5afa39-db48-4b39-be32-ae4f4306a01f",e._sentryDebugIdIdentifier="sentry-dbid-ee5afa39-db48-4b39-be32-ae4f4306a01f")}catch{}})();const G=T((function(e,t){const n=j(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=b.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((m=>{s.push(m.companyName),r.push(m.emailIds[0])})),d.trackInviteEmailClicked("send",s,r,s.length)}e(z())},onUpdateInviteFormLocalData:s=>{e(q({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&d.trackInviteEmailClicked("cancel")}}}))(k),R=()=>{const e=D(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>_(o))),m=F(),w=L(),u=b.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const l=h((o=>j(o))),x=u?.firstName!=null?u.firstName:"User";c.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),c.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[l.fetchState,e]);const E=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(v,{analytics:d,onLoad:o=>(S=>S.trackPageLoaded(N.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:m,location:w,currentTenant:r,companyName:E,userName:x,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=I(),{isFeatureEnabled:t}=e(C.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(f,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(f,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(f,{path:"refer/*",element:t?a.jsx(R,{}):a.jsx(g,{})}),a.jsx(f,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-BXfz4Cwt.js","assets/sentry-Buwow292.js","assets/core-o-ca34AJ.js","assets/zeni-epic-state-MQ0qdl-Q.js","assets/index-Bx2gJO4r.js","assets/mui-cK5UWUvi.js","assets/analytics-C3OBHjEG.js","assets/utils-D4KfE2cr.js","assets/index-BQ3cXEYt.css","assets/DashboardRoutes-ndbO6Qws.js","assets/withTransactionSidePanel-CVCleugc.js","assets/useAskAiCfoHostNavButtonProps-B6lOnQ69.js","assets/TransactionDetailScreen-It6ORIbN.js","assets/decodeURIComponentSafe-CdLVPaCS.js","assets/useInitialThreadRequest-C3w5IRp7.js","assets/routePaths-DBf4ybcn.js","assets/expenseAutomationHelper-8n6GRk1T.js","assets/stripSplatSuffix-BKbpznmZ.js","assets/reportTimeframe-6FnDbaGY.js","assets/analyticsHelper-exrV7AE9.js","assets/CompanyPassportScreen-DJeoMdCg.js","assets/MobileAppDrawer-DVldqyUl.js","assets/InboxNotificationsProvider-Cph6MP0g.js","assets/useTaskManagerAccess-By_NjZen.js","assets/useAiCfoDashboardSuggestedQuestionsChips-D_VhexUa.js","assets/FeaturePreviewScreen-B5U7lEG-.js","assets/BillPayRoutes-uNYLvj5o.js","assets/AddressScreen-D2FVWJY-.js","assets/DomesticWireDetailScreen-BqDioG6P.js","assets/BusinessVerificationPageScreen-ibSIK2nI.js","assets/DrawerScreen-b7QdOhuW.js","assets/SetupPagesScreen-Dv6lGRG5.js","assets/BillPayApprovalRoutes-BbNV-MR5.js","assets/useEnsureVendorListLoaded-BmranjK0.js","assets/ReimbursementApprovalRuleDetailScreen-Dw7QQEoQ.js","assets/getLocaleForTenant-CBmE-ohA.js","assets/ReimbursementRoutes-BiacT-VJ.js","assets/ReimbursementApprovalRoutes-DrsMWkl8.js","assets/TransactionListRoutes-BTjkHFVX.js","assets/ZeniAccountStatementScreen-DVR6RIK2.js","assets/SettingsRoutes-DEHUtOgG.js","assets/AccountMappingScreen-BT4O8HTD.js","assets/QBOConnectionScreen-CI47ZrlS.js","assets/empty-BnmFWJHQ.js","assets/index-BLrePuqf.js","assets/url-C7oPARVv.js","assets/index-Cmb8jqqj.js","assets/accountMappingHelper-C9fFA6EC.js","assets/useEmailConnectResultRefresh-t37-D3lN.js","assets/ReportsRoutes-B5lACyrL.js","assets/ChargeCardRoutes-CO87Ou5-.js","assets/useChargeCardPusherEvents-B6OwhCNo.js","assets/PeopleRoutes-CBBW0nYr.js","assets/ExpenseAutomationRoutes-C6_zyg5Q.js","assets/useActualMatchingMatchDetail-DBoUtV2d.js","assets/ScheduleDetailsPrepaidExpensesScreen-LwZh192V.js","assets/pathToGoBack-Bk8jMuE9.js","assets/TreasuryRoutes-Bys8F57E.js","assets/VendorsRoutes-abjQ1HGQ.js","assets/ZeniAccountRoutes-DlvpS2Bq.js","assets/AddressRoutes-BQEPn0Yr.js","assets/PandLWithForecastRoutes-DZO_Ak_R.js","assets/CustomerOnboardingRoutes-BynW3iC3.js","assets/TransactionDetailRoutes-BB45JvGj.js","assets/EntityDetailRoutes-aGFvyTv5.js","assets/InvoicingRoutes-C4zfN1Wc.js","assets/NotificationRoutes-UAhv091T.js","assets/PerformanceRoutes-CIoRY1pR.js","assets/ActualMatchingMatchDetailScreen-Ce_XDU4u.js","assets/RewardsRoutes-26PBDRkk.js","assets/TaskRoutes-C1KzEFV7.js","assets/TaskListScreen-8hq6cEbk.js","assets/useTaskManagerPusherEvents-LOx5aVW8.js","assets/AiCfoScreen-RbcUBAdM.js","assets/CardsAiCfoScreen-CkEc2DEo.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as s,bn as hs,fI as Es,e1 as ps,e0 as xs,Bs as js,dk as gs,ca as Rs,gM as As,gc as Is,dh as xe,cI as Ts,gq as fs,cA as bs,bG as Ds,br as ys,U$ as Cs,v as vs,V2 as ws,bq as Os,V3 as Ps,bM as Us,bL as ks,bu as Fs,cw as Ls,V4 as Vs,V5 as Hs,dc as Ss,df as Bs,de as Ns,cH as Ms,cO as Zs,p_ as je,gl as ge,h0 as $s,gn as Re,gO as Ae,gP as Ie,go as Gs}from"./zeni-epic-state-MQ0qdl-Q.js";import{j as e}from"./liveblocks-BdMPZzDQ.js";import{a as U}from"./sentry-Buwow292.js";import{N as d,u as zs,h as qs,i as Ys,g as Ws,j as G,q as Te,n as Qs,o as a}from"./core-o-ca34AJ.js";import{N as l,u as Xs,z as C,p as Js,e as Ks,f as en,c as M,j as sn,O as nn,V as tn,L as F,G as fe,t as _,P as an,m as ae,Q as on,Z as rn}from"./index-Bx2gJO4r.js";import{u as ln}from"./mui-cK5UWUvi.js";import{f as be}from"./analyticsHelper-exrV7AE9.js";import{t as dn}from"./getLocaleForTenant-CBmE-ohA.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},p=new t.Error().stack;p&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[p]="61396639-22ab-4338-87f3-93f79feccc74",t._sentryDebugIdIdentifier="sentry-dbid-61396639-22ab-4338-87f3-93f79feccc74")}catch{}})();const cn=l((()=>s((()=>import("./NotFoundScreen-BXfz4Cwt.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),un=({tenantEmailDomain:t})=>e.jsx(d,{to:`/${t}/reimbursements`}),mn=({tenantEmailDomain:t})=>e.jsx(d,{to:`/${t}/bills`}),De=({tenantEmailDomain:t})=>e.jsx(d,{to:`/${t}/treasury`}),ye=({tenantEmailDomain:t})=>e.jsx(d,{to:`/${t}/checking`}),Ce=({tenantEmailDomain:t})=>e.jsx(d,{to:`/${t}/cards`}),v=({showZeniAccountRoute:t,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:L,showTreasuryRoute:i,isTenantBankingOnly:H,showChargeCardRoute:O,tenantEmailDomain:w})=>{if(H===!0){if(t)return e.jsx(ye,{tenantEmailDomain:w});if(i)return e.jsx(De,{tenantEmailDomain:w});if(O)return e.jsx(Ce,{tenantEmailDomain:w})}return t?e.jsx(ye,{tenantEmailDomain:w}):i?e.jsx(De,{tenantEmailDomain:w}):O?e.jsx(Ce,{tenantEmailDomain:w}):p?e.jsx(mn,{tenantEmailDomain:w}):L?e.jsx(un,{tenantEmailDomain:w}):e.jsx(cn,{})},_n={dashboard:()=>s((()=>import("./DashboardRoutes-ndbO6Qws.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,25,8])),bills:()=>s((()=>import("./BillPayRoutes-uNYLvj5o.js")),__vite__mapDeps([26,1,2,3,4,5,6,7,27,0,28,11,14,29,15,21,22,23,30,25,31,19,32,33,34,35,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-BiacT-VJ.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,11,14,30,37,33,34,35,8])),transactions:()=>s((()=>import("./TransactionListRoutes-BTjkHFVX.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,39,8])),settings:()=>s((()=>import("./SettingsRoutes-DEHUtOgG.js")),__vite__mapDeps([40,1,2,3,4,5,6,7,23,41,21,22,42,43,44,45,46,13,47,27,0,19,29,15,20,48,32,33,34,37,8])),reports:()=>s((()=>import("./ReportsRoutes-B5lACyrL.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,25,14,15,18,21,22,23,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-CO87Ou5-.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,11,21,22,23,31,29,15,0,19,14,51,27,8])),people:()=>s((()=>import("./PeopleRoutes-CBBW0nYr.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,0,11,21,22,23,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-C6_zyg5Q.js")),__vite__mapDeps([53,1,2,3,0,4,5,6,7,11,12,13,14,15,16,54,17,10,55,56,47,30,8])),treasury:()=>s((()=>import("./TreasuryRoutes-Bys8F57E.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,11,14,25,8])),vendors:()=>s((()=>import("./VendorsRoutes-abjQ1HGQ.js")),__vite__mapDeps([58,1,2,3,4,5,6,7,27,0,25,55,56,54,17,13,15,11,21,22,23,30,47,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-DlvpS2Bq.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,28,27,11,39,8]))},hn=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],oe=t=>{"requestIdleCallback"in window?requestIdleCallback(t):setTimeout(t,100)},En=l((()=>s((()=>import("./ReportsRoutes-B5lACyrL.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,25,14,15,18,21,22,23,8])))),pn=l((()=>s((()=>import("./AddressRoutes-BQEPn0Yr.js")),__vite__mapDeps([60,1,2,3,27,4,5,6,7,0,8])))),xn=l((()=>s((()=>import("./PeopleRoutes-CBBW0nYr.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,0,11,21,22,23,8])))),jn=l((()=>s((()=>import("./PandLWithForecastRoutes-DZO_Ak_R.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,0,25,11,14,15,21,22,23,8])))),gn=l((()=>s((()=>import("./CustomerOnboardingRoutes-BynW3iC3.js")),__vite__mapDeps([62,1,2,3,27,4,5,6,7,0,42,43,44,45,46,13,48,51,8])))),Rn=l((()=>s((()=>import("./VendorsRoutes-abjQ1HGQ.js")),__vite__mapDeps([58,1,2,3,4,5,6,7,27,0,25,55,56,54,17,13,15,11,21,22,23,30,47,8])))),An=l((()=>s((()=>import("./TransactionDetailRoutes-BB45JvGj.js")),__vite__mapDeps([63,1,2,3,0,4,5,6,7,13,33,12,11,14,15,16,8])))),ve=l((()=>s((()=>import("./EntityDetailRoutes-aGFvyTv5.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),In=l((()=>s((()=>import("./DashboardRoutes-ndbO6Qws.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,25,8])))),we=l((()=>s((()=>import("./BillPayRoutes-uNYLvj5o.js")),__vite__mapDeps([26,1,2,3,4,5,6,7,27,0,28,11,14,29,15,21,22,23,30,25,31,19,32,33,34,35,8])))),Tn=l((()=>s((()=>import("./SettingsRoutes-DEHUtOgG.js")),__vite__mapDeps([40,1,2,3,4,5,6,7,23,41,21,22,42,43,44,45,46,13,47,27,0,19,29,15,20,48,32,33,34,37,8])))),fn=l((()=>s((()=>import("./InvoicingRoutes-C4zfN1Wc.js")),__vite__mapDeps([65,1,2,3,4,5,6,7,27,0,21,22,23,42,43,44,45,46,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-BiacT-VJ.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,11,14,30,37,33,34,35,8])))),bn=l((()=>s((()=>import("./ZeniAccountRoutes-DlvpS2Bq.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,28,27,11,39,8])))),Dn=l((()=>s((()=>import("./TreasuryRoutes-Bys8F57E.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,11,14,25,8])))),yn=l((()=>s((()=>import("./TransactionListRoutes-BTjkHFVX.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,39,8])))),Cn=l((()=>s((()=>import("./ChargeCardRoutes-CO87Ou5-.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,11,21,22,23,31,29,15,0,19,14,51,27,8])))),vn=l((()=>s((()=>import("./NotificationRoutes-UAhv091T.js")),__vite__mapDeps([66,1,2,3,0,4,5,6,7,11,23,8])))),wn=l((()=>s((()=>import("./PerformanceRoutes-CIoRY1pR.js")),__vite__mapDeps([67,1,2,3,0,4,5,6,7,11,21,22,23,8])))),On=l((()=>s((()=>import("./ExpenseAutomationRoutes-C6_zyg5Q.js")),__vite__mapDeps([53,1,2,3,0,4,5,6,7,11,12,13,14,15,16,54,17,10,55,56,47,30,8])))),Pn=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-Ce_XDU4u.js")),__vite__mapDeps([68,1,2,3,4,5,6,7,54,17,13,15,0,8])))),Un=l((()=>s((()=>import("./RewardsRoutes-26PBDRkk.js")),__vite__mapDeps([69,1,2,3,4,5,6,7,0,8])))),kn=l((()=>s((()=>import("./TaskRoutes-C1KzEFV7.js")),__vite__mapDeps([70,1,2,3,0,4,5,6,7,14,21,22,23,71,11,72,8])))),Fn=l((()=>s((()=>import("./AiCfoScreen-RbcUBAdM.js")),__vite__mapDeps([73,1,2,3,4,5,6,7,24,56,15,72,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-CkEc2DEo.js")),__vite__mapDeps([74,1,2,3,4,5,6,7,8])))),D=l((()=>s((()=>import("./NotFoundScreen-BXfz4Cwt.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Ln=l((()=>s((()=>import("./TaskListScreen-8hq6cEbk.js").then((t=>t.f))),__vite__mapDeps([71,1,2,3,4,5,6,7,11,21,22,23,72,8])))),Vn=({isDashboardAccess:t,showZeniAccountRoute:p,isUserHasBillPayAccess:L,isUserHasReimbursementAccess:i,showTreasuryRoute:H,isTenantBankingOnly:O,isTenantCardsOnly:w,showChargeCardRoute:S})=>{if(O===!0){if(p)return e.jsx(d,{to:"checking"});if(H)return e.jsx(d,{to:"treasury"});if(S)return e.jsx(d,{to:"cards"})}return w===!0&&S?e.jsx(d,{to:"cards"}):t?e.jsx(d,{to:"dashboard"}):p?e.jsx(d,{to:"checking"}):H?e.jsx(d,{to:"treasury"}):S?e.jsx(d,{to:"cards"}):L?e.jsx(d,{to:"bills"}):i?e.jsx(d,{to:"reimbursements"}):e.jsx(d,{to:"dashboard"})},I=({children:t,fallback:p,isAllowed:L})=>{const i=on();return L?t:i?e.jsx(rn,{fetchState:"In-Progress"}):p},Ue=({tenantEmailDomain:t})=>e.jsx(d,{to:`/${t}/dashboard`}),zn=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:t}){const p=zs(),L=qs(),{tenantEmailDomain:i}=Ys(),H=ln().mode,{setLoading:O,clearAllLoading:w,clearLoading:S}=Xs(),y=C.getSignedInUserTenant(i)?.tenantId,T=C.getSignedInUser(),X=hs(T),z=Ws(),[V,ke]=U.useState(!1),r=G((o=>Es(o))),{useFeatureGate:B}=Js(),Z=Ks(),J=en(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=B(M.isChargeCardFeatureEnabled),{isFeatureEnabled:ie}=B(M.isDebitCardFeatureEnabled),f=G((o=>o.tenantState.fetchState)),x=G((o=>o.tenantState.activeTenantFetchState.fetchState)),h=x==="Completed"||f==="Completed"?ps(ie,r):void 0,K=x==="Completed"||f==="Completed"?xs(r):void 0,re=x==="Completed"||f==="Completed"?js(r)&&!gs(r):void 0,He=sn(r,Ve,ie),{isCardsHidden:Se}=nn(r?.tenantId),Be=!He||!!Se,{isFeatureEnabled:Ne}=B(M.isSettingsFeatureEnabled),{isFeatureEnabled:ee}=B(M.isAiCfoFileUploadEnabled),{isFeatureEnabled:Me}=B(M.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Ze=r?.userRole!=null&&Rs(r.userRole),q=G((o=>As(o)));if(i!=null){const o=C.getSignedInUserTenant(i);T!=null&&o!=null&&be(T,r,H)}const $={tenantId:y,userId:T?.userId,sessionId:T?.zeniSessionId},le=Is(),E=tn(),$e=r.company==null||E?.loggedInUserRoleMap!=null&&xe(E.loggedInUserRole),Ge=Ts(E?.loggedInUserRoleMap),se=Te("/:tenantEmailDomain/onboarding/*")!==null,ze=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),ne=ze?.params.selectedPeriod,qe=G((o=>$.tenantId!=null?fs(o,$.tenantId):void 0));U.useEffect((()=>{O(F.TENANT_FETCHING),t(i)}),[i]),U.useEffect((()=>{if(ne!=null&&y!=null){const o=ne.split("-");if(o.length===2){const b=bs(Number(o[0])),u=Number(o[1]),n=Ds(`01-${b<10?`0${b}`:b}-${u}`,fe.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),c=ys();n.isAfter(c,"month")===!1?p(Cs(y,{month:b,year:u})):L(`/${i}/month_end_close_checks/review`)}}}),[ne,i,y]),U.useEffect((()=>{V||(ke(!0),O(F.TENANT_FETCHING))}),[V,$,le,T,p,C]),U.useLayoutEffect((()=>{!vs(le,$)&&C.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,b,u,n){if(ge(b?.userId,b?.zeniSessionId,o.tenantId),u($s(!0)),u(Re(o.tenantId)),o.tenantId!=null&&_.clearTenant(o.tenantId),o.tenantId!=null){const c=C.getSignedInUserTenantWithId(o.tenantId);n&&fe.updateAppLocaleID(dn(n)),c?.tenantEmailDomain!=null&&C.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}o.userId!=null?ae.identify(o.userId,{tenant_id:o.tenantId}):ae.resetUserIdentity()})($,T,p,qe))}),[y]),U.useEffect((()=>{C.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,b,u,n,c,Y,N){if(u==null&&n==null)return void console.warn("There is no current tenant selected!!");const W=n!=null&&c?.zeniSessionId!=null,us=u==null||u.tenantId!==n,ms=u!=null&&u.excludedResources==null,_s=u!=null&&u.externalConnections==null;if(W&&us){N(Re(n));const Q=C.getSignedInUserTenantWithId(n);Q?.tenantEmailDomain!=null&&C.saveActiveTenantDomainForUser(Q?.tenantEmailDomain),ge(c?.userId,c?.zeniSessionId,n),_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),N(Ae(c.userId,n))),_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),N(Ie(c.userId,n)))}else W&&ms&&_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),N(Ae(c.userId,n))),W&&_s&&_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),N(Ie(c.userId,n)));if(W){ae.identify(c.userId,{tenant_id:n});const Q=n==null||n!=null&&(b==="Completed"||b==="Error");o==="Completed"||b!=="Not-Started"&&b!=="Error"||n==null||!_.shouldFetchActiveTenant(n)||(_.markActiveTenantFetchStarted(n),Y(F.TENANT_FETCHING),N(Gs(c.userId,n,c.zeniSessionId))),Q&&(o==="Not-Started"||o==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),N(je(c.userId,c.zeniSessionId)))}})(f,x,r,y,T,O,p))}),[y,x]),U.useEffect((()=>{C.isSignedIn()&&f==="Completed"&&q.tenantsBaseInOrder.length>0&&(S(F.TENANT_FETCHING),C.saveSignedInUserTenants(ws(q.tenantsBaseInOrder)),T!=null&&be(T,r,H,void 0,q.tenantsBaseInOrder))}),[q,f,r,T]),U.useEffect((()=>{x==="In-Progress"&&O(F.TENANT_FETCHING),x!=="Completed"&&x!=="Error"||(x==="Completed"&&y!=null?(w(),_.markActiveTenantFetchCompleted(y)):x==="Error"&&y!=null&&(_.markActiveTenantFetchFailed(y),S(F.TENANT_FETCHING),S(F.TENANT_SWITCHING))),f!=="Completed"&&f!=="Error"||(f==="Completed"?_.markAllTenantsFetchCompleted():f==="Error"&&_.markAllTenantsFetchFailed())}),[x,f,y,V]);const de=U.useRef(!1);U.useEffect((()=>{!de.current&&x==="Completed"&&V&&(de.current=!0,(function(o=hn,b=3e3){setTimeout((()=>{const u=n=>{if(n>=o.length)return;const c=o[n],Y=_n[c];Y!=null?Y().then((()=>oe((()=>u(n+1))))).catch((()=>oe((()=>u(n+1))))):u(n+1)};oe((()=>u(0)))}),b)})())}),[x,V]);const P=r?.userRole!=null&&Os(r?.userRole),{isFeatureEnabled:Ye}=B(M.isReferralFeatureEnabled),{isFeatureEnabled:We}=B(M.isAccrualEnabled),Qe=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Xe=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),k=r?.userRole!=null&&xe(r.userRole),ce=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!P,ue=!Be&&!P,Je=Ps(E?.loggedInUserRoleMap),Ke=r.externalConnections?.accounting[0]?.isValid,es=r.externalConnections?.fetchState==="Completed",te=r.company?.companyOnboardingInfo.isOnboardingCompleted,me=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!P,_e=me&&Us(E?.loggedInUserRoleMap),he=Fe&&!P,ss=Le&&!P,ns=ce&&ks(E?.loggedInUserRoleMap),ts=ue&&Fs(E?.loggedInUserRoleMap),as=he&&Ls(E?.loggedInUserRoleMap),os=Vs(E?.loggedInUserRoleMap),is=Hs(E?.loggedInUserRoleMap),rs=Ss(E?.loggedInUserRoleMap),ls=Bs(E?.loggedInUserRoleMap),ds=Ns(E?.loggedInUserRoleMap),j=Ms(E?.loggedInUserRoleMap),g=Zs(E?.loggedInUserRoleMap),Ee=ce&&j,pe=me&&g,R=he&&rs,A=ss&&ls,m=ue&&ds,cs=r.excludedResources?.resources?.find((o=>o.resource==="/invites"))!=null||Ge===!0||Je===!0||os===!0||is===!0;return C.isSignedIn()?y==null?f==="Completed"?e.jsx(d,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(T!=null&&f!=="In-Progress"&&p(je(T.userId,T.zeniSessionId)),null):x!=="In-Progress"&&x!=="Not-Started"||f==="Completed"?(te===!0||X&&!se)&&es&&Ke!==!0&&h===!1&&K===!1&&re===!1?(t(void 0),e.jsx(d,{to:"/connection/auth",replace:!0})):!V||re!==!0||te!==!0||se||X?!V||te!==!1||se||X?V&&r?.userRole&&h!=null&&K!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Qs,{children:e.jsxs(a,{element:e.jsx(an,{}),children:[e.jsx(a,{path:"/",element:e.jsx(Vn,{isDashboardAccess:k,showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:A,isTenantBankingOnly:h,isTenantCardsOnly:K,showChargeCardRoute:m})}),e.jsx(a,{path:"dashboard/*",element:k?e.jsx(In,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:A,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reports/*",element:k?e.jsx(En,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:A,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"people/*",element:cs||k?e.jsx(xn,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:A,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"forecast/*",element:k?e.jsx(jn,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:A,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"onboarding/*",element:e.jsx(gn,{})}),e.jsx(a,{path:"transaction/*",element:k&&P===!1||Qe||Xe?e.jsx(An,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:A,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"transactions/*",element:k&&P===!1?e.jsx(yn,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:A,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"customer/*",element:k&&P===!1?e.jsx(ve,{entityType:"customer"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,isTenantBankingOnly:h,showTreasuryRoute:A,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"vendor/*",element:k&&P===!1?e.jsx(ve,{entityType:"vendor"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:A,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"tasks",element:e.jsx(Ln,{})}),e.jsx(a,{path:"tasks/*",element:e.jsx(kn,{})}),e.jsx(a,{path:"address/*",element:ns||_e||as||ts?e.jsx(pn,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:A,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"checking/*",element:e.jsx(I,{isAllowed:R,fallback:e.jsx(D,{}),children:e.jsx(bn,{})})}),e.jsx(a,{path:"treasury/*",element:e.jsx(I,{isAllowed:A,fallback:e.jsx(D,{}),children:e.jsx(Dn,{})})}),e.jsx(a,{path:"performance",element:e.jsx(I,{isAllowed:J,fallback:e.jsx(Ue,{tenantEmailDomain:i}),children:e.jsx(wn,{})})}),e.jsx(a,{path:"month_end_close_checks/review/*",element:e.jsx(I,{isAllowed:J&&!P,fallback:e.jsx(Ue,{tenantEmailDomain:i}),children:e.jsx(On,{})})}),e.jsx(a,{path:"expense-automation/actual-matching/:matchId",element:e.jsx(I,{isAllowed:J&&!P&&We,fallback:e.jsx(D,{}),children:e.jsx(Pn,{})})}),e.jsx(a,{path:"notifications/*",element:e.jsx(vn,{})}),e.jsx(a,{path:"vendors/*",element:e.jsx(I,{isAllowed:$e,fallback:e.jsx(D,{}),children:e.jsx(Rn,{})})}),e.jsx(a,{path:"bill/*",element:Ee?e.jsx(we,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:A,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"bills/*",element:Ee?e.jsx(we,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:A,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursement/*",element:pe?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:A,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursements/*",element:pe?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:g,showTreasuryRoute:A,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"settings/*",element:e.jsx(I,{isAllowed:Ne,fallback:e.jsx(D,{}),children:e.jsx(Tn,{hasAdminLevelAccess:_e})})}),e.jsx(a,{path:"invoicing/*",element:e.jsx(I,{isAllowed:Me&&Ze,fallback:e.jsx(D,{}),children:e.jsx(fn,{})})}),e.jsx(a,{path:"cards/ask",element:e.jsx(I,{isAllowed:m&&Z,fallback:e.jsx(D,{}),children:e.jsx(Pe,{isFileUploadEnabled:ee})})}),e.jsx(a,{path:"cards/ask/:session_id",element:e.jsx(I,{isAllowed:m&&Z,fallback:e.jsx(D,{}),children:e.jsx(Pe,{isFileUploadEnabled:ee})})}),e.jsx(a,{path:"cards/*",element:e.jsx(I,{isAllowed:m,fallback:e.jsx(D,{}),children:e.jsx(Cn,{})})}),e.jsx(a,{path:"rewards/*",element:e.jsx(I,{isAllowed:Ye,fallback:e.jsx(D,{}),children:e.jsx(Un,{})})}),e.jsx(a,{path:"/ai-cfo",element:e.jsx(I,{isAllowed:Z,fallback:e.jsx(D,{}),children:e.jsx(d,{to:"explore"})})}),e.jsx(a,{path:"/ai-cfo/",element:e.jsx(I,{isAllowed:Z,fallback:e.jsx(D,{}),children:e.jsx(d,{to:"explore"})})}),e.jsx(a,{path:"/ai-cfo/:session_id",element:e.jsx(I,{isAllowed:Z,fallback:e.jsx(D,{}),children:e.jsx(Fn,{isFileUploadEnabled:ee})})}),e.jsx(a,{path:"*",element:e.jsx(D,{})})]})}):null:(t(void 0),e.jsx(d,{to:`/${i}/onboarding`,replace:!0})):(t(void 0),e.jsx(d,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),t(void 0),e.jsx(d,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{v as F,zn as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-BdMPZzDQ.js";import{a as f,R as b,t as A}from"./sentry-Buwow292.js";import{u as z,h as D,j as l,g as M,N as O,l as V}from"./core-o-ca34AJ.js";import{u as j,z as s,m as E,G as P,R as F,S as _,T as B,U as N,W as R,X as v}from"./index-Bx2gJO4r.js";import{fI as W,UK as $,V2 as J,gl as K,gn as X,V7 as Y,gY as G,dl as H,V8 as U,V9 as q,Va as Q,c1 as y}from"./zeni-epic-state-MQ0qdl-Q.js";import{u as Z}from"./mui-cK5UWUvi.js";import{u as ee}from"./useDeviceId-CeB6LWI8.js";import{f as te}from"./analyticsHelper-exrV7AE9.js";import{t as ne}from"./getLocaleForTenant-CBmE-ohA.js";import"./recharts-DK1tbN_A.js";import"./analytics-C3OBHjEG.js";import"./plaid-C8bTkbCG.js";import"./dnd-sqKp8sUm.js";import"./stripe-cKAAJElX.js";import"./lottie-Dl8uwTmw.js";import"./lexical-CEO4_NFb.js";import"./pdf-BNJo5ucI.js";import"./utils-D4KfE2cr.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="73e29855-563e-4463-8371-5f113505c817",t._sentryDebugIdIdentifier="sentry-dbid-73e29855-563e-4463-8371-5f113505c817")}catch{}})();const ie=V((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Q({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(c),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(q(n,a)))},clearSignInError:()=>{t(U())}}}))(R),ae=b.memo(ie);function ve({setTenantEmailDomain:t}){const i=z(),d=D(),{clearAllLoading:g}=j(),n=s.getSignedInUser();f.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:k,accountLocked:C,accountUnlockTime:L}=l((e=>e.tenantState)),p=l((e=>e.tenantState.fetchState)),h=l((e=>e.tenantState.activeTenantFetchState.fetchState)),S=l((e=>e.tenantState.signInState)),o=l((e=>e.tenantState.loggedInUser)),r=l((e=>W(e))),I=l((e=>$(e))),m=M(),w=Z().mode,x=m.state?.magicLinkExpired,T=m.state?.magicLinkAlreadyUsed;if(f.useEffect((()=>{k.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[k.fetchState,c]),f.useEffect((()=>{t(void 0)}),[]),f.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&h!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(J(I.tenantsInOrder),o.zeniSessionId),K(o.userId,o.zeniSessionId,r.tenantId),i(X(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(Y("Completed")),P.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),G().then((()=>{const e=N();e!=null&&F(e)})),setTimeout((()=>{E.trackLogin(_.Event.loginSuccess,o.authProvider??"google",H(r.productSettings))}),2e3))}),[S,p,h,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return u.jsx(O,{to:e,state:{...m.state,origin:""}})}return u.jsxs(u.Fragment,{children:[u.jsx(ae,{magicLinkExpired:!!x,magicLinkAlreadyUsed:!!T,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&L!=null?u.jsx(B,{onClose:()=>i(U()),unlockDate:L}):null]})}export{ve as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BdMPZzDQ.js";import{a as i}from"./sentry-Buwow292.js";import{u as d,g as c,N as u}from"./core-o-ca34AJ.js";import{z as n,m as a,S as m,a6 as p}from"./index-Bx2gJO4r.js";import{g$ as g,Vo as b}from"./zeni-epic-state-MQ0qdl-Q.js";import{n as y}from"./mui-cK5UWUvi.js";import"./recharts-DK1tbN_A.js";import"./analytics-C3OBHjEG.js";import"./plaid-C8bTkbCG.js";import"./dnd-sqKp8sUm.js";import"./stripe-cKAAJElX.js";import"./lottie-Dl8uwTmw.js";import"./lexical-CEO4_NFb.js";import"./pdf-BNJo5ucI.js";import"./utils-D4KfE2cr.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="1252b546-b136-4188-9f0d-57b04fb8b9b1",t._sentryDebugIdIdentifier="sentry-dbid-1252b546-b136-4188-9f0d-57b04fb8b9b1")}catch{}})();function N(){const t=d(),e=c(),o=i.useRef(!1),f=n.isSignedIn(),r=e.state?.message==="logout"||f;return i.useEffect((()=>{if(r&&!o.current){o.current=!0;try{t(g()),b(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(l){console.error("Error during sign out:",l)}finally{window.location.replace("/signin/auth")}}}),[r,t]),r?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=y.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
9
|
-
`;export{N as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-BdMPZzDQ.js";import fe from"./NotFoundScreen-BXfz4Cwt.js";import{a as u}from"./sentry-Buwow292.js";import{h as ee,u as ae,j as g,g as ge,i as he,N as Ee,l as De,n as be,o as h}from"./core-o-ca34AJ.js";import{QD as se,QG as Ie,QA as Ce,a35 as Re,fI as te,a36 as ne,R2 as D,QU as E,Qx as _e,Rx as Ge,Rq as ye,a37 as oe,gk as ie,a38 as W,a39 as Ae,Qt as Ue,Qq as ve,v6 as xe,uW as Be,mD as we,QS as je,a3a as Pe,RJ as Fe,QO as Le,Rc as Ke,R9 as Ne,QJ as $e,R6 as Qe,R1 as Ze}from"./zeni-epic-state-MQ0qdl-Q.js";import{z as b,e7 as Oe,g as qe,p as ze,c as _,a3 as re,n as G,a7 as Ve,m as X,S as Me,e8 as Je,X as Y,ad as We}from"./index-Bx2gJO4r.js";import{n as Xe}from"./mui-cK5UWUvi.js";import{u as Ye}from"./useInitialThreadRequest-C3w5IRp7.js";import{M as He}from"./MobileAppDrawer-DVldqyUl.js";import{T as m,t as ea,b as aa,a as sa,c as ta,d as H,e as na}from"./TaskListScreen-8hq6cEbk.js";import{u as oa}from"./useTaskManagerPusherEvents-LOx5aVW8.js";import"./recharts-DK1tbN_A.js";import"./analytics-C3OBHjEG.js";import"./plaid-C8bTkbCG.js";import"./dnd-sqKp8sUm.js";import"./stripe-cKAAJElX.js";import"./lottie-Dl8uwTmw.js";import"./lexical-CEO4_NFb.js";import"./pdf-BNJo5ucI.js";import"./utils-D4KfE2cr.js";import"./InboxNotificationsProvider-Cph6MP0g.js";import"./useTaskManagerAccess-By_NjZen.js";import"./useAskAiCfoHostNavButtonProps-B6lOnQ69.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]="4d431e0d-2d94-497f-8b23-a5472008a255",e._sentryDebugIdIdentifier="sentry-dbid-4d431e0d-2d94-497f-8b23-a5472008a255")}catch{}})();function ia(){const e=ee(),a=ae(),n=b.getSignedInUser(),{cannedResponses:c,fetchState:t,saveFetchState:l}=g((i=>i.cannedResponsesState)),d=u.useCallback((()=>{a(se())}),[a]),S=u.useCallback(((i,I,C)=>{a(Ie({name:i,content:I,cannedResponseId:C}))}),[a]),s=u.useCallback((i=>{a(Ce({cannedResponseId:i}))}),[a]);if(n==null)throw Error("Can't access quick responses page without signing in...");return r.jsx(Oe,{cannedResponses:c,isLoading:t==="In-Progress"||t==="Not-Started",isSaving:l==="In-Progress",onBackClick:()=>e(-1),onDelete:s,onFetch:d,onSave:S})}const K=e=>e?.taskState?.taskByID,F=(e,a)=>{const n=K(e);if(a!=null&&n!=null)return n[a]?.parentTaskId??void 0},ra=Re([F,(e,a)=>{const n=F(e,a),c=K(e);if(n!=null&&c!=null)return c[n]?.name},(e,a)=>{const n=F(e,a),c=K(e);return n!=null&&c!=null&&c[n]!=null}],((e,a,n)=>{if(e!=null&&n===!0)return{id:e,name:a??""}})),ca=De((function(e,a){const{location:n,taskGroupId:c}=a,t=oe(e,a.taskId),l=te(e),d=ra(e,a.taskId),S=t.taskGroupId??c,s=S!=null?W(e.taskGroupState,S):void 0,i=b.getSignedInUser(),I=l.tenantId,C={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:I??""},v=ne(e),{tenantEmailDomain:x}=l,y=t.recurringSourceTaskId,B=y!=null?`${Y.appUrl}/${x}/tasks/${encodeURIComponent(y)}`:void 0;return{taskDetailSelectorView:t,authParams:C,isZeniUser:b.isZeniUser(),userGroupList:Ae(e),isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:We.fileMicroServiceBaseUrl,companyName:a.currentTenant.companyName,companyId:a.currentTenant.companyId,currentUrl:`${Y.appUrl}${a.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:B,tagListView:v,taskGroupName:S!=null&&s!=null&&s.isDefault===!1?s.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((T=>W(e.taskGroupState,T))).filter((T=>T!=null&&!T.isDeleted)).map((T=>({id:T.id,name:T.name,isDefault:T.isDefault}))),subtasks:t.subtasks,parentTaskRef:d,subTaskCreateStatus:e.taskDetailState?.subTaskCreateStatus?.fetchState}}),(function(e,a){const{taskId:n,navigate:c,currentTenant:t,location:l,taskGroupId:d}=a,{tenantEmailDomain:S}=t;return{onSaveChangesToLocalStore:s=>{e(Ze({taskDetailLocalData:s,taskId:n}))},onSaveDetailClick:s=>{e(Qe(n,s??d))},onArchiveTaskClick:()=>{a.taskId!=null&&e($e(a.taskId))},onSnoozeTask:(s,i)=>{e(Ne(s,i))},onUnsnoozeTask:s=>{e(Ke(s))},onCreateSubtask:(s,i)=>{e(Le({...i,parentTaskId:s}))},onSubtaskUpdate:(s,i)=>{e(Fe({task:s,updates:i}))},onShowToast:s=>{e(ie(s))},onSubtaskRowClick:s=>{c(`/${S}/tasks/${s}`,{state:{pathnameStackToGoBack:G(l.state?.pathnameStackToGoBack,l.pathname)}})},onParentBreadcrumbClick:s=>{c(`/${S}/tasks/${s}`,{state:{pathnameStackToGoBack:G(l.state?.pathnameStackToGoBack,l.pathname)}})},onDismissClick:()=>{if(l.state?.message==="triggerBackClick"){const s=re(l.state?.pathnameStackToGoBack),i=s.poppedPathname??"../../dashboard";c(i,{state:{pathnameStackToGoBack:s.newStack}})}else{const s=U(S),i=G(l.state?.pathnameStackToGoBack,l.pathname);c(s,{state:{pathnameStackToGoBack:i}})}e(Pe({taskId:n}))},onDeleteTaskClick:()=>{e(je(n))},updateFilesEntity:s=>{e(we({files:s}))},onDeleteFile:s=>{e(Be(s))},onEditFileName:(s,i)=>{e(xe(s,i.split(".")[0]))},onReloadTaskDetailPage:()=>{e(D(!1,n))},onCreateTagClick:s=>{e(ve(s,n))},onDeleteTagClick:s=>{e(Ue(s,n))},onFetchCannedResponses:()=>{e(se())},onManageTemplatesClick:()=>{c(`/${t.tenantEmailDomain}/tasks/quick-responses`)}}}))(Je);function L(){const e=ee(),a=ae(),n=ge(),c=qe(),{taskId:t,taskGroupId:l}=he(),d=g((o=>te(o))),S=Ye(d?.companyId),{useFeatureGate:s}=ze(),{isFeatureEnabled:i}=s(_.isTaskSnoozeEnabled),{isFeatureEnabled:I}=s(_.isTaskVisibilityEnabled),{isFeatureEnabled:C}=s(_.isTaskCannedResponsesEnabled),{isFeatureEnabled:v}=s(_.isTaskRecurringParentEnabled),{isFeatureEnabled:x}=s(_.isTaskGroupAssigneesEnabled),[y,B]=u.useState(!1),[T,ce]=u.useState(!1),[N,le]=u.useState(!1),[$,w]=u.useState(!1),R=u.useRef(!1),A=g((o=>o.taskListState.updateTasksFetchState.fetchState)),Q=g((o=>ne(o))),Z=g((o=>o.taskGroupViewState.fetchState));u.useEffect((()=>{a(D(!1,t)),t!=null&&a(E(t))}),[a,t]);const O=b.getSignedInUser()?.userId,de=b.isZeniUser(),ke=g((o=>t!=null?o.taskState.taskByID[t]?.syncToken:void 0)),q=()=>{d?.tenantEmailDomain!=null&&e(U(d.tenantEmailDomain))},z=()=>{a(ie({messageSection:"delete_task",messageText:"success",type:"success"})),q()},ue=u.useMemo((()=>{const o=[m.TASK_CREATED,m.TASK_UPDATED,m.TASKS_BULK_UPDATED,m.TASKS_BULK_DELETED],k=[...o,m.TASK_SNOOZE_RESURFACED];return[...aa(d?.companyId,o),...sa(O,k)]}),[d?.companyId,O]);oa({events:ue,onSubscribed:()=>{t!=null&&(a(D(!0,t)),a(E(t)))},onEvent:(o,k)=>{if(t!=null)switch(o){case m.TASK_CREATED:case m.TASK_UPDATED:{const p=((P,me,{isZeniUser:Se,storedSyncToken:Te,taskId:J})=>{if(P!==m.TASK_CREATED&&P!==m.TASK_UPDATED)return"none";const f=ea(me);return f==null?"none":f.parent_task_id===J?"refreshSubtasks":P!==m.TASK_UPDATED||f.task_id!==J?"none":f.is_deleted===!0?"leaveDeleted":f.is_private!==!0||Se?f.sync_token!=null&&f.sync_token===Te?"none":"refreshTask":"leaveNoAccess"})(o,k,{isZeniUser:de,storedSyncToken:ke,taskId:t});p==="refreshTask"?(a(D(!0,t)),a(E(t))):p==="refreshSubtasks"?a(E(t)):p==="leaveDeleted"?z():p==="leaveNoAccess"&&q();break}case m.TASKS_BULK_UPDATED:{const p=H(k);if(p==null)break;p.task_ids.includes(t)&&a(D(!0,t)),a(E(t));break}case m.TASKS_BULK_DELETED:{const p=H(k);if(p==null)break;if(p.task_ids.includes(t)){z();break}a(E(t));break}case m.TASK_SNOOZE_RESURFACED:{ta(k)?.task_id===t&&a(D(!0,t));break}}}}),u.useEffect((()=>{T||Q.fetchState==="Completed"||(ce(!0),a(_e()))}),[T,a,Q.fetchState]),u.useEffect((()=>{N||Z==="Completed"||(le(!0),a(Ge()))}),[N,a,Z]);const pe=u.useCallback((()=>{t!=null&&(R.current=!1,a(ye([t],null,{isArchived:!1})),w(!0))}),[a,t]);u.useEffect((()=>{if($)if(A!=="In-Progress"){if(R.current){if(A==="Error")return w(!1),void(R.current=!1);if(A==="Completed"){w(!1),R.current=!1;const{tenantEmailDomain:o}=d;if(n.state?.message==="triggerBackClick"){const k=re(n.state?.pathnameStackToGoBack);e(k.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:k.newStack}})}else{const k=U(o);e(k,{state:{pathnameStackToGoBack:G(n.state?.pathnameStackToGoBack,n.pathname)}})}}}}else R.current=!0}),[$,A,d,n,e]);const V=g((o=>oe(o,t))),j=V.fetchState,M=b.getSignedInUser();if(M==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&V.error?.code===400){const{tenantEmailDomain:o}=d,k=U(o),p=G(n.state?.pathnameStackToGoBack,n.pathname);return r.jsx(Ee,{to:k,state:{pathnameStackToGoBack:p}})}return r.jsxs(r.Fragment,{children:[j==="Completed"?r.jsx(Ve,{analytics:X,onLoad:o=>(k=>k.trackPageLoaded(Me.Event.taskDetailPage))(o)}):null,r.jsxs(la,{children:[r.jsx(He,{isAppContentDrawerOpen:y,handleDrawerToggle:o=>{B(o)}}),r.jsx(ca,{analytics:X,currentTenant:d,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:S,location:n,loggedInUser:M,navigate:e,taskGroupId:l,taskId:t,taskDetailFetchState:j,onUnarchiveTaskClick:pe,isTaskSnoozeEnabled:i,isTaskVisibilityEnabled:I,isTaskCannedResponsesEnabled:C,isTaskRecurringParentEnabled:v,isTaskGroupAssigneesEnabled:x})]})]})}const la=Xe.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,U=e=>`/${e}/tasks`;function Ba(){return r.jsxs(be,{children:[r.jsx(h,{path:"/new",element:r.jsx(L,{})}),r.jsx(h,{path:"/new/:taskGroupId",element:r.jsx(L,{})}),r.jsx(h,{path:"/group/:taskGroupId",element:r.jsx(na,{})}),r.jsx(h,{path:"/quick-responses",element:r.jsx(ia,{})}),r.jsx(h,{path:"/:taskId",element:r.jsx(L,{})}),r.jsx(h,{path:"*",element:r.jsx(fe,{})})]})}export{Ba as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as c}from"./liveblocks-BdMPZzDQ.js";import B from"./NotFoundScreen-BXfz4Cwt.js";import{a as n}from"./sentry-Buwow292.js";import{u as ft,h as yt,g as bt,i as St,j as o,n as ht,o as f}from"./core-o-ca34AJ.js";import{fI as It,gZ as Lt,m3 as Tt,ul as jt,XR as Ct,XG as Et,XS as gt,S2 as At,S3 as kt,i3 as L,m1 as vt,um as xt,RU as Dt,St as Rt,XT as _t,XU as Nt,R$ as Xt,RY as wt,XV as Ft,XW as Mt,XX as Ut}from"./zeni-epic-state-MQ0qdl-Q.js";import{p as zt,V as Ht,c as H,b1 as Pt,z as qt,h as Vt,b2 as Bt,m as P,b3 as Gt,ad as $t,G as Ot}from"./index-Bx2gJO4r.js";import"./mui-cK5UWUvi.js";import{d as Yt}from"./decodeURIComponentSafe-CdLVPaCS.js";import{u as Zt}from"./useEnsureVendorListLoaded-BmranjK0.js";import{u as Wt,T}from"./TransactionDetailScreen-It6ORIbN.js";import{c as Jt}from"./routePaths-DBf4ybcn.js";import"./recharts-DK1tbN_A.js";import"./analytics-C3OBHjEG.js";import"./plaid-C8bTkbCG.js";import"./dnd-sqKp8sUm.js";import"./stripe-cKAAJElX.js";import"./lottie-Dl8uwTmw.js";import"./lexical-CEO4_NFb.js";import"./pdf-BNJo5ucI.js";import"./utils-D4KfE2cr.js";import"./useAskAiCfoHostNavButtonProps-B6lOnQ69.js";import"./useInitialThreadRequest-C3w5IRp7.js";import"./expenseAutomationHelper-8n6GRk1T.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="95b0b250-8e21-43c3-9ca9-cea1cdcf8902",e._sentryDebugIdIdentifier="sentry-dbid-95b0b250-8e21-43c3-9ca9-cea1cdcf8902")}catch{}})();const Kt=["bank","credit_card","other_current_assets"],q=e=>`/${e}/month_end_close_checks/review/transaction_categorization`,{common:{currency:V}}=Ot.getLocalizedStrings();function Qt(){const e=ft(),d=yt(),m=bt(),{tenantEmailDomain:u,transactionTypeEncoded:G}=St(),{useFeatureGate:j}=zt(),$=Ht(),{isFeatureEnabled:O}=j(H.isCreateTransactionEnabled),{isFeatureEnabled:C}=j(H.isProjectsTransactionsEnabled),Y=Yt(G??""),a=Ut.find((t=>t===Y)),S=o((t=>It(t))),E=Pt(S.companyId,a),g=o((t=>Lt(t.companyState,S.companyId)?.company.companyLocaleInfo)),Z=g?.currencyCode??V.currencyCode,W=g?.currencySymbol??V.currencySymbol,A=o((t=>t.tenantState.currentTenantId)),k=qt.getSignedInUser(),v=k?.userId??"",x=k?.zeniSessionId??"",J=n.useMemo((()=>({userId:v,sessionId:x,tenantId:A??""})),[v,x,A]),K=o((t=>Tt(t))),D=o((t=>jt(t))),R=D&&C===!0,h=o((t=>t.projectListState)),_=o((t=>t.projectState)),Q=n.useMemo((()=>Ct(_,h).projects),[_,h]),I=o((t=>Et(t,"common"))),N=o((t=>t.accountListState.byReportId.accountList.fetchState)),X=o((t=>t.accountListState.byReportId.createTransactionLineAccountList.fetchState)),w=o((t=>t.accountListState.byReportId.createTransactionPaymentAccountList.fetchState)),F=o((t=>t.classListState.fetchState)),s=o((t=>a!=null?gt(t,a):void 0));n.useEffect((()=>{if(a!=null)return e(At(a)),()=>{e(kt(a))}}),[e,a]);const tt=Vt(),et=o((t=>{const{activeTenantFetchState:i,currentTenantId:b,fetchState:mt,tenantsById:pt}=t.tenantState;return b!=null&&pt[b]!=null&&(i.fetchState==="Completed"||mt==="Completed")})),r=tt&&et;n.useEffect((()=>{r&&a==="transfer"&&N==="Not-Started"&&e(L("accountList"))}),[e,r,a,N]),n.useEffect((()=>{r&&X==="Not-Started"&&e(L("createTransactionLineAccountList"))}),[e,r,X]),n.useEffect((()=>{r&&w==="Not-Started"&&e(L("createTransactionPaymentAccountList",!1,!1,!1,!1,Kt))}),[e,r,w]),n.useEffect((()=>{r&&F==="Not-Started"&&e(vt())}),[e,r,F]);const M=h.fetchState;n.useEffect((()=>{r&&R&&M==="Not-Started"&&e(xt())}),[e,r,R,M]),Zt(r),Wt(r&&a==="transfer",!1);const at=n.useCallback(((t,i=[])=>{if(i.length>0&&e(Dt(i)),u==null)return;const b=Bt(m.state)??[q(u)];d(Jt(t,u),{replace:!0,state:{pathnameStackToGoBack:b}})}),[e,u,d,m.state]),nt=n.useCallback((()=>{m.key==="default"?u!=null&&d(q(u)):d(-1)}),[m.key,d,u]),ot=n.useCallback((t=>{e(Rt(t))}),[e]),U=n.useRef(void 0),p=s?.createStatus.error;n.useEffect((()=>{if(a==null||p==null)return;const t=`${p.code??""}-${p.message??""}`;U.current!==t&&(U.current=t,P.trackCreateTransactionFailed({transactionType:a,errorCode:p.code}))}),[p,a]);const y=n.useCallback((t=>t),[]),l=n.useMemo((()=>(s?.vendorList??[]).filter((t=>!t.isDeleted)).sort(((t,i)=>t.name.localeCompare(i.name)))),[s?.vendorList]),z=s?.localData.vendorId,st=n.useMemo((()=>{const t=l.find((i=>i.id===z));if(t!=null)return t.qboId!==""&&t.qboId!==t.name?t.qboId:t.name}),[l,z]),ct=o((t=>_t(t,st))),rt=n.useMemo((()=>y(l.map((t=>({id:t.id,label:t.name}))))),[l,y]),it=n.useMemo((()=>({...I,vendor:[...l.map((t=>({id:t.id,name:t.name,qboId:t.qboId,type:"vendor",zeniId:t.id}))),...I.vendor]})),[I,l]),dt=n.useMemo((()=>y((s?.transferAccountsList??[]).map((t=>({id:t.accountId,label:t.accountName}))))),[s?.transferAccountsList,y]),ut=n.useCallback((t=>{a!=null&&e(Nt(a,t))}),[e,a]),lt=n.useCallback(((t,i)=>{a!=null&&e(Xt(a,i,t))}),[e,a]);return E==null?null:a!=null&&s!=null&&O===!0&&E&&$?.connectionName!=="netsuite"?c.jsx(Gt,{analytics:P,attachmentUploadEndpoint:$t.accountMicroServiceBaseUrl,authParams:J,createdTransactionId:s.createdTransactionId,transactionType:a,localData:s.localData,createStatus:s.createStatus,accountsHierarchyList:s.accountListNestedAccountHierarchy,paymentAccountsHierarchyList:s.paymentAccountListNestedAccountHierarchy,classHierarchyList:s.classListNestedAccountHierarchy,vendorOptions:rt,transferAccountOptions:dt,isAccountingClassesEnabled:K,isAccountingProjectsEnabled:D,isProjectsTransactionsEnabled:C===!0,projects:Q,currencyCode:Z,currencySymbol:W,bookCloseDate:S.bookCloseDate?.toDate(),entityAutoCompleteView:it,vendorRecommendationFetchState:ct.fetchState,onUpdateLocalData:ut,onAddLine:()=>e(Mt(a)),onRemoveLine:t=>e(Ft(a,t)),onSubmit:()=>e(wt(a)),onCancel:nt,onCreateTransactionComplete:at,onUploadAttachmentAttachment:ot,onFetchRecommendationsForVendor:lt}):c.jsx(B,{})}function Ce(){return c.jsxs(ht,{children:[c.jsx(f,{path:"/new/:transactionTypeEncoded",element:c.jsx(Qt,{})}),c.jsx(f,{path:"/:transactionTypeEncoded/:transactionId",element:c.jsx(T,{})}),c.jsx(f,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:c.jsx(B,{})}),c.jsx(f,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:c.jsx(T,{})}),c.jsx(f,{path:"/*",element:c.jsx(T,{})})]})}export{Ce as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-BdMPZzDQ.js";import{a as f}from"./sentry-Buwow292.js";import{t as u,u as h,j as b,N as y}from"./core-o-ca34AJ.js";import{Vl as I,gl as w,K8 as j}from"./zeni-epic-state-MQ0qdl-Q.js";import{z as l,a6 as x,ae as S,af as D}from"./index-Bx2gJO4r.js";import{n as g}from"./mui-cK5UWUvi.js";import"./recharts-DK1tbN_A.js";import"./analytics-C3OBHjEG.js";import"./plaid-C8bTkbCG.js";import"./dnd-sqKp8sUm.js";import"./stripe-cKAAJElX.js";import"./lottie-Dl8uwTmw.js";import"./lexical-CEO4_NFb.js";import"./pdf-BNJo5ucI.js";import"./utils-D4KfE2cr.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]="21995ba8-7c62-4059-a9f2-b2969730d7b3",e._sentryDebugIdIdentifier="sentry-dbid-21995ba8-7c62-4059-a9f2-b2969730d7b3")}catch{}})();const A=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[n,c]=f.useState(!1),a=h(),i=b((m=>I(m))),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(y,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect((()=>{n||(c(!0),a(j(t,p,s)))}),[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=g.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100vh;
|
|
5
|
-
flex-direction: row;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
9
|
-
`,_=g(D.LargeRegular)`
|
|
10
|
-
display: flex;
|
|
11
|
-
color: ${S.important};
|
|
12
|
-
`;export{A as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as c}from"./liveblocks-BdMPZzDQ.js";import{a as m}from"./sentry-Buwow292.js";import{h as x,u as j,g as $,i as v,j as p}from"./core-o-ca34AJ.js";import{U3 as s,U2 as B,a0H as C,fI as T,a0I as U}from"./zeni-epic-state-MQ0qdl-Q.js";import{a0 as z,ad as g,z as D,a6 as E,d6 as L,a3 as P}from"./index-Bx2gJO4r.js";import{u as N,n as _}from"./mui-cK5UWUvi.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="eabf9b25-3b3c-4804-9401-96846006f60e",e._sentryDebugIdIdentifier="sentry-dbid-eabf9b25-3b3c-4804-9401-96846006f60e")}catch{}})();const G=_.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;function F(){const e=x(),n=j(),d=z(),l=$();let{accountId:a}=v(),f=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,f=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[u,y]=m.useState(!1),b=N();m.useEffect((()=>{u||(y(!0),n(B(a??"",!1)))}),[u,n]);const o=p((t=>C(t,a??""))),h=()=>{const t=P(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},r=D.getSignedInUser(),i=p((t=>T(t))),I={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:i.tenantId??""},w=U(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=i.company?.companyInfo.companyLegalName??i.companyName;if(r==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?c.jsx(E,{fetchState:"In-Progress",style:{backgroundColor:b.colors.grey5}}):c.jsx(G,{windowSize:d,children:c.jsx(L,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:h,authParams:I,downloadEndPoint:f})})}export{F as Z};
|