@zeniai/web-app-ui 5.3.64-dev → 5.3.65-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-6_GKC9vx.js +9 -0
- package/dist/assets/ActualMatchingMatchDetailScreen-BtJ1PRf_.js +1 -0
- package/dist/assets/AddressRoutes-BGo6E_l0.js +1 -0
- package/dist/assets/{AddressScreen-CrPViFiu.js → AddressScreen-BYfgTsTg.js} +2 -2
- package/dist/assets/{AiCfoScreen-DXsXYKZU.js → AiCfoScreen-HIFRX9qy.js} +5 -5
- package/dist/assets/AppDrawer-HGV6a9mb.js +10 -0
- package/dist/assets/{BillPayApprovalRoutes-CMAUuUUB.js → BillPayApprovalRoutes-CJFVAxhN.js} +1 -1
- package/dist/assets/{BillPayRoutes-Dmusj5HX.js → BillPayRoutes-9qxDDuw-.js} +7 -7
- package/dist/assets/{BusinessVerificationPageScreen-C-aPhqey.js → BusinessVerificationPageScreen-ClHDLcIn.js} +2 -2
- package/dist/assets/CardsAiCfoScreen-HQpPf571.js +14 -0
- package/dist/assets/{ChargeCardRoutes-JBiL4Thy.js → ChargeCardRoutes-D5HxBR-m.js} +6 -6
- package/dist/assets/CompanyPassportScreen-NKCcjvTx.js +1 -0
- package/dist/assets/ConnectionAuthScreen-5_efBSJK.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-LnGpx7c7.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-DvA4xflo.js +30 -0
- package/dist/assets/{DashboardRoutes-B3_TJQND.js → DashboardRoutes-BrD8wr4t.js} +4 -4
- package/dist/assets/DefaultTenantHome-UgTfgsWU.js +1 -0
- package/dist/assets/DomesticWireDetailScreen-CnA3RoGS.js +18 -0
- package/dist/assets/DrawerScreen-Uxjfm6D_.js +1 -0
- package/dist/assets/EntityDetailRoutes-DtNSByJA.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-CyGyQy2q.js +38 -0
- package/dist/assets/FeaturePreviewScreen-C1hVuos1.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-BZRaCcdu.js +1 -0
- package/dist/assets/InboxNotificationsProvider-J2K-16R3.js +1 -0
- package/dist/assets/InvoicingRoutes-BER5-vbp.js +2 -0
- package/dist/assets/MagicLinkRoutes-BGZcWo6O.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-BclRPUfZ.js +12 -0
- package/dist/assets/MobileAppDrawer-B_zpLZqx.js +1 -0
- package/dist/assets/NotFoundScreen-BXryZNID.js +1 -0
- package/dist/assets/NotificationRoutes-CQasJ3IU.js +1 -0
- package/dist/assets/OAuthConsentScreen-Bo-ewMPc.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-DdmupK5y.js +1 -0
- package/dist/assets/{PaymentLinkScreen-Bh4jK9uE.js → PaymentLinkScreen-CAg7Uc1V.js} +5 -5
- package/dist/assets/PeopleRoutes-CYUsZeQt.js +22 -0
- package/dist/assets/PerformanceRoutes-DqTbj0rB.js +1 -0
- package/dist/assets/{Preview-Cqz8sG2s.js → Preview-DB5CbRio.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-DreC-yDW.js → QBOConnectionScreen-CRdIfjOg.js} +1 -1
- package/dist/assets/ReimbursementApprovalRoutes-CgCsp1OP.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BxglZgWl.js → ReimbursementApprovalRuleDetailScreen-ChXGgpkg.js} +1 -1
- package/dist/assets/ReimbursementRoutes-DKUCzczr.js +68 -0
- package/dist/assets/{ReportsRoutes-BZjyXdiB.js → ReportsRoutes-CSUm6Emn.js} +1 -1
- package/dist/assets/RewardsRoutes-DWpcmti-.js +1 -0
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-PbMzJVD9.js → ScheduleDetailsPrepaidExpensesScreen-CuQHddsr.js} +5 -5
- package/dist/assets/ScreenRoutes-evald5rF.js +2 -0
- package/dist/assets/{SettingsRoutes-hveOvbi9.js → SettingsRoutes-B7gRIVJU.js} +6 -6
- package/dist/assets/{SetupPagesScreen-B8kiMdZf.js → SetupPagesScreen-CabDNVlS.js} +5 -5
- package/dist/assets/SignInScreen-DfTwbUKW.js +1 -0
- package/dist/assets/SignOutScreen-CH6sLo8r.js +9 -0
- package/dist/assets/{TaskListScreen-Bi73r_uo.js → TaskListScreen-d8rT1QCC.js} +2 -2
- package/dist/assets/TaskRoutes-DVZrk18e.js +9 -0
- package/dist/assets/TransactionDetailRoutes-CkeAEzHU.js +1 -0
- package/dist/assets/{TransactionDetailScreen-DVFrl6h2.js → TransactionDetailScreen-hIkUAVjY.js} +2 -2
- package/dist/assets/TransactionListRoutes-BVLahxTu.js +1 -0
- package/dist/assets/{TreasuryRoutes-BPVOZ6Bj.js → TreasuryRoutes-D4vqz1Fs.js} +5 -5
- package/dist/assets/{VendorsRoutes-CHDVO5Sr.js → VendorsRoutes-Dd9qfBZi.js} +10 -10
- package/dist/assets/WiseConfirmationScreen-B9ReE25J.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-BzLWpyYJ.js → ZeniAccountRoutes-BtAMcoNj.js} +11 -11
- package/dist/assets/ZeniAccountStatementScreen-B3egvFmp.js +9 -0
- package/dist/assets/{accountMappingHelper-Gh8rpbjD.js → accountMappingHelper-mjWJVrZb.js} +1 -1
- package/dist/assets/{analytics-S5MhEivL.js → analytics-cC2XJoxx.js} +1 -1
- package/dist/assets/{analyticsHelper-Ch9SsWjb.js → analyticsHelper-DoCIxX19.js} +1 -1
- package/dist/assets/{core-Cc7wW2EM.js → core-BBG4mxvC.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DhqIXi_U.js → decodeURIComponentSafe-DgKmvHaP.js} +1 -1
- package/dist/assets/{dnd-DEyyKSEC.js → dnd-oIrpOltC.js} +1 -1
- package/dist/assets/{empty-CjY9w6q2.js → empty-BVUnugO_.js} +1 -1
- package/dist/assets/{empty-6MFM8UPN.js → empty-zUa_Ywzm.js} +1 -1
- package/dist/assets/{emptyVideoElement-MGXFhhLz.js → emptyVideoElement-WG4m8gNp.js} +1 -1
- package/dist/assets/epic-Du6qCFYI.js +2 -0
- package/dist/assets/expenseAutomationHelper-BkZxz0F-.js +1 -0
- package/dist/assets/getLocaleForTenant-BYuz_wJa.js +1 -0
- package/dist/assets/{index-Cm43WhAF.js → index-B9QH_oKn.js} +2 -2
- package/dist/assets/{index-DpnxiqBj.js → index-Bgwcwudg.js} +1 -1
- package/dist/assets/{index-ldlm2cjp.js → index-BlZF-J3g.js} +1 -1
- package/dist/assets/{index-D2oCZR3F.js → index-CD8RychW.js} +1 -1
- package/dist/assets/{index-gtGWrJ79.js → index-CyCQjJen.js} +1 -1
- package/dist/assets/{index-vIt7RQvO.js → index-De2R2YuA.js} +15538 -15403
- package/dist/assets/{index-BZ6qOKkD.js → index-DlbH0-p0.js} +1 -1
- package/dist/assets/{index-2QCkbhu2.js → index-lbu92FYh.js} +1 -1
- package/dist/assets/{lexical-DXgKWO29.js → lexical-BRrdO5Cu.js} +1 -1
- package/dist/assets/{liveblocks-CgHUgeBY.js → liveblocks-CzCs-qU3.js} +1 -1
- package/dist/assets/{lottie-C1A2hiZE.js → lottie-ULJlrwjP.js} +1 -1
- package/dist/assets/{mui-C4zFSCiU.js → mui-B2F_PvWe.js} +1 -1
- package/dist/assets/{pathToGoBack-C17GqrA7.js → pathToGoBack-e0pJACvC.js} +1 -1
- package/dist/assets/{pdf-rXyPRm1U.js → pdf-CeVn9A9c.js} +3 -3
- package/dist/assets/{pdf-lib-CsM74zBq.js → pdf-lib-DiMa7ymi.js} +1 -1
- package/dist/assets/{plaid-vsHcqLdj.js → plaid-BWZxX3Bn.js} +1 -1
- package/dist/assets/{pusher-C0EhdUPA.js → pusher-wcP4-1ih.js} +1 -1
- package/dist/assets/{react-CzfY0Vx3.js → react-3Jh1nOTX.js} +1 -1
- package/dist/assets/{react-DG8YneWb.js → react-BrDYknqm.js} +1 -1
- package/dist/assets/{react-Yy9ZuxR6.js → react-CGMaXwI-.js} +1 -1
- package/dist/assets/{react-BU_8yW5D.js → react-Chuw6ptT.js} +1 -1
- package/dist/assets/{react-CEepHjWP.js → react-D7hd8riP.js} +1 -1
- package/dist/assets/{react-Gc0eJCMR.js → react-Dv-IwMT5.js} +1 -1
- package/dist/assets/{recharts-DJGeJ2v_.js → recharts-CzGMTm3v.js} +1 -1
- package/dist/assets/{routePaths-C0UIXwMQ.js → routePaths-BRju88LA.js} +1 -1
- package/dist/assets/{sentry-DSWD_gIh.js → sentry-CWp8Ph3h.js} +1 -1
- package/dist/assets/{stripSplatSuffix-kLnY55Qt.js → stripSplatSuffix-BWJSV6oD.js} +1 -1
- package/dist/assets/{url-DCbpXgdk.js → url-CnTmKJO0.js} +1 -1
- package/dist/assets/{url-DUlo21cY.js → url-DV6CtKQ5.js} +1 -1
- package/dist/assets/useActualMatchingMatchDetail-lnPRleqr.js +1 -0
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-DuZAl-a1.js +1 -0
- package/dist/assets/useAskAiCfoHostNavButtonProps-Bq-fQXG8.js +1 -0
- package/dist/assets/useChargeCardPusherEvents-CrB7Excu.js +1 -0
- package/dist/assets/{useDeviceId-B5zol9VP.js → useDeviceId-Bzw6IkAe.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-x1GFiNhw.js +1 -0
- package/dist/assets/useInitialThreadRequest-C1rKRZSH.js +1 -0
- package/dist/assets/useTaskManagerAccess-CoE1FF6T.js +1 -0
- package/dist/assets/useTaskManagerPusherEvents-CgOrop-a.js +1 -0
- package/dist/assets/{utils-DiIEQ7_h.js → utils-u0mlLj2I.js} +1 -1
- package/dist/assets/withTransactionSidePanel-CbnU34fe.js +25 -0
- package/dist/assets/{zeni-epic-state-BVJjEVAA.js → zeni-epic-state-FRanwwFO.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AccountMappingScreen-xfXO279W.js +0 -9
- package/dist/assets/ActualMatchingMatchDetailScreen-ByqHVLf7.js +0 -1
- package/dist/assets/AddressRoutes-BWVJyPk8.js +0 -1
- package/dist/assets/AppDrawer-B2rHD8Zo.js +0 -10
- package/dist/assets/CardsAiCfoScreen-CTX5PjYy.js +0 -14
- package/dist/assets/CompanyPassportScreen-Df3GjmsH.js +0 -1
- package/dist/assets/ConnectionAuthScreen-CRXLzdg9.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-DSYY256B.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-C2sAsjXY.js +0 -30
- package/dist/assets/DefaultTenantHome-4mMU5w7G.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-DQXD1NSK.js +0 -18
- package/dist/assets/DrawerScreen-DyQejCID.js +0 -1
- package/dist/assets/EntityDetailRoutes-0npRYuOC.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-SlF4KM3u.js +0 -38
- package/dist/assets/FeaturePreviewScreen-OtBPdCPK.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-CtTG0u9D.js +0 -1
- package/dist/assets/InboxNotificationsProvider-CYNlrTK-.js +0 -1
- package/dist/assets/InvoicingRoutes-DBwLj6Ir.js +0 -2
- package/dist/assets/MagicLinkRoutes-D5UwoWcf.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-B_572HKC.js +0 -12
- package/dist/assets/MobileAppDrawer-DLFLa7hS.js +0 -1
- package/dist/assets/NotFoundScreen-DzxbROot.js +0 -1
- package/dist/assets/NotificationRoutes-D7MHUmyT.js +0 -1
- package/dist/assets/OAuthConsentScreen-iNKlAsfd.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-COCZ3G6X.js +0 -1
- package/dist/assets/PeopleRoutes-BkRUXc0D.js +0 -22
- package/dist/assets/PerformanceRoutes-BzDFWREu.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-DPScUcq4.js +0 -1
- package/dist/assets/ReimbursementRoutes-DveTyQyE.js +0 -68
- package/dist/assets/RewardsRoutes-zL93sOaR.js +0 -1
- package/dist/assets/ScreenRoutes-Bl2EONFe.js +0 -2
- package/dist/assets/SignInScreen-CGBu1NjI.js +0 -1
- package/dist/assets/SignOutScreen-D0F6FeVm.js +0 -9
- package/dist/assets/TaskRoutes-DCW1uZnF.js +0 -9
- package/dist/assets/TransactionDetailRoutes-CWMSCIXL.js +0 -1
- package/dist/assets/TransactionListRoutes-B3tJhd_n.js +0 -1
- package/dist/assets/WiseConfirmationScreen-Du3rEKnE.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-DaV7I7ku.js +0 -9
- package/dist/assets/epic-D9Y6xcsI.js +0 -2
- package/dist/assets/expenseAutomationHelper-iXuIUZiF.js +0 -1
- package/dist/assets/getLocaleForTenant-Bgt5rFzV.js +0 -1
- package/dist/assets/useActualMatchingMatchDetail-CwcmHDQ8.js +0 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-BFr557mr.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-7-6nPEHY.js +0 -1
- package/dist/assets/useChargeCardPusherEvents-BVr00Fos.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-HcMCYvt9.js +0 -1
- package/dist/assets/useInitialThreadRequest-D4Y8xhXu.js +0 -1
- package/dist/assets/useTaskManagerAccess-BeNfkHpZ.js +0 -1
- package/dist/assets/useTaskManagerPusherEvents-X_H33C0C.js +0 -1
- package/dist/assets/withTransactionSidePanel-DkQdwLfY.js +0 -25
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CgHUgeBY.js";import{u as ne,j as k,h as X,g as J,i as se,N as P,l as Q,q as lt,n as mt,o as E}from"./core-Cc7wW2EM.js";import{fF as V,NG as ct,_U as be,c8 as ge,MM as Ue,ma as dt,M$ as me,M_ as ce,_V as ut,bn as he,gV as $e,_W as pt,WT as bt,l$ as Fe,WU as Ae,WV as gt,kN as ht,YX as ft,l0 as St,MA as It,Cd as yt,kU as Rt,Nl as Le,_X as Me,_Y as ke,_Z as vt,__ as At,_$ as kt,N5 as Ce,l6 as Ct,Z4 as wt,MZ as Et,MK as xt,$0 as Bt,MJ as Tt,$1 as Dt,MR as we,N9 as jt,N8 as Ut,N4 as $t,$2 as _e,Sj as Ft,bo as Lt,MU as Mt,ND as _t,$3 as Pt,$4 as Nt,Nh as Ot,Ne as Ee,Yr as Zt,MH as Gt,$5 as Pe,O4 as xe,Oc as zt,$6 as Vt,$7 as Y,$8 as Wt,$9 as Ne,$a as Ht,$b as Oe,$c as Ze,Nt as de,bu as qt,bK as fe,cM as Se,d_ as Ge,dZ as ze,$d as Yt,gh as Kt,YE as Jt,$e as Xt,$f as Ve,YI as Qt,Zq as en,$g as tn,ZP as nn,O9 as Be,O8 as an,$h as sn,$i as on,$j as rn,$k as ln,$l as mn,Za as cn,N$ as dn,O3 as un,bq as pn,bJ as bn,cG as gn,cu as hn,bt as fn,Ui as Sn,da as In,dd as yn,dc as Rn,cF as vn}from"./zeni-epic-state-BVJjEVAA.js";import{bU as An,F as We,a2 as He,N as ie,f as j,z as F,cT as qe,a9 as oe,j as C,aT as Te,K as D,af as ae,ag as kn,G as Ye,cU as Cn,p as K,at as Ke,cV as wn,P as re,cW as En,ar as xn,ac as Bn,a8 as Ie,U as Je,w as Tn,bC as Dn,aw as jn,aj as Un,E as Xe,cX as $n,g as Fn}from"./index-vIt7RQvO.js";import{n as N,S as Ln}from"./mui-C4zFSCiU.js";import ue from"./NotFoundScreen-DzxbROot.js";import{S as De}from"./SetupPagesScreen-B8kiMdZf.js";import{F as Qe}from"./FeaturePreviewScreen-OtBPdCPK.js";import{a as f}from"./sentry-DSWD_gIh.js";import{u as ye}from"./useAskAiCfoHostNavButtonProps-7-6nPEHY.js";import{u as et}from"./useInitialThreadRequest-D4Y8xhXu.js";import{D as Mn}from"./DrawerScreen-DyQejCID.js";import{M as tt}from"./MobileAppDrawer-DLFLa7hS.js";import{F as _n}from"./ScreenRoutes-Bl2EONFe.js";import{R as Pn}from"./ReimbursementApprovalRoutes-DPScUcq4.js";import"./recharts-DJGeJ2v_.js";import"./analytics-S5MhEivL.js";import"./plaid-vsHcqLdj.js";import"./dnd-DEyyKSEC.js";import"./stripe-cKAAJElX.js";import"./lottie-C1A2hiZE.js";import"./lexical-DXgKWO29.js";import"./pdf-rXyPRm1U.js";import"./utils-DiIEQ7_h.js";import"./BusinessVerificationPageScreen-C-aPhqey.js";import"./routePaths-C0UIXwMQ.js";import"./analyticsHelper-Ch9SsWjb.js";import"./InboxNotificationsProvider-CYNlrTK-.js";import"./useTaskManagerAccess-BeNfkHpZ.js";import"./getLocaleForTenant-Bgt5rFzV.js";import"./ReimbursementApprovalRuleDetailScreen-BxglZgWl.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]="699e2401-6784-4ef3-8a9b-624c61b739a8",e._sentryDebugIdIdentifier="sentry-dbid-699e2401-6784-4ef3-8a9b-624c61b739a8")}catch{}})();const nt=e=>`/${e}/reimbursements`,Nn=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:te}}}=Ye.getLocalizedStrings(),On=Q((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),c=F.getSignedInUser(),d=he(c),m=r.plaidConnectionDetails,o=$e(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=be(e,t.reimbursementId),b=pt(e,c?.userId??"");let y=`${c?.firstName} ${c?.lastName}`,u=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=c?.userId===l.createdBy?.userId);const x=e.entityAutoCompleteState?.autoCompleteText?.common,I=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:x,entityAutoCompleteView:I},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:ge(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Fe(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=F.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ce(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(we(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e($t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Ut())},clearRemiSaveStatus:()=>{e(jt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(we(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Dt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Tt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Bt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(xt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Et({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ce(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(wt({data:l}))},onFetchBankName:i=>{e(Ct(i))},submitRemiDetails:()=>{e(Ce("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(ke({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(me({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(kt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(At({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(vt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Me()),e(ke({}));const i=nt(o),l=K(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(Le(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(Ae("common"))},onCancelAutoComplete:()=>{e(Ae("common"))}}}}))(Cn);function je(){const e=X(),t=ne(),n=J(),{reimbursementId:r}=se(),c=We(),d=He(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=ie(),{isFeatureEnabled:b}=l(j.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(j.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:u,onAskAiCfoClick:x}=ye({mobileExploreReferrer:"Reimbursement Details"}),I=J().pathname,B=I.includes("edit"),T=I.includes("reimbursement/new"),[R,w]=f.useState(!1),h=F.getSignedInUser(),v=k((p=>V(p))),g=k((p=>be(p,r))),L=et(v?.companyId,{clearParams:g.fetchState==="Completed"}),U=ge(v?.userRole??[]);(function(){const p=ne(),M=k((_=>V(_))),O=M?.tenantId,{isApprovalRulesV3Enabled:W,isLoading:Z}=An(O),H=k((_=>_.remiSetupApproverViewState.fetchState));f.useEffect((()=>{O==null||Z||H==="Not-Started"&&p(ct(!0,!1,!1,W))}),[O,Z,W,H,p])})(),f.useEffect((()=>{(T&&!R||B&&!R&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(w(!0),t(Ue(!1,b,y,r)))}));const $=k((p=>dt(p.accountState,p.accountListState,"reimbursementAccountList")));if(h==null)throw Error("Can't access address page without signing in...");const A={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||U&&g.billStatus==="rejected"||U===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(P,{to:A}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(qe,{isNewReimbursement:r==null}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(oe,{analytics:C,onLoad:p=>(M=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&M.trackReimbursementEditReimbursement(r)})(p)}),m&&d!=="small"?s.jsx(Gn,{}):null,m&&d!=="small"?s.jsx(zn,{children:s.jsx(Te,{showAutofill:m,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:v?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ce(p,a,!0,r,h?.userId))},updateInvoiceUploadFetchState:p=>{t(me({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:D.sp3,paddingBottom:"15px",paddingLeft:D.sp5},dropFilePlaceholder:{upload:q.upload,single:te.dropReceipt.single,or:q.texts.or,multiple:te.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,m&&d==="small"?s.jsxs(Vn,{children:[s.jsx(Wn,{onClick:()=>o(!1),children:s.jsx(Nn,{})}),s.jsx(Te,{showAutofill:m,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:v?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ce(p,a,!0,r,h?.userId))},updateInvoiceUploadFetchState:p=>{t(me({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:D.sp5,paddingRight:D.sp3,paddingBottom:D.sp5,paddingLeft:D.sp3},dropFilePlaceholder:{upload:q.upload,single:te.dropReceipt.single,or:q.texts.or,multiple:te.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Hn,{windowSize:d,children:s.jsx(On,{initialOpenThreadRequest:L??void 0,location:n,navigate:e,currentTenant:v,reimbursementId:r,themeState:c,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:u,onAskAiCfoClick:x})})]})}const Zn=N.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
|
-
`,Gn=N.div`
|
|
8
|
-
position: fixed;
|
|
9
|
-
top: 0;
|
|
10
|
-
left: 0;
|
|
11
|
-
right: 0;
|
|
12
|
-
bottom: 0;
|
|
13
|
-
background-color: ${kn.overlayBackgroundBlack};
|
|
14
|
-
z-index: 5;
|
|
15
|
-
`,zn=N.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=N.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
|
-
`,Wn=N.button`
|
|
37
|
-
align-self: flex-end;
|
|
38
|
-
background: none;
|
|
39
|
-
border: none;
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
padding: ${D.sp2} ${D.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: ${D.sp4};
|
|
49
|
-
height: ${D.sp4};
|
|
50
|
-
}
|
|
51
|
-
`,Hn=N.div`
|
|
52
|
-
display: flex;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
width: 100%;
|
|
55
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
56
|
-
`,qn=Q((function(e,t){const n=_e(e,t.reimbursementId),r=F.getSignedInUser(),c=he(r),d=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:d??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Pt(n.remiActivities,Nt(t.currentTenant),r));const i=ge(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:c,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:Fe(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e(Me());const a=nt(o),i=K(c.state?.pathnameStackToGoBack,c.pathname);d(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(Gt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Zt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(Ee(n,a.type,"")):e(Ee(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=K(c.state?.pathnameStackToGoBack,c.pathname);d("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{C.trackReimbursementDeleteReimbursement(n),e(Le(n))},cancelAndDeleteReport:a=>{a===!0?C.trackReimbursementCancelAndDeleteReimbursement(n):C.trackReimbursementCancelReimbursement(n),e(Ot(n,a))},handleZeniLogoClick:()=>{m.toggle()}}}))(wn);function Yn(){const e=X(),t=ne(),n=J(),r=n.hash.substring(1),c=We(),{reimbursementId:d}=se(),m=F.getSignedInUser(),o=k((A=>V(A))),a=k((A=>_e(A,d??""))),i=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=et(o?.companyId,{clearParams:a.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:b,onAskAiCfoClick:y}=ye({mobileExploreReferrer:"Reimbursement Details"});Ke({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:u}=ie(),{isFeatureEnabled:x}=u(j.isLimitedCategoryForReimbursement),[I,B]=f.useState(!1),[T,R]=f.useState(!1),[w,h]=f.useState(!1),{isFeatureEnabled:v}=u(j.isShowDeletedReimbursementsFeatureEnabled),g=k((A=>be(A,d??""))),L=Ft(o),U=Lt(o.userRole),$=a.fetchState;if(f.useEffect((()=>{I||d==null?I==1&&$==="Error"&&e("page-not-found",{replace:!0}):(B(!0),t(Mt(d,!1,v)))}),[I,d,t,$]),f.useEffect((()=>{v&&a.remiDetails?.isDeleted===!0||o.isZeni===!0&&m?.userEmailDomain==="zeni.ai"&&L===!1?h(!1):h(a.remiActivities[0]?.isRealTimeApprovalEnabled&&(U||a.allApprovers.find((A=>A.user.userId===m?.userId))!=null||a.remiDetails?.lastUpdatedBy===m?.userId))}),[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,U,o.isZeni,L,m]),f.useEffect((()=>{T||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||g.fetchState=="Completed"||g.fetchState=="In-Progress"||(R(!0),t(Ue(!1,x,v,d)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(_t(!1,!0,!0,a.lastUpdatedByUserId)))}),[T,a,d,t]),m==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx(P,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(qe,{}):s.jsxs(s.Fragment,{children:[s.jsx(oe,{analytics:C,onLoad:A=>(p=>{d!=null&&p.trackReimbursementReimbursementDetails(d)})(A)}),s.jsx(qn,{initialOpenThreadRequest:l??void 0,scrollId:r,isShowDeletedReimbursementEnabled:v,location:n,navigate:e,isRealTimeApprovalEnabled:w,currentTenant:o,reimbursementId:d??"",themeState:c,isAiCfoAccessEnabled:b,onAskAiCfoClick:y})]})}const Kn=Q((function(e,t){return{remisReviewView:Pe(e),analytics:t.analytics}}),(function(e,t){return{onCloseOverlay:()=>{t.navigate(`/${t.tenantEmailDomain}/reimbursements`),e(Y())},onCloseReviewItem:n=>{e(Vt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(zt());break;case"approve":e(xe("approved",r??""));break;case"reject":e(xe("rejected",r??""))}}}}))(En);function Jn({tenantEmailDomain:e}){const t=X(),n=k((m=>m.remisBulkActionViewState.bulkSubmissionFetchState.fetchState)),{remisForReview:r}=k((m=>Pe(m))),c=re(),d=c?.loggedInUserRole?.includes("admin")===!0;return f.useEffect((()=>{n!=="Completed"&&r.length!==0||t(`/${e}/reimbursements`)}),[n,r.length,e]),s.jsx(Kn,{navigate:t,analytics:C,isAdmin:d,tenantEmailDomain:e})}const z=Qt(),at="bulk-operation-update",pe="reimbursement-approval-rule-update",{spendManagement:Xn,common:le}=Ye.getLocalizedStrings(),Qn=Xn.reimbursement.bulkActions,ea=N.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=Q((function(e,t){const n=Ze(e,z,t.isBulkActionEnabled);let r=n.allSubTabs;const c=F.getSignedInUser(),d=he(c),m=e.tenantState.currentTenantId,o=V(e),a=o?.companyName??"",i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter((u=>u!=="deleted")));const b=n.fetchState,y=en(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter((u=>u.isDeleted===!1)),isAdmin:t.isAdmin,isZeniUser:d,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:b,botEmail:n.reimbursementBotEmail,analytics:C,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:z,spendManagementEndPoint:`${jn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:y.affectedEntityIds}}),(function(e,t){const{navigate:n,currentTenant:r,location:c,period:d}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(Y()),e(Ne(o))},onSubtabChange:o=>{e(Y()),e(Oe(o))},onTransactionClick:(o,a)=>{const i=sa(m,o,a),l=K(c.state?.pathnameStackToGoBack,c.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=aa(m),a=K(c.state?.pathnameStackToGoBack,c.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;C?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=K(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:i}})},onColumnSortConfigChanged:(o,a)=>{e(mn({uiState:{sortKey:o,sortOrder:a},period:t.period}))},onSearchTextChanged:o=>{e(ln(o))},onFiltersChange:o=>{e(rn({filters:o})),o.categories.every((a=>a.field!=null&&a.values?.length!==0))&&C.trackSpendManagmentFilterChange("reimbursement",o.categories.map((a=>`${a.field}-${JSON.stringify(a.values)}`)))},updateDownloadStateHandler:o=>{o==="In-Progress"&&C.trackSpendManagementDownloadClick("reimbursement"),e(on({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(de(d,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(sn(o))},removeAllTransactionsFromBulkActionList:()=>{e(Y())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(an(o,a??""));break;case"send_for_approval":e(Be("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(Be("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(pe)&&e(nn(!1))},onEventReceived:o=>{o===at&&e(tn())}}}))(Tn(Dn));function na(){const e=X(),t=ne(),n=J(),r=n.state,c=He(),[d,m]=f.useState(null),o=lt("/:tenantEmailDomain/reimbursements/bulk-review")!=null;f.useEffect((()=>{if(r?.tab!=null&&r?.subTab!=null){const S=Wt(r.tab.toString());S!=null?t(Ne(S)):console.log("Warning:Not a valid remiListTab");const G=Ht(r.subTab.toString());G!=null?t(Oe(G)):console.log("Warning:Not a valid remiListSubTab")}return()=>{t(Y())}}),[]);const{useFeatureGate:a}=ie(),{isFeatureEnabled:i}=a(j.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:l}=a(j.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:b}=a(j.isReimbursementBulkActionEnabled),y=F.getSignedInUser(),u=k((S=>V(S))),[x,I]=f.useState(!1),[B,T]=f.useState(!1),R=re(),w=R?.loggedInUserRole?.includes("admin")===!0,h=k((S=>Ze(S,z,b))),{areTenantIdsInSync:v}=xn(),g=h.fetchState,{isAiCfoAccessEnabled:L,onAskAiCfoClick:U}=ye({mobileExploreReferrer:"Reimbursement List"});if(Ke({isDataReady:g==="Completed"}),f.useEffect((()=>{!B&&v&&(T(!0),t(de(z,!0,l,!1,!0)))}),[B,z,t,v]),y==null)throw Error("Can't access address page without signing in...");const $=!!u?.userRole&&qt(u),A=fe(R?.loggedInUserRoleMap),p=Se(R?.loggedInUserRoleMap),M=!!u.userReimbursementInfo?.isReimbursementTOSAccepted,O=!!u.companyReimbursementInfo?.info?.isReimbursementEnabled,W=!!u.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,Z=k((S=>$e(S.companyState,u.companyId))),H=Z?.company.featuresActivationInfo.connectedAccountProvider,_=S=>{I(S)},{isFeatureEnabled:st}=a(j.isDebitCardFeatureEnabled),it=Ge(st,u),ot=ze(u),{remisProcessed:ee,remisProcessing:Re}=k((S=>Yt(S)));f.useEffect((()=>{ee===Re&&d!=null&&(t(Kt({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:ee>1?le.texts.reports2:Qn.report},{variableName:"_has_",variableValue:ee>1?le.texts.have:le.texts.has},{variableName:"_action_",variableValue:Jt(d)}]})),t(Xt()),setTimeout((()=>{t(de(z,!0,l,!1,!0,!0))}),3e3),m(null))}),[ee,Re]);const rt={events:u.companyId!=null?[`private-encrypted-${u.companyId}.${at}`,`private-encrypted-${u.companyId}.${pe}`]:[],eventCallback:(S,G,ve)=>{S.endsWith(pe)?ve.onReimbursementApprovalRulesEventReceived?.(S):G.entity_type==="reimbursement"&&(m(G.operation_type),ve.onEventReceived(S))}};return n.pathname.endsWith("/reimbursements/")||n.pathname.endsWith("/reimbursements")||n.pathname.endsWith("/reimbursements/bulk-review")?it===!0||ot===!0?s.jsx(Qe,{}):O&&(!$||A)||p&&M?s.jsxs(s.Fragment,{children:[g==="Completed"?s.jsx(oe,{analytics:C,onLoad:S=>(G=>G.trackPageLoaded(Je.Event.reimbursementHome))(S)}):null,s.jsx(tt,{isAppContentDrawerOpen:x,handleDrawerToggle:_}),s.jsxs(ea,{windowSize:c,children:[s.jsx(Mn,{isOpen:o,drawerLeftMargin:new Bn(0,0,300,600),onClose:()=>{e(`/${u.tenantEmailDomain}/reimbursements`),t(Y())},children:s.jsx(ia,{onClick:S=>S.stopPropagation(),children:s.jsx(Jn,{tenantEmailDomain:u.tenantEmailDomain})})}),s.jsx(ta,{isShowDeletedBillsEnabled:i,isShowDeletedReimbursementEnabled:l,location:n,navigate:e,currentTenant:u,period:z,isAdmin:w,isEmployee:$,entity:"reimbursement",onClickMenuIcon:()=>{_(!0)},createdByUserList:h.createdByUserList,createdByUserListFetchState:h.createdByUserListFetchState,isDownloadEnabled:h.isDownloadEnabled,connectedAccountProvider:H,isBulkActionEnabled:b,bulkSubmissionLimit:h.remiBulkSubmissionLimit,bulkSubmissionFetchState:h.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:L,onAskAiCfoClick:U,...rt})]})]}):W&&A?s.jsx(P,{to:"../setup"}):R!=null&&Ve(u,R.loggedInUserRoleMap)?s.jsx(P,{to:"../promo"}):s.jsx(Ie,{fetchState:"In-Progress"}):s.jsx(ue,{})}const aa=e=>`/${e}/reimbursements/setup`,sa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},ia=N(Ln)`
|
|
65
|
-
display: flex;
|
|
66
|
-
min-height: 100%;
|
|
67
|
-
flex-direction: column;
|
|
68
|
-
`,oa=Q((function(e,t){const{companyId:n}=t;return{reimbursementSetupView:cn(e,n),analytics:C,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"})}}}))($n),ra=()=>{const e=Un(),t=X(),n=J(),{tenantEmailDomain:r}=se(),c=Xe(),[d,m]=f.useState(!1),o=k((w=>V(w))),a=F.getSignedInUserTenant(r)?.companyId??o.companyId,i=F.getSignedInUser(),l=o.userRoleId,b=!!o.userRole?.includes("reimbursements_user"),y=re(),u=fe(y?.loggedInUserRoleMap),x=Se(y?.loggedInUserRoleMap),I=!!o.userReimbursementInfo?.isReimbursementTOSAccepted,B=!!o.companyReimbursementInfo?.info?.isReimbursementEnabled,T=!!o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,R=w=>{m(w)};if(i==null)throw Error("Can't access reimbursement promo page without signing in...");return B&&x&&I?s.jsx(P,{to:"../../../reimbursements"}):T&&u?s.jsx(P,{to:"../../reimbursements/setup"}):o.companyReimbursementInfo&&!T||o.userReimbursementInfo&&x&&I===!1?s.jsxs(s.Fragment,{children:[s.jsx(oe,{analytics:C,onLoad:w=>(h=>h.trackPageLoaded(Je.Event.reimbursementPromoPage))(w)}),s.jsx(tt,{isAppContentDrawerOpen:d,handleDrawerToggle:R}),s.jsx(oa,{companyId:a,navigate:t,meetingUrl:e("reimbursement_promo"),location:n,userReimbursementInfo:o.userReimbursementInfo,userRoleId:l,isEmployee:b,onClickMenuIcon:()=>{R(!0)}})]}):s.jsx(Ie,{fetchState:"In-Progress",style:{backgroundColor:c.colors.grey5}})};function Pa(){const e=k((_=>V(_))),t=re(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=Xe(),c=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,d=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:m}=ie(),{isFeatureEnabled:o}=m(j.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=m(j.isDebitCardFeatureEnabled),i=Ge(a,e),l=ze(e),b=e?.userRole!=null&&pn(e?.userRole),y=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!b)&&bn(t?.loggedInUserRoleMap),u=gn(t?.loggedInUserRoleMap),x=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!b,I=fe(t?.loggedInUserRoleMap),B=x&&I,T=!!e.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!b,R=T&&hn(t?.loggedInUserRoleMap),w=Fn(e,o,a)&&!b,h=w&&fn(t?.loggedInUserRoleMap),v=Sn(t?.loggedInUserRoleMap),g=In(t?.loggedInUserRoleMap),L=yn(t?.loggedInUserRoleMap),U=T&&g,$=e.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!b&&L,A=Rn(t?.loggedInUserRoleMap),p=vn(t?.loggedInUserRoleMap),M=Se(t?.loggedInUserRoleMap),O=w&&A,{tenantEmailDomain:W}=se(),Z=J(),H=n===!0&&(I||M&&d);return s.jsxs(mt,{children:[Z.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(E,{path:"verification",element:s.jsx(De,{isBillPayAdminLevelAccess:y,isUserHasOnlyBillPayAccess:u,isReimbursementAdminLevelAccess:B,isZeniAccountAdminLevelAccess:R,isChargeCardAdminLevelAccess:h,isUserHasOnlyCardAccess:v,productType:"reimbursement",type:"verification"})}),s.jsx(E,{path:"setup",element:s.jsx(De,{isBillPayAdminLevelAccess:y,isUserHasOnlyBillPayAccess:u,isReimbursementAdminLevelAccess:B,isZeniAccountAdminLevelAccess:R,isChargeCardAdminLevelAccess:h,isUserHasOnlyCardAccess:v,productType:"reimbursement",type:"setup"})}),s.jsx(E,{path:"promo",element:s.jsx(ra,{})}),s.jsx(E,{path:"approval-rules/*",element:B?s.jsx(Pn,{}):s.jsx(_n,{showZeniAccountRoute:U,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:M,showTreasuryRoute:$,isTenantBankingOnly:i,showChargeCardRoute:O,tenantEmailDomain:W??""})}),H&&s.jsx(E,{path:"*",element:s.jsx(na,{})}),(i===!0||l===!0)&&s.jsx(E,{path:"/*",element:s.jsx(Qe,{})}),t!=null&&Ve(e,t?.loggedInUserRoleMap)&&s.jsx(E,{path:"*",element:s.jsx(P,{to:"../promo"})}),c&&I&&s.jsx(E,{path:"*",element:s.jsx(P,{to:"../setup"})})]}):Z.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(E,{path:"new",element:s.jsx(je,{})}),s.jsx(E,{path:":reimbursementId",element:s.jsx(Yn,{})}),s.jsx(E,{path:":reimbursementId/edit",element:s.jsx(je,{})}),s.jsx(E,{path:"*",element:s.jsx(ue,{})})]}):s.jsx(E,{path:"*",element:s.jsx(Ie,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${D.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(E,{path:"*",element:s.jsx(ue,{})})]})}export{Pa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-CgHUgeBY.js";import{z as b,a9 as v,j as u,U as D,e3 as E,N as k,f as I}from"./index-vIt7RQvO.js";import"./mui-C4zFSCiU.js";import g from"./NotFoundScreen-DzxbROot.js";import{a as c}from"./sentry-DSWD_gIh.js";import{u as C,j as h,h as F,g as L,l as U,n as T,o as f,N as y}from"./core-Cc7wW2EM.js";import{fF as _,a1$ as j,a20 as p,DS as P,p$ as V,a21 as $,DQ as z}from"./zeni-epic-state-BVJjEVAA.js";import"./recharts-DJGeJ2v_.js";import"./analytics-S5MhEivL.js";import"./plaid-vsHcqLdj.js";import"./dnd-DEyyKSEC.js";import"./stripe-cKAAJElX.js";import"./lottie-C1A2hiZE.js";import"./lexical-DXgKWO29.js";import"./pdf-rXyPRm1U.js";import"./utils-DiIEQ7_h.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]="e44b5a7d-a8bf-469a-9d90-7b2f64fd5f8e",e._sentryDebugIdIdentifier="sentry-dbid-e44b5a7d-a8bf-469a-9d90-7b2f64fd5f8e")}catch{}})();const G=U((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((l=>{s.push(l.companyName),r.push(l.emailIds[0])})),u.trackInviteEmailClicked("send",s,r,s.length)}e(z())},onUpdateInviteFormLocalData:s=>{e($({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&u.trackInviteEmailClicked("cancel")}}}))(E),Q=()=>{const e=C(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>_(o))),l=F(),w=L(),d=b.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const m=h((o=>j(o))),x=d?.firstName!=null?d.firstName:"User";c.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),c.useEffect((()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[m.fetchState,e]);const N=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(v,{analytics:u,onLoad:o=>(S=>S.trackPageLoaded(D.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:l,location:w,currentTenant:r,companyName:N,userName:x,inviteFormCompayData:m.localData})]})};function ne(){const{useFeatureGate:e}=k(),{isFeatureEnabled:t}=e(I.isReferralFeatureEnabled);return a.jsxs(T,{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(Q,{}):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-DzxbROot.js","assets/sentry-DSWD_gIh.js","assets/core-Cc7wW2EM.js","assets/zeni-epic-state-BVJjEVAA.js","assets/index-vIt7RQvO.js","assets/mui-C4zFSCiU.js","assets/analytics-S5MhEivL.js","assets/utils-DiIEQ7_h.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-B3_TJQND.js","assets/withTransactionSidePanel-DkQdwLfY.js","assets/useAskAiCfoHostNavButtonProps-7-6nPEHY.js","assets/TransactionDetailScreen-DVFrl6h2.js","assets/decodeURIComponentSafe-DhqIXi_U.js","assets/useInitialThreadRequest-D4Y8xhXu.js","assets/routePaths-C0UIXwMQ.js","assets/expenseAutomationHelper-iXuIUZiF.js","assets/stripSplatSuffix-kLnY55Qt.js","assets/analyticsHelper-Ch9SsWjb.js","assets/CompanyPassportScreen-Df3GjmsH.js","assets/MobileAppDrawer-DLFLa7hS.js","assets/InboxNotificationsProvider-CYNlrTK-.js","assets/useTaskManagerAccess-BeNfkHpZ.js","assets/useAiCfoDashboardSuggestedQuestionsChips-BFr557mr.js","assets/FeaturePreviewScreen-OtBPdCPK.js","assets/BillPayRoutes-Dmusj5HX.js","assets/AddressScreen-CrPViFiu.js","assets/DomesticWireDetailScreen-DQXD1NSK.js","assets/BusinessVerificationPageScreen-C-aPhqey.js","assets/DrawerScreen-DyQejCID.js","assets/SetupPagesScreen-B8kiMdZf.js","assets/BillPayApprovalRoutes-CMAUuUUB.js","assets/ReimbursementApprovalRuleDetailScreen-BxglZgWl.js","assets/getLocaleForTenant-Bgt5rFzV.js","assets/ReimbursementRoutes-DveTyQyE.js","assets/ReimbursementApprovalRoutes-DPScUcq4.js","assets/TransactionListRoutes-B3tJhd_n.js","assets/ZeniAccountStatementScreen-DaV7I7ku.js","assets/SettingsRoutes-hveOvbi9.js","assets/AccountMappingScreen-xfXO279W.js","assets/QBOConnectionScreen-DreC-yDW.js","assets/empty-6MFM8UPN.js","assets/index-2QCkbhu2.js","assets/url-DUlo21cY.js","assets/index-D2oCZR3F.js","assets/accountMappingHelper-Gh8rpbjD.js","assets/useEmailConnectResultRefresh-HcMCYvt9.js","assets/ReportsRoutes-BZjyXdiB.js","assets/ChargeCardRoutes-JBiL4Thy.js","assets/useChargeCardPusherEvents-BVr00Fos.js","assets/PeopleRoutes-BkRUXc0D.js","assets/ExpenseAutomationRoutes-SlF4KM3u.js","assets/useActualMatchingMatchDetail-CwcmHDQ8.js","assets/ScheduleDetailsPrepaidExpensesScreen-PbMzJVD9.js","assets/pathToGoBack-C17GqrA7.js","assets/TreasuryRoutes-BPVOZ6Bj.js","assets/VendorsRoutes-CHDVO5Sr.js","assets/ZeniAccountRoutes-BzLWpyYJ.js","assets/AddressRoutes-BWVJyPk8.js","assets/PandLWithForecastRoutes-COCZ3G6X.js","assets/CustomerOnboardingRoutes-C2sAsjXY.js","assets/TransactionDetailRoutes-CWMSCIXL.js","assets/EntityDetailRoutes-0npRYuOC.js","assets/InvoicingRoutes-DBwLj6Ir.js","assets/NotificationRoutes-D7MHUmyT.js","assets/PerformanceRoutes-BzDFWREu.js","assets/ActualMatchingMatchDetailScreen-ByqHVLf7.js","assets/RewardsRoutes-zL93sOaR.js","assets/TaskRoutes-DCW1uZnF.js","assets/TaskListScreen-Bi73r_uo.js","assets/useTaskManagerPusherEvents-X_H33C0C.js","assets/AiCfoScreen-DXsXYKZU.js","assets/CardsAiCfoScreen-CTX5PjYy.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as s,bn as hs,fF as ps,d_ as xs,dZ as gs,B1 as Rs,di as js,c8 as Is,gJ as Ts,g9 as As,df as pe,cG as fs,gn as bs,cy as Ds,bE as ys,br as Cs,Ue as vs,v as Us,Uh as Os,bq as Ps,Ui as ws,bK as Fs,bJ as Ls,bt as ks,cu as Vs,Uj as Hs,Uk as Ss,da as Bs,dd as Ns,dc as Ms,cF as Zs,cM as Gs,pS as xe,gi as ge,gY as $s,gk as Re,gL as je,gM as Ie,gl as zs}from"./zeni-epic-state-BVJjEVAA.js";import{j as e}from"./liveblocks-CgHUgeBY.js";import{a as P}from"./sentry-DSWD_gIh.js";import{N as u,u as Ys,h as qs,i as Ws,g as Js,j as G,q as Te,n as Xs,o as n}from"./core-Cc7wW2EM.js";import{M as l,E as Ks,u as Qs,z as y,N as et,d as st,V as tt,f as B,g as nt,X as at,P as ot,L as F,G as Ae,t as _,Q as it,R as rt,S as lt,j as ne}from"./index-vIt7RQvO.js";import"./mui-C4zFSCiU.js";import{f as fe}from"./analyticsHelper-Ch9SsWjb.js";import{t as ut}from"./getLocaleForTenant-Bgt5rFzV.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},b=new o.Error().stack;b&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[b]="3185506a-23f4-48ad-b9ef-9e04dbfad680",o._sentryDebugIdIdentifier="sentry-dbid-3185506a-23f4-48ad-b9ef-9e04dbfad680")}catch{}})();const dt=l((()=>s((()=>import("./NotFoundScreen-DzxbROot.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ct=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),mt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),be=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),De=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),C=({showZeniAccountRoute:o,isUserHasBillPayAccess:b,isUserHasReimbursementAccess:N,showTreasuryRoute:r,isTenantBankingOnly:k,showChargeCardRoute:U,tenantEmailDomain:v})=>{if(k===!0){if(o)return e.jsx(De,{tenantEmailDomain:v});if(r)return e.jsx(be,{tenantEmailDomain:v});if(U)return e.jsx(ye,{tenantEmailDomain:v})}return o?e.jsx(De,{tenantEmailDomain:v}):r?e.jsx(be,{tenantEmailDomain:v}):U?e.jsx(ye,{tenantEmailDomain:v}):b?e.jsx(mt,{tenantEmailDomain:v}):N?e.jsx(ct,{tenantEmailDomain:v}):e.jsx(dt,{})},_t={dashboard:()=>s((()=>import("./DashboardRoutes-B3_TJQND.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,8])),bills:()=>s((()=>import("./BillPayRoutes-Dmusj5HX.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-DveTyQyE.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])),transactions:()=>s((()=>import("./TransactionListRoutes-B3tJhd_n.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])),settings:()=>s((()=>import("./SettingsRoutes-hveOvbi9.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])),reports:()=>s((()=>import("./ReportsRoutes-BZjyXdiB.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-JBiL4Thy.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])),people:()=>s((()=>import("./PeopleRoutes-BkRUXc0D.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-SlF4KM3u.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])),treasury:()=>s((()=>import("./TreasuryRoutes-BPVOZ6Bj.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])),vendors:()=>s((()=>import("./VendorsRoutes-CHDVO5Sr.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-BzLWpyYJ.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8]))},Et=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},ht=l((()=>s((()=>import("./ReportsRoutes-BZjyXdiB.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])))),pt=l((()=>s((()=>import("./AddressRoutes-BWVJyPk8.js")),__vite__mapDeps([58,1,2,3,26,4,5,6,7,0,8])))),xt=l((()=>s((()=>import("./PeopleRoutes-BkRUXc0D.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])))),gt=l((()=>s((()=>import("./PandLWithForecastRoutes-COCZ3G6X.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,24,11,14,15,20,21,22,8])))),Rt=l((()=>s((()=>import("./CustomerOnboardingRoutes-C2sAsjXY.js")),__vite__mapDeps([60,1,2,3,26,4,5,6,7,0,40,41,42,43,44,13,46,49,8])))),jt=l((()=>s((()=>import("./VendorsRoutes-CHDVO5Sr.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])))),It=l((()=>s((()=>import("./TransactionDetailRoutes-CWMSCIXL.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-0npRYuOC.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),Tt=l((()=>s((()=>import("./DashboardRoutes-B3_TJQND.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,8])))),ve=l((()=>s((()=>import("./BillPayRoutes-Dmusj5HX.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])))),At=l((()=>s((()=>import("./SettingsRoutes-hveOvbi9.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])))),ft=l((()=>s((()=>import("./InvoicingRoutes-DBwLj6Ir.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,26,0,20,21,22,40,41,42,43,44,13,8])))),Ue=l((()=>s((()=>import("./ReimbursementRoutes-DveTyQyE.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])))),bt=l((()=>s((()=>import("./ZeniAccountRoutes-BzLWpyYJ.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8])))),Dt=l((()=>s((()=>import("./TreasuryRoutes-BPVOZ6Bj.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])))),yt=l((()=>s((()=>import("./TransactionListRoutes-B3tJhd_n.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])))),Ct=l((()=>s((()=>import("./ChargeCardRoutes-JBiL4Thy.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])))),vt=l((()=>s((()=>import("./NotificationRoutes-D7MHUmyT.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,11,22,8])))),Ut=l((()=>s((()=>import("./PerformanceRoutes-BzDFWREu.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,11,20,21,22,8])))),Ot=l((()=>s((()=>import("./ExpenseAutomationRoutes-SlF4KM3u.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])))),Pt=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-ByqHVLf7.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,52,17,13,15,0,8])))),wt=l((()=>s((()=>import("./RewardsRoutes-zL93sOaR.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,0,8])))),Ft=l((()=>s((()=>import("./TaskRoutes-DCW1uZnF.js")),__vite__mapDeps([68,1,2,3,0,4,5,6,7,14,20,21,22,69,11,70,8])))),Lt=l((()=>s((()=>import("./AiCfoScreen-DXsXYKZU.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,23,54,15,70,8])))),Oe=l((()=>s((()=>import("./CardsAiCfoScreen-CTX5PjYy.js")),__vite__mapDeps([72,1,2,3,4,5,6,7,8])))),f=l((()=>s((()=>import("./NotFoundScreen-DzxbROot.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),kt=l((()=>s((()=>import("./TaskListScreen-Bi73r_uo.js").then((o=>o.f))),__vite__mapDeps([69,1,2,3,4,5,6,7,11,20,21,22,70,8])))),Vt=({isDashboardAccess:o,showZeniAccountRoute:b,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:r,showTreasuryRoute:k,isTenantBankingOnly:U,isTenantCardsOnly:v,showChargeCardRoute:V})=>{if(U===!0){if(b)return e.jsx(u,{to:"checking"});if(k)return e.jsx(u,{to:"treasury"});if(V)return e.jsx(u,{to:"cards"})}return v===!0&&V?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):b?e.jsx(u,{to:"checking"}):k?e.jsx(u,{to:"treasury"}):V?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):r?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Pe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),zt=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const b=Ys(),N=qs(),{tenantEmailDomain:r}=Ws(),k=Ks().mode,{setLoading:U,clearAllLoading:v,clearLoading:V}=Qs(),D=y.getSignedInUserTenant(r)?.tenantId,I=y.getSignedInUser(),J=hs(I),$=Js(),[L,we]=P.useState(!1),i=G((a=>ps(a))),{useFeatureGate:H}=et(),M=st(),X=tt(),Fe=!!i.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=i.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ke}=H(B.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=H(B.isDebitCardFeatureEnabled),T=G((a=>a.tenantState.fetchState)),p=G((a=>a.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?xs(oe,i):void 0,K=p==="Completed"||T==="Completed"?gs(i):void 0,ie=p==="Completed"||T==="Completed"?Rs(i)&&!js(i):void 0,Ve=nt(i,ke,oe),{isCardsHidden:He}=at(i?.tenantId),Se=!Ve||!!He,{isFeatureEnabled:Be}=H(B.isSettingsFeatureEnabled),{isFeatureEnabled:Q}=H(B.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=H(B.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||lt==="DEV",Ze=i?.userRole!=null&&Is(i.userRole),z=G((a=>Ts(a)));if(r!=null){const a=y.getSignedInUserTenant(r);I!=null&&a!=null&&fe(I,i,k)}const Z={tenantId:D,userId:I?.userId,sessionId:I?.zeniSessionId},re=As(),h=ot(),Ge=i.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),$e=fs(h?.loggedInUserRoleMap),ee=Te("/:tenantEmailDomain/onboarding/*")!==null,ze=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=ze?.params.selectedPeriod,Ye=G((a=>Z.tenantId!=null?bs(a,Z.tenantId):void 0));P.useEffect((()=>{U(F.TENANT_FETCHING),o(r)}),[r]),P.useEffect((()=>{if(se!=null&&D!=null){const a=se.split("-");if(a.length===2){const A=Ds(Number(a[0])),c=Number(a[1]),t=ys(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=Cs();t.isAfter(d,"month")===!1?b(vs(D,{month:A,year:c})):N(`/${r}/month_end_close_checks/review`)}}}),[se,r,D]),P.useEffect((()=>{L||(we(!0),U(F.TENANT_FETCHING))}),[L,Z,re,I,b,y]),P.useLayoutEffect((()=>{!Us(re,Z)&&y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(a,A,c,t){if(ge(A?.userId,A?.zeniSessionId,a.tenantId),c($s(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=y.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(ut(t)),d?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?ne.identify(a.userId,{tenant_id:a.tenantId}):ne.resetUserIdentity()})(Z,I,b,Ye))}),[D]),P.useEffect((()=>{y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(a,A,c,t,d,Y,S){if(c==null&&t==null)return void console.warn("There is no current tenant selected!!");const q=t!=null&&d?.zeniSessionId!=null,ms=c==null||c.tenantId!==t,_s=c!=null&&c.excludedResources==null,Es=c!=null&&c.externalConnections==null;if(q&&ms){S(Re(t));const W=y.getSignedInUserTenantWithId(t);W?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(W?.tenantEmailDomain),ge(d?.userId,d?.zeniSessionId,t),_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),S(je(d.userId,t))),_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),S(Ie(d.userId,t)))}else q&&_s&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),S(je(d.userId,t))),q&&Es&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),S(Ie(d.userId,t)));if(q){ne.identify(d.userId,{tenant_id:t});const W=t==null||t!=null&&(A==="Completed"||A==="Error");a==="Completed"||A!=="Not-Started"&&A!=="Error"||t==null||!_.shouldFetchActiveTenant(t)||(_.markActiveTenantFetchStarted(t),Y(F.TENANT_FETCHING),S(zs(d.userId,t,d.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),S(xe(d.userId,d.zeniSessionId)))}})(T,p,i,D,I,U,b))}),[D,p]),P.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&z.tenantsBaseInOrder.length>0&&(V(F.TENANT_FETCHING),y.saveSignedInUserTenants(Os(z.tenantsBaseInOrder)),I!=null&&fe(I,i,k,void 0,z.tenantsBaseInOrder))}),[z,T,i,I]),P.useEffect((()=>{p==="In-Progress"&&U(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&D!=null?(v(),_.markActiveTenantFetchCompleted(D)):p==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),V(F.TENANT_FETCHING),V(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,D,L]);const le=P.useRef(!1);P.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(a=Et,A=3e3){setTimeout((()=>{const c=t=>{if(t>=a.length)return;const d=a[t],Y=_t[d];Y!=null?Y().then((()=>ae((()=>c(t+1))))).catch((()=>ae((()=>c(t+1))))):c(t+1)};ae((()=>c(0)))}),A)})())}),[p,L]);const O=i?.userRole!=null&&Ps(i?.userRole),{isFeatureEnabled:qe}=H(B.isReferralFeatureEnabled),{isFeatureEnabled:We}=H(B.isAccrualEnabled),Je=it(),Xe=i?.userRole!=null&&i.userRole.includes("charge_card_user"),Ke=i?.userRole!=null&&i.userRole.includes("charge_card_admin"),w=i?.userRole!=null&&pe(i.userRole),ue=i?.company==null||i.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!O,de=!Se&&!O,Qe=ws(h?.loggedInUserRoleMap),es=i.externalConnections?.accounting[0]?.isValid,ss=i.externalConnections?.fetchState==="Completed",te=i.company?.companyOnboardingInfo.isOnboardingCompleted,ce=i?.company==null||i.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!O,me=ce&&Fs(h?.loggedInUserRoleMap),_e=Fe&&!O,ts=Le&&!O,ns=ue&&Ls(h?.loggedInUserRoleMap),as=de&&ks(h?.loggedInUserRoleMap),os=_e&&Vs(h?.loggedInUserRoleMap),is=Hs(h?.loggedInUserRoleMap),rs=Ss(h?.loggedInUserRoleMap),ls=Bs(h?.loggedInUserRoleMap),us=Ns(h?.loggedInUserRoleMap),ds=Ms(h?.loggedInUserRoleMap),x=Zs(h?.loggedInUserRoleMap),g=Gs(h?.loggedInUserRoleMap),Ee=ue&&x,he=ce&&g,R=_e&&ls,j=ts&&us,m=de&&ds,cs=i.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||$e===!0||Qe===!0||is===!0||rs===!0;return y.isSignedIn()?D==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&T!=="In-Progress"&&b(xe(I.userId,I.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(te===!0||J&&!ee)&&ss&&es!==!0&&E===!1&&K===!1&&ie===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||ie!==!0||te!==!0||ee||J?!L||te!==!1||ee||J?L&&i?.userRole&&E!=null&&K!=null&&r!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Xs,{children:e.jsxs(n,{element:e.jsx(rt,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Vt,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,isTenantCardsOnly:K,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(Tt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(ht,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"people/*",element:cs||w?e.jsx(xt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(gt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(Rt,{})}),e.jsx(n,{path:"transaction/*",element:w&&O===!1||Xe||Ke?e.jsx(It,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"transactions/*",element:w&&O===!1?e.jsx(yt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"customer/*",element:w&&O===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,isTenantBankingOnly:E,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"vendor/*",element:w&&O===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"tasks",element:e.jsx(kt,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Ft,{})}),e.jsx(n,{path:"address/*",element:ns||me||os||as?e.jsx(pt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(bt,{}):e.jsx(f,{})}),e.jsx(n,{path:"treasury/*",element:j?e.jsx(Dt,{}):e.jsx(f,{})}),e.jsx(n,{path:"performance",element:X===!0?e.jsx(Ut,{}):e.jsx(Pe,{tenantEmailDomain:r})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:X===!0&&O===!1?e.jsx(Ot,{}):e.jsx(Pe,{tenantEmailDomain:r})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:X===!0&&O===!1&&We===!0&&Je===!0?e.jsx(Pt,{}):e.jsx(f,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(vt,{})}),e.jsx(n,{path:"vendors/*",element:Ge?e.jsx(jt,{}):e.jsx(f,{})}),e.jsx(n,{path:"bill/*",element:Ee?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"bills/*",element:Ee?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"reimbursement/*",element:he?e.jsx(Ue,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"reimbursements/*",element:he?e.jsx(Ue,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"settings/*",element:Be?e.jsx(At,{hasAdminLevelAccess:me}):e.jsx(f,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(ft,{}):e.jsx(f,{})}),e.jsx(n,{path:"cards/ask",element:m&&M?e.jsx(Oe,{isFileUploadEnabled:Q}):e.jsx(f,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Oe,{isFileUploadEnabled:Q}):e.jsx(f,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(Ct,{}):e.jsx(f,{})}),e.jsx(n,{path:"rewards/*",element:qe?e.jsx(wt,{}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:M?e.jsx(Lt,{isFileUploadEnabled:Q}):e.jsx(f,{})}),e.jsx(n,{path:"*",element:e.jsx(f,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${r}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${r}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{C as F,zt as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-CgHUgeBY.js";import{a as f,R as T,q as A}from"./sentry-DSWD_gIh.js";import{u as j,h as z,j as l,g as D,N as F,l as M}from"./core-Cc7wW2EM.js";import{u as P,z as s,E as O,j as w,G as _,T as N,U as B,W as $,Y as V,Z as W,_ as v}from"./index-vIt7RQvO.js";import{fF as Z,TZ as q,Uh as J,gi as R,gk as G,Um as H,gU as Y,dj as K,Un as y,Uo as Q,Up as X,b$ as U}from"./zeni-epic-state-BVJjEVAA.js";import"./mui-C4zFSCiU.js";import{u as ee}from"./useDeviceId-B5zol9VP.js";import{f as te}from"./analyticsHelper-Ch9SsWjb.js";import{t as ne}from"./getLocaleForTenant-Bgt5rFzV.js";import"./recharts-DJGeJ2v_.js";import"./analytics-S5MhEivL.js";import"./plaid-vsHcqLdj.js";import"./dnd-DEyyKSEC.js";import"./stripe-cKAAJElX.js";import"./lottie-C1A2hiZE.js";import"./lexical-DXgKWO29.js";import"./pdf-rXyPRm1U.js";import"./utils-DiIEQ7_h.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]="92221e39-e6c0-46fe-8803-b9b4e5379961",t._sentryDebugIdIdentifier="sentry-dbid-92221e39-e6c0-46fe-8803-b9b4e5379961")}catch{}})();const ie=M((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(X({authCode:n,oauthProvider:a,appType:"web",redirectUri:U(c),sourceUri:U(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(y())}}}))(W),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=j(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();f.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:h,accountLocked:b,accountUnlockTime:k}=l((e=>e.tenantState)),p=l((e=>e.tenantState.fetchState)),L=l((e=>e.tenantState.activeTenantFetchState.fetchState)),S=l((e=>e.tenantState.signInState)),o=l((e=>e.tenantState.loggedInUser)),r=l((e=>Z(e))),I=l((e=>q(e))),m=D(),E=O().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(f.useEffect((()=>{h.fetchState==="Completed"&&c!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[h.fetchState,c]),f.useEffect((()=>{t(void 0)}),[]),f.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(J(I.tenantsInOrder),o.zeniSessionId),R(o.userId,o.zeniSessionId,r.tenantId),i(G(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(H("Completed")),_.updateAppLocaleID(ne(r)),te(o,r,E,void 0,I.tenantsInOrder),Y().then((()=>{const e=V();e!=null&&N(e)})),setTimeout((()=>{w.trackLogin(B.Event.loginSuccess,o.authProvider??"google",K(r.productSettings))}),2e3))}),[S,p,L,o,r,I,E,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return u.jsx(F,{to:e,state:{...m.state,origin:""}})}return u.jsxs(u.Fragment,{children:[u.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),b===!0&&k!=null?u.jsx($,{onClose:()=>i(y()),unlockDate:k}):null]})}export{ve as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CgHUgeBY.js";import{a as i}from"./sentry-DSWD_gIh.js";import{u as l,g as c,N as u}from"./core-Cc7wW2EM.js";import{z as n,j as a,U as m,a8 as p}from"./index-vIt7RQvO.js";import{gX as g,UD as b}from"./zeni-epic-state-BVJjEVAA.js";import{n as y}from"./mui-C4zFSCiU.js";import"./recharts-DJGeJ2v_.js";import"./analytics-S5MhEivL.js";import"./plaid-vsHcqLdj.js";import"./dnd-DEyyKSEC.js";import"./stripe-cKAAJElX.js";import"./lottie-C1A2hiZE.js";import"./lexical-DXgKWO29.js";import"./pdf-rXyPRm1U.js";import"./utils-DiIEQ7_h.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]="ebd7ff5c-b405-4124-bb6b-727d77d8440d",e._sentryDebugIdIdentifier="sentry-dbid-ebd7ff5c-b405-4124-bb6b-727d77d8440d")}catch{}})();function N(){const e=l(),t=c(),r=i.useRef(!1),d=n.isSignedIn(),o=t.state?.message==="logout"||d;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),b(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(f){console.error("Error during sign out:",f)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?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: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;export{N as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-CgHUgeBY.js";import de from"./NotFoundScreen-DzxbROot.js";import{a as k}from"./sentry-DSWD_gIh.js";import{h as H,u as ee,j as E,g as ue,i as ke,N as pe,l as me,n as Se,o as b}from"./core-Cc7wW2EM.js";import{Q3 as ae,Q6 as fe,Q0 as Te,a22 as ge,fF as te,a23 as se,Qs as g,Qk as T,PZ as he,QY as be,QR as Ee,a24 as ne,gh as oe,a25 as Z,PV as Ie,PS as De,uX as Ce,uL as Ge,mz as _e,Qi as Re,a26 as Ue,R9 as ye,Qe as xe,QD as we,QA as Be,Q9 as Ae,Qx as je,Qw as ve}from"./zeni-epic-state-BVJjEVAA.js";import{z as R,e4 as Pe,F as Fe,N as Le,f as G,a5 as ie,p as _,a9 as Ke,j as q,U as Qe,e5 as $e,_ as M,af as Ne}from"./index-vIt7RQvO.js";import{n as ze}from"./mui-C4zFSCiU.js";import{u as Oe}from"./useInitialThreadRequest-D4Y8xhXu.js";import{M as Ve}from"./MobileAppDrawer-DLFLa7hS.js";import{b as Ze,a as qe,T as f,t as Me,c as X,d as Y,e as Xe}from"./TaskListScreen-Bi73r_uo.js";import{u as Ye}from"./useTaskManagerPusherEvents-X_H33C0C.js";import"./recharts-DJGeJ2v_.js";import"./analytics-S5MhEivL.js";import"./plaid-vsHcqLdj.js";import"./dnd-DEyyKSEC.js";import"./stripe-cKAAJElX.js";import"./lottie-C1A2hiZE.js";import"./lexical-DXgKWO29.js";import"./pdf-rXyPRm1U.js";import"./utils-DiIEQ7_h.js";import"./InboxNotificationsProvider-CYNlrTK-.js";import"./useTaskManagerAccess-BeNfkHpZ.js";import"./useAskAiCfoHostNavButtonProps-7-6nPEHY.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]="1b9fd9a2-c8f9-43d1-a573-5d6c97bdf4fb",e._sentryDebugIdIdentifier="sentry-dbid-1b9fd9a2-c8f9-43d1-a573-5d6c97bdf4fb")}catch{}})();function Je(){const e=H(),a=ee(),n=R.getSignedInUser(),{cannedResponses:c,fetchState:s,saveFetchState:d}=E((o=>o.cannedResponsesState)),u=k.useCallback((()=>{a(ae())}),[a]),m=k.useCallback(((o,I,D)=>{a(fe({name:o,content:I,cannedResponseId:D}))}),[a]),t=k.useCallback((o=>{a(Te({cannedResponseId:o}))}),[a]);if(n==null)throw Error("Can't access quick responses page without signing in...");return r.jsx(Pe,{cannedResponses:c,isLoading:s==="In-Progress"||s==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:t,onFetch:u,onSave:m})}const L=e=>e?.taskState?.taskByID,P=(e,a)=>{const n=L(e);if(a!=null&&n!=null)return n[a]?.parentTaskId??void 0},We=ge([P,(e,a)=>{const n=P(e,a),c=L(e);if(n!=null&&c!=null)return c[n]?.name},(e,a)=>{const n=P(e,a),c=L(e);return n!=null&&c!=null&&c[n]!=null}],((e,a,n)=>{if(e!=null&&n===!0)return{id:e,name:a??""}}));let J,W=[];const He=me((function(e,a){const{location:n,taskGroupId:c}=a,s=ne(e,a.taskId),d=te(e),u=We(e,a.taskId),m=s.taskGroupId??c,t=m!=null?Z(e.taskGroupState,m):void 0,o=R.getSignedInUser(),I=d.tenantId,D={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:I??""},w=se(e),{tenantEmailDomain:B}=d,U=s.recurringSourceTaskId,A=U!=null?`${M.appUrl}/${B}/tasks/${encodeURIComponent(U)}`:void 0;var h;return{taskDetailSelectorView:s,authParams:D,isZeniUser:R.isZeniUser(),userGroupList:((h=e.userGroupsState.userGroupByUserGroupId)!==J&&(J=h,W=Object.values(h)),W),isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:Ne.fileMicroServiceBaseUrl,companyName:a.currentTenant.companyName,companyId:a.currentTenant.companyId,currentUrl:`${M.appUrl}${a.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:A,tagListView:w,taskGroupName:m!=null&&t!=null&&t.isDefault===!1?t.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((S=>Z(e.taskGroupState,S))).filter((S=>S!=null&&!S.isDeleted)).map((S=>({id:S.id,name:S.name,isDefault:S.isDefault}))),subtasks:s.subtasks,parentTaskRef:u,subTaskCreateStatus:e.taskDetailState?.subTaskCreateStatus?.fetchState}}),(function(e,a){const{taskId:n,navigate:c,currentTenant:s,location:d,taskGroupId:u}=a,{tenantEmailDomain:m}=s;return{onSaveChangesToLocalStore:t=>{e(ve({taskDetailLocalData:t,taskId:n}))},onSaveDetailClick:t=>{e(je(n,t??u))},onArchiveTaskClick:()=>{a.taskId!=null&&e(Ae(a.taskId))},onSnoozeTask:(t,o)=>{e(Be(t,o))},onUnsnoozeTask:t=>{e(we(t))},onCreateSubtask:(t,o)=>{e(xe({...o,parentTaskId:t}))},onSubtaskUpdate:(t,o)=>{e(ye({task:t,updates:o}))},onShowToast:t=>{e(oe(t))},onSubtaskRowClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:_(d.state?.pathnameStackToGoBack,d.pathname)}})},onParentBreadcrumbClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:_(d.state?.pathnameStackToGoBack,d.pathname)}})},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const t=ie(d.state?.pathnameStackToGoBack),o=t.poppedPathname??"../../dashboard";c(o,{state:{pathnameStackToGoBack:t.newStack}})}else{const t=x(m),o=_(d.state?.pathnameStackToGoBack,d.pathname);c(t,{state:{pathnameStackToGoBack:o}})}e(Ue({taskId:n}))},onDeleteTaskClick:()=>{e(Re(n))},updateFilesEntity:t=>{e(_e({files:t}))},onDeleteFile:t=>{e(Ge(t))},onEditFileName:(t,o)=>{e(Ce(t,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(g(!1,n))},onCreateTagClick:t=>{e(De(t,n))},onDeleteTagClick:t=>{e(Ie(t,n))},onFetchCannedResponses:()=>{e(ae())},onManageTemplatesClick:()=>{c(`/${s.tenantEmailDomain}/tasks/quick-responses`)}}}))($e);function F(){const e=H(),a=ee(),n=ue(),c=Fe(),{taskId:s,taskGroupId:d}=ke(),u=E((i=>te(i))),m=Oe(u?.companyId),{useFeatureGate:t}=Le(),{isFeatureEnabled:o}=t(G.isTaskSnoozeEnabled),{isFeatureEnabled:I}=t(G.isTaskVisibilityEnabled),{isFeatureEnabled:D}=t(G.isTaskCannedResponsesEnabled),{isFeatureEnabled:w}=t(G.isTaskRecurringParentEnabled),{isFeatureEnabled:B}=t(G.isTaskGroupAssigneesEnabled),[U,A]=k.useState(!1),[h,S]=k.useState(!1),[K,re]=k.useState(!1),[Q,j]=k.useState(!1),C=k.useRef(!1),y=E((i=>i.taskListState.updateTasksFetchState.fetchState)),$=E((i=>se(i))),N=E((i=>i.taskGroupViewState.fetchState));k.useEffect((()=>{a(g(!1,s)),s!=null&&a(T(s))}),[a,s]);const z=R.getSignedInUser()?.userId,ce=k.useMemo((()=>{const i=[f.TASK_CREATED,f.TASK_UPDATED,f.TASKS_BULK_UPDATED,f.TASKS_BULK_DELETED],l=[...i,f.TASK_SNOOZE_RESURFACED];return[...Ze(u?.companyId,i),...qe(z,l)]}),[u?.companyId,z]);Ye({events:ce,onSubscribed:()=>{s!=null&&(a(g(!0,s)),a(T(s)))},onEvent:(i,l)=>{if(s!=null)switch(i){case f.TASK_CREATED:{Y(l)?.parent_task_id===s&&(a(g(!0,s)),a(T(s)));break}case f.TASK_UPDATED:{const p=Y(l);if(p==null)break;p.task_id===s?(a(g(!0,s)),a(T(s))):p.parent_task_id===s&&a(T(s));break}case f.TASKS_BULK_UPDATED:{const p=X(l);if(p==null)break;p.task_ids.includes(s)&&a(g(!0,s)),a(T(s));break}case f.TASKS_BULK_DELETED:{const p=X(l);if(p==null)break;if(p.task_ids.includes(s)){a(oe({messageSection:"delete_task",messageText:"success",type:"success"})),u?.tenantEmailDomain!=null&&e(x(u.tenantEmailDomain));break}a(T(s));break}case f.TASK_SNOOZE_RESURFACED:{Me(l)?.task_id===s&&a(g(!0,s));break}}}}),k.useEffect((()=>{h||$.fetchState==="Completed"||(S(!0),a(he()))}),[h,a,$.fetchState]),k.useEffect((()=>{K||N==="Completed"||(re(!0),a(be()))}),[K,a,N]);const le=k.useCallback((()=>{s!=null&&(C.current=!1,a(Ee([s],null,{isArchived:!1})),j(!0))}),[a,s]);k.useEffect((()=>{if(Q)if(y!=="In-Progress"){if(C.current){if(y==="Error")return j(!1),void(C.current=!1);if(y==="Completed"){j(!1),C.current=!1;const{tenantEmailDomain:i}=u;if(n.state?.message==="triggerBackClick"){const l=ie(n.state?.pathnameStackToGoBack);e(l.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:l.newStack}})}else{const l=x(i);e(l,{state:{pathnameStackToGoBack:_(n.state?.pathnameStackToGoBack,n.pathname)}})}}}}else C.current=!0}),[Q,y,u,n,e]);const O=E((i=>ne(i,s))),v=O.fetchState,V=R.getSignedInUser();if(V==null)throw Error("Can't access task detail page without signing in...");if(v==="Error"&&O.error?.code===400){const{tenantEmailDomain:i}=u,l=x(i),p=_(n.state?.pathnameStackToGoBack,n.pathname);return r.jsx(pe,{to:l,state:{pathnameStackToGoBack:p}})}return r.jsxs(r.Fragment,{children:[v==="Completed"?r.jsx(Ke,{analytics:q,onLoad:i=>(l=>l.trackPageLoaded(Qe.Event.taskDetailPage))(i)}):null,r.jsxs(ea,{children:[r.jsx(Ve,{isAppContentDrawerOpen:U,handleDrawerToggle:i=>{A(i)}}),r.jsx(He,{analytics:q,currentTenant:u,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:m,location:n,loggedInUser:V,navigate:e,taskGroupId:d,taskId:s,taskDetailFetchState:v,onUnarchiveTaskClick:le,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:I,isTaskCannedResponsesEnabled:D,isTaskRecurringParentEnabled:w,isTaskGroupAssigneesEnabled:B})]})]})}const ea=ze.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
|
-
`,x=e=>`/${e}/tasks`;function Ca(){return r.jsxs(Se,{children:[r.jsx(b,{path:"/new",element:r.jsx(F,{})}),r.jsx(b,{path:"/new/:taskGroupId",element:r.jsx(F,{})}),r.jsx(b,{path:"/group/:taskGroupId",element:r.jsx(Xe,{})}),r.jsx(b,{path:"/quick-responses",element:r.jsx(Je,{})}),r.jsx(b,{path:"/:taskId",element:r.jsx(F,{})}),r.jsx(b,{path:"*",element:r.jsx(de,{})})]})}export{Ca as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-CgHUgeBY.js";import i from"./NotFoundScreen-DzxbROot.js";import{T as r}from"./TransactionDetailScreen-DVFrl6h2.js";import"./sentry-DSWD_gIh.js";import{n as a,o as e}from"./core-Cc7wW2EM.js";import"./zeni-epic-state-BVJjEVAA.js";import"./recharts-DJGeJ2v_.js";import"./index-vIt7RQvO.js";import"./mui-C4zFSCiU.js";import"./analytics-S5MhEivL.js";import"./plaid-vsHcqLdj.js";import"./dnd-DEyyKSEC.js";import"./stripe-cKAAJElX.js";import"./lottie-C1A2hiZE.js";import"./lexical-DXgKWO29.js";import"./pdf-rXyPRm1U.js";import"./utils-DiIEQ7_h.js";import"./useAskAiCfoHostNavButtonProps-7-6nPEHY.js";import"./decodeURIComponentSafe-DhqIXi_U.js";import"./useInitialThreadRequest-D4Y8xhXu.js";import"./routePaths-C0UIXwMQ.js";import"./expenseAutomationHelper-iXuIUZiF.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new o.Error().stack;n&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[n]="bfd19369-9f5a-4875-9ff9-f0a50fe2624d",o._sentryDebugIdIdentifier="sentry-dbid-bfd19369-9f5a-4875-9ff9-f0a50fe2624d")}catch{}})();function z(){return t.jsxs(a,{children:[t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(e,{path:"/*",element:t.jsx(r,{})})]})}export{z as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CgHUgeBY.js";import{h as K,g as J,u as Z,i as H,j as g,N as U,l as Q,n as Me,o as M}from"./core-Cc7wW2EM.js";import{fF as q,ua as X,lf as p,eE as ee,S6 as Ae,br as me,$K as Ce,l$ as te,Wg as ae,$L as pe,$M as Be,bE as k,S2 as Se,$N as Le,$O as fe,$P as Fe,S5 as he,$Q as Oe,$R as Te,$S as $e,$T as ge,$U as Ge,$V as ze,$W as De,Ti as we}from"./zeni-epic-state-BVJjEVAA.js";import{N as ne,f as ce,j as L,G as Ie,de as oe,p as R,a5 as se,ar as Re,V as Ve}from"./index-vIt7RQvO.js";import"./mui-C4zFSCiU.js";import{a as y}from"./sentry-DSWD_gIh.js";import{w as ie}from"./withTransactionSidePanel-DkQdwLfY.js";import{p as re,c as de}from"./routePaths-C0UIXwMQ.js";import{B as _e}from"./utils-DiIEQ7_h.js";import{d as j}from"./decodeURIComponentSafe-DhqIXi_U.js";import{Z as Ne}from"./ZeniAccountStatementScreen-DaV7I7ku.js";import"./recharts-DJGeJ2v_.js";import"./analytics-S5MhEivL.js";import"./plaid-vsHcqLdj.js";import"./dnd-DEyyKSEC.js";import"./stripe-cKAAJElX.js";import"./lottie-C1A2hiZE.js";import"./lexical-DXgKWO29.js";import"./pdf-rXyPRm1U.js";import"./useAskAiCfoHostNavButtonProps-7-6nPEHY.js";import"./TransactionDetailScreen-DVFrl6h2.js";import"./useInitialThreadRequest-D4Y8xhXu.js";import"./expenseAutomationHelper-iXuIUZiF.js";import"./stripSplatSuffix-kLnY55Qt.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="75cef979-2b35-4a9c-b9b4-052198b13b69",a._sentryDebugIdIdentifier="sentry-dbid-75cef979-2b35-4a9c-b9b4-052198b13b69")}catch{}})();const Je=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],N=a=>_e(a),ke=()=>{const{common:a,uncategorizedTransactionList:e}=Ie.getLocalizedStrings();return{amount:e.missingReceipt.missingReceiptMinAmount.amount,currencyCode:a.currency.currencyCode,currencySymbol:a.currency.currencySymbol}},Ue=Q((function(a,e){const t=Ce(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,N(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=N(e.selectedAccount.tranListType),d=Ke(t,n,c,o,e.bookCloseDate);L.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(pe({uiState:{dateRange:d},type:N(e.selectedAccount.tranListType)})),a(Ae(o,p(d),!1,o==="missingReceipts"?ke():void 0)),e.onSelectedTimePeriodChange(p(d))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({uiState:{scrollYOffset:t},type:N(e.selectedAccount.tranListType)}))}}}))(oe),_=ie((function({...a}){const e=K(),t=J(),n=Z(),c=t.pathname.split("/").find((l=>Je.includes(l))),o=c??"uncategorized-expense",{tenantEmailDomain:d}=H(),{accountType:Y,title:b,subTitle:A}=qe(o),f="month",T=g((l=>q(l))),v=T.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:S}=ne(),{isFeatureEnabled:h}=S(ce.isProjectsTransactionsEnabled),I=g((l=>X(l)))&&h,{dataAvailable:x,initialTimeframeTick:F}=We(o,v,T.bookCloseDate),[P,O]=y.useState(!1),[E,$]=y.useState(void 0),u=y.useMemo((()=>{const l=p(F);return{tranListType:o,accountType:ee(Y),title:b,subTitle:A,timeframe:f,period:l}}),[o,f,Y,x]);y.useEffect((()=>{if(!P&&u!=null){O(!0),L.trackTransactionList(void 0,void 0,void 0,u.title);const l=N(u.tranListType);n(Ae(l,u.period,!0,l==="missingReceipts"?ke():void 0))}}),[P,u,n]);let C=u;return u!=null&&E!=null&&(C={...u,period:E}),c==null||C==null?s.jsx(U,{to:"../"}):s.jsx(Ue,{firstMonthOfFY:v,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:x,navigate:e,showProjectField:I,selectedAccount:C,referrerType:o,bookCloseDate:T.bookCloseDate,onSelectedTimePeriodChange:l=>$(l),...a})})),qe=a=>{let e="",t="";const n=Ie.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.common.texts.uncategorizedExpenses;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.common.texts.receipts}return{accountType:e,title:t,subTitle:""}},We=(a,e,t)=>{const n=me();let c=me().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:re(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ke=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Ze=Q((function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ye();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(Se(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(oe),He=ie((function({referrerType:a,...e}){const t=K(),n=J(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,classIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=H(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),F=g((r=>Be(r.transactionListState,h,S,I))),[P,O]=y.useState(!1),[E,$]=y.useState(void 0),u=g((r=>q(r))),C=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ne(),{isFeatureEnabled:m}=l(ce.isProjectsTransactionsEnabled),z=g((r=>X(r)))&&m;let i;const G=Qe(S,h,I,A,f,T,x);if(G){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},w=Xe(F?.dateRange,r);i={accountId:h,accountType:ee(S),classId:I,title:x,timeframe:A,period:w}}y.useEffect((()=>{P||i==null||(O(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(Se(i.accountId,i.accountType,i.classId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const V=[d,Y,b,A,f,T,v].filter((r=>r!=null));return G&&B!=null?s.jsx(Ze,{firstMonthOfFY:C,tenantEmailDomain:o,location:n,navigate:t,showProjectField:z,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>$(r),...e}):s.jsx(U,{to:Ye(V.length)})})),Ye=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Qe=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,Xe=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),et=Q((function(a,e){const t=Oe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??be();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(he(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(oe),tt=ie((function({referrerType:a,...e}){const t=K(),n=J(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,projectIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=H(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),F=g((r=>Fe(r.transactionListState,h,S,I))),[P,O]=y.useState(!1),[E,$]=y.useState(void 0),u=g((r=>q(r))),C=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ne(),{isFeatureEnabled:m}=l(ce.isProjectsTransactionsEnabled),z=g((r=>X(r)))&&m;let i;const G=at(S,h,I,A,f,T,x);if(G){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},w=nt(F?.dateRange,r);i={accountId:h,accountType:ee(S),projectId:I,title:x,timeframe:A,period:w}}y.useEffect((()=>{P||i==null||(O(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(he(i.accountId,i.accountType,i.projectId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const V=[d,Y,b,A,f,T,v].filter((r=>r!=null));return G&&B!=null?s.jsx(et,{firstMonthOfFY:C,tenantEmailDomain:o,location:n,navigate:t,showProjectField:z,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>$(r),...e}):s.jsx(U,{to:be(V.length)})})),be=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},at=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,nt=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),ct=Q((function(a,e){const t=Ge(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ze(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ve();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=it(e.tenantEmailDomain),n=R(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(oe),ye=ie((function({referrerType:a,...e}){const t=K(),n=J(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,timeframe:b,startDate:A,endDate:f,titleEncoded:T,excludeSubAccounts:v}=H(),S=j(d??""),h=j(Y??""),I=j(T??""),x=!(v!=null&&v==="exclude_subaccounts"),F=g((D=>$e(D.transactionListState,h,S))),[P,O]=y.useState(!1),[E,$]=y.useState(void 0),u=g((D=>q(D))),C=u.company?.featuresActivationInfo.connectedAccountProvider==="unit",l=u.company?.companyInfo.firstMonthOfFY??1;let m;const z=ot(S,h,b,A,f,I);if(z){const D={startDate:k(A,"YYYY-MM-DD"),endDate:k(f,"YYYY-MM-DD")},le=st(F?.dateRange,D);m={accountId:h,accountType:ee(S),title:I,timeframe:b,period:le}}let i=m;m!=null&&E!=null&&(i={...m,period:E});const{useFeatureGate:G}=ne(),B=y.useCallback(((D,le)=>{if(o==null)return;const ue=D.url.split(`/${o}/`)[1];if(ue==null)return;const[Ee,je]=ue.split("?"),W=new URLSearchParams(je??"");W.set("view","full"),W.set("thread_id",le),W.set("entity_type",D.entityType);const xe=R(n.state?.pathnameStackToGoBack,n.pathname);t(`/${o}/${Ee}?${W.toString()}`,{state:{pathnameStackToGoBack:xe}})}),[t,o,n.state,n.pathname]),{isFeatureEnabled:V}=G(ce.isProjectsTransactionsEnabled),r=g((D=>X(D)))&&V,{areTenantIdsInSync:w}=Re();y.useEffect((()=>{!P&&m!=null&&w&&(O(!0),L.trackTransactionList(m.accountId,void 0,a,m.title),c(ge(m.accountId,m.accountType,m.period,void 0,!1,x)))}),[P,m,c,w]);const Pe=[d,Y,b,A,f,T].filter((D=>D!=null));return z&&i!=null?s.jsx(ct,{firstMonthOfFY:l,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:C,onCommentThreadClick:B,showProjectField:r,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:D=>$(D),...e}):s.jsx(U,{to:ve(Pe.length)})})),ve=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},ot=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&k(n,"YYYY-MM-DD").isValid()&&k(c,"YYYY-MM-DD").isValid()&&o!=null,st=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),it=a=>`/${a}/transactions/${we}/statements`;function Ct(){const a=J().state?.referrer,e=g((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[g((n=>q(n))).tenantId],t=Ve();return s.jsxs(Me,{children:[s.jsx(M,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(ye,{referrerType:a})}),s.jsx(M,{path:"/zeni-clearing-account/statements",element:s.jsx(Ne,{})}),s.jsx(M,{path:"/*",element:s.jsx(ye,{referrerType:a})}),s.jsx(M,{path:"/uncategorized-income/*",element:s.jsx(_,{})}),s.jsx(M,{path:"/uncategorized-expense/*",element:s.jsx(_,{})}),s.jsx(M,{path:"/miscategorized-income/*",element:s.jsx(_,{})}),s.jsx(M,{path:"/miscategorized-expense/*",element:s.jsx(_,{})}),s.jsx(M,{path:"/missing-receipts/*",element:t?s.jsx(U,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(_,{})}),s.jsx(M,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(He,{referrerType:a})}),s.jsx(M,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(tt,{referrerType:a})})]})}export{Ct as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-CgHUgeBY.js";import{a as l}from"./sentry-DSWD_gIh.js";import{t as u,u as h,j as y,N as I}from"./core-Cc7wW2EM.js";import{UA as b,gi as w,JD as j}from"./zeni-epic-state-BVJjEVAA.js";import{z as f,a8 as x,ag as S,ah as D}from"./index-vIt7RQvO.js";import{n as g}from"./mui-C4zFSCiU.js";import"./recharts-DJGeJ2v_.js";import"./analytics-S5MhEivL.js";import"./plaid-vsHcqLdj.js";import"./dnd-DEyyKSEC.js";import"./stripe-cKAAJElX.js";import"./lottie-C1A2hiZE.js";import"./lexical-DXgKWO29.js";import"./pdf-rXyPRm1U.js";import"./utils-DiIEQ7_h.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]="d20c9811-4153-46da-8628-ea8c5647eb5e",e._sentryDebugIdIdentifier="sentry-dbid-d20c9811-4153-46da-8628-ea8c5647eb5e")}catch{}})();const B=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",c=e.get("profileId")??"",[n,p]=l.useState(!1),a=h(),s=y((m=>b(m))),r=f.getSignedInUser(),d=f.getSignedInUserTenantWithId(i);if(r==null||d==null)return o.jsx(I,{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),l.useEffect((()=>{n||(p(!0),a(j(t,c,i)))}),[n,a]),s.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:s.error?.message??""})}):(s.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{B as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as c}from"./liveblocks-CgHUgeBY.js";import{a as f}from"./sentry-DSWD_gIh.js";import{h as $,u as x,g as T,i as j,j as p}from"./core-Cc7wW2EM.js";import{Ti as s,Th as v,$F as B,fF as C,$G as E}from"./zeni-epic-state-BVJjEVAA.js";import{a2 as z,af as g,E as D,z as L,a8 as P,d6 as G,a5 as N}from"./index-vIt7RQvO.js";import{n as _}from"./mui-C4zFSCiU.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]="8d52779a-e613-4e05-b383-0464d0998de2",e._sentryDebugIdIdentifier="sentry-dbid-8d52779a-e613-4e05-b383-0464d0998de2")}catch{}})();const U=_.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 H(){const e=$(),n=x(),d=z(),l=T();let{accountId:a}=j(),m=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,m=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[u,h]=f.useState(!1),y=D();f.useEffect((()=>{u||(h(!0),n(v(a??"",!1)))}),[u,n]);const o=p((t=>B(t,a??""))),I=()=>{const t=N(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},r=L.getSignedInUser(),i=p((t=>C(t))),b={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:i.tenantId??""},w=E(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(P,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}}):c.jsx(U,{windowSize:d,children:c.jsx(G,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:I,authParams:b,downloadEndPoint:m})})}export{H as Z};
|