@zeniai/web-app-ui 5.1.47-qa → 5.1.48-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-Cfx49so1.js +1 -0
- package/dist/assets/AddressScreen-BdkkfpOD.js +9 -0
- package/dist/assets/AiCfoScreen-CJ2jNf-v.js +22 -0
- package/dist/assets/BillPayApprovalRoutes-C9K9cwdL.js +1 -0
- package/dist/assets/BillPayRoutes-DI9tqZg4.js +119 -0
- package/dist/assets/BusinessVerificationPageScreen-BvxrLE03.js +9 -0
- package/dist/assets/CardsAiCfoScreen-7dPiCcoy.js +14 -0
- package/dist/assets/ChargeCardRoutes-BIha80p-.js +71 -0
- package/dist/assets/{CompanyPassportScreen-DDjqyMwX.js → CompanyPassportScreen-CuQ-1lmT.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-CZ8o3YZi.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-BnNax-8a.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-BgHk9KVG.js +23 -0
- package/dist/assets/{DashboardRoutes-DtoX2bSV.js → DashboardRoutes-BRz85PCY.js} +4 -4
- package/dist/assets/DefaultTenantHome-BcFCHmoG.js +1 -0
- package/dist/assets/{DomesticWireDetailScreen-lyPlKl3e.js → DomesticWireDetailScreen-BgEqXJEl.js} +3 -3
- package/dist/assets/DrawerScreen-_1RQlY4y.js +1 -0
- package/dist/assets/EntityDetailRoutes-C7uFwXUz.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-C-CBTBm8.js +25 -0
- package/dist/assets/FeaturePreviewScreen-CeZNu_Vi.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-C0pKe0vy.js +1 -0
- package/dist/assets/MagicLinkRoutes-7XFxi-_N.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-CGIo0N71.js +12 -0
- package/dist/assets/MobileAppDrawer-D6Fu3M_x.js +1 -0
- package/dist/assets/NotFoundScreen-_JeeXwwE.js +1 -0
- package/dist/assets/NotificationRoutes-DN56rmti.js +1 -0
- package/dist/assets/OAuthConsentScreen-DCckgFNN.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-DQXcPbfr.js +1 -0
- package/dist/assets/PeopleRoutes-CVdNkMW2.js +22 -0
- package/dist/assets/PerformanceRoutes-BFxcHJn-.js +1 -0
- package/dist/assets/{Preview-CgleC3zF.js → Preview-BohCuc6u.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-PJhN_FwV.js → QBOConnectionScreen-CL_uJ9x0.js} +1 -1
- package/dist/assets/ReferralListScreen-Cb-o7kTE.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-BV3UuxT_.js +1 -0
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-DGivgXWQ.js +1 -0
- package/dist/assets/{ReimbursementRoutes-B37DKpue.js → ReimbursementRoutes-CqFV9Upl.js} +12 -12
- package/dist/assets/ReportsRoutes-iiURxm9r.js +1 -0
- package/dist/assets/RewardsRoutes-6b8h1meH.js +1 -0
- package/dist/assets/ScreenRoutes-BVYp-4m8.js +2 -0
- package/dist/assets/SettingsRoutes-DOfAWDHL.js +57 -0
- package/dist/assets/SetupPagesScreen-Djxd17id.js +29 -0
- package/dist/assets/SignInScreen-D7gytnqh.js +1 -0
- package/dist/assets/SignOutScreen-C-j9YPM-.js +9 -0
- package/dist/assets/TaskListScreen-Dreq2LHj.js +9 -0
- package/dist/assets/TaskRoutes-Dy3OoIyM.js +9 -0
- package/dist/assets/TransactionDetailRoutes-Bs9ghT0l.js +1 -0
- package/dist/assets/{TransactionDetailScreen-DTpKVJNQ.js → TransactionDetailScreen-s_jEo2WG.js} +2 -2
- package/dist/assets/TransactionListRoutes-BgdTO4HR.js +1 -0
- package/dist/assets/TreasuryRoutes-8u7u_9F8.js +37 -0
- package/dist/assets/{VendorsRoutes-DcKzo6Bg.js → VendorsRoutes-CYZmnwrv.js} +27 -27
- package/dist/assets/WiseConfirmationScreen-BiPmlGq6.js +12 -0
- package/dist/assets/ZeniAccountRoutes-DO2fE8r2.js +73 -0
- package/dist/assets/ZeniAccountStatementScreen-Cb_rEVWr.js +9 -0
- package/dist/assets/{accountMappingHelper-B6MS-2MI.js → accountMappingHelper-DwVJRdRo.js} +1 -1
- package/dist/assets/{analytics-PD1ubuhk.js → analytics-BUvTITrb.js} +1 -1
- package/dist/assets/{analyticsHelper-DugMUcaM.js → analyticsHelper-DaDCazpC.js} +1 -1
- package/dist/assets/{core-CBQNMmNB.js → core-wjM80qIn.js} +2 -2
- package/dist/assets/{decodeURIComponentSafe-CTFTZ79i.js → decodeURIComponentSafe-4aj60Fs2.js} +1 -1
- package/dist/assets/dnd-BK3JI-SF.js +6 -0
- package/dist/assets/{empty-JWZ-J0Ml.js → empty-CUF5cU17.js} +1 -1
- package/dist/assets/{index-CjTANTHH.js → empty-D8a3KaBg.js} +1 -1
- package/dist/assets/{emptyVideoElement-B-sm92eo.js → emptyVideoElement-DDXARDvi.js} +1 -1
- package/dist/assets/epic-sEosDzE-.js +2 -0
- package/dist/assets/getLocaleForTenant-yX1iEbj2.js +1 -0
- package/dist/assets/{index-R6GjjTB3.css → index-BUmr5maU.css} +1 -1
- package/dist/assets/{index-DQvz9Cq_.js → index-BVZpKi1S.js} +2 -2
- package/dist/assets/index-CWHzFtd9.js +1 -0
- package/dist/assets/{index-CFJnQx3u.js → index-D3VvkPFN.js} +1 -1
- package/dist/assets/{index-I7xJZYV9.js → index-D8Ajpofo.js} +1 -1
- package/dist/assets/{index-CWc-abgd.js → index-DApnMePi.js} +1 -1
- package/dist/assets/{index-C6g7x9Xf.js → index-Det3Ki3b.js} +30766 -26745
- package/dist/assets/{index-Df5QM9aG.js → index-DuIPJrPJ.js} +1 -1
- package/dist/assets/index-DypTJFR1.js +1 -0
- package/dist/assets/{lexical-Pu0UU7Gm.js → lexical-DcicQSkI.js} +1 -1
- package/dist/assets/{liveblocks-Dn3WlYDG.js → liveblocks-GsPfxkQ7.js} +1 -1
- package/dist/assets/{lottie-CyQvfguW.js → lottie-C5rIATv6.js} +1 -1
- package/dist/assets/{mui-BaxUp1f6.js → mui-BSDa87ap.js} +1 -1
- package/dist/assets/{pathToGoBack-C0RVd60M.js → pathToGoBack-CAzQiLsh.js} +1 -1
- package/dist/assets/{pdf-BdzM5lLL.js → pdf-BLNuomMl.js} +4 -4
- package/dist/assets/{pdf-lib-Ho0i9gSn.js → pdf-lib-BR9HrRu8.js} +1 -1
- package/dist/assets/{plaid-CkikokYa.js → plaid-50YvjniW.js} +1 -1
- package/dist/assets/{pusher-HxHyQmjg.js → pusher-DyWQA0RT.js} +1 -1
- package/dist/assets/{react-gdz5Za5l.js → react-BKGEXYtN.js} +1 -1
- package/dist/assets/{react-CcMSfEsT.js → react-Ci53z-6c.js} +1 -1
- package/dist/assets/{react-D0UgoMvf.js → react-CrU6fZvx.js} +1 -1
- package/dist/assets/{react-hQHX2Hwu.js → react-Dj2j64JD.js} +1 -1
- package/dist/assets/{react-y7uOpsli.js → react-DmfWUkEA.js} +1 -1
- package/dist/assets/{react-C-w13vuR.js → react-uWUXgbgu.js} +1 -1
- package/dist/assets/{recharts-cF7j6WPE.js → recharts-D4VpFd5q.js} +3 -3
- package/dist/assets/{routePaths-DlNlbaAA.js → routePaths-CbGdb8gZ.js} +1 -1
- package/dist/assets/{sentry-BBtxjqBH.js → sentry-B2TzMFx9.js} +1 -1
- package/dist/assets/{url-jngClEHC.js → url-CcjxrMLZ.js} +1 -1
- package/dist/assets/{url-Da29OSrT.js → url-D1xNpCnF.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-D_Q4HzQ3.js → useAiCfoDashboardSuggestedQuestionsChips-D8RjKLM8.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BXGcqvyl.js +1 -0
- package/dist/assets/useCashManagementBanner-CdVrtcFk.js +1 -0
- package/dist/assets/{useDeviceId-B1_7g90r.js → useDeviceId-t80vtq4B.js} +1 -1
- package/dist/assets/useInitialThreadRequest-D9NRPlO5.js +1 -0
- package/dist/assets/{utils-DGbjXCxQ.js → utils-BwzhiOdE.js} +2 -2
- package/dist/assets/{withTransactionSidePanel-DFqH5ga0.js → withTransactionSidePanel-D8vEjelm.js} +4 -4
- package/dist/assets/zeni-epic-state-DrcliB1J.js +13 -0
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-D_PJZStE.js +0 -1
- package/dist/assets/AddressScreen-BNSulfP2.js +0 -9
- package/dist/assets/AiCfoScreen-BRmtRqLo.js +0 -22
- package/dist/assets/BillPayApprovalRoutes-DSwN963F.js +0 -1
- package/dist/assets/BillPayRoutes-BKFIhw4T.js +0 -119
- package/dist/assets/BusinessVerificationPageScreen-Bh75FXTZ.js +0 -9
- package/dist/assets/ChargeCardRoutes-DuJHL5ER.js +0 -71
- package/dist/assets/ConnectionAuthScreen-BbpPecK9.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-CFfHRYF8.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-D6zOpJxc.js +0 -23
- package/dist/assets/DefaultTenantHome-BZ2NPVTh.js +0 -1
- package/dist/assets/DrawerScreen-D_M_HR61.js +0 -1
- package/dist/assets/EntityDetailRoutes-CDYJ8kN1.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-ClyCvyOU.js +0 -25
- package/dist/assets/FeaturePreviewScreen-pifRlvMk.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-Dp-z4HfA.js +0 -1
- package/dist/assets/MagicLinkRoutes-BcW2etLk.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-CPn8LjKM.js +0 -12
- package/dist/assets/MobileAppDrawer-CMqrUzty.js +0 -1
- package/dist/assets/NotFoundScreen-BWmMemx_.js +0 -1
- package/dist/assets/NotificationRoutes-B1UVibHD.js +0 -1
- package/dist/assets/OAuthConsentScreen-CfqHAduS.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-DUIhGSTU.js +0 -1
- package/dist/assets/PeopleRoutes-BCWUNMRP.js +0 -22
- package/dist/assets/PerformanceRoutes-DdabGxr6.js +0 -1
- package/dist/assets/ReferralListScreen-CiOu2vwF.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-orETMU81.js +0 -1
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-D19M7wpr.js +0 -1
- package/dist/assets/ReportsRoutes-5ZVRpu4r.js +0 -1
- package/dist/assets/RewardsRoutes-DU8RtihJ.js +0 -1
- package/dist/assets/ScreenRoutes-CkJR8wCv.js +0 -2
- package/dist/assets/SettingsRoutes-BG5-7X8p.js +0 -57
- package/dist/assets/SetupPagesScreen-DEbuiMhl.js +0 -29
- package/dist/assets/SignInScreen-BQVRUain.js +0 -1
- package/dist/assets/SignOutScreen-CmoYzsXw.js +0 -9
- package/dist/assets/TaskListScreen-BJsKOwed.js +0 -9
- package/dist/assets/TaskRoutes-D99eqt35.js +0 -9
- package/dist/assets/TransactionDetailRoutes-DTfcZe3C.js +0 -1
- package/dist/assets/TransactionListRoutes-C0KioFUU.js +0 -1
- package/dist/assets/TreasuryRoutes-9IHrvCFk.js +0 -37
- package/dist/assets/WiseConfirmationScreen-DjrOQ8Bz.js +0 -12
- package/dist/assets/ZeniAccountRoutes-CBfR1pgu.js +0 -57
- package/dist/assets/ZeniAccountStatementScreen-B8cfC_y6.js +0 -9
- package/dist/assets/dnd-Z3xBQUdM.js +0 -6
- package/dist/assets/empty-DKpVzxls.js +0 -1
- package/dist/assets/epic-BKJlIWaw.js +0 -2
- package/dist/assets/getLocaleForTenant-D7ZwJ2SM.js +0 -1
- package/dist/assets/index-DtpzPOK-.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-C_v5Otmr.js +0 -1
- package/dist/assets/useInitialThreadRequest-CKOaiR-a.js +0 -1
- package/dist/assets/zeni-epic-state-kigW-Vb1.js +0 -13
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-Dn3WlYDG.js";import{i as S,n as g,h as C,g as y,u as ee,s as te,j as E,N as ae,o as ne,p}from"./core-CBQNMmNB.js";import{Kb as k,Kc as v,Kd as K,A8 as A,zW as T,Ke as B,Kf as oe,Kg as se,z_ as ie,eY as $,A5 as le,A2 as re}from"./zeni-epic-state-kigW-Vb1.js";import{J as x,o as r,Q as de,e as j,j as G,q as ce,r as me,U as pe,v as M,s as ue,d as he,G as ge,H as xe,m as fe,w as be,B as we,x as Se,p as ye,S as ke,y as ve,A as je,Y as $e}from"./index-C6g7x9Xf.js";import{n as m}from"./mui-BaxUp1f6.js";import f from"./NotFoundScreen-BWmMemx_.js";import{a as I}from"./sentry-BBtxjqBH.js";import"./recharts-cF7j6WPE.js";import"./analytics-PD1ubuhk.js";import"./plaid-CkikokYa.js";import"./dnd-Z3xBQUdM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CyQvfguW.js";import"./lexical-Pu0UU7Gm.js";import"./pdf-BdzM5lLL.js";import"./utils-DGbjXCxQ.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]="d3896559-711b-42b3-b1f2-38f05e13d373",e._sentryDebugIdIdentifier="sentry-dbid-d3896559-711b-42b3-b1f2-38f05e13d373")}catch{}})();const Ie=m.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
10
|
-
`,Ce=g(function(e){const a=k(e),n=v(e),{companyName:o}=a;return{companyName:o,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:a}},function(e,a){const{vendorId:n,billId:o}=a;return{onFetchBankName:s=>{e(T(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(A(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(K({data:l}))}}})(de);function F(){const e=x(),{vendorId:a,billId:n}=S();return a==null||n==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Ie,{windowSize:e,children:t.jsx(Ce,{vendorId:a,billId:n})})})}const Ae=m.div`
|
|
11
|
-
display: flex;
|
|
12
|
-
height: 100vh;
|
|
13
|
-
width: 100%;
|
|
14
|
-
flex: 1 1 auto;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
align-items: center;
|
|
17
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
18
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
19
|
-
`,Be=g(function(e,a){const{isSubPage:n}=a;return{addressToEdit:B(e),googleAPIKey:G.googleMapsAPIKey,isSubPage:n}},function(e,a){const{navigate:n,location:o}=a,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??ze();n(i,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const i=Pe(l);e(oe({addressToCreate:i})),s()},onCancel:()=>{s()}}})(ce);function De({isSubPage:e}){const a=C(),n=y(),o=x();return t.jsx(t.Fragment,{children:t.jsx(Ae,{windowSize:o,children:t.jsx(Be,{location:n,navigate:a,isSubPage:e===!0,googleAPIKey:G.googleMapsAPIKey})})})}const ze=(e=2)=>{let a="../";for(let n=0;n<e;n++)a=`${a}../`;return a},Pe=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Le=m.div`
|
|
20
|
-
display: flex;
|
|
21
|
-
height: 100%;
|
|
22
|
-
width: 100%;
|
|
23
|
-
flex: 1 1 auto;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
align-items: center;
|
|
26
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
27
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
28
|
-
`,Ne=g(function(e){const a=k(e),n=v(e),o=B(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankName:i=>{e(T(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(A(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:d}=i;e(K({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),d=M(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(pe);function Ee(){const e=C(),a=y(),n=x(),{vendorId:o,billId:s}=S();return o==null||s==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Le,{windowSize:n,children:t.jsx(Ne,{location:a,navigate:e,vendorId:o,billId:s})})})}const Fe=m.div`
|
|
29
|
-
display: flex;
|
|
30
|
-
height: 100%;
|
|
31
|
-
width: 100%;
|
|
32
|
-
flex: 1 1 auto;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
align-items: center;
|
|
35
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
37
|
-
`,Ke=g(function(e){const a=k(e),n=v(e),o=B(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(A(i,"international",s,l,a.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:d}=i;e(se({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),d=M(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(ge);function Te(){const e=C(),a=y(),n=x(),{vendorId:o,billId:s}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?t.jsx(f,{}):t.jsx(Fe,{windowSize:n,children:t.jsx(Ke,{location:a,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Ge={containerWidth:new je(100,58)},Me=m(ke)`
|
|
38
|
-
width: ${r.sp4};
|
|
39
|
-
height: ${r.sp4};
|
|
40
|
-
margin-bottom: ${r.sp3};
|
|
41
|
-
margin-top: ${r.sp3};
|
|
42
|
-
margin-left: ${r.sp8};
|
|
43
|
-
cursor: pointer;
|
|
44
|
-
position: absolute;
|
|
45
|
-
color: ${e=>e.theme.colors.brandColorJade};
|
|
46
|
-
`,He=m.div`
|
|
47
|
-
display: flex;
|
|
48
|
-
height: 100vh;
|
|
49
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
50
|
-
width: 100vw;
|
|
51
|
-
overflow-y: scroll;
|
|
52
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
53
|
-
`,Ve=m.div`
|
|
54
|
-
display: flex;
|
|
55
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
56
|
-
flex-direction: column;
|
|
57
|
-
width: ${e=>`${Ge.containerWidth.value(e.windowSize)}%`};
|
|
58
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
59
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
60
|
-
padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
|
|
61
|
-
`,We=m.div`
|
|
62
|
-
display: flex;
|
|
63
|
-
flex-direction: column;
|
|
64
|
-
align-items: center;
|
|
65
|
-
justify-content: center;
|
|
66
|
-
padding: ${e=>e.windowSize==="small"?r.sp3:`62px ${r.sp6} ${r.sp9} ${r.sp8}`};
|
|
67
|
-
height: ${e=>e.windowSize==="small"?"490px":"auto"};
|
|
68
|
-
overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
|
|
69
|
-
width: ${e=>e.windowSize=="small"?"auto":"42%"};
|
|
70
|
-
background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
|
|
71
|
-
margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
|
|
72
|
-
`,_e=g(function(e,a){return{file:a.file,type:a.type}})(ve);function h({appContent:e}){const a=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=te(),d=i.get("token"),H=n.pathname.includes("address"),b=x(),V=xe(),D=fe(),w=be(),W=()=>{V.toggle()},_=E(u=>k(u)),U=E(u=>v(u)),{authParams:J,fetchState:c,billAttachment:Y,billFetchState:z,companyName:O,currencySymbol:Q,amount:q}=_,{tenantId:P,userId:L,sessionId:N}=J,{fetchState:R,internationalBankAccountCreateStatus:X}=U;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{w&&c==="Not-Started"&&s!=null&&o!=null&&d!=null&&a(le(s,o,d))},[w,c,s,o,d,a]),I.useEffect(()=>{w&&c==="Completed"&&($(L,N,P),l!=null&&a(re(l)))},[c,w,L,N,P,l,a]),c==="Error"?t.jsx(f,{}):R==="Completed"||X.fetchState==="Completed"?($(),t.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?t.jsx(we,{fetchState:c,style:{height:"100vh",backgroundColor:D.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${D.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[c==="Completed"&&z==="Completed"&&t.jsx(Se,{analytics:j,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",s??"",O,l??"",Ue(n.pathname),Q,q))(u)}),t.jsxs(He,{windowSize:b,children:[b!=="small"?t.jsx(Me,{onClick:W}):null,t.jsx(We,{windowSize:b,isAddressPage:H,children:z==="In-Progress"?t.jsx(ye,{size:"ExtraLarge",start:!0}):t.jsx(_e,{file:Y,type:"bill"})}),t.jsx(Ve,{windowSize:b,children:e})]})]})}const Ue=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Je(){return t.jsx($e,{})}function dt(){return t.jsxs(ne,{children:[t.jsx(p,{path:"bank/account/save/success",element:t.jsx(Je,{})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:t.jsx(h,{appContent:t.jsx(De,{isSubPage:!0})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:t.jsx(h,{appContent:t.jsx(Ee,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:t.jsx(h,{appContent:t.jsx(Te,{})})}),t.jsx(p,{path:"*",element:t.jsx(f,{})})]})}export{dt as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-Dn3WlYDG.js";import{a as g}from"./sentry-BBtxjqBH.js";import{u as U,g as _,h as w,s as M,j as l,N as T}from"./core-CBQNMmNB.js";import{z as r,m as P,D as V,f as A,e as K,g as N,n as J,p as R,h as Y}from"./index-C6g7x9Xf.js";import{eR as W,JY as Z,K6 as $,JZ as q,eY as B,fp as G,K2 as H,fN as Q,cT as X,K7 as ee,K8 as te}from"./zeni-epic-state-kigW-Vb1.js";import{n as ne}from"./mui-BaxUp1f6.js";import{u as se}from"./useDeviceId-B1_7g90r.js";import{f as ae}from"./analyticsHelper-DugMUcaM.js";import{t as ie}from"./getLocaleForTenant-D7ZwJ2SM.js";import"./recharts-cF7j6WPE.js";import"./analytics-PD1ubuhk.js";import"./plaid-CkikokYa.js";import"./dnd-Z3xBQUdM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CyQvfguW.js";import"./lexical-Pu0UU7Gm.js";import"./pdf-BdzM5lLL.js";import"./utils-DGbjXCxQ.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="5a93277d-45c2-4f3d-aa99-7868023e305d",t._sentryDebugIdIdentifier="sentry-dbid-5a93277d-45c2-4f3d-aa99-7868023e305d")}catch{}})();const D=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function De(){const t=U(),a=_(),m=w(),[y]=M(),n=y.get("token"),p=y.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),b=l(e=>e.tenantState.activeTenantFetchState.fetchState),h=l(e=>e.tenantState.signInState),I=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>W(e)),k=l(e=>Z(e)),E=r.getSignedInUser(),v=P().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&D(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t($(n,i,f)))},[n,p,t,i,f,s?.zeniSessionId]),g.useEffect(()=>{h!=="In-Progress"||S!=="Completed"&&b!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(q(k.tenantsInOrder),s.zeniSessionId),B(s.userId,s.zeniSessionId,o.tenantId),t(G(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(H("Completed")),V.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,k.tenantsInOrder),Q().then(()=>{const e=Y();e!=null&&A(e)}),setTimeout(()=>{K.trackLogin(N.Event.loginSuccess,"email",X(o.productSettings))},2e3))},[h,S,b,s,o,k,v,a.state,t]);const j=g.useCallback(()=>{m("/signin/auth")},[m]),F=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),O=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx(J,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:F,onVerifyOtp:O,onCancelVerifyDevice:j});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!D(n,p)||f==null||I==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
right: 0;
|
|
6
|
-
bottom: 0;
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
z-index: 9999;
|
|
11
|
-
background-color: ${t=>t.theme.colors.background};
|
|
12
|
-
`;export{De as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as U}from"./liveblocks-Dn3WlYDG.js";import{a as c}from"./sentry-BBtxjqBH.js";import{u as be,j as s,i as Je,g as Qe,h as We,l as M}from"./core-CBQNMmNB.js";import{eR as he,f1 as Ke,f2 as Se,eV as Xe,bn as ea,eQ as aa,f3 as ta,f4 as na,f6 as sa,f9 as oa,fi as ia,fa as g,fc as ra,fd as ue,fg as da,fe as la,ff as ca,fh as ua,cJ as fa,fk as ma,cO as pa,bt as ba,eU as ha,fp as Sa,fq as ga,fo as Ea}from"./zeni-epic-state-kigW-Vb1.js";import{a7 as ka,a8 as Ca,H as ya,s as Ia,z as k,w as Ta,u as wa,d as r,a9 as _a,aa as Aa,k as Fa,a as Da,ab as va,a3 as $a,ac as Ba,ad as Ga,ae as fe,af as me,L as Ra,ag as Ma,ah as pe,e as P,_ as Pa,v as _,ai as N,aj as Na}from"./index-C6g7x9Xf.js";import{D as Ua}from"./mui-BaxUp1f6.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="42e0ec05-cdc3-41e4-9529-0df0301495f2",f._sentryDebugIdIdentifier="sentry-dbid-42e0ec05-cdc3-41e4-9529-0df0301495f2")}catch{}})();const Va=ka(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Je(),a=Qe(),C=ya(),o=We(),V=Xe(),m=be(),{useFeatureGate:i}=Ia(),O=k.getSignedInUser(),A=ea(O),n=s(e=>he(e)),ge=n.masterTOSInfo?.isMasterTOSAccepted??!1,x=s(e=>aa(e)),j=x.uiState.currentChatSessionId,y=Ta(),{setLoading:Ee}=wa(),[F,L]=c.useState(void 0),D=M("/:tenantEmailDomain/dashboard")!==null,z=M("/:tenantEmailDomain/reports")!==null,I=M("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:H}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:ke}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Y}=i(r.isDebitCardFeatureEnabled),Ce=_a(n,ke,Y),{isFeatureEnabled:ye}=i(r.isSettingsFeatureEnabled),Z=s(e=>ta(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=s(e=>na(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&m(sa(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=s(e=>e.tenantState),Ie=s(e=>$.fetchState==="Completed"?oa(e):[]),E=s(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Te}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:we}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:q}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:J}=i(r.isExpenseAutomationEnabledV2),Q=J||q&&A,{isFeatureEnabled:_e}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:ve}=i(r.isTreasuryEnabled),{isFeatureEnabled:$e}=i(r.isTaskManagerCustomerUserAccessEnabled),Be=A||!A&&$e,Ge=n.company!=null&&ia(n.company),w=ve&&Ge,Re=s(e=>g(e).totalUnreadCount),Me=s(e=>g(e).reducedFetchCountState),W=s(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),K=s(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Pe=s(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=s(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:X,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Ne}=Aa();c.useEffect(()=>{const e=setTimeout(()=>Ne?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(n?.companyId!=null&&X!=null){const e=`dashboard_${n.companyId}`;L(X.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Pe.fetchState==="Not-Started"&&V.tenantId!=null&&m(ra("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||m(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{F!=null&&B.fetchState==="In-Progress"&&(m(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(Se({unreadCount:F},"comments")))},[F,B.fetchState]);const Ue={fetchStatus:Me,count:Re},ne=t!=null?k.getSignedInUserTenant(t):null,se=s(e=>ne?.tenantId!=null?da(e,ne.tenantId):void 0),S=[];Te===!1&&S.push("accounts_payable_aging"),we===!1&&S.push("accounts_receivable_aging"),H===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),Q===!1&&S.push("expense_automation_card");const Ve=Fa(),oe=s(e=>la(e,S,h,J,q,w).fetchState),ie=s(e=>ca(e).fetchState),Oe=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",xe=c.useMemo(()=>ua(n.userRole),[n.userRole]),je=fa(xe),Le=n?.rewardsLastViewedTime==null,ze=h?.userEmail!=null&&Z.fetchState==="Completed"&&ma(Z.notificationSettings,h.userEmail,Y,n),re=Da(),He=re&&va(a),de=pa(Ve?.loggedInUserRoleMap),le=n.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(t??"")&&le===!1&&$a(a.pathname)!=="treasury",[w,de,le,a.pathname,t]),[Ye,ce]=c.useState(G);c.useEffect(()=>{ce(G())},[G]);const Ze=s(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,qe=Ba(Ze);return U.jsx(Ua,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:U.jsx(Ga,{signedInUser:O,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?Ie:se!=null?[se]:[],currentTenant:n,isTenantDropdownDisabled:Oe,isSettings:me(a),isSettingsFeatureEnabled:ye,isVendorsTabVisible:je,isZeniAccountEnabled:H,isChargeCardEnabled:Ce,isTreasuryEnabled:w,treasuryYieldPercentage:qe,isTreasuryPopupVisible:Ye,isNotificationsTabVisible:ze,notificationCountDetails:Ue,isExpenseAutomationEnabledForUser:Q&&ba(n.userRole)===!1,selectedMenu:fe(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Le,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=W===0&&K>0?"notifications/comments":"notifications/tasks";me(a)&&(e=W===0&&K>0?"../../notifications/comments":"../../notifications/tasks");const u=_(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=_(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(P.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!ge)return void Pa({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const b=_(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:b,referrer:"Sidebar"}})}const u=_(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,p=N(l)&&l!=="command_center";if(N(e.type)&&E[n.tenantId]!=null&&P.trackMonthEndCloseClicked(E[n.tenantId].month,E[n.tenantId].year,"Sidebar"),p&&E[n.tenantId]!=null){const b=E[n.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${b.month}-${b.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const R=Na(e.type);pe(e.type)?(j!=null&&m(Ea()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${R}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{Ee(Ra.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(a);let p=`/${encodeURIComponent(u)}/`;const R=N(l);l==="home"?p+="dashboard":l==="users_and_roles"?p+="people":Ma(l)?p+="settings/my_profile":pe(l)?p+=`ai-cfo/${l}`:p+=l==="task_checklist"?"tasks":R?"month_end_close_checks/review":encodeURIComponent(l),o(p,{replace:!0}),h!=null&&(m(Sa(e.tenantId)),m(ga(h.userId,e.tenantId,h.zeniSessionId)));const b=e;P.trackCompanySwitch(b.companyId,b.companyName,b.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:He,aiCfoView:x,isOnDashboard:D,updateCurrentChatSessionId:e=>{m(ha({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:_e,isTaskManagerAccessEnabled:Be,thanksGivingAnimationEnabled:Ae,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})}),Ya=f=>{const d=be(),t=s(C=>he(C)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Ca(o)&&Ke(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return U.jsx(Va,{...f,...a})};export{Ya as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-Dn3WlYDG.js";import{h as r,n}from"./core-CBQNMmNB.js";import{K as i}from"./index-C6g7x9Xf.js";import"./mui-BaxUp1f6.js";import"./sentry-BBtxjqBH.js";import"./zeni-epic-state-kigW-Vb1.js";import"./recharts-cF7j6WPE.js";import"./analytics-PD1ubuhk.js";import"./plaid-CkikokYa.js";import"./dnd-Z3xBQUdM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CyQvfguW.js";import"./lexical-Pu0UU7Gm.js";import"./pdf-BdzM5lLL.js";import"./utils-DGbjXCxQ.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="b67e7853-d07a-4b85-ad9e-567e4d724f00",o._sentryDebugIdIdentifier="sentry-dbid-b67e7853-d07a-4b85-ad9e-567e4d724f00")}catch{}})();const a=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as ct,a as mt,m as dt,j as _}from"./liveblocks-Dn3WlYDG.js";import lt from"./NotFoundScreen-BWmMemx_.js";import{a as k}from"./sentry-BBtxjqBH.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as H}from"./core-CBQNMmNB.js";import{cr as St,f3 as K,eR as Z,fh as bt,fa as b,QA as O,fd as d,f2 as y,rx as M,wV as It,QB as Ct,f1 as Tt,fk as yt,rC as At,QC as $,bq as F,gV as x,rG as J,QD as Et,cC as _t,cw as Nt}from"./zeni-epic-state-kigW-Vb1.js";import{V as Bt,z as wt,s as xt,d as Dt,Z as Rt,cD as vt,v as N,a7 as Gt,cE as Ut,a8 as Pt,r as $t}from"./index-C6g7x9Xf.js";import"./mui-BaxUp1f6.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-C_v5Otmr.js";import"./recharts-cF7j6WPE.js";import"./analytics-PD1ubuhk.js";import"./plaid-CkikokYa.js";import"./dnd-Z3xBQUdM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CyQvfguW.js";import"./lexical-Pu0UU7Gm.js";import"./pdf-BdzM5lLL.js";import"./utils-DGbjXCxQ.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="b0e55e01-0ad0-412a-9188-a256b29466ad",t._sentryDebugIdIdentifier="sentry-dbid-b0e55e01-0ad0-412a-9188-a256b29466ad")}catch{}})();const Mt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,l){const n=K(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=Z(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:B,fetchMoreCommentsNotifications:D}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(J("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(B(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!_t(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(O(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(Et(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else D?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(J("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(B(r),t($([r],F())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(At("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,B).then(()=>{t($(s,F())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=$t(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Gt(Ut)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=Bt(),i=St(u??""),s=pt(),h=wt.getSignedInUser(),[B,D]=k.useState(!1),a=S(e=>K(e)),o=S(e=>Z(e)),{useFeatureGate:m}=xt(),{isFeatureEnabled:c}=m(Dt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});Rt({isDataReady:!0});const X=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),V=S(e=>b(e).currentTab),R=S(e=>b(e).currentSubTab),Y=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),v=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=vt().allUsers,{inboxNotifications:w,isLoading:A,hasFetchedAll:C,isFetchingMore:G,fetchMore:ot}=ct(),{threads:Q,isLoading:q,fetchMore:L,isFetchingMore:W,hasFetchedAll:z}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(O(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{Y.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(A===!1&&C===!0&&o?.companyId!=null&&w!=null){const e=`dashboard_${o.companyId}`,p=w.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[A,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const U=A||G===!0||C!==!0||A||G===!0||C!==!0;k.useEffect(()=>{U&&v!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):U||v!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[U,v]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&B===!1&&(D(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(A===!1&&q===!1&&w!=null&&Q!=null){const e=`dashboard_${o.companyId}`,p=w.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),E=p.map(f=>f.id),it=p.map(f=>{const P=Q.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(W||z===!0||L==null||L(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:E},"comments")),s(y({totalCount:E.length,unreadCount:T.length},"comments")),s(Ct(it))}},[A,G,W,C,z,q,w?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Pt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const E=[];R==="all"?E.push("read","unread"):R!=="mentions"&&E.push(R),s(M("task_manager",T,E,!0))}}}},nt=dt();return _.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:X,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return _.jsxs(gt,{children:[_.jsx(H,{path:"/:selectedTab",element:_.jsx(Vt,{})}),_.jsx(H,{path:"*",element:_.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-Dn3WlYDG.js";import{a as r}from"./sentry-BBtxjqBH.js";import{u as A,g as j,j as o,N as C}from"./core-CBQNMmNB.js";import{Kl as K,eR as P,f9 as R,Km as x,Kn as z,Ko as D,Kp as M,ng as k,Jh as L}from"./zeni-epic-state-kigW-Vb1.js";import{z as h,W as I}from"./index-C6g7x9Xf.js";import"./mui-BaxUp1f6.js";import"./recharts-cF7j6WPE.js";import"./analytics-PD1ubuhk.js";import"./plaid-CkikokYa.js";import"./dnd-Z3xBQUdM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CyQvfguW.js";import"./lexical-Pu0UU7Gm.js";import"./pdf-BdzM5lLL.js";import"./utils-DGbjXCxQ.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="504a7223-aae6-4a31-aa3d-93ba0ec5beee",n._sentryDebugIdIdentifier="sentry-dbid-504a7223-aae6-4a31-aa3d-93ba0ec5beee")}catch{}})();function ee(){const n=A(),a=j(),{params:t,error:i}=r.useMemo(()=>K(a.search),[a.search]),w=r.useMemo(()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application",[a.search,t]),p=h.isSignedIn(),s=h.getSignedInUser(),m=o(e=>P(e)),l=o(e=>R(e)),d=o(e=>e.tenantState.fetchState),y=o(x),b=o(z),u=o(D),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(M())},[n,a.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{p&&s!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(s.userId,s.zeniSessionId??void 0))))},[p,s,d,n]),r.useEffect(()=>{u!=null&&u!==""&&(window.location.href=u)},[u]);const U=r.useMemo(()=>{if(m?.tenantId!=null)return m.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(T=>T.tenantId===e)?e:l.length===1?l[0].tenantId:null},[m?.tenantId,l]),c=v??U;return i!=null?f.jsx(I,{variant:"invalid_params",paramsError:i}):p?f.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:S,approveError:E??b,isApproving:y==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&s!=null&&c!=null&&n(L(s.userId,s.zeniSessionId??void 0,c,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):f.jsx(C,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-Dn3WlYDG.js";import{h as Y,u as Z,g as z,i as Q,j as d,n as H,o as J,p as I}from"./core-CBQNMmNB.js";import{eR as v,rl as P,qV as X,KT as O,qQ as T,bt as ee,bn as ae,bT as te,qR as se,KU as oe,KF as C,dE as re,uS as ne,KV as ie,vd as ce,f0 as le,e_ as de}from"./zeni-epic-state-kigW-Vb1.js";import{z as me,V as fe,Z as pe,k as ue,s as M,d as q,x as he,e as $,ao as Fe,v as ge}from"./index-C6g7x9Xf.js";import"./mui-BaxUp1f6.js";import be from"./NotFoundScreen-BWmMemx_.js";import{F as Ie}from"./FeaturePreviewScreen-pifRlvMk.js";import{a as F}from"./sentry-BBtxjqBH.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-C_v5Otmr.js";import{u as Te}from"./useInitialThreadRequest-CKOaiR-a.js";import{t as Se}from"./routePaths-DlNlbaAA.js";import{M as ye}from"./MobileAppDrawer-CMqrUzty.js";import"./recharts-cF7j6WPE.js";import"./analytics-PD1ubuhk.js";import"./plaid-CkikokYa.js";import"./dnd-Z3xBQUdM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CyQvfguW.js";import"./lexical-Pu0UU7Gm.js";import"./pdf-BdzM5lLL.js";import"./utils-DGbjXCxQ.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="91b1a73f-3113-4268-85c9-e4aab3f0a062",s._sentryDebugIdIdentifier="sentry-dbid-91b1a73f-3113-4268-85c9-e4aab3f0a062")}catch{}})();const S=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},ke=H(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:$}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(O(a,o)),e.isPandLReportFetched(a)||s(T(a)),S(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ce(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,i;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=re(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const m=Se(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=ge(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(Fe);function U(){const s=Y(),e=Z(),a=z(),{forecastId:o,tenantEmailDomain:r}=Q(),[i,p]=F.useState(!1),[m,u]=F.useState(!1),h=me.getSignedInUser(),y=d(t=>v(t)),w=y.company?.companyInfo.firstMonthOfFY??1,c=d(t=>P(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),x=d(t=>t.reportUIOptionsState.selectedForecast),A=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:g}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:V,onAskAiCfoClick:_}=Ce({mobileExploreReferrer:"Forecast"});F.useEffect(()=>{if(!i&&g)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,L,R)=>L!=null?f.forecasts.findIndex(b=>b.id===L):R!=null?f.forecasts.findIndex(b=>b.id===R):f.forecasts.length>0?0:-1)(c,o,x?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=x?.index?(e(O(c.forecasts[t].id,t)),S(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&S(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!A(c.forecasts[t].id)&&g&&e(T(c.forecasts[t].id))}},[i,p,e,l,c,m,u,P,T,g]);const D=ue(),B=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:N}=M(),{isFeatureEnabled:E}=N(q.isReportsCommentingEnabled),W=Te(E?y?.companyId:void 0,{clearParams:l&&m}),[G,K]=F.useState(!1),j=t=>{K(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:$,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:G,handleDrawerToggle:j}),n.jsx(ke,{firstMonthOfFY:w,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:A,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:B,isAiCfoAccessEnabled:V,onAskAiCfoClick:_,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:W,onClickMenuIcon:()=>{j(!0)}})]})}function Ke(){const s=d(i=>v(i)),{useFeatureGate:e}=M(),{isFeatureEnabled:a}=e(q.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(J,{children:[n.jsx(I,{path:"/",element:n.jsx(U,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ke as PandLWithForecastRoutes,Ke as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Dn3WlYDG.js";import{KO as te,eR as J,jI as G,f0 as X,e_ as ne,Ie as q,Ks as oe,tQ as Ee,KP as N,tE as ke,tZ as Ie,tT as ie,tI as re,tX as Pe,tU as je,KQ as le,vE as Le,KR as Te,fD as ve,KS as $,tN as de,tL as ce,u0 as Fe,c2 as Re}from"./zeni-epic-state-kigW-Vb1.js";import{J as pe,s as Y,d as E,z as H,a9 as ue,C as me,ak as ge,al as Ae,A as he,o as A,E as fe,D as Ce,am as Oe,V as Ve,Z as Ue,x as Ze,e as be,g as Be,v as Ke,an as $e,k as _e}from"./index-C6g7x9Xf.js";import{D as ye,n as M,S as Se}from"./mui-BaxUp1f6.js";import ae from"./NotFoundScreen-BWmMemx_.js";import{a as r}from"./sentry-BBtxjqBH.js";import{u as ee,i as ze,j as m,h as Ge,g as He,n as Me,o as se,p as K}from"./core-CBQNMmNB.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-C_v5Otmr.js";import{M as We}from"./MobileAppDrawer-CMqrUzty.js";import"./recharts-cF7j6WPE.js";import"./analytics-PD1ubuhk.js";import"./plaid-CkikokYa.js";import"./dnd-Z3xBQUdM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CyQvfguW.js";import"./lexical-Pu0UU7Gm.js";import"./pdf-BdzM5lLL.js";import"./utils-DGbjXCxQ.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="4125b439-bd8f-4f25-83f6-c82c98a0a93f",a._sentryDebugIdIdentifier="sentry-dbid-4125b439-bd8f-4f25-83f6-c82c98a0a93f")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,Je=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,S]=r.useState(!1),{userId:w}=ze(),d=m(e=>te(e)),u=m(e=>J(e)),D=m(e=>G(e)),{useFeatureGate:f}=Y(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=X(k,u),T=ne(u),v=q(u),U=oe(u),Z=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(H.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?S(!0):C()},B=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),L=ue(u,j,k),{isFeatureEnabled:R}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:L===!1,isTreasuryDisabled:R===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Ie(v))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return r.useEffect(()=>{x===!1&&w!=null&&p(Ee(w))},[x,w]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(Xe,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(we,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:i,isEditPopup:!0}):null,s.jsx(Ae,{...b})]})})},Xe=M(Se)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,we=M(fe.H6Regular)`
|
|
6
|
-
margin-top: ${A.sp7};
|
|
7
|
-
padding-left: ${A.sp8};
|
|
8
|
-
padding-right: ${A.sp8};
|
|
9
|
-
color: ${a=>a.theme.colors.primary};
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
`,De=M(fe.LargeRegularSp)`
|
|
12
|
-
color: ${a=>a.theme.colors.hero};
|
|
13
|
-
padding-left: ${A.sp8};
|
|
14
|
-
padding-right: ${A.sp8};
|
|
15
|
-
margin-bottom: 30px;
|
|
16
|
-
margin-top: ${A.sp4};
|
|
17
|
-
white-space: pre-line;
|
|
18
|
-
`,qe={overlayWidth:new he(100,100,48)},z=Ce.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,S]=r.useState(!1),w=m(i=>te(i)),d=m(i=>J(i)),u=m(i=>G(i)),{useFeatureGate:D}=Y(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=X(f,d),P=ne(d),T=q(d),v=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,Z=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(H.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},C=()=>{O===!0?S(!0):x()},F={onOkClick:()=>{S(!1),x()},onCancelClick:()=>{S(!1)}},B=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),L=ue(d,j,f),{isFeatureEnabled:R}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:T,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(a):je())},onCloseClick:C,peopleDetails:w,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:L===!1,isTreasuryDisabled:R===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:Z};return r.useEffect(()=>{w.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[w.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:C,children:s.jsxs(ea,{onClick:i=>i.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(we,{children:z.discardTitle}),descriptionComponent:s.jsx(De,{children:z.discardDescription}),primaryButtonText:z.discard,secondaryButtonText:z.no,action:F}):null,s.jsx(Oe,{...b})]})})},ea=M(Se)`
|
|
19
|
-
display: flex;
|
|
20
|
-
min-height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
`,aa=Me(function(a,t){const l=le(a),n=H.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:G(a),analytics:be}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{a(re(o,y))},onResendInvite:o=>{a(Fe(o))},onReloadPeople:()=>{a(de()),a(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a($({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a($({searchText:o}))}}}})($e);function W({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=Ge(),n=ee(),g=He(),{areTenantIdsInSync:o}=Ve(),y=H.getSignedInUser(),h=m(e=>J(e)),{useFeatureGate:p}=Y(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>G(e)),I=!X(O,h)&&V,S=q(h),w=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,T]=r.useState(!1),[v,U]=r.useState("off"),[Z,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:B}=Qe({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ue({isDataReady:c.fetchState==="Completed"});const j=m(e=>Le(e.classState,e.classListState)),L=m(e=>Te(e.userState,e.userRoleState,e.userListViewState,"manager")),R=m(e=>ve(e)),b=h?.companyId;r.useEffect(()=>{u&&v===c.uiState.mode||!o||(n($({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,w,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(a!=null&&a===!0),T(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n($({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),T(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx(Ze,{analytics:be,onLoad:e=>e.trackPageLoaded(Be.Event.members)}):null,f===!0?s.jsx(Ye,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:L,companyPassportView:R,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?s.jsx(Je,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:R,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(We,{isAppContentDrawerOpen:Z,handleDrawerToggle:C}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:S,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:L,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,Q)=>{n($({sortKey:e,sortOrder:Q}))},onRowClick:e=>{const Q=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=Ke(g.state?.pathnameStackToGoBack,g.pathname);l(Q,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:B})]})}function Sa(){const a=_e();return Re(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx(K,{path:"/",element:s.jsx(W,{})}),s.jsx(K,{path:"new",element:s.jsx(W,{isInvitePeopleDrawerOpen:!0})}),s.jsx(K,{path:":userId/edit",element:s.jsx(W,{isEditPeopleDrawerOpen:!0})}),s.jsx(K,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx(K,{path:"*",element:s.jsx(ae,{})})})}export{Sa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Dn3WlYDG.js";import T from"./NotFoundScreen-BWmMemx_.js";import{a as r}from"./sentry-BBtxjqBH.js";import{h as _,g as v,j as p,i as M,u as U,N as P,n as V,o as z,p as h}from"./core-CBQNMmNB.js";import{eR as F,QE as b,bo as B,bn as N,hp as O,gV as H}from"./zeni-epic-state-kigW-Vb1.js";import{H as Q,z as I,Z,cF as $}from"./index-C6g7x9Xf.js";import"./mui-BaxUp1f6.js";import{u as q}from"./useAskAiCfoHostNavButtonProps-C_v5Otmr.js";import{M as G}from"./MobileAppDrawer-CMqrUzty.js";import"./recharts-cF7j6WPE.js";import"./analytics-PD1ubuhk.js";import"./plaid-CkikokYa.js";import"./dnd-Z3xBQUdM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CyQvfguW.js";import"./lexical-Pu0UU7Gm.js";import"./pdf-BdzM5lLL.js";import"./utils-DGbjXCxQ.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]="aadaf745-eea7-47c8-b7c3-0eee62dbc16a",e._sentryDebugIdIdentifier="sentry-dbid-aadaf745-eea7-47c8-b7c3-0eee62dbc16a")}catch{}})();const J=V(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})($),K=()=>{const e=_(),t=v(),c=Q(),o=p(a=>F(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:u}=M(),f=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=B(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=r.useCallback((a,i,E)=>{f(O({fromMonth:a,toMonth:i,cacheOverride:E}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(f(H({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),m.current=!0},[n?.fetchState,d]),R=r.useCallback((a,i)=>{d(a,i,!1)},[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:j,onAskAiCfoClick:A}=q({mobileExploreReferrer:"Performance"});return Z({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(G,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:u,onReload:D,onTimeRangeSelect:R,handleDrawerToggle:g,isAiCfoAccessEnabled:j,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${u}/dashboard`,replace:!0})};function ge(){return s.jsxs(z,{children:[s.jsx(h,{path:"*",element:s.jsx(K,{})}),s.jsx(h,{path:"*",element:s.jsx(T,{})})]})}export{ge as default};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Dn3WlYDG.js";import{a as o}from"./sentry-BBtxjqBH.js";import{j as f,h as H,u as L,g as N,n as F}from"./core-CBQNMmNB.js";import{m as M,J as W,z as R,bb as _,A as U,V as $,Z as z,x as Z,e as l,g as q,a7 as G,bc as J}from"./index-C6g7x9Xf.js";import{f4 as K,eR as Q,Ng as I,Nh as X,uI as Y,uy as g,f6 as ee,bO as re,uD as ae,Ni as ne}from"./zeni-epic-state-kigW-Vb1.js";import{D as te,e as se,n as oe,S as ie}from"./mui-BaxUp1f6.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-C_v5Otmr.js";import{M as ce}from"./MobileAppDrawer-CMqrUzty.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="0bdbf8fe-20c6-4ec1-9efa-928968925640",e._sentryDebugIdIdentifier="sentry-dbid-0bdbf8fe-20c6-4ec1-9efa-928968925640")}catch{}})();const de={overlayWidth:new U(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:r})=>{const a=M(),n=W();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{r(!0)},u=f(c=>K(c));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:de.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:a.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:c=>c.stopPropagation(),children:s.jsx(_,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,P="refer-and-earn-status-update",we=F(function(e){const r=I(e),a=e.referralViewState.rewardsPlanFetchState,n=re([r,a]);return{inviteList:r.invitations,uiState:r.uiState,pendingBonus:r.pendingBonus,earnedBonus:r.earnedBonus,pendingReferrals:r.pendingReferrals,fetchState:n.fetchState,rewardsPlan:r.rewardsPlan}},function(e,r){const{navigate:a}=r;return{onColumnSortConfigChanged:(n,i)=>{e(ne({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),a("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),a("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(ae(n))},onBackClick:()=>{a("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===P&&e(g(!0,!0))}}})(G(J));function ve({isReferralDrawerOpen:e}){const r=H(),a=L(),n=N(),[i,u]=o.useState(!1),[c,x]=o.useState(!1),[D,E]=o.useState(!1),[k,h]=o.useState(!1),w=R.getSignedInUser(),C=f(t=>Q(t)),m=f(t=>I(t)),b=m.fetchState,p=f(t=>t.referralViewState.rewardsPlanFetchState),y=X([m,p]),{areTenantIdsInSync:d}=$();o.useEffect(()=>{C?.rewardsLastViewedTime==null&&D===!1&&(a(Y()),E(!0))},[]),o.useEffect(()=>{!i&&b==="Not-Started"&&d&&(u(!0),a(g(!0)))},[b,a,d]),o.useEffect(()=>{!c&&p.fetchState==="Not-Started"&&d&&(x(!0),a(ee(!0)))},[p,a,d]),o.useEffect(()=>{h(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),v=t=>{A(t)},{isAiCfoAccessEnabled:B,onAskAiCfoClick:O}=le({mobileExploreReferrer:"Rewards"});z({isDataReady:y===!0});const T={events:w?.userId!=null?[`private-encrypted-${w.userId}.${P}`]:[],eventCallback:(t,S,V)=>{V.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[y===!0?s.jsx(Z,{analytics:l,onLoad:t=>(S=>{w!=null&&S.trackPageLoaded(q.Event.rewardsPageViewed)})(t)}):null,s.jsx(ce,{isAppContentDrawerOpen:j,handleDrawerToggle:v}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{h(!1),r("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:r,currentTenant:C,onClickMenuIcon:()=>{v(!0)},isAiCfoAccessEnabled:B,onAskAiCfoClick:O,...T})]})}export{ve as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-Dn3WlYDG.js";import x from"./NotFoundScreen-BWmMemx_.js";import{a as p}from"./sentry-BBtxjqBH.js";import{h as D,g as I,u as C,j as d,N as A,n as E,o as k,p as u}from"./core-CBQNMmNB.js";import{eR as O,Oa as g,Oq as S,DF as T,CO as V,DE as c,Dv as U,OH as _}from"./zeni-epic-state-kigW-Vb1.js";import{m as $,z as B,B as N,a7 as W,bS as q,af as z}from"./index-C6g7x9Xf.js";import"./mui-BaxUp1f6.js";import{R as h}from"./ReimbursementApprovalRuleDetailScreen-D19M7wpr.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="a522c417-8ff2-4ed2-877b-db9d857bd629",e._sentryDebugIdIdentifier="sentry-dbid-a522c417-8ff2-4ed2-877b-db9d857bd629")}catch{}})();const m="reimbursement-approval-rule-update",F=E(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(m)&&e(_(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(U(s))},onEditRuleClick:s=>{s!=null?(e(c(s)),a(`./${s}/edit`)):(e(c()),a("./new"))}}})(W(q)),H=()=>{const e=D(),r=I(),a=C(),[l,s]=p.useState(!1),[f,y]=p.useState(!1),b=d(n=>n.remiSetupApproverViewState.fetchState),o=d(n=>O(n)),w=$(),i=d(n=>g(n)),v=d(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&a(T())},[v]),p.useEffect(()=>{l||b!=="Not-Started"||(s(!0),a(V(!0)))},[l,b,a]),B.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(f||(y(!0),a(c())),e("./new"))},[f,i,a]);const R={events:o.companyId!=null?[`private-encrypted-${o.companyId}.${m}`]:[],eventCallback:(n,P,j)=>{n.endsWith(m)&&j.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(A,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(N,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(F,{currentTenant:o,location:r,navigate:e,...R})};function Z(){return t.jsxs(k,{children:[t.jsx(u,{path:"/",element:t.jsx(H,{})}),t.jsx(u,{path:"/new",element:t.jsx(h,{})}),t.jsx(u,{path:"/:approvalRuleId/edit",element:t.jsx(h,{})}),t.jsx(u,{path:"*",element:t.jsx(x,{})})]})}export{Z as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-Dn3WlYDG.js";import{a as y}from"./sentry-BBtxjqBH.js";import{h as w,u as A,g as T,i as U,j as b,n as E}from"./core-CBQNMmNB.js";import{Oq as D,Oa as C,Dy as x,DH as _,DF as S,DG as h,Or as B}from"./zeni-epic-state-kigW-Vb1.js";import{z as O,m as k,B as V,bJ as F,af as j}from"./index-C6g7x9Xf.js";import"./mui-BaxUp1f6.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]="718e0c52-0545-412d-b057-3d7ecb2809a1",e._sentryDebugIdIdentifier="sentry-dbid-718e0c52-0545-412d-b057-3d7ecb2809a1")}catch{}})();function $(e){return B(e)==null}const N=E(function(e,a){const t=D(e),s=t.remiSetupApproverViewUpdateData?.type??"approval_create",n=s==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return a.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===a.approvalRuleId)===0),{localData:t,hideUpperBoundField:n,isLowerBoundDisabled:l,approvalUpdateActionType:s}},function(e,a){const{navigate:t,approvalUpdateDataView:s,approverViewData:n,approvalRuleId:l}=a,r=s.remiSetupApproverViewUpdateData?.type,i=j(a.location);return{onApprovalRuleDataUpdated:o=>{const u=p=>{const v=[];return p.forEach(c=>{const R=c.actors.selectedUsers.map(d=>({type:"user",subType:void 0,userId:d.userId,idType:"user",isImplicitActor:!1})),I=c.actors.selectedNonUsers.map(d=>{const f=!!$(d.value);return{type:f?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!f}}),m=R.concat(I);v.push({action:c.stepType.selectedOption,actors:m,operator:m.length>1?c.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),v};if(r==="approval_create"){const p={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}else{const p={approvalRuleId:l,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}},onResetClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(_())},onSaveRuleSuccess:()=>{t("../")}}})(F);function L(){const e=w(),a=A(),t=T(),{approvalRuleId:s}=U(),n=O.getSignedInUser(),l=k(),r=b(p=>D(p)),i=b(p=>C(p)),[o,u]=y.useState(!1);if(y.useEffect(()=>{o||(u(!0),a(x(!0)))}),y.useEffect(()=>{i.fetchState==="Not-Started"&&e(s!=null?"../../":"../")},[i,s]),n==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(V,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):g.jsx(N,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{L as R,$ as i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-Dn3WlYDG.js";import{g as z,h as ge,u as Ce,i as Ie,j as d,n as we,o as Se,p as G}from"./core-CBQNMmNB.js";import{eR as v,ff as I,Kr as Re,jI as Q,p_ as W,qP as F,jw as Te,iA as Oe,uc as X,qU as Ae,bt as Fe,Ks as ke,bn as De,vl as je,Kt as Ee,Ku as Pe,u4 as Me,Kv as H,Kw as ve,Kx as Le,Ky as Be,Kz as Ke,KA as w,KB as k,KC as D,KD as Y,KE as j,KF as E,dE as Ve,v1 as Ue,uR as N,uS as q,v7 as xe,uW as $,vd as ze,KG as Ge,KH as He,KI as Ye,KJ as Ne,KK as qe,f0 as $e,e_ as Ze}from"./zeni-epic-state-kigW-Vb1.js";import{M as Je,N as Qe,O as We,R as Xe,J as ea,s as ee,d as P,z as ae,V as aa,k as sa,a as ta,X as oa,Z as na,x as ra,e as M,g as ia,_ as la,v as se,a0 as ca,a1 as da,a2 as pa}from"./index-C6g7x9Xf.js";import"./mui-BaxUp1f6.js";import fa from"./NotFoundScreen-BWmMemx_.js";import{F as ma}from"./FeaturePreviewScreen-pifRlvMk.js";import{a as _}from"./sentry-BBtxjqBH.js";import{u as ua}from"./useInitialThreadRequest-CKOaiR-a.js";import{t as Z,a as J,b as _a}from"./routePaths-DlNlbaAA.js";import{M as ha}from"./MobileAppDrawer-CMqrUzty.js";import"./recharts-cF7j6WPE.js";import"./analytics-PD1ubuhk.js";import"./plaid-CkikokYa.js";import"./dnd-Z3xBQUdM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CyQvfguW.js";import"./lexical-Pu0UU7Gm.js";import"./pdf-BdzM5lLL.js";import"./utils-DGbjXCxQ.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]="f276b2f1-42a1-492f-ade1-70a9fb8d7991",e._sentryDebugIdIdentifier="sentry-dbid-f276b2f1-42a1-492f-ade1-70a9fb8d7991")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0}))},ya=e=>{e(He()),e(Ye()),e(Ne()),e(qe())},ga=we(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=v(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=I(e),r=ke(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:M,isZeniUser:De(o),showAccountGroups:r===!0,isAccountingClassesEnabled:Q(e),isAccountingProjectsEnabled:W(e),currentTenantCompanyName:a,statementEndPoint:`${pa}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Ge(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ze(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter(g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year")),e(N(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e(q(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(w(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e($({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(H({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e($(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(xe(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(N(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(q(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>y(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(Ue({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=Ve(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return J(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?_a(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?J(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:S(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(j({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(Y({scrollPosition:s}));break;case"balance_sheet":e(D({scrollPosition:s}));break;case"cash_flow":e(k({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(E({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(Ke({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(w("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(w("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(w("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Le({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(ve({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(H({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Me()),o.isAccountingProjectsEnabled&&e(X())},onUpdateDisplayOrder:a=>{e(Pe(a))},onUpdateReportFormat:a=>{ya(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(je("profit_and_loss_by_classes"))}}})(ca);function Ca(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Xe(),f=ea(),u=da(f),a=ge(),s=Ce(),t=z(),{tenantEmailDomain:r}=Ie(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(P.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[L,te]=_.useState(!1),{isFeatureEnabled:B}=l(P.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const R=d(n=>v(n)),oe=R.masterTOSInfo?.isMasterTOSAccepted??!1,ne=R.company?.companyInfo.firstMonthOfFY??1,re=ua(B?R?.companyId:void 0),C=d(n=>I(n).fetchState),ie=d(n=>Re(n)),{areTenantIdsInSync:h}=aa(),T=d(n=>n.financeStatementState.selectedReportId),K=d(n=>Q(n)),O=d(n=>W(n)),le=d(n=>I(n).isCompareModeOn),b=d(n=>I(n).filter),A=d(n=>I(n).selectedReportAndTimeframeFetchState),ce=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(g(!0),s(F(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!L&&C==="Completed"&&h&&(s(F(c.userId,!1,!0,!1)),te(!0))},[i,L,C,h]),_.useEffect(()=>{if(i&&A.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(T){case"profit_and_loss":case"profit_and_loss_by_classes":s(Ae(b.timeframe));break;case"profit_and_loss_by_projects":O&&s(X());break;case"balance_sheet":s(Oe(b.timeframe));break;case"cash_flow":s(Te(b.timeframe))}},[i,T,A,h,K,O]);const V=sa(),de=V?.loggedInUserRole!=null&&Fe(V?.loggedInUserRole)!==!0,[pe,fe]=_.useState(!1),U=n=>{fe(n)},me=ta(),ue=oa();return function(n){const{isDataReady:_e}=n,{pathname:he}=z(),x=Je(he??"")==="reports",be=Qe(_e),ye=_.useMemo(()=>x?ba:void 0,[x]);We({canFetchSuggestedQuestions:be,pageContexts:ye})}({isDataReady:C==="Completed"}),na({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(ra,{analytics:M,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:U}),p.jsx(ga,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ce,selectedReportID:T,analytics:M,filter:b,isAccountingClassesEnabled:K,isAccountingProjectsEnabled:O,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:A,handleDrawerToggle:U,reportsResyncFetchState:ie.reportsResyncFetchState,isAiCfoAccessEnabled:ue&&me&&!e,onAskAiCfoClick:()=>{if(oe)if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else la({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:re})]})}const S=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function xa(){const e=d(s=>v(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(P.isDebitCardFeatureEnabled),u=$e(f,e),a=Ze(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(Se,{children:[p.jsx(G,{path:"/",element:p.jsx(Ca,{})}),p.jsx(G,{path:"*",element:p.jsx(fa,{})})]})}export{xa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-Dn3WlYDG.js";import{s as j,z as w,aN as b,x as E,e as p,g as R,cQ as F,d as L}from"./index-C6g7x9Xf.js";import"./mui-BaxUp1f6.js";import l from"./NotFoundScreen-BWmMemx_.js";import{a as u}from"./sentry-BBtxjqBH.js";import{u as P,j as y,h as T,g as V,n as U,o as z,p as f}from"./core-CBQNMmNB.js";import{eR as A,Rg as C,NR as G,Rh as N,uI as Y,f6 as O,Ri as Q,uG as q}from"./zeni-epic-state-kigW-Vb1.js";import{R as x}from"./ReferralListScreen-CiOu2vwF.js";import"./recharts-cF7j6WPE.js";import"./analytics-PD1ubuhk.js";import"./plaid-CkikokYa.js";import"./dnd-Z3xBQUdM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CyQvfguW.js";import"./lexical-Pu0UU7Gm.js";import"./pdf-BdzM5lLL.js";import"./utils-DGbjXCxQ.js";import"./useAskAiCfoHostNavButtonProps-C_v5Otmr.js";import"./MobileAppDrawer-CMqrUzty.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]="12e0bcb5-fd5b-4218-96c7-5428ae7f8aba",e._sentryDebugIdIdentifier="sentry-dbid-12e0bcb5-fd5b-4218-96c7-5428ae7f8aba")}catch{}})();const B=U(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,o=w.getSignedInUser();return{onDismissClick:()=>{e(N()),n("..")},onSendClick:()=>{if(o!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(q())},onUpdateInviteFormLocalData:s=>{e(Q({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{o!=null&&p.trackInviteEmailClicked("cancel")}}})(F),H=()=>{const e=P(),[t,n]=u.useState(!1),[o,s]=u.useState(!1),r=y(i=>A(i)),c=T(),_=V(),{useDynamicConfig:g}=j(),d=w.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const m=y(i=>C(i)),k=d?.firstName!=null?d.firstName:"User",{configValue:h}=g(b.zeniCardsConfig),{configValue:v}=g(b.zeniAccountsConfig),D=G(v);u.useEffect(()=>{e(N()),r?.rewardsLastViewedTime==null&&o===!1&&(e(Y()),s(!0))},[]),u.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(O(!0)))},[m.fetchState,e]);const I=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:i=>(S=>S.trackPageLoaded(R.Event.inviteEmailViewed))(i)}):null,a.jsx(B,{navigate:c,location:_,currentTenant:r,companyName:I,userName:k,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:D.maxAnnualPercentageYield})]})};function fe(){const{useFeatureGate:e}=j(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(z,{children:[a.jsx(f,{path:"/",element:t?a.jsx(x,{}):a.jsx(l,{})}),a.jsx(f,{path:"how-it-works",element:t?a.jsx(x,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(f,{path:"refer/*",element:t?a.jsx(H,{}):a.jsx(l,{})}),a.jsx(f,{path:"*",element:a.jsx(l,{})})]})}export{fe as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-DtoX2bSV.js","assets/sentry-BBtxjqBH.js","assets/core-CBQNMmNB.js","assets/zeni-epic-state-kigW-Vb1.js","assets/index-C6g7x9Xf.js","assets/mui-BaxUp1f6.js","assets/analytics-PD1ubuhk.js","assets/utils-DGbjXCxQ.js","assets/withTransactionSidePanel-DFqH5ga0.js","assets/useAskAiCfoHostNavButtonProps-C_v5Otmr.js","assets/TransactionDetailScreen-DTpKVJNQ.js","assets/decodeURIComponentSafe-CTFTZ79i.js","assets/routePaths-DlNlbaAA.js","assets/NotFoundScreen-BWmMemx_.js","assets/useInitialThreadRequest-CKOaiR-a.js","assets/analyticsHelper-DugMUcaM.js","assets/CompanyPassportScreen-DDjqyMwX.js","assets/MobileAppDrawer-CMqrUzty.js","assets/useAiCfoDashboardSuggestedQuestionsChips-D_Q4HzQ3.js","assets/FeaturePreviewScreen-pifRlvMk.js","assets/ReferralListScreen-CiOu2vwF.js","assets/index-R6GjjTB3.css","assets/BillPayRoutes-BKFIhw4T.js","assets/AddressScreen-BNSulfP2.js","assets/DomesticWireDetailScreen-lyPlKl3e.js","assets/DrawerScreen-D_M_HR61.js","assets/SetupPagesScreen-DEbuiMhl.js","assets/BusinessVerificationPageScreen-Bh75FXTZ.js","assets/BillPayApprovalRoutes-DSwN963F.js","assets/ReimbursementApprovalRuleDetailScreen-D19M7wpr.js","assets/getLocaleForTenant-D7ZwJ2SM.js","assets/ReimbursementRoutes-B37DKpue.js","assets/ReimbursementApprovalRoutes-orETMU81.js","assets/TransactionListRoutes-C0KioFUU.js","assets/ZeniAccountStatementScreen-B8cfC_y6.js","assets/SettingsRoutes-BG5-7X8p.js","assets/accountMappingHelper-B6MS-2MI.js","assets/QBOConnectionScreen-PJhN_FwV.js","assets/empty-JWZ-J0Ml.js","assets/index-CFJnQx3u.js","assets/url-jngClEHC.js","assets/index-DtpzPOK-.js","assets/ReportsRoutes-5ZVRpu4r.js","assets/ChargeCardRoutes-DuJHL5ER.js","assets/PeopleRoutes-BCWUNMRP.js","assets/ExpenseAutomationRoutes-ClyCvyOU.js","assets/TreasuryRoutes-9IHrvCFk.js","assets/VendorsRoutes-DcKzo6Bg.js","assets/pathToGoBack-C0RVd60M.js","assets/ZeniAccountRoutes-CBfR1pgu.js","assets/AddressRoutes-D_PJZStE.js","assets/PandLWithForecastRoutes-DUIhGSTU.js","assets/CustomerOnboardingRoutes-D6zOpJxc.js","assets/TransactionDetailRoutes-DTfcZe3C.js","assets/EntityDetailRoutes-CDYJ8kN1.js","assets/NotificationRoutes-B1UVibHD.js","assets/PerformanceRoutes-DdabGxr6.js","assets/RewardsRoutes-DU8RtihJ.js","assets/TaskRoutes-D99eqt35.js","assets/TaskListScreen-BJsKOwed.js","assets/AiCfoScreen-BRmtRqLo.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as n,bn as os,eR as ls,f0 as cs,e_ as ds,e$ as ms,fJ as us,eV as _s,cP as Ee,cx as Es,fg as As,cp as ps,bE as gs,bq as xs,fl as Is,v as Ts,JZ as hs,bt as js,J_ as Us,bG as bs,fi as Rs,bF as Hs,bs as Ds,cl as ys,J$ as fs,K0 as Cs,cM as vs,cO as Os,cN as Ps,cw as Fs,cC as Ls,ng as Ae,eY as pe,fT as Bs,fp as ge,fQ as xe,fR as Ie,fq as ks}from"./zeni-epic-state-kigW-Vb1.js";import{j as e}from"./liveblocks-Dn3WlYDG.js";import{a as v}from"./sentry-BBtxjqBH.js";import{u as Vs,h as Ss,i as Ns,g as Ms,j as G,l as Te,N as c,o as Zs,p as t}from"./core-CBQNMmNB.js";import{m as ws,u as Gs,z as R,s as $s,a as zs,c as Ys,d as L,k as qs,L as B,D as he,t as _,P as Js,e as X,l}from"./index-C6g7x9Xf.js";import"./mui-BaxUp1f6.js";import{f as je}from"./analyticsHelper-DugMUcaM.js";import{t as Ws}from"./getLocaleForTenant-D7ZwJ2SM.js";import"./recharts-cF7j6WPE.js";import"./analytics-PD1ubuhk.js";import"./plaid-CkikokYa.js";import"./dnd-Z3xBQUdM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CyQvfguW.js";import"./lexical-Pu0UU7Gm.js";import"./pdf-BdzM5lLL.js";import"./utils-DGbjXCxQ.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="365d7b61-ba5c-4cf8-bce6-cc799196b606",i._sentryDebugIdIdentifier="sentry-dbid-365d7b61-ba5c-4cf8-bce6-cc799196b606")}catch{}})();const Ks={dashboard:()=>n(()=>import("./DashboardRoutes-DtoX2bSV.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),bills:()=>n(()=>import("./BillPayRoutes-BKFIhw4T.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-B37DKpue.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21])),transactions:()=>n(()=>import("./TransactionListRoutes-C0KioFUU.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>n(()=>import("./SettingsRoutes-BG5-7X8p.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21])),reports:()=>n(()=>import("./ReportsRoutes-5ZVRpu4r.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-DuJHL5ER.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21])),people:()=>n(()=>import("./PeopleRoutes-BCWUNMRP.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-ClyCvyOU.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>n(()=>import("./TreasuryRoutes-9IHrvCFk.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21])),vendors:()=>n(()=>import("./VendorsRoutes-DcKzo6Bg.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-CBfR1pgu.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>n(()=>import("./ReportsRoutes-5ZVRpu4r.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21]))),en=l(()=>n(()=>import("./AddressRoutes-D_PJZStE.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,13,21]))),sn=l(()=>n(()=>import("./PeopleRoutes-BCWUNMRP.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-DUIhGSTU.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-D6zOpJxc.js"),__vite__mapDeps([52,1,2,3,23,4,5,6,7,13,37,38,39,40,41,11,21]))),tn=l(()=>n(()=>import("./VendorsRoutes-DcKzo6Bg.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-DTfcZe3C.js"),__vite__mapDeps([53,1,2,3,13,4,5,6,7,10,9,11,12,21]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-CDYJ8kN1.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,11,8,9,10,12,21]))),on=l(()=>n(()=>import("./DashboardRoutes-DtoX2bSV.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),be=l(()=>n(()=>import("./BillPayRoutes-BKFIhw4T.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21]))),ln=l(()=>n(()=>import("./SettingsRoutes-BG5-7X8p.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21]))),Re=l(()=>n(()=>import("./ReimbursementRoutes-B37DKpue.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-CBfR1pgu.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))),dn=l(()=>n(()=>import("./TreasuryRoutes-9IHrvCFk.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21]))),mn=l(()=>n(()=>import("./TransactionListRoutes-C0KioFUU.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),un=l(()=>n(()=>import("./ChargeCardRoutes-DuJHL5ER.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21]))),_n=l(()=>n(()=>import("./NotificationRoutes-B1UVibHD.js"),__vite__mapDeps([55,1,2,3,13,4,5,6,7,9,21]))),En=l(()=>n(()=>import("./PerformanceRoutes-DdabGxr6.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,9,17,21]))),An=l(()=>n(()=>import("./ExpenseAutomationRoutes-ClyCvyOU.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),pn=l(()=>n(()=>import("./RewardsRoutes-DU8RtihJ.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,13,20,9,17,21]))),gn=l(()=>n(()=>import("./TaskRoutes-D99eqt35.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,14,17,59,9,21]))),xn=l(()=>n(()=>import("./AiCfoScreen-BRmtRqLo.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,18,48,21]))),y=l(()=>n(()=>import("./NotFoundScreen-BWmMemx_.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),In=l(()=>n(()=>import("./TaskListScreen-BJsKOwed.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,17,21])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=Gs(),D=R.getSignedInUserTenant(o)?.tenantId,h=R.getSignedInUser(),W=os(h),$=Ms(),[N,De]=v.useState(!1),r=G(a=>ls(a)),{useFeatureGate:P}=$s(),K=zs(),ye=Ys(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&W,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=G(a=>a.tenantState.fetchState),A=G(a=>a.tenantState.activeTenantFetchState.fetchState),u=A==="Completed"||j==="Completed"?cs(se,r):void 0,z=A==="Completed"||j==="Completed"?ds(r):void 0,Le=A==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!z||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),Y=G(a=>us(a));if(o!=null){const a=R.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:D,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),E=qs(),Se=r.company==null||E?.loggedInUserRoleMap!=null&&Ee(E.loggedInUserRole),Ne=Es(E?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,Q=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=G(a=>w.tenantId!=null?As(a,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(Q!=null&&D!=null){const a=Q.params.selectedPeriod;if(a!=null){const b=a.split("-");if(b.length===2){const d=ps(Number(b[0])),s=Number(b[1]),m=gs(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=xs();m.isAfter(M,"month")===!1?U(Is(D,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[Q,D]),v.useEffect(()=>{N||(De(!0),f(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,b,d,s){if(pe(b?.userId,b?.zeniSessionId,a.tenantId),d(Bs(!0)),d(ge(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=R.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(Ws(s)),m?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?X.identify(a.userId,{tenant_id:a.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,R]),v.useEffect(()=>{R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,b,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const q=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(q&&ts){k(ge(s));const J=R.getSignedInUserTenantWithId(s);J?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(J?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)))}else q&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),q&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)));if(q){X.identify(m.userId,{tenant_id:s});const J=s==null||s!=null&&(b==="Completed"||b==="Error");a==="Completed"||b!=="Not-Started"&&b!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),J&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ae(m.userId,m.zeniSessionId)))}}(j,A,r,D,h,f,U))},[D,A]),v.useEffect(()=>{R.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),R.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{A==="In-Progress"&&f(B.TENANT_FETCHING),A!=="Completed"&&A!=="Error"||(A==="Completed"&&D!=null?(O(),_.markActiveTenantFetchCompleted(D)):A==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[A,j,D,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&A==="Completed"&&N&&(ie.current=!0,function(a=Qs,b=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Ks[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},b)}())},[A,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ee(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,$e=Us(E?.loggedInUserRoleMap),ze=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&bs(E?.loggedInUserRoleMap),me=Oe&&!C,Ye=r.company!=null&&Rs(r.company),qe=Pe&&Ye===!0&&!C,Je=re&&Hs(E?.loggedInUserRoleMap),We=oe&&Ds(E?.loggedInUserRoleMap),Ke=me&&ys(E?.loggedInUserRoleMap),Qe=fs(E?.loggedInUserRoleMap),Xe=Cs(E?.loggedInUserRoleMap),p=vs(E?.loggedInUserRoleMap),g=Os(E?.loggedInUserRoleMap),x=Ps(E?.loggedInUserRoleMap),I=Fs(E?.loggedInUserRoleMap),T=Ls(E?.loggedInUserRoleMap),ue=re&&I,_e=ce&&T,es=me&&p,ss=qe&&g,ns=oe&&x,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||$e===!0||Qe===!0||Xe===!0;return R.isSignedIn()?D==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ae(h.userId,h.zeniSessionId)),null):A!=="In-Progress"&&A!=="Not-Started"||j==="Completed"?(le===!0||W&&!te)&&ze===!1&&u===!1&&z===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||W?N&&r?.userRole&&u!=null&&z!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(Js,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,isTenantCardsOnly:z})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||Ge?e.jsx(rn,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:g,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(In,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(gn,{})}),e.jsx(t,{path:"address/*",element:Je||de||Ke||We?e.jsx(en,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(En,{}):e.jsx(He,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(An,{}):e.jsx(He,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(be,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(be,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(Re,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(Re,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(ln,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:K?e.jsx(xn,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const Tn=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),H=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(bn,{tenantEmailDomain:O}):S?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Rn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(y,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),bn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Rn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),He=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{H as FallBackRoute,wn as default};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-Dn3WlYDG.js";import{a as p}from"./sentry-BBtxjqBH.js";import{h as V,g as $,u as M,j as h,t as se,n as K,i as G,o as Y,p as I}from"./core-CBQNMmNB.js";import{bn as Ee,eR as P,fO as Ae,m5 as we,Os as ve,gP as ue,M2 as je,p_ as ke,jI as pe,l$ as Pe,gR as Te,M4 as Me,M3 as De,Ot as Ue,yj as _e,CO as Oe,O1 as Re,Oa as Fe,c2 as ee,cH as Be,cI as Ve,K9 as ze,Ou as Le,Ka as Ne,wL as $e,Ov as Ke,Fa as Ge,Cu as Ze,Cl as ge,Ci as He,wP as me,Co as he,Cr as fe,Cx as ne,tc as te,wO as qe,jk as W,jn as be,Ow as Qe,ko as Je,x2 as Ye,KZ as We,K_ as Xe,ji as en,Ox as nn,jl as tn,qs as an,Oy as on,Oz as sn,qw as cn,gz as ln,Ki as J,go as rn,gv as dn,Kj as un,w$ as pn,OA as gn,OB as mn,CL as hn,e_ as Se,f0 as Ce,OC as fn,fC as bn,Ks as Sn,w_ as ie,fH as ce,fG as Cn,wZ as yn,fF as In,fE as xn,OD as En,f3 as ye,OE as An,OF as wn,x5 as vn,wY as le,OG as jn,fk as kn,wV as Pn,bV as Tn,c1 as Mn,c0 as Dn,bW as Un,b_ as _n,bZ as On,bY as Rn,b$ as Fn,bX as Bn}from"./zeni-epic-state-kigW-Vb1.js";import{s as ae,d as O,z as A,af as Ie,bK as Vn,e as Q,g as zn,k as Z,B as oe,bL as Ln,bM as Nn,aq as $n,j as xe,bN as Kn,bO as Gn,bP as Zn,a9 as Hn,V as qn,bQ as Qn,v as Jn,bR as Yn}from"./index-C6g7x9Xf.js";import{n as R}from"./mui-BaxUp1f6.js";import{M as D}from"./MobileAppDrawer-CMqrUzty.js";import{a as H,g as q,m as Wn}from"./accountMappingHelper-B6MS-2MI.js";import{t as Xn,A as et}from"./AddressScreen-BNSulfP2.js";import N from"./NotFoundScreen-BWmMemx_.js";import{g as nt}from"./analyticsHelper-DugMUcaM.js";import{B as tt}from"./BusinessVerificationPageScreen-Bh75FXTZ.js";import{C as at}from"./CompanyPassportScreen-DDjqyMwX.js";import{q as re}from"./QBOConnectionScreen-PJhN_FwV.js";import{B as ot}from"./BillPayApprovalRoutes-DSwN963F.js";import{R as st}from"./ReimbursementApprovalRoutes-orETMU81.js";import"./recharts-cF7j6WPE.js";import"./analytics-PD1ubuhk.js";import"./plaid-CkikokYa.js";import"./dnd-Z3xBQUdM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CyQvfguW.js";import"./lexical-Pu0UU7Gm.js";import"./pdf-BdzM5lLL.js";import"./utils-DGbjXCxQ.js";import"./routePaths-DlNlbaAA.js";import"./empty-JWZ-J0Ml.js";import"./pdf-lib-Ho0i9gSn.js";import"./index-CFJnQx3u.js";import"./url-jngClEHC.js";import"./index-DtpzPOK-.js";import"./decodeURIComponentSafe-CTFTZ79i.js";import"./ReimbursementApprovalRuleDetailScreen-D19M7wpr.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]="02a9ae71-65fd-49a3-bc81-faedc8da0d40",e._sentryDebugIdIdentifier="sentry-dbid-02a9ae71-65fd-49a3-bc81-faedc8da0d40")}catch{}})();const it=R.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,ct=K(function(e,t){return{accountMappingView:t.accountMappingView,isFiling1099FeatureEnabled:t.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:t.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:pe(e),isAccountingClassesUpdateInProgress:e.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:ke(e),meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",isCapitalizationFeatureEnabled:t.isCapitalizationFeatureEnabled,capitalizableAccounts:t.capitalizableAccounts,accountNamesById:t.accountNamesById,capitalizationThreshold:t.capitalizationThreshold,capitalizationThresholdMaxCeiling:t.capitalizationThresholdMaxCeiling,isCapitalizationThresholdSaving:t.isCapitalizationThresholdSaving,onSaveCapitalizationThresholds:t.onSaveCapitalizationThresholds}},function(e,t){const{navigate:s,location:r,isFiling1099FeatureEnabled:i}=t;return{onAccountMappingChange:n=>{const{uncategorizedAccountSection:a,billsAccountSection:c,reimbursementsAccountSection:u,vendorsAccountSection:d,filing1099Section:m}=n,{incomeAccount:f,expenseAccount:g}=a,{billPayAccount:l}=c,{reimbursementsAccount:w}=u,{prepaidExpensesAccount:x,fixedAssetsAccount:v,accruedExpensesAccount:S}=d,{bankAccount:y,expenseCategory1099:U}=m,E=H(t.accountMappingView.incomeAccountList,f.selectedOption),F=H(t.accountMappingView.expenseAccountList,g.selectedOption),z=H(t.accountMappingView.billPayAccountList,l.selectedOption),L=H(t.accountMappingView.reimbursementsAccountList,w.selectedOption),B=q(t.accountMappingView.prepaidExpensesAccountList,x.selectedOptions),b=q(t.accountMappingView.fixedAssetsAccountList,v.selectedOptions),T=q(t.accountMappingView.accruedExpensesAccountList,S.selectedOptions),C=q(t.accountMappingView.bankAccounts1099FilingAccountList,y.selectedOptions),j=Wn(t.accountMappingView.expenseAccounts1099FilingAccountList,U),_={selectedIncomeAccountId:E?.accountId,selectedExpenseAccountId:F?.accountId,selectedBillPayAccountId:z?.accountId,selectedReimbursementsAccountId:L?.accountId,selectedPrepaidExpensesAccountIds:B.map(k=>k.accountId),selectedFixedAssetsAccountIds:b.map(k=>k.accountId),selectedAccruedExpensesAccountIds:T.map(k=>k.accountId),selectedBankAccounts1099FilingAccountIds:C.map(k=>k.accountId),selectedExpenseAccounts1099FilingAccountIds:j};e(De({data:_}))},onBackClick:()=>{Ie(r)===!1?(s("../../dashboard"),e(Me())):e(ue())},onSaveClick:()=>{e(Te()),i&&Q.track(zn.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:n=>{e(Pe(t.currentTenant.companyId,n))}}})(Vn),lt=()=>{const e=V(),t=$(),s=M(),{useFeatureGate:r,useDynamicConfig:i}=ae(),{isFeatureEnabled:n}=r(O.isFiling1099FeatureEnabled),{isFeatureEnabled:a}=r(O.isScheduledJEAccruedExpensesFeatureEnabled),{configValue:c,isDynamicConfigLoading:u}=i("transaction_categorization_config"),d=!u&&c?.capitalization_enabled===!0,m=A.getSignedInUser(),f=Ee(m),g=h(C=>P(C)),{capitalizableAccounts:l,capitalizationThreshold:w,capitalizationThresholdMaxCeiling:x,isCapitalizationThresholdSaving:v,currencySymbol:S}=h(C=>{const j=C.tenantState.currentTenantId,_=j!=null?C.tenantState.tenantsById[j]:void 0,k=Ae(C.companyState,g.companyId);return{capitalizableAccounts:_?.capitalizableAccounts??null,capitalizationThreshold:_?.capitalizationThreshold??null,capitalizationThresholdMaxCeiling:_?.capitalizationThresholdMaxCeiling??null,isCapitalizationThresholdSaving:C.companyViewState.passportView?.capitalizationThresholdUpdateStatus?.fetchState==="In-Progress",currencySymbol:k?.company.companyLocaleInfo?.currencySymbol??"$"}},se),y=p.useCallback((C,j)=>{s(we(g.companyId,C,j))},[s,g.companyId]),U=h(C=>ve(C.accountState),se),E=p.useMemo(()=>{const C={};for(const j of U)j.accountId!=null&&j.accountName!=null&&(C[j.accountId]=j.accountName);return C},[U]),[F,z]=p.useState(!1),[L,B]=p.useState(!1);p.useEffect(()=>{F===!1&&(s(ue()),z(!0))},[F]);const b=h(C=>je(C)),T=C=>{B(C)};return o.jsxs(it,{children:[o.jsx(D,{isAppContentDrawerOpen:L,handleDrawerToggle:T}),o.jsx(ct,{currentTenant:g,navigate:e,accountMappingView:b,isFiling1099FeatureEnabled:n&&f,isAccruedExpensesFeatureEnabled:a,isCapitalizationFeatureEnabled:d,capitalizableAccounts:l,accountNamesById:E,capitalizationThreshold:w,capitalizationThresholdMaxCeiling:x,currencySymbol:S,isCapitalizationThresholdSaving:v,onSaveCapitalizationThresholds:y,location:t,isSettings:Ie(t),onClickMenuIcon:()=>T(!0)})]})},rt=R.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
height: 100%;
|
|
12
|
-
width: 100%;
|
|
13
|
-
flex: 1 1 auto;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
align-items: center;
|
|
16
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
`,dt=K(function(e,t){const s=P(e),r=Re(e),i=Fe(e),n=t.roleMap.bill_pay_admin;return{isDisabled:(ee(s?.userRole??[])||n)&&"readonly",billpayApprovalView:r,remiApproverView:i,analytics:Q}},function(e,t){const{navigate:s,currentTenant:r}=t;return{onSetupApprovalRulesBillPaySectionClick:()=>{s("bills/approval-rules")},onSetupApprovalRulesRemiSectionClick:()=>{s("reimbursements/approval-rules")},onBackClick:()=>{r?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&r.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}})(Ln),ut=()=>{const e=V(),t=$(),s=M(),{tenantEmailDomain:r}=G(),[i,n]=p.useState(!1),[a,c]=p.useState(!1),[u,d]=p.useState(!1),m=h(S=>P(S)),f=h(S=>S.billPaySetupApproverViewState.fetchState),g=h(S=>S.remiSetupApproverViewState.fetchState),l=h(S=>Ue(S)),w=m.companyId??A.getSignedInUserTenant(r)?.companyId;if(A.getSignedInUser()==null)throw Error("Can't access Approval Rules settings page without signing in...");const x=Z();p.useEffect(()=>{u||f!=="Not-Started"||(d(!0),s(_e(!0)))},[u,f,s]),p.useEffect(()=>{a||g!=="Not-Started"||(c(!0),s(Oe(!0)))},[a,g,s]);const v=S=>{n(S)};return x?.loggedInUserRoleMap!=null?o.jsxs(rt,{children:[o.jsx(D,{isAppContentDrawerOpen:i,handleDrawerToggle:v}),o.jsx(dt,{navigate:e,location:t,companyId:w,currentTenant:m,roleMap:x.loggedInUserRoleMap,onClickMenuIcon:()=>{v(!0)}})]}):o.jsx(oe,{fetchState:l.fetchState})},pt=R.div`
|
|
18
|
-
display: flex;
|
|
19
|
-
height: 100%;
|
|
20
|
-
width: 100%;
|
|
21
|
-
flex: 1 1 auto;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
align-items: center;
|
|
24
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
25
|
-
`,gt=K(function(e,t){const{companyId:s,isZeniAccountEnabled:r,isChargeCardEnabled:i,isBillPayEnabled:n,isRemiEnabled:a,isTreasuryEnabled:c}=t,u=P(e);return{bankSetupView:Ke(e,s,n,a,r,i,c),connectedAccountProvider:u.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:Q}},function(e,t){const{navigate:s,currentTenant:r,companyId:i}=t;return{onFetchLinkTokenClick:(n,a,c)=>{e(te(a,n,c))},onEstablishConnectionClick:(n,a,c)=>{e(ne(n,i,a,c))},onUpdatePaymentAccountStatus:(n,a,c,u,d)=>{e(fe(n,a,d,u,c))},onUpdatePaymentAccountLoginStatus:(n,a,c,u)=>{e(he(!1,n,u,c,a))},onEstablishConnectionSuccess:(n,a)=>{e(me(a,n))},onUpdateAccountClick:(n,a,c,u,d)=>{e(d==="paymentAccount"?ge(n,a,c,u):He(u,n,a))},onUpdatePrimaryFundingAccount:(n,a,c)=>{e(Ze(i,a,n,c))},onRemoveConnection:n=>{e(Ge(n))},onBackClick:()=>{r?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&r.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}})(Nn),mt=()=>{const e=V(),t=$(),s=M(),{tenantEmailDomain:r}=G(),i=Z(),[n,a]=p.useState(!1),[c,u]=p.useState(!1),d=h(y=>P(y)),m=h(y=>y.settingsViewState.bankConnection.fetchState),f=Be(d,i?.loggedInUserRoleMap),g=Ve(d,i?.loggedInUserRoleMap),l=ze(d,i?.loggedInUserRoleMap),w=Le(d,i?.loggedInUserRoleMap),x=Ne(d,i?.loggedInUserRoleMap),v=d.companyId??A.getSignedInUserTenant(r)?.companyId;if(A.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");p.useEffect(()=>{c||m==="Completed"||(u(!0),s($e(!1)))},[c,s,m]);const S=y=>{a(y)};return f||l||g||x?o.jsxs(pt,{children:[o.jsx(D,{isAppContentDrawerOpen:n,handleDrawerToggle:S}),o.jsx(gt,{navigate:e,location:t,companyId:v,currentTenant:d,roleMap:i.loggedInUserRoleMap,isBillPayEnabled:f,isRemiEnabled:g,isZeniAccountEnabled:l,isChargeCardEnabled:x,isTreasuryEnabled:w,onClickMenuIcon:()=>{S(!0)}})]}):o.jsx(N,{})},ht=R.div`
|
|
26
|
-
display: flex;
|
|
27
|
-
height: 100%;
|
|
28
|
-
width: 100%;
|
|
29
|
-
flex: 1 1 auto;
|
|
30
|
-
flex-direction: column;
|
|
31
|
-
align-items: center;
|
|
32
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
33
|
-
`,ft=K(function(e,t){const{companyId:s}=t,r=P(e),i=t.roleMap.bill_pay_admin,n=Qe(e,s),{uiState:a}=n,c=(ee(r?.userRole??[])||i)&&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:a,stripeKey:xe.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:r.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:c,analytics:Q}},function(e,t){const{navigate:s,currentTenant:r,companyId:i}=t;return{onFetchLinkTokenClick:(n,a)=>{e(te("billing_setup",n,a))},onEstablishConnectionClick:n=>{e(ne(n,i,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(me("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,a,c)=>{e(fe(n,a,"billing","billing_setup",c))},onUpdatePaymentAccountLoginStatus:(n,a)=>{e(he(!1,n,"billing","billing_setup",a))},onUpdateAccountClick:(n,a)=>{e(ge(n,a,"billing","billing_setup"))},onBackClick:()=>{r?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&r.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")},handleCreateCardSetupIntent:n=>{e(be(n))},handleConfirmCardSetupIntent:n=>{e(tn(n))},updateCardPaymentModalState:n=>{e(nn({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,a,c)=>{e(en(n,a,c))},handleFetchPaymentSources:()=>{e(W())},resetCardPaymentViewState:()=>{e(Xe())},handleResetCardPaymentErrorStatuses:()=>{e(We())},onBillingAddressSave:n=>{e(Ye(n))},onAddressEditHandler:n=>{if(n!=null){const a=Xn(n);e(Je({addressType:"subscription_billing_address",addressToCreate:a}))}}}})(Kn),bt=()=>{const e=V(),t=$(),s=M(),{tenantEmailDomain:r}=G(),[i,n]=p.useState(!1),[a,c]=p.useState(!1),[u,d]=p.useState(!1),m=h(y=>P(y)),f=h(y=>y.cardPaymentViewState),g=h(y=>y.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState),l=$n(f.addCardPaymentSourceStatus.fetchState),w=f.addCardPaymentSourceStatus.fetchState,x=m.companyId??A.getSignedInUserTenant(r)?.companyId;if(A.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const v=Z();p.useEffect(()=>{x!=null&&s(qe(x,!1))},[x,s]),p.useEffect(()=>{a||(c(!0),s(W()))},[a,s]),p.useEffect(()=>{u||(be(["card"]),d(!0))},[u]),p.useEffect(()=>{l==="In-Progress"&&w==="Completed"&&s(W())},[l,w]);const S=y=>{n(y)};return v?.loggedInUserRoleMap!=null?o.jsxs(ht,{children:[o.jsx(D,{isAppContentDrawerOpen:i,handleDrawerToggle:S}),o.jsx(ft,{navigate:e,location:t,companyId:x,currentTenant:m,roleMap:v.loggedInUserRoleMap,onClickMenuIcon:()=>{S(!0)},googleAPIKey:xe.googleMapsAPIKey})]}):o.jsx(oe,{fetchState:g})},X="external_integrations",St=K(function(e){const t=sn(e,X);return{meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",notifyMeRegisteredSlugs:new Set(t.map(s=>s.additionalInfo).filter(s=>s!=null))}},function(e,t){const{navigate:s,integrationsView:r,signedInUserEmail:i,tenantEmailDomain:n,tenantId:a}=t;return{onBackClick:()=>{s("../")},onNavigateToDashboard:()=>{s("../dashboard")},onReconnectQBO:()=>{re.init("/connection/auth",n),re.handleClick()},onRefreshClick:()=>{r.integrations.refreshQBO.fetchState!=="In-Progress"&&e(pn())},onSaveChargeBeeCredentials:(c,u)=>{const d=r.externalConnections?.revenue?.find(m=>m.connectionName==="chargebee")?.connectionId;d!=null&&e(dn(a,d,J("revenue"),un("chargebee"),{api_key:c,site:u}))},onConnectHubSpot:(c,u)=>{const d=r.externalConnections?.revenue?.find(m=>m.connectionName==="hubspot")?.connectionId;if(d!=null){const m=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:c,client_secret:u,connection_id:d,redirect_uri:m,tenant_id:a}));const f="oauth crm.objects.deals.read crm.objects.owners.read";window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(c)}&scope=${encodeURIComponent(f)}&redirect_uri=${encodeURIComponent(m)}`}},onDisconnect:(c,u)=>{e(rn(a,c,J(u)))},onSaveConnectorCredentials:c=>{e(ln(a,J("payments"),c))},onNotifyMe:c=>{e(cn(X,c,i))}}})(Gn),Ct=()=>{const e=V(),t=M(),{tenantEmailDomain:s}=G(),[r,i]=p.useState(!1),n=h(l=>l.tenantState.fetchState),a=h(l=>P(l)),c=a.companyId??A.getSignedInUserTenant(s)?.companyId,u=A.getSignedInUser(),d=Z(),m=ee(a.userRole??[]);if(u==null)throw Error("Can't access Integrations page without signing in...");p.useEffect(()=>{t(an(X))},[t]);const f=l=>{i(l)},g=h(l=>on(l,c));return d?.loggedInUserRoleMap!=null?o.jsxs(yt,{children:[o.jsx(D,{isAppContentDrawerOpen:r,handleDrawerToggle:f}),o.jsx(St,{navigate:e,onClickMenuIcon:()=>{f(!0)},isAdmin:m,integrationsView:g,signedInUserEmail:u.userEmail??"",tenantEmailDomain:a.tenantEmailDomain??s??"",tenantId:a.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(([l,w])=>[l,w?.message])),deleteConnectionState:g.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:g.externalConnections?.deleteConnectionError?.message,isLoading:n==="In-Progress"})]}):o.jsx(oe,{fetchState:n})},yt=R.div`
|
|
34
|
-
display: flex;
|
|
35
|
-
height: 100%;
|
|
36
|
-
width: 100%;
|
|
37
|
-
flex: 1 1 auto;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
align-items: center;
|
|
40
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
41
|
-
`,It=R.div`
|
|
42
|
-
display: flex;
|
|
43
|
-
height: 100%;
|
|
44
|
-
width: 100%;
|
|
45
|
-
flex: 1 1 auto;
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
align-items: center;
|
|
48
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
49
|
-
`,xt=()=>{const e=M(),{tenantEmailDomain:t}=G(),[s,r]=p.useState(!1),i=h(l=>P(l)).companyId??A.getSignedInUserTenant(t)?.companyId,n=A.getSignedInUser();if(n==null)throw Error("Can't access my bank connections page without signing in...");const a=h(l=>gn(l,n.userId)),c=h(l=>mn(l,i,"bill_pay","user_reimbursement_account")),{plaidConnectionDetails:u}=c,d=l=>{r(l)},m=p.useCallback(l=>{e(te("user_reimbursement_account",l))},[]),f=p.useCallback(l=>{e(ne(l,i,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},[]);p.useEffect(()=>{a.fetchState!=="Completed"&&a.fetchState!=="In-Progress"&&e(hn(n.userId))},[n.userId,a.fetchState]);const g=a.fetchState==="Not-Started"||a.fetchState==="In-Progress";return o.jsxs(It,{children:[o.jsx(D,{isAppContentDrawerOpen:s,handleDrawerToggle:d}),o.jsx(Zn,{plaidConnectionDetails:u,isLoading:g,myBankConnectionsView:a,onFetchLinkTokenClick:m,onEstablishConnectionClick:f,onClickMenuIcon:()=>{d(!0)}})]})},Et=R.div`
|
|
50
|
-
display: flex;
|
|
51
|
-
height: 100%;
|
|
52
|
-
width: 100%;
|
|
53
|
-
flex: 1 1 auto;
|
|
54
|
-
flex-direction: column;
|
|
55
|
-
align-items: center;
|
|
56
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
57
|
-
`,de=({appContent:e})=>{const t=M(),s=V(),r=$(),[i,n]=p.useState(!1),a=h(b=>P(b)),{tenantEmailDomain:c}=a,u=a.companyId??A.getSignedInUserTenant(c)?.companyId;if(A.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:d}=ae(),{isFeatureEnabled:m}=d(O.isDepositAccountsFeatureEnabled),{isFeatureEnabled:f}=d(O.isChargeCardFeatureEnabled),{isFeatureEnabled:g}=d(O.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=d(O.isTreasuryEnabled),w=h(b=>pe(b)),x=Se(a),v=Ce(g,a),S=!v&&w,y=Hn(a,f,g),{areTenantIdsInSync:U}=qn();p.useEffect(()=>{U&&t(fn(u,S))},[u,t,S,U]);const E=h(b=>bn(b,S)),F=E.fetchState==="Not-Started"||E.fetchState==="In-Progress"||u==null,z=Sn(a),L=!!a.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=b=>{n(b)};return o.jsxs(Et,{children:[o.jsx(D,{isAppContentDrawerOpen:i,handleDrawerToggle:B}),e!=null?o.jsx(o.Fragment,{children:e}):o.jsx(Qn,{myProfileView:E,isAccountingClassesEnabled:w,isReimbursementDisabled:L===!1,isZeniAccountsDisabled:m===!1,isChargeCardDisabled:y===!1,isTreasuryDisabled:l===!1,isLiteRoleDisabled:z===!1,onClickMenuIcon:()=>{B(!0)},isLoading:F,isBankingOnlyTenant:v,isCardsOnlyTenant:x,onAddressClick:b=>{const T=function(j,_){let k=`/${j}/settings/my_profile`;return k=k.concat(`/new/${_}`),k}(c,b),C=Jn(r.state?.pathnameStackToGoBack,r.pathname);s(T,{state:{pathnameStackToGoBack:C}})},onGetOtp:b=>{const T={...E.myProfileLocalData,phone:b};t(ie({localData:T})),t(xn(b,"MyProfile"))},onResendOtp:b=>{t(In(b,"MyProfile"))},onCancelClick:()=>{t(yn())},onSaveClick:()=>{t(ce("MyProfile",E.myProfileLocalData.phone,E.myProfileLocalData.otpChallenge,E.myProfileLocalData.dateOfBirth,E.addressData?.addressToCreate))},onVerifyOtp:(b,T)=>{t(Cn(b,T,"MyProfile"))},onVerifyOtpSuccess:b=>{b!=null&&A.saveZeniOtpToken(b),t(ce("MyProfile",E.myProfileLocalData.phone,E.myProfileLocalData.otpChallenge,E.myProfileLocalData.dateOfBirth,E.addressData?.addressToCreate))},updateMyProfileLocalData:b=>{t(ie({localData:b}))}})]})};function At(){const e=M(),t=h(l=>P(l)).companyId,s=h(l=>En(l)),r=h(l=>ye(l)),i=A.getSignedInUser(),[n,a]=p.useState(!1),c=p.useCallback(l=>{a(l)},[]),u=p.useCallback(l=>{e(An(l))},[]),d=p.useCallback(()=>{i?.userEmail!=null&&e(wn({loggedInUserEmail:i.userEmail}))},[i?.userEmail]),m=p.useCallback(()=>{e(vn())},[]);if(i==null)throw Error("Can't access Notification Settings page without signing in...");const f=p.useCallback(()=>{const l=r.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(le(l,t))},[t,r.notificationSettings.monthEndInsightsNotificationSettings.enabled]),g=p.useCallback(()=>{e(jn())},[]);return p.useEffect(()=>{if(r.fetchState==="Completed"&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"){const l=r.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(le(l,t))}},[s.fetchState,t,r.notificationSettings.monthEndInsightsNotificationSettings.enabled,r.fetchState]),o.jsxs(o.Fragment,{children:[o.jsx(D,{isAppContentDrawerOpen:n,handleDrawerToggle:c}),o.jsx(Yn,{notificationSettingsView:s,onFormDataChange:u,onCancel:d,onSave:m,onClickMenuIcon:()=>{c(!0)},signedInUser:i,onRefresh:f,resetUpdateStatus:g})]})}function sa(e){const[t,s]=p.useState(!1),r=h(l=>ye(l)),i=h(l=>P(l)),n=Z(),a=A.getSignedInUser(),c=M(),{useFeatureGate:u}=ae(),{isFeatureEnabled:d}=u(O.isDebitCardFeatureEnabled),m=a?.userEmail==null||r.fetchState!=="Completed"||kn(r.notificationSettings,a.userEmail,d,i);p.useEffect(()=>{r.fetchState!=="In-Progress"&&r.fetchState!=="Completed"&&t===!1&&(s(!0),c(Pn()))},[r.fetchState,t]);const f=Ce(d,i),g=Se(i);return r.fetchState!=="In-Progress"&&r.fetchState!=="Not-Started"||m!==!0?Tn(i)?o.jsxs(Y,{children:[Mn(n?.loggedInUserRole??[],d,i,n?.loggedInUserRoleMap)&&o.jsx(I,{path:"accounting/*",element:o.jsx(lt,{})}),Dn(n?.loggedInUserRole??[],d,i,n?.loggedInUserRoleMap)&&o.jsx(I,{path:"approval_rules/*",element:o.jsx(wt,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),Un(i,n?.loggedInUserRoleMap)&&o.jsx(I,{path:"my_bank_connections",element:o.jsx(xt,{})}),_n(i,n?.loggedInUserRoleMap)&&o.jsx(I,{path:"bank_connections",element:o.jsx(mt,{})}),On(i,n?.loggedInUserRoleMap)&&o.jsx(I,{path:"business_verification",element:o.jsx(tt,{productType:f?"zeni_accounts":g?"charge_cards":nt(i,n?.loggedInUserRoleMap)})}),Rn(n?.loggedInUserRole??[],i,n?.loggedInUserRoleMap)&&o.jsx(I,{path:"company_details",element:o.jsx(at,{})}),Fn(n?.loggedInUserRole??[],i)&&o.jsx(I,{path:"billing",element:o.jsx(bt,{})}),Bn(n?.loggedInUserRole??[],d,i)&&o.jsx(I,{path:"integrations",element:o.jsx(Ct,{})}),o.jsx(I,{path:"my_profile/new/:addressType",element:o.jsx(de,{appContent:o.jsx(et,{isSubPage:!1})})}),o.jsx(I,{path:"my_profile",element:o.jsx(de,{})}),m&&o.jsx(I,{path:"notifications",element:o.jsx(At,{})}),o.jsx(I,{path:"*",element:o.jsx(N,{})})]}):o.jsx(Y,{children:o.jsx(I,{path:"*",element:o.jsx(N,{})})}):null}function wt(e){return o.jsxs(Y,{children:[o.jsx(I,{path:"/",element:o.jsx(ut,{})}),o.jsx(I,{path:"bills/approval-rules/*",element:o.jsx(ot,{})}),o.jsx(I,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?o.jsx(st,{}):o.jsx(N,{})}),o.jsx(I,{path:"*",element:o.jsx(N,{})})]})}export{sa as default};
|