@zeniai/web-app-ui 5.0.76-prod → 5.0.77-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-Clm_yxMo.js +1 -0
- package/dist/assets/AddressScreen-ByYpZmgQ.js +9 -0
- package/dist/assets/AiCfoScreen-DbYSFoNw.js +22 -0
- package/dist/assets/BillPayApprovalRoutes-CX2-tB9Z.js +1 -0
- package/dist/assets/{BillPayRoutes-OK545GKf.js → BillPayRoutes-CFin72Sd.js} +12 -12
- package/dist/assets/BusinessVerificationPageScreen-C-d6e6xJ.js +9 -0
- package/dist/assets/{ChargeCardRoutes-DPHmXO1M.js → ChargeCardRoutes-BqilxZnu.js} +8 -8
- package/dist/assets/{CompanyPassportScreen-Q0n29h95.js → CompanyPassportScreen-Btm8q2XT.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-B3NEPge1.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-BP98cwHW.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-Cx10OoO6.js +23 -0
- package/dist/assets/{DashboardRoutes-B9FZcGg_.js → DashboardRoutes-Dr7E3H8N.js} +4 -4
- package/dist/assets/{DefaultTenantHome-DCUgRi-1.js → DefaultTenantHome-BmA8DcRx.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-CzSUYZwn.js +18 -0
- package/dist/assets/DrawerScreen-AH0ysY6V.js +1 -0
- package/dist/assets/EntityDetailRoutes-DVGIBaLz.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-DUDB7RUh.js → ExpenseAutomationRoutes-BhbZS8a1.js} +4 -4
- package/dist/assets/FeaturePreviewScreen-DPxCLrsp.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-BvqLZI0N.js +1 -0
- package/dist/assets/MagicLinkRoutes-jZeMo5Ui.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-PJSTdmbN.js +12 -0
- package/dist/assets/{MobileAppDrawer-DtbNyRlE.js → MobileAppDrawer-CNxBiA0K.js} +1 -1
- package/dist/assets/NotFoundScreen-CsEhUGfR.js +1 -0
- package/dist/assets/NotificationRoutes-9IJgVYJ1.js +1 -0
- package/dist/assets/OAuthConsentScreen-1ZY7Ls_k.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-8SC0GJZW.js +1 -0
- package/dist/assets/PeopleRoutes-DQ3Y767r.js +22 -0
- package/dist/assets/PerformanceRoutes-BZb18QS3.js +1 -0
- package/dist/assets/{Preview-B-lc4OC9.js → Preview-B7yw63qf.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-wVcEP_8O.js → QBOConnectionScreen-BRrDd8wr.js} +1 -1
- package/dist/assets/ReferralListScreen-DWAGGjua.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-DSgEFO1H.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Di2Ku2FG.js → ReimbursementApprovalRuleDetailScreen-CtZbBICM.js} +1 -1
- package/dist/assets/ReimbursementRoutes-Iavqnxfs.js +68 -0
- package/dist/assets/ReportsRoutes-CjoIF9EB.js +1 -0
- package/dist/assets/RewardsRoutes-CTiffYxG.js +1 -0
- package/dist/assets/ScreenRoutes-zUtLUY3P.js +2 -0
- package/dist/assets/{SettingsRoutes-mXduxOe-.js → SettingsRoutes-Dr2cLQZf.js} +7 -7
- package/dist/assets/{SetupPagesScreen-Bp4AY0Mi.js → SetupPagesScreen-BMUAJOjI.js} +5 -5
- package/dist/assets/SignInScreen-BO8V1s1B.js +1 -0
- package/dist/assets/SignOutScreen-B1QfOGXO.js +9 -0
- package/dist/assets/{TaskListScreen-COtjlPYY.js → TaskListScreen-DdoFZv0I.js} +2 -2
- package/dist/assets/TaskRoutes-DR1BBqXQ.js +9 -0
- package/dist/assets/TransactionDetailRoutes-DLkTkOiV.js +1 -0
- package/dist/assets/TransactionDetailScreen--PMkud8g.js +5 -0
- package/dist/assets/{TransactionListRoutes-BUHLsf1W.js → TransactionListRoutes-quiJ_wNs.js} +1 -1
- package/dist/assets/TreasuryRoutes-BVcC0j-i.js +37 -0
- package/dist/assets/{VendorsRoutes-pn6DcmDJ.js → VendorsRoutes-DJYa05bm.js} +21 -21
- package/dist/assets/WiseConfirmationScreen-CTaGbwbB.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-DA5CjpcO.js → ZeniAccountRoutes-CpYvVE1u.js} +12 -12
- package/dist/assets/ZeniAccountStatementScreen-C8feQjoH.js +9 -0
- package/dist/assets/{accountMappingHelper-CIYwyHCp.js → accountMappingHelper-D6x0RpVY.js} +1 -1
- package/dist/assets/{analytics-C6M-DE9i.js → analytics-CgRNtlDm.js} +1 -1
- package/dist/assets/{analyticsHelper-CcCG6rlr.js → analyticsHelper-DhD4YoYg.js} +1 -1
- package/dist/assets/{core-DJZqFFKe.js → core-uYqCzel8.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-BiP6rBCT.js → decodeURIComponentSafe-DCnYf30M.js} +1 -1
- package/dist/assets/{dnd-un89-W8a.js → dnd-BSWou54V.js} +1 -1
- package/dist/assets/{empty-C7-tC6KZ.js → empty-BFCAZWzA.js} +1 -1
- package/dist/assets/{empty-CmWX-en4.js → empty-CKinwWZY.js} +1 -1
- package/dist/assets/{emptyVideoElement-wO4KKtvm.js → emptyVideoElement-E29-Nor3.js} +1 -1
- package/dist/assets/epic-dPIWYPli.js +2 -0
- package/dist/assets/getLocaleForTenant-CFQN8jbL.js +1 -0
- package/dist/assets/{index-B56GmnI4.js → index-8d_FSGLw.js} +1 -1
- package/dist/assets/{index-t8LrPGTK.js → index-BsLHs9Ab.js} +1 -1
- package/dist/assets/{index-D7lET21U.js → index-CeZ7L-BQ.js} +12975 -12947
- package/dist/assets/{index-D6X2nsqL.js → index-CxWCBC6O.js} +1 -1
- package/dist/assets/{index-BToxbtNk.js → index-DWPRup5s.js} +1 -1
- package/dist/assets/{index-De7-Fto_.js → index-DeBaxB_L.js} +1 -1
- package/dist/assets/{index-CyLy32xB.js → index-Dl7Wgss6.js} +1 -1
- package/dist/assets/{index-UdAzkfmu.js → index-F3uqdkEv.js} +2 -2
- package/dist/assets/{lexical-ChRCvCis.js → lexical-DbCoEckm.js} +1 -1
- package/dist/assets/{liveblocks-DkPfdehf.js → liveblocks-CfCKAQeM.js} +1 -1
- package/dist/assets/{lottie-B-PtdQRY.js → lottie-Dc_IH0fS.js} +1 -1
- package/dist/assets/{mui-Ctp_ou6C.js → mui-CTbUXhla.js} +1 -1
- package/dist/assets/{pathToGoBack-Db6TK5Kp.js → pathToGoBack-Y7yporNq.js} +1 -1
- package/dist/assets/{pdf-xyjfLAhh.js → pdf-O9N1jd2N.js} +4 -4
- package/dist/assets/{pdf-lib-E2_PRUbd.js → pdf-lib-CNgiyR2K.js} +1 -1
- package/dist/assets/{plaid-VWs98BAj.js → plaid-Bio3MiLm.js} +1 -1
- package/dist/assets/{pusher-CqP4vhYK.js → pusher--jGYOMJ8.js} +1 -1
- package/dist/assets/{react-BnNiFV_a.js → react-BYbqG6ZW.js} +1 -1
- package/dist/assets/{react-Daz7lA1q.js → react-BaqpebX1.js} +1 -1
- package/dist/assets/{react-C1pbg6AQ.js → react-D9RjhqSo.js} +1 -1
- package/dist/assets/{react-BSDM7YjB.js → react-DqfAPb7w.js} +1 -1
- package/dist/assets/{react-DbbbXkLn.js → react-KPWjcD7D.js} +1 -1
- package/dist/assets/{react-D_l3RGG4.js → react-kWXzqyUF.js} +1 -1
- package/dist/assets/{recharts-D041iH6A.js → recharts-BUFoogHS.js} +1 -1
- package/dist/assets/{routePaths-B7y8nrZh.js → routePaths-vUmlDccC.js} +1 -1
- package/dist/assets/{sentry-BxQ6uAJu.js → sentry-131ydzJg.js} +1 -1
- package/dist/assets/{url-pCQvflln.js → url-BRm_J7V6.js} +1 -1
- package/dist/assets/{url-BE1qua3s.js → url-DlWfObPw.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-D4_eEE1f.js +1 -0
- package/dist/assets/{useDeviceId-CWGC34ee.js → useDeviceId-CBU-vDdN.js} +1 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-b8cA6qxS.js +1 -0
- package/dist/assets/{useInitialThreadRequest-Dt7T5zj_.js → useInitialThreadRequest-cRvS9PIT.js} +1 -1
- package/dist/assets/{utils-D2tZzHCG.js → utils-BkkIzijx.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-BEuIUcFf.js → withTransactionSidePanel-BS7S2wn5.js} +3 -3
- package/dist/assets/{zeni-epic-state-CNc-1z4P.js → zeni-epic-state-BmAPZlsC.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-DQ24VS9r.js +0 -1
- package/dist/assets/AddressScreen-02D4IIXX.js +0 -9
- package/dist/assets/AiCfoScreen-7Qfw7m1h.js +0 -22
- package/dist/assets/BillPayApprovalRoutes-DKiUw_-9.js +0 -1
- package/dist/assets/BusinessVerificationPageScreen-DYMZT7MK.js +0 -9
- package/dist/assets/ConnectionAuthScreen-DYuRQ2Fv.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-CWBg_s6S.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-C4fjdrqy.js +0 -23
- package/dist/assets/DomesticWireDetailScreen-IKqhZwSm.js +0 -18
- package/dist/assets/DrawerScreen-CqfyZCQa.js +0 -1
- package/dist/assets/EntityDetailRoutes-fOUHttju.js +0 -1
- package/dist/assets/FeaturePreviewScreen-BS0CUw64.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-DgspQrlV.js +0 -1
- package/dist/assets/MagicLinkRoutes-DH85QP7H.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-Dml8wEzI.js +0 -12
- package/dist/assets/NotFoundScreen-C0APD5Cv.js +0 -1
- package/dist/assets/NotificationRoutes-DuXZgoY7.js +0 -1
- package/dist/assets/OAuthConsentScreen-CR1Z765t.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-B3dmA1Sq.js +0 -1
- package/dist/assets/PeopleRoutes-DESsHXKz.js +0 -22
- package/dist/assets/PerformanceRoutes-keesTah9.js +0 -1
- package/dist/assets/ReferralListScreen-BvE3nvBn.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-C_KFvFIG.js +0 -1
- package/dist/assets/ReimbursementRoutes-ZdCYLB4c.js +0 -68
- package/dist/assets/ReportsRoutes-DY3K_f7D.js +0 -1
- package/dist/assets/RewardsRoutes-BqMNvsjf.js +0 -1
- package/dist/assets/ScreenRoutes-BexdZAU9.js +0 -2
- package/dist/assets/SignInScreen-CXyjOVym.js +0 -1
- package/dist/assets/SignOutScreen-DKHDnSe6.js +0 -9
- package/dist/assets/TaskRoutes-DRX9ktVK.js +0 -9
- package/dist/assets/TransactionDetailRoutes-BEdN3a0Y.js +0 -1
- package/dist/assets/TransactionDetailScreen-Xdy6AbKJ.js +0 -5
- package/dist/assets/TreasuryRoutes-BT79rxoz.js +0 -37
- package/dist/assets/WiseConfirmationScreen-BnFvi8s0.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-Bkchp_FB.js +0 -9
- package/dist/assets/epic-CjmHq51Y.js +0 -2
- package/dist/assets/getLocaleForTenant-DRam5UTN.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-CiCnpKpN.js +0 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-3NQ4UG95.js +0 -1
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DkPfdehf.js";import{j as J,h as re,u as Z,l as Y,g as E,N as $,k as K,i as mt,n as ct,o as k}from"./core-DJZqFFKe.js";import{eO as V,NB as le,c1 as me,BJ as xe,jL as dt,BW as ne,BV as ae,NC as ut,bn as ce,fI as Te,ND as pt,JY as bt,jA as De,JZ as fe,J_ as gt,iv as ht,MS as St,iK as ft,Bx as It,sm as yt,iC as Rt,Ch as je,NE as Fe,NF as At,NG as Ct,NH as vt,NI as kt,NJ as Et,C1 as Ie,iQ as wt,M$ as Bt,BX as xt,BH as Tt,NK as Dt,BG as jt,NL as Ft,BP as ye,C5 as Ut,C4 as Lt,C0 as Nt,NM as Ue,H6 as Pt,bo as Mt,BS as $t,Cz as _t,NN as Ot,NO as zt,Cd as Gt,Ca as Re,Ml as Ht,BE as Zt,NP as Le,CY as Ae,D4 as Vt,NQ as Wt,NR as G,NS as Jt,NT as Ne,NU as Kt,NV as Pe,NW as Me,Cp as se,bt as qt,bF as de,cB as ue,eU as $e,eS as _e,NX as Xt,gM as Yt,My as Qt,NY as en,NZ as Oe,MC as tn,Nk as nn,N_ as an,NA as sn,D1 as Ce,D0 as on,N$ as rn,O0 as ln,O1 as mn,O2 as cn,O3 as dn,N5 as un,CT as pn,CX as bn,bv as gn,bE as hn,cw as Sn,ck as fn,bs as In,IS as yn,cM as Rn,cO as An,cN as Cn,cv as vn}from"./zeni-epic-state-CNc-1z4P.js";import{n as ze,Z as Ge,y as Q,S as C,z as P,bK as He,s as ee,c as v,aE as ve,o as j,aq as X,E as kn,D as Ze,bL as En,j as H,bM as wn,k as te,bN as Bn,R as xn,C as Tn,B as pe,e as Ve,a3 as Dn,bb as jn,W as Fn,m as We,bO as Un,a6 as Ln}from"./index-D7lET21U.js";import{n as _,S as Nn}from"./mui-Ctp_ou6C.js";import ie from"./NotFoundScreen-C0APD5Cv.js";import{S as ke}from"./SetupPagesScreen-Bp4AY0Mi.js";import{F as Je}from"./FeaturePreviewScreen-BS0CUw64.js";import{a as S}from"./sentry-BxQ6uAJu.js";import{u as be}from"./useAskAiCfoHostNavButtonProps-CiCnpKpN.js";import{u as Ke}from"./useInitialThreadRequest-Dt7T5zj_.js";import{c as qe}from"./useFetchSuggestedQuestionsWhenReady-3NQ4UG95.js";import{D as Pn}from"./DrawerScreen-CqfyZCQa.js";import{M as Xe}from"./MobileAppDrawer-DtbNyRlE.js";import{R as Mn}from"./ReimbursementApprovalRoutes-C_KFvFIG.js";import{FallBackRoute as $n}from"./ScreenRoutes-BexdZAU9.js";import"./recharts-D041iH6A.js";import"./analytics-C6M-DE9i.js";import"./plaid-VWs98BAj.js";import"./dnd-un89-W8a.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-PtdQRY.js";import"./lexical-ChRCvCis.js";import"./pdf-xyjfLAhh.js";import"./utils-D2tZzHCG.js";import"./analyticsHelper-CcCG6rlr.js";import"./routePaths-B7y8nrZh.js";import"./BusinessVerificationPageScreen-DYMZT7MK.js";import"./ReimbursementApprovalRuleDetailScreen-Di2Ku2FG.js";import"./getLocaleForTenant-DRam5UTN.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]="85ba7d60-3638-4b86-874e-a452e4db749e",e._sentryDebugIdIdentifier="sentry-dbid-85ba7d60-3638-4b86-874e-a452e4db749e")}catch{}})();const Ye=e=>`/${e}/reimbursements`,_n=e=>S.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},S.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),S.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=Ze.getLocalizedStrings(),On=K(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=P.getSignedInUser(),c=ce(d),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=le(e,t.reimbursementId),b=pt(e,d?.userId??"");let R=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(R=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:R,isUserAdmin:me(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:De(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ae(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Nt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ye(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Dt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(xt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(Bt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ne({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(kt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(vt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(Ct({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(At());const i=Ye(o),l=H(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(je(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(ft(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(St())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(fe("common"))},onCancelAutoComplete:()=>{e(fe("common"))}}}})(En);function Ee(){const e=J(),t=re(),n=Z(),{reimbursementId:r}=Y(),d=ze(),c=Ge(),[m,o]=S.useState(r==null),[a,i]=S.useState(1),{useFeatureGate:l}=Q(),{isFeatureEnabled:b}=l(C.isLimitedCategoryForReimbursement),{isFeatureEnabled:R}=l(C.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(C.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=be({mobileExploreReferrer:"Reimbursement Details"}),w=Z().pathname,D=w.includes("edit"),A=w.includes("reimbursement/new"),[F,B]=S.useState(!1),x=P.getSignedInUser(),I=E(p=>V(p)),g=E(p=>le(p,r)),N=Ke(I?.companyId,{clearParams:g.fetchState==="Completed"}),U=me(I?.userRole??[]);S.useEffect(()=>{(A&&!F||D&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(B(!0),t(xe(!1,b,R,r)))});const M=E(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(x==null)throw Error("Can't access address page without signing in...");const y={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||U&&g.billStatus==="rejected"||U===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx($,{to:y}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(He,{isNewReimbursement:r==null}):s.jsxs(zn,{windowSize:c,children:[s.jsx(ee,{analytics:v,onLoad:p=>(W=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&W.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Gn,{}):null,m&&c!=="small"?s.jsx(Hn,{children:s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:x?.userId??"",sessionId:x?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,x?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Zn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(_n,{})}),s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:x?.userId??"",sessionId:x?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,x?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:N??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:M,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const zn=_.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=_.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
|
-
`,Hn=_.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
|
-
`,Zn=_.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
|
-
`,Vn=_.button`
|
|
37
|
-
align-self: flex-end;
|
|
38
|
-
background: none;
|
|
39
|
-
border: none;
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
padding: ${j.sp2} ${j.sp3};
|
|
42
|
-
line-height: 1;
|
|
43
|
-
color: ${e=>e.theme.colors.hero};
|
|
44
|
-
&:hover {
|
|
45
|
-
color: ${e=>e.theme.colors.primary};
|
|
46
|
-
}
|
|
47
|
-
svg {
|
|
48
|
-
width: ${j.sp4};
|
|
49
|
-
height: ${j.sp4};
|
|
50
|
-
}
|
|
51
|
-
`,Wn=_.div`
|
|
52
|
-
display: flex;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
width: 100%;
|
|
55
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
56
|
-
`,Jn=K(function(e,t){const n=Ue(e,t.reimbursementId),r=P.getSignedInUser(),d=ce(r),c=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Ot(n.remiActivities,zt(t.currentTenant),r));const i=me(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:d,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:De(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e(Fe());const a=Ye(o),i=H(d.state?.pathnameStackToGoBack,d.pathname);c(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(Zt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Ht({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(Re(n,a.type,"")):e(Re(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=H(d.state?.pathnameStackToGoBack,d.pathname);c("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{v.trackReimbursementDeleteReimbursement(n),e(je(n))},cancelAndDeleteReport:a=>{a===!0?v.trackReimbursementCancelAndDeleteReimbursement(n):v.trackReimbursementCancelReimbursement(n),e(Gt(n,a))},handleZeniLogoClick:()=>{m.toggle()}}})(wn);function Kn(){const e=J(),t=re(),n=Z(),r=n.hash.substring(1),d=ze(),{reimbursementId:c}=Y(),m=P.getSignedInUser(),o=E(y=>V(y)),a=E(y=>Ue(y,c??"")),i=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=Ke(o?.companyId,{clearParams:a.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:b,onAskAiCfoClick:R}=be({mobileExploreReferrer:"Reimbursement Details"});qe({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:h}=Q(),{isFeatureEnabled:T}=h(C.isLimitedCategoryForReimbursement),[u,w]=S.useState(!1),[D,A]=S.useState(!1),[F,B]=S.useState(!1),{isFeatureEnabled:x}=h(C.isReimbursementCommentingEnabled),{isFeatureEnabled:I}=h(C.isShowDeletedReimbursementsFeatureEnabled),g=E(y=>le(y,c??"")),N=Pt(o),U=Mt(o.userRole),M=a.fetchState;if(S.useEffect(()=>{u||c==null?u==1&&M==="Error"&&e("page-not-found",{replace:!0}):(w(!0),t($t(c,!1,I)))},[u,c,t,M]),S.useEffect(()=>{I&&a.remiDetails?.isDeleted===!0||o.isZeni===!0&&m?.userEmailDomain==="zeni.ai"&&N===!1?B(!1):B(a.remiActivities[0]?.isRealTimeApprovalEnabled&&(U||a.allApprovers.find(y=>y.user.userId===m?.userId)!=null||a.remiDetails?.lastUpdatedBy===m?.userId))},[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,U,o.isZeni,N,m]),S.useEffect(()=>{D||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||g.fetchState=="Completed"||g.fetchState=="In-Progress"||(A(!0),t(xe(!1,T,I,c)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(_t(!1,!0,!0,a.lastUpdatedByUserId)))},[D,a,c,t]),m==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx($,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(He,{}):s.jsxs(s.Fragment,{children:[s.jsx(ee,{analytics:v,onLoad:y=>(p=>{c!=null&&p.trackReimbursementReimbursementDetails(c)})(y)}),s.jsx(Jn,{initialOpenThreadRequest:l??void 0,scrollId:r,isReimbursementCommentingEnabled:x,isShowDeletedReimbursementEnabled:I,location:n,navigate:e,isRealTimeApprovalEnabled:F,currentTenant:o,reimbursementId:c??"",themeState:d,isAiCfoAccessEnabled:b,onAskAiCfoClick:R})]})}const qn=K(function(e,t){return{remisReviewView:Le(e),analytics:t.analytics}},function(e,t){return{onCloseOverlay:()=>{t.navigate("./"),e(G())},onCloseReviewItem:n=>{e(Wt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Vt());break;case"approve":e(Ae("approved",r??""));break;case"reject":e(Ae("rejected",r??""))}}}})(Bn);function Xn(){const e=J(),t=E(c=>c.remisBulkActionViewState.bulkSubmissionFetchState.fetchState),{remisForReview:n}=E(c=>Le(c)),r=te(),d=r?.loggedInUserRole?.includes("admin")===!0;return S.useEffect(()=>{t!=="Completed"&&n.length!==0||e("./")},[t,n.length]),s.jsx(qn,{navigate:e,analytics:v,isAdmin:d})}const z=tn(),Qe="bulk-operation-update",oe="reimbursement-approval-rule-update",{spendManagement:Yn,common:we}=Ze.getLocalizedStrings(),Be=Yn.reimbursement.bulkActions,Qn=_.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
|
-
`,ea=K(function(e,t){const n=Me(e,z,t.isBulkActionEnabled);let r=n.allSubTabs;const d=P.getSignedInUser(),c=ce(d),m=e.tenantState.currentTenantId,o=V(e),a=o?.companyName??"",i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter(h=>h!=="deleted"));const b=n.fetchState,R=nn(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter(h=>h.isDeleted===!1),isAdmin:t.isAdmin,isZeniUser:c,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:b,botEmail:n.reimbursementBotEmail,analytics:v,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:z,spendManagementEndPoint:`${Fn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:R.affectedEntityIds}},function(e,t){const{navigate:n,currentTenant:r,location:d,period:c}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(G()),e(Ne(o))},onSubtabChange:o=>{e(G()),e(Pe(o))},onTransactionClick:(o,a)=>{const i=aa(m,o,a),l=H(d.state?.pathnameStackToGoBack,d.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=na(m),a=H(d.state?.pathnameStackToGoBack,d.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;v?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=H(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:i}})},onColumnSortConfigChanged:(o,a)=>{e(dn({uiState:{sortKey:o,sortOrder:a},period:t.period}))},onSearchTextChanged:o=>{e(cn(o))},onFiltersChange:o=>{e(mn({filters:o})),o.categories.every(a=>a.field!=null&&a.values?.length!==0)&&v.trackSpendManagmentFilterChange("reimbursement",o.categories.map(a=>`${a.field}-${JSON.stringify(a.values)}`))},updateDownloadStateHandler:o=>{o==="In-Progress"&&v.trackSpendManagementDownloadClick("reimbursement"),e(ln({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(se(c,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(rn(o))},removeAllTransactionsFromBulkActionList:()=>{e(G())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(on(o,a??""));break;case"send_for_approval":e(Ce("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(Ce("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(oe)&&e(sn(!1))},onEventReceived:o=>{o===Qe&&e(an())}}})(Dn(jn));function ta(){const e=J(),t=re(),n=Z(),r=n.state,d=Ge(),[c,m]=S.useState(null),o=mt("/:tenantEmailDomain/reimbursements/bulk-review")!=null;S.useEffect(()=>{if(r?.tab!=null&&r?.subTab!=null){const f=Jt(r.tab.toString());f!=null?t(Ne(f)):console.log("Warning:Not a valid remiListTab");const O=Kt(r.subTab.toString());O!=null?t(Pe(O)):console.log("Warning:Not a valid remiListSubTab")}return()=>{t(G())}},[]);const{useFeatureGate:a}=Q(),{isFeatureEnabled:i}=a(C.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:l}=a(C.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:b}=a(C.isBillPayCommentingEnabled),{isFeatureEnabled:R}=a(C.isReimbursementCommentingEnabled),{isFeatureEnabled:h}=a(C.isReimbursementBulkActionEnabled),T=P.getSignedInUser(),u=E(f=>V(f)),[w,D]=S.useState(!1),[A,F]=S.useState(!1),B=te(),x=B?.loggedInUserRole?.includes("admin")===!0,I=E(f=>Me(f,z,h)),{areTenantIdsInSync:g}=xn(),N=I.fetchState,{isAiCfoAccessEnabled:U,onAskAiCfoClick:M}=be({mobileExploreReferrer:"Reimbursement List"});if(qe({isDataReady:N==="Completed"}),S.useEffect(()=>{!A&&g&&(F(!0),t(se(z,!0,l,!1,!0)))},[A,z,t,g]),T==null)throw Error("Can't access address page without signing in...");const y=!!u?.userRole&&qt(u),p=de(B?.loggedInUserRoleMap),W=ue(B?.loggedInUserRoleMap),et=!!u.userReimbursementInfo?.isReimbursementTOSAccepted,tt=!!u.companyReimbursementInfo?.info?.isReimbursementEnabled,nt=!!u.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,at=E(f=>Te(f.companyState,u.companyId)),st=at?.company.featuresActivationInfo.connectedAccountProvider,ge=f=>{D(f)},{isFeatureEnabled:it}=a(C.isDebitCardFeatureEnabled),ot=$e(it,u),rt=_e(u),{remisProcessed:q,remisProcessing:he}=E(f=>Xt(f));S.useEffect(()=>{q===he&&c!=null&&(t(Yt({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:q>1?Be.reports:Be.report},{variableName:"_has_",variableValue:q>1?we.texts.have:we.texts.has},{variableName:"_action_",variableValue:Qt(c)}]})),t(en()),setTimeout(()=>{t(se(z,!0,l,!1,!0,!0))},3e3),m(null))},[q,he]);const lt={events:u.companyId!=null?[`private-encrypted-${u.companyId}.${Qe}`,`private-encrypted-${u.companyId}.${oe}`]:[],eventCallback:(f,O,Se)=>{f.endsWith(oe)?Se.onReimbursementApprovalRulesEventReceived?.(f):O.entity_type==="reimbursement"&&(m(O.operation_type),Se.onEventReceived(f))}};return n.pathname.endsWith("/reimbursements/")||n.pathname.endsWith("/reimbursements")||n.pathname.endsWith("/reimbursements/bulk-review")?ot===!0||rt===!0?s.jsx(Je,{}):tt&&(!y||p)||W&&et?s.jsxs(s.Fragment,{children:[N==="Completed"?s.jsx(ee,{analytics:v,onLoad:f=>(O=>O.trackPageLoaded(Ve.Event.reimbursementHome))(f)}):null,s.jsx(Xe,{isAppContentDrawerOpen:w,handleDrawerToggle:ge}),s.jsxs(Qn,{windowSize:d,children:[s.jsx(Pn,{isOpen:o,drawerLeftMargin:new Tn(0,0,300,600),onClose:()=>{e("./"),t(G())},children:s.jsx(sa,{onClick:f=>f.stopPropagation(),children:s.jsx(Xn,{})})}),s.jsx(ea,{isShowDeletedBillsEnabled:i,isShowDeletedReimbursementEnabled:l,isBillPayCommentingEnabled:b,isReimbursementCommentingEnabled:R,location:n,navigate:e,currentTenant:u,period:z,isAdmin:x,isEmployee:y,entity:"reimbursement",onClickMenuIcon:()=>{ge(!0)},createdByUserList:I.createdByUserList,createdByUserListFetchState:I.createdByUserListFetchState,isDownloadEnabled:I.isDownloadEnabled,connectedAccountProvider:st,isBulkActionEnabled:h,bulkSubmissionLimit:I.remiBulkSubmissionLimit,bulkSubmissionFetchState:I.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:U,onAskAiCfoClick:M,...lt})]})]}):nt&&p?s.jsx($,{to:"../setup"}):B!=null&&Oe(u,B.loggedInUserRoleMap)?s.jsx($,{to:"../promo"}):s.jsx(pe,{fetchState:"In-Progress"}):s.jsx(ie,{})}const na=e=>`/${e}/reimbursements/setup`,aa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},sa=_(Nn)`
|
|
65
|
-
display: flex;
|
|
66
|
-
min-height: 100%;
|
|
67
|
-
flex-direction: column;
|
|
68
|
-
`,ia=K(function(e,t){const{companyId:n}=t;return{reimbursementSetupView:un(e,n),analytics:v,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}},function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(bn(n))},onCreateNewRemiButtonClick:()=>{e(pn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}})(Un),oa=()=>{const e=J(),t=Z(),{tenantEmailDomain:n}=Y(),r=We(),[d,c]=S.useState(!1),m=E(A=>V(A)),o=P.getSignedInUserTenant(n)?.companyId??m.companyId,a=P.getSignedInUser(),i=m.userRoleId,l=!!m.userRole?.includes("reimbursements_user"),b=te(),R=de(b?.loggedInUserRoleMap),h=ue(b?.loggedInUserRoleMap),T=!!m.userReimbursementInfo?.isReimbursementTOSAccepted,u=!!m.companyReimbursementInfo?.info?.isReimbursementEnabled,w=!!m.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,D=A=>{c(A)};if(a==null)throw Error("Can't access reimbursement promo page without signing in...");return u&&h&&T?s.jsx($,{to:"../../../reimbursements"}):w&&R?s.jsx($,{to:"../../reimbursements/setup"}):m.companyReimbursementInfo&&!w||m.userReimbursementInfo&&h&&T===!1?s.jsxs(s.Fragment,{children:[s.jsx(ee,{analytics:v,onLoad:A=>(F=>F.trackPageLoaded(Ve.Event.reimbursementPromoPage))(A)}),s.jsx(Xe,{isAppContentDrawerOpen:d,handleDrawerToggle:D}),s.jsx(ia,{companyId:o,navigate:e,location:t,userReimbursementInfo:m.userReimbursementInfo,userRoleId:i,isEmployee:l,onClickMenuIcon:()=>{D(!0)}})]}):s.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}})};function Pa(){const e=E(W=>V(W)),t=te(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=We(),d=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,c=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:m}=Q(),{isFeatureEnabled:o}=m(C.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=m(C.isDebitCardFeatureEnabled),i=$e(a,e),l=_e(e),b=e?.userRole!=null&&gn(e?.userRole),R=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!b)&&hn(t?.loggedInUserRoleMap),h=Sn(t?.loggedInUserRoleMap),T=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!b,u=de(t?.loggedInUserRoleMap),w=T&&u,{isFeatureEnabled:D}=m(C.isDepositAccountsFeatureEnabled),A=D&&!b&&fn(t?.loggedInUserRoleMap),F=Ln(e,o,a)&&!b&&In(t?.loggedInUserRoleMap),B=yn(t?.loggedInUserRoleMap),x=Rn(t?.loggedInUserRoleMap),I=An(t?.loggedInUserRoleMap),g=Cn(t?.loggedInUserRoleMap),N=vn(t?.loggedInUserRoleMap),U=ue(t?.loggedInUserRoleMap),{tenantEmailDomain:M}=Y(),y=Z(),p=n===!0&&(u||U&&c);return s.jsxs(ct,{children:[y.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(k,{path:"verification",element:s.jsx(ke,{isBillPayAdminLevelAccess:R,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:A,isChargeCardAdminLevelAccess:F,isUserHasOnlyCardAccess:B,productType:"reimbursement",type:"verification"})}),s.jsx(k,{path:"setup",element:s.jsx(ke,{isBillPayAdminLevelAccess:R,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:A,isChargeCardAdminLevelAccess:F,isUserHasOnlyCardAccess:B,productType:"reimbursement",type:"setup"})}),s.jsx(k,{path:"promo",element:s.jsx(oa,{})}),s.jsx(k,{path:"approval-rules/*",element:w?s.jsx(Mn,{}):s.jsx($n,{isUserHasZeniAccountsAccess:x,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:U,isUserHasTreasuryAccess:I,isTenantBankingOnly:i,tenantEmailDomain:M??""})}),p&&s.jsx(k,{path:"*",element:s.jsx(ta,{})}),(i===!0||l===!0)&&s.jsx(k,{path:"/*",element:s.jsx(Je,{})}),t!=null&&Oe(e,t?.loggedInUserRoleMap)&&s.jsx(k,{path:"*",element:s.jsx($,{to:"../promo"})}),d&&u&&s.jsx(k,{path:"*",element:s.jsx($,{to:"../setup"})})]}):y.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(k,{path:"new",element:s.jsx(Ee,{})}),s.jsx(k,{path:":reimbursementId",element:s.jsx(Kn,{})}),s.jsx(k,{path:":reimbursementId/edit",element:s.jsx(Ee,{})}),s.jsx(k,{path:"*",element:s.jsx(ie,{})})]}):s.jsx(k,{path:"*",element:s.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${j.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(k,{path:"*",element:s.jsx(ie,{})})]})}export{Pa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-DkPfdehf.js";import{u as z,j as ye,h as Ce,l as ge,g as d,k as Se,n as we,o as G}from"./core-DJZqFFKe.js";import{eO as L,f8 as S,Jj as Ie,jA as Z,Jk as X,pS as O,jo as Re,is as Te,tm as K,pX as Ae,bv as Oe,Jl as ke,bn as Fe,ul as De,Jm as je,Jn as Ee,te as Pe,Jo as H,Jp as Le,Jq as Me,Jr as Be,Js as Je,Jt as w,Ju as k,Jv as F,Jw as Y,Jx as D,Jy as j,dC as ve,u1 as Ue,tR as N,tS as q,u7 as Ve,tW as $,ud as xe,Jz as ze,JA as Ge,JB as He,JC as Ye,JD as Ne,eU as qe,eS as $e}from"./zeni-epic-state-CNc-1z4P.js";import{M as Qe,Q as We,Z as Ze,y as ee,S as E,z as ae,R as Xe,k as Ke,a as ea,s as aa,c as P,e as sa,j as se,U as ta,V as oa,W as na}from"./index-D7lET21U.js";import"./mui-Ctp_ou6C.js";import ra from"./NotFoundScreen-C0APD5Cv.js";import{F as ia}from"./FeaturePreviewScreen-BS0CUw64.js";import{a as _}from"./sentry-BxQ6uAJu.js";import{u as la,a as ca,b as da,c as pa}from"./useFetchSuggestedQuestionsWhenReady-3NQ4UG95.js";import{u as ma}from"./useInitialThreadRequest-Dt7T5zj_.js";import{t as Q,a as W}from"./routePaths-B7y8nrZh.js";import{M as fa}from"./MobileAppDrawer-DtbNyRlE.js";import"./recharts-D041iH6A.js";import"./analytics-C6M-DE9i.js";import"./plaid-VWs98BAj.js";import"./dnd-un89-W8a.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-PtdQRY.js";import"./lexical-ChRCvCis.js";import"./pdf-xyjfLAhh.js";import"./utils-D2tZzHCG.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="1191dca2-85c8-4c19-9a02-defe6906527b",e._sentryDebugIdIdentifier="sentry-dbid-1191dca2-85c8-4c19-9a02-defe6906527b")}catch{}})();const ua=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(F({resetLeftScroll:!0})),e(k({resetLeftScroll:!0}))},_a=e=>{e(Ge()),e(He()),e(Ye()),e(Ne())},ha=Se(function(e){const o=ae.getSignedInUser(),m=e.tenantState.currentTenantId,u=L(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:m??""},t=S(e),r=ke(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:P,isZeniUser:Fe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:Z(e),isAccountingProjectsEnabled:X(e),currentTenantCompanyName:a,statementEndPoint:`${na}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:m,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(O(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(ze(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(xe(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:f,balancesRange:l}=c;let i=[...f];a==="year"&&(i=i.filter(C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="same_period_last_year")),e(N(o.firstMonthOfFY,r,l.numberOfPeriods<1?1:l.numberOfPeriods,i)),f.length>0&&e(q(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<1?1:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(w(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e($({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(H({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e($(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(Ve(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(N(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(q(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>y(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(Ue({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=ve(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const f=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Q(o.tenantEmailDomain,a.accountId,a.accountType,f,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return W(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?W(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,c):a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,f,r,c):void 0})();if(l!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);m(l,{state:{pathnameStackToGoBack:i,referrer:I(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(j({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(Y({scrollPosition:s}));break;case"balance_sheet":e(F({scrollPosition:s}));break;case"cash_flow":e(k({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{m("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(Je({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",I(o.selectedReportID)),e(w("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",I(o.selectedReportID)),e(w("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",I(o.selectedReportID)),e(w("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Me({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(H({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(K())},onUpdateDisplayOrder:a=>{e(Ee(a))},onUpdateReportFormat:a=>{_a(e),e(je(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ta);function ba(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=We(),m=Ze(),u=oa(m),a=ye(),s=Ce(),t=z(),{tenantEmailDomain:r}=ge(),{useFeatureGate:c}=ee(),{isFeatureEnabled:f}=c(E.isReportsHorizontalClassLayoutSwitchEnabled),l=ae.getSignedInUser(),[i,C]=_.useState(!1),[M,te]=_.useState(!1),{isFeatureEnabled:B}=c(E.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const J=d(n=>L(n)),oe=J.company?.companyInfo.firstMonthOfFY??1,ne=ma(B?J?.companyId:void 0),g=d(n=>S(n).fetchState),re=d(n=>Ie(n)),{areTenantIdsInSync:h}=Xe(),R=d(n=>n.financeStatementState.selectedReportId),v=d(n=>Z(n)),T=d(n=>X(n)),ie=d(n=>S(n).isCompareModeOn),b=d(n=>S(n).filter),A=d(n=>S(n).selectedReportAndTimeframeFetchState),le=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(C(!0),s(O(l.userId,!0,!0,!1)))},[i,l,s,h]),_.useEffect(()=>{i&&!M&&g==="Completed"&&h&&(s(O(l.userId,!1,!0,!1)),te(!0))},[i,M,g,h]),_.useEffect(()=>{if(i&&A.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Ae(b.timeframe));break;case"profit_and_loss_by_projects":T&&s(K());break;case"balance_sheet":s(Te(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}},[i,R,A,h,v,T]);const U=Ke(),ce=U?.loggedInUserRole!=null&&Oe(U?.loggedInUserRole)!==!0,[de,pe]=_.useState(!1),V=n=>{pe(n)},me=ea(),fe=da();return function(n){const{isDataReady:ue}=n,{pathname:_e}=z(),x=Qe(_e??"")==="reports",he=la(ue),be=_.useMemo(()=>x?ua:void 0,[x]);ca({canFetchSuggestedQuestions:he,pageContexts:be})}({isDataReady:g==="Completed"}),pa({isDataReady:g==="Completed"}),p.jsxs(p.Fragment,{children:[g==="Completed"?p.jsx(aa,{analytics:P,onLoad:n=>n.trackPageLoaded(sa.Event.reports)}):null,p.jsx(fa,{isAppContentDrawerOpen:de,handleDrawerToggle:V}),p.jsx(ha,{firstMonthOfFY:oe,tenantEmailDomain:r,location:t,navigate:a,windowSize:m,classViewLayout:le,selectedReportID:R,analytics:P,filter:b,isAccountingClassesEnabled:v,isAccountingProjectsEnabled:T,isCompareModeOn:ie,hasTransactionAccess:ce,signedInUser:l,selectedReportAndTimeframeFetchState:A,handleDrawerToggle:V,reportsResyncFetchState:re.reportsResyncFetchState,isAiCfoAccessEnabled:fe&&me&&!e,onAskAiCfoClick:()=>{if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:f,isReportsCommentingEnabled:B,initialOpenThreadRequest:ne})]})}const I=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function Ua(){const e=d(s=>L(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:m}=o(E.isDebitCardFeatureEnabled),u=qe(m,e),a=$e(e);return u===!0||a===!0?p.jsx(ia,{}):p.jsxs(we,{children:[p.jsx(G,{path:"/",element:p.jsx(ba,{})}),p.jsx(G,{path:"*",element:p.jsx(ra,{})})]})}export{Ua as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-DkPfdehf.js";import{y as w,z as j,aK as y,s as E,c as p,e as F,cF as P,S as L}from"./index-D7lET21U.js";import"./mui-Ctp_ou6C.js";import l from"./NotFoundScreen-C0APD5Cv.js";import{a as f}from"./sentry-BxQ6uAJu.js";import{h as T,g as b,j as V,u as A,k as R,n as U,o as u}from"./core-DJZqFFKe.js";import{eO as z,PW as C,ML as Y,PX as _,tI as G,e_ as O,PY as K,tG as M}from"./zeni-epic-state-CNc-1z4P.js";import{R as x}from"./ReferralListScreen-BvE3nvBn.js";import"./recharts-D041iH6A.js";import"./analytics-C6M-DE9i.js";import"./plaid-VWs98BAj.js";import"./dnd-un89-W8a.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-PtdQRY.js";import"./lexical-ChRCvCis.js";import"./pdf-xyjfLAhh.js";import"./utils-D2tZzHCG.js";import"./useAskAiCfoHostNavButtonProps-CiCnpKpN.js";import"./useFetchSuggestedQuestionsWhenReady-3NQ4UG95.js";import"./MobileAppDrawer-DtbNyRlE.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]="45fa892a-e508-4954-8f58-6eb985016f27",e._sentryDebugIdIdentifier="sentry-dbid-45fa892a-e508-4954-8f58-6eb985016f27")}catch{}})();const W=R(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,i=j.getSignedInUser();return{onDismissClick:()=>{e(_()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(M())},onUpdateInviteFormLocalData:s=>{e(K({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(P),X=()=>{const e=T(),[t,n]=f.useState(!1),[i,s]=f.useState(!1),r=b(o=>z(o)),c=V(),k=A(),{useDynamicConfig:g}=w(),d=j.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const m=b(o=>C(o)),D=d?.firstName!=null?d.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:S}=g(y.zeniAccountsConfig),v=Y(S);f.useEffect(()=>{e(_()),r?.rewardsLastViewedTime==null&&i===!1&&(e(G()),s(!0))},[]),f.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(O(!0)))},[m.fetchState,e]);const I=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:o=>(N=>N.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,a.jsx(W,{navigate:c,location:k,currentTenant:r,companyName:I,userName:D,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:v.maxAnnualPercentageYield})]})};function de(){const{useFeatureGate:e}=w(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(u,{path:"/",element:t?a.jsx(x,{}):a.jsx(l,{})}),a.jsx(u,{path:"how-it-works",element:t?a.jsx(x,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(u,{path:"refer/*",element:t?a.jsx(X,{}):a.jsx(l,{})}),a.jsx(u,{path:"*",element:a.jsx(l,{})})]})}export{de as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-B9FZcGg_.js","assets/sentry-BxQ6uAJu.js","assets/core-DJZqFFKe.js","assets/zeni-epic-state-CNc-1z4P.js","assets/index-D7lET21U.js","assets/mui-Ctp_ou6C.js","assets/analytics-C6M-DE9i.js","assets/utils-D2tZzHCG.js","assets/withTransactionSidePanel-BEuIUcFf.js","assets/useAskAiCfoHostNavButtonProps-CiCnpKpN.js","assets/useFetchSuggestedQuestionsWhenReady-3NQ4UG95.js","assets/TransactionDetailScreen-Xdy6AbKJ.js","assets/decodeURIComponentSafe-BiP6rBCT.js","assets/routePaths-B7y8nrZh.js","assets/NotFoundScreen-C0APD5Cv.js","assets/analyticsHelper-CcCG6rlr.js","assets/CompanyPassportScreen-Q0n29h95.js","assets/MobileAppDrawer-DtbNyRlE.js","assets/FeaturePreviewScreen-BS0CUw64.js","assets/ReferralListScreen-BvE3nvBn.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-OK545GKf.js","assets/AddressScreen-02D4IIXX.js","assets/DomesticWireDetailScreen-IKqhZwSm.js","assets/useInitialThreadRequest-Dt7T5zj_.js","assets/DrawerScreen-CqfyZCQa.js","assets/SetupPagesScreen-Bp4AY0Mi.js","assets/BusinessVerificationPageScreen-DYMZT7MK.js","assets/BillPayApprovalRoutes-DKiUw_-9.js","assets/ReimbursementApprovalRuleDetailScreen-Di2Ku2FG.js","assets/getLocaleForTenant-DRam5UTN.js","assets/ReimbursementRoutes-ZdCYLB4c.js","assets/ReimbursementApprovalRoutes-C_KFvFIG.js","assets/TransactionListRoutes-BUHLsf1W.js","assets/ZeniAccountStatementScreen-Bkchp_FB.js","assets/SettingsRoutes-mXduxOe-.js","assets/accountMappingHelper-CIYwyHCp.js","assets/QBOConnectionScreen-wVcEP_8O.js","assets/empty-CmWX-en4.js","assets/index-De7-Fto_.js","assets/url-pCQvflln.js","assets/index-D6X2nsqL.js","assets/ReportsRoutes-DY3K_f7D.js","assets/ChargeCardRoutes-DPHmXO1M.js","assets/PeopleRoutes-DESsHXKz.js","assets/ExpenseAutomationRoutes-DUDB7RUh.js","assets/TreasuryRoutes-BT79rxoz.js","assets/VendorsRoutes-pn6DcmDJ.js","assets/pathToGoBack-Db6TK5Kp.js","assets/ZeniAccountRoutes-DA5CjpcO.js","assets/AddressRoutes-DQ24VS9r.js","assets/PandLWithForecastRoutes-B3dmA1Sq.js","assets/CustomerOnboardingRoutes-C4fjdrqy.js","assets/TransactionDetailRoutes-BEdN3a0Y.js","assets/EntityDetailRoutes-fOUHttju.js","assets/NotificationRoutes-DuXZgoY7.js","assets/PerformanceRoutes-keesTah9.js","assets/RewardsRoutes-BqMNvsjf.js","assets/TaskRoutes-DRX9ktVK.js","assets/TaskListScreen-COtjlPYY.js","assets/AiCfoScreen-7Qfw7m1h.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as n,bn as os,eO as ls,eU as cs,eS as ds,eT as ms,fD as us,eQ as _s,cP as Ee,cw as Es,f9 as As,co as ps,bD as Is,bq as gs,fe as xs,v as Ts,IR as hs,bv as js,IS as Us,bF as Ds,fb as Hs,bE as Rs,bs,ck as fs,IT as ys,IU as Cs,cM as vs,cO as Os,cN as Ps,cv as Fs,cB as Ls,mv as Ae,eP as pe,fN as Bs,fi as Ie,fK as ge,fL as xe,fj as ks}from"./zeni-epic-state-CNc-1z4P.js";import{j as e}from"./liveblocks-DkPfdehf.js";import{a as v}from"./sentry-BxQ6uAJu.js";import{h as Ss,j as Vs,l as Ns,u as Ms,g as z,i as Te,N as c,n as Zs,o as t}from"./core-DJZqFFKe.js";import{m as ws,u as zs,z as H,y as Gs,a as $s,I as Ys,S as L,k as qs,L as B,D as he,t as _,P as Ws,c as X,l}from"./index-D7lET21U.js";import"./mui-Ctp_ou6C.js";import{f as je}from"./analyticsHelper-CcCG6rlr.js";import{t as Ks}from"./getLocaleForTenant-DRam5UTN.js";import"./recharts-D041iH6A.js";import"./analytics-C6M-DE9i.js";import"./plaid-VWs98BAj.js";import"./dnd-un89-W8a.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-PtdQRY.js";import"./lexical-ChRCvCis.js";import"./pdf-xyjfLAhh.js";import"./utils-D2tZzHCG.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="0936f8e7-1d10-4cdc-8ad9-ffd14265f761",i._sentryDebugIdIdentifier="sentry-dbid-0936f8e7-1d10-4cdc-8ad9-ffd14265f761")}catch{}})();const Qs={dashboard:()=>n(()=>import("./DashboardRoutes-B9FZcGg_.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>n(()=>import("./BillPayRoutes-OK545GKf.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-ZdCYLB4c.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20])),transactions:()=>n(()=>import("./TransactionListRoutes-BUHLsf1W.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>n(()=>import("./SettingsRoutes-mXduxOe-.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20])),reports:()=>n(()=>import("./ReportsRoutes-DY3K_f7D.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-DPHmXO1M.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>n(()=>import("./PeopleRoutes-DESsHXKz.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-DUDB7RUh.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>n(()=>import("./TreasuryRoutes-BT79rxoz.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>n(()=>import("./VendorsRoutes-pn6DcmDJ.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-DA5CjpcO.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Js=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>n(()=>import("./ReportsRoutes-DY3K_f7D.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),en=l(()=>n(()=>import("./AddressRoutes-DQ24VS9r.js"),__vite__mapDeps([50,1,2,3,22,4,5,6,7,14,20]))),sn=l(()=>n(()=>import("./PeopleRoutes-DESsHXKz.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-B3dmA1Sq.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-C4fjdrqy.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,14,37,38,39,40,41,12,20]))),tn=l(()=>n(()=>import("./VendorsRoutes-pn6DcmDJ.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-BEdN3a0Y.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-fOUHttju.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),on=l(()=>n(()=>import("./DashboardRoutes-B9FZcGg_.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),De=l(()=>n(()=>import("./BillPayRoutes-OK545GKf.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),ln=l(()=>n(()=>import("./SettingsRoutes-mXduxOe-.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20]))),He=l(()=>n(()=>import("./ReimbursementRoutes-ZdCYLB4c.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-DA5CjpcO.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),dn=l(()=>n(()=>import("./TreasuryRoutes-BT79rxoz.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),mn=l(()=>n(()=>import("./TransactionListRoutes-BUHLsf1W.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),un=l(()=>n(()=>import("./ChargeCardRoutes-DPHmXO1M.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),_n=l(()=>n(()=>import("./NotificationRoutes-DuXZgoY7.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),En=l(()=>n(()=>import("./PerformanceRoutes-keesTah9.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),An=l(()=>n(()=>import("./ExpenseAutomationRoutes-DUDB7RUh.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),pn=l(()=>n(()=>import("./RewardsRoutes-BqMNvsjf.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),In=l(()=>n(()=>import("./TaskRoutes-DRX9ktVK.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),gn=l(()=>n(()=>import("./AiCfoScreen-7Qfw7m1h.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,20]))),f=l(()=>n(()=>import("./NotFoundScreen-C0APD5Cv.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),xn=l(()=>n(()=>import("./TaskListScreen-COtjlPYY.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function wn({setTenantEmailDomain:i}){const U=Ss(),S=Vs(),{tenantEmailDomain:o}=Ns(),V=ws().mode,{setLoading:y,clearAllLoading:O,clearLoading:Z}=zs(),b=H.getSignedInUserTenant(o)?.tenantId,h=H.getSignedInUser(),K=os(h),G=Ms(),[N,be]=v.useState(!1),r=z(a=>ls(a)),{useFeatureGate:P}=Gs(),Q=$s(),fe=Ys(),{isFeatureEnabled:ye}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||ye&&K,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=z(a=>a.tenantState.fetchState),A=z(a=>a.tenantState.activeTenantFetchState.fetchState),u=A==="Completed"||j==="Completed"?cs(se,r):void 0,$=A==="Completed"||j==="Completed"?ds(r):void 0,Le=A==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Se}=P(L.isAiCfoFileUploadEnabled),Y=z(a=>us(a));if(o!=null){const a=H.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,V)}const w={tenantId:b,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),E=qs(),Ve=r.company==null||E?.loggedInUserRoleMap!=null&&Ee(E.loggedInUserRole),Ne=Es(E?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,J=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(a=>w.tenantId!=null?As(a,w.tenantId):void 0);v.useEffect(()=>{y(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(J!=null&&b!=null){const a=J.params.selectedPeriod;if(a!=null){const D=a.split("-");if(D.length===2){const d=ps(Number(D[0])),s=Number(D[1]),m=Is(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=gs();m.isAfter(M,"month")===!1?U(xs(b,{month:d,year:s})):S("./month_end_close_checks/review")}}}},[J,b]),v.useEffect(()=>{N||(be(!0),y(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&H.isSignedIn()&&(y(B.TENANT_FETCHING),function(a,D,d,s){if(pe(D?.userId,D?.zeniSessionId,a.tenantId),d(Bs(!0)),d(Ie(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=H.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(Ks(s)),m?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?X.identify(a.userId,{tenant_id:a.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,H]),v.useEffect(()=>{H.isSignedIn()&&(y(B.TENANT_FETCHING),function(a,D,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const q=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(q&&ts){k(Ie(s));const W=H.getSignedInUserTenantWithId(s);W?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(W?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)))}else q&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),q&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)));if(q){X.identify(m.userId,{tenant_id:s});const W=s==null||s!=null&&(D==="Completed"||D==="Error");a==="Completed"||D!=="Not-Started"&&D!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ae(m.userId,m.zeniSessionId)))}}(j,A,r,b,h,y,U))},[b,A]),v.useEffect(()=>{H.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),H.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),h!=null&&je(h,r,V,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{A==="In-Progress"&&y(B.TENANT_FETCHING),A!=="Completed"&&A!=="Error"||(A==="Completed"&&b!=null?(O(),_.markActiveTenantFetchCompleted(b)):A==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[A,j,b,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&A==="Completed"&&N&&(ie.current=!0,function(a=Js,D=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Qs[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},D)}())},[A,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ee(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,Ge=Us(E?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&Ds(E?.loggedInUserRoleMap),me=Oe&&!C,Ye=r.company!=null&&Hs(r.company),qe=Pe&&Ye===!0&&!C,We=re&&Rs(E?.loggedInUserRoleMap),Ke=oe&&bs(E?.loggedInUserRoleMap),Qe=me&&fs(E?.loggedInUserRoleMap),Je=ys(E?.loggedInUserRoleMap),Xe=Cs(E?.loggedInUserRoleMap),p=vs(E?.loggedInUserRoleMap),I=Os(E?.loggedInUserRoleMap),g=Ps(E?.loggedInUserRoleMap),x=Fs(E?.loggedInUserRoleMap),T=Ls(E?.loggedInUserRoleMap),ue=re&&x,_e=ce&&T,es=me&&p,ss=qe&&I,ns=oe&&g,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||Ge===!0||Je===!0||Xe===!0;return H.isSignedIn()?b==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ae(h.userId,h.zeniSessionId)),null):A!=="In-Progress"&&A!=="Not-Started"||j==="Completed"?(le===!0||K&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||K?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(Ws,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||ze?e.jsx(rn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:I,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(xn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(In,{})}),e.jsx(t,{path:"address/*",element:We||de||Qe||Ke?e.jsx(en,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(cn,{}):e.jsx(f,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(f,{})}),e.jsx(t,{path:"performance",element:fe?e.jsx(En,{}):e.jsx(Re,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(An,{}):e.jsx(Re,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Ve?e.jsx(tn,{}):e.jsx(f,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(De,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(De,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(ln,{hasAdminLevelAccess:de}):e.jsx(f,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(f,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(f,{})}),e.jsx(t,{path:"/ai-cfo",element:Q?e.jsx(c,{to:"explore"}):e.jsx(f,{})}),e.jsx(t,{path:"/ai-cfo/",element:Q?e.jsx(c,{to:"explore"}):e.jsx(f,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Q?e.jsx(gn,{isFileUploadEnabled:Se}):e.jsx(f,{})}),e.jsx(t,{path:"*",element:e.jsx(f,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}const Tn=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:S,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:V,isUserHasTreasuryAccess:y,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):y?e.jsx(c,{to:"treasury"}):S?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):V?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),R=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:S,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:V,isTenantBankingOnly:y,tenantEmailDomain:O})=>y===!0||i?e.jsx(Dn,{tenantEmailDomain:O}):V?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Hn,{tenantEmailDomain:O}):S?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(f,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Dn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),Re=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{R as FallBackRoute,wn as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-DkPfdehf.js";import{a as u,b as T,q as A}from"./sentry-BxQ6uAJu.js";import{h as D,j as z,g as c,u as M,N as O,k as P}from"./core-DJZqFFKe.js";import{u as j,z as s,m as F,c as E,D as B,d as _,e as N,$,g as V,r as W,f as v}from"./index-D7lET21U.js";import{eO as q,IQ as H,IR as J,eP as Q,fi as R,IW as X,fH as Y,cT as Z,IX as C,IY as G,IZ as K,bS as y}from"./zeni-epic-state-CNc-1z4P.js";import"./mui-Ctp_ou6C.js";import{u as ee}from"./useDeviceId-CWGC34ee.js";import{f as te}from"./analyticsHelper-CcCG6rlr.js";import{t as ne}from"./getLocaleForTenant-DRam5UTN.js";import"./recharts-D041iH6A.js";import"./analytics-C6M-DE9i.js";import"./plaid-VWs98BAj.js";import"./dnd-un89-W8a.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-PtdQRY.js";import"./lexical-ChRCvCis.js";import"./pdf-xyjfLAhh.js";import"./utils-D2tZzHCG.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]="d816e66f-d63d-411f-acd1-c7efcc664552",t._sentryDebugIdIdentifier="sentry-dbid-d816e66f-d63d-411f-acd1-c7efcc664552")}catch{}})();const ie=P(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}},function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(K({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(l),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(G(n,a)))},clearSignInError:()=>{t(C())}}})(W),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=j(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),l=c(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:U,accountUnlockTime:k}=c(e=>e.tenantState),p=c(e=>e.tenantState.fetchState),L=c(e=>e.tenantState.activeTenantFetchState.fetchState),I=c(e=>e.tenantState.signInState),o=c(e=>e.tenantState.loggedInUser),r=c(e=>q(e)),S=c(e=>H(e)),m=M(),w=F().mode,b=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))},[h.fetchState,l]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{I!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(J(S.tenantsInOrder),o.zeniSessionId),Q(o.userId,o.zeniSessionId,r.tenantId),i(R(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(X("Completed")),B.updateAppLocaleID(ne(r)),te(o,r,w,void 0,S.tenantsInOrder),Y().then(()=>{const e=V();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(N.Event.loginSuccess,o.authProvider??"google",Z(r.productSettings))},2e3))},[I,p,L,o,r,S,w,m.state,i]),I==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!b,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),U===!0&&k!=null?f.jsx($,{onClose:()=>i(C()),unlockDate:k}):null]})}export{ve as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DkPfdehf.js";import{a as n}from"./sentry-BxQ6uAJu.js";import{h as u,u as m,j as p,N as g}from"./core-DJZqFFKe.js";import{z as f,B as y,t as h,c as d,e as b}from"./index-D7lET21U.js";import{fM as x,fN as I,Jc as j}from"./zeni-epic-state-CNc-1z4P.js";import{n as w}from"./mui-Ctp_ou6C.js";import"./recharts-D041iH6A.js";import"./analytics-C6M-DE9i.js";import"./plaid-VWs98BAj.js";import"./dnd-un89-W8a.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-PtdQRY.js";import"./lexical-ChRCvCis.js";import"./pdf-xyjfLAhh.js";import"./utils-D2tZzHCG.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]="d1de2f4c-23a1-424a-adfc-b26950971633",e._sentryDebugIdIdentifier="sentry-dbid-d1de2f4c-23a1-424a-adfc-b26950971633")}catch{}})();function U(){const e=u(),t=m(),i=p(),a=n.useRef(!1),c=f.isSignedIn(),r=t.state?.message==="logout",o=r||c;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{f.clearAll(),e(x()),e(I(!1)),j(),h.reset(),d.trackLogout(b.Event.logoutSuccess),d.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=w.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;export{U as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-DkPfdehf.js";import se from"./NotFoundScreen-C0APD5Cv.js";import{a as c}from"./sentry-BxQ6uAJu.js";import{j as O,h as Z,g as f,u as ne,l as oe,N as ie,k as re,n as ce,o as g}from"./core-DJZqFFKe.js";import{FS as M,FV as le,FY as de,eO as Q,PZ as H,Fa as J,EU as pe,FC as ue,Fv as ke,P_ as K,P$ as V,EQ as me,EN as ge,pO as fe,pC as he,k8 as Se,F0 as Ie,Q0 as Te,F5 as be,F2 as Ee,EX as Ce,Ff as Ge,Fe as De}from"./zeni-epic-state-CNc-1z4P.js";import{z as G,cG as Fe,n as xe,y as ye,S as b,p as W,j,s as je,c as z,e as ve,cH as we,f as _,aq as Re}from"./index-D7lET21U.js";import{n as Pe}from"./mui-Ctp_ou6C.js";import{u as Be}from"./useInitialThreadRequest-Dt7T5zj_.js";import{M as Ue}from"./MobileAppDrawer-DtbNyRlE.js";import Le from"./TaskListScreen-COtjlPYY.js";import"./recharts-D041iH6A.js";import"./analytics-C6M-DE9i.js";import"./plaid-VWs98BAj.js";import"./dnd-un89-W8a.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-PtdQRY.js";import"./lexical-ChRCvCis.js";import"./pdf-xyjfLAhh.js";import"./utils-D2tZzHCG.js";import"./useAskAiCfoHostNavButtonProps-CiCnpKpN.js";import"./useFetchSuggestedQuestionsWhenReady-3NQ4UG95.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]="cceb57db-5527-4792-becd-89ad928adaa5",e._sentryDebugIdIdentifier="sentry-dbid-cceb57db-5527-4792-becd-89ad928adaa5")}catch{}})();function $e(){const e=O(),t=Z(),s=G.getSignedInUser(),{cannedResponses:d,fetchState:r,saveFetchState:p}=f(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(M())},[t]),k=c.useCallback((o,h,S)=>{t(le({name:o,content:h,cannedResponseId:S}))},[t]),a=c.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(Fe,{cannedResponses:d,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:p==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let q,A=[];const Ne=re(function(e,t){const{location:s,taskGroupId:d}=t,r=K(e,t.taskId),p=Q(e),l=d!=null?V(e.taskGroupState,d):void 0,k=G.getSignedInUser(),a=p.tenantId,o={userId:k?.userId??"",sessionId:k?.zeniSessionId??"",tenantId:a??""},h=H(e),{tenantEmailDomain:S}=p,E=r.recurringSourceTaskId,D=E!=null?`${_.appUrl}/${S}/tasks/${encodeURIComponent(E)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:o,isZeniUser:G.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==q&&(q=I,A=Object.values(I)),A),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Re.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${_.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:D,tagListView:h,taskGroupName:d!=null&&l!=null&&l.isDefault===!1?l.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(u=>V(e.taskGroupState,u)).filter(u=>u!=null&&!u.isDeleted).map(u=>({id:u.id,name:u.name,isDefault:u.isDefault}))}},function(e,t){const{taskId:s,navigate:d,currentTenant:r,location:p,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ge(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ce(t.taskId))},onSnoozeTask:(a,o)=>{e(Ee(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(p.state?.message==="triggerBackClick"){const a=W(p.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";d(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=v(k),o=j(p.state?.pathnameStackToGoBack,p.pathname);d(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Ie(s))},updateFilesEntity:a=>{e(Se({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(fe(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(J(!1,s))},onCreateTagClick:a=>{e(ge(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(M())},onManageTemplatesClick:()=>{d(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(we);function y(){const e=O(),t=Z(),s=ne(),d=xe(),{taskId:r,taskGroupId:p}=oe(),l=f(i=>Q(i)),k=Be(l?.companyId),{useFeatureGate:a}=ye(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:E}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:D}=a(b.isTaskGroupAssigneesEnabled),[I,u]=c.useState(!1),[w,X]=c.useState(!1),[R,Y]=c.useState(!1),[P,ee]=c.useState(!1),[B,F]=c.useState(!1),T=c.useRef(!1),C=f(i=>i.taskListState.updateTasksFetchState.fetchState),U=f(i=>H(i)),L=f(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{w||(X(!0),t(J(!1,r)))},[w,t]),c.useEffect(()=>{R||U.fetchState==="Completed"||(Y(!0),t(pe()))},[R,t,U.fetchState]),c.useEffect(()=>{P||L==="Completed"||(ee(!0),t(ue()))},[P,t,L]);const ae=c.useCallback(()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),F(!0))},[t,r]);c.useEffect(()=>{if(B)if(C!=="In-Progress"){if(T.current){if(C==="Error")return F(!1),void(T.current=!1);if(C==="Completed"){F(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=W(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=v(i);e(m,{state:{pathnameStackToGoBack:j(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[B,C,l,s,e]);const $=f(i=>K(i,r)),x=$.fetchState,N=G.getSignedInUser();if(N==null)throw Error("Can't access task detail page without signing in...");if(x==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=l,m=v(i),te=j(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[x==="Completed"?n.jsx(je,{analytics:z,onLoad:i=>(m=>m.trackPageLoaded(ve.Event.taskDetailPage))(i)}):null,n.jsxs(Ve,{children:[n.jsx(Ue,{isAppContentDrawerOpen:I,handleDrawerToggle:i=>{u(i)}}),n.jsx(Ne,{analytics:z,currentTenant:l,handleZeniLogoClick:()=>{d.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:N,navigate:e,taskGroupId:p,taskId:r,taskDetailFetchState:x,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:E,isTaskGroupAssigneesEnabled:D})]})]})}const Ve=Pe.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,v=e=>`/${e}/tasks`;function ra(){return n.jsxs(ce,{children:[n.jsx(g,{path:"/new",element:n.jsx(y,{})}),n.jsx(g,{path:"/new/:taskGroupId",element:n.jsx(y,{})}),n.jsx(g,{path:"/group/:taskGroupId",element:n.jsx(Le,{})}),n.jsx(g,{path:"/quick-responses",element:n.jsx($e,{})}),n.jsx(g,{path:"/:taskId",element:n.jsx(y,{})}),n.jsx(g,{path:"*",element:n.jsx(se,{})})]})}export{ra as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-DkPfdehf.js";import i from"./NotFoundScreen-C0APD5Cv.js";import{T as r}from"./TransactionDetailScreen-Xdy6AbKJ.js";import"./sentry-BxQ6uAJu.js";import{n as a,o}from"./core-DJZqFFKe.js";import"./zeni-epic-state-CNc-1z4P.js";import"./recharts-D041iH6A.js";import"./index-D7lET21U.js";import"./mui-Ctp_ou6C.js";import"./analytics-C6M-DE9i.js";import"./plaid-VWs98BAj.js";import"./dnd-un89-W8a.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-PtdQRY.js";import"./lexical-ChRCvCis.js";import"./pdf-xyjfLAhh.js";import"./utils-D2tZzHCG.js";import"./useAskAiCfoHostNavButtonProps-CiCnpKpN.js";import"./useFetchSuggestedQuestionsWhenReady-3NQ4UG95.js";import"./decodeURIComponentSafe-BiP6rBCT.js";import"./routePaths-B7y8nrZh.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]="eb8d9915-3f2e-47a0-a713-5db167080b95",e._sentryDebugIdIdentifier="sentry-dbid-eb8d9915-3f2e-47a0-a713-5db167080b95")}catch{}})();function q(){return t.jsxs(a,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{q as default};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{j as I}from"./liveblocks-DkPfdehf.js";import{a as d}from"./sentry-BxQ6uAJu.js";import{h as j,g as S,u as re,j as le,l as de,N as Re,k as Ge}from"./core-DJZqFFKe.js";import{bn as je,eO as K,cP as ue,bv as me,pt as Y,K3 as B,L4 as pe,L5 as J,Kt as he,jL as fe,L6 as ge,Ky as Z,Kz as Q,kA as Se,H2 as X,JZ as x,jF as ye,jD as Te,jP as $e,L7 as Me,L8 as We,tp as G,jK as ve,Gp as Ee,cU as qe,cV as He,L9 as Ke,JY as Ye,La as Je,tt as Ze,Lb as Qe,Lc as Xe,Ld as ea,Le as aa,Lf as ta,jO as na,Lg as oa,Lh as sa,J_ as ia,Li as ca,Lj as ra,Lk as la,Gj as da,G7 as ua,GB as ma,jQ as pa,H3 as ie,Gg as ha}from"./zeni-epic-state-CNc-1z4P.js";import{z as De,y as ee,S as _,aK as Ce,m as fa,Z as ga,aL as Sa,C as ya,p as q,k as Ta,aM as va,j as H,c as be,aN as Ea,aq as Da,W}from"./index-D7lET21U.js";import{n as Ca,S as ba,D as Ia}from"./mui-Ctp_ou6C.js";import{u as ka}from"./useAskAiCfoHostNavButtonProps-CiCnpKpN.js";import{c as La}from"./useFetchSuggestedQuestionsWhenReady-3NQ4UG95.js";import{d as Ie}from"./decodeURIComponentSafe-BiP6rBCT.js";import{h as ke,g as Ua,d as Aa,b as xa}from"./routePaths-B7y8nrZh.js";import{t as _a}from"./utils-D2tZzHCG.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]="c56857a8-05b6-4574-977c-27e4907959fc",a._sentryDebugIdIdentifier="sentry-dbid-c56857a8-05b6-4574-977c-27e4907959fc")}catch{}})();const ae=()=>{const a=De.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(_.isChainOfThoughtEnabled);return d.useMemo(()=>je(a)&&s,[a,s])};function Le(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Ja(a,e){const s=j(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>K(u)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ue(o.userRole),g=o.userRole!=null&&me(o.userRole),{isFeatureEnabled:y}=t(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:b}=t(_.isExpenseAutomationEnabled),{configValue:h}=n(Ce.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,k=ae(),T=d.useMemo(()=>({id:a,type:Y(e)}),[a,e]),m=S(u=>B(u,T)),C=S(u=>{const N=B(u,T)?.transactionDetailLocalData.vendorUpdates?.id;return N==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[N]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Le(m?.transaction):void 0,[m?.fetchState,m?.transaction]),E=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),L=S(u=>J(u)),V=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),$=o.company?.companyInfo.firstMonthOfFY??1,M=S(u=>fe(u.accountState,u.accountListState,"accountList")),[w,P]=d.useState(!1),[F,v]=d.useState(!1),[c,O]=d.useState(!1);d.useEffect(()=>{P(!1),v(!1),O(!1)},[a,e]);const D=d.useCallback(()=>{P(!1),v(!1)},[]),[U,A]=d.useState(!1),z=V?.selectedPeriod?.timePeriod;return d.useEffect(()=>{c||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),O(!0)),p!=null&&(!i||l&&g===!1)&&(w?F||E==null||(v(!0),s(X(p,"TransactionDetail",{timeframe:"month",timePeriod:z??E}))):(s(Z()),s(Q()),P(!0),s(Se(p))))},[s,c,m?.fetchState,m?.transaction,p,i,l,g,w,F,E,z]),d.useEffect(()=>{L.newVendorState?.vendorDetailLocalData?.vendorName!=null?A(!0):A(!1)},[L.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(x("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:y,isExpenseAutomationEnabled:b,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:k,selectedTransaction:T,transactionDetail:m,vendorSaveStatus:C,tranEntity:p,defaultTrendTransactionTimePeriod:E,vendorViewDetails:L,uiState:V,firstMonthOfFY:$,uncategorizedAccounts:M,resetTrendIsFetchedStates:D,isCreateVendorDrawerOpen:U,setIsCreateVendorDrawerOpen:A}}const Va={overlayWidth:new ya(100,100,58)},Pa=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=fa(),i=ga(),l=j(),g=S(h=>J(h)),y=()=>{t()},b={vendorDetailView:n??g,onSaveSuccess:()=>{l(Te()),l($e("Not-Started")),s()},onSaveVendor:e,onCancelClick:y,saveVendorDetailLocalData:h=>{l(ye({vendorId:void 0,localData:h}))}};return I.jsx(Ia,{anchor:"right",open:a,PaperProps:{style:{width:Va.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:y,children:I.jsx(Ba,{onClick:h=>h.stopPropagation(),children:I.jsx(Sa,{...b})})})},Ba=Ca(ba)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,wa=({closeDrawerHandler:a,overrideTransactionId:e,overrideTransactionType:s})=>{const t=re(),n=le(),o=j(),i=ae(),{transactionTypeEncoded:l,transactionId:g}=de(),y=e??g,b=s??Ie(l??"");let h;ke(y,b)&&(h={id:y,type:Y(b)});const f=h!=null?S(T=>B(T,h)):void 0,k=()=>{const T=q(t.state?.pathnameStackToGoBack),m=T.poppedPathname??((C=2)=>{let p="../";for(let E=0;E<C;E++)p=`${p}../`;return p})(1);n(m,{state:{pathnameStackToGoBack:T.newStack}})};return{transactionId:h,onSaveVendor:()=>{o(ve(h,void 0))},onSaveSuccess:()=>{if(f!=null&&f?.transaction&&f?.transactionDetailLocalData.vendorUpdates?.qboId!=null&&f?.transactionDetailLocalData.vendorUpdates?.id!=null){const T=f?.transactionDetailLocalData.vendorUpdates,m={id:f?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:f?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:T?.name,qboId:f?.transactionDetailLocalData.vendorUpdates?.qboId??""},C={transactionId:{id:f?.transaction?.id,type:f?.transaction?.type},transaction:f?.transaction,lineIds:f?.transaction?.lines?.map(p=>p.id)??[]};o(G(m,f?.transaction?.amount.amount,C,!1,!1,i))}k()},onCancel:()=>{h!=null&&o(Me({transactionId:h})),o(Te()),o(We()),a(!0),k()}}},Fa=Ge(function(a,e){const s=B(a,e.selectedTransaction);let t;s==null&&console.warn("Check if the you've selected the transaction before getting the details");const n=De.getSignedInUser(),o=a.tenantState.currentTenantId,i={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""};s!=null&&s.fetchState==="Completed"&&s.transaction!=null&&e.entity!=null&&(t=Ke(a,e.entity,"TransactionDetail"));const l=a.entityAutoCompleteState.autoCompleteText.common,g=Ye(a,"common"),y=K(a);return{transactionDetail:s,transactionAttachmentEndpointToDownload:`${W}/transaction_attachment`,transactionAttachmentsEndpointToFetch:y.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${W}/transaction_attachments_accounting_provider`:`${W}/transaction_attachments`,attachmentUploadEndpoint:`${Da.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:i,trendReport:t,analytics:be,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:l,entityAutoCompleteView:g},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails")}},function(a,e){const{isCOTEnabled:s}=e;return{onBackClick:()=>{if(a(x("common")),e.onBackClick!=null)return void e.onBackClick();const t=q(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ue(2);e.navigate(n,{state:{pathnameStackToGoBack:t.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(t,n)=>{e.transaction!=null&&a(ha({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:t,customerId:n}))},onTransactionClick:t=>{e.resetTrendIsFetchedStates(),a(Z()),a(Q());const n=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(xa(t,e.tenantEmailDomain),{state:{pathnameStackToGoBack:n}})},onTrendSelectedPeriodChange:t=>{if(t==null)e.defaultTrendTransactionTimePeriod!=null&&a(ie(e.entity,"TransactionDetail",{timeframe:"month",timePeriod:e.defaultTrendTransactionTimePeriod}));else{const n=t.currentTimePeriod==null?t.addTimePeriod:{startDate:t.addTimePeriod.startDate,endDate:t.currentTimePeriod.endDate};a(X(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:t.addTimePeriod})),a(ie(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:n}))}},onSaveUpdates:(t,n,o,i)=>{a(i===!0&&o!=null?ve(t,o,!0,e.isExpenseAutomationEnabled,e.isUncategorizedExpenseCategoryEnabled):pa({transactionId:t,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:n,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled})),a(x("common"))},onUploadAttachmentAttachment:t=>{a(ma(t))},onDeleteAttachment:t=>{e.transaction!=null&&a(ua(t,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(t,n)=>{a(da({transactionId:t,transactionLocalData:n}))},onUpdateAllChecked:(t,n,o,i)=>{e.transaction!=null&&a(la(e.selectedTransaction,e.transaction,t,n,o,i))},onResetLineItemsCategoryClassInLocalData:(t,n,o,i,l,g)=>{a(ra(t,n,o,i,l,g))},onChangeCategoryClassWhenUpdateAllIsChecked:(t,n)=>{e.transaction!=null&&a(ca({id:e.transaction.id,type:e.transaction.type},e.transaction,t,n))},onSaveSuccess:()=>{const t=q(e.location.state?.pathnameStackToGoBack);if(t.poppedPathname!=null){const n=_a(t.poppedPathname,"/").split("/"),o=n[n.length-1];if(["uncategorized-income","uncategorized-expense","missing-receipts"].includes(o)&&e.navigate(t.poppedPathname,{state:{pathnameStackToGoBack:t.newStack}}),e.location.state?.message==="comingFromScheduleDetails"){const i=`${Ua(e.tenantEmailDomain)}`;e.navigate(i)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const i=`${Aa(e.tenantEmailDomain)}`;e.navigate(i)}}},onPageRefresh:()=>{a(Ee(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?a(ia({searchString:t,entityType:n,searchOrigin:"common"})):t.trim().length===0&&a(x("common"))},onCancelAutoComplete:()=>{a(x("common"))}},onFetchRecommendationsForEntity:(t,n,o,i)=>{a(G(t,n,o,i,!1,s))},clearRecommendationForLineId:t=>{const{transactionId:n,transaction:o,lineId:i}=t;a(sa(n,o,i))},resetUpdateErrorState:()=>{const t={id:e.selectedTransaction.id,type:e.selectedTransaction.type};a(oa(t))},onSaveVendorInLocalData:(t,n,o,i,l)=>{if(a(na({transactionId:t,vendorUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(G(o,i,l,!1,!1,s)),a(ye({vendorId:n.id?n.id:void 0,localData:{vendorName:n.name,vendorId:n.id?n.id:void 0}})),!n.id&&e.transaction!=null){const g=e.transaction,y=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(g.type??"")}/${g.id}/vendor/create`,{state:{pathnameStackToGoBack:y}})}},onSaveCustomerInLocalData:(t,n,o,i,l)=>{a(ta({transactionId:t,customerUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(G(o,i,l,!1,!1,s))},onUpdateAllTranactionsWithCurrentVendorChecked:t=>{a(aa({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:t}))},onClickUpdateVendorToAllLineItems:(t,n,o)=>{a(ea(t,n,o))},onResetVendorToAllLineItems:(t,n,o)=>{a(Xe(t,n,o))},saveLatestSelectedEntity:(t,n,o)=>{a(Qe({transactionId:t,lineId:n,entity:o}))},updateVendorBulkRecommendationsFetchStatus:(t,n)=>{a(Ze(t,n))},setIsVendorUpdateAllChecked:(t,n,o)=>{a(Je(t,n,o))}}})(Ea);function Za(){const a=le(),e=j(),s=re(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=Ta(),i=S(r=>K(r)),l=i.userRole.includes("charge_card_user")||i.userRole.includes("charge_card_admin"),g=i.userRole!=null&&ue(i.userRole),y=i.userRole!=null&&me(i.userRole),{isFeatureEnabled:b}=t(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:h}=t(_.isExpenseAutomationEnabled),{configValue:f}=n(Ce.enableUncategorizedExpenseCategory),k=f?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:T,transactionTypeEncoded:m,transactionId:C}=de(),[p,E]=d.useState(!1),L=Ie(m??""),V=ke(C,L),$=S(r=>r.transactionVendorViewState),M=ae(),{isFeatureEnabled:w}=t(_.isTransactionCommentingEnabled),P=o?.currentTenant?.companyId,F=o?.currentTenant?.companyName;let v;V&&(v={id:C,type:Y(L)});const c=v!=null?S(r=>B(r,v)):void 0,O=c?.transactionDetailLocalData.vendorUpdates?.id!=null?$.editVendorStateById[c?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",D=c?.fetchState==="Completed"?Le(c?.transaction):void 0,U=S(r=>D!=null?pe(r.customerIncomeState,r.vendorExpenseState,r.trendState,D,"month"):void 0),A=S(r=>J(r)),z=S(r=>D!=null?he(r.trendWithTransactionsState,D,"TransactionDetail"):void 0),u=i.company?.companyInfo.firstMonthOfFY??1,N=S(r=>fe(r.accountState,r.accountListState,"accountList")),[Ae,te]=d.useState(!1),[xe,ne]=d.useState(!1),[_e,Ve]=d.useState(!1),oe=()=>{te(!1),ne(!1)},Pe=va();d.useEffect(()=>{if(v!=null&&c!=null&&c.fetchState==="Not-Started")e(Ee(v)),oe();else if(v!=null&&c!=null&&c.fetchState==="Error"){const r=H(s.state?.pathnameStackToGoBack,s.pathname),R={pathnameStackToGoBack:r,message:"pageNotFound",origin:"transaction_detail"};Pe&&(R.message="expenseAutomation",R.origin="transaction_categorization",R.pathnameStackToGoBack=r),a("page-not-found",{replace:!0,state:R})}},[v]),d.useEffect(()=>{_e||c==null||c.transaction==null||(e(ge({id:c.transaction.id,type:c.transaction.type})),Ve(!0)),D==null&&c?.fetchState==="Completed"&&ce(c?.transaction),D!=null&&(!l||g&&y===!1)&&(Ae?xe||U==null||(ne(!0),e(X(D,"TransactionDetail",{timeframe:"month",timePeriod:z?.selectedPeriod?.timePeriod??U}))):(e(Z()),e(Q()),ce(c?.transaction),te(!0),e(Se(D))))},[c?.fetchState,c?.transaction,U,l]),d.useEffect(()=>{A.newVendorState?.vendorDetailLocalData?.vendorName!=null?E(!0):E(!1)},[A.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{e(x("common"))},[]);const Be=[m,C].filter(r=>r!=null),{transactionId:se,onSaveVendor:we,onSaveSuccess:Fe,onCancel:Oe}=wa({closeDrawerHandler:r=>{E(!1),a(r?"../":"../..")}}),{isAiCfoAccessEnabled:ze,onAskAiCfoClick:Ne}=ka({mobileExploreReferrer:"Transaction Details"});return La({isDataReady:c?.fetchState==="Completed"}),V?I.jsxs(I.Fragment,{children:[se!=null&&p&&I.jsx(Pa,{isOpen:p,transactionId:se,onSaveVendor:we,onSaveSuccess:Fe,onCancel:Oe}),I.jsx(Fa,{hideDeleteAttachment:!0,firstMonthOfFY:u,isDisabled:c?.transaction?.type==="transfer"&&o?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:T,location:s,navigate:a,selectedTransaction:v,entity:D,isCOTEnabled:M,defaultTrendTransactionTimePeriod:U,resetTrendIsFetchedStates:oe,transaction:c?.transaction,uncategorizedAccounts:N,vendorSaveStatus:O,isVendorBulkUpdateOnTransactionEnabled:b,isExpenseAutomationEnabled:h,isUncategorizedExpenseCategoryEnabled:k,isAiCfoAccessEnabled:ze,onAskAiCfoClick:Ne,isTransactionCommentingEnabled:w,companyId:P,companyName:F})]}):I.jsx(Re,{to:Ue(Be.length)})}const Ue=(a=2)=>{let e="../";for(let s=0;s<a;s++)e=`${e}../`;return e},ce=a=>{if(a!=null){const{transactionCategory:e,transactionClass:s}=Oa(a),t=za(a);be.trackTransactionDetails(a.account?.accountId,a.account?.accountName,a.id,t,e.length>0?e:void 0,s.length>0?s:void 0,a.type,a.amount,a.memo,a.lines?.length??0,a.attachments?.map(n=>n.fileName))}},Oa=a=>{const e=[],s=[];return a.lines?.forEach(t=>{switch(t.type){case"transaction_with_account_and_class_line":case"transaction_with_product_or_service_line":case"journal_entry_transaction_line":case"linked_transaction_line":{const n=t;n!=null&&n.account!=null&&n.account.accountName?.length>0&&e.push(n.account.accountName),n.class!=null&&n.class.className?.length>0&&s.push(n.class.className);break}}}),{transactionCategory:e,transactionClass:s}},za=a=>qe(a)===!0?a.customer?.name??"":He(a)===!0?a.vendor?.name??"":a.memo!=null?a.memo:a.type;export{Pa as C,Za as T,wa as a,Fa as b,ae as c,Ja as u};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-DkPfdehf.js";import{j as B,u as L,h as P,l as N,g as f,N as U,k as M,n as xe,o as C}from"./core-DJZqFFKe.js";import{cl as V,eO as D,Nd as R,Dn as ae,fc as H,D5 as ne,Nf as we,Dq as Te,Nb as Ie,Nc as se,Nu as ke,Bx as Ce,sm as je,Nh as be,DB as Ae,Ne as re,cO as Z,ws as oe,eS as Ee,eU as ve,Op as De,Oq as Fe,D6 as Ue,Or as Be,D7 as Le,Dg as Pe,bv as Re,bE as Oe,cw as Ne,bF as Me,ck as Ve,fb as _e,bs as ze,IS as $e,cj as Ge}from"./zeni-epic-state-CNc-1z4P.js";import{k as _,an as qe,z as A,s as z,c as j,b$ as He,c0 as Ze,c1 as q,Z as W,m as We,R as Je,y as ie,S as v,C as Ke,B as Qe,c2 as Xe,aq as J,j as Ye,c3 as et,p as K,c4 as tt,T as X,c5 as at,a6 as nt}from"./index-D7lET21U.js";import{D as st,n as O,S as rt}from"./mui-Ctp_ou6C.js";import ot from"./NotFoundScreen-C0APD5Cv.js";import{S as Y}from"./SetupPagesScreen-Bp4AY0Mi.js";import{a as d}from"./sentry-BxQ6uAJu.js";import{u as it}from"./useAskAiCfoHostNavButtonProps-CiCnpKpN.js";import{c as ct}from"./useFetchSuggestedQuestionsWhenReady-3NQ4UG95.js";import{M as ce}from"./MobileAppDrawer-DtbNyRlE.js";import{F as lt}from"./FeaturePreviewScreen-BS0CUw64.js";import{a as ee}from"./analyticsHelper-CcCG6rlr.js";import"./recharts-D041iH6A.js";import"./analytics-C6M-DE9i.js";import"./plaid-VWs98BAj.js";import"./dnd-un89-W8a.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-PtdQRY.js";import"./lexical-ChRCvCis.js";import"./pdf-xyjfLAhh.js";import"./utils-D2tZzHCG.js";import"./routePaths-B7y8nrZh.js";import"./BusinessVerificationPageScreen-DYMZT7MK.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="5e798e4c-6152-4951-a634-8cbed592e91f",t._sentryDebugIdIdentifier="sentry-dbid-5e798e4c-6152-4951-a634-8cbed592e91f")}catch{}})();const ut=M(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(t,n),analytics:j}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Te(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}})(He);function dt(){const t=B(),a=L(),n=P(),{tenantEmailDomain:o}=N(),p=_(),r=f(k=>k.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=qe(r),s=V(p?.loggedInUserRoleMap),[c,i]=d.useState(!1),[y,I]=d.useState(!1),[u,l]=d.useState(!1),g=f(k=>D(k)),S=A.getSignedInUserTenant(o)?.companyId??g.companyId,w=A.getSignedInUser(),h=f(k=>R(k,S)),T=f(k=>k.treasurySetupViewState.fetchState),x=f(k=>k.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(k=>k.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(w==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{c||T!=="Not-Started"||S==null||(i(!0),n(ae(S,!0,!1)))},[c,T,S,n]),d.useEffect(()=>{u||F!=="Not-Started"||S==null||(l(!0),n(H()))},[u,F,S,n]),d.useEffect(()=>{y||x!=="Not-Started"||S==null||(I(!0),n(ne()))},[y,x,S,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(U,{to:"../promo"});const E=g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||T!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(ut,{navigate:t,location:a,companyId:S,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:h,analytics:j})]})}const pt=M(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{q(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{q(a.analytics,"confirm",r,m,"Transfer"),t(Ae())},onSaveChangesToLocalStore:s=>{t(be(s))},onFetchLinkTokenClick:s=>{t(je("treasury_setup",s))},onEstablishConnectionClick:s=>{t(Ce(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Ze),mt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=N(),o=P(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[c,i]=d.useState(!1),[y,I]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),l=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),g=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),S=f(x=>D(x)),w=A.getSignedInUserTenant(n)?.companyId??S.companyId,h=f(x=>Ie(x)),T=f(x=>R(x,w));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||w==null||(s(!0),o(ae(w,!0,!1)))},[m,u,w,o]),d.useEffect(()=>{c||l!=="Not-Started"||w==null||(i(!0),o(H()))},[c,l,w,o]),d.useEffect(()=>{y||g!=="Not-Started"||w==null||(I(!0),o(ne()))},[y,g,w,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{analytics:j,navigate:a,transferDetails:h,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:S,treasurySetupView:T,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{q(j,"review",h.treasuryTransferMoneyLocalData,T.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},ft=O.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: ${t=>t.theme.colors.grey4};
|
|
9
|
-
`,yt={overlayWidth:new Ke(100,100,48)},gt=M(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:R(t,o),downloadEndPoint:`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:o,location:p,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:c=>{let i="page-not-found";c==="editPortfolio"?i=St(s):c==="statements"?i=ht(s):c==="taxLetter"?i=xt(s):c==="settings"&&(i=wt(s));const y=Ye(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:y}})},onColumnSortConfigChanged:(c,i)=>{t(De({uiState:{sortKey:c,sortOrder:i}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}})(Xe);function G({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=L(),o=B(),p=P(),r=W(),m=We(),s=f(b=>D(b)),{tenantEmailDomain:c}=N(),i=s.companyId??A.getSignedInUserTenant(c)?.companyId,[y,I]=d.useState(!1),u=f(b=>re(b)),l=u.fetchState,g=u.accountSummary?.totalBalance?.amount,S=f(b=>b.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),w=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",h=_(),T=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=V(h?.loggedInUserRoleMap),F=Z(h?.loggedInUserRoleMap),{areTenantIdsInSync:E}=Je();d.useEffect(()=>{l==="Not-Started"&&!y&&E&&(I(!0),p(oe(!0)))},[y,p,l,E]),d.useEffect(()=>{u.transactionsFetchState.fetchState==="Completed"&&u.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[u.transactionsFetchState.fetchState,u.transactions.length]);const k=()=>{o("..")},[le,ue]=d.useState(!1),Q=b=>{ue(b)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=it({mobileExploreReferrer:"Treasury"});ct({isDataReady:l==="Completed"});const{useFeatureGate:$}=ie(),{isFeatureEnabled:me}=$(v.isDebitCardFeatureEnabled),{isFeatureEnabled:fe}=$(v.isAutoTransferRuleEnabled),{isFeatureEnabled:ye}=$(v.isTreasuryCommentingEnabled),ge=Ee(s),Se=ve(me,s);if(ge===!0&&Se!==!0)return e.jsx(lt,{});if(w){const b=S?.fetchState!=="Completed"||u.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[u.accountSummaryFetchState.fetchState==="Completed"&&S?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:j,onLoad:()=>{}}):null,e.jsx(st,{onClose:k,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:yt.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(Tt,{onClick:he=>he.stopPropagation(),children:[t===!0?e.jsx(mt,{isFirstTransfer:u.transactions.length===0||g===0}):null,a===!0?e.jsx(dt,{}):null]})}),e.jsxs(ft,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:Q}),e.jsx(gt,{treasuryDetailsView:u,isAutoTransferRuleEnabled:fe,navigate:o,currentTenant:s,location:n,companyId:i,analytics:j,isTreasuryCommentingEnabled:ye,handleDrawerToggle:Q,isLoading:b,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return T&&x?e.jsx(U,{to:"../setup"}):s.companyTreasuryInfo?.info&&!T&&F?e.jsx(U,{to:"../promo",state:n.state}):e.jsx(Qe,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const St=t=>`/${t}/treasury/edit-portfolio`,ht=t=>`/${t}/treasury/statements`,xt=t=>`/${t}/treasury/tax-letter`,wt=t=>`/${t}/treasury/setup`,Tt=O(rt)`
|
|
10
|
-
display: flex;
|
|
11
|
-
min-height: 100%;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
`,It=O.div`
|
|
14
|
-
display: flex;
|
|
15
|
-
height: 100vh;
|
|
16
|
-
width: 100%;
|
|
17
|
-
flex: 1 1 auto;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
align-items: center;
|
|
20
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
21
|
-
`;function kt(){const t=B(),a=P(),n=W(),o=L(),p=`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Fe(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Ue(!1)))},[r,s.fetchState,a]);const c=A.getSignedInUser(),i=f(l=>D(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},I=i.company?.companyInfo.companyLegalName??i.companyName;if(c==null)throw Error("Can't access statements page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(It,{windowSize:n,children:e.jsx(et,{currentTenantCompanyName:I,statementListView:s,isLoading:u,onBackClick:()=>{const l=K(o.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const Ct=O.div`
|
|
22
|
-
display: flex;
|
|
23
|
-
height: 100vh;
|
|
24
|
-
width: 100%;
|
|
25
|
-
flex: 1 1 auto;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
align-items: center;
|
|
28
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
29
|
-
`;function jt(){const t=B(),a=W(),n=L(),o=P(),p=`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Be(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Le(!1)))},[r,s.fetchState,o]);const c=A.getSignedInUser(),i=f(l=>D(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},I=i.company?.companyInfo.companyLegalName??i.companyName;if(c==null)throw Error("Can't access tax letter page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(Ct,{windowSize:a,children:e.jsx(tt,{currentTenantCompanyName:I,taxLetterListView:s,isLoading:u,onBackClick:()=>{const l=K(n.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const bt=M(function(t,a){const{companyId:n}=a,o=R(t,n);return{treasurySetupView:o,isSetupComplete:o.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk",meetingUrl:"https://meetings.hubspot.com/yoshi-araki/treasury-product-schedule-demo-link?embed=true"}},function(t,a){const{navigate:n,companyId:o}=a;return{onSetupButtonClick:()=>{t(Pe(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(at),At=()=>{const t=B(),a=L(),n=P(),{tenantEmailDomain:o}=N(),[p,r]=d.useState(!1),m=f(h=>D(h)),[s,c]=d.useState(!1),i=f(h=>h.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);d.useEffect(()=>{s||i?.fetchState!=="Not-Started"||y==null||(c(!0),n(H()))},[i,n]);const y=A.getSignedInUserTenant(o)?.companyId??m.companyId,I=A.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,l=h=>{r(h)};if(I==null)throw Error("Can't access treasury promo page without signing in...");const g=_(),S=V(g?.loggedInUserRoleMap),w=Z(g?.loggedInUserRoleMap);if(u&&S)return e.jsx(U,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&S||w)){if(a.state?.message==="activation"){const h=K(a.state?.pathnameStackToGoBack);t(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:h.newStack}})}return i?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:h=>(T=>T.trackTreasuryPromoView("Treasury Promo Page"))(h)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:l}),e.jsx(bt,{analytics:j,navigate:t,companyId:y,onClickMenuIcon:()=>{l(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=O.div`
|
|
30
|
-
display: flex;
|
|
31
|
-
width: 100%;
|
|
32
|
-
height: 100%;
|
|
33
|
-
flex-direction: row;
|
|
34
|
-
justify-content: center;
|
|
35
|
-
align-items: center;
|
|
36
|
-
background-color: ${t=>t.theme.colors.grey5};
|
|
37
|
-
`;function Xt(){const t=L(),a=f(E=>D(E)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(v.isTreasuryEnabled),p=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=Z(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Re(a?.userRole),c=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Oe(r?.loggedInUserRoleMap),i=Ne(r?.loggedInUserRoleMap),y=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&Me(r?.loggedInUserRoleMap),{isFeatureEnabled:I}=n(v.isDepositAccountsFeatureEnabled),u=I&&!s&&Ve(r?.loggedInUserRoleMap),l=a.company!=null&&_e(a.company),g=o&&l===!0&&!s&&V(r?.loggedInUserRoleMap),{isFeatureEnabled:S}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:w}=n(v.isDebitCardFeatureEnabled),h=nt(a,S,w)&&!s&&ze(r?.loggedInUserRoleMap),T=$e(r?.loggedInUserRoleMap),x=Ge(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(xe,{children:[x?null:e.jsx(C,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:h,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:T,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(C,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:h,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:T,productType:"zeni_treasury",type:"verification"})}),e.jsx(C,{path:"promo",element:e.jsx(At,{})}),e.jsx(C,{path:"statements",element:e.jsx(kt,{})}),e.jsx(C,{path:"tax-letter",element:e.jsx(jt,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(C,{path:"/",element:e.jsx(G,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),g?e.jsxs(e.Fragment,{children:[e.jsx(C,{path:"edit-portfolio",element:e.jsx(G,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(C,{path:"transfer",element:e.jsx(G,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(C,{path:"*",element:e.jsx(ot,{})})]}):p&&g?e.jsx(C,{path:"*",element:e.jsx(U,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(C,{path:"*",element:e.jsx(U,{to:"../promo",state:t.state})}):e.jsx(C,{path:"*",element:null})]})}export{Xt as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-DkPfdehf.js";import{a as f}from"./sentry-BxQ6uAJu.js";import{q as u,h,g as y,N as I}from"./core-DJZqFFKe.js";import{J9 as b,eP as w,zd as x}from"./zeni-epic-state-CNc-1z4P.js";import{z as l,B as j,E as S,G as E}from"./index-D7lET21U.js";import{n as g}from"./mui-Ctp_ou6C.js";import"./recharts-D041iH6A.js";import"./analytics-C6M-DE9i.js";import"./plaid-VWs98BAj.js";import"./dnd-un89-W8a.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-PtdQRY.js";import"./lexical-ChRCvCis.js";import"./pdf-xyjfLAhh.js";import"./utils-D2tZzHCG.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]="f675e146-81d4-455e-8d8b-093555301810",e._sentryDebugIdIdentifier="sentry-dbid-f675e146-81d4-455e-8d8b-093555301810")}catch{}})();const W=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[n,m]=f.useState(!1),a=h(),i=y(c=>b(c)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);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),f.useEffect(()=>{n||(m(!0),a(x(t,p,s)))},[n,a]),i.fetchState==="Error"?o.jsx(D,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},D=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(E.LargeRegular)`
|
|
10
|
-
display: flex;
|
|
11
|
-
color: ${S.important};
|
|
12
|
-
`;export{W as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-DkPfdehf.js";import{a as u}from"./sentry-BxQ6uAJu.js";import{j as x,h as j,u as B,l as $,g as p}from"./core-DJZqFFKe.js";import{I6 as s,I5 as v,On as C,eO as T,Oo as z}from"./zeni-epic-state-CNc-1z4P.js";import{Z as D,aq as g,m as E,z as L,B as P,b_ as _,p as N}from"./index-D7lET21U.js";import{n as O}from"./mui-Ctp_ou6C.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]="f74eef44-b250-4fa0-82d3-2a622eb0edc8",e._sentryDebugIdIdentifier="sentry-dbid-f74eef44-b250-4fa0-82d3-2a622eb0edc8")}catch{}})();const U=O.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;function F(){const e=x(),n=j(),d=D(),l=B();let{accountId:a}=$(),f=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,f=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[m,y]=u.useState(!1),h=E();u.useEffect(()=>{m||(y(!0),n(v(a??"",!1)))},[m,n]);const o=p(t=>C(t,a??"")),b=()=>{const t=N(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},r=L.getSignedInUser(),c=p(t=>T(t)),I={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c.tenantId??""},w=z(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=c.company?.companyInfo.companyLegalName??c.companyName;if(r==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(P,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):i.jsx(U,{windowSize:d,children:i.jsx(_,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:b,authParams:I,downloadEndPoint:f})})}export{F as Z};
|