@zeniai/web-app-ui 5.3.47-qa → 5.3.48-next
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-1SU95X1g.js +9 -0
- package/dist/assets/AddressRoutes-BzeJ2Hf7.js +1 -0
- package/dist/assets/AddressScreen-Cdr2j35I.js +9 -0
- package/dist/assets/AiCfoScreen-C1eHEeeP.js +22 -0
- package/dist/assets/{AppDrawer-C7L5LQYC.js → AppDrawer-BfXOcVEt.js} +3 -3
- package/dist/assets/{BillPayApprovalRoutes-Bu8vaB46.js → BillPayApprovalRoutes-C7TITJQ6.js} +1 -1
- package/dist/assets/BillPayRoutes-CHaqaYck.js +119 -0
- package/dist/assets/BusinessVerificationPageScreen-BVwrIVJv.js +9 -0
- package/dist/assets/CardsAiCfoScreen-DsJn0glf.js +14 -0
- package/dist/assets/ChargeCardRoutes-RNz9qxOv.js +71 -0
- package/dist/assets/CompanyPassportScreen-DmzRkUq5.js +1 -0
- package/dist/assets/ConnectionAuthScreen-C3vG4r21.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-Br9ARp7V.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-BivxymAu.js → CustomerOnboardingRoutes-BmY616w2.js} +3 -3
- package/dist/assets/{DashboardRoutes-CZNxS99K.js → DashboardRoutes-2DTr4aUf.js} +4 -4
- package/dist/assets/{DefaultTenantHome-BWCll08J.js → DefaultTenantHome-C8wEik5q.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-BeAYwvC9.js +18 -0
- package/dist/assets/{DrawerScreen-0c_ealW2.js → DrawerScreen-DXPlivfx.js} +1 -1
- package/dist/assets/EntityDetailRoutes-CrqgSMlQ.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-DLgzaZBu.js +38 -0
- package/dist/assets/FeaturePreviewScreen-B11vFkOV.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-BQ4MRYuh.js +1 -0
- package/dist/assets/InboxNotificationsProvider-BY8P-Ihr.js +1 -0
- package/dist/assets/InvoicingRoutes-CNNRUv3E.js +2 -0
- package/dist/assets/MagicLinkRoutes-DINiJQI8.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-CVGSZaKv.js +12 -0
- package/dist/assets/MobileAppDrawer-D8KSGZ8t.js +1 -0
- package/dist/assets/NotFoundScreen-DbwVF9lB.js +1 -0
- package/dist/assets/NotificationRoutes-M_Lup9qB.js +1 -0
- package/dist/assets/OAuthConsentScreen-BuReFHDV.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-BAkRFF5q.js +1 -0
- package/dist/assets/{PaymentLinkScreen-B2QO2fQL.js → PaymentLinkScreen-BIPFJD1g.js} +7 -7
- package/dist/assets/PeopleRoutes-DADu3Zhb.js +22 -0
- package/dist/assets/PerformanceRoutes-CX8yTPzt.js +1 -0
- package/dist/assets/{Preview-DMLQokX_.js → Preview-Cafq3h7X.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CvbLmaBz.js → QBOConnectionScreen-DXBj5LWG.js} +1 -1
- package/dist/assets/ReimbursementApprovalRoutes-CPaJiiXV.js +1 -0
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-zx_YxbPw.js +1 -0
- package/dist/assets/{ReimbursementRoutes-G7JKpwJT.js → ReimbursementRoutes-B1ZeqUVg.js} +9 -9
- package/dist/assets/ReportsRoutes-zdmkyXCJ.js +1 -0
- package/dist/assets/RewardsRoutes-Blcm9sjt.js +1 -0
- package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-CDQYjn75.js +25 -0
- package/dist/assets/ScreenRoutes-BnBOn0fY.js +2 -0
- package/dist/assets/{SettingsRoutes-BrsZS6Xg.js → SettingsRoutes-C-hSgwDw.js} +6 -6
- package/dist/assets/{SetupPagesScreen-DL_o3Z3i.js → SetupPagesScreen-CEG9qkFk.js} +5 -5
- package/dist/assets/SignInScreen-Dh3vWk5H.js +1 -0
- package/dist/assets/SignOutScreen-DiaROWN6.js +9 -0
- package/dist/assets/{TaskListScreen-W52vNP7m.js → TaskListScreen-Qo2CFMii.js} +2 -2
- package/dist/assets/TaskRoutes-CJ89fi5N.js +9 -0
- package/dist/assets/TransactionDetailRoutes-CdcbF-DT.js +1 -0
- package/dist/assets/{TransactionDetailScreen-CcO0FUjf.js → TransactionDetailScreen-CLcV-jRc.js} +2 -2
- package/dist/assets/TransactionListRoutes-BPNmT8kF.js +1 -0
- package/dist/assets/{TreasuryRoutes-D_yTnBTc.js → TreasuryRoutes-DvD-DWnN.js} +6 -6
- package/dist/assets/{VendorsRoutes-BVvoooN6.js → VendorsRoutes-DbSolQnQ.js} +17 -17
- package/dist/assets/WiseConfirmationScreen-i6t2NQeo.js +12 -0
- package/dist/assets/ZeniAccountRoutes-BAzrGiFl.js +57 -0
- package/dist/assets/ZeniAccountStatementScreen-CILP6MbP.js +9 -0
- package/dist/assets/{accountMappingHelper-DqBiQF6x.js → accountMappingHelper-DCRT8uBQ.js} +1 -1
- package/dist/assets/{analytics-D6GpUSOP.js → analytics-DCG-BJ2B.js} +1 -1
- package/dist/assets/{analyticsHelper-H1Xp9Uyk.js → analyticsHelper-DFvWpT7U.js} +1 -1
- package/dist/assets/{core-B5mDy9pu.js → core-BomyDm3r.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DANuhXnG.js → decodeURIComponentSafe-BrV-0DZb.js} +1 -1
- package/dist/assets/{dnd-CGWe1ZMP.js → dnd-I9CGHlPV.js} +1 -1
- package/dist/assets/{empty-Dj4ZMRNZ.js → empty-CgcXQukc.js} +1 -1
- package/dist/assets/{empty-D0y6rZ_X.js → empty-DZpTY4GY.js} +1 -1
- package/dist/assets/{emptyVideoElement-BbYSqu6F.js → emptyVideoElement-CXDZcpYA.js} +1 -1
- package/dist/assets/epic-CaRC9CI2.js +2 -0
- package/dist/assets/expenseAutomationHelper-Bla5A-j_.js +1 -0
- package/dist/assets/{getLocaleForTenant-xZFgPOZu.js → getLocaleForTenant-CdcSWjO0.js} +1 -1
- package/dist/assets/{index-k1-Pd2Ki.js → index-7l3psPwp.js} +1 -1
- package/dist/assets/{index-CrBk11WI.js → index-B9ZeVIAQ.js} +30661 -31464
- package/dist/assets/{index-BQBXaLiB.js → index-Bo4EoZt1.js} +1 -1
- package/dist/assets/{index-8s12XWuB.js → index-ByxVb88B.js} +1 -1
- package/dist/assets/index-D0WIHul0.js +1 -0
- package/dist/assets/{index-CI8tXM3D.js → index-DXY4DpFj.js} +1 -1
- package/dist/assets/{index-G6Wb7pfX.js → index-Dtcx6iOp.js} +2 -2
- package/dist/assets/{index-fq0DUtem.js → index-IJef17q5.js} +1 -1
- package/dist/assets/{lexical-DW4lC8Zx.js → lexical-CYgmazu1.js} +1 -1
- package/dist/assets/{liveblocks-UOzcPsHa.js → liveblocks-D9xsLz4C.js} +2 -2
- package/dist/assets/{lottie-C5eNvt0I.js → lottie-DZ7H5U6k.js} +1 -1
- package/dist/assets/{mui-Do6nLzGb.js → mui-CsJ_uybP.js} +1 -1
- package/dist/assets/{pathToGoBack-DP_bGWF-.js → pathToGoBack-Bk1syfU7.js} +1 -1
- package/dist/assets/{pdf-DjwvAC2g.js → pdf-BcamkVED.js} +3 -3
- package/dist/assets/{pdf-lib-CZXOqgb4.js → pdf-lib-H_eegAHa.js} +1 -1
- package/dist/assets/{plaid-0g_vwjSd.js → plaid-Bs9WL7ZA.js} +1 -1
- package/dist/assets/{pusher-BwlPp2s7.js → pusher-BiXDawCL.js} +1 -1
- package/dist/assets/{react-BsXfT48C.js → react-BszTkffz.js} +1 -1
- package/dist/assets/{react-CU01hiuh.js → react-CnZloJMh.js} +1 -1
- package/dist/assets/{react-RZilWHYG.js → react-Cp_3CHK0.js} +1 -1
- package/dist/assets/{react-Bja4MeVO.js → react-D0IREB0P.js} +1 -1
- package/dist/assets/{react-DkYBVdJJ.js → react-Di6q_3ld.js} +1 -1
- package/dist/assets/{react-Dex3foBA.js → react-Dn9xz1wp.js} +1 -1
- package/dist/assets/{recharts-uFX1dZS-.js → recharts-CkiZYv6b.js} +1 -1
- package/dist/assets/{routePaths-CeCPwkIf.js → routePaths-B7kYeIqd.js} +1 -1
- package/dist/assets/{sentry-DHDsO12F.js → sentry-BMvyJSqc.js} +1 -1
- package/dist/assets/{url-BxiN6LKq.js → url-BfDVlhyh.js} +1 -1
- package/dist/assets/{url-CLCy7GPP.js → url-CmcLvJyo.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CSs_vZyp.js → useAiCfoDashboardSuggestedQuestionsChips-BSgtWLpu.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-DkXoRZ45.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents--oeBBRmO.js → useChargeCardPusherEvents-B9vV64BE.js} +1 -1
- package/dist/assets/{useDeviceId-Bi38IJl0.js → useDeviceId-CpSKwPZ4.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-C-cGd7Tb.js → useEmailConnectResultRefresh-CAYfUMY-.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-Bwvu8W79.js → useInitialThreadRequest-Pe6lvpTh.js} +1 -1
- package/dist/assets/useTaskManagerAccess-fnX1J0jB.js +1 -0
- package/dist/assets/{utils-BsODCDYR.js → utils-CZJ3iF9S.js} +1 -1
- package/dist/assets/withTransactionSidePanel-mCp4nNUj.js +25 -0
- package/dist/assets/{zeni-epic-state-7eY0g-Bc.js → zeni-epic-state-C6RT9e71.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +6 -6
- package/dist/assets/AccountMappingScreen-BPRZHuGA.js +0 -9
- package/dist/assets/ActualMatchingMatchDetailScreen-CoU3K4PM.js +0 -1
- package/dist/assets/AddressRoutes-3x6JmFfR.js +0 -1
- package/dist/assets/AddressScreen-DhOzuvLT.js +0 -9
- package/dist/assets/AiCfoScreen-Blx6lCnY.js +0 -22
- package/dist/assets/BillPayRoutes-T-Lct0sH.js +0 -119
- package/dist/assets/BusinessVerificationPageScreen-CPnmoF6z.js +0 -9
- package/dist/assets/CardsAiCfoScreen-CIq15Z-M.js +0 -14
- package/dist/assets/ChargeCardRoutes-BKDstMtL.js +0 -71
- package/dist/assets/CompanyPassportScreen-D3aXSi-v.js +0 -1
- package/dist/assets/ConnectionAuthScreen-1A7_ld_X.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-7T0XvKs6.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-DGMYJzFE.js +0 -18
- package/dist/assets/EntityDetailRoutes-Db8C6L2J.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-Cjko15u2.js +0 -38
- package/dist/assets/FeaturePreviewScreen-B5Hq_fA2.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-B6Nn-XMl.js +0 -1
- package/dist/assets/InboxNotificationsProvider-BmF5-_KA.js +0 -1
- package/dist/assets/InvoicingRoutes-0xj-PlaS.js +0 -2
- package/dist/assets/MagicLinkRoutes-B9y3UF8M.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-vHrJm7dw.js +0 -12
- package/dist/assets/MobileAppDrawer-CjKRvtSN.js +0 -1
- package/dist/assets/NotFoundScreen-MJal1hew.js +0 -1
- package/dist/assets/NotificationRoutes-CT24D8Uv.js +0 -1
- package/dist/assets/OAuthConsentScreen-CFMLbvn8.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-ByUQV7tm.js +0 -1
- package/dist/assets/PeopleRoutes-DOJEhG7S.js +0 -22
- package/dist/assets/PerformanceRoutes-CdWAF5sI.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-CEEFZS8r.js +0 -1
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-5MNnVAqy.js +0 -1
- package/dist/assets/ReportsRoutes-Bgz_pVpt.js +0 -1
- package/dist/assets/RewardsRoutes-Bcb3M70b.js +0 -1
- package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-luC81eat.js +0 -33
- package/dist/assets/ScreenRoutes-DA06Fnfd.js +0 -2
- package/dist/assets/SignInScreen-NP6vHITl.js +0 -1
- package/dist/assets/SignOutScreen-D28SfRtf.js +0 -9
- package/dist/assets/TaskRoutes-DLlKeXMA.js +0 -9
- package/dist/assets/TransactionDetailRoutes-BszvDFhJ.js +0 -1
- package/dist/assets/TransactionListRoutes-C1dcOuNI.js +0 -1
- package/dist/assets/WiseConfirmationScreen-l0eeo939.js +0 -12
- package/dist/assets/ZeniAccountRoutes-DImTioOs.js +0 -57
- package/dist/assets/ZeniAccountStatementScreen-wUD7vElb.js +0 -9
- package/dist/assets/epic-mSW644GG.js +0 -2
- package/dist/assets/expenseAutomationHelper-DBDpSggk.js +0 -1
- package/dist/assets/index-6yt3BfRL.js +0 -1
- package/dist/assets/stripSplatSuffix-CQQXAy0N.js +0 -1
- package/dist/assets/useActualMatchingMatchDetail-CAkhwxRr.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BamKKcjy.js +0 -1
- package/dist/assets/useTaskManagerAccess-CdPkYUw1.js +0 -1
- package/dist/assets/withTransactionSidePanel-Co9xwJi4.js +0 -25
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-DbwVF9lB.js","assets/sentry-BMvyJSqc.js","assets/core-BomyDm3r.js","assets/zeni-epic-state-C6RT9e71.js","assets/index-B9ZeVIAQ.js","assets/mui-CsJ_uybP.js","assets/analytics-DCG-BJ2B.js","assets/utils-CZJ3iF9S.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-2DTr4aUf.js","assets/withTransactionSidePanel-mCp4nNUj.js","assets/useAskAiCfoHostNavButtonProps-DkXoRZ45.js","assets/TransactionDetailScreen-CLcV-jRc.js","assets/decodeURIComponentSafe-BrV-0DZb.js","assets/useInitialThreadRequest-Pe6lvpTh.js","assets/routePaths-B7kYeIqd.js","assets/expenseAutomationHelper-Bla5A-j_.js","assets/analyticsHelper-DFvWpT7U.js","assets/CompanyPassportScreen-DmzRkUq5.js","assets/MobileAppDrawer-D8KSGZ8t.js","assets/InboxNotificationsProvider-BY8P-Ihr.js","assets/useTaskManagerAccess-fnX1J0jB.js","assets/useAiCfoDashboardSuggestedQuestionsChips-BSgtWLpu.js","assets/FeaturePreviewScreen-B11vFkOV.js","assets/BillPayRoutes-CHaqaYck.js","assets/AddressScreen-Cdr2j35I.js","assets/DomesticWireDetailScreen-BeAYwvC9.js","assets/BusinessVerificationPageScreen-BVwrIVJv.js","assets/DrawerScreen-DXPlivfx.js","assets/SetupPagesScreen-CEG9qkFk.js","assets/BillPayApprovalRoutes-C7TITJQ6.js","assets/ReimbursementApprovalRuleDetailScreen-zx_YxbPw.js","assets/getLocaleForTenant-CdcSWjO0.js","assets/ReimbursementRoutes-B1ZeqUVg.js","assets/ReimbursementApprovalRoutes-CPaJiiXV.js","assets/TransactionListRoutes-BPNmT8kF.js","assets/ZeniAccountStatementScreen-CILP6MbP.js","assets/SettingsRoutes-C-hSgwDw.js","assets/AccountMappingScreen-1SU95X1g.js","assets/QBOConnectionScreen-DXBj5LWG.js","assets/empty-CgcXQukc.js","assets/index-7l3psPwp.js","assets/url-BfDVlhyh.js","assets/index-D0WIHul0.js","assets/accountMappingHelper-DCRT8uBQ.js","assets/useEmailConnectResultRefresh-CAYfUMY-.js","assets/ReportsRoutes-zdmkyXCJ.js","assets/ChargeCardRoutes-RNz9qxOv.js","assets/useChargeCardPusherEvents-B9vV64BE.js","assets/PeopleRoutes-DADu3Zhb.js","assets/ExpenseAutomationRoutes-DLgzaZBu.js","assets/ScheduleDetailsPrepaidExpensesScreen-CDQYjn75.js","assets/pathToGoBack-Bk1syfU7.js","assets/TreasuryRoutes-DvD-DWnN.js","assets/VendorsRoutes-DbSolQnQ.js","assets/ZeniAccountRoutes-BAzrGiFl.js","assets/AddressRoutes-BzeJ2Hf7.js","assets/PandLWithForecastRoutes-BAkRFF5q.js","assets/CustomerOnboardingRoutes-BmY616w2.js","assets/TransactionDetailRoutes-CdcbF-DT.js","assets/EntityDetailRoutes-CrqgSMlQ.js","assets/InvoicingRoutes-CNNRUv3E.js","assets/NotificationRoutes-M_Lup9qB.js","assets/PerformanceRoutes-CX8yTPzt.js","assets/RewardsRoutes-Blcm9sjt.js","assets/TaskRoutes-CJ89fi5N.js","assets/TaskListScreen-Qo2CFMii.js","assets/AiCfoScreen-C1eHEeeP.js","assets/CardsAiCfoScreen-DsJn0glf.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as s,bn as ms,fE as _s,dY as hs,dX as Es,Al as ps,dh as gs,c8 as xs,gI as Rs,g8 as Is,de as pe,cG as Ts,gm as js,cy as As,bE as fs,br as ys,Ts as Ds,v as bs,Tv as Cs,bq as vs,Tw as Os,bK as Ps,bJ as ws,bt as Us,cu as Fs,Tx as Ls,Ty as ks,d9 as Vs,dc as Hs,db as Ss,cF as Bs,cM as Ns,pR as ge,gh as xe,gX as Ms,gj as Re,gK as Ie,gL as Te,gk as Zs}from"./zeni-epic-state-C6RT9e71.js";import{j as e}from"./liveblocks-D9xsLz4C.js";import{a as w}from"./sentry-BMvyJSqc.js";import{N as u,u as Gs,h as $s,i as zs,g as Ys,j as $,q as je,n as qs,o as t}from"./core-BomyDm3r.js";import{N as l,E as Ws,u as Xs,z as D,M as Ks,d as Qs,T as Js,y as M,f as en,P as sn,V as nn,L as F,G as Ae,t as _,O as tn,Q as an,h as ne}from"./index-B9ZeVIAQ.js";import"./mui-CsJ_uybP.js";import{f as fe}from"./analyticsHelper-DFvWpT7U.js";import{t as on}from"./getLocaleForTenant-CdcSWjO0.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},A=new a.Error().stack;A&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[A]="a40d98be-7af6-4591-80f3-c399c367ee05",a._sentryDebugIdIdentifier="sentry-dbid-a40d98be-7af6-4591-80f3-c399c367ee05")}catch{}})();const rn=l((()=>s((()=>import("./NotFoundScreen-DbwVF9lB.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ln=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/reimbursements`}),un=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/bills`}),ye=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/treasury`}),De=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/checking`}),be=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/cards`}),b=({showZeniAccountRoute:a,isUserHasBillPayAccess:A,isUserHasReimbursementAccess:S,showTreasuryRoute:i,isTenantBankingOnly:k,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(k===!0){if(a)return e.jsx(De,{tenantEmailDomain:v});if(i)return e.jsx(ye,{tenantEmailDomain:v});if(O)return e.jsx(be,{tenantEmailDomain:v})}return a?e.jsx(De,{tenantEmailDomain:v}):i?e.jsx(ye,{tenantEmailDomain:v}):O?e.jsx(be,{tenantEmailDomain:v}):A?e.jsx(un,{tenantEmailDomain:v}):S?e.jsx(ln,{tenantEmailDomain:v}):e.jsx(rn,{})},dn={dashboard:()=>s((()=>import("./DashboardRoutes-2DTr4aUf.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,0,17,18,19,20,21,22,23,8])),bills:()=>s((()=>import("./BillPayRoutes-CHaqaYck.js")),__vite__mapDeps([24,1,2,3,4,5,6,7,25,0,26,11,14,27,15,19,20,21,28,23,29,17,30,31,32,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-B1ZeqUVg.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,11,14,28,34,31,32,8])),transactions:()=>s((()=>import("./TransactionListRoutes-BPNmT8kF.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])),settings:()=>s((()=>import("./SettingsRoutes-C-hSgwDw.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,21,38,19,20,39,40,41,42,43,13,44,25,0,17,27,15,18,45,30,31,34,8])),reports:()=>s((()=>import("./ReportsRoutes-zdmkyXCJ.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-RNz9qxOv.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])),people:()=>s((()=>import("./PeopleRoutes-DADu3Zhb.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-DLgzaZBu.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,51,52,10,44,28,8])),treasury:()=>s((()=>import("./TreasuryRoutes-DvD-DWnN.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])),vendors:()=>s((()=>import("./VendorsRoutes-DbSolQnQ.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,25,0,23,51,52,15,11,19,20,21,28,44,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-BAzrGiFl.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8]))},cn=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],te=a=>{"requestIdleCallback"in window?requestIdleCallback(a):setTimeout(a,100)},mn=l((()=>s((()=>import("./ReportsRoutes-zdmkyXCJ.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])))),_n=l((()=>s((()=>import("./AddressRoutes-BzeJ2Hf7.js")),__vite__mapDeps([56,1,2,3,25,4,5,6,7,0,8])))),hn=l((()=>s((()=>import("./PeopleRoutes-DADu3Zhb.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])))),En=l((()=>s((()=>import("./PandLWithForecastRoutes-BAkRFF5q.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,23,11,14,15,19,20,21,8])))),pn=l((()=>s((()=>import("./CustomerOnboardingRoutes-BmY616w2.js")),__vite__mapDeps([58,1,2,3,25,4,5,6,7,0,39,40,41,42,43,13,45,48,8])))),gn=l((()=>s((()=>import("./VendorsRoutes-DbSolQnQ.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,25,0,23,51,52,15,11,19,20,21,28,44,8])))),xn=l((()=>s((()=>import("./TransactionDetailRoutes-CdcbF-DT.js")),__vite__mapDeps([59,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-CrqgSMlQ.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,13,10,11,12,14,15,16,8])))),Rn=l((()=>s((()=>import("./DashboardRoutes-2DTr4aUf.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,0,17,18,19,20,21,22,23,8])))),ve=l((()=>s((()=>import("./BillPayRoutes-CHaqaYck.js")),__vite__mapDeps([24,1,2,3,4,5,6,7,25,0,26,11,14,27,15,19,20,21,28,23,29,17,30,31,32,8])))),In=l((()=>s((()=>import("./SettingsRoutes-C-hSgwDw.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,21,38,19,20,39,40,41,42,43,13,44,25,0,17,27,15,18,45,30,31,34,8])))),Tn=l((()=>s((()=>import("./InvoicingRoutes-CNNRUv3E.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,25,0,19,20,21,39,40,41,42,43,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-B1ZeqUVg.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,11,14,28,34,31,32,8])))),jn=l((()=>s((()=>import("./ZeniAccountRoutes-BAzrGiFl.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8])))),An=l((()=>s((()=>import("./TreasuryRoutes-DvD-DWnN.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])))),fn=l((()=>s((()=>import("./TransactionListRoutes-BPNmT8kF.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])))),yn=l((()=>s((()=>import("./ChargeCardRoutes-RNz9qxOv.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])))),Dn=l((()=>s((()=>import("./NotificationRoutes-M_Lup9qB.js")),__vite__mapDeps([62,1,2,3,0,4,5,6,7,11,21,8])))),bn=l((()=>s((()=>import("./PerformanceRoutes-CX8yTPzt.js")),__vite__mapDeps([63,1,2,3,0,4,5,6,7,11,19,20,21,8])))),Cn=l((()=>s((()=>import("./ExpenseAutomationRoutes-DLgzaZBu.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,51,52,10,44,28,8])))),vn=l((()=>s((()=>import("./RewardsRoutes-Blcm9sjt.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,0,8])))),On=l((()=>s((()=>import("./TaskRoutes-CJ89fi5N.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,14,19,20,21,66,11,8])))),Pn=l((()=>s((()=>import("./AiCfoScreen-C1eHEeeP.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,22,52,15,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-DsJn0glf.js")),__vite__mapDeps([68,1,2,3,4,5,6,7,8])))),C=l((()=>s((()=>import("./NotFoundScreen-DbwVF9lB.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),wn=l((()=>s((()=>import("./TaskListScreen-Qo2CFMii.js").then((a=>a.f))),__vite__mapDeps([66,1,2,3,4,5,6,7,11,19,20,21,8])))),Un=({isDashboardAccess:a,showZeniAccountRoute:A,isUserHasBillPayAccess:S,isUserHasReimbursementAccess:i,showTreasuryRoute:k,isTenantBankingOnly:O,isTenantCardsOnly:v,showChargeCardRoute:V})=>{if(O===!0){if(A)return e.jsx(u,{to:"checking"});if(k)return e.jsx(u,{to:"treasury"});if(V)return e.jsx(u,{to:"cards"})}return v===!0&&V?e.jsx(u,{to:"cards"}):a?e.jsx(u,{to:"dashboard"}):A?e.jsx(u,{to:"checking"}):k?e.jsx(u,{to:"treasury"}):V?e.jsx(u,{to:"cards"}):S?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},we=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/dashboard`}),Mn=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:a}){const A=Gs(),S=$s(),{tenantEmailDomain:i}=zs(),k=Ws().mode,{setLoading:O,clearAllLoading:v,clearLoading:V}=Xs(),f=D.getSignedInUserTenant(i)?.tenantId,T=D.getSignedInUser(),X=ms(T),z=Ys(),[L,Ue]=w.useState(!1),r=$((o=>_s(o))),{useFeatureGate:B}=Ks(),Z=Qs(),ae=Js(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ke}=B(M.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=B(M.isDebitCardFeatureEnabled),j=$((o=>o.tenantState.fetchState)),p=$((o=>o.tenantState.activeTenantFetchState.fetchState)),h=p==="Completed"||j==="Completed"?hs(oe,r):void 0,K=p==="Completed"||j==="Completed"?Es(r):void 0,re=p==="Completed"||j==="Completed"?ps(r)&&!gs(r):void 0,Ve=en(r,ke,oe),{isCardsHidden:He}=sn(r?.tenantId),Se=!Ve||!!He,{isFeatureEnabled:Be}=B(M.isSettingsFeatureEnabled),{isFeatureEnabled:Q}=B(M.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=B(M.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||an==="DEV",Ze=r?.userRole!=null&&xs(r.userRole),Y=$((o=>Rs(o)));if(i!=null){const o=D.getSignedInUserTenant(i);T!=null&&o!=null&&fe(T,r,k)}const G={tenantId:f,userId:T?.userId,sessionId:T?.zeniSessionId},ie=Is(),E=nn(),Ge=r.company==null||E?.loggedInUserRoleMap!=null&&pe(E.loggedInUserRole),$e=Ts(E?.loggedInUserRoleMap),J=je("/:tenantEmailDomain/onboarding/*")!==null,ee=je("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),ze=$((o=>G.tenantId!=null?js(o,G.tenantId):void 0));w.useEffect((()=>{O(F.TENANT_FETCHING),a(i)}),[i]),w.useEffect((()=>{if(ee!=null&&f!=null){const o=ee.params.selectedPeriod;if(o!=null){const y=o.split("-");if(y.length===2){const d=As(Number(y[0])),n=Number(y[1]),c=fs(`01-${d<10?`0${d}`:d}-${n}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),N=ys();c.isAfter(N,"month")===!1?A(Ds(f,{month:d,year:n})):S(`/${i}/month_end_close_checks/review`)}}}}),[ee,f]),w.useEffect((()=>{L||(Ue(!0),O(F.TENANT_FETCHING))}),[L,G,ie,T,A,D]),w.useLayoutEffect((()=>{!bs(ie,G)&&D.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,y,d,n){if(xe(y?.userId,y?.zeniSessionId,o.tenantId),d(Ms(!0)),d(Re(o.tenantId)),o.tenantId!=null&&_.clearTenant(o.tenantId),o.tenantId!=null){const c=D.getSignedInUserTenantWithId(o.tenantId);n&&Ae.updateAppLocaleID(on(n)),c?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}o.userId!=null?ne.identify(o.userId,{tenant_id:o.tenantId}):ne.resetUserIdentity()})(G,T,A,ze))}),[f]),w.useEffect((()=>{D.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,y,d,n,c,N,H){if(d==null&&n==null)return void console.warn("There is no current tenant selected!!");const q=n!=null&&c?.zeniSessionId!=null,us=d==null||d.tenantId!==n,ds=d!=null&&d.excludedResources==null,cs=d!=null&&d.externalConnections==null;if(q&&us){H(Re(n));const W=D.getSignedInUserTenantWithId(n);W?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(W?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,n),_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),H(Ie(c.userId,n))),_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),H(Te(c.userId,n)))}else q&&ds&&_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),H(Ie(c.userId,n))),q&&cs&&_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),H(Te(c.userId,n)));if(q){ne.identify(c.userId,{tenant_id:n});const W=n==null||n!=null&&(y==="Completed"||y==="Error");o==="Completed"||y!=="Not-Started"&&y!=="Error"||n==null||!_.shouldFetchActiveTenant(n)||(_.markActiveTenantFetchStarted(n),N(F.TENANT_FETCHING),H(Zs(c.userId,n,c.zeniSessionId))),W&&(o==="Not-Started"||o==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(ge(c.userId,c.zeniSessionId)))}})(j,p,r,f,T,O,A))}),[f,p]),w.useEffect((()=>{D.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(V(F.TENANT_FETCHING),D.saveSignedInUserTenants(Cs(Y.tenantsBaseInOrder)),T!=null&&fe(T,r,k,void 0,Y.tenantsBaseInOrder))}),[Y,j,r,T]),w.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&f!=null?(v(),_.markActiveTenantFetchCompleted(f)):p==="Error"&&f!=null&&(_.markActiveTenantFetchFailed(f),V(F.TENANT_FETCHING),V(F.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())}),[p,j,f,L]);const le=w.useRef(!1);w.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(o=cn,y=3e3){setTimeout((()=>{const d=n=>{if(n>=o.length)return;const c=o[n],N=dn[c];N!=null?N().then((()=>te((()=>d(n+1))))).catch((()=>te((()=>d(n+1))))):d(n+1)};te((()=>d(0)))}),y)})())}),[p,L]);const P=r?.userRole!=null&&vs(r?.userRole),{isFeatureEnabled:Ye}=B(M.isReferralFeatureEnabled),qe=r?.userRole!=null&&r.userRole.includes("charge_card_user"),We=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),U=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!P,de=!Se&&!P,Xe=Os(E?.loggedInUserRoleMap),Ke=r.externalConnections?.accounting[0]?.isValid,Qe=r.externalConnections?.fetchState==="Completed",se=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!P,me=ce&&Ps(E?.loggedInUserRoleMap),_e=Fe&&!P,Je=Le&&!P,es=ue&&ws(E?.loggedInUserRoleMap),ss=de&&Us(E?.loggedInUserRoleMap),ns=_e&&Fs(E?.loggedInUserRoleMap),ts=Ls(E?.loggedInUserRoleMap),as=ks(E?.loggedInUserRoleMap),os=Vs(E?.loggedInUserRoleMap),rs=Hs(E?.loggedInUserRoleMap),is=Ss(E?.loggedInUserRoleMap),g=Bs(E?.loggedInUserRoleMap),x=Ns(E?.loggedInUserRoleMap),he=ue&&g,Ee=ce&&x,R=_e&&os,I=Je&&rs,m=de&&is,ls=r.excludedResources?.resources?.find((o=>o.resource==="/invites"))!=null||$e===!0||Xe===!0||ts===!0||as===!0;return D.isSignedIn()?f==null?j==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(T!=null&&j!=="In-Progress"&&A(ge(T.userId,T.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||j==="Completed"?(se===!0||X&&!J)&&Qe&&Ke!==!0&&h===!1&&K===!1&&re===!1?(a(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||se!==!0||J||X?!L||se!==!1||J||X?L&&r?.userRole&&h!=null&&K!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(qs,{children:e.jsxs(t,{element:e.jsx(tn,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Un,{isDashboardAccess:U,showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,isTenantCardsOnly:K,showChargeCardRoute:m})}),e.jsx(t,{path:"dashboard/*",element:U?e.jsx(Rn,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reports/*",element:U?e.jsx(mn,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"people/*",element:ls||U?e.jsx(hn,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"forecast/*",element:U?e.jsx(En,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(pn,{})}),e.jsx(t,{path:"transaction/*",element:U&&P===!1||qe||We?e.jsx(xn,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"transactions/*",element:U&&P===!1?e.jsx(fn,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"customer/*",element:U&&P===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isTenantBankingOnly:h,showTreasuryRoute:I,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"vendor/*",element:U&&P===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"tasks",element:e.jsx(wn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(On,{})}),e.jsx(t,{path:"address/*",element:es||me||ns||ss?e.jsx(_n,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"checking/*",element:R?e.jsx(jn,{}):e.jsx(C,{})}),e.jsx(t,{path:"treasury/*",element:I?e.jsx(An,{}):e.jsx(C,{})}),e.jsx(t,{path:"performance",element:ae===!0?e.jsx(bn,{}):e.jsx(we,{tenantEmailDomain:i})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ae===!0&&P===!1?e.jsx(Cn,{}):e.jsx(we,{tenantEmailDomain:i})}),e.jsx(t,{path:"notifications/*",element:e.jsx(Dn,{})}),e.jsx(t,{path:"vendors/*",element:Ge?e.jsx(gn,{}):e.jsx(C,{})}),e.jsx(t,{path:"bill/*",element:he?e.jsx(ve,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"bills/*",element:he?e.jsx(ve,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursement/*",element:Ee?e.jsx(Oe,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursements/*",element:Ee?e.jsx(Oe,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"settings/*",element:Be?e.jsx(In,{hasAdminLevelAccess:me}):e.jsx(C,{})}),e.jsx(t,{path:"invoicing/*",element:Me&&Ze?e.jsx(Tn,{}):e.jsx(C,{})}),e.jsx(t,{path:"cards/ask",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:Q}):e.jsx(C,{})}),e.jsx(t,{path:"cards/ask/:session_id",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:Q}):e.jsx(C,{})}),e.jsx(t,{path:"cards/*",element:m?e.jsx(yn,{}):e.jsx(C,{})}),e.jsx(t,{path:"rewards/*",element:Ye?e.jsx(vn,{}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo/",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Z?e.jsx(Pn,{isFileUploadEnabled:Q}):e.jsx(C,{})}),e.jsx(t,{path:"*",element:e.jsx(C,{})})]})}):null:(a(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(a(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),a(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{b as F,Mn as S};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-D9xsLz4C.js";import{a as d}from"./sentry-BMvyJSqc.js";import{h as Y,g as Z,u as T,i as V,j as C,l as H,n as z,o as k}from"./core-BomyDm3r.js";import{fE as w,YE as je,MU as ve,Yc as we,Yl as Ae,c8 as X,cT as De,cU as Ue,bq as Te,dd as _e,Fh as Re,YF as Me,Ol as Be,LL as Fe,LC as de,Lz as Le,Fl as ue,LF as pe,LI as ge,LO as W,Bx as ee,Fk as Oe,lt as $,lw as me,YG as Ye,mG as Ve,FD as Ne,UU as Ge,UV as $e,lr as Ze,YH as He,lu as Ke,u2 as Qe,UP as qe,UQ as ze,u6 as Je,hU as Xe,TP as q,hM as ae,hJ as We,hR as en,TQ as nn,FA as tn,YI as an,YJ as on,M0 as sn,l_ as rn,dX as fe,dY as he,YK as ln,gB as cn,U2 as dn,Fz as oe,gG as se,gF as un,Fy as pn,gE as gn,gD as mn,YL as fn,Tf as Ce,YM as hn,YN as Cn,YO as yn,YP as Sn,YQ as bn,YR as In,FG as xn,YS as En,Fx as ie,Fr as G,YT as kn,YU as Pn,YV as re,YW as jn,dQ as vn,YX as wn,YY as An,YZ as Dn,Tr as Un,c0 as Tn,c7 as _n,c6 as Rn,c1 as Mn,Y_ as Bn,c4 as Fn,c3 as Ln,c5 as On,c2 as Yn}from"./zeni-epic-state-C6RT9e71.js";import{bS as Vn,z as v,V as N,a7 as ne,c2 as Nn,h as K,M as te,y as L,f as ye,P as Se,c3 as Gn,l as $n,Y as be,c4 as Zn,ai as Hn,c5 as Kn,c6 as Qn,aq as qn,c7 as zn,p as Jn,c as Ie,c8 as Xn}from"./index-B9ZeVIAQ.js";import{n as B}from"./mui-CsJ_uybP.js";import{u as xe}from"./useTaskManagerAccess-fnX1J0jB.js";import{U as Wn}from"./AccountMappingScreen-1SU95X1g.js";import{t as et,A as nt}from"./AddressScreen-Cdr2j35I.js";import O from"./NotFoundScreen-DbwVF9lB.js";import{g as tt}from"./analyticsHelper-DFvWpT7U.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-BVwrIVJv.js";import{C as st}from"./CompanyPassportScreen-DmzRkUq5.js";import{M as R}from"./MobileAppDrawer-D8KSGZ8t.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-CAYfUMY-.js";import{q as le}from"./QBOConnectionScreen-DXBj5LWG.js";import{B as lt}from"./BillPayApprovalRoutes-C7TITJQ6.js";import{R as ct}from"./ReimbursementApprovalRoutes-CPaJiiXV.js";import"./recharts-CkiZYv6b.js";import"./analytics-DCG-BJ2B.js";import"./plaid-Bs9WL7ZA.js";import"./dnd-I9CGHlPV.js";import"./stripe-cKAAJElX.js";import"./lottie-DZ7H5U6k.js";import"./lexical-CYgmazu1.js";import"./pdf-BcamkVED.js";import"./utils-CZJ3iF9S.js";import"./accountMappingHelper-DCRT8uBQ.js";import"./routePaths-B7kYeIqd.js";import"./InboxNotificationsProvider-BY8P-Ihr.js";import"./empty-CgcXQukc.js";import"./pdf-lib-H_eegAHa.js";import"./index-7l3psPwp.js";import"./url-BfDVlhyh.js";import"./index-D0WIHul0.js";import"./decodeURIComponentSafe-BrV-0DZb.js";import"./ReimbursementApprovalRuleDetailScreen-zx_YxbPw.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="f4627022-1e5f-43ca-8a4b-41dcbadc2103",e._sentryDebugIdIdentifier="sentry-dbid-f4627022-1e5f-43ca-8a4b-41dcbadc2103")}catch{}})();const dt=B.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,7 +6,7 @@ import{j as a}from"./liveblocks-UOzcPsHa.js";import{a as d}from"./sentry-DHDsO12
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,ut=
|
|
9
|
+
`,ut=H((function(e,l){const o=w(e),i=we(e),r=Ae(e),n=l.roleMap.bill_pay_admin;return{isDisabled:(X(o?.userRole??[])||n)&&"readonly",billpayApprovalView:i,remiApproverView:r,analytics:K}}),(function(e,l){const{navigate:o,currentTenant:i}=l;return{onSetupApprovalRulesBillPaySectionClick:()=>{o("bills/approval-rules")},onSetupApprovalRulesRemiSectionClick:()=>{o("reimbursements/approval-rules")},onBackClick:()=>{i?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&i.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")}}}))(Nn),pt=()=>{const e=Y(),l=Z(),o=T(),{tenantEmailDomain:i}=V(),[r,n]=d.useState(!1),[t,s]=d.useState(!1),c=C((g=>w(g)));at();const u=C((g=>g.remiSetupApproverViewState.fetchState)),h=C((g=>je(g))),{isApprovalRulesV3Enabled:S,isLoading:m}=Vn(c?.tenantId),p=c.companyId??v.getSignedInUserTenant(i)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access Approval Rules settings page without signing in...");const b=N();d.useEffect((()=>{t||u!=="Not-Started"||m||c?.tenantId==null||(s(!0),o(ve(!0,!1,!1,S)))}),[t,u,m,S,c?.tenantId,o]);const E=g=>{n(g)};return b?.loggedInUserRoleMap!=null?a.jsxs(dt,{children:[a.jsx(R,{isAppContentDrawerOpen:r,handleDrawerToggle:E}),a.jsx(ut,{navigate:e,location:l,companyId:p,currentTenant:c,roleMap:b.loggedInUserRoleMap,onClickMenuIcon:()=>{E(!0)}})]}):a.jsx(ne,{fetchState:h.fetchState})},gt=B.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
height: 100%;
|
|
12
12
|
width: 100%;
|
|
@@ -14,7 +14,7 @@ import{j as a}from"./liveblocks-UOzcPsHa.js";import{a as d}from"./sentry-DHDsO12
|
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
align-items: center;
|
|
16
16
|
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
`,mt=
|
|
17
|
+
`,mt=H((function(e,l){const{companyId:o,isZeniAccountEnabled:i,isChargeCardEnabled:r,isBillPayEnabled:n,isRemiEnabled:t,isTreasuryEnabled:s}=l,c=w(e);return{bankSetupView:Me(e,o,n,t,i,r,s),connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:K}}),(function(e,l){const{navigate:o,currentTenant:i,companyId:r}=l;return{onFetchLinkTokenClick:(n,t,s)=>{e(ee(t,n,s))},onEstablishConnectionClick:(n,t,s)=>{e(W(n,r,t,s))},onUpdatePaymentAccountStatus:(n,t,s,c,u)=>{e(ge(n,t,u,c,s))},onUpdatePaymentAccountLoginStatus:(n,t,s,c)=>{e(pe(!1,n,c,s,t))},onEstablishConnectionSuccess:(n,t)=>{e(ue(t,n))},onUpdateAccountClick:(n,t,s,c,u)=>{e(u==="paymentAccount"?de(n,t,s,c):Le(c,n,t))},onUpdatePrimaryFundingAccount:(n,t,s)=>{e(Fe(r,t,n,s))},onRemoveConnection:n=>{e(Be(n))},onBackClick:()=>{i?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&i.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")}}}))(Gn),ft=()=>{const e=Y(),l=Z(),o=T(),{tenantEmailDomain:i}=V(),r=N(),{useFeatureGate:n}=te(),{isFeatureEnabled:t}=n(L.isChargeCardFeatureEnabled),{isFeatureEnabled:s}=n(L.isDebitCardFeatureEnabled),[c,u]=d.useState(!1),[h,S]=d.useState(!1),m=C((A=>w(A))),p=C((A=>A.settingsViewState.bankConnection.fetchState)),b=De(m,r?.loggedInUserRoleMap),E=Ue(m,r?.loggedInUserRoleMap),g=m?.userRole!=null&&Te(m.userRole),j=!!m.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!g,P=m.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!g,_=ye(m,t,s),D=_e(m,r?.loggedInUserRoleMap)&&_,{isCardsHidden:I}=Se(m?.tenantId),x=m.companyId??v.getSignedInUserTenant(i)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");d.useEffect((()=>{h||p==="Completed"||(S(!0),o(Re(!1)))}),[h,o,p]);const M=A=>{u(A)};return b||j||E||D?a.jsxs(gt,{children:[a.jsx(R,{isAppContentDrawerOpen:c,handleDrawerToggle:M}),a.jsx(mt,{navigate:e,location:l,companyId:x,currentTenant:m,roleMap:r.loggedInUserRoleMap,isBillPayEnabled:b,isRemiEnabled:E,isZeniAccountEnabled:j,isChargeCardEnabled:D,isChargeCardsHidden:I,isTreasuryEnabled:P,onClickMenuIcon:()=>{M(!0)}})]}):a.jsx(O,{})},ht=B.div`
|
|
18
18
|
display: flex;
|
|
19
19
|
height: 100%;
|
|
20
20
|
width: 100%;
|
|
@@ -22,7 +22,7 @@ import{j as a}from"./liveblocks-UOzcPsHa.js";import{a as d}from"./sentry-DHDsO12
|
|
|
22
22
|
flex-direction: column;
|
|
23
23
|
align-items: center;
|
|
24
24
|
background-color: ${e=>e.theme.colors.grey4};
|
|
25
|
-
`,Ct=
|
|
25
|
+
`,Ct=H((function(e,l){const{companyId:o}=l,i=w(e),r=l.roleMap.bill_pay_admin,n=Ye(e,o),{uiState:t}=n,s=(X(i?.userRole??[])||r)&&n.setupView.accountFetchStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.accountUpdateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{billingSetupView:n,uiState:t,stripeKey:be.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:i.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:s,analytics:K}}),(function(e,l){const{navigate:o,currentTenant:i,companyId:r}=l;return{onFetchLinkTokenClick:(n,t)=>{e(ee("billing_setup",n,t))},onEstablishConnectionClick:n=>{e(W(n,r,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(ue("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,t,s)=>{e(ge(n,t,"billing","billing_setup",s))},onUpdatePaymentAccountLoginStatus:(n,t)=>{e(pe(!1,n,"billing","billing_setup",t))},onUpdateAccountClick:(n,t)=>{e(de(n,t,"billing","billing_setup"))},onBackClick:()=>{i?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&i.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")},handleCreateCardSetupIntent:n=>{e(me(n))},handleConfirmCardSetupIntent:n=>{e(Ke(n))},updateCardPaymentModalState:n=>{e(He({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,t,s)=>{e(Ze(n,t,s))},handleFetchPaymentSources:()=>{e($())},resetCardPaymentViewState:()=>{e($e())},handleResetCardPaymentErrorStatuses:()=>{e(Ge())},onBillingAddressSave:n=>{e(Ne(n))},onAddressEditHandler:n=>{if(n!=null){const t=et(n);e(Ve({addressType:"subscription_billing_address",addressToCreate:t}))}}}}))(Zn),yt=()=>{const e=Y(),l=Z(),o=T(),{tenantEmailDomain:i}=V(),[r,n]=d.useState(!1),[t,s]=d.useState(!1),[c,u]=d.useState(!1),h=C((P=>w(P))),S=C((P=>P.cardPaymentViewState)),m=C((P=>P.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState)),p=$n(S.addCardPaymentSourceStatus.fetchState),b=S.addCardPaymentSourceStatus.fetchState,E=h.companyId??v.getSignedInUserTenant(i)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const g=N();d.useEffect((()=>{E!=null&&o(Oe(E,!1))}),[E,o]),d.useEffect((()=>{t||(s(!0),o($()))}),[t,o]),d.useEffect((()=>{c||(me(["card"]),u(!0))}),[c]),d.useEffect((()=>{p==="In-Progress"&&b==="Completed"&&o($())}),[p,b]);const j=P=>{n(P)};return g?.loggedInUserRoleMap!=null?a.jsxs(ht,{children:[a.jsx(R,{isAppContentDrawerOpen:r,handleDrawerToggle:j}),a.jsx(Ct,{navigate:e,location:l,companyId:E,currentTenant:h,roleMap:g.loggedInUserRoleMap,onClickMenuIcon:()=>{j(!0)},googleAPIKey:be.googleMapsAPIKey})]}):a.jsx(ne,{fetchState:m})},J="external_integrations",St=H((function(e){const l=ze(e,J);return{notifyMeRegisteredSlugs:new Set(l.map((o=>o.additionalInfo)).filter((o=>o!=null)))}}),(function(e,l){const{navigate:o,integrationsView:i,signedInUserEmail:r,tenantEmailDomain:n,tenantId:t}=l;return{onBackClick:()=>{o("../")},onNavigateToDashboard:()=>{o("../dashboard")},onReconnectQBO:()=>{le.init("/connection/auth",n),le.handleClick()},onRefreshClick:()=>{i.integrations.refreshQBO.fetchState!=="In-Progress"&&e(tn())},onSaveChargeBeeCredentials:(s,c)=>{const u=i.externalConnections?.revenue?.find((h=>h.connectionName==="chargebee"))?.connectionId;u!=null&&e(en(t,u,q("revenue"),nn("chargebee"),{api_key:s,site:c}))},onConnectHubSpot:(s,c)=>{const u=i.externalConnections?.revenue?.find((h=>h.connectionName==="hubspot"))?.connectionId;if(u!=null){const h=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:s,client_secret:c,connection_id:u,redirect_uri:h,tenant_id:t}));const S="oauth crm.objects.deals.read crm.objects.owners.read";window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(s)}&scope=${encodeURIComponent(S)}&redirect_uri=${encodeURIComponent(h)}`}},onDisconnect:(s,c)=>{e(We(t,s,q(c)))},onConnectGmail:()=>{e(ae(t,"gmail",window.location.href))},onConnectOutlook:()=>{e(ae(t,"outlook",window.location.href))},onSaveConnectorCredentials:s=>{e(Xe(t,q("payments"),s))},onNotifyMe:s=>{K.trackIntegrationsNotifyMeClicked("Settings",s),e(Je(J,s,r))}}}))(Kn),bt=()=>{const e=Hn(),l=Y(),o=T(),{tenantEmailDomain:i}=V(),{pendingAutoFocusTabId:r}=it(),[n,t]=d.useState(!1),s=C((I=>I.tenantState.fetchState)),c=C((I=>w(I))),u=c.companyId??v.getSignedInUserTenant(i)?.companyId,h=v.getSignedInUser(),S=N(),m=X(c.userRole??[]);if(h==null)throw Error("Can't access Integrations page without signing in...");d.useEffect((()=>{o(Qe(J))}),[o]);const[p,b]=d.useState(!1);d.useEffect((()=>{p||(b(!0),o($()))}),[p,o]);const E=I=>{t(I)},g=C((I=>qe(I,u))),j=C((I=>I.plaidAccountViewState.external_account.plaidConnectionDetails)),{plaidAccounts:P,onAddPlaidAccount:_,onReLoginPlaidAccount:D}=rt({companyId:u??c.companyId});return S?.loggedInUserRoleMap!=null?a.jsxs(It,{children:[a.jsx(R,{isAppContentDrawerOpen:n,handleDrawerToggle:E}),a.jsx(St,{navigate:l,meetingUrl:e("settings_integrations"),onClickMenuIcon:()=>{E(!0)},isAdmin:m,integrationsView:g,signedInUserEmail:h.userEmail??"",tenantEmailDomain:c.tenantEmailDomain??i??"",tenantId:c.tenantId,saveChargeBeeState:g.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:g.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:g.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:g.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:g.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(g.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map((([I,x])=>[I,x?.message]))),deleteConnectionState:g.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:g.externalConnections?.deleteConnectionError?.message,isLoading:s==="In-Progress",autoFocusTabId:r??void 0,plaidAccounts:P,onAddPlaidAccount:_,onReLoginPlaidAccount:D,plaidConnectionDetails:j})]}):a.jsx(ne,{fetchState:s})},It=B.div`
|
|
26
26
|
display: flex;
|
|
27
27
|
height: 100%;
|
|
28
28
|
width: 100%;
|
|
@@ -38,7 +38,7 @@ import{j as a}from"./liveblocks-UOzcPsHa.js";import{a as d}from"./sentry-DHDsO12
|
|
|
38
38
|
flex-direction: column;
|
|
39
39
|
align-items: center;
|
|
40
40
|
background-color: ${e=>e.theme.colors.grey4};
|
|
41
|
-
`,Et=()=>{const e=
|
|
41
|
+
`,Et=()=>{const e=T(),{tenantEmailDomain:l}=V(),[o,i]=d.useState(!1),r=C((p=>w(p))).companyId??v.getSignedInUserTenant(l)?.companyId,n=v.getSignedInUser();if(n==null)throw Error("Can't access my bank connections page without signing in...");const t=C((p=>an(p,n.userId))),s=C((p=>on(p,r,"bill_pay","user_reimbursement_account"))),{plaidConnectionDetails:c}=s,u=p=>{i(p)},h=d.useCallback((p=>{e(ee("user_reimbursement_account",p))}),[]),S=d.useCallback((p=>{e(W(p,r,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))}),[]);d.useEffect((()=>{t.fetchState!=="Completed"&&t.fetchState!=="In-Progress"&&e(sn(n.userId))}),[n.userId,t.fetchState]);const m=t.fetchState==="Not-Started"||t.fetchState==="In-Progress";return a.jsxs(xt,{children:[a.jsx(R,{isAppContentDrawerOpen:o,handleDrawerToggle:u}),a.jsx(Qn,{plaidConnectionDetails:c,isLoading:m,myBankConnectionsView:t,onFetchLinkTokenClick:h,onEstablishConnectionClick:S,onClickMenuIcon:()=>{u(!0)}})]})},kt=B.div`
|
|
42
42
|
display: flex;
|
|
43
43
|
height: 100%;
|
|
44
44
|
width: 100%;
|
|
@@ -46,4 +46,4 @@ import{j as a}from"./liveblocks-UOzcPsHa.js";import{a as d}from"./sentry-DHDsO12
|
|
|
46
46
|
flex-direction: column;
|
|
47
47
|
align-items: center;
|
|
48
48
|
background-color: ${e=>e.theme.colors.grey4};
|
|
49
|
-
`,ce=({appContent:e})=>{const l=
|
|
49
|
+
`,ce=({appContent:e})=>{const l=T(),o=Y(),i=Z(),[r,n]=d.useState(!1),t=C((y=>w(y))),{tenantEmailDomain:s}=t,c=t.companyId??v.getSignedInUserTenant(s)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:u}=te(),h=!!t.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:S}=u(L.isChargeCardFeatureEnabled),{isFeatureEnabled:m}=u(L.isDebitCardFeatureEnabled),p=t.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",b=C((y=>rn(y))),E=fe(t),g=he(m,t),j=!g&&b,P=ye(t,S,m),{isCardsHidden:_}=Se(t?.tenantId),D=!P||_,{areTenantIdsInSync:I}=qn();d.useEffect((()=>{I&&l(ln(c,j))}),[c,l,j,I]);const x=C((y=>cn(y,j))),M=x.fetchState==="Not-Started"||x.fetchState==="In-Progress"||c==null,A=dn(t),f=!!t.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=y=>{n(y)};return a.jsxs(kt,{children:[a.jsx(R,{isAppContentDrawerOpen:r,handleDrawerToggle:U}),e!=null?a.jsx(a.Fragment,{children:e}):a.jsx(zn,{myProfileView:x,isAccountingClassesEnabled:b,isReimbursementDisabled:f===!1,isZeniAccountsDisabled:h===!1,isChargeCardDisabled:D,isTreasuryDisabled:p===!1,isLiteRoleDisabled:A===!1,onClickMenuIcon:()=>{U(!0)},isLoading:M,isBankingOnlyTenant:g,isCardsOnlyTenant:E,onAddressClick:y=>{const F=(function(ke,Pe){let Q=`/${ke}/settings/my_profile`;return Q=Q.concat(`/new/${Pe}`),Q})(s,y),Ee=Jn(i.state?.pathnameStackToGoBack,i.pathname);o(F,{state:{pathnameStackToGoBack:Ee}})},onGetOtp:y=>{const F={...x.myProfileLocalData,phone:y};l(oe({localData:F})),l(mn(y,"MyProfile"))},onResendOtp:y=>{l(gn(y,"MyProfile"))},onCancelClick:()=>{l(pn())},onSaveClick:()=>{l(se("MyProfile",x.myProfileLocalData.phone,x.myProfileLocalData.otpChallenge,x.myProfileLocalData.dateOfBirth,x.addressData?.addressToCreate))},onVerifyOtp:(y,F)=>{l(un(y,F,"MyProfile"))},onVerifyOtpSuccess:y=>{y!=null&&v.saveZeniOtpToken(y),l(se("MyProfile",x.myProfileLocalData.phone,x.myProfileLocalData.otpChallenge,x.myProfileLocalData.dateOfBirth,x.addressData?.addressToCreate))},updateMyProfileLocalData:y=>{l(oe({localData:y}))}})]})};function Pt(){const e=T(),l=C((f=>w(f))),o=l.companyId,i=l.tenantId,r=C((f=>fn(f))),n=C((f=>Ce(f))),t=C((f=>hn(f.notificationRegistryState))),s=C((f=>Cn(f))),c=C((f=>yn(f))),u=Ie(),{isZeniUser:h,isNotificationControlsEnabled:S}=xe(u),[m,p]=d.useState(!1),b=d.useCallback((f=>{p(f)}),[]),E=d.useCallback((f=>{e(Sn(f))}),[]),g=d.useCallback((()=>{u?.userEmail!=null&&e(bn({loggedInUserEmail:u.userEmail})),e(In())}),[u?.userEmail]),j=d.useCallback((()=>{e(xn()),c&&e(En())}),[c]);if(u==null)throw Error("Can't access Notification Settings page without signing in...");const P=d.useCallback((()=>{const f=n.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ie(f,o)),e(G())}),[o,n.notificationSettings.monthEndInsightsNotificationSettings.enabled]),_=d.useCallback((()=>{e(kn())}),[]),D=d.useCallback(((f,U,y)=>{e(Pn({eventId:f,channel:re(U),enabled:y}))}),[e]),I=d.useCallback(((f,U)=>{e(jn({groupId:f,frequency:vn(U)}))}),[e]),x=d.useCallback(((f,U,y)=>{e(wn({groupId:f,channel:re(U),enabled:y}))}),[e]),M=d.useMemo((()=>{if(S&&t!=null)return{isZeniUser:h,registry:t,preferences:s,onToggleEventChannel:D,onSetGroupFrequency:I,onSetGroupChannelMaster:x}}),[S,h,t,s,D,I,x]);d.useEffect((()=>{i!=null&&n.fetchState==="Not-Started"&&e(G())}),[e,i,n.fetchState]);const A=d.useRef(i);return d.useEffect((()=>{A.current!==i&&(e(An()),e(Dn()),e(G()),A.current=i)}),[e,i]),d.useEffect((()=>{if(n.fetchState==="Completed"&&r.fetchState!=="In-Progress"&&r.fetchState!=="Completed"){const f=n.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ie(f,o))}}),[r.fetchState,o,n.notificationSettings.monthEndInsightsNotificationSettings.enabled,n.fetchState]),a.jsxs(a.Fragment,{children:[a.jsx(R,{isAppContentDrawerOpen:m,handleDrawerToggle:b}),a.jsx(Xn,{notificationSettingsView:r,onFormDataChange:E,onCancel:g,onSave:j,onClickMenuIcon:()=>{b(!0)},signedInUser:u,onRefresh:P,resetUpdateStatus:_,taskNotifications:M,isTaskNotificationsDirty:c})]})}function da(e){const[l,o]=d.useState(!1),i=C((b=>Ce(b))),r=C((b=>w(b))),n=N(),t=Ie(),s=T(),{useFeatureGate:c}=te(),{isFeatureEnabled:u}=c(L.isDebitCardFeatureEnabled),{isTaskManagerAccessEnabled:h}=xe(t),S=t?.userEmail==null||i.fetchState!=="Completed"||Un(i.notificationSettings,t.userEmail,u,r,h);d.useEffect((()=>{i.fetchState!=="In-Progress"&&i.fetchState!=="Completed"&&l===!1&&(o(!0),s(G()))}),[i.fetchState,l]);const m=he(u,r),p=fe(r);return i.fetchState!=="In-Progress"&&i.fetchState!=="Not-Started"||S!==!0?Tn(r)?a.jsxs(z,{children:[_n(n?.loggedInUserRole??[],u,r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"accounting/*",element:a.jsx(Wn,{})}),Rn(n?.loggedInUserRole??[],u,r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"approval_rules/*",element:a.jsx(jt,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),Mn(r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"my_bank_connections",element:a.jsx(Et,{})}),Bn(r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"bank_connections",element:a.jsx(ft,{})}),Fn(r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"business_verification",element:a.jsx(ot,{productType:m?"zeni_accounts":p?"charge_cards":tt(r,n?.loggedInUserRoleMap)})}),Ln(n?.loggedInUserRole??[],r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"company_details",element:a.jsx(st,{})}),On(n?.loggedInUserRole??[],r)&&a.jsx(k,{path:"billing",element:a.jsx(yt,{})}),Yn(n?.loggedInUserRole??[],u,r)&&a.jsx(k,{path:"integrations",element:a.jsx(bt,{})}),a.jsx(k,{path:"my_profile/new/:addressType",element:a.jsx(ce,{appContent:a.jsx(nt,{isSubPage:!1})})}),a.jsx(k,{path:"my_profile",element:a.jsx(ce,{})}),S&&a.jsx(k,{path:"notifications",element:a.jsx(Pt,{})}),a.jsx(k,{path:"*",element:a.jsx(O,{})})]}):a.jsx(z,{children:a.jsx(k,{path:"*",element:a.jsx(O,{})})}):null}function jt(e){return a.jsxs(z,{children:[a.jsx(k,{path:"/",element:a.jsx(pt,{})}),a.jsx(k,{path:"bills/approval-rules/*",element:a.jsx(lt,{})}),a.jsx(k,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?a.jsx(ct,{}):a.jsx(O,{})}),a.jsx(k,{path:"*",element:a.jsx(O,{})})]})}export{da as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-
|
|
1
|
+
import{j as u}from"./liveblocks-D9xsLz4C.js";import{h as J,g as Q,u as ee,i as W,j as v,N as j,l as G,t as Qe}from"./core-BomyDm3r.js";import{bJ as en,fE as F,cG as nn,H6 as Z,Yc as tn,Yf as an,ul as ne,u9 as te,my as ae,B3 as L,Yh as Ce,gF as $e,gE as We,gD as Ge,Yi as sn,Hf as on,LL as he,LC as Ie,Lz as Ae,Lh as X,LF as _e,LI as ke,LO as ve,Bx as Pe,gZ as cn,cB as rn,dY as un,dX as dn,dh as ln,bt as pn,cu as Fe,Yj as mn,Kh as de,KV as yn,Yk as fn,bK as gn,N4 as le,MU as Sn,Yl as bn,Ym as Cn,N8 as hn,Nc as In,Yn as je,AY as An,RA as _n,NK as be,Oz as pe,Yo as kn,Yp as vn,Yq as Pn,Yr as He,Ys as Tn,UD as En,Xt as Dn,US as Un,Yt as Ke,Ll as wn,UT as On,Lp as Fn,Yu as Oe,NU as qe,mG as xn,uc as Xe,B5 as Vn,bE as Ne,Bh as Le,cE as Bn,Yv as Je,Nr as jn,Ns as Nn,Nw as Ln,Yw as Rn,NN as Re,Yx as zn,Yy as Mn,Yz as Yn,YA as Zn,gU as $n,Iq as Wn,YB as Gn,Iv as Hn,Iu as Kn}from"./zeni-epic-state-C6RT9e71.js";import{ai as Te,V as ie,M as me,y as q,E as Ee,z as E,a8 as se,h as D,a7 as De,S as $,bP as qn,ae as oe,bQ as x,bi as xe,bR as Xn,bS as Jn,bT as Qn,n as Be,bU as et,p as ze,aG as Me,a1 as nt,ab as tt,bV as at,bW as it,bX as st,w as ot}from"./index-B9ZeVIAQ.js";import{a as h}from"./sentry-BMvyJSqc.js";import{n as Ve,D as ct,S as rt}from"./mui-CsJ_uybP.js";import{u as ut,B as we}from"./BusinessVerificationPageScreen-BVwrIVJv.js";import{M as ye}from"./MobileAppDrawer-D8KSGZ8t.js";import N from"./NotFoundScreen-DbwVF9lB.js";import{a as Ye}from"./analyticsHelper-DFvWpT7U.js";import{d as Ze}from"./routePaths-B7kYeIqd.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="076c11a7-3fd5-47a4-bca6-7ccb37ee34fa",e._sentryDebugIdIdentifier="sentry-dbid-076c11a7-3fd5-47a4-bca6-7ccb37ee34fa")}catch{}})();const dt=Ve.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,7 +6,7 @@ import{j as u}from"./liveblocks-UOzcPsHa.js";import{h as Q,g as X,u as ee,i as G
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,lt=H((function(e,o){const{isUserBillPayAdmin:a,companyId:t}=o,r=F(e),n=tn(e),i=E.getSignedInUser(),l=r.tenantId,s={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:l??""},c=an(e,t),p=a&&c.updateStatus.fetchState!=="In-Progress"&&c.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&c.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&c.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly";return{billPaySetupView:c,connectedAccountProvider:r.company?.featuresActivationInfo.connectedAccountProvider??"",showIntlWiseWidget:o.showIntlWiseWidget,isDisabled:p,billpayApprovalView:n,analytics:D,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:s}}),(function(e,o){const{navigate:a,companyId:t,currentTenant:r}=o;return{onBusinessVerificationSectionClick:()=>{a("../verification"),r?.company?.companyBillPayInfo!=null&&r?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e($(t,!1,!0))},onSetupApprovalRulesSectionClick:()=>{a("../approval-rules")},onFetchLinkTokenClick:(n,i)=>{e(Pe("bill_pay_setup",n,i))},onEstablishConnectionClick:n=>{e(ve(n,t,"bill_pay_setup","bill_pay"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(ke(n,i,"bill_pay","bill_pay_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(_e(!1,n,"bill_pay","bill_pay_setup",i))},onEstablishConnectionSuccess:()=>{e($(t,!0))},onEnableBillPayClick:()=>{e(J(t,"bill_pay"))},onUpdateAccountClick:(n,i,l)=>{e(l==="paymentAccount"?Ie(n,i,"bill_pay","bill_pay_setup"):Ae("reimbursement_setup",n,i))},onUpdatePrimaryFundingAccount:(n,i)=>{e(he(t,"bill_pay_setup",n,i))},onEnableBillPaySuccess:()=>{a("../",{relative:"path"})},onBackClick:()=>{r?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&r.companyBillPayInfo.info.isBillPayEnabled===!1?a("../.."):a("../",{relative:"path"})},onAcceptUpdatedTOS:()=>{e(on(t))},onAcceptUpdatedTOSSuccess:()=>{e($(t,!0))},onGetOtp:(n,i)=>{e(He(n,"SpendManagementSetup")),i!=null&&e(sn({officerType:i,phone:n}))},onResendOtp:n=>{e(Ge(n,"SpendManagementSetup"))},onVerifyOtp:(n,i)=>{e(We(n,i,"SpendManagementSetup"))},onVerifyOtpSuccess:(n,i)=>{n!=null&&i!=null&&e(R(t,n,"bill_pay",!0,!0))},onNavigateToDashboard:()=>{a("../../dashboard")},onNavigateToSettings:()=>{a("../bills/setup")},onInternationPaymentSetUpClick:()=>{a("../international-wire")},onCompanyOfficerUpdated:(n,i)=>{e(Ce({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(R(t,n,"bill_pay",!0,!0,!0))},updateFilesEntity:n=>{e(ae({files:n}))},onDeleteFile:n=>{e(te(n))},onEditFileName:(n,i)=>{e(ne(n,i.split(".")[0]))}}}))(qn),pt=()=>{const e=Te(),o=Q(),a=X(),t=ee(),{tenantEmailDomain:r}=G(),n=ie(),i=en(n?.loggedInUserRoleMap),{useFeatureGate:l}=me(),{isFeatureEnabled:s}=l(q.billPaySetupShowInternationalPaymentByWise),{isFeatureEnabled:c}=l(q.isBillPayLocalCurrencyFeatureEnabled),p=Ee(),[g,S]=h.useState(!1),_=h.useRef(!1),I=v((m=>m.billPaySetupViewState.fetchState)),d=v((m=>F(m)));ut();const y=d.companyId??E.getSignedInUserTenant(r)?.companyId;if(E.getSignedInUser()==null)throw Error("Can't access bill pay setup page without signing in...");const f=!!d.companyBillPayInfo?.info?.isBillPayTOSAccepted,P=nn(n?.loggedInUserRoleMap);h.useEffect((()=>{_.current||I!=="Not-Started"||y==null?_.current||I!=="Completed"||y==null||d.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(_.current=!0,t($(y,!1,!0))):(_.current=!0,t($(y,!0)))}),[I,y,t]);const b=m=>{S(m)};if(f===!1||P&&!n?.loggedInUserRoleMap?.bill_pay_admin)return u.jsx(j,{to:"../promo"});if(f===!0&&n?.loggedInUserRoleMap!=null){const m=C=>C.trackPageLoaded(W.Event.billPaySetup);return u.jsxs(dt,{children:[u.jsx(se,{analytics:D,onLoad:C=>m(C)}),u.jsx(ye,{isAppContentDrawerOpen:g,handleDrawerToggle:b}),u.jsx(lt,{navigate:o,location:a,companyId:y,currentTenant:d,isUserBillPayAdmin:i,showIntlWiseWidget:s,meetingUrl:e("bill_pay_setup"),onClickMenuIcon:()=>{b(!0)},isLocalCurrencyEnabled:c})]})}return u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:p.colors.grey5}})},$t=(e,o)=>e!=null&&(function(a){return a==="debit"||a==="credit"||a==="debit_and_credit"})(e)?e:o,Wt=e=>`/${e}/cards`,Gt=e=>`/${e}/cards/setup`,Ht=e=>`/${e}/cards/onboard`,Yt=(e,o,a,t,r=!1)=>{let n=`/${e}/cards/${encodeURIComponent(o)}`;return t==null||t.status.code!=="inactive"||t.cardHolderUserId!==a.userId||t.type.code!=="business_physical_credit_card"&&t.type.code!=="business_physical_debit_card"?t!=null&&t.status.code==="active"&&t.cardHolderUserId===a.userId&&t.type.code==="business_physical_credit_card"&&r===!0?n+="/addToWallet":t==null||t.type.code!=="business_physical_debit_card"&&t.type.code!=="business_virtual_debit_card"||t.status.code!=="active"||t.cardHolderUserId!==a.userId||t.isPinSet!==!1||(n+="/setPin"):n+="/activate",n},Kt=(e,o)=>e.find((a=>a.id===o)),qt=(e,o,a)=>!e||!o||a.fetchState==="Completed",mt=(e,o,a,t)=>({isCreditCardOffered:e,isDebitCardOffered:o,isDebitCardEnabled:a,isCreditCardEnabled:t}),Jt=(e,o)=>e?{creditCardCashbackOffer:`${o.cashbackAnalytics.creditCardCashbackOffer}%`,debitCardCashbackOffer:`${o.cashbackAnalytics.debitCardCashbackOffer}%`,totalEarnedCashback:V(o.cashbackSummary.cashbackEarned.amount),redeemedCashback:V(o.cashbackSummary.cashbackRedeemed.amount),availableCashback:V(o.cashbackSummary.cashbackAvailable.amount),creditCardCashbackRedemptionMode:o.cashbackAnalytics.creditCardCashbackRedemptionMode,debitCardCashbackRedemptionMode:o.cashbackAnalytics.debitCardCashbackRedemptionMode}:void 0,Qt=(e,o,a,t,r)=>e&&o&&a?{creditAccountId:t.id,creditAccountLimit:V(t.limit.amount),creditAccountAvailableAmount:V(t.available.amount),creditAccountSpentAmount:V(t.balance.amount+t.hold.amount),creditAccountStatus:t.status,outstandingBalance:V(r.remainingAmountDue.amount)}:void 0,Xt=(e,o,a,t,r)=>e&&o&&a?{debitAccountId:t.depositAccounts.map((n=>n.id)),debitAccountName:t.depositAccounts.map((n=>n.accountName)),debitAccountBalance:t.depositAccounts.map((n=>V(n.accountBalance.available.amount))),debitCardsSpend:V(r?.currentMonthSpends.amount??0),debitAccountStatus:t.depositAccounts.map((n=>n.accountStatus))}:void 0,ea=(e,o)=>e&&o.depositAccountLimit!=null&&o.chargeCard!=null?{debitAccountId:o.depositAccountLimit.id,debitAccountName:o.depositAccountLimit?.accountName??o.connectedAccount?.accountName,debitAccountBalance:V(o.depositAccountLimit?.accountBalance.available.amount),debitCardsSpend:V(o.chargeCard.limit.amount-o.chargeCard.available.amount),debitAccountStatus:o.depositAccountLimit?.accountStatus??o.connectedAccount?.accountStatus}:void 0,na=80,ta=80,aa=e=>e.companyId??E.getSignedInUserTenant(e.tenantEmailDomain)?.companyId,yt=({isBankingOnlyTenant:e,isDebitCardFeatureEnabled:o})=>o||e,ft=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:a,isDebitCardProductVisible:t,chargeCardsCreditAccountLimit:r})=>(e||o||a)&&(!t||r>0),ia=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:a})=>e||o||a,sa=({cardInfo:e,isProductVisible:o,isTOSAccepted:a,isSetupEnabled:t,isUserHasCardsAdminLevelAccess:r,isUserHasCardsAccess:n})=>!!e&&o&&(!a&&r||n&&!r&&!t),gt=H((function(e,o){const{isUserChargeCardAdmin:a,chargeCardSetUpView:t,isDebitCardOnlyEnabled:r,isCreditCardOnlyEnabled:n}=o,i=F(e),l=E.getSignedInUser(),s=i.tenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""},p=a&&t.updateStatus.fetchState!=="In-Progress"&&t.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&t.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&t.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly";return{chargeCardSetUpView:t,connectedAccountProvider:i.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:p,analytics:D,isDebitCardOnlyEnabled:r,isCreditCardOnlyEnabled:n,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:c}}),(function(e,o){const{navigate:a,companyId:t,currentTenant:r,chargeCardSetUpView:n,isDebitCardTOSAccepted:i,isChargeCardTOSAccepted:l,isChargeCardSetupEnabled:s,isDebitCardSetupEnabled:c,productInformation:p,controllerEmails:g,businessVerificationStatus:S,isCardPolicyEnabled:_,isUserChargeCardAdmin:I}=o;return{onBusinessVerificationSectionClick:()=>{D.trackCardsVerifyIdentityCompanyDetailsClick(g,p,S?.code),a("../verification"),r?.company?.companyChargeCardInfo!=null&&r.company.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(de(t,!1,!0))},...I&&_?{onCardPolicySectionClick:()=>{a("../policy")}}:{},onFetchLinkTokenClick:(d,y)=>{e(Pe("charge_card_setup",d,y))},onEstablishConnectionClick:d=>{e(ve(d,t,"charge_card_setup","charge_cards"))},onUpdatePaymentAccountStatus:(d,y,f)=>{e(ke(d,y,"charge_cards","charge_card_setup",f))},onUpdatePaymentAccountLoginStatus:(d,y)=>{e(_e(!1,d,"charge_cards","charge_card_setup",y))},onEstablishConnectionSuccess:()=>{e(de(t,!0))},onEnableChargeCardClick:()=>{D.trackCardsEnableCardsClick(g,p,"Cards Card Setup"),l===!0&&i===!0&&s===!1&&c===!1?e(J(t,"charge_cards__debit_cards")):l===!0&&s===!1?e(J(t,"charge_cards")):i===!0&&c===!1&&e(J(t,"debit_cards"))},onUpdateChargeCardClick:(d,y,f)=>{const P=n.allBankAccounts.find((m=>m.accountId===n.primaryFundingAccount?.zeniAccountId)),b=n.allBankAccounts.find((m=>m.accountId===d));D.trackCardsZeniCashAccountChangeClick(g,p,{oldZeniCashAccount:P?.accountName??"",newZeniCashAccount:b?.accountName??"",oldZeniCashAccountPosition:n.allBankAccounts.findIndex((m=>m.accountId===n.primaryFundingAccount?.zeniAccountId))+1,newZeniCashAccountPosition:n.allBankAccounts.findIndex((m=>m.accountId===d))+1,numberOfCashAccounts:n.allBankAccounts.length}),e(f==="paymentAccount"?Ie(d,y,"charge_cards","charge_card_setup"):Ae("charge_card_setup",d,y))},onUpdatePrimaryFundingAccount:(d,y)=>{const f=n.allFundingAccounts.find((m=>m.id===d)),P=n.allFundingAccounts.findIndex((m=>m.id===n.primaryFundingAccount?.id))+1,b=n.allFundingAccounts.findIndex((m=>m.id===d))+1;D.trackCardsPaymentAccountChangeClick(g,p,{oldPaymentAccountName:n.primaryFundingAccount?.label??"",oldPaymentAccountBalance:V(n.primaryFundingAccount?.accountBalance?.available?.amount??0),newPaymentAccountName:f?.label??"",newPaymentAccountBalance:V(f?.accountBalance?.available?.amount??0),isOldPaymentAccountRecommended:n.primaryFundingAccount?.accType==="depositAccount",isNewPaymentAccountRecommended:f?.accType==="depositAccount",oldPaymentAccountPosition:P,newPaymentAccountPosition:b,numberOfPaymentAccounts:n.allFundingAccounts.length}),e(he(t,"charge_card_setup",d,y))},onEnableChargeCardSuccess:()=>{e(fn()),a("../",{relative:"path"})},onBackClick:()=>{r?.companyChargeCardInfo?.info?.isChargeCardEnabled||r?.companyDebitCardInfo?.info?.isDebitCardEnabled?a("../",{relative:"path"}):a("../..",{relative:"path"})},onNavigateToDashboard:()=>{a("../../dashboard")},onCompanyOfficerUpdated:(d,y)=>{e(Ce({officerType:d,fileIds:y}))},onSendForVerificationClick:d=>{l===!0&&i===!0?e(R(t,d,"charge_cards__debit_cards",!0,!0,!0)):l===!0?e(R(t,d,"charge_cards",!0,!0,!0)):i===!0&&e(R(t,d,"debit_cards",!0,!0,!0))},updateFilesEntity:d=>{e(ae({files:d}))},onDeleteFile:d=>{e(te(d))},onEditFileName:(d,y)=>{e(ne(d,y.split(".")[0]))},onUpdateAutoPayClick:d=>{e(yn(t,d))}}}))(Jn),St=()=>{const e=Te(),o=Q(),a=X(),t=ee(),{tenantEmailDomain:r}=G(),n=ie(),i=v((L=>F(L))),{useDynamicConfig:l,useFeatureGate:s}=me(),c=a.state?.pathnameStackToGoBack?.[0],{configValue:p}=l(Ve.zeniCardsConfig),g=p.credit_card_auto_pay_threshold_by_company_id?.[i.companyId]??p.default_credit_card_auto_pay_threshold??80,{isFeatureEnabled:S}=s(q.isDebitCardFeatureEnabled),{isFeatureEnabled:_}=s(q.isChargeCardFeatureEnabled),{isFeatureEnabled:I}=s(q.isEarlyPayFeatureEnabled),{isFeatureEnabled:d}=s(q.isCardPolicyEnabled),y=v((L=>cn(L,i.companyId))),f=rn(y.controllers),P=!!i.company?.companyChargeCardInfo.isChargeCardEnabled,b=!!i.company?.companyDebitCardInfo.isDebitCardEnabled,m=un(S,i),C=yt({isDebitCardFeatureEnabled:S,isBankingOnlyTenant:m}),k=dn(i),T=ln(i),A=i.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,U=ft({isCardsOnlyTenant:k,isChargeCardFeatureEnabled:_,isBookKeepingTenant:T,isDebitCardProductVisible:C,chargeCardsCreditAccountLimit:A}),M=C&&U===!1,x=C===!1&&U,z=pn(n?.loggedInUserRoleMap),O=Fe(n?.loggedInUserRoleMap),[ce,Y]=h.useState(!1),[K,re]=h.useState(!1),Z=v((L=>L.chargeCardSetupViewState.fetchState)),B=E.getSignedInUserTenant(r)?.companyId??i.companyId,w=E.getSignedInUser(),Ue=L=>{Y(L)},fe=v((L=>mn(L,B)));if(w==null)throw Error("Can't access charge card setup page without signing in...");h.useEffect((()=>{K||Z!=="Not-Started"||B==null?K||Z!=="Completed"||B==null||i.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(de(B,!1,!0)):(re(!0),t(de(B,!0)))}),[K,Z,B,t]);const ge=!!i.company?.companyChargeCardInfo.isChargeCardTOSAccepted,Se=!!i.company?.companyDebitCardInfo.isDebitCardTOSAccepted,ue=mt(U,C,b,P);return ge||Se?ge||Se?u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:D,onLoad:()=>{D.trackPageLoaded(W.Event.cardsSetupVisited),D.trackCardsCardSetupView(f,ue,c==null?"Cards Setup":c.includes("cards/promo")?"Promo":c.includes("cards")?"Settings":"Cards Tab")}}),u.jsx(ye,{isAppContentDrawerOpen:ce,handleDrawerToggle:Ue}),u.jsx(gt,{autoPayThreshold:g,navigate:o,meetingUrl:e("charge_card_setup"),location:a,companyId:B,currentTenant:i,isEarlyPayEnabled:I,isChargeCardTOSAccepted:ge,isDebitCardTOSAccepted:Se,isUserChargeCardAdmin:z,isCardPolicyEnabled:d,isDebitCardOnlyEnabled:M,isCreditCardOnlyEnabled:x,chargeCardSetUpView:fe,isCreditCardProductVisible:U,isDebitCardFeatureEnabled:C,isChargeCardSetupEnabled:P,isDebitCardSetupEnabled:b,businessVerificationStatus:i.companyBillPayInfo?.info?.businessVerificationStatus,controllerEmails:f,productInformation:ue,onClickMenuIcon:()=>{Ue(!0)},hasZeniAccountsAdminAccess:O})]}):u.jsx(De,{fetchState:"Not-Started"}):u.jsx(j,{to:"../promo"})},bt=xe.div`
|
|
9
|
+
`,lt=G((function(e,o){const{isUserBillPayAdmin:a,companyId:t}=o,r=F(e),n=tn(e),i=E.getSignedInUser(),l=r.tenantId,s={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:l??""},c=an(e,t),p=a&&c.updateStatus.fetchState!=="In-Progress"&&c.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&c.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&c.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly";return{billPaySetupView:c,connectedAccountProvider:r.company?.featuresActivationInfo.connectedAccountProvider??"",showIntlWiseWidget:o.showIntlWiseWidget,isDisabled:p,billpayApprovalView:n,analytics:D,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:s}}),(function(e,o){const{navigate:a,companyId:t,currentTenant:r}=o;return{onBusinessVerificationSectionClick:()=>{a("../verification"),r?.company?.companyBillPayInfo!=null&&r?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(Z(t,!1,!0))},onSetupApprovalRulesSectionClick:()=>{a("../approval-rules")},onFetchLinkTokenClick:(n,i)=>{e(Pe("bill_pay_setup",n,i))},onEstablishConnectionClick:n=>{e(ve(n,t,"bill_pay_setup","bill_pay"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(ke(n,i,"bill_pay","bill_pay_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(_e(!1,n,"bill_pay","bill_pay_setup",i))},onEstablishConnectionSuccess:()=>{e(Z(t,!0))},onEnableBillPayClick:()=>{e(X(t,"bill_pay"))},onUpdateAccountClick:(n,i,l)=>{e(l==="paymentAccount"?Ie(n,i,"bill_pay","bill_pay_setup"):Ae("reimbursement_setup",n,i))},onUpdatePrimaryFundingAccount:(n,i)=>{e(he(t,"bill_pay_setup",n,i))},onEnableBillPaySuccess:()=>{a("../",{relative:"path"})},onBackClick:()=>{r?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&r.companyBillPayInfo.info.isBillPayEnabled===!1?a("../.."):a("../",{relative:"path"})},onAcceptUpdatedTOS:()=>{e(on(t))},onAcceptUpdatedTOSSuccess:()=>{e(Z(t,!0))},onGetOtp:(n,i)=>{e(Ge(n,"SpendManagementSetup")),i!=null&&e(sn({officerType:i,phone:n}))},onResendOtp:n=>{e(We(n,"SpendManagementSetup"))},onVerifyOtp:(n,i)=>{e($e(n,i,"SpendManagementSetup"))},onVerifyOtpSuccess:(n,i)=>{n!=null&&i!=null&&e(L(t,n,"bill_pay",!0,!0))},onNavigateToDashboard:()=>{a("../../dashboard")},onNavigateToSettings:()=>{a("../bills/setup")},onInternationPaymentSetUpClick:()=>{a("../international-wire")},onCompanyOfficerUpdated:(n,i)=>{e(Ce({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(L(t,n,"bill_pay",!0,!0,!0))},updateFilesEntity:n=>{e(ae({files:n}))},onDeleteFile:n=>{e(te(n))},onEditFileName:(n,i)=>{e(ne(n,i.split(".")[0]))}}}))(qn),pt=()=>{const e=Te(),o=J(),a=Q(),t=ee(),{tenantEmailDomain:r}=W(),n=ie(),i=en(n?.loggedInUserRoleMap),{useFeatureGate:l}=me(),{isFeatureEnabled:s}=l(q.billPaySetupShowInternationalPaymentByWise),{isFeatureEnabled:c}=l(q.isBillPayLocalCurrencyFeatureEnabled),p=Ee(),[g,S]=h.useState(!1),_=h.useRef(!1),I=v((m=>m.billPaySetupViewState.fetchState)),d=v((m=>F(m)));ut();const y=d.companyId??E.getSignedInUserTenant(r)?.companyId;if(E.getSignedInUser()==null)throw Error("Can't access bill pay setup page without signing in...");const f=!!d.companyBillPayInfo?.info?.isBillPayTOSAccepted,P=nn(n?.loggedInUserRoleMap);h.useEffect((()=>{_.current||I!=="Not-Started"||y==null?_.current||I!=="Completed"||y==null||d.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(_.current=!0,t(Z(y,!1,!0))):(_.current=!0,t(Z(y,!0)))}),[I,y,t]);const b=m=>{S(m)};if(f===!1||P&&!n?.loggedInUserRoleMap?.bill_pay_admin)return u.jsx(j,{to:"../promo"});if(f===!0&&n?.loggedInUserRoleMap!=null){const m=C=>C.trackPageLoaded($.Event.billPaySetup);return u.jsxs(dt,{children:[u.jsx(se,{analytics:D,onLoad:C=>m(C)}),u.jsx(ye,{isAppContentDrawerOpen:g,handleDrawerToggle:b}),u.jsx(lt,{navigate:o,location:a,companyId:y,currentTenant:d,isUserBillPayAdmin:i,showIntlWiseWidget:s,meetingUrl:e("bill_pay_setup"),onClickMenuIcon:()=>{b(!0)},isLocalCurrencyEnabled:c})]})}return u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:p.colors.grey5}})},Zt=(e,o)=>e!=null&&(function(a){return a==="debit"||a==="credit"||a==="debit_and_credit"})(e)?e:o,$t=e=>`/${e}/cards`,Wt=e=>`/${e}/cards/setup`,Gt=e=>`/${e}/cards/onboard`,Ht=(e,o,a,t,r=!1)=>{let n=`/${e}/cards/${encodeURIComponent(o)}`;return t==null||t.status.code!=="inactive"||t.cardHolderUserId!==a.userId||t.type.code!=="business_physical_credit_card"&&t.type.code!=="business_physical_debit_card"?t!=null&&t.status.code==="active"&&t.cardHolderUserId===a.userId&&t.type.code==="business_physical_credit_card"&&r===!0?n+="/addToWallet":t==null||t.type.code!=="business_physical_debit_card"&&t.type.code!=="business_virtual_debit_card"||t.status.code!=="active"||t.cardHolderUserId!==a.userId||t.isPinSet!==!1||(n+="/setPin"):n+="/activate",n},Kt=(e,o)=>e.find((a=>a.id===o)),qt=(e,o,a)=>!e||!o||a.fetchState==="Completed",mt=(e,o,a,t)=>({isCreditCardOffered:e,isDebitCardOffered:o,isDebitCardEnabled:a,isCreditCardEnabled:t}),Xt=(e,o)=>e?{creditCardCashbackOffer:`${o.cashbackAnalytics.creditCardCashbackOffer}%`,debitCardCashbackOffer:`${o.cashbackAnalytics.debitCardCashbackOffer}%`,totalEarnedCashback:x(o.cashbackSummary.cashbackEarned.amount),redeemedCashback:x(o.cashbackSummary.cashbackRedeemed.amount),availableCashback:x(o.cashbackSummary.cashbackAvailable.amount),creditCardCashbackRedemptionMode:o.cashbackAnalytics.creditCardCashbackRedemptionMode,debitCardCashbackRedemptionMode:o.cashbackAnalytics.debitCardCashbackRedemptionMode}:void 0,Jt=(e,o,a,t,r)=>e&&o&&a?{creditAccountId:t.id,creditAccountLimit:x(t.limit.amount),creditAccountAvailableAmount:x(t.available.amount),creditAccountSpentAmount:x(t.balance.amount+t.hold.amount),creditAccountStatus:t.status,outstandingBalance:x(r.remainingAmountDue.amount)}:void 0,Qt=(e,o,a,t,r)=>e&&o&&a?{debitAccountId:t.depositAccounts.map((n=>n.id)),debitAccountName:t.depositAccounts.map((n=>n.accountName)),debitAccountBalance:t.depositAccounts.map((n=>x(n.accountBalance.available.amount))),debitCardsSpend:x(r?.currentMonthSpends.amount??0),debitAccountStatus:t.depositAccounts.map((n=>n.accountStatus))}:void 0,ea=(e,o)=>e&&o.depositAccountLimit!=null&&o.chargeCard!=null?{debitAccountId:o.depositAccountLimit.id,debitAccountName:o.depositAccountLimit?.accountName??o.connectedAccount?.accountName,debitAccountBalance:x(o.depositAccountLimit?.accountBalance.available.amount),debitCardsSpend:x(o.chargeCard.limit.amount-o.chargeCard.available.amount),debitAccountStatus:o.depositAccountLimit?.accountStatus??o.connectedAccount?.accountStatus}:void 0,na=80,ta=80,aa=e=>e.companyId??E.getSignedInUserTenant(e.tenantEmailDomain)?.companyId,yt=({isBankingOnlyTenant:e,isDebitCardFeatureEnabled:o})=>o||e,ft=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:a,isDebitCardProductVisible:t,chargeCardsCreditAccountLimit:r})=>(e||o||a)&&(!t||r>0),ia=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:a})=>e||o||a,sa=({cardInfo:e,isProductVisible:o,isTOSAccepted:a,isSetupEnabled:t,isUserHasCardsAdminLevelAccess:r,isUserHasCardsAccess:n})=>!!e&&o&&(!a&&r||n&&!r&&!t),gt=G((function(e,o){const{isUserChargeCardAdmin:a,chargeCardSetUpView:t,isDebitCardOnlyEnabled:r,isCreditCardOnlyEnabled:n}=o,i=F(e),l=E.getSignedInUser(),s=i.tenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""},p=a&&t.updateStatus.fetchState!=="In-Progress"&&t.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&t.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&t.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly";return{chargeCardSetUpView:t,connectedAccountProvider:i.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:p,analytics:D,isDebitCardOnlyEnabled:r,isCreditCardOnlyEnabled:n,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:c}}),(function(e,o){const{navigate:a,companyId:t,currentTenant:r,chargeCardSetUpView:n,isDebitCardTOSAccepted:i,isChargeCardTOSAccepted:l,isChargeCardSetupEnabled:s,isDebitCardSetupEnabled:c,productInformation:p,controllerEmails:g,businessVerificationStatus:S,isCardPolicyEnabled:_,isUserChargeCardAdmin:I}=o;return{onBusinessVerificationSectionClick:()=>{D.trackCardsVerifyIdentityCompanyDetailsClick(g,p,S?.code),a("../verification"),r?.company?.companyChargeCardInfo!=null&&r.company.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(de(t,!1,!0))},...I&&_?{onCardPolicySectionClick:()=>{a("../policy")}}:{},onFetchLinkTokenClick:(d,y)=>{e(Pe("charge_card_setup",d,y))},onEstablishConnectionClick:d=>{e(ve(d,t,"charge_card_setup","charge_cards"))},onUpdatePaymentAccountStatus:(d,y,f)=>{e(ke(d,y,"charge_cards","charge_card_setup",f))},onUpdatePaymentAccountLoginStatus:(d,y)=>{e(_e(!1,d,"charge_cards","charge_card_setup",y))},onEstablishConnectionSuccess:()=>{e(de(t,!0))},onEnableChargeCardClick:()=>{D.trackCardsEnableCardsClick(g,p,"Cards Card Setup"),l===!0&&i===!0&&s===!1&&c===!1?e(X(t,"charge_cards__debit_cards")):l===!0&&s===!1?e(X(t,"charge_cards")):i===!0&&c===!1&&e(X(t,"debit_cards"))},onUpdateChargeCardClick:(d,y,f)=>{const P=n.allBankAccounts.find((m=>m.accountId===n.primaryFundingAccount?.zeniAccountId)),b=n.allBankAccounts.find((m=>m.accountId===d));D.trackCardsZeniCashAccountChangeClick(g,p,{oldZeniCashAccount:P?.accountName??"",newZeniCashAccount:b?.accountName??"",oldZeniCashAccountPosition:n.allBankAccounts.findIndex((m=>m.accountId===n.primaryFundingAccount?.zeniAccountId))+1,newZeniCashAccountPosition:n.allBankAccounts.findIndex((m=>m.accountId===d))+1,numberOfCashAccounts:n.allBankAccounts.length}),e(f==="paymentAccount"?Ie(d,y,"charge_cards","charge_card_setup"):Ae("charge_card_setup",d,y))},onUpdatePrimaryFundingAccount:(d,y)=>{const f=n.allFundingAccounts.find((m=>m.id===d)),P=n.allFundingAccounts.findIndex((m=>m.id===n.primaryFundingAccount?.id))+1,b=n.allFundingAccounts.findIndex((m=>m.id===d))+1;D.trackCardsPaymentAccountChangeClick(g,p,{oldPaymentAccountName:n.primaryFundingAccount?.label??"",oldPaymentAccountBalance:x(n.primaryFundingAccount?.accountBalance?.available?.amount??0),newPaymentAccountName:f?.label??"",newPaymentAccountBalance:x(f?.accountBalance?.available?.amount??0),isOldPaymentAccountRecommended:n.primaryFundingAccount?.accType==="depositAccount",isNewPaymentAccountRecommended:f?.accType==="depositAccount",oldPaymentAccountPosition:P,newPaymentAccountPosition:b,numberOfPaymentAccounts:n.allFundingAccounts.length}),e(he(t,"charge_card_setup",d,y))},onEnableChargeCardSuccess:()=>{e(fn()),a("../",{relative:"path"})},onBackClick:()=>{r?.companyChargeCardInfo?.info?.isChargeCardEnabled||r?.companyDebitCardInfo?.info?.isDebitCardEnabled?a("../",{relative:"path"}):a("../..",{relative:"path"})},onNavigateToDashboard:()=>{a("../../dashboard")},onCompanyOfficerUpdated:(d,y)=>{e(Ce({officerType:d,fileIds:y}))},onSendForVerificationClick:d=>{l===!0&&i===!0?e(L(t,d,"charge_cards__debit_cards",!0,!0,!0)):l===!0?e(L(t,d,"charge_cards",!0,!0,!0)):i===!0&&e(L(t,d,"debit_cards",!0,!0,!0))},updateFilesEntity:d=>{e(ae({files:d}))},onDeleteFile:d=>{e(te(d))},onEditFileName:(d,y)=>{e(ne(d,y.split(".")[0]))},onUpdateAutoPayClick:d=>{e(yn(t,d))}}}))(Xn),St=()=>{const e=Te(),o=J(),a=Q(),t=ee(),{tenantEmailDomain:r}=W(),n=ie(),i=v((R=>F(R))),{useDynamicConfig:l,useFeatureGate:s}=me(),c=a.state?.pathnameStackToGoBack?.[0],{configValue:p}=l(xe.zeniCardsConfig),g=p.credit_card_auto_pay_threshold_by_company_id?.[i.companyId]??p.default_credit_card_auto_pay_threshold??80,{isFeatureEnabled:S}=s(q.isDebitCardFeatureEnabled),{isFeatureEnabled:_}=s(q.isChargeCardFeatureEnabled),{isFeatureEnabled:I}=s(q.isEarlyPayFeatureEnabled),{isFeatureEnabled:d}=s(q.isCardPolicyEnabled),y=v((R=>cn(R,i.companyId))),f=rn(y.controllers),P=!!i.company?.companyChargeCardInfo.isChargeCardEnabled,b=!!i.company?.companyDebitCardInfo.isDebitCardEnabled,m=un(S,i),C=yt({isDebitCardFeatureEnabled:S,isBankingOnlyTenant:m}),k=dn(i),T=ln(i),A=i.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,U=ft({isCardsOnlyTenant:k,isChargeCardFeatureEnabled:_,isBookKeepingTenant:T,isDebitCardProductVisible:C,chargeCardsCreditAccountLimit:A}),z=C&&U===!1,V=C===!1&&U,M=pn(n?.loggedInUserRoleMap),O=Fe(n?.loggedInUserRoleMap),[ce,H]=h.useState(!1),[K,re]=h.useState(!1),Y=v((R=>R.chargeCardSetupViewState.fetchState)),B=E.getSignedInUserTenant(r)?.companyId??i.companyId,w=E.getSignedInUser(),Ue=R=>{H(R)},fe=v((R=>mn(R,B)));if(w==null)throw Error("Can't access charge card setup page without signing in...");h.useEffect((()=>{K||Y!=="Not-Started"||B==null?K||Y!=="Completed"||B==null||i.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(de(B,!1,!0)):(re(!0),t(de(B,!0)))}),[K,Y,B,t]);const ge=!!i.company?.companyChargeCardInfo.isChargeCardTOSAccepted,Se=!!i.company?.companyDebitCardInfo.isDebitCardTOSAccepted,ue=mt(U,C,b,P);return ge||Se?ge||Se?u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:D,onLoad:()=>{D.trackPageLoaded($.Event.cardsSetupVisited),D.trackCardsCardSetupView(f,ue,c==null?"Cards Setup":c.includes("cards/promo")?"Promo":c.includes("cards")?"Settings":"Cards Tab")}}),u.jsx(ye,{isAppContentDrawerOpen:ce,handleDrawerToggle:Ue}),u.jsx(gt,{autoPayThreshold:g,navigate:o,meetingUrl:e("charge_card_setup"),location:a,companyId:B,currentTenant:i,isEarlyPayEnabled:I,isChargeCardTOSAccepted:ge,isDebitCardTOSAccepted:Se,isUserChargeCardAdmin:M,isCardPolicyEnabled:d,isDebitCardOnlyEnabled:z,isCreditCardOnlyEnabled:V,chargeCardSetUpView:fe,isCreditCardProductVisible:U,isDebitCardFeatureEnabled:C,isChargeCardSetupEnabled:P,isDebitCardSetupEnabled:b,businessVerificationStatus:i.companyBillPayInfo?.info?.businessVerificationStatus,controllerEmails:f,productInformation:ue,onClickMenuIcon:()=>{Ue(!0)},hasZeniAccountsAdminAccess:O})]}):u.jsx(De,{fetchState:"Not-Started"}):u.jsx(j,{to:"../promo"})},bt=Ve.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
height: 100%;
|
|
12
12
|
width: 100%;
|
|
@@ -14,11 +14,11 @@ import{j as u}from"./liveblocks-UOzcPsHa.js";import{h as Q,g as X,u as ee,i as G
|
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
align-items: center;
|
|
16
16
|
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
`,Ct=H((function(e,o){const{isUserRemiAdmin:a,companyId:t}=o,r=F(e),n=bn(e),i=Cn(e,t),l=E.getSignedInUser(),s=r.tenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""};return{remiSetupView:i,isDisabled:a&&i.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&i.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",remiApprovalView:n,connectedAccountProvider:r.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:D,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:c}}),(function(e,o){const{navigate:a,companyId:t,currentTenant:r}=o;return{updateMileageDetails:n=>{const{mileageAmount:i,mileageUnit:l,mileageCurrencyCode:s,mileageCurrencySymbol:c,denomination:p,denominationSymbol:g,mileageAmountInDenomination:S,description:_}=n;e(In({mileageDetails:{mileageUnitAmount:{amount:i,currencyCode:s,currencySymbol:c},denomination:p,denominationSymbol:g,mileageAmountInDenomination:S,mileageCurrencyCode:s,mileageCurrencySymbol:c,mileageUnit:l,description:_}}))},onSaveMileageClick:n=>{e(hn(t)),D.trackReimbursementMileageRateSave(n)},onBusinessVerificationSectionClick:()=>{a("../verification"),r?.company?.companyReimbursementInfo!=null&&r?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(le(t,!1,!0))},onSetupApprovalRulesSectionClick:()=>{a("../approval-rules")},onFetchLinkTokenClick:(n,i)=>{e(Pe("reimbursement_setup",n,i))},onEstablishConnectionClick:n=>{e(ve(n,t,"reimbursement_setup","reimbursement"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(ke(n,i,"reimbursement","reimbursement_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(_e(!1,n,"reimbursement","reimbursement_setup",i))},onEstablishConnectionSuccess:()=>{e(le(t,!0))},onEnableRemiClick:()=>{e(J(t,"reimbursement"))},onUpdateAccountClick:(n,i,l)=>{e(l==="paymentAccount"?Ie(n,i,"reimbursement","reimbursement_setup"):Ae("reimbursement_setup",n,i))},onEnableRemiSuccess:()=>{a("../",{relative:"path"})},onBackClick:()=>{r?.companyReimbursementInfo?.info?.isReimbursementEnabled!=null&&r.companyReimbursementInfo.info.isReimbursementEnabled===!1?a("../.."):a("../",{relative:"path"})},onCompanyOfficerUpdated:(n,i)=>{e(Ce({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(R(t,n,"reimbursement",!0,!0,!0))},updateFilesEntity:n=>{e(ae({files:n}))},onDeleteFile:n=>{e(te(n))},onEditFileName:(n,i)=>{e(ne(n,i.split(".")[0]))},onUpdatePrimaryFundingAccount:(n,i)=>{e(he(t,"reimbursement_setup",n,i))}}}))(Xn),ht=()=>{const e=Te(),o=Q(),a=X(),t=ee(),{tenantEmailDomain:r}=G(),n=ie(),i=Ee(),l=gn(n?.loggedInUserRoleMap),s=Fe(n?.loggedInUserRoleMap),[c,p]=h.useState(!1),g=h.useRef(!1),[S,_]=h.useState(!1),I=v((k=>k.remiSetupViewState.fetchState)),d=v((k=>F(k))),y=v((k=>k.remiSetupApproverViewState.fetchState)),{isApprovalRulesV3Enabled:f,isLoading:P}=Qn(d?.tenantId),b=E.getSignedInUserTenant(r)?.companyId??d.companyId,m=E.getSignedInUser(),C=k=>{p(k)};if(m==null)throw Error("Can't access reimbursement setup page without signing in...");if(h.useEffect((()=>{g.current||I!=="Not-Started"||b==null?g.current||I!=="Completed"||b==null||d.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(g.current=!0,t(le(b,!1,!0))):(g.current=!0,t(le(b,!0)))}),[I,b,t]),h.useEffect((()=>{S||y!=="Not-Started"||P||(_(!0),t(Sn(!0,!1,!1,f)))}),[S,y,P,f,t]),d.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1)return u.jsx(j,{to:"../promo"});if(d.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!0){const k=T=>T.trackPageLoaded(W.Event.reimbursementSetup);return u.jsxs(bt,{children:[u.jsx(se,{analytics:D,onLoad:T=>k(T)}),u.jsx(ye,{isAppContentDrawerOpen:c,handleDrawerToggle:C}),u.jsx(Ct,{navigate:o,location:a,companyId:b,currentTenant:d,isUserRemiAdmin:l,meetingUrl:e("reimbursement_setup"),onClickMenuIcon:()=>{C(!0)},hasZeniAccountsAdminAccess:s})]})}return u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:i.colors.grey5}})},It=H((function(e,o){const{businessVerificationDetails:a,productType:t}=o,r=F(e),n=E.getSignedInUser(),i=r.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},s=En(o.roleMap)&&a.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",c=Dn(e.companyConfigState),p=Un(e.userRoleConfigState),g=t==="zeni_treasury"?Ke(e):void 0;return{businessVerificationDetails:a,verficationDetailsFetchState:a.fetchState,isRefreshingViewInBackground:a.isRefreshingViewInBackground,allNationalityCountries:a.allNationalityCountries,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:l,isDisabled:s,allIndustries:c.companyIndustries??[],companyTitles:p.companyTitles,transferDetails:g}}),(function(e,o){const{companyId:a,productType:t,currentTenant:r,navigate:n,location:i}=o,{tenantEmailDomain:l}=r;return{onCompanyDetailsChanged:s=>{const{companyDescription:c,companyIndustry:p,companyIndustryType:g,companyLegalName:S,companyTaxId:_,companyWebsite:I,companyPhone:d,primaryContactEmail:y,primaryContactName:f,primaryContactUserId:P,primaryContactSyncToken:b,syncToken:m,fileIds:C,incDate:k,typeOfIncorporation:T,stateOfIncorporation:A,sourceOfFunds:U,companySubIndustry:M,countriesOfOperations:x,companySourceOfFunds:z,companySourceOfFundsDescription:O,transactionVolume:ce,transactionVolumeDescription:Y,purposeOfAccount:K,purposeOfAccountDescription:re,regulatedStatus:Z,regulatedStatusDescription:B,usNexus:w,usNexusTypes:Ue}=s,fe=g?.selectedOption,ge={companyId:a,companyDescription:c,companyIndustry:p.selectedOption,companyIndustryType:fe==null||fe===""?void 0:fe,companyLegalName:S,taxIdOrEIN:_,website:I!=""&&I!=null?Bn(I):void 0,phone:d,syncToken:m,fileIds:C,incDate:k!=null?Ne(k?.toString()):k,typeOfIncorporation:T?.selectedOption??"",stateOfIncorporation:A?.selectedOption??"",sourceOfFunds:U?.selectedOption??"",companySubIndustry:M?.selectedOption??"",countriesOfOperations:x?.selectedOptions.map((ue=>ue.length===2?ue:ze(ue)))??[],companySourceOfFunds:z?.selectedOption??"",companySourceOfFundsDescription:O,transactionVolume:ce?.selectedOption??"",transactionVolumeDescription:Y,purposeOfAccount:K?.selectedOption??"",purposeOfAccountDescription:re,regulatedStatus:Z??"",regulatedStatusDescription:B,usNexus:w,usNexusTypes:Ue?.selectedOptions??[]},Se={userId:P,firstName:f.firstName,lastName:f.lastName,email:y,syncToken:b};e(Re({companyDetails:ge,primaryContactDetails:Se}))},onCompanyOfficerUpdated:s=>{const c=s.map((p=>{const{officerType:g,userId:S,name:_,email:I,nationalityCountryCode:d,ssn:y,dob:f,phone:P,syncToken:b,selectDocument:m,role:C,ownership:k,isSelectedForVerification:T,userVerificationStatus:A,treasuryUserVerificationStatus:U,fileIds:M}=p;let x;return m.selectDocumentType==="driverLicense"?x="driving_license":m.selectDocumentType==="passport"?x="passport":m.selectDocumentType==="stateId"?x="id_document":m.selectDocumentType==="ssnCard"&&(x="social_security_card"),{officerType:g,userId:S,firstName:_.firstName,lastName:_.lastName,email:I,ssn:y,nationalityCountryCode:d?.selectedOption!=null?ze(d.selectedOption):void 0,phone:P,birthday:f!=null?Ne(f?.toString()):f,syncToken:b,titleAtCompany:C.selectedOption,ownershipInCompany:k,documentTypeSelectedForVerification:x,isSelectedForVerification:T,userVerificationStatus:A,treasuryUserVerificationStatus:U,fileIds:M,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}}));e(Re({officers:c}))},onSaveDetailsClick:s=>{e(R(a,s,t))},onSendForVerificationClick:s=>{e(R(a,s,t,!0))},onAddressClick:s=>{const c=$e(l,s),p=Me(i.state?.pathnameStackToGoBack,i.pathname),g=new URLSearchParams(i.search),S={};g.forEach(((_,I)=>{S[I]=_})),n(c,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(S).length>0?S:void 0}})},onRegisteredAddressClick:s=>{const c=$e(l,s),p=Me(i.state?.pathnameStackToGoBack,i.pathname),g=new URLSearchParams(i.search),S=Object.fromEntries(g.entries());n(c,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(S).length>0?S:void 0}})},onBackClick:()=>{e(xn({companyId:a})),n("../setup")},updateFilesEntity:s=>{e(ae({files:s}))},onDeleteFile:s=>{e(te(s))},onDeleteFileList:s=>{e(Je(s))},onEditFileName:(s,c)=>{e(ne(s,c.split(".")[0]))},onGetOtp:s=>{e(He(s,"SpendManagementSetup"))},onResendOtp:s=>{e(Ge(s,"SpendManagementSetup"))},onVerifyOtp:(s,c)=>{e(We(s,c,"SpendManagementSetup"))},saveNewAddressInLocalStore:(s,c)=>{e(Vn({addressType:s,addressToCreate:c}))},onExecuteTreasuryTransfer:()=>{e(qe())},onOverlayClose:()=>{e(Oe())},onIdentityDocumentUploadedForAutofill:s=>{if(a==null)return;const c=On(s.documentType);c!=null&&e(Fn({target:"setup",companyId:a,officerType:s.officerType,fileId:s.fileId,documentType:c}))},onCompanyDocumentUploadedForAutofill:s=>{a!=null&&e(wn({target:"setup",companyId:a,fileId:s.fileId,documentType:s.documentType}))}}}))(et),At=({productType:e,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:a})=>{const t=Q(),r=X(),n=ee(),[i]=Xe(),l=i.get("showStepProgress"),s=i.get("isTransferInitiated"),[c,p]=h.useState(!1),{tenantEmailDomain:g}=G(),S=ie(),{useDynamicConfig:_}=me(),I=Ee(),{configValue:d}=_(Ve.zeniAccountsConfig),y=je(d),f=v((A=>{switch(e){case"zeni_accounts":return A.zeniAccountSetupViewState.fetchState;case"reimbursement":return A.remiSetupViewState.fetchState;case"charge_cards":return A.chargeCardSetupViewState.fetchState;case"zeni_treasury":return A.treasurySetupViewState.fetchState;default:return A.billPaySetupViewState.fetchState}})),P=v((A=>A.companyConfigState.fetchState)),b=v((A=>A.userRoleConfigState.fetchState)),m=v((A=>F(A))),C=m.companyId??E.getSignedInUserTenant(g)?.companyId;if(h.useEffect((()=>{P==="Not-Started"&&n(An()),b==="Not-Started"&&n(_n(!0))}),[P,b,n]),h.useEffect((()=>{if(!c&&f==="Not-Started"&&C!=null)switch(p(!0),e){case"zeni_accounts":n(pe(C,!0));break;case"zeni_treasury":n(be(C,!0));break;case"reimbursement":n(le(C,!0));break;case"charge_cards":n(de(C,!0));break;default:n($(C,!0))}}),[c,f,C,n]),E.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let k;switch(e){case"zeni_accounts":k=m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":k=m.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":k=m.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||m.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":k=m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:k=m.companyBillPayInfo?.info?.isBillPayTOSAccepted}const T=v((A=>{let U;switch(e){case"zeni_accounts":U=Tn(A,C);break;case"zeni_treasury":U=Ye(A,C);break;case"charge_cards":U=Pn(A,C);break;case"reimbursement":U=vn(A,C);break;default:U=kn(A,C)}return U}));return k===!1?null:T.fetchState==="Completed"&&k===!0&&S?.loggedInUserRoleMap!=null?u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:D,onLoad:A=>(U=>{switch(e){case"zeni_accounts":return U.trackPageLoaded(W.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return U.trackPageLoaded(W.Event.reimbursementBusinessVerification);default:return U.trackPageLoaded(W.Event.billPayBusinessVerification,Be(r)?"Settings":void 0)}})(A)}),u.jsx(It,{businessVerificationDetails:T,navigate:t,location:r,companyId:C,analytics:D,currentTenant:m,productType:e,roleMap:S.loggedInUserRoleMap,isSettings:Be(r),isOverlay:!0,isStepInProgress:l!=null,isTreasuryTransferInitiated:s!=null,onClickMenuIcon:()=>{},maxInsuredAmount:y.maxInsuredAmount,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:a})]}):u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:I.colors.grey5}})},_t={overlayWidth:new tt(100,100,59)},kt=H((function(e,o){const{isUserZeniAccountsAdmin:a,companyId:t}=o,r=F(e),n=E.getSignedInUser(),i=r.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},s=Qe(e,t),c=Ye(e,t),p=a&&s.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&s.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",g=Ln(e),S=g.transactions,_=Ke(e),I=g.accountSummary?.totalBalance?.amount,d=S.length===0||I===0;return{treasurySetupView:s,businessVerificationDetails:c,connectedAccountProvider:r.company?.featuresActivationInfo.connectedAccountProvider??"",transactions:S,transferDetails:_,isFirstTransfer:d,isDisabled:p,analytics:D,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:l,isOnSetup:!0,maxInsuredAmount:o.maxInsuredAmount}}),(function(e,o){const{navigate:a,companyId:t,currentTenant:r,isAllocationDone:n,analytics:i,treasurySetupView:l}=o;return{onTransferSaveChangesToLocalStore:s=>{e(Zn(s))},onBusinessVerificationSectionClick:(s,c)=>{let p="../verification";s&&(p+="?showStepProgress=true",c&&(p+="&isTransferInitiated=true")),a(p),r?.company?.companyTreasuryInfo!=null&&r?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="pending_review"&&e(be(t,!1,!0))},onFetchLinkTokenClick:(s,c)=>{e(Pe("treasury_setup",s,c))},onEstablishConnectionClick:s=>{e(ve(s,t,"treasury_setup","zeni_treasury"))},onUpdatePaymentAccountStatus:(s,c,p)=>{e(ke(s,c,"zeni_treasury","treasury_setup",p))},onUpdatePaymentAccountLoginStatus:(s,c)=>{e(_e(!1,s,"zeni_treasury","treasury_setup",c))},onEstablishConnectionSuccess:()=>{e(be(t,!0))},onEnableTreasuryClick:()=>{e(J(t,"zeni_treasury"))},onUpdateTreasuryClick:(s,c,p)=>{e(p==="paymentAccount"?Ie(s,c,"zeni_treasury","treasury_setup"):Ae("treasury_setup",s,c))},onUpdatePrimaryFundingAccount:(s,c)=>{e(he(t,"treasury_setup",s,c))},onNavigateToDashboard:()=>{a(r?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="verified"?"../":"../../")},onCompanyOfficerUpdated:(s,c)=>{e(Ce({officerType:s,fileIds:c}))},onSendForVerificationClick:(s,c)=>{if(e(R(t,s,"zeni_treasury",!0,!0,!0)),!n){const p=l.fundAllocationLocalData;i.trackTreasuryPortfolioConfirm(p.riskScore,Ze(p)),e(Le(!1))}c===!0&&e(qe())},updateFilesEntity:s=>{e(ae({files:s}))},onDeleteFile:s=>{e(te(s))},onEditFileName:(s,c)=>{e(ne(s,c.split(".")[0]))},onAdditionalVerificationFieldsChanged:s=>{const{sourceOfFunds:c}=s;e(zn({sourceOfFunds:c?.selectedOption??""}))},onUpdateFundAllocation:s=>{i.trackTreasuryAllocationAction("update",Ze(s)),e(Mn(s))},onConfirmFundAllocation:()=>{e(Le(n))},onOverlayClose:()=>{e(Oe())}}}))(at),vt=()=>{const e=Te(),o=Q(),a=X(),t=ee(),r=Ee(),n=nt(),{tenantEmailDomain:i}=G(),{useDynamicConfig:l}=me(),s=ie(),[c,p]=h.useState(!1),g=Fe(s?.loggedInUserRoleMap),{configValue:S}=l(Ve.zeniAccountsConfig),_=je(S),[I,d]=h.useState(!1),[y,f]=h.useState(!1),[P,b]=h.useState(!1),[m,C]=h.useState(!1),[k,T]=h.useState(!1),A=v((w=>w.treasurySetupViewState.fetchState)),U=v((w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),M=v((w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),x=v((w=>w.treasuryDetailState.transactionsState?.fetchState)),z=v((w=>F(w))),O=E.getSignedInUserTenant(i)?.companyId??z.companyId,ce=v((w=>Qe(w,O))),Y=ce.isAtomicAccountExists,K=E.getSignedInUser(),re=w=>{d(w)};if(K==null)throw Error("Can't access treasury setup page without signing in...");h.useEffect((()=>{y||A!=="Not-Started"||O==null||(f(!0),t(be(O,!0,!1)))}),[y,A,O,t]),h.useEffect((()=>{P||U!=="Not-Started"||O==null||(b(!0),t(jn()))}),[P,U,O,t]),h.useEffect((()=>{m||M!=="Not-Started"||O==null||(C(!0),t(Nn()))}),[m,M,O,t]),h.useEffect((()=>{k||x!=="Not-Started"||O==null||(T(!0),t(Rn(!0)))}),[k,x,O,t]);const Z=z.companyTreasuryInfo?.info?.businessVerificationStatus?.code,B=Z==="pending_review"||Z==="verified";return h.useEffect((()=>{c||A!=="Completed"||Y||B||!a.pathname.includes("setup")||p(!0)}),[A,Y,B]),z.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1?u.jsx(j,{to:"../promo"}):u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:D,onLoad:()=>{}}),u.jsx(ye,{isAppContentDrawerOpen:I,handleDrawerToggle:re}),u.jsx(ct,{onClose:()=>{t(Oe()),o("../setup")},anchor:"right",open:a.pathname.includes("verification"),transitionDuration:c?0:250,PaperProps:{style:{width:_t.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c?"transparent":r.colors.black,opacity:.75,cursor:"pointer"}}},children:u.jsx(Pt,{onClick:w=>w.stopPropagation(),children:u.jsx(At,{productType:"zeni_treasury",isBusinessVerificationDrawerOpen:!0,closeDrawerHandler:()=>{t(Oe()),o("../setup")}})})}),u.jsx(kt,{navigate:o,location:a,companyId:O,currentTenant:z,isUserZeniAccountsAdmin:g,meetingUrl:e("treasury_setup"),maxInsuredAmount:_.maxInsuredAmount,isAllocationDone:Y,analytics:D,treasurySetupView:ce,onClickMenuIcon:()=>{re(!0)},showTreasurySetupOverlay:c,setShowTreasurySetupOverlay:p})]})},Pt=xe(rt)`
|
|
17
|
+
`,Ct=G((function(e,o){const{isUserRemiAdmin:a,companyId:t}=o,r=F(e),n=bn(e),i=Cn(e,t),l=E.getSignedInUser(),s=r.tenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""};return{remiSetupView:i,isDisabled:a&&i.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&i.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",remiApprovalView:n,connectedAccountProvider:r.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:D,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:c}}),(function(e,o){const{navigate:a,companyId:t,currentTenant:r}=o;return{updateMileageDetails:n=>{const{mileageAmount:i,mileageUnit:l,mileageCurrencyCode:s,mileageCurrencySymbol:c,denomination:p,denominationSymbol:g,mileageAmountInDenomination:S,description:_}=n;e(In({mileageDetails:{mileageUnitAmount:{amount:i,currencyCode:s,currencySymbol:c},denomination:p,denominationSymbol:g,mileageAmountInDenomination:S,mileageCurrencyCode:s,mileageCurrencySymbol:c,mileageUnit:l,description:_}}))},onSaveMileageClick:n=>{e(hn(t)),D.trackReimbursementMileageRateSave(n)},onBusinessVerificationSectionClick:()=>{a("../verification"),r?.company?.companyReimbursementInfo!=null&&r?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(le(t,!1,!0))},onSetupApprovalRulesSectionClick:()=>{a("../approval-rules")},onFetchLinkTokenClick:(n,i)=>{e(Pe("reimbursement_setup",n,i))},onEstablishConnectionClick:n=>{e(ve(n,t,"reimbursement_setup","reimbursement"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(ke(n,i,"reimbursement","reimbursement_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(_e(!1,n,"reimbursement","reimbursement_setup",i))},onEstablishConnectionSuccess:()=>{e(le(t,!0))},onEnableRemiClick:()=>{e(X(t,"reimbursement"))},onUpdateAccountClick:(n,i,l)=>{e(l==="paymentAccount"?Ie(n,i,"reimbursement","reimbursement_setup"):Ae("reimbursement_setup",n,i))},onEnableRemiSuccess:()=>{a("../",{relative:"path"})},onBackClick:()=>{r?.companyReimbursementInfo?.info?.isReimbursementEnabled!=null&&r.companyReimbursementInfo.info.isReimbursementEnabled===!1?a("../.."):a("../",{relative:"path"})},onCompanyOfficerUpdated:(n,i)=>{e(Ce({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(L(t,n,"reimbursement",!0,!0,!0))},updateFilesEntity:n=>{e(ae({files:n}))},onDeleteFile:n=>{e(te(n))},onEditFileName:(n,i)=>{e(ne(n,i.split(".")[0]))},onUpdatePrimaryFundingAccount:(n,i)=>{e(he(t,"reimbursement_setup",n,i))}}}))(Qn),ht=()=>{const e=Te(),o=J(),a=Q(),t=ee(),{tenantEmailDomain:r}=W(),n=ie(),i=Ee(),l=gn(n?.loggedInUserRoleMap),s=Fe(n?.loggedInUserRoleMap),[c,p]=h.useState(!1),g=h.useRef(!1),[S,_]=h.useState(!1),I=v((k=>k.remiSetupViewState.fetchState)),d=v((k=>F(k))),y=v((k=>k.remiSetupApproverViewState.fetchState)),{isApprovalRulesV3Enabled:f,isLoading:P}=Jn(d?.tenantId),b=E.getSignedInUserTenant(r)?.companyId??d.companyId,m=E.getSignedInUser(),C=k=>{p(k)};if(m==null)throw Error("Can't access reimbursement setup page without signing in...");if(h.useEffect((()=>{g.current||I!=="Not-Started"||b==null?g.current||I!=="Completed"||b==null||d.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(g.current=!0,t(le(b,!1,!0))):(g.current=!0,t(le(b,!0)))}),[I,b,t]),h.useEffect((()=>{S||y!=="Not-Started"||P||(_(!0),t(Sn(!0,!1,!1,f)))}),[S,y,P,f,t]),d.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1)return u.jsx(j,{to:"../promo"});if(d.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!0){const k=T=>T.trackPageLoaded($.Event.reimbursementSetup);return u.jsxs(bt,{children:[u.jsx(se,{analytics:D,onLoad:T=>k(T)}),u.jsx(ye,{isAppContentDrawerOpen:c,handleDrawerToggle:C}),u.jsx(Ct,{navigate:o,location:a,companyId:b,currentTenant:d,isUserRemiAdmin:l,meetingUrl:e("reimbursement_setup"),onClickMenuIcon:()=>{C(!0)},hasZeniAccountsAdminAccess:s})]})}return u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:i.colors.grey5}})},It=G((function(e,o){const{businessVerificationDetails:a,productType:t}=o,r=F(e),n=E.getSignedInUser(),i=r.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},s=En(o.roleMap)&&a.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",c=Dn(e.companyConfigState),p=Un(e.userRoleConfigState),g=t==="zeni_treasury"?Ke(e):void 0;return{businessVerificationDetails:a,verficationDetailsFetchState:a.fetchState,isRefreshingViewInBackground:a.isRefreshingViewInBackground,allNationalityCountries:a.allNationalityCountries,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:l,isDisabled:s,allIndustries:c.companyIndustries??[],companyTitles:p.companyTitles,transferDetails:g}}),(function(e,o){const{companyId:a,productType:t,currentTenant:r,navigate:n,location:i}=o,{tenantEmailDomain:l}=r;return{onCompanyDetailsChanged:s=>{const{companyDescription:c,companyIndustry:p,companyIndustryType:g,companyLegalName:S,companyTaxId:_,companyWebsite:I,companyPhone:d,primaryContactEmail:y,primaryContactName:f,primaryContactUserId:P,primaryContactSyncToken:b,syncToken:m,fileIds:C,incDate:k,typeOfIncorporation:T,stateOfIncorporation:A,sourceOfFunds:U,companySubIndustry:z,countriesOfOperations:V,companySourceOfFunds:M,companySourceOfFundsDescription:O,transactionVolume:ce,transactionVolumeDescription:H,purposeOfAccount:K,purposeOfAccountDescription:re,regulatedStatus:Y,regulatedStatusDescription:B,usNexus:w,usNexusTypes:Ue}=s,fe=g?.selectedOption,ge={companyId:a,companyDescription:c,companyIndustry:p.selectedOption,companyIndustryType:fe==null||fe===""?void 0:fe,companyLegalName:S,taxIdOrEIN:_,website:I!=""&&I!=null?Bn(I):void 0,phone:d,syncToken:m,fileIds:C,incDate:k!=null?Ne(k?.toString()):k,typeOfIncorporation:T?.selectedOption??"",stateOfIncorporation:A?.selectedOption??"",sourceOfFunds:U?.selectedOption??"",companySubIndustry:z?.selectedOption??"",countriesOfOperations:V?.selectedOptions.map((ue=>ue.length===2?ue:Me(ue)))??[],companySourceOfFunds:M?.selectedOption??"",companySourceOfFundsDescription:O,transactionVolume:ce?.selectedOption??"",transactionVolumeDescription:H,purposeOfAccount:K?.selectedOption??"",purposeOfAccountDescription:re,regulatedStatus:Y??"",regulatedStatusDescription:B,usNexus:w,usNexusTypes:Ue?.selectedOptions??[]},Se={userId:P,firstName:f.firstName,lastName:f.lastName,email:y,syncToken:b};e(Le({companyDetails:ge,primaryContactDetails:Se}))},onCompanyOfficerUpdated:s=>{const c=s.map((p=>{const{officerType:g,userId:S,name:_,email:I,nationalityCountryCode:d,ssn:y,dob:f,phone:P,syncToken:b,selectDocument:m,role:C,ownership:k,isSelectedForVerification:T,userVerificationStatus:A,treasuryUserVerificationStatus:U,fileIds:z}=p;let V;return m.selectDocumentType==="driverLicense"?V="driving_license":m.selectDocumentType==="passport"?V="passport":m.selectDocumentType==="stateId"?V="id_document":m.selectDocumentType==="ssnCard"&&(V="social_security_card"),{officerType:g,userId:S,firstName:_.firstName,lastName:_.lastName,email:I,ssn:y,nationalityCountryCode:d?.selectedOption!=null?Me(d.selectedOption):void 0,phone:P,birthday:f!=null?Ne(f?.toString()):f,syncToken:b,titleAtCompany:C.selectedOption,ownershipInCompany:k,documentTypeSelectedForVerification:V,isSelectedForVerification:T,userVerificationStatus:A,treasuryUserVerificationStatus:U,fileIds:z,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}}));e(Le({officers:c}))},onSaveDetailsClick:s=>{e(L(a,s,t))},onSendForVerificationClick:s=>{e(L(a,s,t,!0))},onAddressClick:s=>{const c=Ze(l,s),p=ze(i.state?.pathnameStackToGoBack,i.pathname),g=new URLSearchParams(i.search),S={};g.forEach(((_,I)=>{S[I]=_})),n(c,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(S).length>0?S:void 0}})},onRegisteredAddressClick:s=>{const c=Ze(l,s),p=ze(i.state?.pathnameStackToGoBack,i.pathname),g=new URLSearchParams(i.search),S=Object.fromEntries(g.entries());n(c,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(S).length>0?S:void 0}})},onBackClick:()=>{e(Vn({companyId:a})),n("../setup")},updateFilesEntity:s=>{e(ae({files:s}))},onDeleteFile:s=>{e(te(s))},onDeleteFileList:s=>{e(Xe(s))},onEditFileName:(s,c)=>{e(ne(s,c.split(".")[0]))},onGetOtp:s=>{e(Ge(s,"SpendManagementSetup"))},onResendOtp:s=>{e(We(s,"SpendManagementSetup"))},onVerifyOtp:(s,c)=>{e($e(s,c,"SpendManagementSetup"))},saveNewAddressInLocalStore:(s,c)=>{e(xn({addressType:s,addressToCreate:c}))},onExecuteTreasuryTransfer:()=>{e(qe())},onOverlayClose:()=>{e(Oe())},onIdentityDocumentUploadedForAutofill:s=>{if(a==null)return;const c=On(s.documentType);c!=null&&e(Fn({target:"setup",companyId:a,officerType:s.officerType,fileId:s.fileId,documentType:c}))},onCompanyDocumentUploadedForAutofill:s=>{a!=null&&e(wn({target:"setup",companyId:a,fileId:s.fileId,documentType:s.documentType}))}}}))(et),At=({productType:e,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:a})=>{const t=J(),r=Q(),n=ee(),[i]=Qe(),l=i.get("showStepProgress"),s=i.get("isTransferInitiated"),[c,p]=h.useState(!1),{tenantEmailDomain:g}=W(),S=ie(),{useDynamicConfig:_}=me(),I=Ee(),{configValue:d}=_(xe.zeniAccountsConfig),y=je(d),f=v((A=>{switch(e){case"zeni_accounts":return A.zeniAccountSetupViewState.fetchState;case"reimbursement":return A.remiSetupViewState.fetchState;case"charge_cards":return A.chargeCardSetupViewState.fetchState;case"zeni_treasury":return A.treasurySetupViewState.fetchState;default:return A.billPaySetupViewState.fetchState}})),P=v((A=>A.companyConfigState.fetchState)),b=v((A=>A.userRoleConfigState.fetchState)),m=v((A=>F(A))),C=m.companyId??E.getSignedInUserTenant(g)?.companyId;if(h.useEffect((()=>{P==="Not-Started"&&n(An()),b==="Not-Started"&&n(_n(!0))}),[P,b,n]),h.useEffect((()=>{if(!c&&f==="Not-Started"&&C!=null)switch(p(!0),e){case"zeni_accounts":n(pe(C,!0));break;case"zeni_treasury":n(be(C,!0));break;case"reimbursement":n(le(C,!0));break;case"charge_cards":n(de(C,!0));break;default:n(Z(C,!0))}}),[c,f,C,n]),E.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let k;switch(e){case"zeni_accounts":k=m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":k=m.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":k=m.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||m.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":k=m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:k=m.companyBillPayInfo?.info?.isBillPayTOSAccepted}const T=v((A=>{let U;switch(e){case"zeni_accounts":U=Tn(A,C);break;case"zeni_treasury":U=He(A,C);break;case"charge_cards":U=Pn(A,C);break;case"reimbursement":U=vn(A,C);break;default:U=kn(A,C)}return U}));return k===!1?null:T.fetchState==="Completed"&&k===!0&&S?.loggedInUserRoleMap!=null?u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:D,onLoad:A=>(U=>{switch(e){case"zeni_accounts":return U.trackPageLoaded($.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return U.trackPageLoaded($.Event.reimbursementBusinessVerification);default:return U.trackPageLoaded($.Event.billPayBusinessVerification,Be(r)?"Settings":void 0)}})(A)}),u.jsx(It,{businessVerificationDetails:T,navigate:t,location:r,companyId:C,analytics:D,currentTenant:m,productType:e,roleMap:S.loggedInUserRoleMap,isSettings:Be(r),isOverlay:!0,isStepInProgress:l!=null,isTreasuryTransferInitiated:s!=null,onClickMenuIcon:()=>{},maxInsuredAmount:y.maxInsuredAmount,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:a})]}):u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:I.colors.grey5}})},_t={overlayWidth:new tt(100,100,59)},kt=G((function(e,o){const{isUserZeniAccountsAdmin:a,companyId:t}=o,r=F(e),n=E.getSignedInUser(),i=r.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},s=Je(e,t),c=He(e,t),p=a&&s.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&s.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",g=Rn(e),S=g.transactions,_=Ke(e),I=g.accountSummary?.totalBalance?.amount,d=S.length===0||I===0;return{treasurySetupView:s,businessVerificationDetails:c,connectedAccountProvider:r.company?.featuresActivationInfo.connectedAccountProvider??"",transactions:S,transferDetails:_,isFirstTransfer:d,isDisabled:p,analytics:D,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:l,isOnSetup:!0,maxInsuredAmount:o.maxInsuredAmount}}),(function(e,o){const{navigate:a,companyId:t,currentTenant:r,isAllocationDone:n,analytics:i,treasurySetupView:l}=o;return{onTransferSaveChangesToLocalStore:s=>{e(Yn(s))},onBusinessVerificationSectionClick:(s,c)=>{let p="../verification";s&&(p+="?showStepProgress=true",c&&(p+="&isTransferInitiated=true")),a(p),r?.company?.companyTreasuryInfo!=null&&r?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="pending_review"&&e(be(t,!1,!0))},onFetchLinkTokenClick:(s,c)=>{e(Pe("treasury_setup",s,c))},onEstablishConnectionClick:s=>{e(ve(s,t,"treasury_setup","zeni_treasury"))},onUpdatePaymentAccountStatus:(s,c,p)=>{e(ke(s,c,"zeni_treasury","treasury_setup",p))},onUpdatePaymentAccountLoginStatus:(s,c)=>{e(_e(!1,s,"zeni_treasury","treasury_setup",c))},onEstablishConnectionSuccess:()=>{e(be(t,!0))},onEnableTreasuryClick:()=>{e(X(t,"zeni_treasury"))},onUpdateTreasuryClick:(s,c,p)=>{e(p==="paymentAccount"?Ie(s,c,"zeni_treasury","treasury_setup"):Ae("treasury_setup",s,c))},onUpdatePrimaryFundingAccount:(s,c)=>{e(he(t,"treasury_setup",s,c))},onNavigateToDashboard:()=>{a(r?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="verified"?"../":"../../")},onCompanyOfficerUpdated:(s,c)=>{e(Ce({officerType:s,fileIds:c}))},onSendForVerificationClick:(s,c)=>{if(e(L(t,s,"zeni_treasury",!0,!0,!0)),!n){const p=l.fundAllocationLocalData;i.trackTreasuryPortfolioConfirm(p.riskScore,Ye(p)),e(Re(!1))}c===!0&&e(qe())},updateFilesEntity:s=>{e(ae({files:s}))},onDeleteFile:s=>{e(te(s))},onEditFileName:(s,c)=>{e(ne(s,c.split(".")[0]))},onAdditionalVerificationFieldsChanged:s=>{const{sourceOfFunds:c}=s;e(Mn({sourceOfFunds:c?.selectedOption??""}))},onUpdateFundAllocation:s=>{i.trackTreasuryAllocationAction("update",Ye(s)),e(zn(s))},onConfirmFundAllocation:()=>{e(Re(n))},onOverlayClose:()=>{e(Oe())}}}))(at),vt=()=>{const e=Te(),o=J(),a=Q(),t=ee(),r=Ee(),n=nt(),{tenantEmailDomain:i}=W(),{useDynamicConfig:l}=me(),s=ie(),[c,p]=h.useState(!1),g=Fe(s?.loggedInUserRoleMap),{configValue:S}=l(xe.zeniAccountsConfig),_=je(S),[I,d]=h.useState(!1),[y,f]=h.useState(!1),[P,b]=h.useState(!1),[m,C]=h.useState(!1),[k,T]=h.useState(!1),A=v((w=>w.treasurySetupViewState.fetchState)),U=v((w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),z=v((w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),V=v((w=>w.treasuryDetailState.transactionsState?.fetchState)),M=v((w=>F(w))),O=E.getSignedInUserTenant(i)?.companyId??M.companyId,ce=v((w=>Je(w,O))),H=ce.isAtomicAccountExists,K=E.getSignedInUser(),re=w=>{d(w)};if(K==null)throw Error("Can't access treasury setup page without signing in...");h.useEffect((()=>{y||A!=="Not-Started"||O==null||(f(!0),t(be(O,!0,!1)))}),[y,A,O,t]),h.useEffect((()=>{P||U!=="Not-Started"||O==null||(b(!0),t(jn()))}),[P,U,O,t]),h.useEffect((()=>{m||z!=="Not-Started"||O==null||(C(!0),t(Nn()))}),[m,z,O,t]),h.useEffect((()=>{k||V!=="Not-Started"||O==null||(T(!0),t(Ln(!0)))}),[k,V,O,t]);const Y=M.companyTreasuryInfo?.info?.businessVerificationStatus?.code,B=Y==="pending_review"||Y==="verified";return h.useEffect((()=>{c||A!=="Completed"||H||B||!a.pathname.includes("setup")||p(!0)}),[A,H,B]),M.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1?u.jsx(j,{to:"../promo"}):u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:D,onLoad:()=>{}}),u.jsx(ye,{isAppContentDrawerOpen:I,handleDrawerToggle:re}),u.jsx(ct,{onClose:()=>{t(Oe()),o("../setup")},anchor:"right",open:a.pathname.includes("verification"),transitionDuration:c?0:250,PaperProps:{style:{width:_t.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c?"transparent":r.colors.black,opacity:.75,cursor:"pointer"}}},children:u.jsx(Pt,{onClick:w=>w.stopPropagation(),children:u.jsx(At,{productType:"zeni_treasury",isBusinessVerificationDrawerOpen:!0,closeDrawerHandler:()=>{t(Oe()),o("../setup")}})})}),u.jsx(kt,{navigate:o,location:a,companyId:O,currentTenant:M,isUserZeniAccountsAdmin:g,meetingUrl:e("treasury_setup"),maxInsuredAmount:_.maxInsuredAmount,isAllocationDone:H,analytics:D,treasurySetupView:ce,onClickMenuIcon:()=>{re(!0)},showTreasurySetupOverlay:c,setShowTreasurySetupOverlay:p})]})},Pt=Ve(rt)`
|
|
18
18
|
display: flex;
|
|
19
19
|
min-height: 100%;
|
|
20
20
|
flex-direction: column;
|
|
21
|
-
`,Tt=
|
|
21
|
+
`,Tt=G((function(e,o){const{isUserZeniAccountsAdmin:a,companyId:t}=o,r=F(e),n=E.getSignedInUser(),i=r.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},s=Zn(e,t),c=a&&s.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&s.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly";return{zeniAccountSetUpView:s,connectedAccountProvider:r.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:c,analytics:D,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:l}}),(function(e,o){const{navigate:a,companyId:t,currentTenant:r}=o;return{onBusinessVerificationSectionClick:()=>{a("../verification"),r?.company?.companyZeniAccountInfo!=null&&r?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(pe(t,!1,!0))},onFetchLinkTokenClick:(n,i)=>{e(Pe("account_setup",n,i))},onEstablishConnectionClick:n=>{e(ve(n,t,"account_setup","zeni_accounts"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(ke(n,i,"zeni_accounts","account_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(_e(!1,n,"zeni_accounts","account_setup",i))},onEstablishConnectionSuccess:()=>{e(pe(t,!0))},onEnableZeniAccountClick:()=>{e(X(t,"zeni_accounts"))},onUpdateZeniAccountClick:(n,i,l)=>{e(l==="paymentAccount"?Ie(n,i,"zeni_accounts","account_setup"):Ae("account_setup",n,i))},onUpdatePrimaryFundingAccount:(n,i)=>{e(he(t,"account_setup",n,i))},onEnableZeniAccountSuccess:()=>{a("../",{relative:"path"})},onBackClick:()=>{r?.companyZeniAccountInfo?.info?.isZeniAccountEnabled?a("../"):a("../../")},onNavigateToDashboard:()=>{a("../../dashboard")},onCompanyOfficerUpdated:(n,i)=>{e(Ce({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(L(t,n,"zeni_accounts",!0,!0,!0))},updateFilesEntity:n=>{e(ae({files:n}))},onDeleteFile:n=>{e(te(n))},onEditFileName:(n,i)=>{e(ne(n,i.split(".")[0]))}}}))(it),Et=()=>{const e=Te(),o=J(),a=Q(),t=ee(),{tenantEmailDomain:r}=W(),{useDynamicConfig:n}=me(),i=ie(),l=Fe(i?.loggedInUserRoleMap),{configValue:s}=n(xe.zeniAccountsConfig),c=je(s),[p,g]=h.useState(!1),[S,_]=h.useState(!1),I=v((b=>b.zeniAccountSetupViewState.fetchState)),d=v((b=>F(b))),y=E.getSignedInUserTenant(r)?.companyId??d.companyId,f=E.getSignedInUser(),P=b=>{g(b)};if(f==null)throw Error("Can't access zeni bank account setup page without signing in...");if(h.useEffect((()=>{S||I!=="Not-Started"||y==null?S||I!=="Completed"||y==null||d.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(pe(y,!1,!0)):(_(!0),t(pe(y,!0)))}),[S,I,y,t]),d.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted===!1)return u.jsx(j,{to:"../promo"});{const b=m=>m.trackPageLoaded($.Event.zeniAccountsSetup);return u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:D,onLoad:m=>b(m)}),u.jsx(ye,{isAppContentDrawerOpen:p,handleDrawerToggle:P}),u.jsx(Tt,{navigate:o,location:a,companyId:y,currentTenant:d,isUserZeniAccountsAdmin:l,accountsPromoConfig:c,meetingUrl:e("zeni_accounts_setup"),onClickMenuIcon:()=>{P(!0)}})]})}},Dt=Ve.div`
|
|
22
22
|
display: flex;
|
|
23
23
|
height: 100vh;
|
|
24
24
|
width: 100%;
|
|
@@ -26,4 +26,4 @@ import{j as u}from"./liveblocks-UOzcPsHa.js";import{h as Q,g as X,u as ee,i as G
|
|
|
26
26
|
flex-direction: column;
|
|
27
27
|
align-items: center;
|
|
28
28
|
background-color: ${e=>e.theme.colors.grey4};
|
|
29
|
-
`,Ut=
|
|
29
|
+
`,Ut=G((function(e,o){const a=F(e),t=E.getSignedInUser(),r=a.tenantId,n={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:r??""};return{internationalOnboardingDetails:Gn(e),isReadonly:o.isFormReadonly,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:n,analytics:D}}),(function(e,o){const{navigate:a}=o;return{onFormDataChange:t=>{e(Kn(t))},onSubmitClick:()=>{e(Hn(o.companyId))},onCancelClick:()=>{a("../setup")},updateFilesEntity:t=>{e(ae({files:t}))},onDeleteFile:t=>{e(te(t))},onDeleteFileList:t=>{e(Xe(t))},onEditFileName:(t,r)=>{e(ne(t,r.split(".")[0]))}}}))(st),wt=()=>{const e=J(),o=Q(),a=ee(),[t,r]=h.useState(!1),[n,i]=h.useState(!1),[l,s]=h.useState(!1),{tenantEmailDomain:c}=W(),p=ie(),{useFeatureGate:g}=me(),{isFeatureEnabled:S}=g(q.isBillPayLocalCurrencyFeatureEnabled),_=v((T=>T.internationalWireVerificationState.verificationFormFetchState.fetchState)),I=v((T=>T.billPaySetupViewState.fetchState)),d=v((T=>F(T))),y=Ee(),f=d.companyId??E.getSignedInUserTenant(c)?.companyId,P=v((T=>$n(T.companyState,d.companyId))),b=P?.company.companyBillPayInfo.internationalWireOnboardingStatus,m=b?.code==="onboarding_status_not_started"?void 0:"readonly";if(h.useEffect((()=>{t||_!=="Not-Started"||f==null||(r(!0),a(Wn(f)))}),[t,_,f,a]),h.useEffect((()=>{n||I!=="Not-Started"||f==null||(i(!0),a(Z(f,!0)))}),[I,n,f,a]),E.getSignedInUser()==null)throw Error("Can't access international verification without signing in...");const C=d.companyBillPayInfo?.info?.isBillPayTOSAccepted,k=T=>{s(T)};return C===!1?u.jsx(j,{to:"../promo"}):C===!0&&p?.loggedInUserRoleMap!=null?u.jsxs(Dt,{children:[u.jsx(se,{analytics:D,onLoad:T=>(A=>A.trackPageLoaded($.Event.billPayBusinessVerification,void 0))(T)}),Be(o)?u.jsx(ye,{isAppContentDrawerOpen:l,handleDrawerToggle:k}):null,u.jsx(Ut,{navigate:e,location:o,companyId:f,analytics:D,currentTenant:d,roleMap:p.loggedInUserRoleMap,isFormReadonly:m,isLocalCurrencyEnabled:S})]}):u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}})},Ot=G((function(){return{}}),(function(e,o){const{companyId:a,productType:t}=o;return{onEventReceived:r=>{switch(r){case"bill-pay-set-up-verification-update":case"bill-pay-wise-setup":switch(t){case"reimbursement":e(le(a,!0,!0));break;case"zeni_accounts":e(pe(a,!0,!0));break;case"charge_cards":e(de(a,!0,!0));break;case"zeni_treasury":e(be(a,!0,!0));break;default:e(Z(a,!0,!0))}}}}}))(ot((e=>{const{isBillPayAdminLevelAccess:o,isUserHasOnlyBillPayAccess:a,isReimbursementAdminLevelAccess:t,isZeniAccountAdminLevelAccess:r,isTreasuryAdminLevelAccess:n,isChargeCardAdminLevelAccess:i,isUserHasOnlyCardAccess:l,productType:s,type:c}=e;switch(s){case"bill_pay":switch(c){case"verification":return o?u.jsx(we,{productType:s}):a?u.jsx(j,{to:"../"}):u.jsx(N,{});case"international-wire":return o?u.jsx(wt,{}):a?u.jsx(j,{to:"../"}):u.jsx(N,{});default:return o?u.jsx(pt,{}):a?u.jsx(j,{to:"../"}):u.jsx(N,{})}case"reimbursement":return c==="verification"?t?u.jsx(we,{productType:s}):u.jsx(N,{}):t?u.jsx(ht,{}):u.jsx(N,{});case"zeni_accounts":return c==="verification"?r?u.jsx(we,{productType:"zeni_accounts"}):u.jsx(N,{}):r?u.jsx(Et,{}):u.jsx(N,{});case"zeni_treasury":return n===!0?u.jsx(vt,{}):u.jsx(N,{});case"charge_cards":return c==="verification"?i?u.jsx(we,{productType:"charge_cards"}):l?u.jsx(j,{to:"../"}):u.jsx(N,{}):i?u.jsx(St,{}):l?u.jsx(j,{to:"../"}):u.jsx(N,{})}})));function oa(e){const{tenantEmailDomain:o}=W(),a=v((r=>F(r))).companyId??E.getSignedInUserTenant(o)?.companyId,t={events:a!=null?[`private-encrypted-${a}.bill-pay-set-up-verification-update`,`private-encrypted-${a}.bill-pay-wise-setup`]:[],eventCallback:(r,n,i)=>{i.onEventReceived(r)}};if(E.getSignedInUser()==null)throw Error("Can't access setup details page without signing in...");return u.jsx(Ot,{...e,companyId:a,...t})}export{na as A,ta as P,oa as S,Jt as a,ea as b,yt as c,ft as d,mt as e,aa as f,Ht as g,$t as h,Xt as i,Qt as j,ia as k,qt as l,Kt as m,Wt as n,Gt as o,Zt as p,sa as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as f}from"./liveblocks-D9xsLz4C.js";import{a as u,R as x,q as A}from"./sentry-BMvyJSqc.js";import{u as D,h as z,j as l,g as j,N as M,l as O}from"./core-BomyDm3r.js";import{u as P,z as s,E as B,h as w,G as F,R as _,S as N,U as $,W as R,X as V,Y as v}from"./index-B9ZeVIAQ.js";import{fE as W,Tb as q,Tv as J,gh as X,gj as Y,TA as G,gT as H,di as K,TB as y,TC as Q,TD as Z,b$ as b}from"./zeni-epic-state-C6RT9e71.js";import"./mui-CsJ_uybP.js";import{u as ee}from"./useDeviceId-CpSKwPZ4.js";import{f as te}from"./analyticsHelper-DFvWpT7U.js";import{t as ne}from"./getLocaleForTenant-CdcSWjO0.js";import"./recharts-CkiZYv6b.js";import"./analytics-DCG-BJ2B.js";import"./plaid-Bs9WL7ZA.js";import"./dnd-I9CGHlPV.js";import"./stripe-cKAAJElX.js";import"./lottie-DZ7H5U6k.js";import"./lexical-CYgmazu1.js";import"./pdf-BcamkVED.js";import"./utils-CZJ3iF9S.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]="13bf0b74-b76d-454a-85f4-78b658f7ee11",t._sentryDebugIdIdentifier="sentry-dbid-13bf0b74-b76d-454a-85f4-78b658f7ee11")}catch{}})();const ie=O((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:b(c),sourceUri:b(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Q(n,a)))},clearSignInError:()=>{t(y())}}}))(V),ae=x.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:h,accountLocked:T,accountUnlockTime:E}=l((e=>e.tenantState)),p=l((e=>e.tenantState.fetchState)),L=l((e=>e.tenantState.activeTenantFetchState.fetchState)),S=l((e=>e.tenantState.signInState)),o=l((e=>e.tenantState.loggedInUser)),r=l((e=>W(e))),I=l((e=>q(e))),m=j(),k=B().mode,C=m.state?.magicLinkExpired,U=m.state?.magicLinkAlreadyUsed;if(u.useEffect((()=>{h.fetchState==="Completed"&&c!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[h.fetchState,c]),u.useEffect((()=>{t(void 0)}),[]),u.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(J(I.tenantsInOrder),o.zeniSessionId),X(o.userId,o.zeniSessionId,r.tenantId),i(Y(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(G("Completed")),F.updateAppLocaleID(ne(r)),te(o,r,k,void 0,I.tenantsInOrder),H().then((()=>{const e=R();e!=null&&_(e)})),setTimeout((()=>{w.trackLogin(N.Event.loginSuccess,o.authProvider??"google",K(r.productSettings))}),2e3))}),[S,p,L,o,r,I,k,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(M,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!U,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),T===!0&&E!=null?f.jsx($,{onClose:()=>i(y()),unlockDate:E}):null]})}export{ve as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-D9xsLz4C.js";import{a as i}from"./sentry-BMvyJSqc.js";import{u as c,g as d,N as u}from"./core-BomyDm3r.js";import{z as n,h as a,S as m,a7 as p}from"./index-B9ZeVIAQ.js";import{gW as g,TR as y}from"./zeni-epic-state-C6RT9e71.js";import{n as h}from"./mui-CsJ_uybP.js";import"./recharts-CkiZYv6b.js";import"./analytics-DCG-BJ2B.js";import"./plaid-Bs9WL7ZA.js";import"./dnd-I9CGHlPV.js";import"./stripe-cKAAJElX.js";import"./lottie-DZ7H5U6k.js";import"./lexical-CYgmazu1.js";import"./pdf-BcamkVED.js";import"./utils-CZJ3iF9S.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]="e89f5933-c86b-466d-955e-70751133152e",e._sentryDebugIdIdentifier="sentry-dbid-e89f5933-c86b-466d-955e-70751133152e")}catch{}})();function N(){const e=c(),t=d(),r=i.useRef(!1),f=n.isSignedIn(),o=t.state?.message==="logout"||f;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),y(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(l){console.error("Error during sign out:",l)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?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,4 +1,4 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-
|
|
1
|
+
import{j as C}from"./liveblocks-D9xsLz4C.js";import{a as f}from"./sentry-BMvyJSqc.js";import{h as pa,u as Ta,g as fa,k as ga,j as F,i as _a,l as ma}from"./core-BomyDm3r.js";import{aK as ba,aL as Da,z as x,M as Sa,y as G,as as ha,a8 as Ea,h as ya,S as Aa,e4 as Ca,p as R,a4 as Ga}from"./index-B9ZeVIAQ.js";import{fE as Ia,a1e as X,Qm as B,a1f as Y,a1a as Ba,PK as Z,a1g as Ka,PS as V,Ps as va,P4 as La,Qn as W,a1h as q,gg as wa,Qd as Ra,Qi as Ua,Q5 as Pa,Q3 as H,Qj as Fa,Q0 as ja,a1i as xa,a1j as $a,a1k as Na,a1l as Oa,a1m as I,dw as Qa,dv as za,a1n as Ma,Pp as Za}from"./zeni-epic-state-C6RT9e71.js";import{n as Va}from"./mui-CsJ_uybP.js";import{u as Wa}from"./useAskAiCfoHostNavButtonProps-DkXoRZ45.js";import{M as qa}from"./MobileAppDrawer-D8KSGZ8t.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]="33c731ab-2d68-4e8d-a340-008f71db2628",e._sentryDebugIdIdentifier="sentry-dbid-33c731ab-2d68-4e8d-a340-008f71db2628")}catch{}})();const c={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"},Ha=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),Ja=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),U=e=>Array.isArray(e)&&e.every((a=>typeof a=="string")),Xa=e=>{if(e==null||typeof e!="object")return null;const a=e,n=typeof a.task_id=="string"?a.task_id:typeof a.id=="string"?a.id:null;if(n==null||typeof a.tenant_id!="string"||typeof a.event_type!="string")return null;const o={task_id:n,tenant_id:a.tenant_id,event_type:a.event_type};return typeof a.is_private=="boolean"&&(o.is_private=a.is_private),U(a.assignees)&&(o.assignees=a.assignees),U(a.direct_assignees)&&(o.direct_assignees=a.direct_assignees),typeof a.created_by=="string"&&(o.created_by=a.created_by),U(a.task_group_ids)&&(o.task_group_ids=a.task_group_ids),typeof a.name=="string"&&(o.name=a.name),typeof a.parent_task_id=="string"&&(o.parent_task_id=a.parent_task_id),o},Ya=e=>{if(e==null||typeof e!="object")return null;const a=e;return U(a.task_ids)?{task_ids:a.task_ids}:null},pe=e=>{if(e==null||typeof e!="object")return null;const a=e;return typeof a.task_id!="string"?null:{task_id:a.task_id}},ae=e=>{const{events:a,onEvent:n,onSubscribed:o}=e,i=ba(),g=f.useRef(n),l=f.useRef(o),_=f.useRef(0);f.useEffect((()=>{g.current=n}),[n]),f.useEffect((()=>{l.current=o}),[o]);const t=f.useMemo((()=>[...a].sort().join("|")),[a]);f.useEffect((()=>{if(i==null||a.length===0)return;const s=[],p=new Set,S=()=>{if(l.current==null)return;const m=Date.now();m-_.current<5e3||(_.current=m,l.current())};return a.forEach((m=>{const[b,D]=Da(m);if(D==="")return;const E=i.channel(b),y=T=>{g.current(D,T)};let k;if(E?.subscribed===!0){if(k=E,k.bind(D,y),!p.has(b)){p.add(b),S();const T=()=>{S()};k.bind("pusher:subscription_succeeded",T),s.push((()=>{k.unbind("pusher:subscription_succeeded",T)}))}s.push((()=>{E.unbind(D,y)}))}else{if(k=E??i.subscribe(b),k.bind(D,y),!p.has(b)){p.add(b);const T=()=>{S()};k.bind("pusher:subscription_succeeded",T),s.push((()=>{k.unbind("pusher:subscription_succeeded",T)}))}s.push((()=>{k.unbind(D,y)}))}})),()=>{s.forEach((m=>m()))}}),[i,t])},ee=Va.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,4 +6,4 @@ import{j as C}from"./liveblocks-UOzcPsHa.js";import{a as f}from"./sentry-DHDsO12
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,te=ma((function(e,a){const n=
|
|
9
|
+
`,te=ma((function(e,a){const n=X(e,a.isTaskTemplatesEnabled),{taskGroupId:o}=a,i=o!=null&&o!==""?{...n,taskGroupsWithTasksList:n.taskGroupsWithTasksList.map((t=>({...t,tasks:t.tasks.filter((s=>s.taskGroupIds.includes(o)))}))).filter((t=>t.tasks.length>0))}:n,g=Ba(e),l=x.isZeniUser(),_=e.taskDetailState?.subTaskCreateStatus?.fetchState;return{taskListView:i,tagListView:g,localData:i.localData,isTaskTemplatesEnabled:a.isTaskTemplatesEnabled,isZeniUser:l,subTaskCreateStatus:_}}),(function(e,a){const{navigate:n,currentTenant:o,location:i,isTaskTemplatesEnabled:g}=a,{tenantEmailDomain:l}=o,{groupByKey:_}=a.uiState;return{onTaskManagementRowClick:t=>{const s=J(l,t),p=R(i.state?.pathnameStackToGoBack,i.pathname);n(s,{state:{pathnameStackToGoBack:p}})},onReloadTasks:()=>{e(B(!0,g))},onTabChange:t=>{e(Oa(t))},onParentTaskClick:t=>{const s=J(l,t);window.open(s,"_blank","noopener")},bulkUpdateTasks:(t,s)=>{e(H(t,null,s))},onNewTaskClick:()=>{if(a.localData.defaultTaskGroupId!=null){const t=j(l,a.localData.defaultTaskGroupId),s=R(i.state?.pathnameStackToGoBack,i.pathname);n(t,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(t,s)=>{e(q({uiState:{sortKey:t,sortOrder:s}}))},onFiltersChange:t=>{e(Na({filters:t}))},onSearchTextChanged:t=>{e($a({searchText:t}))},onReloadCards:()=>{e(B(!0,g))},onBackClick:()=>{if(i.state?.message==="triggerBackClick"){const t=Ga(i.state?.pathnameStackToGoBack),s=t.poppedPathname??"../";n(s,{state:{pathnameStackToGoBack:t.newStack}})}else n("../")},updateLocalData:t=>{e(xa({localData:t}))},resetLocalData:()=>{e(Y({taskGroupById:a.taskGroupState.taskGroupById}))},handleCreateGroup:t=>{e(ja(a.localData.newTaskGroupName,t))},assignGroupToTasks:t=>{e(H(a.localData.selectedTaskIds,t,Fa(a.uiState.groupByKey,t)))},onDeleteTaskGroup:t=>{e(Pa(t))},onAddNewTaskToTaskGroup:t=>{if(a.localData.defaultTaskGroupId!=null){const s=ne(_,t);e(Z({taskDetailLocalData:s}));const p=j(l,a.uiState.groupByKey==="groupName"?t:a.localData.defaultTaskGroupId),S=R(i.state?.pathnameStackToGoBack,i.pathname);n(p,{state:{pathnameStackToGoBack:S,message:"comingFromTaskListPage"}})}},onDragNDrop:(t,s)=>{e(Ua(a.localData.selectedTaskIds.length>0?a.localData.selectedTaskIds:[t],s))},onTaskGroupRename:(t,s)=>{e(Ra(t,s))},onTimeSpentUpdate:(t,s)=>{e(W({task:t,updates:s}))},onShowToast:t=>{e(wa(t))},onGroupByFilterChange:t=>{e(q({uiState:{groupByKey:t}}))},updateTask:(t,s)=>{e(W({task:t,updates:s}))},onCreateTagClick:(t,s)=>{e(La(t,s))},onSubtaskCreation:(t,s)=>{e(va({...s,parentTaskId:t}))},handleGroupTemplateClick:t=>{e(V(t,[]))},handleGroupTemplateTaskClick:(t,s)=>{e(V(t,[s]))},handleNewTaskInitialization:t=>{if(e(Z({taskDetailLocalData:{...Ka,name:t}})),a.localData.defaultTaskGroupId!=null){const s=j(l,a.localData.defaultTaskGroupId),p=R(i.state?.pathnameStackToGoBack,i.pathname);n(s,{state:{pathnameStackToGoBack:p,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:t=>{n(`/${l}/tasks/group/${t}`)},onQuickResponsesClick:()=>{n(`/${l}/tasks/quick-responses`)}}}))(Ca);function se(){const e=pa(),a=Ta(),n=fa(),o=x.getSignedInUser(),i=x.isZeniUser(),g=ga(),l=F((u=>Ia(u))),{taskGroupId:_}=_a(),{useFeatureGate:t}=Sa(),{isFeatureEnabled:s}=t(G.isTaskTemplatesEnabled),{isFeatureEnabled:p}=t(G.isTaskCannedResponsesEnabled),{isFeatureEnabled:S}=t(G.isTaskCategorizationEnabled),{isFeatureEnabled:m}=t(G.isTaskBulkResolutionEnabled),{isFeatureEnabled:b}=t(G.isTaskGroupAssigneesEnabled),{isFeatureEnabled:D}=t(G.isTaskRecurringParentEnabled),[E,y]=f.useState(!1),k=F((u=>X(u,s))),T=F((u=>u.taskGroupState)),K=k.fetchState,{isAiCfoAccessEnabled:aa,onAskAiCfoClick:ea}=Wa({mobileExploreReferrer:"Task Checklist"});ha({isDataReady:K==="Completed"}),f.useEffect((()=>{a(B(!1,s))}),[l?.tenantId,a,s]);const ta=f.useMemo((()=>{const u=[c.TASK_CREATED,c.TASK_UPDATED,c.TASKS_BULK_UPDATED,c.TASKS_BULK_DELETED],A=[c.TASK_CREATED,c.TASK_UPDATED,c.TASK_SNOOZE_RESURFACED,c.TASKS_BULK_UPDATED];return[...Ha(l?.companyId,u),...Ja(o?.userId,A)]}),[l?.companyId,o?.userId]);if(ae({events:ta,onEvent:(u,A)=>{switch(u){case c.TASK_CREATED:case c.TASK_UPDATED:{const r=Xa(A);if(r!=null){const w=g.getState(),$=r.task_id,h=$!=null?w.taskState.taskByID?.[$]:void 0,P=h!=null;if(!i)if(r.is_private===!0){if(!P)return}else{const v=o?.userId,L=new Set([...r.assignees??[],...r.direct_assignees??[]]);if(r.created_by!=null&&r.created_by!==""&&L.add(r.created_by),!(v!=null&&L.has(v))&&!P)return}if(u===c.TASK_UPDATED&&P&&h!=null&&Array.isArray(r.task_group_ids)){const v=new Set(Object.values(w.taskGroupState.taskGroupById??{}).filter((d=>d!=null&&!d.isDeleted)).map((d=>d.id))),L=(h.taskGroupIds??[]).filter((d=>v.has(d))),N=(r.task_group_ids??[]).filter((d=>v.has(d))),sa=L.length===N.length&&L.every((d=>N.includes(d))),O=h.taskGroupIds??[],Q=r.task_group_ids??[],na=O.length!==Q.length||!O.every((d=>Q.includes(d))),oa=(d,da)=>{const z=d??[],M=da??[];if(z.length!==M.length)return!1;const ca=new Set(M);return z.every((ka=>ca.has(ka)))},ra=r.name==null||r.name===h.name,ia=r.is_private==null||r.is_private===h.isPrivate,la=r.assignees==null||oa(r.assignees,h.assignees),ua=r.direct_assignees==null;if(sa&&na&&ra&&ia&&la&&ua)return}}return void a(B(!0,s))}case c.TASKS_BULK_DELETED:{const r=Ya(A);return r==null?void 0:void r.task_ids.forEach((w=>a(Za(w))))}case c.TASKS_BULK_UPDATED:case c.TASK_SNOOZE_RESURFACED:return void a(B(!0,s))}},onSubscribed:()=>{a(B(!0,s))}}),f.useEffect((()=>{K==="Completed"&&a(Y({taskGroupById:T.taskGroupById}))}),[K,T.taskGroupById]),o==null)throw Error("Can't access task list page without signing in...");return C.jsxs(C.Fragment,{children:[K==="Completed"?C.jsx(Ea,{analytics:ya,onLoad:u=>(A=>A.trackPageLoaded(Aa.Event.taskListPage))(u)}):null,C.jsxs(ee,{children:[C.jsx(qa,{isAppContentDrawerOpen:E,handleDrawerToggle:u=>{y(u)}}),C.jsx(te,{location:n,navigate:e,currentTenant:l,taskGroupId:_,taskGroupState:T,localData:k.localData,uiState:k.uiState,isTaskTemplatesEnabled:s,taskListFetchState:K,isTaskCategorizationEnabled:S,isTaskCannedResponsesEnabled:p,isTaskBulkResolutionEnabled:m,isTaskGroupAssigneesEnabled:b,isTaskRecurringParentEnabled:D,isAiCfoAccessEnabled:aa,onAskAiCfoClick:ea})]})]})}const J=(e,a)=>`/${e}/tasks/${encodeURIComponent(a)}`,j=(e,a)=>`/${e}/tasks/new/${a}`,ne=(e,a)=>{if(e==="assignee"){const n=a.split(",");return{...I.taskDetailLocalData,assignee:n}}if(e==="priority"){const n=Qa(a);return{...I.taskDetailLocalData,priority:n}}if(e==="status"){const n=za(a);return{...I.taskDetailLocalData,status:n}}if(e==="tag"){const n=a.split(",");return{...I.taskDetailLocalData,tagIds:n}}if(e==="dueDate"){const n=Ma(a);return{...I.taskDetailLocalData,dueDate:n}}return{...I.taskDetailLocalData}},Te=Object.freeze(Object.defineProperty({__proto__:null,default:se},Symbol.toStringTag,{value:"Module"}));export{c as T,Ja as a,Ha as b,Ya as c,Xa as d,se as e,Te as f,pe as t,ae as u};
|