@zeniai/web-app-ui 5.0.20-qa → 5.0.22-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-BJrRevGa.js +1 -0
- package/dist/assets/{AddressScreen-Cb_9EmBQ.js → AddressScreen-BQPPe7pR.js} +2 -2
- package/dist/assets/AiCfoScreen-C5DOIEt_.js +11 -0
- package/dist/assets/{BillPayApprovalRoutes-y7moBK-h.js → BillPayApprovalRoutes-Qtg1Jo5l.js} +1 -1
- package/dist/assets/{BillPayRoutes-BWxnSvNr.js → BillPayRoutes-DkAPd68y.js} +8 -8
- package/dist/assets/{BusinessVerificationPageScreen-BLm71CWm.js → BusinessVerificationPageScreen-CktedTYt.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-BzNwraqW.js → ChargeCardRoutes-B8s0w6So.js} +8 -8
- package/dist/assets/CompanyPassportScreen-C8EcswEA.js +1 -0
- package/dist/assets/{ConnectionAuthScreen-Djma4Bm8.js → ConnectionAuthScreen-Zh5E4_CJ.js} +2 -2
- package/dist/assets/CustomerOnboardingAuthScreen-HXUuepjr.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-CbHAqwxG.js → CustomerOnboardingRoutes-RiQ255x9.js} +4 -4
- package/dist/assets/{DashboardRoutes-BtQI7NbJ.js → DashboardRoutes-DD6E0pG7.js} +3 -3
- package/dist/assets/{DefaultTenantHome-B81akhAm.js → DefaultTenantHome-feQeI0F_.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-eW-I-lqX.js +18 -0
- package/dist/assets/DrawerScreen-HBFMcVvk.js +1 -0
- package/dist/assets/{EntityDetailRoutes-CYe5GW55.js → EntityDetailRoutes-Bh44Er44.js} +1 -1
- package/dist/assets/ExpenseAutomationRoutes-CgCGvHQG.js +25 -0
- package/dist/assets/FeaturePreviewScreen-Bd18oGQj.js +1 -0
- package/dist/assets/MagicLinkRoutes-DFA8OahA.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-CLhGIPxm.js +12 -0
- package/dist/assets/MobileAppDrawer-CwjUL5yD.js +1 -0
- package/dist/assets/NotFoundScreen-DZbU-KCv.js +1 -0
- package/dist/assets/{NotificationRoutes-CRynelUf.js → NotificationRoutes-BOGZiZZG.js} +1 -1
- package/dist/assets/PandLWithForecastRoutes-DZ6jC1bX.js +1 -0
- package/dist/assets/{PeopleRoutes-Bo95azg1.js → PeopleRoutes-DD_GpPXZ.js} +9 -9
- package/dist/assets/PerformanceRoutes-BEO8LXrv.js +1 -0
- package/dist/assets/{Preview-BXohszpd.js → Preview-DQaLRQjm.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-B_Iv-Jup.js → QBOConnectionScreen-ZhIN2-uP.js} +1 -1
- package/dist/assets/{ReferralListScreen-CT8COHO0.js → ReferralListScreen-CWHCaSQw.js} +2 -2
- package/dist/assets/ReimbursementApprovalRoutes-DLby1pC7.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BSJvMfmy.js → ReimbursementApprovalRuleDetailScreen-roSj06Ji.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-Crxj9U5j.js → ReimbursementRoutes-BQAXwJX9.js} +6 -6
- package/dist/assets/{ReportsRoutes-Brd5m0YA.js → ReportsRoutes-COAdHt4D.js} +1 -1
- package/dist/assets/RewardsRoutes-Dw-aqOm5.js +1 -0
- package/dist/assets/{ScreenRoutes-BgcK48e3.js → ScreenRoutes-DV65D9fc.js} +2 -2
- package/dist/assets/{SettingsRoutes-CogpjDxD.js → SettingsRoutes-XQ9e9KID.js} +5 -5
- package/dist/assets/{SetupPagesScreen-C5z2OQ3X.js → SetupPagesScreen-BcfdYSeZ.js} +1 -1
- package/dist/assets/{SignInScreen-BrGMsoQX.js → SignInScreen-Cc84lO8c.js} +1 -1
- package/dist/assets/SignOutScreen-DzSDmVnc.js +9 -0
- package/dist/assets/{TaskListScreen-DT8MICZp.js → TaskListScreen-B_Yspya7.js} +2 -2
- package/dist/assets/TaskRoutes-DkUNX7ep.js +9 -0
- package/dist/assets/TransactionDetailRoutes-C5W6mPZ3.js +1 -0
- package/dist/assets/{TransactionDetailScreen-DRrJTiHG.js → TransactionDetailScreen-CbyG0n1m.js} +1 -1
- package/dist/assets/{TransactionListRoutes-DVfBJ6Ob.js → TransactionListRoutes-Uz8iUZDH.js} +1 -1
- package/dist/assets/{TreasuryRoutes-CNL9l3-q.js → TreasuryRoutes-DMgnld7f.js} +6 -6
- package/dist/assets/{VendorsRoutes-DL99Yq-y.js → VendorsRoutes-JX67ErLJ.js} +1 -1
- package/dist/assets/WiseConfirmationScreen-B_bo1Cpn.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-BzgEiwqj.js → ZeniAccountRoutes-Cy1TFPrS.js} +10 -10
- package/dist/assets/ZeniAccountStatementScreen-Dvs4m1EF.js +9 -0
- package/dist/assets/{accountMappingHelper-BR6VxhSD.js → accountMappingHelper-DpblOBXy.js} +1 -1
- package/dist/assets/{analytics-CgaqSFat.js → analytics-BSnG8C1z.js} +1 -1
- package/dist/assets/{analyticsHelper-Co0biJvM.js → analyticsHelper-BlP3gsal.js} +1 -1
- package/dist/assets/{core-AMZJGpoV.js → core-BF8mCLAO.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DNGRwvKs.js → decodeURIComponentSafe-BogCAdat.js} +1 -1
- package/dist/assets/{dnd-C4u70dJH.js → dnd-BwvUecBQ.js} +1 -1
- package/dist/assets/{empty-AgaGyBlm.js → empty-CH1gmPwH.js} +1 -1
- package/dist/assets/{empty-DmTCdHiz.js → empty-DhgRx5Ms.js} +1 -1
- package/dist/assets/{emptyVideoElement-DgTh6sDI.js → emptyVideoElement-CIPD7QoK.js} +1 -1
- package/dist/assets/{epic-Bz0gIByF.js → epic-CBSMbAdJ.js} +1 -1
- package/dist/assets/getLocaleForTenant-BZ9xLliJ.js +1 -0
- package/dist/assets/index-Bc34frN_.css +1 -0
- package/dist/assets/{index-Bwb8m5V-.js → index-BjHWZg4v.js} +1 -1
- package/dist/assets/{index-CjJS6JvG.js → index-Bv4UcPLE.js} +2 -2
- package/dist/assets/{index-DClxQldp.js → index-C-wmbsLK.js} +1 -1
- package/dist/assets/{index-iatPGBna.js → index-Cuo-3WZY.js} +1 -1
- package/dist/assets/{index-N5K3qQkU.js → index-Drj6C88E.js} +22813 -22319
- package/dist/assets/{index-BglIPIvl.js → index-DxU2jKyi.js} +1 -1
- package/dist/assets/{index-Swai7U66.js → index-DzmJ6hZq.js} +1 -1
- package/dist/assets/{lexical-hn7WhrHW.js → lexical-BHRXj1_E.js} +1 -1
- package/dist/assets/{liveblocks-Cm6P1Xg9.js → liveblocks-it_Rhm8-.js} +1 -1
- package/dist/assets/{lottie-CEe6fZ1i.js → lottie-CJdx3HBv.js} +1 -1
- package/dist/assets/{mui-5LlzyiP2.js → mui-B87RTrAV.js} +1 -1
- package/dist/assets/{pathToGoBack-De67_VBD.js → pathToGoBack-_pwiC6EH.js} +1 -1
- package/dist/assets/{pdf-lib-BXQxUj4c.js → pdf-lib-BX9OJ6Nl.js} +1 -1
- package/dist/assets/{pdf-DzINawGT.js → pdf-oE7nS36B.js} +4 -4
- package/dist/assets/{plaid-nK_3ZvzH.js → plaid-lXH1vlKo.js} +1 -1
- package/dist/assets/{pusher-CjEZkdOe.js → pusher-BuqNN16A.js} +1 -1
- package/dist/assets/{react-DCJKQzil.js → react-BPb4kZZA.js} +1 -1
- package/dist/assets/{react-D9RPLCn-.js → react-BqI_r-ls.js} +1 -1
- package/dist/assets/{react-T4GM5RLO.js → react-DcdwnIrk.js} +1 -1
- package/dist/assets/{react-BIiJHpnP.js → react-K11bZKBw.js} +1 -1
- package/dist/assets/{react-DgmtF1S_.js → react-Z36nuoKZ.js} +1 -1
- package/dist/assets/{react-DOoN7l3d.js → react-fYlmVc1c.js} +1 -1
- package/dist/assets/{recharts-LaAu_fL4.js → recharts-BBMAmq_A.js} +1 -1
- package/dist/assets/{routePaths-meDm6KLz.js → routePaths-Cqx2U__X.js} +1 -1
- package/dist/assets/{sentry-CH1ai1xG.js → sentry-C-hGmJ4T.js} +1 -1
- package/dist/assets/{url-CoAFnj2p.js → url-0lwNJByp.js} +1 -1
- package/dist/assets/{url-jOgcU75X.js → url-DTsNJhPz.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-wDzGPcQn.js +1 -0
- package/dist/assets/{useDeviceId-C9Bh2Mvx.js → useDeviceId-CGZ6TLY7.js} +1 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-D4I-78Sf.js +1 -0
- package/dist/assets/{useInitialThreadRequest-vKKjrofy.js → useInitialThreadRequest-sUCtW719.js} +1 -1
- package/dist/assets/{utils-DRDD4XTN.js → utils-C4NhxqJn.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-Bf8LYRg6.js → withTransactionSidePanel-DTDtCDdY.js} +3 -3
- package/dist/assets/{zeni-epic-state-CaufR46d.js → zeni-epic-state-Ds1G4QGX.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-B6j12uTF.js +0 -1
- package/dist/assets/AiCfoScreen-CLp8S2lW.js +0 -11
- package/dist/assets/CompanyPassportScreen-BUkmQF51.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-DJn2pUgu.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-D_8szANI.js +0 -18
- package/dist/assets/DrawerScreen-hOKdmqaY.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-U-buIEG3.js +0 -20
- package/dist/assets/FeaturePreviewScreen-XRpSmfAA.js +0 -1
- package/dist/assets/MagicLinkRoutes-z2OnGDhR.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-BzZa4ZxZ.js +0 -12
- package/dist/assets/MobileAppDrawer-CAbg3Q-N.js +0 -1
- package/dist/assets/NotFoundScreen-DCVl9MiG.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-BZgxjZvQ.js +0 -1
- package/dist/assets/PerformanceRoutes-SK18oh8d.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-D_X7Se2H.js +0 -1
- package/dist/assets/RewardsRoutes-CpyGkHSD.js +0 -1
- package/dist/assets/SignOutScreen-kYocp39P.js +0 -9
- package/dist/assets/TaskRoutes-n4RYkvEl.js +0 -9
- package/dist/assets/TransactionDetailRoutes-yTZfc_Av.js +0 -1
- package/dist/assets/WiseConfirmationScreen-DSPUSzLW.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-BP58chZP.js +0 -9
- package/dist/assets/getLocaleForTenant-Cuk0zyAy.js +0 -1
- package/dist/assets/index-D-vub4_t.css +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-Du0DR5Lw.js +0 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-ChhFydzB.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as k}from"./liveblocks-
|
|
1
|
+
import{j as k}from"./liveblocks-it_Rhm8-.js";import{a as m}from"./sentry-C-hGmJ4T.js";import{j,h as N,u as R,g as G,l as $,k as v}from"./core-BF8mCLAO.js";import{H as O,z as K,s as M,d as U,v as _,e as z,g as V,cB as W,n as f,p as q}from"./index-Drj6C88E.js";import{eM as H,Pk as L,Fo as y,Pl as w,Pg as J,EP as S,Pm as Q,ET as I,Es as X,Fp as b,Pn as B,gy as Y,Fe as Z,Fj as aa,F6 as ta,F4 as ea,Fk as sa,F1 as oa,Po as na,Pp as ia,Pq as la,Pr as d,e8 as ra,Ps as ca,Pt as pa}from"./zeni-epic-state-Ds1G4QGX.js";import{n as ka}from"./mui-B87RTrAV.js";import{u as da}from"./useAskAiCfoHostNavButtonProps-wDzGPcQn.js";import{c as ua}from"./useFetchSuggestedQuestionsWhenReady-D4I-78Sf.js";import{M as ma}from"./MobileAppDrawer-CwjUL5yD.js";import"./recharts-BBMAmq_A.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./utils-C4NhxqJn.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="febde9aa-6dbf-41a6-b8b7-ced36f53ad8a",t._sentryDebugIdIdentifier="sentry-dbid-febde9aa-6dbf-41a6-b8b7-ced36f53ad8a")}catch{}})();const fa=ka.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,4 +6,4 @@ import{j as k}from"./liveblocks-Cm6P1Xg9.js";import{a as m}from"./sentry-CH1ai1x
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${t=>t.theme.colors.grey4};
|
|
9
|
-
`,Ta=
|
|
9
|
+
`,Ta=v(function(t,e){const o=L(t,e.isTaskTemplatesEnabled),{taskGroupId:i}=e,n=i!=null&&i!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(r=>r.taskGroupIds.includes(i))})).filter(l=>l.tasks.length>0)}:o;return{taskListView:n,tagListView:J(t),localData:n.localData,isTaskTemplatesEnabled:e.isTaskTemplatesEnabled}},function(t,e){const{navigate:o,currentTenant:i,location:n,isTaskTemplatesEnabled:l}=e,{tenantEmailDomain:r}=i,{groupByKey:T}=e.uiState;return{onTaskManagementRowClick:a=>{const s=ga(r,a),p=f(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:p}})},onReloadTasks:()=>{t(y(!0,l))},onNewTaskClick:()=>{if(e.localData.defaultTaskGroupId!=null){const a=C(r,e.localData.defaultTaskGroupId),s=f(n.state?.pathnameStackToGoBack,n.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{t(B({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{t(la({filters:a}))},onSearchTextChanged:a=>{t(ia({searchText:a}))},onReloadCards:()=>{t(y(!0,l))},onBackClick:()=>{if(n.state?.message==="triggerBackClick"){const a=q(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{t(na({localData:a}))},resetLocalData:()=>{t(w({taskGroupById:e.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{t(oa(e.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{t(ea(e.localData.selectedTaskIds,a,sa(e.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{t(ta(a))},onAddNewTaskToTaskGroup:a=>{if(e.localData.defaultTaskGroupId!=null){const s=ha(T,a);t(S({taskDetailLocalData:s}));const p=C(r,e.uiState.groupByKey==="groupName"?a:e.localData.defaultTaskGroupId),g=f(n.state?.pathnameStackToGoBack,n.pathname);o(p,{state:{pathnameStackToGoBack:g,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{t(aa(e.localData.selectedTaskIds.length>0?e.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{t(Z(a,s))},onTimeSpentUpdate:(a,s)=>{t(b({task:a,updates:s}))},onShowToast:a=>{t(Y(a))},onGroupByFilterChange:a=>{t(B({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{t(b({task:a,updates:s}))},onCreateTagClick:(a,s)=>{t(X(a,s))},handleGroupTemplateClick:a=>{t(I(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{t(I(a,[s]))},handleNewTaskInitialization:a=>{if(t(S({taskDetailLocalData:{...Q,name:a}})),e.localData.defaultTaskGroupId!=null){const s=C(r,e.localData.defaultTaskGroupId),p=f(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:p,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${r}/tasks/group/${a}`)}}})(W);function $a(){const{isAiCfoOpen:t,setIsAiCfoOpen:e}=O(),o=j(),i=N(),n=R(),l=K.getSignedInUser(),r=G(c=>H(c)),{taskGroupId:T}=$(),{useFeatureGate:a}=M(),{isFeatureEnabled:s}=a(U.isTaskTemplatesEnabled),[p,g]=m.useState(!1),[E,P]=m.useState(!1),h=G(c=>L(c,s)),D=G(c=>c.taskGroupState),u=h.fetchState,{isAiCfoAccessEnabled:F,onAskAiCfoClick:A}=da({isAiCfoOpen:t,setIsAiCfoOpen:e,mobileExploreReferrer:"Task Checklist"});if(ua({isDataReady:u==="Completed"}),m.useEffect(()=>{p||(g(!0),i(y(!1,s)))},[p,i]),m.useEffect(()=>{u==="Completed"&&i(w({taskGroupById:D.taskGroupById}))},[u,D.taskGroupById]),l==null)throw Error("Can't access task list page without signing in...");return k.jsxs(k.Fragment,{children:[u==="Completed"?k.jsx(_,{analytics:z,onLoad:c=>(x=>x.trackPageLoaded(V.Event.taskListPage))(c)}):null,k.jsxs(fa,{children:[k.jsx(ma,{isAppContentDrawerOpen:E,handleDrawerToggle:c=>{P(c)}}),k.jsx(Ta,{location:n,navigate:o,currentTenant:r,taskGroupId:T,taskGroupState:D,localData:h.localData,uiState:h.uiState,isTaskTemplatesEnabled:s,taskListFetchState:u,isAiCfoAccessEnabled:F,onAskAiCfoClick:A})]})]})}const ga=(t,e)=>`/${t}/tasks/${encodeURIComponent(e)}`,C=(t,e)=>`/${t}/tasks/new/${e}`,ha=(t,e)=>{if(t==="assignee"){const o=e.split(",");return{...d.taskDetailLocalData,assignee:o}}if(t==="priority"){const o=ra(e);return{...d.taskDetailLocalData,priority:o}}if(t==="status"){const o=ca(e);return{...d.taskDetailLocalData,status:o}}if(t==="tag"){const o=e.split(",");return{...d.taskDetailLocalData,tagIds:o}}if(t==="dueDate"){const o=pa(e);return{...d.taskDetailLocalData,dueDate:o}}return{...d.taskDetailLocalData}};export{$a as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-it_Rhm8-.js";import A from"./NotFoundScreen-DZbU-KCv.js";import{a as p}from"./sentry-C-hGmJ4T.js";import{j as z,h as M,u as $,l as q,g as f,N as V,k as _,n as O,o as u}from"./core-BF8mCLAO.js";import{q as R,z as E,n as w,v as Q,e as D,g as W,cA as H,j as Z,ao as J,p as K}from"./index-Drj6C88E.js";import{eM as C,Pg as G,EL as v,Ez as X,Fb as Y,Ph as P,Pi as ee,Ev as ae,Es as te,pA as se,po as ne,jW as oe,EF as ie,Pj as re,EC as le,EQ as ce,EP as de}from"./zeni-epic-state-Ds1G4QGX.js";import{n as pe}from"./mui-B87RTrAV.js";import{u as me}from"./useInitialThreadRequest-sUCtW719.js";import{M as ue}from"./MobileAppDrawer-CwjUL5yD.js";import ke from"./TaskListScreen-B_Yspya7.js";import"./recharts-BBMAmq_A.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./utils-C4NhxqJn.js";import"./useAskAiCfoHostNavButtonProps-wDzGPcQn.js";import"./useFetchSuggestedQuestionsWhenReady-D4I-78Sf.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]="5bd998e5-a3b4-40ea-94dd-93bb16f9ed63",e._sentryDebugIdIdentifier="sentry-dbid-5bd998e5-a3b4-40ea-94dd-93bb16f9ed63")}catch{}})();const fe=_(function(e,t){const{location:n,taskGroupId:l}=t,d=P(e,t.taskId),c=C(e),i=l!=null?ee(e.taskGroupState,l):void 0,m=E.getSignedInUser(),a=c.tenantId,r={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:a??""},k=G(e);return{taskDetailSelectorView:d,authParams:r,isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:J.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${Z.appUrl}${t.location.pathname}`,tagListView:k,taskGroupName:l!=null&&i!=null&&i.isDefault===!1?i.name:void 0}},function(e,t){const{taskId:n,navigate:l,currentTenant:d,location:c,taskGroupId:i}=t,{tenantEmailDomain:m}=d;return{onSaveChangesToLocalStore:a=>{e(de({taskDetailLocalData:a,taskId:n}))},onSaveDetailClick:()=>{e(ce(n,i))},onArchiveTaskClick:()=>{t.taskId!=null&&e(le(t.taskId))},onDismissClick:()=>{if(c.state?.message==="triggerBackClick"){const a=K(c.state?.pathnameStackToGoBack),r=a.poppedPathname??"../../dashboard";l(r,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=B(m),r=w(c.state?.pathnameStackToGoBack,c.pathname);l(a,{state:{pathnameStackToGoBack:r}})}e(re({taskId:n}))},onDeleteTaskClick:()=>{e(ie(n))},updateFilesEntity:a=>{e(oe({files:a}))},onDeleteFile:a=>{e(ne(a))},onEditFileName:(a,r)=>{e(se(a,r.split(".")[0]))},onReloadTaskDetailPage:()=>{e(v(!1,n))},onCreateTagClick:a=>{e(te(a,n))},onDeleteTagClick:a=>{e(ae(a,n))}}})(H);function I(){const e=z(),t=M(),n=$(),l=R(),{taskId:d,taskGroupId:c}=q(),i=f(o=>C(o)),m=me(i?.companyId),[a,r]=p.useState(!1),[k,F]=p.useState(!1),[S,L]=p.useState(!1),[j,N]=p.useState(!1),x=f(o=>G(o)),b=f(o=>o.taskGroupViewState.fetchState);p.useEffect(()=>{k||(F(!0),t(v(!1,d)))},[k,t]),p.useEffect(()=>{S||x.fetchState==="Completed"||(L(!0),t(X()))},[S,t,x.fetchState]),p.useEffect(()=>{j||b==="Completed"||(N(!0),t(Y()))},[j,t,b]);const y=f(o=>P(o,d)),g=y.fetchState,T=E.getSignedInUser();if(T==null)throw Error("Can't access task detail page without signing in...");if(g==="Error"&&y.error?.code===400){const{tenantEmailDomain:o}=i,h=B(o),U=w(n.state?.pathnameStackToGoBack,n.pathname);return s.jsx(V,{to:h,state:{pathnameStackToGoBack:U}})}return s.jsxs(s.Fragment,{children:[g==="Completed"?s.jsx(Q,{analytics:D,onLoad:o=>(h=>h.trackPageLoaded(W.Event.taskDetailPage))(o)}):null,s.jsxs(ge,{children:[s.jsx(ue,{isAppContentDrawerOpen:a,handleDrawerToggle:o=>{r(o)}}),s.jsx(fe,{analytics:D,currentTenant:i,handleZeniLogoClick:()=>{l.toggle()},initialOpenThreadRequest:m,location:n,loggedInUser:T,navigate:e,taskGroupId:c,taskId:d,taskDetailFetchState:g})]})]})}const ge=pe.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
width: 100%;
|
|
5
|
+
flex: 1 1 auto;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
+
`,B=e=>`/${e}/tasks`;function ze(){return s.jsxs(O,{children:[s.jsx(u,{path:"/new",element:s.jsx(I,{})}),s.jsx(u,{path:"/new/:taskGroupId",element:s.jsx(I,{})}),s.jsx(u,{path:"/group/:taskGroupId",element:s.jsx(ke,{})}),s.jsx(u,{path:"/:taskId",element:s.jsx(I,{})}),s.jsx(u,{path:"*",element:s.jsx(A,{})})]})}export{ze as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./liveblocks-it_Rhm8-.js";import i from"./NotFoundScreen-DZbU-KCv.js";import{T as r}from"./TransactionDetailScreen-CbyG0n1m.js";import"./sentry-C-hGmJ4T.js";import{n as d,o as e}from"./core-BF8mCLAO.js";import"./zeni-epic-state-Ds1G4QGX.js";import"./recharts-BBMAmq_A.js";import"./index-Drj6C88E.js";import"./mui-B87RTrAV.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./utils-C4NhxqJn.js";import"./useAskAiCfoHostNavButtonProps-wDzGPcQn.js";import"./useFetchSuggestedQuestionsWhenReady-D4I-78Sf.js";import"./decodeURIComponentSafe-BogCAdat.js";import"./routePaths-Cqx2U__X.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new o.Error().stack;n&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[n]="256f287b-7a3d-4d6d-890e-a8cb9db8b86d",o._sentryDebugIdIdentifier="sentry-dbid-256f287b-7a3d-4d6d-890e-a8cb9db8b86d")}catch{}})();function q(){return t.jsxs(d,{children:[t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(e,{path:"/*",element:t.jsx(r,{})})]})}export{q as default};
|
package/dist/assets/{TransactionDetailScreen-DRrJTiHG.js → TransactionDetailScreen-CbyG0n1m.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as I}from"./liveblocks-
|
|
1
|
+
import{j as I}from"./liveblocks-it_Rhm8-.js";import{a as d}from"./sentry-C-hGmJ4T.js";import{h as K,g as S,u as re,j as le,l as de,N as Ke,k as je}from"./core-BF8mCLAO.js";import{bm as Me,eM as W,cM as ue,bu as me,pf as H,Jn as B,Ko as pe,Kp as Y,JN as he,jx as fe,Kq as ge,JS as Q,JT as X,km as Se,Gv as Z,Jh as _,jr as Te,jp as ye,jB as $e,Kr as Je,Ks as qe,t4 as G,jw as ve,FS as Ee,cS as We,cT as He,Kt as Ye,Jg as Qe,Ku as Xe,t8 as Ze,Kv as ea,Kw as aa,Kx as ta,Ky as na,Kz as oa,jA as sa,KA as ia,KB as ca,Ji as ra,KC as la,KD as da,KE as ua,FM as ma,FA as pa,G2 as ha,jC as fa,Gw as ie,FJ as ga}from"./zeni-epic-state-Ds1G4QGX.js";import{z as Ce,s as ee,d as V,aI as De,h as Sa,K as Ta,aJ as ya,A as va,p as J,S as Ea,aK as Ca,n as q,H as Da,e as be,aL as ba,ao as Ia,Q as $}from"./index-Drj6C88E.js";import{n as ka,S as Aa,D as Ua}from"./mui-B87RTrAV.js";import{u as xa}from"./useAskAiCfoHostNavButtonProps-wDzGPcQn.js";import{c as _a}from"./useFetchSuggestedQuestionsWhenReady-D4I-78Sf.js";import{d as Ie}from"./decodeURIComponentSafe-BogCAdat.js";import{h as ke,g as Va,d as wa,b as Fa}from"./routePaths-Cqx2U__X.js";import{t as Ba}from"./utils-C4NhxqJn.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="f02c6455-7166-4658-b50a-22568c0f18ab",a._sentryDebugIdIdentifier="sentry-dbid-f02c6455-7166-4658-b50a-22568c0f18ab")}catch{}})();const ae=()=>{const a=Ce.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(V.isChainOfThoughtEnabled);return d.useMemo(()=>Me(a)&&s,[a,s])};function Ae(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Za(a,e){const s=K(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>W(u)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ue(o.userRole),g=o.userRole!=null&&me(o.userRole),{isFeatureEnabled:T}=t(V.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:b}=t(V.isExpenseAutomationEnabled),{configValue:h}=n(De.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,k=ae(),y=d.useMemo(()=>({id:a,type:H(e)}),[a,e]),m=S(u=>B(u,y)),D=S(u=>{const N=B(u,y)?.transactionDetailLocalData.vendorUpdates?.id;return N==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[N]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Ae(m?.transaction):void 0,[m?.fetchState,m?.transaction]),E=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),A=S(u=>Y(u)),w=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),j=o.company?.companyInfo.firstMonthOfFY??1,M=S(u=>fe(u.accountState,u.accountListState,"accountList")),[P,F]=d.useState(!1),[L,v]=d.useState(!1),[c,O]=d.useState(!1);d.useEffect(()=>{F(!1),v(!1),O(!1)},[a,e]);const C=d.useCallback(()=>{F(!1),v(!1)},[]),[U,x]=d.useState(!1),z=w?.selectedPeriod?.timePeriod;return d.useEffect(()=>{c||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),O(!0)),p!=null&&(!i||l&&g===!1)&&(P?L||E==null||(v(!0),s(Z(p,"TransactionDetail",{timeframe:"month",timePeriod:z??E}))):(s(Q()),s(X()),F(!0),s(Se(p))))},[s,c,m?.fetchState,m?.transaction,p,i,l,g,P,L,E,z]),d.useEffect(()=>{A.newVendorState?.vendorDetailLocalData?.vendorName!=null?x(!0):x(!1)},[A.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(_("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:T,isExpenseAutomationEnabled:b,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:k,selectedTransaction:y,transactionDetail:m,vendorSaveStatus:D,tranEntity:p,defaultTrendTransactionTimePeriod:E,vendorViewDetails:A,uiState:w,firstMonthOfFY:j,uncategorizedAccounts:M,resetTrendIsFetchedStates:C,isCreateVendorDrawerOpen:U,setIsCreateVendorDrawerOpen:x}}const Pa={overlayWidth:new va(100,100,58)},La=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=Sa(),i=Ta(),l=K(),g=S(h=>Y(h)),T=()=>{t()},b={vendorDetailView:n??g,onSaveSuccess:()=>{l(ye()),l($e("Not-Started")),s()},onSaveVendor:e,onCancelClick:T,saveVendorDetailLocalData:h=>{l(Te({vendorId:void 0,localData:h}))}};return I.jsx(Ua,{anchor:"right",open:a,PaperProps:{style:{width:Pa.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:T,children:I.jsx(Oa,{onClick:h=>h.stopPropagation(),children:I.jsx(ya,{...b})})})},Oa=ka(Aa)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-Cm6P1Xg9.js";import{j as U,u as w,h as q,l as H,g as L,N as z,k as Q,n as Ae,o as v}from"./core-AMZJGpoV.js";import{eM as R,iL as T,NL as Z,Gm as ue,bp as ie,NM as he,jm as K,JP as W,NN as se,NO as Se,bB as x,Gj as me,NP as ke,NQ as re,NR as Ie,NS as pe,NT as be,NU as ve,NV as de,Hz as Ye,bm as xe}from"./zeni-epic-state-CaufR46d.js";import{D as X,e as B,c2 as ee,y as _,w as te,c as fe,d as J,O as Pe,z as Ee}from"./index-N5K3qQkU.js";import"./mui-5LlzyiP2.js";import{a as A}from"./sentry-CH1ai1xG.js";import{w as ae}from"./withTransactionSidePanel-Bf8LYRg6.js";import{p as ne,b as ce}from"./routePaths-meDm6KLz.js";import{u as Le}from"./utils-DRDD4XTN.js";import{d as E}from"./decodeURIComponentSafe-DNGRwvKs.js";import{Z as je}from"./ZeniAccountStatementScreen-BP58chZP.js";import"./recharts-LaAu_fL4.js";import"./analytics-CgaqSFat.js";import"./plaid-nK_3ZvzH.js";import"./dnd-C4u70dJH.js";import"./stripe-DMRn4zHo.js";import"./lottie-CEe6fZ1i.js";import"./lexical-hn7WhrHW.js";import"./pdf-DzINawGT.js";import"./useAskAiCfoHostNavButtonProps-Du0DR5Lw.js";import"./useFetchSuggestedQuestionsWhenReady-ChhFydzB.js";import"./TransactionDetailScreen-DRrJTiHG.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="41aad414-a039-47a1-9ecf-9b1d5fe63ae5",a._sentryDebugIdIdentifier="sentry-dbid-41aad414-a039-47a1-9ecf-9b1d5fe63ae5")}catch{}})();const G=a=>Le(a),Me=Q(function(a,e){const t=he(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,G(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=X.getLocalizedStrings(),r=G(e.selectedAccount.tranListType),s=Be(t,n,c,r,e.bookCloseDate);B.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(se({uiState:{dateRange:s},type:G(e.selectedAccount.tranListType)})),a(ue(r,T(s),!1,r==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(T(s))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(se({uiState:{scrollYOffset:t},type:G(e.selectedAccount.tranListType)}))}}})(ee),F=ae(function({...a}){const e=U(),t=w(),n=q(),c=t.pathname.substring(t.pathname.lastIndexOf("/")+1),{tenantEmailDomain:o}=H(),r=X.getLocalizedStrings(),{accountType:s,title:u,subTitle:h}=Ce(c),D="month",g=L(p=>R(p)),Y=g.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:y,initialTimeframeTick:S}=ze(c,Y,g.bookCloseDate),[k,j]=A.useState(!1),[M,P]=A.useState(void 0),m=A.useMemo(()=>{const p=T(S);return{tranListType:c,accountType:Z(s),title:u,subTitle:h,timeframe:D,period:p}},[c,D,s,y]);A.useEffect(()=>{if(!k&&m!=null){j(!0),B.trackTransactionList(void 0,void 0,void 0,m.title);const p=G(m.tranListType);n(ue(p,m.period,!0,p==="missingReceipts"?r.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[k,m,n]);let I=m;return m!=null&&M!=null&&(I={...m,period:M}),I==null?i.jsx(z,{to:"../"}):i.jsx(Me,{firstMonthOfFY:Y,tenantEmailDomain:o,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:y,navigate:e,selectedAccount:I,referrerType:c,bookCloseDate:g.bookCloseDate,onSelectedTimePeriodChange:p=>P(p),...a})}),Ce=a=>{let e="",t="",n="";const c=X.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=c.uncategorizedTransactionList.income.title,n=c.uncategorizedTransactionList.income.subTitle;break;case"uncategorized-expense":e="expenses",t=c.uncategorizedTransactionList.expense.title,n=c.uncategorizedTransactionList.expense.subTitle;break;case"miscategorized-expense":e="expenses",t=c.miscategorizedTransactionList.expense.title,n=c.miscategorizedTransactionList.expense.subTitle;break;case"miscategorized-income":e="income",t=c.miscategorizedTransactionList.income.title,n=c.miscategorizedTransactionList.income.subTitle;break;case"missing-receipts":t=c.uncategorizedTransactionList.missingReceipt.title,n=c.uncategorizedTransactionList.missingReceipt.subTitle}return{accountType:e,title:t,subTitle:n}},ze=(a,e,t)=>{const n=ie();let c=ie().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ne(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Be=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Oe=Q(function(a,e){const t=ke(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Te();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),B.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(me(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ee),Fe=ae(function({referrerType:a,...e}){const t=U(),n=w(),c=q(),{tenantEmailDomain:o,accountTypeEncoded:r,accountIdEncoded:s,classIdEncoded:u,timeframe:h,startDate:D,endDate:g,titleEncoded:Y}=H(),y=E(r??""),S=E(s??""),k=E(u??""),j=E(Y??""),M=L(f=>Se(f.transactionListState,S,y,k)),[P,m]=A.useState(!1),[I,p]=A.useState(void 0),N=L(f=>R(f)),$=N.company?.companyInfo.firstMonthOfFY??1;let d;const l=Ge(y,S,k,h,D,g,j);if(l){const f={startDate:x(D,"YYYY-MM-DD"),endDate:x(g,"YYYY-MM-DD")},V=Ne(M?.dateRange,f);d={accountId:S,accountType:Z(y),classId:k,title:j,timeframe:h,period:V}}A.useEffect(()=>{P||d==null||(m(!0),B.trackTransactionList(d.accountId,void 0,a,d.title),c(me(d.accountId,d.accountType,d.classId,d.period)))},[P,d,c]);let C=d;d!=null&&I!=null&&(C={...d,period:I});const O=[r,s,u,h,D,g,Y].filter(f=>f!=null);return l&&C!=null?i.jsx(Oe,{firstMonthOfFY:$,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:C,referrerType:a,onSelectedTimePeriodChange:f=>p(f),...e}):i.jsx(z,{to:Te(O.length)})}),Te=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ge=(a,e,t,n,c,o,r)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&x(c,"YYYY-MM-DD").isValid()&&x(o,"YYYY-MM-DD").isValid()&&r!=null,Ne=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),_e=Q(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ve(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??De();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),B.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=$e(e.tenantEmailDomain),n=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ee),le=ae(function({referrerType:a,...e}){const t=U(),n=w(),c=q(),{tenantEmailDomain:o,accountTypeEncoded:r,accountIdEncoded:s,timeframe:u,startDate:h,endDate:D,titleEncoded:g,excludeSubAccounts:Y}=H(),y=E(r??""),S=E(s??""),k=E(g??""),j=!(Y!=null&&Y==="exclude_subaccounts"),M=L(b=>Ie(b.transactionListState,S,y)),[P,m]=A.useState(!1),[I,p]=A.useState(void 0),N=L(b=>R(b)),$=N.company?.featuresActivationInfo.connectedAccountProvider==="unit",d=N.company?.companyInfo.firstMonthOfFY??1;let l;const C=we(y,S,u,h,D,k);if(C){const b={startDate:x(h,"YYYY-MM-DD"),endDate:x(D,"YYYY-MM-DD")},ye=Re(M?.dateRange,b);l={accountId:S,accountType:Z(y),title:k,timeframe:u,period:ye}}let O=l;l!=null&&I!=null&&(O={...l,period:I});const{useFeatureGate:f}=fe(),{isFeatureEnabled:V}=f(J.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Pe();A.useEffect(()=>{!P&&l!=null&&oe&&(m(!0),B.trackTransactionList(l.accountId,void 0,a,l.title),c(pe(l.accountId,l.accountType,l.period,void 0,!1,j)))},[P,l,c,oe]);const ge=[r,s,u,h,D,g].filter(b=>b!=null);return C&&O!=null?i.jsx(_e,{firstMonthOfFY:d,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:$,isTransactionCommentingEnabled:V,selectedAccount:O,referrerType:a,onSelectedTimePeriodChange:b=>p(b),...e}):i.jsx(z,{to:De(ge.length)})}),De=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},we=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&x(n,"YYYY-MM-DD").isValid()&&x(c,"YYYY-MM-DD").isValid()&&o!=null,Re=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),$e=a=>`/${a}/transactions/${Ye}/statements`;function mt(){const a=w().state?.referrer,e=Ee.getSignedInUser(),t=xe(e),{useFeatureGate:n}=fe(),{isFeatureEnabled:c}=n(J.isExpenseAutomationEnabled),o=L(u=>u.expenseAutomationViewState.selectedPeriodByTenantId)[L(u=>R(u)).tenantId],{isFeatureEnabled:r}=n(J.isExpenseAutomationEnabledV2),s=r||c&&t;return i.jsxs(Ae,{children:[i.jsx(v,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:i.jsx(le,{referrerType:a})}),i.jsx(v,{path:"/zeni-clearing-account/statements",element:i.jsx(je,{})}),i.jsx(v,{path:"/*",element:i.jsx(le,{referrerType:a})}),i.jsx(v,{path:"/uncategorized-income/*",element:i.jsx(F,{})}),i.jsx(v,{path:"/uncategorized-expense/*",element:s?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/miscategorized-income/*",element:i.jsx(F,{})}),i.jsx(v,{path:"/miscategorized-expense/*",element:s?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/missing-receipts/*",element:s?i.jsx(z,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:i.jsx(Fe,{referrerType:a})})]})}export{mt as default};
|
|
1
|
+
import{j as i}from"./liveblocks-it_Rhm8-.js";import{j as U,u as w,h as q,l as H,g as L,N as z,k as Q,n as Ae,o as v}from"./core-BF8mCLAO.js";import{eM as R,iL as T,NL as Z,Gm as ue,bp as ie,NM as he,jm as K,JP as W,NN as se,NO as Se,bB as x,Gj as me,NP as ke,NQ as re,NR as Ie,NS as pe,NT as be,NU as ve,NV as de,Hz as Ye,bm as xe}from"./zeni-epic-state-Ds1G4QGX.js";import{O as X,e as B,c2 as ee,n as _,p as te,s as fe,d as J,I as Pe,z as Ee}from"./index-Drj6C88E.js";import"./mui-B87RTrAV.js";import{a as A}from"./sentry-C-hGmJ4T.js";import{w as ae}from"./withTransactionSidePanel-DTDtCDdY.js";import{p as ne,b as ce}from"./routePaths-Cqx2U__X.js";import{u as Le}from"./utils-C4NhxqJn.js";import{d as E}from"./decodeURIComponentSafe-BogCAdat.js";import{Z as je}from"./ZeniAccountStatementScreen-Dvs4m1EF.js";import"./recharts-BBMAmq_A.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./useAskAiCfoHostNavButtonProps-wDzGPcQn.js";import"./useFetchSuggestedQuestionsWhenReady-D4I-78Sf.js";import"./TransactionDetailScreen-CbyG0n1m.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="a7278bd5-2e34-48ac-aac3-df27679cd1c0",a._sentryDebugIdIdentifier="sentry-dbid-a7278bd5-2e34-48ac-aac3-df27679cd1c0")}catch{}})();const G=a=>Le(a),Me=Q(function(a,e){const t=he(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,G(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=X.getLocalizedStrings(),r=G(e.selectedAccount.tranListType),s=Be(t,n,c,r,e.bookCloseDate);B.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(se({uiState:{dateRange:s},type:G(e.selectedAccount.tranListType)})),a(ue(r,T(s),!1,r==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(T(s))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(se({uiState:{scrollYOffset:t},type:G(e.selectedAccount.tranListType)}))}}})(ee),F=ae(function({...a}){const e=U(),t=w(),n=q(),c=t.pathname.substring(t.pathname.lastIndexOf("/")+1),{tenantEmailDomain:o}=H(),r=X.getLocalizedStrings(),{accountType:s,title:u,subTitle:h}=Ce(c),D="month",g=L(p=>R(p)),Y=g.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:y,initialTimeframeTick:S}=ze(c,Y,g.bookCloseDate),[k,j]=A.useState(!1),[M,P]=A.useState(void 0),m=A.useMemo(()=>{const p=T(S);return{tranListType:c,accountType:Z(s),title:u,subTitle:h,timeframe:D,period:p}},[c,D,s,y]);A.useEffect(()=>{if(!k&&m!=null){j(!0),B.trackTransactionList(void 0,void 0,void 0,m.title);const p=G(m.tranListType);n(ue(p,m.period,!0,p==="missingReceipts"?r.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[k,m,n]);let I=m;return m!=null&&M!=null&&(I={...m,period:M}),I==null?i.jsx(z,{to:"../"}):i.jsx(Me,{firstMonthOfFY:Y,tenantEmailDomain:o,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:y,navigate:e,selectedAccount:I,referrerType:c,bookCloseDate:g.bookCloseDate,onSelectedTimePeriodChange:p=>P(p),...a})}),Ce=a=>{let e="",t="",n="";const c=X.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=c.uncategorizedTransactionList.income.title,n=c.uncategorizedTransactionList.income.subTitle;break;case"uncategorized-expense":e="expenses",t=c.uncategorizedTransactionList.expense.title,n=c.uncategorizedTransactionList.expense.subTitle;break;case"miscategorized-expense":e="expenses",t=c.miscategorizedTransactionList.expense.title,n=c.miscategorizedTransactionList.expense.subTitle;break;case"miscategorized-income":e="income",t=c.miscategorizedTransactionList.income.title,n=c.miscategorizedTransactionList.income.subTitle;break;case"missing-receipts":t=c.uncategorizedTransactionList.missingReceipt.title,n=c.uncategorizedTransactionList.missingReceipt.subTitle}return{accountType:e,title:t,subTitle:n}},ze=(a,e,t)=>{const n=ie();let c=ie().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ne(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Be=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Oe=Q(function(a,e){const t=ke(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Te();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),B.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(me(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ee),Fe=ae(function({referrerType:a,...e}){const t=U(),n=w(),c=q(),{tenantEmailDomain:o,accountTypeEncoded:r,accountIdEncoded:s,classIdEncoded:u,timeframe:h,startDate:D,endDate:g,titleEncoded:Y}=H(),y=E(r??""),S=E(s??""),k=E(u??""),j=E(Y??""),M=L(f=>Se(f.transactionListState,S,y,k)),[P,m]=A.useState(!1),[I,p]=A.useState(void 0),N=L(f=>R(f)),$=N.company?.companyInfo.firstMonthOfFY??1;let d;const l=Ge(y,S,k,h,D,g,j);if(l){const f={startDate:x(D,"YYYY-MM-DD"),endDate:x(g,"YYYY-MM-DD")},V=Ne(M?.dateRange,f);d={accountId:S,accountType:Z(y),classId:k,title:j,timeframe:h,period:V}}A.useEffect(()=>{P||d==null||(m(!0),B.trackTransactionList(d.accountId,void 0,a,d.title),c(me(d.accountId,d.accountType,d.classId,d.period)))},[P,d,c]);let C=d;d!=null&&I!=null&&(C={...d,period:I});const O=[r,s,u,h,D,g,Y].filter(f=>f!=null);return l&&C!=null?i.jsx(Oe,{firstMonthOfFY:$,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:C,referrerType:a,onSelectedTimePeriodChange:f=>p(f),...e}):i.jsx(z,{to:Te(O.length)})}),Te=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ge=(a,e,t,n,c,o,r)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&x(c,"YYYY-MM-DD").isValid()&&x(o,"YYYY-MM-DD").isValid()&&r!=null,Ne=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),_e=Q(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ve(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??De();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),B.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=$e(e.tenantEmailDomain),n=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ee),le=ae(function({referrerType:a,...e}){const t=U(),n=w(),c=q(),{tenantEmailDomain:o,accountTypeEncoded:r,accountIdEncoded:s,timeframe:u,startDate:h,endDate:D,titleEncoded:g,excludeSubAccounts:Y}=H(),y=E(r??""),S=E(s??""),k=E(g??""),j=!(Y!=null&&Y==="exclude_subaccounts"),M=L(b=>Ie(b.transactionListState,S,y)),[P,m]=A.useState(!1),[I,p]=A.useState(void 0),N=L(b=>R(b)),$=N.company?.featuresActivationInfo.connectedAccountProvider==="unit",d=N.company?.companyInfo.firstMonthOfFY??1;let l;const C=we(y,S,u,h,D,k);if(C){const b={startDate:x(h,"YYYY-MM-DD"),endDate:x(D,"YYYY-MM-DD")},ye=Re(M?.dateRange,b);l={accountId:S,accountType:Z(y),title:k,timeframe:u,period:ye}}let O=l;l!=null&&I!=null&&(O={...l,period:I});const{useFeatureGate:f}=fe(),{isFeatureEnabled:V}=f(J.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Pe();A.useEffect(()=>{!P&&l!=null&&oe&&(m(!0),B.trackTransactionList(l.accountId,void 0,a,l.title),c(pe(l.accountId,l.accountType,l.period,void 0,!1,j)))},[P,l,c,oe]);const ge=[r,s,u,h,D,g].filter(b=>b!=null);return C&&O!=null?i.jsx(_e,{firstMonthOfFY:d,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:$,isTransactionCommentingEnabled:V,selectedAccount:O,referrerType:a,onSelectedTimePeriodChange:b=>p(b),...e}):i.jsx(z,{to:De(ge.length)})}),De=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},we=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&x(n,"YYYY-MM-DD").isValid()&&x(c,"YYYY-MM-DD").isValid()&&o!=null,Re=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),$e=a=>`/${a}/transactions/${Ye}/statements`;function mt(){const a=w().state?.referrer,e=Ee.getSignedInUser(),t=xe(e),{useFeatureGate:n}=fe(),{isFeatureEnabled:c}=n(J.isExpenseAutomationEnabled),o=L(u=>u.expenseAutomationViewState.selectedPeriodByTenantId)[L(u=>R(u)).tenantId],{isFeatureEnabled:r}=n(J.isExpenseAutomationEnabledV2),s=r||c&&t;return i.jsxs(Ae,{children:[i.jsx(v,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:i.jsx(le,{referrerType:a})}),i.jsx(v,{path:"/zeni-clearing-account/statements",element:i.jsx(je,{})}),i.jsx(v,{path:"/*",element:i.jsx(le,{referrerType:a})}),i.jsx(v,{path:"/uncategorized-income/*",element:i.jsx(F,{})}),i.jsx(v,{path:"/uncategorized-expense/*",element:s?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/miscategorized-income/*",element:i.jsx(F,{})}),i.jsx(v,{path:"/miscategorized-expense/*",element:s?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/missing-receipts/*",element:s?i.jsx(z,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:i.jsx(Fe,{referrerType:a})})]})}export{mt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-
|
|
1
|
+
import{j as e}from"./liveblocks-it_Rhm8-.js";import{j as B,u as M,h as U,l as O,g as f,N as L,k as N,n as Ce,o as k}from"./core-BF8mCLAO.js";import{ci as V,eM as D,Mx as P,D2 as ae,fb as H,CM as ne,Mz as we,D5 as Te,Mv as ke,Mw as se,MN as be,Bc as je,s1 as Ae,MB as Ee,Dg as ve,My as re,cL as K,w7 as oe,eQ as De,eS as Fe,NI as Le,NJ as Be,CN as Me,NK as Ue,CO as Pe,CX as Re,bu as Oe,bC as Ne,ct as Ve,bD as _e,cN as ze,fa as $e,br as Ge,If as Ze,ch as He}from"./zeni-epic-state-Ds1G4QGX.js";import{S as _,al as Ke,z as A,v as z,e as b,bX as We,bY as Je,bZ as Z,K as W,h as Xe,I as qe,H as Qe,s as ie,d as v,A as Ye,r as et,b_ as tt,ao as J,n as at,b$ as nt,p as X,c0 as st,w as Q,c1 as rt,a4 as ot}from"./index-Drj6C88E.js";import{D as it,n as R,S as ct}from"./mui-B87RTrAV.js";import lt from"./NotFoundScreen-DZbU-KCv.js";import{S as Y}from"./SetupPagesScreen-BcfdYSeZ.js";import{a as d}from"./sentry-C-hGmJ4T.js";import{u as ut}from"./useAskAiCfoHostNavButtonProps-wDzGPcQn.js";import{c as dt}from"./useFetchSuggestedQuestionsWhenReady-D4I-78Sf.js";import{M as ce}from"./MobileAppDrawer-CwjUL5yD.js";import{F as pt}from"./FeaturePreviewScreen-Bd18oGQj.js";import{a as ee}from"./analyticsHelper-BlP3gsal.js";import"./recharts-BBMAmq_A.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./utils-C4NhxqJn.js";import"./routePaths-Cqx2U__X.js";import"./BusinessVerificationPageScreen-CktedTYt.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]="2561e27d-a375-4a59-af61-e18e5dcf4025",t._sentryDebugIdIdentifier="sentry-dbid-2561e27d-a375-4a59-af61-e18e5dcf4025")}catch{}})();const mt=N(function(t,a){const{companyId:n}=a;return{treasurySetupView:P(t,n),analytics:b}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Te(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}})(We);function ft(){const t=B(),a=M(),n=U(),{tenantEmailDomain:o}=O(),p=_(),r=f(T=>T.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=Ke(r),s=V(p?.loggedInUserRoleMap),[c,i]=d.useState(!1),[y,w]=d.useState(!1),[u,l]=d.useState(!1),g=f(T=>D(T)),h=A.getSignedInUserTenant(o)?.companyId??g.companyId,I=A.getSignedInUser(),S=f(T=>P(T,h)),C=f(T=>T.treasurySetupViewState.fetchState),x=f(T=>T.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(T=>T.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(I==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{c||C!=="Not-Started"||h==null||(i(!0),n(ae(h,!0,!1)))},[c,C,h,n]),d.useEffect(()=>{u||F!=="Not-Started"||h==null||(l(!0),n(H()))},[u,F,h,n]),d.useEffect(()=>{y||x!=="Not-Started"||h==null||(w(!0),n(ne()))},[y,x,h,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(L,{to:"../promo"});const E=g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||C!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(mt,{navigate:t,location:a,companyId:h,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:b})]})}const yt=N(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:be(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:P(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{Z(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{Z(a.analytics,"confirm",r,m,"Transfer"),t(ve())},onSaveChangesToLocalStore:s=>{t(Ee(s))},onFetchLinkTokenClick:s=>{t(Ae("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Je),gt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=O(),o=U(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[c,i]=d.useState(!1),[y,w]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),l=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),g=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),h=f(x=>D(x)),I=A.getSignedInUserTenant(n)?.companyId??h.companyId,S=f(x=>ke(x)),C=f(x=>P(x,I));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||I==null||(s(!0),o(ae(I,!0,!1)))},[m,u,I,o]),d.useEffect(()=>{c||l!=="Not-Started"||I==null||(i(!0),o(H()))},[c,l,I,o]),d.useEffect(()=>{y||g!=="Not-Started"||I==null||(w(!0),o(ne()))},[y,g,I,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(yt,{analytics:b,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:h,treasurySetupView:C,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{Z(b,"review",S.treasuryTransferMoneyLocalData,C.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},ht=R.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,11 +6,11 @@ import{j as e}from"./liveblocks-Cm6P1Xg9.js";import{j as B,u as M,h as U,l as R,
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${t=>t.theme.colors.grey4};
|
|
9
|
-
`,St={overlayWidth:new Ye(100,100,48)},xt=N(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:P(t,o),downloadEndPoint:`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:o,location:p,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:c=>{let i="page-not-found";c==="editPortfolio"?i=
|
|
9
|
+
`,St={overlayWidth:new Ye(100,100,48)},xt=N(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:P(t,o),downloadEndPoint:`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:o,location:p,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:c=>{let i="page-not-found";c==="editPortfolio"?i=It(s):c==="statements"?i=Ct(s):c==="taxLetter"?i=wt(s):c==="settings"&&(i=Tt(s));const y=at(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:y}})},onColumnSortConfigChanged:(c,i)=>{t(Le({uiState:{sortKey:c,sortOrder:i}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}})(tt);function G({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=M(),o=B(),p=U(),r=W(),m=Xe(),s=f(j=>D(j)),{tenantEmailDomain:c}=O(),i=s.companyId??A.getSignedInUserTenant(c)?.companyId,[y,w]=d.useState(!1),u=f(j=>re(j)),l=u.fetchState,g=u.accountSummary?.totalBalance?.amount,h=f(j=>j.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),I=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),C=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=V(S?.loggedInUserRoleMap),F=K(S?.loggedInUserRoleMap),{areTenantIdsInSync:E}=qe();d.useEffect(()=>{l==="Not-Started"&&!y&&E&&(w(!0),p(oe(!0)))},[y,p,l,E]),d.useEffect(()=>{u.transactionsFetchState.fetchState==="Completed"&&u.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[u.transactionsFetchState.fetchState,u.transactions.length]);const T=()=>{o("..")},[le,ue]=d.useState(!1),q=j=>{ue(j)},{isAiCfoOpen:de,setIsAiCfoOpen:pe}=Qe(),{isAiCfoAccessEnabled:me,onAskAiCfoClick:fe}=ut({isAiCfoOpen:de,setIsAiCfoOpen:pe,mobileExploreReferrer:"Treasury"});dt({isDataReady:l==="Completed"});const{useFeatureGate:$}=ie(),{isFeatureEnabled:ye}=$(v.isDebitCardFeatureEnabled),{isFeatureEnabled:ge}=$(v.isAutoTransferRuleEnabled),{isFeatureEnabled:he}=$(v.isTreasuryCommentingEnabled),Se=De(s),xe=Fe(ye,s);if(Se===!0&&xe!==!0)return e.jsx(pt,{});if(I){const j=h?.fetchState!=="Completed"||u.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[u.accountSummaryFetchState.fetchState==="Completed"&&h?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:b,onLoad:()=>{}}):null,e.jsx(it,{onClose:T,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:St.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(kt,{onClick:Ie=>Ie.stopPropagation(),children:[t===!0?e.jsx(gt,{isFirstTransfer:u.transactions.length===0||g===0}):null,a===!0?e.jsx(ft,{}):null]})}),e.jsxs(ht,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:q}),e.jsx(xt,{treasuryDetailsView:u,isAutoTransferRuleEnabled:ge,navigate:o,currentTenant:s,location:n,companyId:i,analytics:b,isTreasuryCommentingEnabled:he,handleDrawerToggle:q,isLoading:j,isAiCfoAccessEnabled:me,onAskAiCfoClick:fe})]})]})}return C&&x?e.jsx(L,{to:"../setup"}):s.companyTreasuryInfo?.info&&!C&&F?e.jsx(L,{to:"../promo",state:n.state}):e.jsx(et,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const It=t=>`/${t}/treasury/edit-portfolio`,Ct=t=>`/${t}/treasury/statements`,wt=t=>`/${t}/treasury/tax-letter`,Tt=t=>`/${t}/treasury/setup`,kt=R(ct)`
|
|
10
10
|
display: flex;
|
|
11
11
|
min-height: 100%;
|
|
12
12
|
flex-direction: column;
|
|
13
|
-
`,bt=
|
|
13
|
+
`,bt=R.div`
|
|
14
14
|
display: flex;
|
|
15
15
|
height: 100vh;
|
|
16
16
|
width: 100%;
|
|
@@ -18,7 +18,7 @@ import{j as e}from"./liveblocks-Cm6P1Xg9.js";import{j as B,u as M,h as U,l as R,
|
|
|
18
18
|
flex-direction: column;
|
|
19
19
|
align-items: center;
|
|
20
20
|
background-color: ${t=>t.theme.colors.grey4};
|
|
21
|
-
`;function jt(){const t=B(),a=U(),n=
|
|
21
|
+
`;function jt(){const t=B(),a=U(),n=W(),o=M(),p=`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Be(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Me(!1)))},[r,s.fetchState,a]);const c=A.getSignedInUser(),i=f(l=>D(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},w=i.company?.companyInfo.companyLegalName??i.companyName;if(c==null)throw Error("Can't access statements page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(bt,{windowSize:n,children:e.jsx(nt,{currentTenantCompanyName:w,statementListView:s,isLoading:u,onBackClick:()=>{const l=X(o.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const At=R.div`
|
|
22
22
|
display: flex;
|
|
23
23
|
height: 100vh;
|
|
24
24
|
width: 100%;
|
|
@@ -26,7 +26,7 @@ import{j as e}from"./liveblocks-Cm6P1Xg9.js";import{j as B,u as M,h as U,l as R,
|
|
|
26
26
|
flex-direction: column;
|
|
27
27
|
align-items: center;
|
|
28
28
|
background-color: ${t=>t.theme.colors.grey4};
|
|
29
|
-
`;function Et(){const t=B(),a=
|
|
29
|
+
`;function Et(){const t=B(),a=W(),n=M(),o=U(),p=`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Ue(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Pe(!1)))},[r,s.fetchState,o]);const c=A.getSignedInUser(),i=f(l=>D(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},w=i.company?.companyInfo.companyLegalName??i.companyName;if(c==null)throw Error("Can't access tax letter page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(At,{windowSize:a,children:e.jsx(st,{currentTenantCompanyName:w,taxLetterListView:s,isLoading:u,onBackClick:()=>{const l=X(n.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const vt=N(function(t,a){const{companyId:n}=a,o=P(t,n);return{treasurySetupView:o,isSetupComplete:o.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk",meetingUrl:"https://meetings.hubspot.com/yoshi-araki/treasury-product-schedule-demo-link?embed=true"}},function(t,a){const{navigate:n,companyId:o}=a;return{onSetupButtonClick:()=>{t(Re(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(rt),Dt=()=>{const t=B(),a=M(),n=U(),{tenantEmailDomain:o}=O(),[p,r]=d.useState(!1),m=f(S=>D(S)),[s,c]=d.useState(!1),i=f(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);d.useEffect(()=>{s||i?.fetchState!=="Not-Started"||y==null||(c(!0),n(H()))},[i,n]);const y=A.getSignedInUserTenant(o)?.companyId??m.companyId,w=A.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,l=S=>{r(S)};if(w==null)throw Error("Can't access treasury promo page without signing in...");const g=_(),h=V(g?.loggedInUserRoleMap),I=K(g?.loggedInUserRoleMap);if(u&&h)return e.jsx(L,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&h||I)){if(a.state?.message==="activation"){const S=X(a.state?.pathnameStackToGoBack);t(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:S.newStack}})}return i?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(Q,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:S=>(C=>C.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:l}),e.jsx(vt,{analytics:b,navigate:t,companyId:y,onClickMenuIcon:()=>{l(!0)}})]})}return e.jsx(te,{children:e.jsx(Q,{size:"ExtraLarge",start:!0})})},te=R.div`
|
|
30
30
|
display: flex;
|
|
31
31
|
width: 100%;
|
|
32
32
|
height: 100%;
|
|
@@ -34,4 +34,4 @@ import{j as e}from"./liveblocks-Cm6P1Xg9.js";import{j as B,u as M,h as U,l as R,
|
|
|
34
34
|
justify-content: center;
|
|
35
35
|
align-items: center;
|
|
36
36
|
background-color: ${t=>t.theme.colors.grey5};
|
|
37
|
-
`;function ta(){const t=M(),a=f(E=>D(E)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(v.isTreasuryEnabled),p=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=
|
|
37
|
+
`;function ta(){const t=M(),a=f(E=>D(E)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(v.isTreasuryEnabled),p=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=K(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Oe(a?.userRole),c=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Ne(r?.loggedInUserRoleMap),i=Ve(r?.loggedInUserRoleMap),y=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&_e(r?.loggedInUserRoleMap),{isFeatureEnabled:w}=n(v.isDepositAccountsFeatureEnabled),u=w&&!s&&ze(r?.loggedInUserRoleMap),l=a.company!=null&&$e(a.company),g=o&&l===!0&&!s&&V(r?.loggedInUserRoleMap),{isFeatureEnabled:h}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:I}=n(v.isDebitCardFeatureEnabled),S=ot(a,h,I)&&!s&&Ge(r?.loggedInUserRoleMap),C=Ze(r?.loggedInUserRoleMap),x=He(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(Ce,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:C,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:C,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(Dt,{})}),e.jsx(k,{path:"statements",element:e.jsx(jt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(Et,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx(G,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),g?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx(G,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx(G,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(lt,{})})]}):p&&g?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{ta as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-
|
|
1
|
+
import{j as l}from"./liveblocks-it_Rhm8-.js";import{a as g}from"./sentry-C-hGmJ4T.js";import{j as M,u as q,l as J,g as S,k as G,h as Y,n as nt,o as B,N as K}from"./core-BF8mCLAO.js";import{eM as O,Jd as Ee,Je as Ue,fK as ee,co as be,cp as ke,uI as ft,Jf as st,uM as Yt,Hq as te,jm as ae,uG as qt,uA as Ht,Jg as Ne,us as Qt,ur as Wt,ul as Zt,ux as Xt,uN as ea,Jh as pe,Ji as Me,ut as ta,Jj as he,eX as gt,v0 as vt,uV as xt,Jk as Tt,nO as Ct,uQ as yt,uO as Dt,Jl as It,v7 as Et,v4 as bt,uR as kt,v6 as Ge,FS as wt,Jm as aa,Jn as na,cr as sa,Jo as oa,Jp as la,Jq as me,Jr as ce,Js as we,Hr as $e,vm as ye,Hp as De,v9 as At,uJ as Ke,Jt as ia,Hs as Q,Ju as ze,uD as ca,Jv as da,Jw as ra,Jx as Ye,Jy as qe,Jz as He,JA as Qe,vg as Ae,JB as jt,uZ as Ft,JC as ua,JD as pa,JE as ha,JF as ma,JG as Sa,JH as fa,JI as ga,JJ as va,sd as xa,se as Ta,Gw as Fe,JK as Ca,JL as ya,iL as Pe,bp as Da,JM as Ia,JN as Ea,kk as ba,kt as ka,Gv as _e,bB as ot,JO as Pt,Gb as _t,JP as wa,JQ as Aa,JR as ja,kv as Fa,JS as lt,JT as it,JU as ct,JV as dt,JW as Pa,kr as _a,JX as Va,ku as La,JY as Oa,JZ as Vt,GS as Lt,jK as Ba,J_ as Ja,J$ as Ve,K0 as Ot,GQ as Bt,xz as Ra,K1 as Ua,K2 as Na,k2 as Jt,K3 as Ma,K4 as Ga,H2 as $a,pV as Ka,K5 as Rt,K6 as rt,G$ as Le,K7 as ut,K8 as za,H4 as Ya,K9 as qa,Ka as Ha,Kb as Qa,Kc as Wa,Kd as Za,pY as Xa,Ke as en,Ht as tn,Kf as an,GJ as Oe,gt as nn,Kg as sn,Kh as on,gr as ln,Ki as cn,Kj as dn,xD as rn,Kk as un,Kl as pn,Km as hn,Kn as mn,jO as Sn,bm as fn,eS as gn,eQ as vn}from"./zeni-epic-state-Ds1G4QGX.js";import{z as R,al as Be,r as Ut,v as Z,e as P,Q as X,ar as xn,n as N,O as Ie,q as de,as as We,at as Tn,au as Cn,p as Ze,av as yn,h as Dn,K as re,A as Xe,s as ne,d as z,aw as In,j as et,H as Se,ax as En,ay as Nt,I as bn,az as kn,S as wn,aA as An,ao as Mt,aB as jn,o as W,x as Fn,E as Gt,F as Pn,aC as _n,aD as Vn,g as tt,aE as Ln,aF as On,k as Bn,aG as Jn,aH as Rn}from"./index-Drj6C88E.js";import{n as U,D as Un,S as $t}from"./mui-B87RTrAV.js";import{t as Nn,A as Mn}from"./AddressScreen-BQPPe7pR.js";import ie from"./NotFoundScreen-DZbU-KCv.js";import{F as Gn}from"./FeaturePreviewScreen-Bd18oGQj.js";import{b as H,v as at,c as $n}from"./routePaths-Cqx2U__X.js";import{p as Kt}from"./pathToGoBack-_pwiC6EH.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-wDzGPcQn.js";import{c as ge}from"./useFetchSuggestedQuestionsWhenReady-D4I-78Sf.js";import{M as ve}from"./MobileAppDrawer-CwjUL5yD.js";import{D as Kn}from"./DrawerScreen-HBFMcVvk.js";import{g as zn,m as Yn}from"./accountMappingHelper-DpblOBXy.js";import"./recharts-BBMAmq_A.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./utils-C4NhxqJn.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]="cc3b689f-63d8-483d-88c0-31fbbf1a98dc",e._sentryDebugIdIdentifier="sentry-dbid-cc3b689f-63d8-483d-88c0-31fbbf1a98dc")}catch{}})();const qn=Ie.getLocalizedStrings(),Hn=G(function(e,a){const s=Ue(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(st({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(st({selectedTransaction:void 0})),e(Yt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${H(n,a.tenantEmailDomain)}`,c=N(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(ft(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(xn),Qn=({setShouldNavigateBack:e})=>{const a=M(),s=q(),{scheduleDetailId:t,tenantEmailDomain:n}=J(),{scheduleType:o}=J();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>O(f)),d=Ee(o)??"accrued_expenses",u=R.getSignedInUser();if(u==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Ue(f,d)),m=i.selectedJELinkRowIndex,r=S(f=>ee(f,c.companyId)),p=Be(i.updateStatus.fetchState);g.useEffect(()=>{p==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[p,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const h=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Ut,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[h===!0?l.jsx(Z,{analytics:P,onLoad:()=>{Wn(i,d,r)}}):null,l.jsx(Hn,{signedInUser:u,attachmentEndPoint:`${X}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:d,navigate:a,analytics:P,controllerUserDetails:r,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},zt=e=>{const a=qn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Wn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,d=c.some(m=>m.isRecommendedTransaction===!0),u=be(s.controllers),i=ke(s.controllerUserIds);t!=null&&P.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...zt(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:d,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:u,controllerUserIds:i})},Zn=U.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{j as o}from"./liveblocks-it_Rhm8-.js";import{a as f}from"./sentry-C-hGmJ4T.js";import{q as u,h,g as b,N as y}from"./core-BF8mCLAO.js";import{Iz as I,eN as w,yU as x}from"./zeni-epic-state-Ds1G4QGX.js";import{z as l,r as j,E as S,F as E}from"./index-Drj6C88E.js";import{n as g}from"./mui-B87RTrAV.js";import"./recharts-BBMAmq_A.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./utils-C4NhxqJn.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]="e7df6eb0-ae5a-4fbb-9e98-b3e125501aa8",e._sentryDebugIdIdentifier="sentry-dbid-e7df6eb0-ae5a-4fbb-9e98-b3e125501aa8")}catch{}})();const B=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[n,m]=f.useState(!1),a=h(),i=b(c=>I(c)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(y,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(m(!0),a(x(t,p,s)))},[n,a]),i.fetchState==="Error"?o.jsx(D,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},D=g.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100vh;
|
|
5
|
+
flex-direction: row;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: ${e=>e.theme.colors.grey5};
|
|
9
|
+
`,_=g(E.LargeRegular)`
|
|
10
|
+
display: flex;
|
|
11
|
+
color: ${S.important};
|
|
12
|
+
`;export{B as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-
|
|
1
|
+
import{j as n}from"./liveblocks-it_Rhm8-.js";import{j as W,u as Y,h as U,l as Z,g as k,k as J,N as te,n as _e,o as x}from"./core-BF8mCLAO.js";import{eM as M,Nn as Ve,No as $e,cN as ae,ci as He,fa as Ze,w5 as Ge,Ai as We,v$ as Pn,Np as Tn,Nq as On,w2 as Bn,w9 as xe,vY as Fn,vV as Rn,Ma as ue,Nr as Ln,DC as Un,Jg as Mn,DE as zn,k3 as Oe,Ns as Nn,pA as Ye,po as Je,jW as Qe,jZ as Be,Jh as Fe,Ji as _n,Nt as Vn,jY as $n,kj as Hn,jN as Zn,ij as Gn,ii as Wn,Nu as Yn,Nv as Ae,Dj as Jn,Nw as Qn,Nx as Kn,M3 as we,Ny as Re,Nz as qn,DP as Xn,MN as et,Bc as Ke,s1 as qe,NA as nt,DM as tt,NB as Xe,cJ as De,DT as en,fb as at,eQ as nn,eS as Ie,DR as ot,B6 as st,DJ as it,NC as tn,ND as an,Dl as on,Dv as Le,NE as rt,Dp as ct,NF as lt,MC as dt,DU as ut,bu as pt,bC as mt,ct as ht,bD as ft,br as gt,If as yt}from"./zeni-epic-state-Ds1G4QGX.js";import{S as oe,s as $,z as w,d as E,h as R,r as se,bL as Ct,Q as Se,K as V,A as Q,p as sn,al as xt,aa as Ue,e as F,bM as At,ao as be,bN as kt,v as pe,bO as wt,g as ve,aI as G,bP as Dt,I as It,H as rn,a7 as St,bQ as Me,bR as bt,n as ne,bS as vt,bT as jt,bU as Et,bV as Pt,a4 as Tt,o as Ot}from"./index-Drj6C88E.js";import{n as L,D as K,S as q}from"./mui-B87RTrAV.js";import de from"./NotFoundScreen-DZbU-KCv.js";import{S as ze}from"./SetupPagesScreen-BcfdYSeZ.js";import{F as cn}from"./FeaturePreviewScreen-Bd18oGQj.js";import{a as p}from"./sentry-C-hGmJ4T.js";import{M as me}from"./MobileAppDrawer-CwjUL5yD.js";import{A as Bt,D as Ft,V as Rt}from"./DomesticWireDetailScreen-eW-I-lqX.js";import{A as Lt}from"./AddressScreen-BQPPe7pR.js";import{u as ln}from"./useAskAiCfoHostNavButtonProps-wDzGPcQn.js";import{c as dn}from"./useFetchSuggestedQuestionsWhenReady-D4I-78Sf.js";import{Z as Ut}from"./ZeniAccountStatementScreen-Dvs4m1EF.js";import"./recharts-BBMAmq_A.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./utils-C4NhxqJn.js";import"./analyticsHelper-BlP3gsal.js";import"./routePaths-Cqx2U__X.js";import"./BusinessVerificationPageScreen-CktedTYt.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]="042057af-7264-441b-8d58-efbeeb39450c",e._sentryDebugIdIdentifier="sentry-dbid-042057af-7264-441b-8d58-efbeeb39450c")}catch{}})();const Mt=L.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,15 +6,15 @@ import{j as n}from"./liveblocks-Cm6P1Xg9.js";import{j as W,u as Y,h as U,l as G,
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,zt=J(function(e){return{autoTransferRuleView:Ve(e),downloadAccountDetailEndPoint:`${
|
|
9
|
+
`,zt=J(function(e){return{autoTransferRuleView:Ve(e),downloadAccountDetailEndPoint:`${Se}/account_details`,transferLimit:5e5,depositAccountListView:We(e.depositAccountState,e.depositAccountListState)}},function(e,t){const{navigate:s,handleDrawerToggle:a}=t;return{onBackClick:()=>{s("..")},onClickMenuIcon:()=>{a(!0)},onFetchAutoTransferRules:o=>{e(Ge(o))},onCreateRule:()=>{e(Rn())},onUpdateRule:o=>{e(xe(o))},onDeleteClick:o=>{e(Fn(o))},onPauseClick:o=>{e(xe(o,!0,!1))},onResumeClick:o=>{e(xe(o,!1,!0))},onActivityClick:(o,i)=>{e(Bn(o,i))},onUpdateRuleLocalData:o=>{e(On(o))},clearRuleLocalData:()=>{e(Tn())},onEditClick:o=>{s(`./${o}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{e(Pn())}}})(Ct);function Ne({isEditDrawerOpen:e}){const t=W(),s=Y(),a=U(),o=oe(),{ruleId:i,tenantEmailDomain:l}=Z(),{useFeatureGate:c}=$(),[d,m]=p.useState(!1),[C,r]=p.useState(!1),u=k(A=>M(A)),f=k(A=>Ve(A)),h=f?.fetchState??"Not-Started",S=k(A=>$e(A)),g=u?.companyId??w.getSignedInUserTenant(l)?.companyId,b=ae(o?.loggedInUserRoleMap)||He(o?.loggedInUserRoleMap),{isFeatureEnabled:D}=c(E.isTreasuryEnabled),y=u?.company!=null&&Ze(u.company),I=D&&y,P=w.getSignedInUser(),T=u.tenantId,O={userId:P?.userId??"",sessionId:P?.zeniSessionId??"",tenantId:T??""};p.useEffect(()=>{!C&&h==="Not-Started"&&g&&(r(!0),a(Ge(!0)))},[C,h,g,a]);const v=A=>{m(A)},B=R();return f?.fetchState!=="Completed"?n.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:B.colors.grey5}}):n.jsxs(Mt,{children:[n.jsx(me,{isAppContentDrawerOpen:d,handleDrawerToggle:v}),n.jsx(zt,{navigate:t,location:s,currentTenant:u,handleDrawerToggle:v,isEditDrawerOpen:e,editingRuleId:i,authParams:O,includeTreasuryOption:I,hasAdminLevelAccess:b,zeniAccountsConfigDetail:S})]})}const Nt={overlayWidth:new Q(100,100,58)},_t=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const a=U(),o=R(),i=V();if(w.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(K,{onClose:()=>{s(!0),a(ue())},anchor:"right",open:t,PaperProps:{style:{width:Nt.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Vt,{onClick:l=>l.stopPropagation(),children:n.jsx(Bt,{vendorIdParam:e,accountContext:"express-pay"})})})},Vt=L(q)`
|
|
10
10
|
display: flex;
|
|
11
11
|
min-height: 100%;
|
|
12
12
|
flex-direction: column;
|
|
13
|
-
`,$t={overlayWidth:new
|
|
13
|
+
`,$t={overlayWidth:new Q(100,100,58)},Ht=({isDrawerOpen:e,closeDrawerHandler:t})=>{const s=U(),a=R(),o=V();if(w.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(K,{onClose:()=>{t(!0),s(ue())},anchor:"right",open:e,PaperProps:{style:{width:$t.overlayWidth.valuePercentage(o),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Zt,{onClick:i=>i.stopPropagation(),children:n.jsx(Lt,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Zt=L(q)`
|
|
14
14
|
display: flex;
|
|
15
15
|
min-height: 100%;
|
|
16
16
|
flex-direction: column;
|
|
17
|
-
`,
|
|
17
|
+
`,Gt={overlayWidth:new Q(100,100,58)},Wt=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const a=U(),o=R(),i=V();if(w.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(K,{onClose:()=>{s(!0),a(ue())},anchor:"right",open:t,PaperProps:{style:{width:Gt.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Yt,{onClick:l=>l.stopPropagation(),children:n.jsx(Ft,{vendorIdParam:e,accountContext:"express-pay"})})})},Yt=L(q)`
|
|
18
18
|
display: flex;
|
|
19
19
|
min-height: 100%;
|
|
20
20
|
flex-direction: column;
|
|
@@ -26,15 +26,15 @@ import{j as n}from"./liveblocks-Cm6P1Xg9.js";import{j as W,u as Y,h as U,l as G,
|
|
|
26
26
|
flex-direction: column;
|
|
27
27
|
align-items: center;
|
|
28
28
|
background-color: ${e=>e.theme.colors.grey4};
|
|
29
|
-
`,
|
|
29
|
+
`,Qt=J(function(e,t){const s=M(e),a=w.getSignedInUser(),o=s.tenantId,i={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},l=t.expressPayDetails,c=e.entityAutoCompleteState.autoCompleteText.common,d=Mn(e,"common");return{expressPayDetails:l,fileProps:{authParams:i,filesEndPoint:`${be.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:d},analytics:t.analytics}},function(e,t){const{navigate:s}=t;return{onSaveVendor:a=>{e(Wn(a,void 0,void 0,!0))},saveVendorDetailLocalData:(a,o)=>{e(Be({vendorId:o,localData:a}))},saveExpressPayLocalData:a=>{e(Gn({localData:a}))},onVendorSelected:a=>{a!=null&&e(Zn(a,!1))},updateSelectedVendorForCreate:a=>{e(Hn(a))},initializeVendorAddress:()=>{e($n())},resetVendorSaveStatus:a=>{e(Vn({vendorId:a}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(a,o)=>{a.trim().length>=2?e(_n({searchString:a,entityType:o,searchOrigin:"common"})):a.trim().length===0&&e(Fe("common"))},onCancelAutoComplete:()=>{e(Fe("common"))}},chooseNewVendor:a=>{e(Be({localData:{vendorName:a}}))},onClickAddAccount:a=>{a.method.toLowerCase().indexOf("ach")!==-1?s("./add-ach",{relative:"path"}):a.method.toLowerCase().indexOf("wire")!==-1&&a.method.toLowerCase().indexOf("domestic")!==-1&&s("./add-wire",{relative:"path"})},updateFilesEntity:a=>{e(Qe({files:a}))},onDeleteFile:a=>{e(Je(a))},onEditFileName:(a,o)=>{e(Ye(a,o.split(".")[0]))},onBackClick:a=>{a!=null&&e(Oe(a)),e(Oe()),e(Nn()),e(ue()),s("../",{relative:"path"})},onSchedulePayment:()=>{e(zn())}}})(At);function ce({isAddACHDrawerOpen:e,isAddWireDrawerOpen:t,isAddAddressDrawerOpen:s}){const a=W(),o=Y(),i=U(),[l,c]=p.useState(!1),{tenantEmailDomain:d}=Z(),m=oe(),C=R(),r=k(j=>j.expressPayState.fetchState),u=k(j=>M(j)),f=k(j=>Ln(j)),h=f.expressPayLocalData?.vendorId,S=u.companyId??w.getSignedInUserTenant(d)?.companyId,[g,b]=p.useState(!1),[D,y]=p.useState(!1),[I,P]=p.useState(!1),T=sn(o.state?.pathnameStackToGoBack),{poppedPathname:O}=T,v=O?.split("/"),B=v?.[v.length-1];p.useEffect(()=>{e===!0?b(!0):(b(!1),document.body.style.overflow="auto")},[e]),p.useEffect(()=>{t===!0?y(!0):(y(!1),document.body.style.overflow="auto")},[t]),p.useEffect(()=>{s===!0?P(!0):(P(!1),document.body.style.overflow="auto")},[s]),p.useEffect(()=>{r==="Not-Started"&&i(Un(!0,!0))},[r,i]);const A=xt(f.vendorViewDetails.bankAccountCreationState?.fetchState);if(p.useEffect(()=>{A==="In-Progress"&&f.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&N()},[A,f.vendorViewDetails.bankAccountCreationState?.fetchState]),w.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const z=j=>{c(j)},N=()=>{b(!1),y(!1),a("../",{relative:"path"})};return f.fetchState==="Completed"?n.jsxs(Jt,{children:[Ue(o)?n.jsx(me,{isAppContentDrawerOpen:l,handleDrawerToggle:z}):null,g===!0?n.jsx(_t,{vendorId:h,closeDrawerHandler:N,isDrawerOpen:g}):null,D===!0?n.jsx(Wt,{vendorId:h,closeDrawerHandler:N,isDrawerOpen:D}):null,I===!0?n.jsx(Ht,{closeDrawerHandler:N,isDrawerOpen:I}):null,n.jsx(Rt,{vendorId:h,isExpressPayPage:!0}),n.jsx(Qt,{navigate:a,location:o,companyId:S,accountId:B,analytics:F,currentTenant:u,vendorId:h,roleMap:m?.loggedInUserRoleMap,isSettings:Ue(o),expressPayDetails:f,onClickMenuIcon:()=>{z(!0)}})]}):n.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:C.colors.grey5}})}const Kt={overlayWidth:new Q(100,100,58)},qt=({authParams:e,downloadAccountDetailEndPoint:t,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:a,closeDrawerHandler:o})=>{const i=R(),l=V(),c=k(r=>$e(r)),d=k(r=>M(r));if(w.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const m=()=>{o(!0)},C={depositAccount:a,onDismissClick:m,zeniAccountsConfigDetail:c,authParams:e,downloadAccountDetailEndPoint:t,currentTenant:d};return n.jsx(K,{anchor:"right",open:s,PaperProps:{style:{width:Kt.overlayWidth.valuePercentage(l),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>m(),children:n.jsx(Xt,{onClick:r=>r.stopPropagation(),children:n.jsx(kt,{...C})})})},Xt=L(q)`
|
|
30
30
|
display: flex;
|
|
31
31
|
min-height: 100%;
|
|
32
32
|
flex-direction: column;
|
|
33
|
-
`,ea={overlayWidth:new
|
|
33
|
+
`,ea={overlayWidth:new Q(100,100,58)},un=({isCheckDepositDrawerOpen:e,closeDrawerHandler:t})=>{const s=R(),a=V(),o=U(),i=k(r=>M(r)),l=w.getSignedInUser(),c=i.tenantId,d={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:c??""};if(l==null)throw Error("Can't access check deposit page without signing in...");const m=k(r=>Yn(r)),C={analytics:F,checkDeposit:m,filesEndPoint:`${be.fileMicroServiceBaseUrl}`,authParams:d,onSaveChangesToLocalStore:r=>{o(Qn(r))},updateFilesEntity:r=>{o(Qe({files:r}))},onAnotherTransferClick:()=>{o(Ae())},onDeleteFile:r=>{o(Je(r))},onEditFileName:(r,u)=>{o(Ye(r,u.split(".")[0]))},onCheckDpositClick:()=>{o(Jn())},onDismissClick:()=>{t(!0),o(Ae())}};return n.jsxs(n.Fragment,{children:[n.jsx(pe,{analytics:F,onLoad:r=>(u=>u.trackPageLoaded(ve.Event.accountsDepositCheckFormViewed))(r)}),n.jsx(K,{anchor:"right",open:e,PaperProps:{style:{width:ea.overlayWidth.valuePercentage(a),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(r,u)=>(u==="backdropClick"||u==="escapeKeyDown")&&(t(!0),void o(Ae())),children:n.jsx(na,{onClick:r=>r.stopPropagation(),children:n.jsx(wt,{...C})})})]})},na=L(q)`
|
|
34
34
|
display: flex;
|
|
35
35
|
min-height: 100%;
|
|
36
36
|
flex-direction: column;
|
|
37
|
-
`,ta={overlayWidth:new
|
|
37
|
+
`,ta={overlayWidth:new Q(100,100,58)},aa=J(function(e,t){const s=t.currentTenant?.companyId;return{plaidConnectionDetails:et(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:We(e.depositAccountState,e.depositAccountListState)}},function(e,t){return{onReviewClick:()=>e(tt()),clearReviewTransferDetail:()=>e(nt()),onFetchLinkTokenClick:s=>{e(qe("external_account",s))},onEstablishConnectionClick:s=>{e(Ke(s,t.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(Dt),pn=({isTransferDrawerOpen:e,authParams:t,downloadAccountDetailEndPoint:s,closeDrawerHandler:a,zeniAccountsConfig:o})=>{const i=k(y=>Kn(y)),l=k(y=>M(y)),c=R(),d=V(),m=U(),{accountId:C}=Z(),[r,u]=p.useState("achTransfer"),[f,h]=p.useState(!1);if(w.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:S}=$(),{configValue:g}=S(G.zeniAccountsConfig),b=we(g),D=()=>{a(!0),m(Re())};return p.useEffect(()=>{i.reviewTransferDetail.fetchState==="Completed"&&h(!0)},[h,i.reviewTransferDetail.fetchState]),n.jsxs(n.Fragment,{children:[n.jsx(pe,{analytics:F,onLoad:y=>(I=>I.trackPageLoaded(ve.Event.zeniAccountsTransferFormViewed))(y)}),n.jsx(K,{onClose:()=>{(r==="achTransfer"&&f===!1||r==="achTransfer"&&f&&i.fetchState==="Completed")&&D()},anchor:"right",open:e,PaperProps:{style:{width:ta.overlayWidth.valuePercentage(d),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(oa,{onClick:y=>y.stopPropagation(),children:n.jsx(aa,{analytics:F,transferDetails:i,authParams:t,downloadAccountDetailEndPoint:s,onTransferClick:()=>{F.trackTransferBetweenAccountsFormClicked("Transfer",i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",i.transferDetailLocalData.transferFrom?.label,i.transferDetailLocalData.transferTo?.label,i.transferDetailLocalData.amount.amount,i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,i.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,i.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&i.transferDetailLocalData.transferTo?.accType==="depositAccount"&&o.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&i.transferDetailLocalData.amount.amount>o.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),m(Xn(C))},onDismissClick:D,onSaveChangesToLocalStore:y=>{m(qn(y))},onAnotherTransferClick:()=>{h(!1),m(Re())},currentTenant:l,zeniAccountsConfigDetail:o,currentDrawerContent:r,setCurrentDrawerContent:u,showReviewContent:f,setShowReviewContent:h,onBackClick:()=>{},maxInsuredAmount:b.maxInsuredAmount})})})]})},oa=L(q)`
|
|
38
38
|
display: flex;
|
|
39
39
|
min-height: 100%;
|
|
40
40
|
flex-direction: column;
|
|
@@ -46,7 +46,7 @@ import{j as n}from"./liveblocks-Cm6P1Xg9.js";import{j as W,u as Y,h as U,l as G,
|
|
|
46
46
|
flex-direction: column;
|
|
47
47
|
align-items: center;
|
|
48
48
|
background-color: ${e=>e.theme.colors.grey4};
|
|
49
|
-
`,ia=J(function(e,t){return{zeniAccountListView:Xe(e),isExpressPayEnabled:t.isExpressPayEnabled,analytics:t.analytics}},function(e,t){const{navigate:s,currentTenant:a,location:o,companyId:i,handleDrawerToggle:l,analytics:c,isBillPayEnabled:d,isDebitCardFeatureEnabled:m}=t,{tenantEmailDomain:C}=a;return{onZeniAccountClick:(r,u)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",u,"active");const
|
|
49
|
+
`,ia=J(function(e,t){return{zeniAccountListView:Xe(e),isExpressPayEnabled:t.isExpressPayEnabled,analytics:t.analytics}},function(e,t){const{navigate:s,currentTenant:a,location:o,companyId:i,handleDrawerToggle:l,analytics:c,isBillPayEnabled:d,isDebitCardFeatureEnabled:m}=t,{tenantEmailDomain:C}=a;return{onZeniAccountClick:(r,u)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",u,"active");const f=ra(C,r),h=ne(o.state?.pathnameStackToGoBack,o.pathname);s(f,{state:{pathnameStackToGoBack:h}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(en(!1))},handleMoveMoneyOptionSelection:(r,u)=>{let f="page-not-found";r==="sendMoney"&&(f=gn(C)),r==="payBill"?f=mn(a,d,m):r==="transfer"?(f=hn(C),u!=null&&e(tn(u))):r==="checkDeposit"&&(f=fn(C));const h=ne(o.state?.pathnameStackToGoBack,o.pathname);s(f,{state:{pathnameStackToGoBack:h}})},unlinkPaymentAccount:(r,u)=>{c.trackAccountsListPageClicked("Unlink Account",u),e(it(r))},onFetchLinkTokenClick:(r,u)=>{e(qe("external_account",r,u))},onUpdatePaymentAccountStatus:(r,u,f)=>{e(st(r,u,"zeni_accounts","external_account",f))},onEstablishConnectionClick:r=>{e(Ke(r,i,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:r=>{e(ot(r))},onClickMenuIcon:()=>{l(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:()=>{s("./auto-transfer")}}})(bt);function ke({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t}){const s=Y(),a=W(),o=U(),i=V(),{tenantEmailDomain:l}=Z(),{useDynamicConfig:c,useFeatureGate:d}=$(),m=R(),{configValue:C}=c(G.zeniAccountsConfig),{isFeatureEnabled:r}=d(E.isTreasuryEnabled),{isFeatureEnabled:u}=d(E.isDebitCardFeatureEnabled),{isFeatureEnabled:f}=d(E.isAutoTransferRuleEnabled),{isFeatureEnabled:h}=d(E.isCheckingCommentingEnabled),S=we(C),g=k(_=>M(_)),b=g.companyId??w.getSignedInUserTenant(l)?.companyId,{configValue:D}=c(G.expressPayConfig),y=D.is_enable_all_tenants===!0||D.tenant_ids!=null&&D.tenant_ids.includes(g.tenantId),[I,P]=p.useState(!1),[T,O]=p.useState(!1),[v,B]=p.useState(!1),A=k(_=>Xe(_)),z=A.fetchState,N=!!g.companyZeniAccountInfo?.info?.isZeniAccountEnabled,j=oe(),H=!!g.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,ie=!!g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,he=ae(j?.loggedInUserRoleMap),fe=De(j?.loggedInUserRoleMap),ge=!!g.companyBillPayInfo?.info?.isBillPayEnabled,re=w.getSignedInUser(),X={userId:re?.userId??"",sessionId:re?.zeniSessionId??"",tenantId:g.tenantId??""},ee=`${Se}/account_details`,{areTenantIdsInSync:je}=It();p.useEffect(()=>{!I&&je&&(P(!0),o(en(!1)))},[I,o,z,je]),p.useEffect(()=>{e!=null&&e===!0?O(!0):(O(!1),document.body.style.overflow="auto")},[e]),p.useEffect(()=>{B(t!=null&&t===!0)},[t]);const Ee=()=>{O(!1),a("..")},[yn,Cn]=p.useState(!1),Pe=_=>{Cn(_)},{isAiCfoOpen:xn,setIsAiCfoOpen:An}=rn(),{isAiCfoAccessEnabled:kn,onAskAiCfoClick:wn}=ln({isAiCfoOpen:xn,setIsAiCfoOpen:An,mobileExploreReferrer:"Checking Accounts"});dn({isDataReady:z==="Completed"});const Dn=g.company!=null&&Ze(g.company),ye=(r&&Dn)===!0&&!ie,[In,Sn]=p.useState(!1),Ce=k(_=>_.treasurySetupViewState.treasuryFundsDetails),bn=Ce.fundsDetails,vn=St(bn);p.useEffect(()=>{ye!==!0||In||Ce?.fetchStatus.fetchState!=="Not-Started"||(Sn(!0),o(at()))},[Ce.fetchStatus,o]);const jn=nn(g),En=Ie(u,g);return jn===!0&&En!==!0?n.jsx(cn,{}):N?n.jsxs(n.Fragment,{children:[A.fetchState==="Completed"&&T===!1&&v===!1?n.jsx(pe,{analytics:F,onLoad:_=>(Te=>{Te.trackAccountsListPageViewed(A.depositAccountsSelectorView.depositAccounts.length,A.externalAccountsSelectorView.paymentAccounts.length,Me(A.summary?.totalBalance.available.amount??0),Me(A.summary?.totalInterest.available.amount??0),A.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),ye&&Te.trackTreasuryPromoView("Checking Promo Banner")})(_)}):null,T===!0?n.jsx(pn,{closeDrawerHandler:Ee,isTransferDrawerOpen:T,zeniAccountsConfig:A.zeniAccountsConfig,authParams:X,downloadAccountDetailEndPoint:ee}):null,v===!0?n.jsx(un,{closeDrawerHandler:Ee,isCheckDepositDrawerOpen:v}):null,n.jsxs(sa,{windowSize:i,children:[n.jsx(me,{isAppContentDrawerOpen:yn,handleDrawerToggle:Pe}),n.jsx(ia,{zeniBankListView:A,navigate:a,currentTenant:g,location:s,companyId:b,analytics:F,maxInsuredAmount:S.maxInsuredAmount,isExpressPayEnabled:y,isBillPayEnabled:ge,isCheckingCommentingEnabled:h,isDebitCardFeatureEnabled:u,isAutoTransferRuleEnabled:f,handleDrawerToggle:Pe,showTreasuryPromo:ye,treasuryYieldPercentage:vn,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:kn,onAskAiCfoClick:wn})]})]}):H&&he?n.jsx(te,{to:"../setup"}):g.companyZeniAccountInfo?.info&&!H&&fe?n.jsx(te,{to:"../promo",state:s.state}):n.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const mn=(e,t,s)=>{const a=Ie(s,e),{tenantEmailDomain:o}=e;return a===!0||t===!1?`/${o}/bills`:`/${o}/bill/new`},ra=(e,t)=>`/${e}/checking/${t}`,hn=(e,t)=>t==null?`/${e}/checking/transfer`:`/${e}/checking/${t}/transfer`,fn=(e,t)=>t==null?`/${e}/checking/check-deposit`:`/${e}/checking/${t}/check-deposit`,gn=e=>`/${e}/checking/express-pay`,ca=L.div`
|
|
50
50
|
display: flex;
|
|
51
51
|
width: 100%;
|
|
52
52
|
flex: 1 1 auto;
|
|
@@ -54,7 +54,7 @@ import{j as n}from"./liveblocks-Cm6P1Xg9.js";import{j as W,u as Y,h as U,l as G,
|
|
|
54
54
|
align-items: center;
|
|
55
55
|
min-height: 100vh;
|
|
56
56
|
background-color: ${e=>e.theme.colors.grey4};
|
|
57
|
-
`,la=J(function(e,t){const{currentTenant:s}=t,a=an(e,t.accountId),o=
|
|
57
|
+
`,la=J(function(e,t){const{currentTenant:s}=t,a=an(e,t.accountId),o=w.getSignedInUser(),i=e.tenantState.currentTenantId,l={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:i??""},c=a.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:l,downloadEndPoint:`${be.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:a,isExpressPayEnabled:t.isExpressPayEnabled,fetchState:a.fetchState}},function(e,t){const{navigate:s,currentTenant:a,location:o,accountId:i}=t,{tenantEmailDomain:l}=a;return{handleMoveMoneyOptionSelection:(c,d)=>{let m="page-not-found";c==="sendMoney"?m=gn(l):c==="payBill"?m=mn(a,t.isBillPayEnabled,t.isDebitCardFeatureEnabled):c==="transfer"?(m=hn(l,i),d!=null&&e(tn(d))):c==="checkDeposit"?(m=fn(l,i),d!=null&&e(rt(d))):c==="accountStatement"&&(m=pa(l,i));const C=ne(o.state?.pathnameStackToGoBack,o.pathname);s(m,{state:{pathnameStackToGoBack:C}})},onViewAllTransactionClick:()=>{const c=ua(l,i),d=ne(o.state?.pathnameStackToGoBack,o.pathname);s(c,{state:{pathnameStackToGoBack:d}})},onAccountDetailClick:()=>{const c=da(l,i),d=ne(o.state?.pathnameStackToGoBack,o.pathname);s(c,{state:{pathnameStackToGoBack:d}})},onEditNameClick:c=>{e(Le(i,"editName",c))},onReloadZeniAccountDetailPage:()=>{e(on(i,!1))},onCloseAccountClick:()=>{e(Le(i,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})},onAutoTransferClick:()=>{s("../auto-transfer")}}})(vt);function le({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t,isAccountInfoDrawerOpen:s}){const a=Y(),o=W(),i=U(),l=V(),{tenantEmailDomain:c,accountId:d}=Z(),{useDynamicConfig:m}=$(),{useFeatureGate:C}=$(),{isFeatureEnabled:r}=C(E.isDebitCardFeatureEnabled),{isFeatureEnabled:u}=C(E.isAutoTransferRuleEnabled),{isFeatureEnabled:f}=C(E.isCheckingCommentingEnabled),h=k(ee=>M(ee)),{configValue:S}=m(G.expressPayConfig),g=S.is_enable_all_tenants===!0||S.tenant_ids!=null&&S.tenant_ids.includes(h.tenantId),b=!!h.companyBillPayInfo?.info?.isBillPayEnabled,D=w.getSignedInUser(),y=h.companyId??w.getSignedInUserTenant(c)?.companyId,I={userId:D?.userId??"",sessionId:D?.zeniSessionId??"",tenantId:h.tenantId??""},P=`${Se}/account_details`,[T,O]=p.useState(!1),[v,B]=p.useState(!1),[A,z]=p.useState(!1),[N,j]=p.useState(!1),H=k(ee=>an(ee,d??"")),ie=H.fetchState,{isAiCfoOpen:he,setIsAiCfoOpen:fe}=rn(),{isAiCfoAccessEnabled:ge,onAskAiCfoClick:re}=ln({isAiCfoOpen:he,setIsAiCfoOpen:fe,mobileExploreReferrer:"Checking Account Detail"});dn({isDataReady:ie==="Completed"}),p.useEffect(()=>{T||(i(on(d??"",!1)),O(!0))},[T,i,ie]),p.useEffect(()=>{j(s!=null&&s===!0)},[s]),p.useEffect(()=>{e!=null&&e===!0?B(!0):(B(!1),document.body.style.overflow="auto")},[e]),p.useEffect(()=>{z(t!=null&&t===!0)},[t]);const X=()=>{j(!1),o("..")};return n.jsxs(n.Fragment,{children:[N===!0&&H.accountDetail!=null?n.jsx(qt,{authParams:I,downloadAccountDetailEndPoint:P,closeDrawerHandler:X,isAccountInfoDrawerOpen:N,zeniBankAccountDetail:H.accountDetail}):null,v===!0?n.jsx(pn,{closeDrawerHandler:X,isTransferDrawerOpen:v,zeniAccountsConfig:H.zeniAccountsConfig,authParams:I,downloadAccountDetailEndPoint:P}):null,A===!0?n.jsx(un,{closeDrawerHandler:X,isCheckDepositDrawerOpen:A}):null,n.jsx(ca,{windowSize:l,children:n.jsx(la,{navigate:o,currentTenant:h,location:a,companyId:y,isDebitCardFeatureEnabled:r,accountId:d??"",isBillPayEnabled:b,isCheckingCommentingEnabled:f,isExpressPayEnabled:g,isAutoTransferRuleEnabled:u,isAiCfoAccessEnabled:ge,onAskAiCfoClick:re})})]})}const da=(e,t)=>`/${e}/checking/${t}/account-info`,ua=(e,t)=>`/${e}/checking/${t}/transactions`,pa=(e,t)=>`/${e}/checking/${t}/statements`,ma=L.div`
|
|
58
58
|
display: flex;
|
|
59
59
|
height: 100vh;
|
|
60
60
|
width: 100%;
|
|
@@ -63,4 +63,4 @@ import{j as n}from"./liveblocks-Cm6P1Xg9.js";import{j as W,u as Y,h as U,l as G,
|
|
|
63
63
|
overflow: auto;
|
|
64
64
|
align-items: center;
|
|
65
65
|
background-color: ${e=>e.theme.colors.grey4};
|
|
66
|
-
`;function ha(){const e=W(),t=U(),s=V(),{accountId:a}=
|
|
66
|
+
`;function ha(){const e=W(),t=U(),s=V(),{accountId:a}=Z(),{useFeatureGate:o}=$(),{isFeatureEnabled:i}=o(E.isCheckingCommentingEnabled),[l,c]=p.useState(!1);p.useEffect(()=>{l||(c(!0),t(ct(a??"",!1)))},[l,t]);const d=k(m=>lt(m,a??""));if(w.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(ma,{windowSize:s,children:n.jsx(jt,{transactionListView:d,depositAccountId:a??"",isCheckingCommentingEnabled:i,onBackClick:()=>{e("../")}})})}const fa=J(function(e,t){const{companyId:s}=t;return{zeniAccountSetupView:dt(e,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(e,t){const{navigate:s,companyId:a}=t;return{onSetupButtonClick:()=>{F.trackAccountsPromoPageClicked("Setup Accounts"),e(ut(a))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}})(Pt),ga=()=>{const e=W(),t=Y(),{tenantEmailDomain:s}=Z(),{useDynamicConfig:a}=$(),o=R(),[i,l]=p.useState(!1),[c,d]=p.useState(!1),m=k(y=>M(y)),{configValue:C}=a(G.zeniAccountsConfig),r=we(C);p.useEffect(()=>{c===!1&&t.state?.message==="activation"&&d(!0)},[t.state]);const u=w.getSignedInUserTenant(s)?.companyId??m.companyId,f=w.getSignedInUser(),h=!!m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,S=y=>{l(y)};if(f==null)throw Error("Can't access Zeni account promo page without signing in...");const g=oe(),b=ae(g?.loggedInUserRoleMap),D=De(g?.loggedInUserRoleMap);if(h&&b)return n.jsx(te,{to:"../../checking/setup"});if(m.company?.companyZeniAccountInfo&&(!h&&b||D)){if(t.state?.message==="activation"){const y=sn(t.state?.pathnameStackToGoBack);e(t.pathname,{state:{...t.state,message:void 0,pathnameStackToGoBack:y.newStack}})}return n.jsxs(n.Fragment,{children:[n.jsx(Et,{showConfetti:c}),n.jsx(pe,{analytics:F,onLoad:y=>(I=>I.trackPageLoaded(ve.Event.accountsPromoPageViewed))(y)}),n.jsx(me,{isAppContentDrawerOpen:i,handleDrawerToggle:S}),n.jsx(fa,{analytics:F,navigate:e,companyId:u,onClickMenuIcon:()=>{S(!0)},maxAnnualPercentageYield:r.maxAnnualPercentageYield,maxInsuredAmount:r.maxInsuredAmount,exampleBankBalance:3e6})]})}return n.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:o.colors.grey5}})};function Za(){const e=Y(),t=k(z=>M(z)),s=R(),{useFeatureGate:a,useDynamicConfig:o}=$(),i=oe(),l=ae(i?.loggedInUserRoleMap),c=De(i?.loggedInUserRoleMap),d=!!t.company?.companyZeniAccountInfo.isZeniAccountEnabled,m=!!t.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:C}=a(E.isChargeCardFeatureEnabled),{isFeatureEnabled:r}=a(E.isDebitCardFeatureEnabled),u=nn(t),f=Ie(r,t),h=t?.userRole!=null&&pt(t?.userRole),S=(t?.company==null||t.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!h)&&mt(i?.loggedInUserRoleMap),g=ht(i?.loggedInUserRoleMap),b=(t?.company==null||t.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!h)&&ft(i?.loggedInUserRoleMap),{isFeatureEnabled:D}=a(E.isDepositAccountsFeatureEnabled),y=D&&!h,{configValue:I}=o(G.expressPayConfig),P=I.is_enable_all_tenants===!0||I.tenant_ids!=null&&I.tenant_ids.includes(t.tenantId),{isFeatureEnabled:T}=a(E.isAutoTransferRuleEnabled),O=Tt(t,C,r)&&!h&>(i?.loggedInUserRoleMap),v=yt(i?.loggedInUserRoleMap),B=y&&ae(i?.loggedInUserRoleMap),A=B||He(i?.loggedInUserRoleMap);return n.jsxs(_e,{children:[n.jsx(x,{path:"setup",element:n.jsx(ze,{isBillPayAdminLevelAccess:S,isUserHasOnlyBillPayAccess:g,isReimbursementAdminLevelAccess:b,isZeniAccountAdminLevelAccess:B,isChargeCardAdminLevelAccess:O,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"setup"})}),n.jsx(x,{path:"verification",element:n.jsx(ze,{isBillPayAdminLevelAccess:S,isUserHasOnlyBillPayAccess:g,isReimbursementAdminLevelAccess:b,isZeniAccountAdminLevelAccess:B,isChargeCardAdminLevelAccess:O,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"verification"})}),T?n.jsxs(n.Fragment,{children:[n.jsx(x,{path:"auto-transfer",element:n.jsx(Ne,{})}),A?n.jsx(x,{path:"auto-transfer/:ruleId/edit",element:n.jsx(Ne,{isEditDrawerOpen:!0})}):null]}):n.jsx(x,{path:"auto-transfer",element:n.jsx(de,{})}),P&&l?n.jsxs(n.Fragment,{children:[n.jsx(x,{path:"express-pay",element:n.jsx(ce,{})}),n.jsx(x,{path:"express-pay/add-ach",element:n.jsx(ce,{isAddACHDrawerOpen:!0})}),n.jsx(x,{path:"express-pay/add-wire/add-address",element:n.jsx(ce,{isAddAddressDrawerOpen:!0})}),n.jsx(x,{path:"express-pay/add-wire",element:n.jsx(ce,{isAddWireDrawerOpen:!0})})]}):n.jsx(x,{path:"express-pay",element:n.jsx(de,{})}),n.jsx(x,{path:"promo",element:n.jsx(ga,{})}),u&&!f?n.jsx(x,{path:"/*",element:n.jsx(cn,{})}):d?n.jsxs(n.Fragment,{children:[n.jsx(x,{path:"/",element:n.jsx(ke,{})}),n.jsx(x,{path:"transfer",element:n.jsx(ke,{isTransferDrawerOpen:!0})}),n.jsx(x,{path:"check-deposit",element:n.jsx(ke,{isCheckDepositDrawerOpen:!0})}),n.jsx(x,{path:":accountId/*",element:n.jsx(ya,{})}),n.jsx(x,{path:"*",element:n.jsx(de,{})})]}):m&&l?n.jsx(x,{path:"*",element:n.jsx(te,{to:"../setup"})}):t.company?.companyZeniAccountInfo&&c?n.jsx(x,{path:"*",element:n.jsx(te,{to:"../promo",state:e.state})}):n.jsx(x,{path:"*",element:n.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${Ot.sp1} ${s.colors.dropShadowNormal}`}})})]})}function ya(){return n.jsxs(_e,{children:[n.jsx(x,{path:"/",element:n.jsx(le,{})}),n.jsx(x,{path:"account-info",element:n.jsx(le,{isAccountInfoDrawerOpen:!0})}),n.jsx(x,{path:"transfer",element:n.jsx(le,{isTransferDrawerOpen:!0})}),n.jsx(x,{path:"check-deposit",element:n.jsx(le,{isCheckDepositDrawerOpen:!0})}),n.jsx(x,{path:"transactions",element:n.jsx(ha,{})}),n.jsx(x,{path:"statements",element:n.jsx(Ut,{})}),n.jsx(x,{path:"*",element:n.jsx(de,{})})]})}export{Za as default};
|