@zeniai/web-app-ui 5.4.8-dev → 5.4.9-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AccountMappingScreen-BVoif-LS.js +9 -0
- package/dist/assets/{ActualMatchingMatchDetailScreen-CpFxldZX.js → ActualMatchingMatchDetailScreen-37ukErZ3.js} +1 -1
- package/dist/assets/AddressRoutes-CTdswws_.js +1 -0
- package/dist/assets/AddressScreen-DIx8pAlP.js +9 -0
- package/dist/assets/{AiCfoScreen-D0ryurTs.js → AiCfoScreen-bkTvdFWM.js} +5 -5
- package/dist/assets/{AppDrawer-Bz9R1SRM.js → AppDrawer-Bqkq0J1O.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-CUhlkbFZ.js → BillPayApprovalRoutes-nVb6rKwz.js} +1 -1
- package/dist/assets/{BillPayRoutes-Cq7a-pm7.js → BillPayRoutes-D7EPBDh7.js} +18 -18
- package/dist/assets/BusinessVerificationPageScreen-DMccZcIL.js +9 -0
- package/dist/assets/{CardsAiCfoScreen-i0herVW8.js → CardsAiCfoScreen-Cys2hC2x.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-DKqAyC6V.js → ChargeCardRoutes-rF3I93wy.js} +8 -8
- package/dist/assets/{CompanyPassportScreen-B28ZIQmd.js → CompanyPassportScreen-DzTS_PxV.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-B7H-_PrY.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-CqKrvs3q.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-CGeTdTAp.js → CustomerOnboardingRoutes-DyQugrQS.js} +3 -3
- package/dist/assets/{DashboardRoutes-Cwe3Vuyf.js → DashboardRoutes-B7G0hGYD.js} +4 -4
- package/dist/assets/{DefaultTenantHome-Y19U_bWi.js → DefaultTenantHome-Dpr9pT2f.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-BNWRfTvg.js +18 -0
- package/dist/assets/{DrawerScreen-BiLnsYxr.js → DrawerScreen-DEMkXBuJ.js} +1 -1
- package/dist/assets/EntityDetailRoutes-DlCSk6Xj.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-CwVf58CT.js → ExpenseAutomationRoutes-DcYDpqvS.js} +5 -5
- package/dist/assets/FeaturePreviewScreen-CZZbV-Lj.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-XzCI6Wqi.js +1 -0
- package/dist/assets/{InboxNotificationsProvider-Lon_JjZI.js → InboxNotificationsProvider-CzZNeGt1.js} +1 -1
- package/dist/assets/{InvoicingRoutes-CEhIyfKx.js → InvoicingRoutes-BZEd2Xd_.js} +2 -2
- package/dist/assets/MagicLinkRoutes-Ch_9Qa7Y.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-D7qEtB4W.js +12 -0
- package/dist/assets/MobileAppDrawer-DYOb_3zl.js +1 -0
- package/dist/assets/NotFoundScreen-hP5G-uHy.js +1 -0
- package/dist/assets/NotificationRoutes-DdgV7jbI.js +1 -0
- package/dist/assets/OAuthConsentScreen-CQqkncrK.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-77IqlyFS.js +1 -0
- package/dist/assets/{PaymentLinkScreen-Cu5uQlbD.js → PaymentLinkScreen-DMvOIo--.js} +1 -1
- package/dist/assets/PeopleRoutes-BWw5-zAe.js +22 -0
- package/dist/assets/{PerformanceRoutes-D57LkbmT.js → PerformanceRoutes-DMlk1Yfb.js} +1 -1
- package/dist/assets/{Preview-B_x0UYXC.js → Preview-SrROl7l3.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-B_jTzA2E.js → QBOConnectionScreen-BJEzxzvn.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-D9UKdBqr.js → ReimbursementApprovalRoutes-BikedZ_D.js} +1 -1
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-BVAueb7P.js +1 -0
- package/dist/assets/ReimbursementRoutes-B8-BBslS.js +68 -0
- package/dist/assets/{ReportsRoutes-97Pz3_w0.js → ReportsRoutes-BLQeDL9q.js} +1 -1
- package/dist/assets/RewardsRoutes-BeComSZ4.js +1 -0
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-CXq4al_v.js → ScheduleDetailsPrepaidExpensesScreen-BTeNJoD-.js} +5 -5
- package/dist/assets/ScreenRoutes-C_Y9Ih-I.js +2 -0
- package/dist/assets/{SettingsRoutes-CXOUMEST.js → SettingsRoutes-D1KLQYfe.js} +6 -6
- package/dist/assets/{SetupPagesScreen-DT18jEZS.js → SetupPagesScreen-D-sIYsOb.js} +5 -5
- package/dist/assets/SignInScreen-DYkAG0ir.js +1 -0
- package/dist/assets/SignOutScreen-CnE9aVZf.js +9 -0
- package/dist/assets/TaskListScreen-3oMHbvzs.js +9 -0
- package/dist/assets/TaskRoutes-gD6fXeIa.js +9 -0
- package/dist/assets/TransactionDetailRoutes-CPgOmOJv.js +1 -0
- package/dist/assets/TransactionDetailScreen-DKDiKxK4.js +5 -0
- package/dist/assets/{TransactionListRoutes-DFYIfVzR.js → TransactionListRoutes-dt9sGf6m.js} +1 -1
- package/dist/assets/{TreasuryRoutes-DweO_eX_.js → TreasuryRoutes-CuCdm5Gl.js} +6 -6
- package/dist/assets/{VendorsRoutes-CtkEV-aM.js → VendorsRoutes--pMAMDSH.js} +10 -10
- package/dist/assets/WiseConfirmationScreen-BOUXMp2T.js +12 -0
- package/dist/assets/ZeniAccountRoutes-CWyEeR9A.js +57 -0
- package/dist/assets/ZeniAccountStatementScreen-qY5rQsAd.js +9 -0
- package/dist/assets/{accountMappingHelper-CCESaK7R.js → accountMappingHelper-BV1cQq3A.js} +1 -1
- package/dist/assets/{analytics-BSYXJeF4.js → analytics-Cfs2G4_3.js} +1 -1
- package/dist/assets/{analyticsHelper-w2YkQjq1.js → analyticsHelper-USl63sKg.js} +1 -1
- package/dist/assets/{core-k1hJbZ6L.js → core-C1WlT0Gj.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-CKsYKxPJ.js → decodeURIComponentSafe-7TTqX1My.js} +1 -1
- package/dist/assets/{dnd-CiTl8J_b.js → dnd-B-4X27-9.js} +1 -1
- package/dist/assets/{empty-DXUNZiQh.js → empty-CY_o0w8p.js} +1 -1
- package/dist/assets/{empty-Bzngm89v.js → empty-P6T33YMO.js} +1 -1
- package/dist/assets/{emptyVideoElement-qNZVYRIB.js → emptyVideoElement-DXwM8vzz.js} +1 -1
- package/dist/assets/epic-C_ztG9Vn.js +2 -0
- package/dist/assets/expenseAutomationHelper-DNfzvs5h.js +1 -0
- package/dist/assets/{getLocaleForTenant-Bok1bQNl.js → getLocaleForTenant-GRoZrOtf.js} +1 -1
- package/dist/assets/{index-DGy3NvOY.js → index-BXFluF17.js} +1 -1
- package/dist/assets/{index-Cjqi6Pkt.js → index-BaogokNB.js} +9420 -9420
- package/dist/assets/{index-B1EgaaVs.js → index-C7OizTrs.js} +1 -1
- package/dist/assets/{index-iZXXuKOD.js → index-CBN1-9DQ.js} +2 -2
- package/dist/assets/{index-BKGXj7ws.js → index-CLZ8aHkZ.js} +1 -1
- package/dist/assets/{index-Ce30h5vk.js → index-Cqlg1yss.js} +1 -1
- package/dist/assets/{index-CdAfnjbO.js → index-D6d3wrtH.js} +1 -1
- package/dist/assets/{index-BYIWMErm.js → index-rFi6I5F-.js} +1 -1
- package/dist/assets/{lexical-YTMAFU1j.js → lexical-Dmnf9NSK.js} +1 -1
- package/dist/assets/{liveblocks-oxGmLiGE.js → liveblocks-DQb3Em37.js} +1 -1
- package/dist/assets/{lottie-DXQhXtqa.js → lottie-B_xwqN2A.js} +1 -1
- package/dist/assets/{mui-D8QuRJEy.js → mui-D2HFTrjh.js} +1 -1
- package/dist/assets/{pathToGoBack-BvtdrmIA.js → pathToGoBack-Djr4VFL1.js} +1 -1
- package/dist/assets/{pdf-QcH92u4w.js → pdf-DDFs-jyU.js} +3 -3
- package/dist/assets/{pdf-lib-CmPW-Sf3.js → pdf-lib-uEuVq1x5.js} +1 -1
- package/dist/assets/{plaid-CbZCK8Pe.js → plaid-D36sgvQh.js} +1 -1
- package/dist/assets/{pusher-DrskEKGJ.js → pusher-Bmhf7zdt.js} +1 -1
- package/dist/assets/{react-DI5Tj1pD.js → react-ABjTKzj0.js} +1 -1
- package/dist/assets/{react-DLwkwTYN.js → react-BNxhEAR6.js} +1 -1
- package/dist/assets/{react-BFUAIjFB.js → react-DEkQrWnb.js} +1 -1
- package/dist/assets/{react-CTz3hOfW.js → react-DQ4Bdeyq.js} +1 -1
- package/dist/assets/{react-bRbgXAqh.js → react-Dypy880L.js} +1 -1
- package/dist/assets/{react-BdEbM4Cv.js → react-_dplkTkE.js} +1 -1
- package/dist/assets/{recharts-DZG9umMy.js → recharts-Cqzw8WNA.js} +1 -1
- package/dist/assets/{reportTimeframe-BoyB48qP.js → reportTimeframe-C4q_PyKL.js} +1 -1
- package/dist/assets/{routePaths-BQiUfv8Y.js → routePaths-B56KGAwY.js} +1 -1
- package/dist/assets/{sentry-CYolppN9.js → sentry-bn66aQBn.js} +1 -1
- package/dist/assets/{stripSplatSuffix-yEJV_xmD.js → stripSplatSuffix-Bc1c61un.js} +1 -1
- package/dist/assets/{url-Dvn7w47g.js → url-DQxeYqWJ.js} +1 -1
- package/dist/assets/{url-BJMHxMoG.js → url-alEaciYB.js} +1 -1
- package/dist/assets/useActualMatchingMatchDetail-DC73Os7S.js +1 -0
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BBN3Q32c.js → useAiCfoDashboardSuggestedQuestionsChips-Cj21wv_W.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-GW3aOOUV.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-DEUPC1vA.js → useChargeCardPusherEvents-BkaiNEUC.js} +1 -1
- package/dist/assets/{useDeviceId-BqvO5dq-.js → useDeviceId-nnRIPwcw.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-BL7F1fI2.js +1 -0
- package/dist/assets/{useEnsureVendorListLoaded-CbkO2307.js → useEnsureVendorListLoaded-DT9MJB3G.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-DKk3Gbri.js → useInitialThreadRequest-rwXc-zR2.js} +1 -1
- package/dist/assets/useTaskManagerAccess-Bq4KBSvW.js +1 -0
- package/dist/assets/{useTaskManagerPusherEvents-CULNono8.js → useTaskManagerPusherEvents-DiYOmCQ4.js} +1 -1
- package/dist/assets/{utils-CZxvf1-B.js → utils-C55XrdHj.js} +1 -1
- package/dist/assets/withTransactionSidePanel-LJitfor3.js +25 -0
- package/dist/assets/{zeni-epic-state-C2CKsxzr.js → zeni-epic-state-VpP2uC41.js} +4 -4
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AccountMappingScreen-DxODZ1Nk.js +0 -9
- package/dist/assets/AddressRoutes-K7qFYU4Q.js +0 -1
- package/dist/assets/AddressScreen-B7HfNJJM.js +0 -9
- package/dist/assets/BusinessVerificationPageScreen-YH2iMYXG.js +0 -9
- package/dist/assets/ConnectionAuthScreen-cnuYO2ir.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-BugwGIlC.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-C3Fvc0vh.js +0 -18
- package/dist/assets/EntityDetailRoutes-DiWWQPIS.js +0 -1
- package/dist/assets/FeaturePreviewScreen-CVxHNITI.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-D5mS9Mm3.js +0 -1
- package/dist/assets/MagicLinkRoutes-Bbw6eA7p.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-CMSV3Ecy.js +0 -12
- package/dist/assets/MobileAppDrawer-D95K9MWM.js +0 -1
- package/dist/assets/NotFoundScreen-ngkmWfLO.js +0 -1
- package/dist/assets/NotificationRoutes-OU4hmCU4.js +0 -1
- package/dist/assets/OAuthConsentScreen-BfPvpIZK.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-D5OxnQT-.js +0 -1
- package/dist/assets/PeopleRoutes-CRBdsznQ.js +0 -22
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-CdBqEWoC.js +0 -1
- package/dist/assets/ReimbursementRoutes-DqKBNzYH.js +0 -68
- package/dist/assets/RewardsRoutes-CP48quzG.js +0 -1
- package/dist/assets/ScreenRoutes-EZYd0oGd.js +0 -2
- package/dist/assets/SignInScreen-D_kJ7A6-.js +0 -1
- package/dist/assets/SignOutScreen-Hgz5ILuE.js +0 -9
- package/dist/assets/TaskListScreen-PbWxRl0T.js +0 -9
- package/dist/assets/TaskRoutes-8igPnZpC.js +0 -9
- package/dist/assets/TransactionDetailRoutes-BkrhGwVi.js +0 -1
- package/dist/assets/TransactionDetailScreen-CUF4XJ-a.js +0 -5
- package/dist/assets/WiseConfirmationScreen-Cvz0_zLL.js +0 -12
- package/dist/assets/ZeniAccountRoutes-ulGvqG-O.js +0 -57
- package/dist/assets/ZeniAccountStatementScreen-Dff7TUu2.js +0 -9
- package/dist/assets/epic-BVcu5QEC.js +0 -2
- package/dist/assets/expenseAutomationHelper-BfCR3sLm.js +0 -1
- package/dist/assets/useActualMatchingMatchDetail-BRI2b5oS.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BETiKk63.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-8S-s2Qbg.js +0 -1
- package/dist/assets/useTaskManagerAccess-CbR2C9f7.js +0 -1
- package/dist/assets/withTransactionSidePanel-zjTjrZrt.js +0 -25
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-oxGmLiGE.js";import{u as ae,j as v,h as K,g as Q,i as ie,N,l as ee,q as lt,n as mt,o as x}from"./core-k1hJbZ6L.js";import{fI as H,Oe as ct,$W as ge,ca as he,Nk as Fe,me as dt,Nz as ce,Ny as de,$X as ut,bn as fe,gZ as Le,$Y as pt,XG as bt,m3 as $e,XH as Ae,XI as gt,kR as ht,ZX as ft,l4 as St,N8 as It,CE as yt,kY as Rt,NV as Ne,$Z as Pe,$_ as Ce,$$ as kt,a00 as vt,a01 as At,NF as we,la as Ct,_4 as wt,Nx as Et,Ni as xt,a02 as Bt,Nh as Tt,a03 as Dt,Np as Ee,NJ as jt,NI as Ut,NE as Ft,a04 as _e,T3 as Lt,bo as $t,Ns as Nt,Ob as Pt,a05 as _t,a06 as Mt,NR as Ot,NO as xe,Zr as zt,Nf as Zt,a07 as Me,OE as Be,OM as Gt,a08 as Vt,a09 as X,a0a as Ht,a0b as Oe,a0c as Wt,a0d as ze,a0e as Ze,O1 as ue,bv as qt,bM as Se,cO as Ie,e1 as Ge,e0 as Ve,a0f as Xt,gk as Jt,ZE as Qt,a0g as Yt,a0h as He,ZI as Kt,_r as en,a0i as tn,_Q as nn,OJ as Te,OI as an,a0j as sn,a0k as on,a0l as rn,a0m as ln,a0n as mn,_a as cn,Oz as dn,OD as un,bq as pn,bL as bn,cI as gn,cw as hn,bu as fn,V3 as Sn,dc as In,df as yn,de as Rn,cH as kn}from"./zeni-epic-state-C2CKsxzr.js";import{bU as vn,c as We,$ as qe,p as oe,d as F,z as L,cT as Xe,a6 as re,k as E,aQ as De,H as j,ac as se,ad as An,G as Je,cU as Cn,l as J,aq as Qe,cV as wn,V as le,cW as En,ao as xn,a9 as Bn,a5 as ye,O as Ye,w as Tn,bC as Dn,at as jn,ag as Un,cX as Fn,h as Ln}from"./index-Cjqi6Pkt.js";import{n as P,S as $n,u as Ke}from"./mui-D8QuRJEy.js";import pe from"./NotFoundScreen-ngkmWfLO.js";import{S as je}from"./SetupPagesScreen-DT18jEZS.js";import{F as et}from"./FeaturePreviewScreen-CVxHNITI.js";import{a as g}from"./sentry-CYolppN9.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-BETiKk63.js";import{u as tt}from"./useInitialThreadRequest-DKk3Gbri.js";import{D as Nn}from"./DrawerScreen-BiLnsYxr.js";import{M as nt}from"./MobileAppDrawer-D95K9MWM.js";import{F as Pn}from"./ScreenRoutes-EZYd0oGd.js";import{R as _n}from"./ReimbursementApprovalRoutes-D9UKdBqr.js";import"./recharts-DZG9umMy.js";import"./analytics-BSYXJeF4.js";import"./plaid-CbZCK8Pe.js";import"./dnd-CiTl8J_b.js";import"./stripe-cKAAJElX.js";import"./lottie-DXQhXtqa.js";import"./lexical-YTMAFU1j.js";import"./pdf-QcH92u4w.js";import"./utils-CZxvf1-B.js";import"./BusinessVerificationPageScreen-YH2iMYXG.js";import"./routePaths-BQiUfv8Y.js";import"./analyticsHelper-w2YkQjq1.js";import"./InboxNotificationsProvider-Lon_JjZI.js";import"./useTaskManagerAccess-CbR2C9f7.js";import"./getLocaleForTenant-Bok1bQNl.js";import"./useEnsureVendorListLoaded-CbkO2307.js";import"./ReimbursementApprovalRuleDetailScreen-CdBqEWoC.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]="dd610dde-6d4c-469c-a03f-b8b402489b4e",e._sentryDebugIdIdentifier="sentry-dbid-dd610dde-6d4c-469c-a03f-b8b402489b4e")}catch{}})();const at=e=>`/${e}/reimbursements`,Mn=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Je.getLocalizedStrings(),On=ee((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),m=L.getSignedInUser(),c=fe(m),d=r.plaidConnectionDetails,i=Le(e.companyState,n),a=e.tenantState.currentTenantId,o={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),p=pt(e,m?.userId??"");let I=`${m?.firstName} ${m?.lastName}`,u=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=m?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,y=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:y},authParams:o,defaultCurrency:{currencySymbol:i?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:i?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:i?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:d,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:E,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:$e(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:m,navigate:c,themeState:d}=t,{tenantEmailDomain:i}=r,a=L.getSignedInUser();return{onReceiptsUpload:(o,l,p)=>{o!=null&&e(de(o,l,p,n,a?.userId))},onExistingMerchantChange:(o,l)=>{e(Ee(!1,l,n,o,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ft(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Ut())},clearRemiSaveStatus:()=>{e(jt("Not-Started",n))},onDuplicateLineClick:(o,l)=>window.open(`/${i}/reimbursement/${o}#L${l}`),onNewMerchantChange:(o,l)=>{e(Ee(!1,l,n,void 0,o))},removeFileFromLine:o=>{e(Dt({lineId:o,reimbursementId:n}))},onAmountChanged:(o,l)=>{e(Tt(l,o,n))},updateReimbursementType:(o,l,p)=>{e(Bt({reimbursementId:p,lineId:l,reimbursementType:o}))},onHomeCurrencyConversionUpdate:(o,l,p)=>{e(xt({reimbursementId:p,lineId:l,amountPayload:{amount:o.amount,currency_code:o.currencyCode,currency_symbol:o.currencySymbol}}))},onReimbursementDetailsChanged:o=>{e(Et({remiDetailLocalData:o,reimbursementId:n}))},saveRemiDetails:o=>{e(we(o,!1,n))},onUserBankDetailsUpdated:o=>{const{bankAccountSection:l}=o;e(wt({data:l}))},onFetchBankName:o=>{e(Ct(o))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:o=>{e(Ce({reimbursementId:o}))},updateInvoiceUploadFetchState:o=>{e(ce({reimbursementId:n,fetchState:o}))},clearTentativeNameForLine:o=>{e(At({reimbursementId:n,lineId:o}))},removeDuplicateReimbursementForLine:o=>{e(vt({lineId:o}))},onZeniLogoClick:()=>{d.toggle()},clearAddRemiAutoFields:o=>{e(kt({reimbursementId:n,lineId:o}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ce({}));const o=at(i),l=J(m.state?.pathnameStackToGoBack,m.pathname);c(o,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(E.trackReimbursementDeleteReimbursement(n),e(Ne(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:o=>{e(yt("user_reimbursement_account",o))},onEstablishConnectionClick:o=>{e(It(o,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:o=>{e(St(o,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,l)=>{o.trim().length>=2?e(gt({searchString:o,entityType:l,searchOrigin:"common"})):e(Ae("common"))},onCancelAutoComplete:()=>{e(Ae("common"))}}}}))(Cn);function Ue(){const e=K(),t=ae(),n=Q(),{reimbursementId:r}=ie(),m=We(),c=qe(),d=g.useRef(!1),[i,a]=g.useState(r==null),[o,l]=g.useState(1),{useFeatureGate:p}=oe(),{isFeatureEnabled:I}=p(F.isLimitedCategoryForReimbursement),{isFeatureEnabled:u}=p(F.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:y}=Re({mobileExploreReferrer:"Reimbursement Details"}),B=Q().pathname,D=B.includes("edit"),A=B.includes("reimbursement/new"),[C,R]=g.useState(!1),S=L.getSignedInUser(),w=v((b=>H(b))),h=v((b=>ge(b,r))),$=tt(w?.companyId,{clearParams:h.fetchState==="Completed"}),U=he(w?.userRole??[]);(function(){const b=ae(),M=v((Y=>H(Y))),O=M?.tenantId,{isApprovalRulesV3Enabled:z,isLoading:W}=vn(O),Z=v((Y=>Y.remiSetupApproverViewState.fetchState));g.useEffect((()=>{O==null||W||Z==="Not-Started"&&b(ct(!0,!1,!1,z))}),[O,W,z,Z,b])})(),g.useEffect((()=>{(A&&!C||D&&!C&&h.fetchState!="Completed"&&h.fetchState!="In-Progress")&&(R(!0),t(Fe(!1,I,u,r)))}));const k=v((b=>dt(b.accountState,b.accountListState,"reimbursementAccountList")));if(S==null)throw Error("Can't access address page without signing in...");const _={pathname:`../${r}`,search:n.search};return h.fetchState==="Completed"&&(d.current=!0),h.isDeleted===!0||h.billStage=="paid"||h.billStage=="scheduled"||d.current===!1&&h.fetchState==="Not-Started"||U&&h.billStatus==="rejected"||U===!1&&h.billStage==="pending_approval"&&h.billStatus!=="rejected"?s.jsx(N,{to:_}):d.current!==!1||h.deleteStatus.fetchState!=="In-Progress"&&h.fetchState==="Completed"?s.jsxs(zn,{windowSize:c,children:[s.jsx(re,{analytics:E,onLoad:b=>(M=>{r!=null&&h.deleteStatus.fetchState!=="Completed"&&M.trackReimbursementEditReimbursement(r)})(b)}),i&&c!=="small"?s.jsx(Zn,{}):null,i&&c!=="small"?s.jsx(Gn,{children:s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,i&&c==="small"?s.jsxs(Vn,{children:[s.jsx(Hn,{onClick:()=>a(!1),children:s.jsx(Mn,{})}),s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:$??void 0,location:n,navigate:e,currentTenant:w,reimbursementId:r,themeState:m,uncategorizedAccounts:k,disableInternalOverlay:!0,showSkipAutoFill:i,setShowSkipAutoFill:a,onCurrentLineIdForUploadChange:l,isAiCfoAccessEnabled:T,onAskAiCfoClick:y})})]}):s.jsx(Xe,{isNewReimbursement:r==null})}const zn=P.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
position: relative;
|
|
4
|
-
height: 100vh;
|
|
5
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
6
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
7
|
-
`,Zn=P.div`
|
|
8
|
-
position: fixed;
|
|
9
|
-
top: 0;
|
|
10
|
-
left: 0;
|
|
11
|
-
right: 0;
|
|
12
|
-
bottom: 0;
|
|
13
|
-
background-color: ${An.overlayBackgroundBlack};
|
|
14
|
-
z-index: 5;
|
|
15
|
-
`,Gn=P.div`
|
|
16
|
-
position: absolute;
|
|
17
|
-
top: 0;
|
|
18
|
-
left: 0;
|
|
19
|
-
width: 42%;
|
|
20
|
-
height: 100%;
|
|
21
|
-
z-index: 6;
|
|
22
|
-
display: flex;
|
|
23
|
-
background-color: transparent;
|
|
24
|
-
overflow: hidden;
|
|
25
|
-
`,Vn=P.div`
|
|
26
|
-
position: fixed;
|
|
27
|
-
top: 0;
|
|
28
|
-
left: 0;
|
|
29
|
-
right: 0;
|
|
30
|
-
bottom: 0;
|
|
31
|
-
z-index: 11;
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
overflow-y: auto;
|
|
35
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
-
`,Hn=P.button`
|
|
37
|
-
align-self: flex-end;
|
|
38
|
-
background: none;
|
|
39
|
-
border: none;
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
padding: ${j.sp2} ${j.sp3};
|
|
42
|
-
line-height: 1;
|
|
43
|
-
color: ${e=>e.theme.colors.hero};
|
|
44
|
-
&:hover {
|
|
45
|
-
color: ${e=>e.theme.colors.primary};
|
|
46
|
-
}
|
|
47
|
-
svg {
|
|
48
|
-
width: ${j.sp4};
|
|
49
|
-
height: ${j.sp4};
|
|
50
|
-
}
|
|
51
|
-
`,Wn=P.div`
|
|
52
|
-
display: flex;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
width: 100%;
|
|
55
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
56
|
-
`,qn=ee((function(e,t){const n=_e(e,t.reimbursementId),r=L.getSignedInUser(),m=fe(r),c=e.tenantState.currentTenantId,d={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c??""},i=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=_t(n.remiActivities,Mt(t.currentTenant),r));const o=he(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:d,signedInUser:r,createdBy:i,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:o,showApproveRejectBtns:a,isZeniUser:m,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:$e(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:m,navigate:c,themeState:d}=t,{tenantEmailDomain:i}=r;return{onDuplicateLineClick:(a,o)=>window.open(`/${i}/reimbursement/${a}#L${o}`),redirectToReimbursementListScreen:()=>{e(Pe());const a=at(i),o=J(m.state?.pathnameStackToGoBack,m.pathname);c(a,{state:{pathnameStackToGoBack:o}})},onSaveRealTimeApprovals:a=>{e(Zt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(zt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(xe(n,a.type,"")):e(xe(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=J(m.state?.pathnameStackToGoBack,m.pathname);c("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{E.trackReimbursementDeleteReimbursement(n),e(Ne(n))},cancelAndDeleteReport:a=>{a===!0?E.trackReimbursementCancelAndDeleteReimbursement(n):E.trackReimbursementCancelReimbursement(n),e(Ot(n,a))},handleZeniLogoClick:()=>{d.toggle()}}}))(wn);function Xn(){const e=K(),t=ae(),n=Q(),r=n.hash.substring(1),m=We(),{reimbursementId:c}=ie(),d=L.getSignedInUser(),i=v((k=>H(k))),a=v((k=>_e(k,c??""))),o=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=tt(i?.companyId,{clearParams:a.fetchState==="Completed"&&!o}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:I}=Re({mobileExploreReferrer:"Reimbursement Details"});Qe({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:u}=oe(),{isFeatureEnabled:T}=u(F.isLimitedCategoryForReimbursement),[y,B]=g.useState(!1),[D,A]=g.useState(!1),[C,R]=g.useState(!1),{isFeatureEnabled:S}=u(F.isShowDeletedReimbursementsFeatureEnabled),w=v((k=>ge(k,c??""))),h=Lt(i),$=$t(i.userRole),U=a.fetchState;if(g.useEffect((()=>{y||c==null?y==1&&U==="Error"&&e("page-not-found",{replace:!0}):(B(!0),t(Nt(c,!1,S)))}),[y,c,t,U]),g.useEffect((()=>{S&&a.remiDetails?.isDeleted===!0||i.isZeni===!0&&d?.userEmailDomain==="zeni.ai"&&h===!1?R(!1):R(a.remiActivities[0]?.isRealTimeApprovalEnabled&&($||a.allApprovers.find((k=>k.user.userId===d?.userId))!=null||a.remiDetails?.lastUpdatedBy===d?.userId))}),[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,$,i.isZeni,h,d]),g.useEffect((()=>{D||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||w.fetchState=="Completed"||w.fetchState=="In-Progress"||(A(!0),t(Fe(!1,T,S,c)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(Pt(!1,!0,!0,a.lastUpdatedByUserId)))}),[D,a,c,t]),d==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&w.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx(N,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&w.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(Xe,{}):s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:E,onLoad:k=>(_=>{c!=null&&_.trackReimbursementReimbursementDetails(c)})(k)}),s.jsx(qn,{initialOpenThreadRequest:l??void 0,scrollId:r,isShowDeletedReimbursementEnabled:S,location:n,navigate:e,isRealTimeApprovalEnabled:C,currentTenant:i,reimbursementId:c??"",themeState:m,isAiCfoAccessEnabled:p,onAskAiCfoClick:I})]})}const Jn=ee((function(e,t){return{remisReviewView:Me(e),analytics:t.analytics}}),(function(e,t){return{onCloseOverlay:()=>{t.navigate(`/${t.tenantEmailDomain}/reimbursements`),e(X())},onCloseReviewItem:n=>{e(Vt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Gt());break;case"approve":e(Be("approved",r??""));break;case"reject":e(Be("rejected",r??""))}}}}))(En);function Qn({tenantEmailDomain:e}){const t=K(),n=v((d=>d.remisBulkActionViewState.bulkSubmissionFetchState.fetchState)),{remisForReview:r}=v((d=>Me(d))),m=le(),c=m?.loggedInUserRole?.includes("admin")===!0;return g.useEffect((()=>{n!=="Completed"&&r.length!==0||t(`/${e}/reimbursements`)}),[n,r.length,e]),s.jsx(Jn,{navigate:t,analytics:E,isAdmin:c,tenantEmailDomain:e})}const V=Kt(),st="bulk-operation-update",be="reimbursement-approval-rule-update",{spendManagement:Yn,common:me}=Je.getLocalizedStrings(),Kn=Yn.reimbursement.bulkActions,ea=P.div`
|
|
57
|
-
display: flex;
|
|
58
|
-
min-height: 100%;
|
|
59
|
-
width: 100%;
|
|
60
|
-
flex: 1 1 auto;
|
|
61
|
-
flex-direction: column;
|
|
62
|
-
align-items: center;
|
|
63
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
64
|
-
`,ta=ee((function(e,t){const n=Ze(e,V,t.isBulkActionEnabled);let r=n.allSubTabs;const m=L.getSignedInUser(),c=fe(m),d=e.tenantState.currentTenantId,i=H(e),a=i?.companyName??"",o={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:d??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter((u=>u!=="deleted")));const p=n.fetchState,I=en(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter((u=>u.isDeleted===!1)),isAdmin:t.isAdmin,isZeniUser:c,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:p,botEmail:n.reimbursementBotEmail,analytics:E,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:o,companyName:a,timePeriod:V,spendManagementEndPoint:`${jn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:I.affectedEntityIds}}),(function(e,t){const{navigate:n,currentTenant:r,location:m,period:c}=t,{tenantEmailDomain:d}=r;return{updateTabToState:i=>{e(X()),e(Oe(i))},onSubtabChange:i=>{e(X()),e(ze(i))},onTransactionClick:(i,a)=>{const o=sa(d,i,a),l=J(m.state?.pathnameStackToGoBack,m.pathname);n(o,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const i=aa(d),a=J(m.state?.pathnameStackToGoBack,m.pathname);n(i,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:i}=t.currentTenant;E?.trackReimbursementNewReimbursement();const a=`/${i}/reimbursement/new`,o=J(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:o}})},onColumnSortConfigChanged:(i,a)=>{e(mn({uiState:{sortKey:i,sortOrder:a},period:t.period}))},onSearchTextChanged:i=>{e(ln(i))},onFiltersChange:i=>{e(rn({filters:i})),i.categories.every((a=>a.field!=null&&a.values?.length!==0))&&E.trackSpendManagmentFilterChange("reimbursement",i.categories.map((a=>`${a.field}-${JSON.stringify(a.values)}`)))},updateDownloadStateHandler:i=>{i==="In-Progress"&&E.trackSpendManagementDownloadClick("reimbursement"),e(on({uiState:{downloadState:i}}))},onReloadTransactions:()=>{e(ue(c,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:i=>{e(sn(i))},removeAllTransactionsFromBulkActionList:()=>{e(X())},onProceedForBulkActionClick:(i,a)=>{switch(i){case"delete":case"cancel":e(an(i,a??""));break;case"send_for_approval":e(Te("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(Te("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:i=>{i.endsWith(be)&&e(nn(!1))},onEventReceived:i=>{i===st&&e(tn())}}}))(Tn(Dn));function na(){const e=K(),t=ae(),n=Q(),r=n.state,m=qe(),[c,d]=g.useState(null),i=lt("/:tenantEmailDomain/reimbursements/bulk-review")!=null;g.useEffect((()=>{if(r?.tab!=null&&r?.subTab!=null){const f=Ht(r.tab.toString());f!=null?t(Oe(f)):console.log("Warning:Not a valid remiListTab");const G=Wt(r.subTab.toString());G!=null?t(ze(G)):console.log("Warning:Not a valid remiListSubTab")}return()=>{t(X())}}),[]);const{useFeatureGate:a}=oe(),{isFeatureEnabled:o}=a(F.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:l}=a(F.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:p}=a(F.isReimbursementBulkActionEnabled),I=L.getSignedInUser(),u=v((f=>H(f))),[T,y]=g.useState(!1),[B,D]=g.useState(!1),A=le(),C=A?.loggedInUserRole?.includes("admin")===!0,R=v((f=>Ze(f,V,p))),{areTenantIdsInSync:S}=xn(),w=R.fetchState,{isAiCfoAccessEnabled:h,onAskAiCfoClick:$}=Re({mobileExploreReferrer:"Reimbursement List"});if(Qe({isDataReady:w==="Completed"}),g.useEffect((()=>{!B&&S&&(D(!0),t(ue(V,!0,l,!1,!0)))}),[B,V,t,S]),I==null)throw Error("Can't access address page without signing in...");const U=!!u?.userRole&&qt(u),k=Se(A?.loggedInUserRoleMap),_=Ie(A?.loggedInUserRoleMap),b=!!u.userReimbursementInfo?.isReimbursementTOSAccepted,M=!!u.companyReimbursementInfo?.info?.isReimbursementEnabled,O=!!u.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,z=v((f=>Le(f.companyState,u.companyId))),W=z?.company.featuresActivationInfo.connectedAccountProvider,Z=f=>{y(f)},{isFeatureEnabled:Y}=a(F.isDebitCardFeatureEnabled),it=Ge(Y,u),ot=Ve(u),{remisProcessed:te,remisProcessing:ke}=v((f=>Xt(f)));g.useEffect((()=>{te===ke&&c!=null&&(t(Jt({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:te>1?me.texts.reports2:Kn.report},{variableName:"_has_",variableValue:te>1?me.texts.have:me.texts.has},{variableName:"_action_",variableValue:Qt(c)}]})),t(Yt()),setTimeout((()=>{t(ue(V,!0,l,!1,!0,!0))}),3e3),d(null))}),[te,ke]);const rt={events:u.companyId!=null?[`private-encrypted-${u.companyId}.${st}`,`private-encrypted-${u.companyId}.${be}`]:[],eventCallback:(f,G,ve)=>{f.endsWith(be)?ve.onReimbursementApprovalRulesEventReceived?.(f):G.entity_type==="reimbursement"&&(d(G.operation_type),ve.onEventReceived(f))}};return n.pathname.endsWith("/reimbursements/")||n.pathname.endsWith("/reimbursements")||n.pathname.endsWith("/reimbursements/bulk-review")?it===!0||ot===!0?s.jsx(et,{}):M&&(!U||k)||_&&b?s.jsxs(s.Fragment,{children:[w==="Completed"?s.jsx(re,{analytics:E,onLoad:f=>(G=>G.trackPageLoaded(Ye.Event.reimbursementHome))(f)}):null,s.jsx(nt,{isAppContentDrawerOpen:T,handleDrawerToggle:Z}),s.jsxs(ea,{windowSize:m,children:[s.jsx(Nn,{isOpen:i,drawerLeftMargin:new Bn(0,0,300,600),onClose:()=>{e(`/${u.tenantEmailDomain}/reimbursements`),t(X())},children:s.jsx(ia,{onClick:f=>f.stopPropagation(),children:s.jsx(Qn,{tenantEmailDomain:u.tenantEmailDomain})})}),s.jsx(ta,{isShowDeletedBillsEnabled:o,isShowDeletedReimbursementEnabled:l,location:n,navigate:e,currentTenant:u,period:V,isAdmin:C,isEmployee:U,entity:"reimbursement",onClickMenuIcon:()=>{Z(!0)},createdByUserList:R.createdByUserList,createdByUserListFetchState:R.createdByUserListFetchState,isDownloadEnabled:R.isDownloadEnabled,connectedAccountProvider:W,isBulkActionEnabled:p,bulkSubmissionLimit:R.remiBulkSubmissionLimit,bulkSubmissionFetchState:R.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:h,onAskAiCfoClick:$,...rt})]})]}):O&&k?s.jsx(N,{to:"../setup"}):A!=null&&He(u,A.loggedInUserRoleMap)?s.jsx(N,{to:"../promo"}):s.jsx(ye,{fetchState:"In-Progress"}):s.jsx(pe,{})}const aa=e=>`/${e}/reimbursements/setup`,sa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},ia=P($n)`
|
|
65
|
-
display: flex;
|
|
66
|
-
min-height: 100%;
|
|
67
|
-
flex-direction: column;
|
|
68
|
-
`,oa=ee((function(e,t){const{companyId:n}=t;return{reimbursementSetupView:cn(e,n),analytics:E,videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}}),(function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(un(n))},onCreateNewRemiButtonClick:()=>{e(dn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}}))(Fn),ra=()=>{const e=Un(),t=K(),n=Q(),{tenantEmailDomain:r}=ie(),m=Ke(),[c,d]=g.useState(!1),i=v((C=>H(C))),a=L.getSignedInUserTenant(r)?.companyId??i.companyId,o=L.getSignedInUser(),l=i.userRoleId,p=!!i.userRole?.includes("reimbursements_user"),I=le(),u=Se(I?.loggedInUserRoleMap),T=Ie(I?.loggedInUserRoleMap),y=!!i.userReimbursementInfo?.isReimbursementTOSAccepted,B=!!i.companyReimbursementInfo?.info?.isReimbursementEnabled,D=!!i.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,A=C=>{d(C)};if(o==null)throw Error("Can't access reimbursement promo page without signing in...");return B&&T&&y?s.jsx(N,{to:"../../../reimbursements"}):D&&u?s.jsx(N,{to:"../../reimbursements/setup"}):i.companyReimbursementInfo&&!D||i.userReimbursementInfo&&T&&y===!1?s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:E,onLoad:C=>(R=>R.trackPageLoaded(Ye.Event.reimbursementPromoPage))(C)}),s.jsx(nt,{isAppContentDrawerOpen:c,handleDrawerToggle:A}),s.jsx(oa,{companyId:a,navigate:t,meetingUrl:e("reimbursement_promo"),location:n,userReimbursementInfo:i.userReimbursementInfo,userRoleId:l,isEmployee:p,onClickMenuIcon:()=>{A(!0)}})]}):s.jsx(ye,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})};function Ma(){const e=v((Z=>H(Z))),t=le(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=Ke(),m=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,c=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:d}=oe(),{isFeatureEnabled:i}=d(F.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=d(F.isDebitCardFeatureEnabled),o=Ge(a,e),l=Ve(e),p=e?.userRole!=null&&pn(e?.userRole),I=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!p)&&bn(t?.loggedInUserRoleMap),u=gn(t?.loggedInUserRoleMap),T=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!p,y=Se(t?.loggedInUserRoleMap),B=T&&y,D=!!e.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!p,A=D&&hn(t?.loggedInUserRoleMap),C=Ln(e,i,a)&&!p,R=C&&fn(t?.loggedInUserRoleMap),S=Sn(t?.loggedInUserRoleMap),w=In(t?.loggedInUserRoleMap),h=yn(t?.loggedInUserRoleMap),$=D&&w,U=e.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!p&&h,k=Rn(t?.loggedInUserRoleMap),_=kn(t?.loggedInUserRoleMap),b=Ie(t?.loggedInUserRoleMap),M=C&&k,{tenantEmailDomain:O}=ie(),z=Q(),W=n===!0&&(y||b&&c);return s.jsxs(mt,{children:[z.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(x,{path:"verification",element:s.jsx(je,{isBillPayAdminLevelAccess:I,isUserHasOnlyBillPayAccess:u,isReimbursementAdminLevelAccess:B,isZeniAccountAdminLevelAccess:A,isChargeCardAdminLevelAccess:R,isUserHasOnlyCardAccess:S,productType:"reimbursement",type:"verification"})}),s.jsx(x,{path:"setup",element:s.jsx(je,{isBillPayAdminLevelAccess:I,isUserHasOnlyBillPayAccess:u,isReimbursementAdminLevelAccess:B,isZeniAccountAdminLevelAccess:A,isChargeCardAdminLevelAccess:R,isUserHasOnlyCardAccess:S,productType:"reimbursement",type:"setup"})}),s.jsx(x,{path:"promo",element:s.jsx(ra,{})}),s.jsx(x,{path:"approval-rules/*",element:B?s.jsx(_n,{}):s.jsx(Pn,{showZeniAccountRoute:$,isUserHasBillPayAccess:_,isUserHasReimbursementAccess:b,showTreasuryRoute:U,isTenantBankingOnly:o,showChargeCardRoute:M,tenantEmailDomain:O??""})}),W&&s.jsx(x,{path:"*",element:s.jsx(na,{})}),(o===!0||l===!0)&&s.jsx(x,{path:"/*",element:s.jsx(et,{})}),t!=null&&He(e,t?.loggedInUserRoleMap)&&s.jsx(x,{path:"*",element:s.jsx(N,{to:"../promo"})}),m&&y&&s.jsx(x,{path:"*",element:s.jsx(N,{to:"../setup"})})]}):z.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(x,{path:"new",element:s.jsx(Ue,{})}),s.jsx(x,{path:":reimbursementId",element:s.jsx(Xn,{})}),s.jsx(x,{path:":reimbursementId/edit",element:s.jsx(Ue,{})}),s.jsx(x,{path:"*",element:s.jsx(pe,{})})]}):s.jsx(x,{path:"*",element:s.jsx(ye,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${j.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(x,{path:"*",element:s.jsx(pe,{})})]})}export{Ma as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-oxGmLiGE.js";import{z as b,a6 as N,k as f,O as S,e6 as k,p as I,d as C}from"./index-Cjqi6Pkt.js";import"./mui-D8QuRJEy.js";import g from"./NotFoundScreen-ngkmWfLO.js";import{a as c}from"./sentry-CYolppN9.js";import{u as D,j as y,h as F,g as L,l as T,n as U,o as d,N as h}from"./core-k1hJbZ6L.js";import{fI as _,a32 as j,a33 as p,Em as P,q7 as V,a34 as q,Ek as z}from"./zeni-epic-state-C2CKsxzr.js";import"./recharts-DZG9umMy.js";import"./analytics-BSYXJeF4.js";import"./plaid-CbZCK8Pe.js";import"./dnd-CiTl8J_b.js";import"./stripe-cKAAJElX.js";import"./lottie-DXQhXtqa.js";import"./lexical-YTMAFU1j.js";import"./pdf-QcH92u4w.js";import"./utils-CZxvf1-B.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]="80166a02-4821-44c1-bd8a-e3c618bb501a",e._sentryDebugIdIdentifier="sentry-dbid-80166a02-4821-44c1-bd8a-e3c618bb501a")}catch{}})();const G=T((function(e,t){const n=j(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=b.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((m=>{s.push(m.companyName),r.push(m.emailIds[0])})),f.trackInviteEmailClicked("send",s,r,s.length)}e(z())},onUpdateInviteFormLocalData:s=>{e(q({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&f.trackInviteEmailClicked("cancel")}}}))(k),O=()=>{const e=D(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=y((o=>_(o))),m=F(),w=L(),u=b.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const l=y((o=>j(o))),x=u?.firstName!=null?u.firstName:"User";c.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),c.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[l.fetchState,e]);const E=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(N,{analytics:f,onLoad:o=>(v=>v.trackPageLoaded(S.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:m,location:w,currentTenant:r,companyName:E,userName:x,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=I(),{isFeatureEnabled:t}=e(C.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(d,{path:"/",element:a.jsx(h,{to:"refer",replace:!0})}),a.jsx(d,{path:"how-it-works",element:a.jsx(h,{to:"refer",replace:!0})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(O,{}):a.jsx(g,{})}),a.jsx(d,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-ngkmWfLO.js","assets/sentry-CYolppN9.js","assets/core-k1hJbZ6L.js","assets/zeni-epic-state-C2CKsxzr.js","assets/index-Cjqi6Pkt.js","assets/mui-D8QuRJEy.js","assets/analytics-BSYXJeF4.js","assets/utils-CZxvf1-B.js","assets/index-BQ3cXEYt.css","assets/DashboardRoutes-Cwe3Vuyf.js","assets/withTransactionSidePanel-zjTjrZrt.js","assets/useAskAiCfoHostNavButtonProps-BETiKk63.js","assets/TransactionDetailScreen-CUF4XJ-a.js","assets/decodeURIComponentSafe-CKsYKxPJ.js","assets/useInitialThreadRequest-DKk3Gbri.js","assets/routePaths-BQiUfv8Y.js","assets/expenseAutomationHelper-BfCR3sLm.js","assets/stripSplatSuffix-yEJV_xmD.js","assets/reportTimeframe-BoyB48qP.js","assets/analyticsHelper-w2YkQjq1.js","assets/CompanyPassportScreen-B28ZIQmd.js","assets/MobileAppDrawer-D95K9MWM.js","assets/InboxNotificationsProvider-Lon_JjZI.js","assets/useTaskManagerAccess-CbR2C9f7.js","assets/useAiCfoDashboardSuggestedQuestionsChips-BBN3Q32c.js","assets/FeaturePreviewScreen-CVxHNITI.js","assets/BillPayRoutes-Cq7a-pm7.js","assets/AddressScreen-B7HfNJJM.js","assets/DomesticWireDetailScreen-C3Fvc0vh.js","assets/BusinessVerificationPageScreen-YH2iMYXG.js","assets/DrawerScreen-BiLnsYxr.js","assets/SetupPagesScreen-DT18jEZS.js","assets/BillPayApprovalRoutes-CUhlkbFZ.js","assets/useEnsureVendorListLoaded-CbkO2307.js","assets/ReimbursementApprovalRuleDetailScreen-CdBqEWoC.js","assets/getLocaleForTenant-Bok1bQNl.js","assets/ReimbursementRoutes-DqKBNzYH.js","assets/ReimbursementApprovalRoutes-D9UKdBqr.js","assets/TransactionListRoutes-DFYIfVzR.js","assets/ZeniAccountStatementScreen-Dff7TUu2.js","assets/SettingsRoutes-CXOUMEST.js","assets/AccountMappingScreen-DxODZ1Nk.js","assets/QBOConnectionScreen-B_jTzA2E.js","assets/empty-DXUNZiQh.js","assets/index-DGy3NvOY.js","assets/url-BJMHxMoG.js","assets/index-B1EgaaVs.js","assets/accountMappingHelper-CCESaK7R.js","assets/useEmailConnectResultRefresh-8S-s2Qbg.js","assets/ReportsRoutes-97Pz3_w0.js","assets/ChargeCardRoutes-DKqAyC6V.js","assets/useChargeCardPusherEvents-DEUPC1vA.js","assets/PeopleRoutes-CRBdsznQ.js","assets/ExpenseAutomationRoutes-CwVf58CT.js","assets/useActualMatchingMatchDetail-BRI2b5oS.js","assets/ScheduleDetailsPrepaidExpensesScreen-CXq4al_v.js","assets/pathToGoBack-BvtdrmIA.js","assets/TreasuryRoutes-DweO_eX_.js","assets/VendorsRoutes-CtkEV-aM.js","assets/ZeniAccountRoutes-ulGvqG-O.js","assets/AddressRoutes-K7qFYU4Q.js","assets/PandLWithForecastRoutes-D5OxnQT-.js","assets/CustomerOnboardingRoutes-CGeTdTAp.js","assets/TransactionDetailRoutes-BkrhGwVi.js","assets/EntityDetailRoutes-DiWWQPIS.js","assets/InvoicingRoutes-CEhIyfKx.js","assets/NotificationRoutes-OU4hmCU4.js","assets/PerformanceRoutes-D57LkbmT.js","assets/ActualMatchingMatchDetailScreen-CpFxldZX.js","assets/RewardsRoutes-CP48quzG.js","assets/TaskRoutes-8igPnZpC.js","assets/TaskListScreen-PbWxRl0T.js","assets/useTaskManagerPusherEvents-CULNono8.js","assets/AiCfoScreen-D0ryurTs.js","assets/CardsAiCfoScreen-i0herVW8.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as s,bn as hs,fI as Es,e1 as ps,e0 as xs,Bs as Rs,dk as gs,ca as Is,gM as js,gc as Ts,dh as pe,cI as As,gq as fs,cA as Ds,bG as bs,br as ys,U$ as Cs,v as vs,V2 as Os,bq as Ps,V3 as Us,bM as ws,bL as Fs,bu as Ls,cw as Vs,V4 as ks,V5 as Hs,dc as Bs,df as Ss,de as Ns,cH as Ms,cO as Zs,p_ as xe,gl as Re,h0 as $s,gn as ge,gO as Ie,gP as je,go as Gs}from"./zeni-epic-state-C2CKsxzr.js";import{j as e}from"./liveblocks-oxGmLiGE.js";import{a as U}from"./sentry-CYolppN9.js";import{N as u,u as zs,h as qs,i as Ys,g as Ws,j as $,q as Te,n as Ks,o as n}from"./core-k1hJbZ6L.js";import{I as l,u as Xs,z as y,p as Js,f as Qs,r as et,d as S,h as st,K as tt,V as nt,L as F,G as Ae,t as _,P as at,M as ot,k as ne}from"./index-Cjqi6Pkt.js";import{u as rt}from"./mui-D8QuRJEy.js";import{f as fe}from"./analyticsHelper-w2YkQjq1.js";import{t as it}from"./getLocaleForTenant-Bok1bQNl.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},D=new o.Error().stack;D&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[D]="9e75c5da-bfa1-4d10-99d5-9739242faae6",o._sentryDebugIdIdentifier="sentry-dbid-9e75c5da-bfa1-4d10-99d5-9739242faae6")}catch{}})();const lt=l((()=>s((()=>import("./NotFoundScreen-ngkmWfLO.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ut=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),dt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),De=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),be=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),C=({showZeniAccountRoute:o,isUserHasBillPayAccess:D,isUserHasReimbursementAccess:N,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(V===!0){if(o)return e.jsx(be,{tenantEmailDomain:v});if(i)return e.jsx(De,{tenantEmailDomain:v});if(O)return e.jsx(ye,{tenantEmailDomain:v})}return o?e.jsx(be,{tenantEmailDomain:v}):i?e.jsx(De,{tenantEmailDomain:v}):O?e.jsx(ye,{tenantEmailDomain:v}):D?e.jsx(dt,{tenantEmailDomain:v}):N?e.jsx(ut,{tenantEmailDomain:v}):e.jsx(lt,{})},ct={dashboard:()=>s((()=>import("./DashboardRoutes-Cwe3Vuyf.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,25,8])),bills:()=>s((()=>import("./BillPayRoutes-Cq7a-pm7.js")),__vite__mapDeps([26,1,2,3,4,5,6,7,27,0,28,11,14,29,15,21,22,23,30,25,31,19,32,33,34,35,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-DqKBNzYH.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,11,14,30,37,33,34,35,8])),transactions:()=>s((()=>import("./TransactionListRoutes-DFYIfVzR.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,39,8])),settings:()=>s((()=>import("./SettingsRoutes-CXOUMEST.js")),__vite__mapDeps([40,1,2,3,4,5,6,7,23,41,21,22,42,43,44,45,46,13,47,27,0,19,29,15,20,48,32,33,34,37,8])),reports:()=>s((()=>import("./ReportsRoutes-97Pz3_w0.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,25,14,15,18,21,22,23,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-DKqAyC6V.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,11,21,22,23,31,29,15,0,19,14,51,27,8])),people:()=>s((()=>import("./PeopleRoutes-CRBdsznQ.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,0,11,21,22,23,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-CwVf58CT.js")),__vite__mapDeps([53,1,2,3,0,4,5,6,7,11,12,13,14,15,16,54,17,10,55,56,47,30,8])),treasury:()=>s((()=>import("./TreasuryRoutes-DweO_eX_.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,11,14,25,8])),vendors:()=>s((()=>import("./VendorsRoutes-CtkEV-aM.js")),__vite__mapDeps([58,1,2,3,4,5,6,7,27,0,25,55,56,54,17,13,15,11,21,22,23,30,47,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-ulGvqG-O.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,28,27,11,39,8]))},mt=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},_t=l((()=>s((()=>import("./ReportsRoutes-97Pz3_w0.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,25,14,15,18,21,22,23,8])))),ht=l((()=>s((()=>import("./AddressRoutes-K7qFYU4Q.js")),__vite__mapDeps([60,1,2,3,27,4,5,6,7,0,8])))),Et=l((()=>s((()=>import("./PeopleRoutes-CRBdsznQ.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,0,11,21,22,23,8])))),pt=l((()=>s((()=>import("./PandLWithForecastRoutes-D5OxnQT-.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,0,25,11,14,15,21,22,23,8])))),xt=l((()=>s((()=>import("./CustomerOnboardingRoutes-CGeTdTAp.js")),__vite__mapDeps([62,1,2,3,27,4,5,6,7,0,42,43,44,45,46,13,48,51,8])))),Rt=l((()=>s((()=>import("./VendorsRoutes-CtkEV-aM.js")),__vite__mapDeps([58,1,2,3,4,5,6,7,27,0,25,55,56,54,17,13,15,11,21,22,23,30,47,8])))),gt=l((()=>s((()=>import("./TransactionDetailRoutes-BkrhGwVi.js")),__vite__mapDeps([63,1,2,3,0,4,5,6,7,13,33,12,11,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-DiWWQPIS.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),It=l((()=>s((()=>import("./DashboardRoutes-Cwe3Vuyf.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,25,8])))),ve=l((()=>s((()=>import("./BillPayRoutes-Cq7a-pm7.js")),__vite__mapDeps([26,1,2,3,4,5,6,7,27,0,28,11,14,29,15,21,22,23,30,25,31,19,32,33,34,35,8])))),jt=l((()=>s((()=>import("./SettingsRoutes-CXOUMEST.js")),__vite__mapDeps([40,1,2,3,4,5,6,7,23,41,21,22,42,43,44,45,46,13,47,27,0,19,29,15,20,48,32,33,34,37,8])))),Tt=l((()=>s((()=>import("./InvoicingRoutes-CEhIyfKx.js")),__vite__mapDeps([65,1,2,3,4,5,6,7,27,0,21,22,23,42,43,44,45,46,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-DqKBNzYH.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,11,14,30,37,33,34,35,8])))),At=l((()=>s((()=>import("./ZeniAccountRoutes-ulGvqG-O.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,28,27,11,39,8])))),ft=l((()=>s((()=>import("./TreasuryRoutes-DweO_eX_.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,11,14,25,8])))),Dt=l((()=>s((()=>import("./TransactionListRoutes-DFYIfVzR.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,39,8])))),bt=l((()=>s((()=>import("./ChargeCardRoutes-DKqAyC6V.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,11,21,22,23,31,29,15,0,19,14,51,27,8])))),yt=l((()=>s((()=>import("./NotificationRoutes-OU4hmCU4.js")),__vite__mapDeps([66,1,2,3,0,4,5,6,7,11,23,8])))),Ct=l((()=>s((()=>import("./PerformanceRoutes-D57LkbmT.js")),__vite__mapDeps([67,1,2,3,0,4,5,6,7,11,21,22,23,8])))),vt=l((()=>s((()=>import("./ExpenseAutomationRoutes-CwVf58CT.js")),__vite__mapDeps([53,1,2,3,0,4,5,6,7,11,12,13,14,15,16,54,17,10,55,56,47,30,8])))),Ot=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-CpFxldZX.js")),__vite__mapDeps([68,1,2,3,4,5,6,7,54,17,13,15,0,8])))),Pt=l((()=>s((()=>import("./RewardsRoutes-CP48quzG.js")),__vite__mapDeps([69,1,2,3,4,5,6,7,0,8])))),Ut=l((()=>s((()=>import("./TaskRoutes-8igPnZpC.js")),__vite__mapDeps([70,1,2,3,0,4,5,6,7,14,21,22,23,71,11,72,8])))),wt=l((()=>s((()=>import("./AiCfoScreen-D0ryurTs.js")),__vite__mapDeps([73,1,2,3,4,5,6,7,24,56,15,72,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-i0herVW8.js")),__vite__mapDeps([74,1,2,3,4,5,6,7,8])))),f=l((()=>s((()=>import("./NotFoundScreen-ngkmWfLO.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Ft=l((()=>s((()=>import("./TaskListScreen-PbWxRl0T.js").then((o=>o.f))),__vite__mapDeps([71,1,2,3,4,5,6,7,11,21,22,23,72,8])))),Lt=({isDashboardAccess:o,showZeniAccountRoute:D,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:i,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:v,showChargeCardRoute:k})=>{if(O===!0){if(D)return e.jsx(u,{to:"checking"});if(V)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return v===!0&&k?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):D?e.jsx(u,{to:"checking"}):V?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),$t=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const D=zs(),N=qs(),{tenantEmailDomain:i}=Ys(),V=rt().mode,{setLoading:O,clearAllLoading:v,clearLoading:k}=Xs(),b=y.getSignedInUserTenant(i)?.tenantId,j=y.getSignedInUser(),K=hs(j),G=Ws(),[L,we]=U.useState(!1),r=$((a=>Es(a))),{useFeatureGate:H}=Js(),M=Qs(),X=et(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=H(S.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=H(S.isDebitCardFeatureEnabled),T=$((a=>a.tenantState.fetchState)),p=$((a=>a.tenantState.activeTenantFetchState.fetchState)),h=p==="Completed"||T==="Completed"?ps(oe,r):void 0,J=p==="Completed"||T==="Completed"?xs(r):void 0,re=p==="Completed"||T==="Completed"?Rs(r)&&!gs(r):void 0,ke=st(r,Ve,oe),{isCardsHidden:He}=tt(r?.tenantId),Be=!ke||!!He,{isFeatureEnabled:Se}=H(S.isSettingsFeatureEnabled),{isFeatureEnabled:Q}=H(S.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=H(S.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||ot==="DEV",Ze=r?.userRole!=null&&Is(r.userRole),z=$((a=>js(a)));if(i!=null){const a=y.getSignedInUserTenant(i);j!=null&&a!=null&&fe(j,r,V)}const Z={tenantId:b,userId:j?.userId,sessionId:j?.zeniSessionId},ie=Ts(),E=nt(),$e=r.company==null||E?.loggedInUserRoleMap!=null&&pe(E.loggedInUserRole),Ge=As(E?.loggedInUserRoleMap),ee=Te("/:tenantEmailDomain/onboarding/*")!==null,ze=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=ze?.params.selectedPeriod,qe=$((a=>Z.tenantId!=null?fs(a,Z.tenantId):void 0));U.useEffect((()=>{O(F.TENANT_FETCHING),o(i)}),[i]),U.useEffect((()=>{if(se!=null&&b!=null){const a=se.split("-");if(a.length===2){const A=Ds(Number(a[0])),c=Number(a[1]),t=bs(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=ys();t.isAfter(d,"month")===!1?D(Cs(b,{month:A,year:c})):N(`/${i}/month_end_close_checks/review`)}}}),[se,i,b]),U.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,Z,ie,j,D,y]),U.useLayoutEffect((()=>{!vs(ie,Z)&&y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,t){if(Re(A?.userId,A?.zeniSessionId,a.tenantId),c($s(!0)),c(ge(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=y.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(it(t)),d?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?ne.identify(a.userId,{tenant_id:a.tenantId}):ne.resetUserIdentity()})(Z,j,D,qe))}),[b]),U.useEffect((()=>{y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,t,d,q,B){if(c==null&&t==null)return void console.warn("There is no current tenant selected!!");const Y=t!=null&&d?.zeniSessionId!=null,cs=c==null||c.tenantId!==t,ms=c!=null&&c.excludedResources==null,_s=c!=null&&c.externalConnections==null;if(Y&&cs){B(ge(t));const W=y.getSignedInUserTenantWithId(t);W?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(W?.tenantEmailDomain),Re(d?.userId,d?.zeniSessionId,t),_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),B(Ie(d.userId,t))),_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),B(je(d.userId,t)))}else Y&&ms&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),B(Ie(d.userId,t))),Y&&_s&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),B(je(d.userId,t)));if(Y){ne.identify(d.userId,{tenant_id:t});const W=t==null||t!=null&&(A==="Completed"||A==="Error");a==="Completed"||A!=="Not-Started"&&A!=="Error"||t==null||!_.shouldFetchActiveTenant(t)||(_.markActiveTenantFetchStarted(t),q(F.TENANT_FETCHING),B(Gs(d.userId,t,d.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),B(xe(d.userId,d.zeniSessionId)))}})(T,p,r,b,j,O,D))}),[b,p]),U.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&z.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),y.saveSignedInUserTenants(Os(z.tenantsBaseInOrder)),j!=null&&fe(j,r,V,void 0,z.tenantsBaseInOrder))}),[z,T,r,j]),U.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&b!=null?(v(),_.markActiveTenantFetchCompleted(b)):p==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,b,L]);const le=U.useRef(!1);U.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(a=mt,A=3e3){setTimeout((()=>{const c=t=>{if(t>=a.length)return;const d=a[t],q=ct[d];q!=null?q().then((()=>ae((()=>c(t+1))))).catch((()=>ae((()=>c(t+1))))):c(t+1)};ae((()=>c(0)))}),A)})())}),[p,L]);const P=r?.userRole!=null&&Ps(r?.userRole),{isFeatureEnabled:Ye}=H(S.isReferralFeatureEnabled),{isFeatureEnabled:We}=H(S.isAccrualEnabled),Ke=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Xe=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!P,de=!Be&&!P,Je=Us(E?.loggedInUserRoleMap),Qe=r.externalConnections?.accounting[0]?.isValid,es=r.externalConnections?.fetchState==="Completed",te=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!P,me=ce&&ws(E?.loggedInUserRoleMap),_e=Fe&&!P,ss=Le&&!P,ts=ue&&Fs(E?.loggedInUserRoleMap),ns=de&&Ls(E?.loggedInUserRoleMap),as=_e&&Vs(E?.loggedInUserRoleMap),os=ks(E?.loggedInUserRoleMap),rs=Hs(E?.loggedInUserRoleMap),is=Bs(E?.loggedInUserRoleMap),ls=Ss(E?.loggedInUserRoleMap),us=Ns(E?.loggedInUserRoleMap),x=Ms(E?.loggedInUserRoleMap),R=Zs(E?.loggedInUserRoleMap),he=ue&&x,Ee=ce&&R,g=_e&&is,I=ss&&ls,m=de&&us,ds=r.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||Ge===!0||Je===!0||os===!0||rs===!0;return y.isSignedIn()?b==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(j!=null&&T!=="In-Progress"&&D(xe(j.userId,j.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(te===!0||K&&!ee)&&es&&Qe!==!0&&h===!1&&J===!1&&re===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||te!==!0||ee||K?!L||te!==!1||ee||K?L&&r?.userRole&&h!=null&&J!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Ks,{children:e.jsxs(n,{element:e.jsx(at,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Lt,{isDashboardAccess:w,showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,isTenantCardsOnly:J,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(It,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(_t,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"people/*",element:ds||w?e.jsx(Et,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(pt,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(xt,{})}),e.jsx(n,{path:"transaction/*",element:w&&P===!1||Ke||Xe?e.jsx(gt,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"transactions/*",element:w&&P===!1?e.jsx(Dt,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"customer/*",element:w&&P===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,isTenantBankingOnly:h,showTreasuryRoute:I,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"vendor/*",element:w&&P===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"tasks",element:e.jsx(Ft,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Ut,{})}),e.jsx(n,{path:"address/*",element:ts||me||as||ns?e.jsx(ht,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"checking/*",element:g?e.jsx(At,{}):e.jsx(f,{})}),e.jsx(n,{path:"treasury/*",element:I?e.jsx(ft,{}):e.jsx(f,{})}),e.jsx(n,{path:"performance",element:X===!0?e.jsx(Ct,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:X===!0&&P===!1?e.jsx(vt,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:X===!0&&P===!1&&We===!0?e.jsx(Ot,{}):e.jsx(f,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(yt,{})}),e.jsx(n,{path:"vendors/*",element:$e?e.jsx(Rt,{}):e.jsx(f,{})}),e.jsx(n,{path:"bill/*",element:he?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"bills/*",element:he?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursement/*",element:Ee?e.jsx(Oe,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursements/*",element:Ee?e.jsx(Oe,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"settings/*",element:Se?e.jsx(jt,{hasAdminLevelAccess:me}):e.jsx(f,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(Tt,{}):e.jsx(f,{})}),e.jsx(n,{path:"cards/ask",element:m&&M?e.jsx(Pe,{isFileUploadEnabled:Q}):e.jsx(f,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Pe,{isFileUploadEnabled:Q}):e.jsx(f,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(bt,{}):e.jsx(f,{})}),e.jsx(n,{path:"rewards/*",element:Ye?e.jsx(Pt,{}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:M?e.jsx(wt,{isFileUploadEnabled:Q}):e.jsx(f,{})}),e.jsx(n,{path:"*",element:e.jsx(f,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{C as F,$t as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-oxGmLiGE.js";import{a as u,R as b,t as A}from"./sentry-CYolppN9.js";import{u as z,h as D,j as d,g as M,N as O,l as V}from"./core-k1hJbZ6L.js";import{u as j,z as s,k as E,G as F,N as P,O as N,S as _,R as B,T as R,W as v}from"./index-Cjqi6Pkt.js";import{fI as W,UK as $,V2 as J,gl as K,gn as Y,V7 as G,gY as H,dl as q,V8 as U,V9 as Q,Va as X,c1 as y}from"./zeni-epic-state-C2CKsxzr.js";import{u as Z}from"./mui-D8QuRJEy.js";import{u as ee}from"./useDeviceId-BqvO5dq-.js";import{f as te}from"./analyticsHelper-w2YkQjq1.js";import{t as ne}from"./getLocaleForTenant-Bok1bQNl.js";import"./recharts-DZG9umMy.js";import"./analytics-BSYXJeF4.js";import"./plaid-CbZCK8Pe.js";import"./dnd-CiTl8J_b.js";import"./stripe-cKAAJElX.js";import"./lottie-DXQhXtqa.js";import"./lexical-YTMAFU1j.js";import"./pdf-QcH92u4w.js";import"./utils-CZxvf1-B.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]="9c12789f-46f1-43e6-8418-a30c03200c47",t._sentryDebugIdIdentifier="sentry-dbid-9c12789f-46f1-43e6-8418-a30c03200c47")}catch{}})();const ie=V((function(t,i){const c=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:c,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}}),(function(t,i){const{location:c,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(X({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(l),sourceUri:y(c.state!=null?c.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=c.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Q(n,a)))},clearSignInError:()=>{t(U())}}}))(R),ae=b.memo(ie);function ve({setTenantEmailDomain:t}){const i=z(),c=D(),{clearAllLoading:g}=j(),n=s.getSignedInUser();u.useLayoutEffect((()=>{g()}),[g]);const a=ee(),l=d((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:k,accountLocked:C,accountUnlockTime:L}=d((e=>e.tenantState)),p=d((e=>e.tenantState.fetchState)),h=d((e=>e.tenantState.activeTenantFetchState.fetchState)),S=d((e=>e.tenantState.signInState)),o=d((e=>e.tenantState.loggedInUser)),r=d((e=>W(e))),I=d((e=>$(e))),m=M(),w=Z().mode,x=m.state?.magicLinkExpired,T=m.state?.magicLinkAlreadyUsed;if(u.useEffect((()=>{k.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))}),[k.fetchState,l]),u.useEffect((()=>{t(void 0)}),[]),u.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&h!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(J(I.tenantsInOrder),o.zeniSessionId),K(o.userId,o.zeniSessionId,r.tenantId),i(Y(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(G("Completed")),F.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),H().then((()=>{const e=B();e!=null&&P(e)})),setTimeout((()=>{E.trackLogin(N.Event.loginSuccess,o.authProvider??"google",q(r.productSettings))}),2e3))}),[S,p,h,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!x,magicLinkAlreadyUsed:!!T,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:c,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&L!=null?f.jsx(_,{onClose:()=>i(U()),unlockDate:L}):null]})}export{ve as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-oxGmLiGE.js";import{a as i}from"./sentry-CYolppN9.js";import{u as l,g as d,N as u}from"./core-k1hJbZ6L.js";import{z as n,k as f,O as m,a5 as p}from"./index-Cjqi6Pkt.js";import{g$ as g,Vo as y}from"./zeni-epic-state-C2CKsxzr.js";import{n as h}from"./mui-D8QuRJEy.js";import"./recharts-DZG9umMy.js";import"./analytics-BSYXJeF4.js";import"./plaid-CbZCK8Pe.js";import"./dnd-CiTl8J_b.js";import"./stripe-cKAAJElX.js";import"./lottie-DXQhXtqa.js";import"./lexical-YTMAFU1j.js";import"./pdf-QcH92u4w.js";import"./utils-CZxvf1-B.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]="574f85ef-4f5c-43c4-8ece-23963f12f852",e._sentryDebugIdIdentifier="sentry-dbid-574f85ef-4f5c-43c4-8ece-23963f12f852")}catch{}})();function N(){const e=l(),t=d(),o=i.useRef(!1),a=n.isSignedIn(),r=t.state?.message==="logout"||a;return i.useEffect((()=>{if(r&&!o.current){o.current=!0;try{e(g()),y(),f.trackLogout(m.Event.logoutSuccess),f.resetUserIdentity(),n.clearAll()}catch(c){console.error("Error during sign out:",c)}finally{window.location.replace("/signin/auth")}}}),[r,e]),r?s.jsx(b,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const b=h.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;export{N as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as A}from"./liveblocks-oxGmLiGE.js";import{a as u}from"./sentry-CYolppN9.js";import{u as J,k as H,j as G,h as ma,g as Sa,i as ya,l as ba}from"./core-k1hJbZ6L.js";import{z as M,p as Da,d as I,aq as Ea,a6 as ha,k as Ga,O as Ca,e9 as Aa,l as F,a2 as Ia}from"./index-Cjqi6Pkt.js";import{QM as Ra,Rx as va,fI as Ba,a3b as na,gQ as Q,a3c as ra,a36 as La,R1 as X,a3d as Ka,Rd as Y,QO as wa,Qq as Ua,RJ as aa,a3e as ea,gk as Pa,RA as Fa,RF as ja,Rs as xa,Rq as ta,RG as Oa,Rn as $a,a3f as Na,a3g as za,a3h as qa,a3i as Ma,a3j as R,dz as Qa,dy as Za,a3k as Va,QL as Wa}from"./zeni-epic-state-C2CKsxzr.js";import{n as Ja}from"./mui-D8QuRJEy.js";import{u as Ha}from"./useAskAiCfoHostNavButtonProps-BETiKk63.js";import{M as Xa}from"./MobileAppDrawer-D95K9MWM.js";import{u as Ya}from"./useTaskManagerPusherEvents-CULNono8.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="c29b1529-4c33-4656-a00a-ba917221ba5f",a._sentryDebugIdIdentifier="sentry-dbid-c29b1529-4c33-4656-a00a-ba917221ba5f")}catch{}})();const _={TASK_CREATED:"task-created",TASK_UPDATED:"task-updated",TASK_SNOOZE_RESURFACED:"task-snooze-resurfaced",TASKS_BULK_UPDATED:"tasks-bulk-updated",TASKS_BULK_DELETED:"tasks-bulk-deleted"},ae=(a,t)=>a==null||a===""?[]:t.map((n=>`private-encrypted-${a}.${n}`)),ee=(a,t)=>a==null||a===""?[]:t.map((n=>`private-encrypted-${a}.${n}`)),j=a=>Array.isArray(a)&&a.every((t=>typeof t=="string")),oa=a=>typeof a.task_id=="string"?a.task_id:typeof a.id=="string"?a.id:null,ge=a=>{if(a==null||typeof a!="object")return null;const t=a,n=oa(t);if(n==null)return null;const c={task_id:n};return typeof t.parent_task_id=="string"&&(c.parent_task_id=t.parent_task_id),typeof t.sync_token=="string"&&(c.sync_token=t.sync_token),typeof t.is_deleted=="boolean"&&(c.is_deleted=t.is_deleted),typeof t.is_private=="boolean"&&(c.is_private=t.is_private),c},te=a=>{if(a==null||typeof a!="object")return null;const t=a;return j(t.task_ids)?{task_ids:t.task_ids}:null},_e=a=>{if(a==null||typeof a!="object")return null;const t=a;return typeof t.task_id!="string"?null:{task_id:t.task_id}},se=Ja.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: ${a=>a.theme.colors.grey4};
|
|
9
|
-
`,ne=ba((function(a,t){const n=na(a,t.isTaskTemplatesEnabled),{taskGroupId:c}=t,p=c!=null&&c!==""?{...n,taskGroupsWithTasksList:n.taskGroupsWithTasksList.map((e=>({...e,tasks:e.tasks.filter((s=>s.taskGroupIds.includes(c)))}))).filter((e=>e.tasks.length>0))}:n,y=La(a),f=M.isZeniUser(),v=a.taskDetailState?.subTaskCreateStatus?.fetchState;return{taskListView:p,tagListView:y,localData:p.localData,isTaskTemplatesEnabled:t.isTaskTemplatesEnabled,isZeniUser:f,subTaskCreateStatus:v}}),(function(a,t){const{navigate:n,currentTenant:c,location:p,isTaskTemplatesEnabled:y}=t,{tenantEmailDomain:f}=c,{groupByKey:v}=t.uiState;return{onTaskManagementRowClick:e=>{const s=sa(f,e),b=F(p.state?.pathnameStackToGoBack,p.pathname);n(s,{state:{pathnameStackToGoBack:b}})},onReloadTasks:()=>{a(Q(!0,y))},onTabChange:e=>{a(Ma(e))},onParentTaskClick:e=>{const s=sa(f,e);window.open(s,"_blank","noopener")},bulkUpdateTasks:(e,s)=>{a(ta(e,null,s))},onNewTaskClick:()=>{if(t.localData.defaultTaskGroupId!=null){const e=q(f,t.localData.defaultTaskGroupId),s=F(p.state?.pathnameStackToGoBack,p.pathname);n(e,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(e,s)=>{a(ea({uiState:{sortKey:e,sortOrder:s}}))},onFiltersChange:e=>{a(qa({filters:e}))},onSearchTextChanged:e=>{a(za({searchText:e}))},onReloadCards:()=>{a(Q(!0,y))},onBackClick:()=>{if(p.state?.message==="triggerBackClick"){const e=Ia(p.state?.pathnameStackToGoBack),s=e.poppedPathname??"../";n(s,{state:{pathnameStackToGoBack:e.newStack}})}else n("../")},updateLocalData:e=>{a(Na({localData:e}))},resetLocalData:()=>{a(ra({taskGroupById:t.taskGroupState.taskGroupById}))},handleCreateGroup:e=>{a($a(t.localData.newTaskGroupName,e))},assignGroupToTasks:e=>{a(ta(t.localData.selectedTaskIds,e,Oa(t.uiState.groupByKey,e)))},onDeleteTaskGroup:e=>{a(xa(e))},onAddNewTaskToTaskGroup:e=>{if(t.localData.defaultTaskGroupId!=null){const s=oe(v,e);a(X({taskDetailLocalData:s}));const b=q(f,t.uiState.groupByKey==="groupName"?e:t.localData.defaultTaskGroupId),x=F(p.state?.pathnameStackToGoBack,p.pathname);n(b,{state:{pathnameStackToGoBack:x,message:"comingFromTaskListPage"}})}},onDragNDrop:(e,s)=>{a(ja(t.localData.selectedTaskIds.length>0?t.localData.selectedTaskIds:[e],s))},onTaskGroupRename:(e,s)=>{a(Fa(e,s))},onTimeSpentUpdate:(e,s)=>{a(aa({task:e,updates:s}))},onShowToast:e=>{a(Pa(e))},onGroupByFilterChange:e=>{a(ea({uiState:{groupByKey:e}}))},updateTask:(e,s)=>{a(aa({task:e,updates:s}))},onCreateTagClick:(e,s)=>{a(Ua(e,s))},onSubtaskCreation:(e,s)=>{a(wa({...s,parentTaskId:e}))},handleGroupTemplateClick:e=>{a(Y(e,[]))},handleGroupTemplateTaskClick:(e,s)=>{a(Y(e,[s]))},handleNewTaskInitialization:e=>{if(a(X({taskDetailLocalData:{...Ka,name:e}})),t.localData.defaultTaskGroupId!=null){const s=q(f,t.localData.defaultTaskGroupId),b=F(p.state?.pathnameStackToGoBack,p.pathname);n(s,{state:{pathnameStackToGoBack:b,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:e=>{n(`/${f}/tasks/group/${e}`)},onQuickResponsesClick:()=>{n(`/${f}/tasks/quick-responses`)}}}))(Aa);function re(){const a=ma(),t=J(),n=Sa(),c=M.getSignedInUser(),p=M.isZeniUser(),y=H(),f=G((d=>Ba(d))),{taskGroupId:v}=ya(),{useFeatureGate:e}=Da(),{isFeatureEnabled:s}=e(I.isTaskTemplatesEnabled),{isFeatureEnabled:b}=e(I.isTaskCannedResponsesEnabled),{isFeatureEnabled:x}=e(I.isTaskCategorizationEnabled),{isFeatureEnabled:ia}=e(I.isTaskBulkResolutionEnabled),{isFeatureEnabled:la}=e(I.isTaskGroupAssigneesEnabled),{isFeatureEnabled:ua}=e(I.isTaskRecurringParentEnabled),[ca,da]=u.useState(!1),O=G((d=>na(d,s))),$=G((d=>d.taskGroupState)),B=O.fetchState,{isAiCfoAccessEnabled:ka,onAskAiCfoClick:pa}=Ha({mobileExploreReferrer:"Task Checklist"});Ea({isDataReady:B==="Completed"});const{markBoardFetchInFlight:Z,requestTaskRefetch:N}=(function(d){const m=J(),r=H(),T=u.useRef(!1),o=u.useRef(!1),k=u.useRef(!1),g=u.useRef(),l=u.useRef(),S=u.useRef(!1),L=u.useRef(),K=u.useCallback((()=>{L.current=r.getState().taskListState.byTab.live,S.current=!0}),[r]),w=u.useCallback((()=>{K(),m(Ra())}),[m,K]),D=u.useCallback((()=>{g.current=r.getState().taskGroupState.taskGroupById,k.current=!0,m(va())}),[m,r]),E=u.useCallback((()=>{T.current=!1,l.current!=null&&(clearTimeout(l.current),l.current=void 0),w(),k.current||r.getState().taskGroupViewState.fetchState==="In-Progress"?o.current=!0:D()}),[w,D,r]),z=u.useCallback((()=>{S.current?(T.current=!0,l.current==null&&(l.current=setTimeout((()=>{l.current=void 0,T.current&&r.getState().taskListState.fetchState!=="In-Progress"&&(S.current=!1,E())}),6e3))):E()}),[E,r]);u.useEffect((()=>{l.current!=null&&(clearTimeout(l.current),l.current=void 0),T.current=!1,o.current=!1,k.current=!1}),[d]);const h=G((i=>i.taskListState.fetchState)),C=G((i=>i.taskGroupViewState.fetchState)),U=G((i=>i.taskListState.byTab.live)),P=G((i=>i.taskGroupState.taskGroupById));return u.useEffect((()=>{h!=="In-Progress"&&(!S.current||U!==L.current||h==="Error")&&(S.current=!1,T.current&&(h!=="Completed"?h==="Error"&&(T.current=!1,l.current!=null&&(clearTimeout(l.current),l.current=void 0)):E()))}),[h,U,E]),u.useEffect((()=>{C!=="In-Progress"&&(!k.current||P!==g.current||C==="Error")&&(k.current=!1,o.current&&(o.current=!1,C!=="Error"&&D()))}),[C,P,D]),u.useEffect((()=>()=>{l.current!=null&&(clearTimeout(l.current),l.current=void 0)}),[]),{markBoardFetchInFlight:K,requestTaskRefetch:z}})(f?.tenantId);u.useEffect((()=>{y.getState().taskListState.hasValidState()||Z(),t(Q(!1,s))}),[f?.tenantId,t,s,Z,y]);const fa=u.useMemo((()=>{const d=[_.TASK_CREATED,_.TASK_UPDATED,_.TASKS_BULK_UPDATED,_.TASKS_BULK_DELETED],m=[_.TASK_CREATED,_.TASK_UPDATED,_.TASK_SNOOZE_RESURFACED,_.TASKS_BULK_UPDATED];return[...ae(f?.companyId,d),...ee(c?.userId,m)]}),[f?.companyId,c?.userId]);if(Ya({events:fa,onEvent:(d,m)=>{switch(d){case _.TASK_CREATED:case _.TASK_UPDATED:{const r=(T=>{if(T==null||typeof T!="object")return null;const o=T,k=oa(o);if(k==null||typeof o.tenant_id!="string"||typeof o.event_type!="string")return null;const g={task_id:k,tenant_id:o.tenant_id,event_type:o.event_type};return typeof o.is_private=="boolean"&&(g.is_private=o.is_private),j(o.assignees)&&(g.assignees=o.assignees),j(o.direct_assignees)&&(g.direct_assignees=o.direct_assignees),typeof o.created_by=="string"&&(g.created_by=o.created_by),j(o.task_group_ids)&&(g.task_group_ids=o.task_group_ids),typeof o.name=="string"&&(g.name=o.name),typeof o.parent_task_id=="string"&&(g.parent_task_id=o.parent_task_id),g})(m);if(r!=null){const T=y.getState(),o=r.task_id,k=o!=null?T.taskState.taskByID?.[o]:void 0,g=k!=null;if(!p)if(r.is_private===!0){if(!g)return}else{const l=c?.userId,S=new Set([...r.assignees??[],...r.direct_assignees??[]]);if(r.created_by!=null&&r.created_by!==""&&S.add(r.created_by),!(l!=null&&S.has(l))&&!g)return}if(d===_.TASK_UPDATED&&g&&k!=null&&Array.isArray(r.task_group_ids)){const l=new Set(Object.values(T.taskGroupState.taskGroupById??{}).filter((i=>i!=null&&!i.isDeleted)).map((i=>i.id))),S=(k.taskGroupIds??[]).filter((i=>l.has(i))),L=(r.task_group_ids??[]).filter((i=>l.has(i))),K=S.length===L.length&&S.every((i=>L.includes(i))),w=k.taskGroupIds??[],D=r.task_group_ids??[],E=w.length!==D.length||!w.every((i=>D.includes(i))),z=(i,Ta)=>{const V=i??[],W=Ta??[];if(V.length!==W.length)return!1;const ga=new Set(W);return V.every((_a=>ga.has(_a)))},h=r.name==null||r.name===k.name,C=r.is_private==null||r.is_private===k.isPrivate,U=r.assignees==null||z(r.assignees,k.assignees),P=r.direct_assignees==null;if(K&&E&&h&&C&&U&&P)return}}return void N()}case _.TASKS_BULK_DELETED:{const r=te(m);return r==null?void 0:void r.task_ids.forEach((T=>t(Wa(T))))}case _.TASKS_BULK_UPDATED:case _.TASK_SNOOZE_RESURFACED:return void N()}},onSubscribed:()=>{N()}}),u.useEffect((()=>{B==="Completed"&&t(ra({taskGroupById:$.taskGroupById}))}),[B,$.taskGroupById]),c==null)throw Error("Can't access task list page without signing in...");return A.jsxs(A.Fragment,{children:[B==="Completed"?A.jsx(ha,{analytics:Ga,onLoad:d=>(m=>m.trackPageLoaded(Ca.Event.taskListPage))(d)}):null,A.jsxs(se,{children:[A.jsx(Xa,{isAppContentDrawerOpen:ca,handleDrawerToggle:d=>{da(d)}}),A.jsx(ne,{location:n,navigate:a,currentTenant:f,taskGroupId:v,taskGroupState:$,localData:O.localData,uiState:O.uiState,isTaskTemplatesEnabled:s,taskListFetchState:B,isTaskCategorizationEnabled:x,isTaskCannedResponsesEnabled:b,isTaskBulkResolutionEnabled:ia,isTaskGroupAssigneesEnabled:la,isTaskRecurringParentEnabled:ua,isAiCfoAccessEnabled:ka,onAskAiCfoClick:pa})]})]})}const sa=(a,t)=>`/${a}/tasks/${encodeURIComponent(t)}`,q=(a,t)=>`/${a}/tasks/new/${t}`,oe=(a,t)=>{if(a==="assignee"){const n=t.split(",");return{...R.taskDetailLocalData,assignee:n}}if(a==="priority"){const n=Qa(t);return{...R.taskDetailLocalData,priority:n}}if(a==="status"){const n=Za(t);return{...R.taskDetailLocalData,status:n}}if(a==="tag"){const n=t.split(",");return{...R.taskDetailLocalData,tagIds:n}}if(a==="dueDate"){const n=Va(t);return{...R.taskDetailLocalData,dueDate:n}}return{...R.taskDetailLocalData}},me=Object.freeze(Object.defineProperty({__proto__:null,default:re},Symbol.toStringTag,{value:"Module"}));export{_ as T,ee as a,ae as b,_e as c,te as d,re as e,me as f,ge as t};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-oxGmLiGE.js";import Te from"./NotFoundScreen-ngkmWfLO.js";import{a as u}from"./sentry-CYolppN9.js";import{h as ee,u as ae,j as g,g as ge,i as he,N as Ee,l as be,n as De,o as h}from"./core-k1hJbZ6L.js";import{QD as se,QG as Ie,QA as Ce,a35 as Re,fI as te,a36 as ne,R2 as b,QU as E,Qx as _e,Rx as Ge,Rq as ye,a37 as oe,gk as ie,a38 as W,a39 as Ae,Qt as Ue,Qq as ve,v6 as xe,uW as Be,mD as we,QS as je,a3a as Pe,RJ as Fe,QO as Le,Rc as Ke,R9 as Ne,QJ as $e,R6 as Qe,R1 as Oe}from"./zeni-epic-state-C2CKsxzr.js";import{z as D,e7 as Ze,c as qe,p as ze,d as _,a2 as re,l as G,a6 as Ve,k as H,O as Me,e8 as Je,W as X,ac as We}from"./index-Cjqi6Pkt.js";import{n as He}from"./mui-D8QuRJEy.js";import{u as Xe}from"./useInitialThreadRequest-DKk3Gbri.js";import{M as Ye}from"./MobileAppDrawer-D95K9MWM.js";import{T as m,t as ea,b as aa,a as sa,c as ta,d as Y,e as na}from"./TaskListScreen-PbWxRl0T.js";import{u as oa}from"./useTaskManagerPusherEvents-CULNono8.js";import"./recharts-DZG9umMy.js";import"./analytics-BSYXJeF4.js";import"./plaid-CbZCK8Pe.js";import"./dnd-CiTl8J_b.js";import"./stripe-cKAAJElX.js";import"./lottie-DXQhXtqa.js";import"./lexical-YTMAFU1j.js";import"./pdf-QcH92u4w.js";import"./utils-CZxvf1-B.js";import"./InboxNotificationsProvider-Lon_JjZI.js";import"./useTaskManagerAccess-CbR2C9f7.js";import"./useAskAiCfoHostNavButtonProps-BETiKk63.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="5bf3a674-f5b3-4a54-9328-62589138bf7f",e._sentryDebugIdIdentifier="sentry-dbid-5bf3a674-f5b3-4a54-9328-62589138bf7f")}catch{}})();function ia(){const e=ee(),a=ae(),n=D.getSignedInUser(),{cannedResponses:c,fetchState:t,saveFetchState:l}=g((i=>i.cannedResponsesState)),d=u.useCallback((()=>{a(se())}),[a]),S=u.useCallback(((i,I,C)=>{a(Ie({name:i,content:I,cannedResponseId:C}))}),[a]),s=u.useCallback((i=>{a(Ce({cannedResponseId:i}))}),[a]);if(n==null)throw Error("Can't access quick responses page without signing in...");return r.jsx(Ze,{cannedResponses:c,isLoading:t==="In-Progress"||t==="Not-Started",isSaving:l==="In-Progress",onBackClick:()=>e(-1),onDelete:s,onFetch:d,onSave:S})}const K=e=>e?.taskState?.taskByID,F=(e,a)=>{const n=K(e);if(a!=null&&n!=null)return n[a]?.parentTaskId??void 0},ra=Re([F,(e,a)=>{const n=F(e,a),c=K(e);if(n!=null&&c!=null)return c[n]?.name},(e,a)=>{const n=F(e,a),c=K(e);return n!=null&&c!=null&&c[n]!=null}],((e,a,n)=>{if(e!=null&&n===!0)return{id:e,name:a??""}})),ca=be((function(e,a){const{location:n,taskGroupId:c}=a,t=oe(e,a.taskId),l=te(e),d=ra(e,a.taskId),S=t.taskGroupId??c,s=S!=null?W(e.taskGroupState,S):void 0,i=D.getSignedInUser(),I=l.tenantId,C={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:I??""},v=ne(e),{tenantEmailDomain:x}=l,y=t.recurringSourceTaskId,B=y!=null?`${X.appUrl}/${x}/tasks/${encodeURIComponent(y)}`:void 0;return{taskDetailSelectorView:t,authParams:C,isZeniUser:D.isZeniUser(),userGroupList:Ae(e),isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:We.fileMicroServiceBaseUrl,companyName:a.currentTenant.companyName,companyId:a.currentTenant.companyId,currentUrl:`${X.appUrl}${a.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:B,tagListView:v,taskGroupName:S!=null&&s!=null&&s.isDefault===!1?s.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((f=>W(e.taskGroupState,f))).filter((f=>f!=null&&!f.isDeleted)).map((f=>({id:f.id,name:f.name,isDefault:f.isDefault}))),subtasks:t.subtasks,parentTaskRef:d,subTaskCreateStatus:e.taskDetailState?.subTaskCreateStatus?.fetchState}}),(function(e,a){const{taskId:n,navigate:c,currentTenant:t,location:l,taskGroupId:d}=a,{tenantEmailDomain:S}=t;return{onSaveChangesToLocalStore:s=>{e(Oe({taskDetailLocalData:s,taskId:n}))},onSaveDetailClick:s=>{e(Qe(n,s??d))},onArchiveTaskClick:()=>{a.taskId!=null&&e($e(a.taskId))},onSnoozeTask:(s,i)=>{e(Ne(s,i))},onUnsnoozeTask:s=>{e(Ke(s))},onCreateSubtask:(s,i)=>{e(Le({...i,parentTaskId:s}))},onSubtaskUpdate:(s,i)=>{e(Fe({task:s,updates:i}))},onShowToast:s=>{e(ie(s))},onSubtaskRowClick:s=>{c(`/${S}/tasks/${s}`,{state:{pathnameStackToGoBack:G(l.state?.pathnameStackToGoBack,l.pathname)}})},onParentBreadcrumbClick:s=>{c(`/${S}/tasks/${s}`,{state:{pathnameStackToGoBack:G(l.state?.pathnameStackToGoBack,l.pathname)}})},onDismissClick:()=>{if(l.state?.message==="triggerBackClick"){const s=re(l.state?.pathnameStackToGoBack),i=s.poppedPathname??"../../dashboard";c(i,{state:{pathnameStackToGoBack:s.newStack}})}else{const s=U(S),i=G(l.state?.pathnameStackToGoBack,l.pathname);c(s,{state:{pathnameStackToGoBack:i}})}e(Pe({taskId:n}))},onDeleteTaskClick:()=>{e(je(n))},updateFilesEntity:s=>{e(we({files:s}))},onDeleteFile:s=>{e(Be(s))},onEditFileName:(s,i)=>{e(xe(s,i.split(".")[0]))},onReloadTaskDetailPage:()=>{e(b(!1,n))},onCreateTagClick:s=>{e(ve(s,n))},onDeleteTagClick:s=>{e(Ue(s,n))},onFetchCannedResponses:()=>{e(se())},onManageTemplatesClick:()=>{c(`/${t.tenantEmailDomain}/tasks/quick-responses`)}}}))(Je);function L(){const e=ee(),a=ae(),n=ge(),c=qe(),{taskId:t,taskGroupId:l}=he(),d=g((o=>te(o))),S=Xe(d?.companyId),{useFeatureGate:s}=ze(),{isFeatureEnabled:i}=s(_.isTaskSnoozeEnabled),{isFeatureEnabled:I}=s(_.isTaskVisibilityEnabled),{isFeatureEnabled:C}=s(_.isTaskCannedResponsesEnabled),{isFeatureEnabled:v}=s(_.isTaskRecurringParentEnabled),{isFeatureEnabled:x}=s(_.isTaskGroupAssigneesEnabled),[y,B]=u.useState(!1),[f,ce]=u.useState(!1),[N,le]=u.useState(!1),[$,w]=u.useState(!1),R=u.useRef(!1),A=g((o=>o.taskListState.updateTasksFetchState.fetchState)),Q=g((o=>ne(o))),O=g((o=>o.taskGroupViewState.fetchState));u.useEffect((()=>{a(b(!1,t)),t!=null&&a(E(t))}),[a,t]);const Z=D.getSignedInUser()?.userId,de=D.isZeniUser(),ke=g((o=>t!=null?o.taskState.taskByID[t]?.syncToken:void 0)),q=()=>{d?.tenantEmailDomain!=null&&e(U(d.tenantEmailDomain))},z=()=>{a(ie({messageSection:"delete_task",messageText:"success",type:"success"})),q()},ue=u.useMemo((()=>{const o=[m.TASK_CREATED,m.TASK_UPDATED,m.TASKS_BULK_UPDATED,m.TASKS_BULK_DELETED],k=[...o,m.TASK_SNOOZE_RESURFACED];return[...aa(d?.companyId,o),...sa(Z,k)]}),[d?.companyId,Z]);oa({events:ue,onSubscribed:()=>{t!=null&&(a(b(!0,t)),a(E(t)))},onEvent:(o,k)=>{if(t!=null)switch(o){case m.TASK_CREATED:case m.TASK_UPDATED:{const p=((P,me,{isZeniUser:Se,storedSyncToken:fe,taskId:J})=>{if(P!==m.TASK_CREATED&&P!==m.TASK_UPDATED)return"none";const T=ea(me);return T==null?"none":T.parent_task_id===J?"refreshSubtasks":P!==m.TASK_UPDATED||T.task_id!==J?"none":T.is_deleted===!0?"leaveDeleted":T.is_private!==!0||Se?T.sync_token!=null&&T.sync_token===fe?"none":"refreshTask":"leaveNoAccess"})(o,k,{isZeniUser:de,storedSyncToken:ke,taskId:t});p==="refreshTask"?(a(b(!0,t)),a(E(t))):p==="refreshSubtasks"?a(E(t)):p==="leaveDeleted"?z():p==="leaveNoAccess"&&q();break}case m.TASKS_BULK_UPDATED:{const p=Y(k);if(p==null)break;p.task_ids.includes(t)&&a(b(!0,t)),a(E(t));break}case m.TASKS_BULK_DELETED:{const p=Y(k);if(p==null)break;if(p.task_ids.includes(t)){z();break}a(E(t));break}case m.TASK_SNOOZE_RESURFACED:{ta(k)?.task_id===t&&a(b(!0,t));break}}}}),u.useEffect((()=>{f||Q.fetchState==="Completed"||(ce(!0),a(_e()))}),[f,a,Q.fetchState]),u.useEffect((()=>{N||O==="Completed"||(le(!0),a(Ge()))}),[N,a,O]);const pe=u.useCallback((()=>{t!=null&&(R.current=!1,a(ye([t],null,{isArchived:!1})),w(!0))}),[a,t]);u.useEffect((()=>{if($)if(A!=="In-Progress"){if(R.current){if(A==="Error")return w(!1),void(R.current=!1);if(A==="Completed"){w(!1),R.current=!1;const{tenantEmailDomain:o}=d;if(n.state?.message==="triggerBackClick"){const k=re(n.state?.pathnameStackToGoBack);e(k.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:k.newStack}})}else{const k=U(o);e(k,{state:{pathnameStackToGoBack:G(n.state?.pathnameStackToGoBack,n.pathname)}})}}}}else R.current=!0}),[$,A,d,n,e]);const V=g((o=>oe(o,t))),j=V.fetchState,M=D.getSignedInUser();if(M==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&V.error?.code===400){const{tenantEmailDomain:o}=d,k=U(o),p=G(n.state?.pathnameStackToGoBack,n.pathname);return r.jsx(Ee,{to:k,state:{pathnameStackToGoBack:p}})}return r.jsxs(r.Fragment,{children:[j==="Completed"?r.jsx(Ve,{analytics:H,onLoad:o=>(k=>k.trackPageLoaded(Me.Event.taskDetailPage))(o)}):null,r.jsxs(la,{children:[r.jsx(Ye,{isAppContentDrawerOpen:y,handleDrawerToggle:o=>{B(o)}}),r.jsx(ca,{analytics:H,currentTenant:d,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:S,location:n,loggedInUser:M,navigate:e,taskGroupId:l,taskId:t,taskDetailFetchState:j,onUnarchiveTaskClick:pe,isTaskSnoozeEnabled:i,isTaskVisibilityEnabled:I,isTaskCannedResponsesEnabled:C,isTaskRecurringParentEnabled:v,isTaskGroupAssigneesEnabled:x})]})]})}const la=He.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,U=e=>`/${e}/tasks`;function Ba(){return r.jsxs(De,{children:[r.jsx(h,{path:"/new",element:r.jsx(L,{})}),r.jsx(h,{path:"/new/:taskGroupId",element:r.jsx(L,{})}),r.jsx(h,{path:"/group/:taskGroupId",element:r.jsx(na,{})}),r.jsx(h,{path:"/quick-responses",element:r.jsx(ia,{})}),r.jsx(h,{path:"/:taskId",element:r.jsx(L,{})}),r.jsx(h,{path:"*",element:r.jsx(Te,{})})]})}export{Ba as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as c}from"./liveblocks-oxGmLiGE.js";import B from"./NotFoundScreen-ngkmWfLO.js";import{a as n}from"./sentry-CYolppN9.js";import{u as ft,h as yt,g as bt,i as St,j as o,n as ht,o as f}from"./core-k1hJbZ6L.js";import{fI as It,gZ as Lt,m3 as Tt,ul as jt,XR as Ct,XG as Et,XS as gt,S2 as At,S3 as kt,i3 as L,m1 as vt,um as xt,RU as Dt,St as Rt,XT as _t,XU as Nt,R$ as Xt,RY as wt,XV as Ft,XW as Mt,XX as Ut}from"./zeni-epic-state-C2CKsxzr.js";import{p as zt,V as Ht,d as H,b0 as Pt,z as qt,g as Vt,b1 as Bt,k as P,b2 as Gt,ac as $t,G as Ot}from"./index-Cjqi6Pkt.js";import"./mui-D8QuRJEy.js";import{d as Yt}from"./decodeURIComponentSafe-CKsYKxPJ.js";import{u as Zt}from"./useEnsureVendorListLoaded-CbkO2307.js";import{u as Wt,T}from"./TransactionDetailScreen-CUF4XJ-a.js";import{c as Jt}from"./routePaths-BQiUfv8Y.js";import"./recharts-DZG9umMy.js";import"./analytics-BSYXJeF4.js";import"./plaid-CbZCK8Pe.js";import"./dnd-CiTl8J_b.js";import"./stripe-cKAAJElX.js";import"./lottie-DXQhXtqa.js";import"./lexical-YTMAFU1j.js";import"./pdf-QcH92u4w.js";import"./utils-CZxvf1-B.js";import"./useAskAiCfoHostNavButtonProps-BETiKk63.js";import"./useInitialThreadRequest-DKk3Gbri.js";import"./expenseAutomationHelper-BfCR3sLm.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="0a6f0b63-baee-4af4-bf81-4c4d9ad766a4",e._sentryDebugIdIdentifier="sentry-dbid-0a6f0b63-baee-4af4-bf81-4c4d9ad766a4")}catch{}})();const Kt=["bank","credit_card","other_current_assets"],q=e=>`/${e}/month_end_close_checks/review/transaction_categorization`,{common:{currency:V}}=Ot.getLocalizedStrings();function Qt(){const e=ft(),d=yt(),m=bt(),{tenantEmailDomain:u,transactionTypeEncoded:G}=St(),{useFeatureGate:j}=zt(),$=Ht(),{isFeatureEnabled:O}=j(H.isCreateTransactionEnabled),{isFeatureEnabled:C}=j(H.isProjectsTransactionsEnabled),Y=Yt(G??""),a=Ut.find((t=>t===Y)),S=o((t=>It(t))),E=Pt(S.companyId,a),g=o((t=>Lt(t.companyState,S.companyId)?.company.companyLocaleInfo)),Z=g?.currencyCode??V.currencyCode,W=g?.currencySymbol??V.currencySymbol,A=o((t=>t.tenantState.currentTenantId)),k=qt.getSignedInUser(),v=k?.userId??"",x=k?.zeniSessionId??"",J=n.useMemo((()=>({userId:v,sessionId:x,tenantId:A??""})),[v,x,A]),K=o((t=>Tt(t))),D=o((t=>jt(t))),R=D&&C===!0,h=o((t=>t.projectListState)),_=o((t=>t.projectState)),Q=n.useMemo((()=>Ct(_,h).projects),[_,h]),I=o((t=>Et(t,"common"))),N=o((t=>t.accountListState.byReportId.accountList.fetchState)),X=o((t=>t.accountListState.byReportId.createTransactionLineAccountList.fetchState)),w=o((t=>t.accountListState.byReportId.createTransactionPaymentAccountList.fetchState)),F=o((t=>t.classListState.fetchState)),s=o((t=>a!=null?gt(t,a):void 0));n.useEffect((()=>{if(a!=null)return e(At(a)),()=>{e(kt(a))}}),[e,a]);const tt=Vt(),et=o((t=>{const{activeTenantFetchState:i,currentTenantId:b,fetchState:mt,tenantsById:pt}=t.tenantState;return b!=null&&pt[b]!=null&&(i.fetchState==="Completed"||mt==="Completed")})),r=tt&&et;n.useEffect((()=>{r&&a==="transfer"&&N==="Not-Started"&&e(L("accountList"))}),[e,r,a,N]),n.useEffect((()=>{r&&X==="Not-Started"&&e(L("createTransactionLineAccountList"))}),[e,r,X]),n.useEffect((()=>{r&&w==="Not-Started"&&e(L("createTransactionPaymentAccountList",!1,!1,!1,!1,Kt))}),[e,r,w]),n.useEffect((()=>{r&&F==="Not-Started"&&e(vt())}),[e,r,F]);const M=h.fetchState;n.useEffect((()=>{r&&R&&M==="Not-Started"&&e(xt())}),[e,r,R,M]),Zt(r),Wt(r&&a==="transfer",!1);const at=n.useCallback(((t,i=[])=>{if(i.length>0&&e(Dt(i)),u==null)return;const b=Bt(m.state)??[q(u)];d(Jt(t,u),{replace:!0,state:{pathnameStackToGoBack:b}})}),[e,u,d,m.state]),nt=n.useCallback((()=>{m.key==="default"?u!=null&&d(q(u)):d(-1)}),[m.key,d,u]),ot=n.useCallback((t=>{e(Rt(t))}),[e]),U=n.useRef(void 0),p=s?.createStatus.error;n.useEffect((()=>{if(a==null||p==null)return;const t=`${p.code??""}-${p.message??""}`;U.current!==t&&(U.current=t,P.trackCreateTransactionFailed({transactionType:a,errorCode:p.code}))}),[p,a]);const y=n.useCallback((t=>t),[]),l=n.useMemo((()=>(s?.vendorList??[]).filter((t=>!t.isDeleted)).sort(((t,i)=>t.name.localeCompare(i.name)))),[s?.vendorList]),z=s?.localData.vendorId,st=n.useMemo((()=>{const t=l.find((i=>i.id===z));if(t!=null)return t.qboId!==""&&t.qboId!==t.name?t.qboId:t.name}),[l,z]),ct=o((t=>_t(t,st))),rt=n.useMemo((()=>y(l.map((t=>({id:t.id,label:t.name}))))),[l,y]),it=n.useMemo((()=>({...I,vendor:[...l.map((t=>({id:t.id,name:t.name,qboId:t.qboId,type:"vendor",zeniId:t.id}))),...I.vendor]})),[I,l]),dt=n.useMemo((()=>y((s?.transferAccountsList??[]).map((t=>({id:t.accountId,label:t.accountName}))))),[s?.transferAccountsList,y]),ut=n.useCallback((t=>{a!=null&&e(Nt(a,t))}),[e,a]),lt=n.useCallback(((t,i)=>{a!=null&&e(Xt(a,i,t))}),[e,a]);return E==null?null:a!=null&&s!=null&&O===!0&&E&&$?.connectionName!=="netsuite"?c.jsx(Gt,{analytics:P,attachmentUploadEndpoint:$t.accountMicroServiceBaseUrl,authParams:J,createdTransactionId:s.createdTransactionId,transactionType:a,localData:s.localData,createStatus:s.createStatus,accountsHierarchyList:s.accountListNestedAccountHierarchy,paymentAccountsHierarchyList:s.paymentAccountListNestedAccountHierarchy,classHierarchyList:s.classListNestedAccountHierarchy,vendorOptions:rt,transferAccountOptions:dt,isAccountingClassesEnabled:K,isAccountingProjectsEnabled:D,isProjectsTransactionsEnabled:C===!0,projects:Q,currencyCode:Z,currencySymbol:W,bookCloseDate:S.bookCloseDate?.toDate(),entityAutoCompleteView:it,vendorRecommendationFetchState:ct.fetchState,onUpdateLocalData:ut,onAddLine:()=>e(Mt(a)),onRemoveLine:t=>e(Ft(a,t)),onSubmit:()=>e(wt(a)),onCancel:nt,onCreateTransactionComplete:at,onUploadAttachmentAttachment:ot,onFetchRecommendationsForVendor:lt}):c.jsx(B,{})}function Ce(){return c.jsxs(ht,{children:[c.jsx(f,{path:"/new/:transactionTypeEncoded",element:c.jsx(Qt,{})}),c.jsx(f,{path:"/:transactionTypeEncoded/:transactionId",element:c.jsx(T,{})}),c.jsx(f,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:c.jsx(B,{})}),c.jsx(f,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:c.jsx(T,{})}),c.jsx(f,{path:"/*",element:c.jsx(T,{})})]})}export{Ce as default};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{j as _}from"./liveblocks-oxGmLiGE.js";import{a as i}from"./sentry-CYolppN9.js";import{u as j,k as st,j as g,s as ge,g as Ee,h as Ce,i as Ae,N as ct,l as it}from"./core-k1hJbZ6L.js";import{pD as Ie,fI as te,gZ as rt,Vv as lt,oJ as dt,of as ut,E4 as J,XY as mt,gk as pt,bn as ft,dh as _e,bq as Re,t1 as q,WD as W,XZ as we,X_ as le,X1 as Pe,me as Fe,X$ as Ue,X6 as de,X7 as ue,n3 as xe,S$ as me,XH as M,m8 as Le,m6 as Ve,mi as ht,pq as St,Y0 as yt,Y1 as Tt,DX as K,md as Be,Sk as Oe,co as bt,dn as gt,Y2 as It,XG as vt,Y3 as kt,Y4 as Dt,Y5 as Et,Y6 as Ct,DT as At,Y7 as _t,Y8 as Rt,Y9 as wt,Ya as Pt,Yb as Ft,mh as Ut,Yc as xt,Yd as Lt,XI as Vt,Ye as Bt,Yf as Ot,Yg as Nt,Se as zt,S4 as Yt,St as jt,mj as Gt,T0 as ve,pv as Mt}from"./zeni-epic-state-C2CKsxzr.js";import{p as H,d as w,k as $,b3 as $t,z as Ne,$ as Xt,b4 as qt,a9 as Wt,a2 as ie,V as Ht,b5 as Zt,l as re,aq as Jt,b6 as Kt,b7 as Qt,b8 as en,ac as tn,at as ce}from"./index-Cjqi6Pkt.js";import{n as nn,S as an,u as on,D as sn}from"./mui-D8QuRJEy.js";import{u as cn}from"./useAskAiCfoHostNavButtonProps-BETiKk63.js";import{d as ze}from"./decodeURIComponentSafe-CKsYKxPJ.js";import{u as rn}from"./useInitialThreadRequest-DKk3Gbri.js";import{h as Ye,c as je,g as ln,e as dn}from"./routePaths-BQiUfv8Y.js";import{u as un}from"./expenseAutomationHelper-BfCR3sLm.js";import{A as mn}from"./utils-CZxvf1-B.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="f8f37632-9be2-485d-a407-f670180b5ba3",t._sentryDebugIdIdentifier="sentry-dbid-f8f37632-9be2-485d-a407-f670180b5ba3")}catch{}})();function pn(t=!0,e=!0){const o=j(),n=st(),{useFeatureGate:a}=H(),{isFeatureEnabled:s}=a(w.isCreateTransferEntryFromExpenseEnabled);i.useEffect((()=>{if(!t||e&&s!==!0)return;const c=d=>{const f=n.getState().createTransferEntryState.transferAccountsByType[d].fetchState;return f!=="In-Progress"&&f!=="Completed"};c("transferEntryEligible")&&o(Ie({kind:"transferEntryEligible"})),c("creditCardOnlyEligible")&&o(Ie({kind:"creditCardOnlyEligible"}))}),[t,e,s,o,n])}function fn(t,e){const o=(function(){const d=j(),[f,h]=i.useState(!1),[E,p]=i.useState(null),[l,u]=i.useState(null),{useDynamicConfig:y}=H(),{configValue:v,isDynamicConfigLoading:S}=y("transaction_categorization_config"),T=!S&&v?.capitalization_enabled===!0,D=g((I=>te(I))),C=D.companyId,P=g((I=>rt(I.companyState,D.companyId)?.company.companyLocaleInfo?.currencySymbol??"$")),{capitalizableAccounts:A,capitalizableAccountOverrides:F,dismissedAccounts:U}=g((I=>{const b=I.tenantState.currentTenantId,R=b!=null?I.tenantState.tenantsById[b]:void 0;return{capitalizableAccounts:R?.capitalizableAccounts??null,capitalizableAccountOverrides:R?.capitalizableAccountOverrides??null,dismissedAccounts:R?.capitalizationOnboardingDismissedAccounts??null}}),ge),V=i.useRef(A);V.current=A;const x=i.useRef(F);x.current=F;const B=i.useRef(U);B.current=U;const O=g((I=>lt(I.accountState)),ge),G=i.useMemo((()=>{const I={};for(const b of O)b.accountId!=null&&b.accountName!=null&&(I[b.accountId]=b.accountName);return I}),[O]),X=l!=null?G[l]??null:null,N=i.useCallback((I=>{if(!T)return;const b=V.current;if(b==null)return;const R=b.accounts??[],Z=new Set(I),ne=x.current??{},ae=B.current;for(const z of R)if(Z.has(z.accountId)&&ne[z.accountId]==null&&ae?.[z.accountId]==null)return p(z.classificationType),u(z.accountId),void h(!0)}),[T]),k=i.useCallback(((I,b)=>{d(dt(C,I,b,!0)),h(!1),p(null),u(null)}),[d,C]),r=i.useCallback((()=>{l!=null&&(d(ut(C,l)),h(!1),p(null),u(null))}),[d,C,l]);return{showPopup:f&&T,popupType:E,popupAccountId:l,popupAccountName:X,currencySymbol:P,checkAndShowPopup:N,handleSubmit:k,handleDismiss:r}})(),n=i.useRef(void 0),a=i.useRef([]),s=i.useRef(o.checkAndShowPopup);s.current=o.checkAndShowPopup;const c=i.useRef(e);return c.current=e,i.useEffect((()=>{t==="In-Progress"&&(a.current=c.current()),t==="Completed"&&n.current==="In-Progress"&&a.current.length>0&&(s.current(a.current),a.current=[]),n.current=t}),[t]),o}const Y=new Map,Ge=(t,e,o)=>`${t}|${e??""}|${o}`,Q=(t,e)=>{const[o,n]=t.shownRecommendations;return{recommendationFor:t.dimension,recommendation:o?.name??"",recommendationSource:o?.engine??null,recommendationConfidencePercentage:o?.confidencePercentage??null,alternativeRecommendation:n?.name??null,alternativeRecommendationSource:n?.engine??null,alternativeRecommendationConfidencePercentage:n?.confidencePercentage??null,selectedValue:t.selected.name,numberOfRecommendations:t.shownRecommendations.length,transactionId:e,lineId:t.lineId??null}},ee=(t,e,o)=>({transactionId:e,lineId:t.lineId,dimension:t.dimension,outcome:t.outcome,selected:{name:t.selected.name,id:t.selected.id},matchedSource:t.matchedSource,matchedRank:t.matchedRank,topPickSource:t.topPickSource,shownRecommendations:t.shownRecommendations.map((n=>({source:n.source,rank:n.rank,value:{name:n.name,id:n.id},confidence:n.confidencePercentage!=null?n.confidencePercentage/100:void 0}))),...o}),ke=(t,e)=>{Y.set(Ge(e,t.lineId,t.dimension),{feedback:t,transactionId:e})},Me=(t,e,o)=>{$.trackRecommendationFeedbackRetracted(Q(e,o)),t(J(ee(e,o,{outcome:"retracted"})))},Bn=(t,e)=>{const o=new Set(e.map(String));Y.forEach(((n,a)=>{o.has(n.transactionId)&&(Y.delete(a),Me(t,n.feedback,n.transactionId))}))},On=t=>{const e=new Set(t.map(String));Y.forEach(((o,n)=>{e.has(o.transactionId)&&Y.delete(n)}))};function hn(t){const e=j(),[o,n]=i.useState(null),[a,s]=i.useState(!1),{fetchState:c}=g(mt),{isEnabled:d,fallbackTransactionId:f}=t,h=i.useCallback((u=>u.transactionId??f??""),[f]),E=i.useCallback((u=>{if(!d)return;const y=h(u);if(y==="")return;if(u.outcome!=="accepted")return void n(u);((S,T,D,C)=>{const P=Ge(T,D,C),A=Y.get(P);return A!=null&&(Y.delete(P),Me(S,A.feedback,A.transactionId),!0)})(e,y,u.lineId,u.dimension)||(((S,T)=>{$.trackRecommendationAccepted(Q(S,T))})(u,y),e(J(ee(u,y,{}))))}),[d,h,e]),p=i.useCallback((u=>{if(o==null)return;const y=h(o);((v,S,T)=>{$.trackRecommendationFeedbackSubmitted({...Q(v,S),feedbackReason:T})})(o,y,u),e(J(ee(o,y,{reasonText:u,skipped:!1}))),ke(o,y),s(!0)}),[o,h,e]),l=i.useCallback((()=>{if(o==null)return;const u=h(o);((y,v)=>{$.trackRecommendationFeedbackSkipped(Q(y,v))})(o,u),e(J(ee(o,u,{skipped:!0}))),ke(o,u),s(!1),n(null)}),[o,h,e]);return i.useEffect((()=>{if(!a||c!=="Completed"&&c!=="Error")return;s(!1),n(null);const u=c==="Completed";e(pt({messageSection:"recommendation_feedback",messageText:u?"success":"failed",type:u?"success":"error",showStatusIcon:!0}))}),[a,c,e]),{onRecommendationSelection:E,popup:o!=null?_.jsx($t,{feedback:o,submitState:a?c:"Not-Started",onSubmit:p,onSkip:l}):null}}const pe=()=>{const t=Ne.getSignedInUser(),{useFeatureGate:e}=H(),{isFeatureEnabled:o}=e(w.isChainOfThoughtEnabled);return i.useMemo((()=>ft(t)&&o),[t,o])};function $e(t){if(t!=null){if("customer"in t&&t.customer!=null){const{customer:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in t&&t.vendor!=null){const{vendor:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Nn(t,e){const o=j(),{useFeatureGate:n}=H(),a=g((r=>te(r))),s=a.userRole.includes("charge_card_user")||a.userRole.includes("charge_card_admin"),c=a.userRole!=null&&_e(a.userRole),d=a.userRole!=null&&Re(a.userRole),{isFeatureEnabled:f}=n(w.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:h}=n(w.isExpenseAutomationEnabled),E=pe(),p=i.useMemo((()=>({id:t,type:q(e)})),[t,e]),l=g((r=>W(r,p))),u=l?.transactionDetailUpdateStatus?.fetchState,y=l?.transactionDetailLocalData?.lineItemById,v=g((r=>{const I=W(r,p)?.transactionDetailLocalData.vendorUpdates?.id;return I==null?"Not-Started":r.transactionVendorViewState.editVendorStateById[I]?.saveStatus.fetchState??"Not-Started"})),S=i.useMemo((()=>l?.fetchState==="Completed"?$e(l?.transaction):void 0),[l?.fetchState,l?.transaction]),T=g((r=>{if(S!=null)return we(r.customerIncomeState,r.vendorExpenseState,r.trendState,S,"month")})),D=g((r=>le(r))),C=g((r=>{if(S!=null)return Pe(r.trendWithTransactionsState,S,"TransactionDetail")})),P=a.company?.companyInfo.firstMonthOfFY??1,A=g((r=>Fe(r.accountState,r.accountListState,"accountList"))),[F,U]=i.useState(!1),[V,x]=i.useState(!1),[B,O]=i.useState(!1);i.useEffect((()=>{U(!1),x(!1),O(!1)}),[t,e]);const G=i.useCallback((()=>{U(!1),x(!1)}),[]),[X,N]=i.useState(!1),k=C?.selectedPeriod?.timePeriod;return i.useEffect((()=>{B||l==null||l.transaction==null||(o(Ue({id:l.transaction.id,type:l.transaction.type})),O(!0)),S!=null&&(!s||c&&d===!1)&&(F?V||T==null||(x(!0),o(me(S,"TransactionDetail",{timeframe:"month",timePeriod:k??T}))):(o(de()),o(ue()),U(!0),o(xe(S))))}),[o,B,l?.fetchState,l?.transaction,S,s,c,d,F,V,T,k]),i.useEffect((()=>{D.newVendorState?.vendorDetailLocalData?.vendorName!=null?N(!0):N(!1)}),[D.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{o(M("common"))}),[o]),{currentTenant:a,loggedInUserHasCardUserOrAdminRole:s,isUserHasDashboardAccess:c,isUserHasInvestorOrBankerAccess:d,isVendorBulkUpdateOnTransactionEnabled:f,isExpenseAutomationEnabled:h,isChainOfThoughtEnabled:E,selectedTransaction:p,transactionDetail:l,rawDetailSaveStatus:u,rawDetailLineItemById:y,vendorSaveStatus:v,tranEntity:S,defaultTrendTransactionTimePeriod:T,vendorViewDetails:D,uiState:C,firstMonthOfFY:P,uncategorizedAccounts:A,resetTrendIsFetchedStates:G,isCreateVendorDrawerOpen:X,setIsCreateVendorDrawerOpen:N}}const Sn={overlayWidth:new Wt(100,100,58)},yn=({isOpen:t,onSaveVendor:e,onSaveSuccess:o,onCancel:n,vendorViewDetails:a})=>{const s=on(),c=Xt(),d=j(),f=g((p=>le(p))),h=()=>{n()},E={vendorDetailView:a??f,onSaveSuccess:()=>{d(Ve()),d(ht("Not-Started")),o()},onSaveVendor:e,onCancelClick:h,saveVendorDetailLocalData:p=>{d(Le({vendorId:void 0,localData:p}))}};return _.jsx(sn,{anchor:"right",open:t,PaperProps:{style:{width:Sn.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.4,cursor:"pointer"}}},onClose:h,children:_.jsx(Tn,{onClick:p=>p.stopPropagation(),children:_.jsx(qt,{...E})})})},Tn=nn(an)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`;function bn(t,e){t(St({transactionId:e.transactionId,creditAccountIntegrationId:e.creditAccountIntegrationId,debitAccountIntegrationId:e.debitAccountIntegrationId,memo:e.memo,transactionType:q(e.transactionType),sourceTransactionType:q(e.sourceTransactionType)}))}function gn({currentTransactionId:t,enabled:e=!0,buildPath:o,beforeNavigate:n,navigate:a,navigateState:s}){const c=g((f=>f.createTransferEntryState.lastTransferEntryReplacement)),d=i.useRef(null);i.useEffect((()=>{if(!e||c==null||t==null||d.current===c)return;const{previousTransactionId:f,newTransactionId:h}=c;t.id===f.id&&t.type===f.type&&(d.current=c,n?.(),a(o(h),{replace:!0,state:s}))}),[e,c,t,o,n,a,s])}const In=({closeDrawerHandler:t,overrideTransactionId:e,overrideTransactionType:o})=>{const n=Ee(),a=Ce(),s=j(),c=pe(),{transactionTypeEncoded:d,transactionId:f}=Ae(),h=e??f,E=o??ze(d??"");let p;Ye(h,E)&&(p={id:h,type:q(E)});const l=p!=null?g((y=>W(y,p))):void 0,u=()=>{const y=ie(n.state?.pathnameStackToGoBack),v=y.poppedPathname??((S=2)=>{let T="../";for(let D=0;D<S;D++)T=`${T}../`;return T})(1);a(v,{state:{pathnameStackToGoBack:y.newStack}})};return{transactionId:p,onSaveVendor:()=>{s(Be(p,void 0))},onSaveSuccess:()=>{if(l!=null&&l?.transaction&&l?.transactionDetailLocalData.vendorUpdates?.qboId!=null&&l?.transactionDetailLocalData.vendorUpdates?.id!=null){const y=l?.transactionDetailLocalData.vendorUpdates,v={id:l?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:l?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:y?.name,qboId:l?.transactionDetailLocalData.vendorUpdates?.qboId??""},S={transactionId:{id:l?.transaction?.id,type:l?.transaction?.type},transaction:l?.transaction,lineIds:l?.transaction?.lines?.map((T=>T.id))??[]};s(K({entity:v,amount:l?.transaction?.amount.amount,transactionDetails:S,flowType:"detail",isFetchCOT:c}))}u()},onCancel:()=>{p!=null&&s(yt({transactionId:p})),s(Ve()),s(Tt()),t(!0),u()}}},vn=it((function(t,e){const o=W(t,e.selectedTransaction);let n;o==null&&console.warn("Check if the you've selected the transaction before getting the details");const a=Ne.getSignedInUser(),s=t.tenantState.currentTenantId,c={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:s??""};o!=null&&o.fetchState==="Completed"&&o.transaction!=null&&e.entity!=null&&(n=It(t,e.entity,"TransactionDetail"));const d=t.entityAutoCompleteState.autoCompleteText.common,f=vt(t,"common"),h=te(t);return{transactionDetail:o,transactionAttachmentEndpointToDownload:`${ce}/transaction_attachment`,transactionAttachmentsEndpointToFetch:h.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${ce}/transaction_attachments_accounting_provider`:`${ce}/transaction_attachments`,attachmentUploadEndpoint:`${tn.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:c,trendReport:n,analytics:$,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:d,entityAutoCompleteView:f},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails"),isTransactionSplitEditMode:o?.transactionDetailLocalData?.editMode??!1}}),(function(t,e){const{isCOTEnabled:o}=e;return{onBackClick:()=>{if(t(M("common")),e.onBackClick!=null)return void e.onBackClick();const n=ie(e.location.state?.pathnameStackToGoBack),a=n.poppedPathname??Xe(2);e.navigate(a,{state:{pathnameStackToGoBack:n.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(n,a)=>{e.transaction!=null&&t(Mt({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:n,customerId:a}))},onTransactionClick:n=>{e.resetTrendIsFetchedStates(),t(de()),t(ue());const a=re(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(je(n,e.tenantEmailDomain),{state:{pathnameStackToGoBack:a}})},onTrendSelectedPeriodChange:n=>{if(n==null)e.defaultTrendTransactionTimePeriod!=null&&t(ve(e.entity,"TransactionDetail",{timeframe:"month",timePeriod:e.defaultTrendTransactionTimePeriod}));else{const a=n.currentTimePeriod==null?n.addTimePeriod:{startDate:n.addTimePeriod.startDate,endDate:n.currentTimePeriod.endDate};t(me(e.entity,"TransactionDetail",{timeframe:n.timeframe,timePeriod:n.addTimePeriod})),t(ve(e.entity,"TransactionDetail",{timeframe:n.timeframe,timePeriod:a}))}},onSaveUpdates:(n,a,s,c)=>{t(c===!0&&s!=null?Be(n,s,!0,e.isExpenseAutomationEnabled):Gt({transactionId:n,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:a})),t(M("common"))},onUploadAttachmentAttachment:n=>{t(jt(n))},onDeleteAttachment:n=>{e.transaction!=null&&t(Yt(n,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(n,a)=>{t(zt({transactionId:n,transactionLocalData:a}))},onUpdateAllChecked:(n,a,s,c)=>{e.transaction!=null&&t(Nt(e.selectedTransaction,e.transaction,n,a,s,c))},onResetLineItemsCategoryClassInLocalData:(n,a,s,c,d,f)=>{t(Ot(n,a,s,c,d,f))},onChangeCategoryClassWhenUpdateAllIsChecked:(n,a)=>{e.transaction!=null&&t(Bt({id:e.transaction.id,type:e.transaction.type},e.transaction,n,a))},onSaveSuccess:()=>{const n=ie(e.location.state?.pathnameStackToGoBack);if(n.poppedPathname!=null){const a=mn(n.poppedPathname,"/").split("/"),s=a[a.length-1];if(["uncategorized-income","uncategorized-expense","missing-receipts"].includes(s)&&e.navigate(n.poppedPathname,{state:{pathnameStackToGoBack:n.newStack}}),e.location.state?.message==="comingFromScheduleDetails"){const c=`${ln(e.tenantEmailDomain)}`;e.navigate(c)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const c=`${dn(e.tenantEmailDomain)}`;e.navigate(c)}}},onPageRefresh:()=>{t(Oe(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(n,a)=>{n.trim().length>=2?t(Vt({searchString:n,entityType:a,searchOrigin:"common"})):n.trim().length===0&&t(M("common"))},onCancelAutoComplete:()=>{t(M("common"))}},onFetchRecommendationsForEntity:(n,a,s,c)=>{t(K({entity:n,amount:a,transactionDetails:s,flowType:"detail",isBulkFetch:c,isFetchCOT:o}))},clearRecommendationForLineId:n=>{const{transactionId:a,transaction:s,lineId:c}=n;t(Lt(a,s,c))},resetUpdateErrorState:()=>{const n={id:e.selectedTransaction.id,type:e.selectedTransaction.type};t(xt(n))},onSaveVendorInLocalData:(n,a,s,c,d)=>{if(t(Ut({transactionId:n,vendorUpdates:a,entity:s})),a.id!=null&&s!=null&&c!=null&&d!=null&&t(K({entity:s,amount:c,transactionDetails:d,flowType:"detail",isFetchCOT:o})),t(Le({vendorId:a.id?a.id:void 0,localData:{vendorName:a.name,vendorId:a.id?a.id:void 0}})),!a.id&&e.transaction!=null){const f=e.transaction,h=re(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(f.type??"")}/${f.id}/vendor/create`,{state:{pathnameStackToGoBack:h}})}},onSaveCustomerInLocalData:(n,a,s,c,d)=>{t(Ft({transactionId:n,customerUpdates:a,entity:s})),a.id!=null&&s!=null&&c!=null&&d!=null&&t(K({entity:s,amount:c,transactionDetails:d,flowType:"detail",isFetchCOT:o}))},onUpdateAllTranactionsWithCurrentVendorChecked:n=>{t(Pt({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:n}))},onClickUpdateVendorToAllLineItems:(n,a,s)=>{t(wt(n,a,s))},onResetVendorToAllLineItems:(n,a,s)=>{t(Rt(n,a,s))},saveLatestSelectedEntity:(n,a,s)=>{t(_t({transactionId:n,lineId:a,entity:s}))},updateVendorBulkRecommendationsFetchStatus:(n,a)=>{t(At(n,a))},setIsVendorUpdateAllChecked:(n,a,s)=>{t(Ct(n,a,s))},onCreateTransferEntry:e.isCreateTransferEntryFromExpenseEnabled===!0?n=>bn(t,n):void 0,onLineAdd:()=>{if(e.transaction==null)return;const n={id:e.transaction.id,type:e.transaction.type},a=e.transaction.type==="journal_entry",s=e.transaction.amount?.currencyCode??"",c=e.transaction.amount?.currencySymbol??"",d=a?{amount:{amount:0,currencyCode:s,currencySymbol:c},id:crypto.randomUUID(),isCategoryMiscategorized:!1,isClassMiscategorized:!1,lineDescription:"",platformLineDetailType:"journal_entry_line_detail",type:"journal_entry_transaction_line",postingType:void 0,postingTypeName:"",lineTransactionType:"journal_entry"}:{amount:{amount:0,currencyCode:s,currencySymbol:c},id:crypto.randomUUID(),isCategoryMiscategorized:!1,isClassMiscategorized:!1,lineDescription:"",platformLineDetailType:"account_based_expense_line_detail",type:"transaction_with_account_and_class_line"};t(Et(n,d))},onLineDelete:n=>{if(e.transaction==null)return;const a={id:e.transaction.id,type:e.transaction.type};t(Dt(a,n))},onToggleSplitEditMode:n=>{if(e.transaction==null)return;const a={id:e.transaction.id,type:e.transaction.type};t(kt(a,n))}}}))(en);function zn(){const t=Ce(),e=j(),o=Ee(),{useFeatureGate:n}=H(),a=Ht(),s=g((m=>te(m))),c=s.userRole.includes("charge_card_user")||s.userRole.includes("charge_card_admin"),d=s.userRole!=null&&_e(s.userRole),f=s.userRole!=null&&Re(s.userRole),{isFeatureEnabled:h}=n(w.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:E}=n(w.isExpenseAutomationEnabled),{tenantEmailDomain:p,transactionTypeEncoded:l,transactionId:u}=Ae(),[y,v]=i.useState(!1),S=ze(l??""),T=Ye(u,S),D=g((m=>m.transactionVendorViewState)),C=pe(),{isFeatureEnabled:P}=n(w.isRecommendationFeedbackEnabled),A=Zt(),{onRecommendationSelection:F,popup:U}=hn({isEnabled:P,fallbackTransactionId:u}),V=i.useMemo((()=>({...A,onRecommendationSelection:F})),[A,F]),{isFeatureEnabled:x}=n(w.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:B}=n(w.isProjectsTransactionsEnabled),{isFeatureEnabled:O}=n(w.isTransactionSplitEnabled),G=a?.currentTenant?.companyId,X=a?.currentTenant?.companyName,N=rn(G),k=i.useMemo((()=>{if(T)return{id:u,type:q(S)}}),[T,u,S]),r=k!=null?g((m=>W(m,k))):void 0,I=r?.transactionDetailLocalData.vendorUpdates?.id!=null?D.editVendorStateById[r?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",b=r?.fetchState==="Completed"?$e(r?.transaction):void 0,R=g((m=>b!=null?we(m.customerIncomeState,m.vendorExpenseState,m.trendState,b,"month"):void 0)),Z=g((m=>le(m))),ne=g((m=>b!=null?Pe(m.trendWithTransactionsState,b,"TransactionDetail"):void 0)),ae=s.company?.companyInfo.firstMonthOfFY??1,z=g((m=>Fe(m.accountState,m.accountListState,"accountList"))),[qe,fe]=i.useState(!1),[We,he]=i.useState(!1),[He,Se]=i.useState(!1),Ze=i.useCallback((m=>je(m,p??"")+o.search),[p,o.search]),Je=i.useCallback((()=>{Se(!1)}),[]);gn({currentTransactionId:k,enabled:p!=null&&p!=="",buildPath:Ze,beforeNavigate:Je,navigate:t,navigateState:o.state});const ye=()=>{fe(!1),he(!1)},Te=un();pn();const oe=i.useRef(r?.transaction);oe.current=r?.transaction;const Ke=r?.transactionDetailUpdateStatus?.fetchState,L=fn(Ke,(()=>{const m=[];if(oe.current!=null)for(const se of oe.current.lines??[])"account"in se&&se.account?.accountId!=null&&m.push(se.account.accountId);return m}));i.useEffect((()=>{k!=null&&r!=null&&r.fetchState==="Not-Started"&&(e(Oe(k,!1)),ye())}),[e,k,r?.fetchState]),i.useEffect((()=>{if(k!=null&&r?.fetchState==="Error"){const m=re(o.state?.pathnameStackToGoBack,o.pathname);t("page-not-found",{replace:!0,state:Te?{pathnameStackToGoBack:m,message:"expenseAutomation",origin:"transaction_categorization"}:{pathnameStackToGoBack:m,message:"pageNotFound",origin:"transaction_detail"}})}}),[k,r?.fetchState,t,o.state,o.pathname,Te]),i.useEffect((()=>{He||r==null||r.transaction==null||(e(Ue({id:r.transaction.id,type:r.transaction.type})),Se(!0));const m=o.state?.searchContext;b==null&&r?.fetchState==="Completed"&&De(r?.transaction,m),b!=null&&(!c||d&&f===!1)&&(qe?We||R==null||(he(!0),e(me(b,"TransactionDetail",{timeframe:"month",timePeriod:ne?.selectedPeriod?.timePeriod??R}))):(e(de()),e(ue()),De(r?.transaction,m),fe(!0),e(xe(b))))}),[r?.fetchState,r?.transaction,R,c]),i.useEffect((()=>{Z.newVendorState?.vendorDetailLocalData?.vendorName!=null?v(!0):v(!1)}),[Z.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{e(M("common"))}),[]);const Qe=[l,u].filter((m=>m!=null)),{transactionId:be,onSaveVendor:et,onSaveSuccess:tt,onCancel:nt}=In({closeDrawerHandler:m=>{v(!1),t(m?"../":"../..")}}),{isAiCfoAccessEnabled:at,onAskAiCfoClick:ot}=cn({mobileExploreReferrer:"Transaction Details"});return Jt({isDataReady:r?.fetchState==="Completed"}),T?_.jsxs(_.Fragment,{children:[be!=null&&y&&_.jsx(yn,{isOpen:y,transactionId:be,onSaveVendor:et,onSaveSuccess:tt,onCancel:nt}),_.jsx(Kt,{toolkit:V,children:_.jsx(vn,{hideDeleteAttachment:!0,firstMonthOfFY:ae,isDisabled:r?.transaction?.type==="transfer"&&a?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:p,location:o,navigate:t,selectedTransaction:k,entity:b,isCOTEnabled:C,defaultTrendTransactionTimePeriod:R,resetTrendIsFetchedStates:ye,transaction:r?.transaction,uncategorizedAccounts:z,vendorSaveStatus:I,isVendorBulkUpdateOnTransactionEnabled:h,isCreateTransferEntryFromExpenseEnabled:x,isExpenseAutomationEnabled:E,isAiCfoAccessEnabled:at,onAskAiCfoClick:ot,isProjectsTransactionsEnabled:B,isTransactionSplitEnabled:O,companyId:G,companyName:X,initialOpenThreadRequest:N})}),U,L.showPopup&&L.popupType!=null&&_.jsx(Qt,{popupType:L.popupType,currencySymbol:L.currencySymbol,accountId:L.popupAccountId??"",accountName:L.popupAccountName??"",onSubmit:L.handleSubmit,onDismiss:L.handleDismiss})]}):_.jsx(ct,{to:Xe(Qe.length)})}const Xe=(t=2)=>{let e="../";for(let o=0;o<t;o++)e=`${e}../`;return e},De=(t,e)=>{if(t!=null){const{transactionCategory:o,transactionClass:n}=kn(t),a=Dn(t);$.trackTransactionDetails(t.account?.accountId,t.account?.accountName,t.id,a,o.length>0?o:void 0,n.length>0?n:void 0,t.type,t.amount,t.memo,t.lines?.length??0,t.attachments?.map((s=>s.fileName)),e!=null?"Search":void 0,e?.searchTerm,e?.resultPosition,e?.resultsCount)}},kn=t=>{const e=[],o=[];return t.lines?.forEach((n=>{switch(n.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 a=n;a!=null&&a.account!=null&&a.account.accountName?.length>0&&e.push(a.account.accountName),a.class!=null&&a.class.className?.length>0&&o.push(a.class.className);break}}})),{transactionCategory:e,transactionClass:o}},Dn=t=>bt(t)===!0?t.customer?.name??"":gt(t)===!0?t.vendor?.name??"":t.memo!=null?t.memo:t.type;export{yn as C,zn as T,Nn as a,hn as b,fn as c,In as d,vn as e,gn as f,pe as g,bn as h,On as i,De as l,Bn as r,pn as u};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-oxGmLiGE.js";import{a as d}from"./sentry-CYolppN9.js";import{t as u,u as h,j as b,N as y}from"./core-k1hJbZ6L.js";import{Vl as I,gl as w,K8 as j}from"./zeni-epic-state-C2CKsxzr.js";import{z as l,a5 as x,ad as S,ae as D}from"./index-Cjqi6Pkt.js";import{n as g}from"./mui-D8QuRJEy.js";import"./recharts-DZG9umMy.js";import"./analytics-BSYXJeF4.js";import"./plaid-CbZCK8Pe.js";import"./dnd-CiTl8J_b.js";import"./stripe-cKAAJElX.js";import"./lottie-DXQhXtqa.js";import"./lexical-YTMAFU1j.js";import"./pdf-QcH92u4w.js";import"./utils-CZxvf1-B.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]="77ff423a-500e-40f0-a4eb-bbbc3df4f455",e._sentryDebugIdIdentifier="sentry-dbid-77ff423a-500e-40f0-a4eb-bbbc3df4f455")}catch{}})();const A=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[n,c]=d.useState(!1),a=h(),i=b((m=>I(m))),r=l.getSignedInUser(),f=l.getSignedInUserTenantWithId(s);if(r==null||f==null)return o.jsx(y,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,f?.tenantId),d.useEffect((()=>{n||(c(!0),a(j(t,p,s)))}),[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=g.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100vh;
|
|
5
|
-
flex-direction: row;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
9
|
-
`,_=g(D.LargeRegular)`
|
|
10
|
-
display: flex;
|
|
11
|
-
color: ${S.important};
|
|
12
|
-
`;export{A as default};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-oxGmLiGE.js";import{u as z,h as ne,g as G,i as W,j as k,l as ae,N as Q,n as Le,o as x}from"./core-k1hJbZ6L.js";import{a0o as Fe,M0 as Ue,a0p as _e,fI as L,Hd as ze,a0q as An,cw as ee,cx as Me,H7 as wn,a0r as Dn,a0s as kn,Ha as In,Hh as me,H4 as Sn,H1 as Pn,ZX as ce,a0t as bn,PA as jn,XG as vn,PC as En,mM as Pe,a0u as Tn,v6 as Ve,uW as $e,mD as He,mG as be,XH as je,XI as Bn,a0v as On,mF as Rn,n0 as Ln,mu as Fn,kU as Un,kT as _n,a0w as zn,a0x as ge,Ph as Mn,a0y as Vn,a0z as $n,_b as fe,a0A as ve,a0B as Hn,PN as Zn,_y as Nn,N8 as Ze,CE as Ne,a0C as Gn,PK as Wn,a0D as Ge,dc as ye,PR as We,e0 as qe,e1 as xe,PP as qn,N2 as Yn,PH as Xn,a0E as Ye,a0F as Xe,Pj as Ke,Pt as Ee,a0G as Kn,_p as Jn,PS as Qn,bq as ea,bL as na,cI as aa,bM as ta,bu as oa,V3 as sa}from"./zeni-epic-state-C2CKsxzr.js";import{V as te,p as H,d as $,z as b,at as Ce,a5 as le,cY as ra,$ as M,a9 as q,a2 as Je,j as ia,q as Te,k as R,cZ as ca,ac as Ae,c_ as la,a6 as de,c$ as da,O as we,bj as N,d0 as ua,ao as pa,aq as Qe,d1 as Be,d2 as ma,l as ie,d3 as ga,ag as ha,d4 as fa,d5 as ya,h as xa,H as Ca}from"./index-Cjqi6Pkt.js";import{u as F,n as U,D as Y,S as X}from"./mui-D8QuRJEy.js";import J from"./NotFoundScreen-ngkmWfLO.js";import{S as Oe}from"./SetupPagesScreen-DT18jEZS.js";import{F as en}from"./FeaturePreviewScreen-CVxHNITI.js";import{a as g}from"./sentry-CYolppN9.js";import{M as ue}from"./MobileAppDrawer-D95K9MWM.js";import{A as Aa,D as wa,V as Da}from"./DomesticWireDetailScreen-C3Fvc0vh.js";import{A as ka}from"./AddressScreen-B7HfNJJM.js";import{u as nn}from"./useAskAiCfoHostNavButtonProps-BETiKk63.js";import{Z as Ia}from"./ZeniAccountStatementScreen-Dff7TUu2.js";import"./recharts-DZG9umMy.js";import"./analytics-BSYXJeF4.js";import"./plaid-CbZCK8Pe.js";import"./dnd-CiTl8J_b.js";import"./stripe-cKAAJElX.js";import"./lottie-DXQhXtqa.js";import"./lexical-YTMAFU1j.js";import"./pdf-QcH92u4w.js";import"./utils-CZxvf1-B.js";import"./BusinessVerificationPageScreen-YH2iMYXG.js";import"./routePaths-BQiUfv8Y.js";import"./analyticsHelper-w2YkQjq1.js";import"./InboxNotificationsProvider-Lon_JjZI.js";import"./useTaskManagerAccess-CbR2C9f7.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="1ad0fd52-48be-4d99-9f07-87709d115f46",n._sentryDebugIdIdentifier="sentry-dbid-1ad0fd52-48be-4d99-9f07-87709d115f46")}catch{}})();const Sa=U.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: ${n=>n.theme.colors.grey4};
|
|
9
|
-
`;function Re({isEditDrawerOpen:n}){const a=F(),[r,t]=g.useState(!1),{autoTransferRulePageProps:o,isLoading:i}=(function({isEditDrawerOpen:d=!1}={}){const c=z(),p=ne(),h=G(),{ruleId:y,tenantEmailDomain:s}=W(),l=te(),{useFeatureGate:f}=H(),m=k((u=>Fe(u))),P=k((u=>Ue(u.depositAccountState,u.depositAccountListState))),D=k((u=>_e(u))),w=k((u=>L(u))),{isFeatureEnabled:I}=f($.isTreasuryEnabled),C=m?.fetchState??"Not-Started",A=w?.companyId??(s==null?void 0:b.getSignedInUserTenant(s)?.companyId);g.useEffect((()=>{C==="Not-Started"&&A!=null&&c(ze(!0))}),[c,C,A]);const E=m?.fetchState!=="Completed";if(E)return{autoTransferRulePageProps:void 0,isLoading:E};const T=w?.company!=null&&An(w.company),j=!!(I&&T),v=ee(l?.loggedInUserRoleMap)||Me(l?.loggedInUserRoleMap),O=b.getSignedInUser(),S={userId:O?.userId??"",sessionId:O?.zeniSessionId??"",tenantId:w?.tenantId??""},B=!!h.state?.scrollToAddRule;return{isLoading:E,autoTransferRulePageProps:{autoTransferRuleView:m,companyName:w?.companyName??"",hasAdminLevelAccess:v,includeTreasuryOption:j,transferLimit:5e5,authParams:S,currentTenant:w,depositAccountListView:P,downloadAccountDetailEndPoint:`${Ce}/account_details`,editingRuleId:y,isEditDrawerOpen:d,scrollToAddRule:B,zeniAccountsConfigDetail:D,onBackClick:()=>p(".."),onCreateRule:()=>{c(Pn())},onUpdateRule:u=>{c(me(u))},onDeleteClick:u=>{c(Sn(u))},onPauseClick:u=>{c(me(u,!0,!1))},onResumeClick:u=>{c(me(u,!1,!0))},onActivityClick:(u,V)=>{c(In(u,V))},onUpdateRuleLocalData:u=>{c(kn(u))},clearRuleLocalData:()=>{c(Dn())},onEditClick:u=>{p(`./${u}/edit`)},onEditDrawerClose:()=>{p("../../",{relative:"path"})},onReviewClick:()=>{c(wn())}}}})({isEditDrawerOpen:n});return i||o==null?e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}}):e.jsxs(Sa,{children:[e.jsx(ue,{isAppContentDrawerOpen:r,handleDrawerToggle:d=>{t(d)}}),e.jsx(ra,{...o})]})}const Pa={overlayWidth:new q(100,100,58)},ba=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:r})=>{const t=z(),o=F(),i=M();if(b.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(Y,{onClose:()=>{r(!0),t(ce())},anchor:"right",open:a,PaperProps:{style:{width:Pa.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(ja,{onClick:d=>d.stopPropagation(),children:e.jsx(Aa,{vendorIdParam:n,accountContext:"express-pay"})})})},ja=U(X)`
|
|
10
|
-
display: flex;
|
|
11
|
-
min-height: 100%;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
`,va={overlayWidth:new q(100,100,58)},Ea=({isDrawerOpen:n,closeDrawerHandler:a})=>{const r=z(),t=F(),o=M();if(b.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return e.jsx(Y,{onClose:()=>{a(!0),r(ce())},anchor:"right",open:n,PaperProps:{style:{width:va.overlayWidth.valuePercentage(o),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Ta,{onClick:i=>i.stopPropagation(),children:e.jsx(ka,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Ta=U(X)`
|
|
14
|
-
display: flex;
|
|
15
|
-
min-height: 100%;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
`,Ba={overlayWidth:new q(100,100,58)},Oa=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:r})=>{const t=z(),o=F(),i=M();if(b.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(Y,{onClose:()=>{r(!0),t(ce())},anchor:"right",open:a,PaperProps:{style:{width:Ba.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Ra,{onClick:d=>d.stopPropagation(),children:e.jsx(wa,{vendorIdParam:n,accountContext:"express-pay"})})})},Ra=U(X)`
|
|
18
|
-
display: flex;
|
|
19
|
-
min-height: 100%;
|
|
20
|
-
flex-direction: column;
|
|
21
|
-
`,La=U.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: ${n=>n.theme.colors.grey4};
|
|
29
|
-
`,Fa=ae((function(n,a){const r=L(n),t=b.getSignedInUser(),o=r.tenantId,i={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:o??""},d=a.expressPayDetails,c=n.entityAutoCompleteState.autoCompleteText.common,p=vn(n,"common");return{expressPayDetails:d,fileProps:{authParams:i,filesEndPoint:`${Ae.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:p},analytics:a.analytics}}),(function(n,a){const{navigate:r}=a;return{onSaveVendor:t=>{n(_n(t,void 0,void 0,!0))},saveVendorDetailLocalData:(t,o)=>{n(be({vendorId:o,localData:t}))},saveExpressPayLocalData:t=>{n(Un({localData:t}))},onVendorSelected:t=>{t!=null&&n(Fn(t,!1))},updateSelectedVendorForCreate:t=>{n(Ln(t))},initializeVendorAddress:()=>{n(Rn())},resetVendorSaveStatus:t=>{n(On({vendorId:t}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(t,o)=>{t.trim().length>=2?n(Bn({searchString:t,entityType:o,searchOrigin:"common"})):t.trim().length===0&&n(je("common"))},onCancelAutoComplete:()=>{n(je("common"))}},chooseNewVendor:t=>{n(be({localData:{vendorName:t}}))},onClickAddAccount:t=>{t.method.toLowerCase().indexOf("ach")!==-1?r("./add-ach",{relative:"path"}):t.method.toLowerCase().indexOf("wire")!==-1&&t.method.toLowerCase().indexOf("domestic")!==-1&&r("./add-wire",{relative:"path"})},updateFilesEntity:t=>{n(He({files:t}))},onDeleteFile:t=>{n($e(t))},onEditFileName:(t,o)=>{n(Ve(t,o.split(".")[0]))},onBackClick:t=>{t!=null&&n(Pe(t)),n(Pe()),n(Tn()),n(ce()),r("../",{relative:"path"})},onSchedulePayment:()=>{n(En())}}}))(ca);function se({isAddACHDrawerOpen:n,isAddWireDrawerOpen:a,isAddAddressDrawerOpen:r}){const t=ne(),o=G(),i=z(),[d,c]=g.useState(!1),{tenantEmailDomain:p}=W(),h=te(),y=k((u=>u.expressPayState.fetchState)),s=k((u=>L(u))),l=k((u=>bn(u))),f=l.expressPayLocalData?.vendorId,m=s.companyId??b.getSignedInUserTenant(p)?.companyId,[P,D]=g.useState(!1),[w,I]=g.useState(!1),[C,A]=g.useState(!1),E=Je(o.state?.pathnameStackToGoBack),{poppedPathname:T}=E,j=T?.split("/"),v=j?.[j.length-1];g.useEffect((()=>{n===!0?D(!0):(D(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{a===!0?I(!0):(I(!1),document.body.style.overflow="auto")}),[a]),g.useEffect((()=>{r===!0?A(!0):(A(!1),document.body.style.overflow="auto")}),[r]),g.useEffect((()=>{y==="Not-Started"&&i(jn(!0,!0))}),[y,i]);const O=ia(l.vendorViewDetails.bankAccountCreationState?.fetchState);if(g.useEffect((()=>{O==="In-Progress"&&l.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&B()}),[O,l.vendorViewDetails.bankAccountCreationState?.fetchState]),b.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const S=u=>{c(u)},B=()=>{D(!1),I(!1),t("../",{relative:"path"})};return e.jsxs(La,{children:[Te(o)?e.jsx(ue,{isAppContentDrawerOpen:d,handleDrawerToggle:S}):null,P===!0?e.jsx(ba,{vendorId:f,closeDrawerHandler:B,isDrawerOpen:P}):null,w===!0?e.jsx(Oa,{vendorId:f,closeDrawerHandler:B,isDrawerOpen:w}):null,C===!0?e.jsx(Ea,{closeDrawerHandler:B,isDrawerOpen:C}):null,e.jsx(Da,{vendorId:f,isExpressPayPage:!0}),e.jsx(Fa,{navigate:t,location:o,companyId:m,accountId:v,analytics:R,currentTenant:s,vendorId:f,roleMap:h?.loggedInUserRoleMap,isSettings:Te(o),expressPayDetails:l,onClickMenuIcon:()=>{S(!0)}})]})}const Ua={overlayWidth:new q(100,100,58)},_a=({authParams:n,downloadAccountDetailEndPoint:a,isAccountInfoDrawerOpen:r,zeniBankAccountDetail:t,closeDrawerHandler:o})=>{const i=F(),d=M(),c=k((s=>_e(s))),p=k((s=>L(s)));if(b.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const h=()=>{o(!0)},y={depositAccount:t,onDismissClick:h,zeniAccountsConfigDetail:c,authParams:n,downloadAccountDetailEndPoint:a,currentTenant:p};return e.jsx(Y,{anchor:"right",open:r,PaperProps:{style:{width:Ua.overlayWidth.valuePercentage(d),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>h(),children:e.jsx(za,{onClick:s=>s.stopPropagation(),children:e.jsx(la,{...y})})})},za=U(X)`
|
|
30
|
-
display: flex;
|
|
31
|
-
min-height: 100%;
|
|
32
|
-
flex-direction: column;
|
|
33
|
-
`,Ma={overlayWidth:new q(100,100,58)},an=({isCheckDepositDrawerOpen:n,closeDrawerHandler:a})=>{const r=F(),t=M(),o=z(),i=k((s=>L(s))),d=b.getSignedInUser(),c=i.tenantId,p={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c??""};if(d==null)throw Error("Can't access check deposit page without signing in...");const h=k((s=>zn(s))),y={analytics:R,checkDeposit:h,filesEndPoint:`${Ae.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:s=>{o(Vn(s))},updateFilesEntity:s=>{o(He({files:s}))},onAnotherTransferClick:()=>{o(ge())},onDeleteFile:s=>{o($e(s))},onEditFileName:(s,l)=>{o(Ve(s,l.split(".")[0]))},onCheckDpositClick:()=>{o(Mn())},onDismissClick:()=>{a(!0),o(ge())}};return e.jsxs(e.Fragment,{children:[e.jsx(de,{analytics:R,onLoad:s=>(l=>l.trackPageLoaded(we.Event.accountsDepositCheckFormViewed))(s)}),e.jsx(Y,{anchor:"right",open:n,PaperProps:{style:{width:Ma.overlayWidth.valuePercentage(t),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(s,l)=>(l==="backdropClick"||l==="escapeKeyDown")&&(a(!0),void o(ge())),children:e.jsx(Va,{onClick:s=>s.stopPropagation(),children:e.jsx(da,{...y})})})]})},Va=U(X)`
|
|
34
|
-
display: flex;
|
|
35
|
-
min-height: 100%;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
`,$a={overlayWidth:new q(100,100,58)},Ha=ae((function(n,a){const r=a.currentTenant?.companyId;return{plaidConnectionDetails:Nn(n,r,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Ue(n.depositAccountState,n.depositAccountListState)}}),(function(n,a){return{onReviewClick:()=>n(Wn()),clearReviewTransferDetail:()=>n(Gn()),onFetchLinkTokenClick:r=>{n(Ne("external_account",r))},onEstablishConnectionClick:r=>{n(Ze(r,a.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}}))(ua),tn=({isTransferDrawerOpen:n,authParams:a,downloadAccountDetailEndPoint:r,closeDrawerHandler:t,zeniAccountsConfig:o})=>{const i=k((C=>$n(C))),d=k((C=>L(C))),c=F(),p=M(),h=z(),{accountId:y}=W(),[s,l]=g.useState("achTransfer"),[f,m]=g.useState(!1);if(b.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:P}=H(),{configValue:D}=P(N.zeniAccountsConfig),w=fe(D),I=()=>{t(!0),h(ve())};return g.useEffect((()=>{i.reviewTransferDetail.fetchState==="Completed"&&m(!0)}),[m,i.reviewTransferDetail.fetchState]),e.jsxs(e.Fragment,{children:[e.jsx(de,{analytics:R,onLoad:C=>(A=>A.trackPageLoaded(we.Event.zeniAccountsTransferFormViewed))(C)}),e.jsx(Y,{onClose:()=>{(s==="achTransfer"&&f===!1||s==="achTransfer"&&f&&i.fetchState==="Completed")&&I()},anchor:"right",open:n,PaperProps:{style:{width:$a.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Za,{onClick:C=>C.stopPropagation(),children:e.jsx(Ha,{analytics:R,transferDetails:i,authParams:a,downloadAccountDetailEndPoint:r,onTransferClick:()=>{R.trackTransferBetweenAccountsFormClicked("Transfer",i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",i.transferDetailLocalData.transferFrom?.label,i.transferDetailLocalData.transferTo?.label,i.transferDetailLocalData.amount.amount,i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,i.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,i.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&i.transferDetailLocalData.transferTo?.accType==="depositAccount"&&o.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&i.transferDetailLocalData.amount.amount>o.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),h(Zn(y))},onDismissClick:I,onSaveChangesToLocalStore:C=>{h(Hn(C))},onAnotherTransferClick:()=>{m(!1),h(ve())},currentTenant:d,zeniAccountsConfigDetail:o,currentDrawerContent:s,setCurrentDrawerContent:l,showReviewContent:f,setShowReviewContent:m,onBackClick:()=>{},maxInsuredAmount:w.maxInsuredAmount})})})]})},Za=U(X)`
|
|
38
|
-
display: flex;
|
|
39
|
-
min-height: 100%;
|
|
40
|
-
flex-direction: column;
|
|
41
|
-
`,Na=U.div`
|
|
42
|
-
display: flex;
|
|
43
|
-
min-height: 100%;
|
|
44
|
-
width: 100%;
|
|
45
|
-
flex: 1 1 auto;
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
align-items: center;
|
|
48
|
-
background-color: ${n=>n.theme.colors.grey4};
|
|
49
|
-
`,Ga=ae((function(n,a){return{zeniAccountListView:Ge(n),isExpressPayEnabled:a.isExpressPayEnabled,analytics:a.analytics}}),(function(n,a){const{navigate:r,currentTenant:t,location:o,companyId:i,handleDrawerToggle:d,analytics:c,isBillPayEnabled:p,isDebitCardFeatureEnabled:h}=a,{tenantEmailDomain:y}=t;return{onZeniAccountClick:(s,l)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",l,"active");const f=Wa(y,s),m=ie(o.state?.pathnameStackToGoBack,o.pathname);r(f,{state:{pathnameStackToGoBack:m}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),r("setup")},onReloadTransactions:()=>{n(We(!1))},handleMoveMoneyOptionSelection:(s,l)=>{let f="page-not-found";s==="sendMoney"&&(f=cn(y)),s==="payBill"?f=on(t,p,h):s==="transfer"?(f=sn(y),l!=null&&n(Ye(l))):s==="checkDeposit"&&(f=rn(y));const m=ie(o.state?.pathnameStackToGoBack,o.pathname);r(f,{state:{pathnameStackToGoBack:m}})},unlinkPaymentAccount:(s,l)=>{c.trackAccountsListPageClicked("Unlink Account",l),n(Xn(s))},onFetchLinkTokenClick:(s,l)=>{n(Ne("external_account",s,l))},onUpdatePaymentAccountStatus:(s,l,f)=>{n(Yn(s,l,"zeni_accounts","external_account",f))},onEstablishConnectionClick:s=>{n(Ze(s,i,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:s=>{n(qn(s))},onClickMenuIcon:()=>{d(!0)},onAutoTransferClick:s=>{const l="./auto-transfer";s?r(l,{state:{...o.state,scrollToAddRule:!0}}):r(l)}}}))(ma);function he({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a}){const r=G(),t=ne(),o=z(),i=M(),{tenantEmailDomain:d}=W(),{useDynamicConfig:c,useFeatureGate:p}=H(),h=F(),{configValue:y}=c(N.zeniAccountsConfig),{isFeatureEnabled:s}=p($.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=p($.isAutoTransferRuleEnabled),f=fe(y),m=k((_=>L(_))),P=m.companyId??b.getSignedInUserTenant(d)?.companyId,{configValue:D}=c(N.expressPayConfig),w=D.is_enable_all_tenants===!0||D.tenant_ids!=null&&D.tenant_ids.includes(m.tenantId),[I,C]=g.useState(!1),[A,E]=g.useState(!1),[T,j]=g.useState(!1),[v,O]=g.useState(!1),S=k((_=>Ge(_))),B=S.fetchState,u=k((_=>Fe(_))),V=u?.fetchState??"Not-Started",pe=!!m.companyZeniAccountInfo?.info?.isZeniAccountEnabled,oe=te(),Z=!!m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,K=ee(oe?.loggedInUserRoleMap),ln=ye(oe?.loggedInUserRoleMap),dn=!!m.companyBillPayInfo?.info?.isBillPayEnabled,De=b.getSignedInUser(),un={userId:De?.userId??"",sessionId:De?.zeniSessionId??"",tenantId:m.tenantId??""},pn=`${Ce}/account_details`,{areTenantIdsInSync:ke}=pa();g.useEffect((()=>{!I&&ke&&(C(!0),o(We(!1)))}),[I,o,B,ke]),g.useEffect((()=>{!A&&V==="Not-Started"&&P&&(E(!0),o(ze(!0)))}),[A,V,P,o]),g.useEffect((()=>{n!=null&&n===!0?j(!0):(j(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{O(a!=null&&a===!0)}),[a]);const Ie=()=>{j(!1),t("..")},[mn,gn]=g.useState(!1),Se=_=>{gn(_)},{isAiCfoAccessEnabled:hn,onAskAiCfoClick:fn}=nn({mobileExploreReferrer:"Checking Accounts"});Qe({isDataReady:B==="Completed"});const yn=qe(m),xn=xe(s,m);return yn===!0&&xn!==!0?e.jsx(en,{}):pe?e.jsxs(e.Fragment,{children:[S.fetchState==="Completed"&&T===!1&&v===!1?e.jsx(de,{analytics:R,onLoad:_=>(Cn=>{Cn.trackAccountsListPageViewed(S.depositAccountsSelectorView.depositAccounts.length,S.externalAccountsSelectorView.paymentAccounts.length,Be(S.summary?.totalBalance.available.amount??0),Be(S.summary?.totalInterest.available.amount??0),S.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield)})(_)}):null,T===!0?e.jsx(tn,{closeDrawerHandler:Ie,isTransferDrawerOpen:T,zeniAccountsConfig:S.zeniAccountsConfig,authParams:un,downloadAccountDetailEndPoint:pn}):null,v===!0?e.jsx(an,{closeDrawerHandler:Ie,isCheckDepositDrawerOpen:v}):null,e.jsxs(Na,{windowSize:i,children:[e.jsx(ue,{isAppContentDrawerOpen:mn,handleDrawerToggle:Se}),e.jsx(Ga,{zeniBankListView:S,navigate:t,currentTenant:m,location:r,companyId:P,analytics:R,maxInsuredAmount:f.maxInsuredAmount,isExpressPayEnabled:w,isBillPayEnabled:dn,isDebitCardFeatureEnabled:s,isAutoTransferRuleEnabled:l,handleDrawerToggle:Se,isAiCfoAccessEnabled:hn,onAskAiCfoClick:fn})]})]}):Z&&K?e.jsx(Q,{to:"../setup"}):m.companyZeniAccountInfo?.info&&!Z&&ln?e.jsx(Q,{to:"../promo",state:r.state}):e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}})}const on=(n,a,r)=>{const t=xe(r,n),{tenantEmailDomain:o}=n;return t===!0||a===!1?`/${o}/bills`:`/${o}/bill/new`},Wa=(n,a)=>`/${n}/checking/${a}`,sn=(n,a)=>a==null?`/${n}/checking/transfer`:`/${n}/checking/${a}/transfer`,rn=(n,a)=>a==null?`/${n}/checking/check-deposit`:`/${n}/checking/${a}/check-deposit`,cn=n=>`/${n}/checking/express-pay`,qa=U.div`
|
|
50
|
-
display: flex;
|
|
51
|
-
width: 100%;
|
|
52
|
-
flex: 1 1 auto;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
align-items: center;
|
|
55
|
-
min-height: 100vh;
|
|
56
|
-
background-color: ${n=>n.theme.colors.grey4};
|
|
57
|
-
`,Ya=ae((function(n,a){const{currentTenant:r}=a,t=Xe(n,a.accountId),o=b.getSignedInUser(),i=n.tenantState.currentTenantId,d={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:i??""},c=t.accountDetail?.id??"";return{currentTenantCompanyName:r.companyName??"",authParams:d,downloadEndPoint:`${Ae.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:t,isExpressPayEnabled:a.isExpressPayEnabled,fetchState:t.fetchState}}),(function(n,a){const{navigate:r,currentTenant:t,location:o,accountId:i}=a,{tenantEmailDomain:d}=t;return{handleMoveMoneyOptionSelection:(c,p)=>{let h="page-not-found";c==="sendMoney"?h=cn(d):c==="payBill"?h=on(t,a.isBillPayEnabled,a.isDebitCardFeatureEnabled):c==="transfer"?(h=sn(d,i),p!=null&&n(Ye(p))):c==="checkDeposit"?(h=rn(d,i),p!=null&&n(Kn(p))):c==="accountStatement"&&(h=Ka(d,i));const y=ie(o.state?.pathnameStackToGoBack,o.pathname);r(h,{state:{pathnameStackToGoBack:y}})},onAccountDetailClick:()=>{const c=Xa(d,i),p=ie(o.state?.pathnameStackToGoBack,o.pathname);r(c,{state:{pathnameStackToGoBack:p}})},onEditNameClick:c=>{n(Ee(i,"editName",c))},onReloadZeniAccountDetailPage:()=>{n(Ke(i,!1))},onCloseAccountClick:()=>{n(Ee(i,"closeAccount",""))},onBackClick:()=>{r("../",{relative:"path"})}}}))(ga);function re({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a,isAccountInfoDrawerOpen:r}){const t=G(),o=ne(),i=z(),d=M(),{tenantEmailDomain:c,accountId:p}=W(),{useDynamicConfig:h}=H(),{useFeatureGate:y}=H(),{isFeatureEnabled:s}=y($.isDebitCardFeatureEnabled),l=k((K=>L(K))),{configValue:f}=h(N.expressPayConfig),m=f.is_enable_all_tenants===!0||f.tenant_ids!=null&&f.tenant_ids.includes(l.tenantId),P=!!l.companyBillPayInfo?.info?.isBillPayEnabled,D=b.getSignedInUser(),w=l.companyId??b.getSignedInUserTenant(c)?.companyId,I={userId:D?.userId??"",sessionId:D?.zeniSessionId??"",tenantId:l.tenantId??""},C=`${Ce}/account_details`,[A,E]=g.useState(!1),[T,j]=g.useState(!1),[v,O]=g.useState(!1),[S,B]=g.useState(!1),u=k((K=>Xe(K,p??""))),V=u.fetchState,{isAiCfoAccessEnabled:pe,onAskAiCfoClick:oe}=nn({mobileExploreReferrer:"Checking Account Detail"});Qe({isDataReady:V==="Completed"}),g.useEffect((()=>{A||(i(Ke(p??"",!1)),E(!0))}),[A,i,V]),g.useEffect((()=>{B(r!=null&&r===!0)}),[r]),g.useEffect((()=>{n!=null&&n===!0?j(!0):(j(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{O(a!=null&&a===!0)}),[a]);const Z=()=>{B(!1),o("..")};return e.jsxs(e.Fragment,{children:[S===!0&&u.accountDetail!=null?e.jsx(_a,{authParams:I,downloadAccountDetailEndPoint:C,closeDrawerHandler:Z,isAccountInfoDrawerOpen:S,zeniBankAccountDetail:u.accountDetail}):null,T===!0?e.jsx(tn,{closeDrawerHandler:Z,isTransferDrawerOpen:T,zeniAccountsConfig:u.zeniAccountsConfig,authParams:I,downloadAccountDetailEndPoint:C}):null,v===!0?e.jsx(an,{closeDrawerHandler:Z,isCheckDepositDrawerOpen:v}):null,e.jsx(qa,{windowSize:d,children:e.jsx(Ya,{navigate:o,currentTenant:l,location:t,companyId:w,isDebitCardFeatureEnabled:s,accountId:p??"",isBillPayEnabled:P,isExpressPayEnabled:m,isAiCfoAccessEnabled:pe,onAskAiCfoClick:oe})})]})}const Xa=(n,a)=>`/${n}/checking/${a}/account-info`,Ka=(n,a)=>`/${n}/checking/${a}/statements`,Ja=ae((function(n,a){const{companyId:r}=a;return{zeniAccountSetupView:Jn(n,r)}}),(function(n,a){const{navigate:r,companyId:t}=a;return{onSetupButtonClick:()=>{R.trackAccountsPromoPageClicked("Setup Accounts"),n(Qn(t))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{r("../setup",{relative:"path"})}}}))(ya),Qa=()=>{const n=ne(),a=G(),{tenantEmailDomain:r}=W(),{useDynamicConfig:t}=H(),o=ha(),i=F(),[d,c]=g.useState(!1),[p,h]=g.useState(!1),y=k((A=>L(A))),{configValue:s}=t(N.zeniAccountsConfig),l=fe(s);g.useEffect((()=>{p===!1&&a.state?.message==="activation"&&h(!0)}),[a.state]);const f=b.getSignedInUserTenant(r)?.companyId??y.companyId,m=b.getSignedInUser(),P=!!y.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,D=A=>{c(A)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const w=te(),I=ee(w?.loggedInUserRoleMap),C=ye(w?.loggedInUserRoleMap);if(P&&I)return e.jsx(Q,{to:"../../checking/setup"});if(y.company?.companyZeniAccountInfo&&(!P&&I||C)){if(a.state?.message==="activation"){const A=Je(a.state?.pathnameStackToGoBack);n(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:A.newStack}})}return e.jsxs(e.Fragment,{children:[e.jsx(fa,{showConfetti:p}),e.jsx(de,{analytics:R,onLoad:A=>(E=>E.trackPageLoaded(we.Event.accountsPromoPageViewed))(A)}),e.jsx(ue,{isAppContentDrawerOpen:d,handleDrawerToggle:D}),e.jsx(Ja,{analytics:R,navigate:n,companyId:f,meetingUrl:o("zeni_accounts_promo"),onClickMenuIcon:()=>{D(!0)},maxAnnualPercentageYield:l.maxAnnualPercentageYield,maxInsuredAmount:l.maxInsuredAmount,exampleBankBalance:3e6})]})}return e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:i.colors.grey5}})};function vt(){const n=G(),a=k((S=>L(S))),r=F(),{useFeatureGate:t,useDynamicConfig:o}=H(),i=te(),d=ee(i?.loggedInUserRoleMap),c=ye(i?.loggedInUserRoleMap),p=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled,h=!!a.company?.companyZeniAccountInfo?.isZeniAccountTOSAccepted,{isFeatureEnabled:y}=t($.isChargeCardFeatureEnabled),{isFeatureEnabled:s}=t($.isDebitCardFeatureEnabled),l=qe(a),f=xe(s,a),m=a?.userRole!=null&&ea(a?.userRole),P=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!m)&&na(i?.loggedInUserRoleMap),D=aa(i?.loggedInUserRoleMap),w=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!m)&&ta(i?.loggedInUserRoleMap),I=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!m,{configValue:C}=o(N.expressPayConfig),A=C.is_enable_all_tenants===!0||C.tenant_ids!=null&&C.tenant_ids.includes(a.tenantId),{isFeatureEnabled:E}=t($.isAutoTransferRuleEnabled),T=xa(a,y,s)&&!m&&oa(i?.loggedInUserRoleMap),j=sa(i?.loggedInUserRoleMap),v=I&&ee(i?.loggedInUserRoleMap),O=v||Me(i?.loggedInUserRoleMap);return e.jsxs(Le,{children:[e.jsx(x,{path:"setup",element:e.jsx(Oe,{isBillPayAdminLevelAccess:P,isUserHasOnlyBillPayAccess:D,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:v,isChargeCardAdminLevelAccess:T,isUserHasOnlyCardAccess:j,productType:"zeni_accounts",type:"setup"})}),e.jsx(x,{path:"verification",element:e.jsx(Oe,{isBillPayAdminLevelAccess:P,isUserHasOnlyBillPayAccess:D,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:v,isChargeCardAdminLevelAccess:T,isUserHasOnlyCardAccess:j,productType:"zeni_accounts",type:"verification"})}),E?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"auto-transfer",element:e.jsx(Re,{})}),O?e.jsx(x,{path:"auto-transfer/:ruleId/edit",element:e.jsx(Re,{isEditDrawerOpen:!0})}):null]}):e.jsx(x,{path:"auto-transfer",element:e.jsx(J,{})}),A&&d?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"express-pay",element:e.jsx(se,{})}),e.jsx(x,{path:"express-pay/add-ach",element:e.jsx(se,{isAddACHDrawerOpen:!0})}),e.jsx(x,{path:"express-pay/add-wire/add-address",element:e.jsx(se,{isAddAddressDrawerOpen:!0})}),e.jsx(x,{path:"express-pay/add-wire",element:e.jsx(se,{isAddWireDrawerOpen:!0})})]}):e.jsx(x,{path:"express-pay",element:e.jsx(J,{})}),e.jsx(x,{path:"promo",element:e.jsx(Qa,{})}),l&&!f?e.jsx(x,{path:"/*",element:e.jsx(en,{})}):p?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"/",element:e.jsx(he,{})}),e.jsx(x,{path:"transfer",element:e.jsx(he,{isTransferDrawerOpen:!0})}),e.jsx(x,{path:"check-deposit",element:e.jsx(he,{isCheckDepositDrawerOpen:!0})}),e.jsx(x,{path:"cash_management/*",element:e.jsx(J,{})}),e.jsx(x,{path:":accountId/*",element:e.jsx(et,{})}),e.jsx(x,{path:"*",element:e.jsx(J,{})})]}):h&&d?e.jsx(x,{path:"*",element:e.jsx(Q,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&c?e.jsx(x,{path:"*",element:e.jsx(Q,{to:"../promo",state:n.state})}):e.jsx(x,{path:"*",element:e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${Ca.sp1} ${r.colors.dropShadowNormal}`}})})]})}function et(){return e.jsxs(Le,{children:[e.jsx(x,{path:"/",element:e.jsx(re,{})}),e.jsx(x,{path:"account-info",element:e.jsx(re,{isAccountInfoDrawerOpen:!0})}),e.jsx(x,{path:"transfer",element:e.jsx(re,{isTransferDrawerOpen:!0})}),e.jsx(x,{path:"check-deposit",element:e.jsx(re,{isCheckDepositDrawerOpen:!0})}),e.jsx(x,{path:"statements",element:e.jsx(Ia,{})}),e.jsx(x,{path:"*",element:e.jsx(J,{})})]})}export{vt as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as c}from"./liveblocks-oxGmLiGE.js";import{a as m}from"./sentry-CYolppN9.js";import{h as x,u as $,g as j,i as v,j as p}from"./core-k1hJbZ6L.js";import{U3 as s,U2 as B,a0H as C,fI as T,a0I as U}from"./zeni-epic-state-C2CKsxzr.js";import{$ as z,ac as g,z as D,a5 as E,d6 as L,a2 as P}from"./index-Cjqi6Pkt.js";import{u as N,n as _}from"./mui-D8QuRJEy.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new a.Error().stack;n&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[n]="a820803e-b6fb-4a14-9a20-aa7abf24955e",a._sentryDebugIdIdentifier="sentry-dbid-a820803e-b6fb-4a14-9a20-aa7abf24955e")}catch{}})();const G=_.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${a=>a.theme.colors.grey4};
|
|
9
|
-
`;function F(){const a=x(),n=$(),d=z(),l=j();let{accountId:e}=v(),f=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${e}`;e==null&&l.pathname.includes(`${s}/statements`)&&(e=s,f=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[u,y]=m.useState(!1),b=N();m.useEffect((()=>{u||(y(!0),n(B(e??"",!1)))}),[u,n]);const o=p((t=>C(t,e??""))),h=()=>{const t=P(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";a(S,{state:{pathnameStackToGoBack:t.newStack}})},r=D.getSignedInUser(),i=p((t=>T(t))),I={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:i.tenantId??""},w=U(e??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=i.company?.companyInfo.companyLegalName??i.companyName;if(r==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?c.jsx(E,{fetchState:"In-Progress",style:{backgroundColor:b.colors.grey5}}):c.jsx(G,{windowSize:d,children:c.jsx(L,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:h,authParams:I,downloadEndPoint:f})})}export{F as Z};
|