@zeniai/web-app-ui 5.3.47-qa → 5.3.48-next
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AccountMappingScreen-1SU95X1g.js +9 -0
- package/dist/assets/AddressRoutes-BzeJ2Hf7.js +1 -0
- package/dist/assets/AddressScreen-Cdr2j35I.js +9 -0
- package/dist/assets/AiCfoScreen-C1eHEeeP.js +22 -0
- package/dist/assets/{AppDrawer-C7L5LQYC.js → AppDrawer-BfXOcVEt.js} +3 -3
- package/dist/assets/{BillPayApprovalRoutes-Bu8vaB46.js → BillPayApprovalRoutes-C7TITJQ6.js} +1 -1
- package/dist/assets/BillPayRoutes-CHaqaYck.js +119 -0
- package/dist/assets/BusinessVerificationPageScreen-BVwrIVJv.js +9 -0
- package/dist/assets/CardsAiCfoScreen-DsJn0glf.js +14 -0
- package/dist/assets/ChargeCardRoutes-RNz9qxOv.js +71 -0
- package/dist/assets/CompanyPassportScreen-DmzRkUq5.js +1 -0
- package/dist/assets/ConnectionAuthScreen-C3vG4r21.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-Br9ARp7V.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-BivxymAu.js → CustomerOnboardingRoutes-BmY616w2.js} +3 -3
- package/dist/assets/{DashboardRoutes-CZNxS99K.js → DashboardRoutes-2DTr4aUf.js} +4 -4
- package/dist/assets/{DefaultTenantHome-BWCll08J.js → DefaultTenantHome-C8wEik5q.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-BeAYwvC9.js +18 -0
- package/dist/assets/{DrawerScreen-0c_ealW2.js → DrawerScreen-DXPlivfx.js} +1 -1
- package/dist/assets/EntityDetailRoutes-CrqgSMlQ.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-DLgzaZBu.js +38 -0
- package/dist/assets/FeaturePreviewScreen-B11vFkOV.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-BQ4MRYuh.js +1 -0
- package/dist/assets/InboxNotificationsProvider-BY8P-Ihr.js +1 -0
- package/dist/assets/InvoicingRoutes-CNNRUv3E.js +2 -0
- package/dist/assets/MagicLinkRoutes-DINiJQI8.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-CVGSZaKv.js +12 -0
- package/dist/assets/MobileAppDrawer-D8KSGZ8t.js +1 -0
- package/dist/assets/NotFoundScreen-DbwVF9lB.js +1 -0
- package/dist/assets/NotificationRoutes-M_Lup9qB.js +1 -0
- package/dist/assets/OAuthConsentScreen-BuReFHDV.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-BAkRFF5q.js +1 -0
- package/dist/assets/{PaymentLinkScreen-B2QO2fQL.js → PaymentLinkScreen-BIPFJD1g.js} +7 -7
- package/dist/assets/PeopleRoutes-DADu3Zhb.js +22 -0
- package/dist/assets/PerformanceRoutes-CX8yTPzt.js +1 -0
- package/dist/assets/{Preview-DMLQokX_.js → Preview-Cafq3h7X.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CvbLmaBz.js → QBOConnectionScreen-DXBj5LWG.js} +1 -1
- package/dist/assets/ReimbursementApprovalRoutes-CPaJiiXV.js +1 -0
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-zx_YxbPw.js +1 -0
- package/dist/assets/{ReimbursementRoutes-G7JKpwJT.js → ReimbursementRoutes-B1ZeqUVg.js} +9 -9
- package/dist/assets/ReportsRoutes-zdmkyXCJ.js +1 -0
- package/dist/assets/RewardsRoutes-Blcm9sjt.js +1 -0
- package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-CDQYjn75.js +25 -0
- package/dist/assets/ScreenRoutes-BnBOn0fY.js +2 -0
- package/dist/assets/{SettingsRoutes-BrsZS6Xg.js → SettingsRoutes-C-hSgwDw.js} +6 -6
- package/dist/assets/{SetupPagesScreen-DL_o3Z3i.js → SetupPagesScreen-CEG9qkFk.js} +5 -5
- package/dist/assets/SignInScreen-Dh3vWk5H.js +1 -0
- package/dist/assets/SignOutScreen-DiaROWN6.js +9 -0
- package/dist/assets/{TaskListScreen-W52vNP7m.js → TaskListScreen-Qo2CFMii.js} +2 -2
- package/dist/assets/TaskRoutes-CJ89fi5N.js +9 -0
- package/dist/assets/TransactionDetailRoutes-CdcbF-DT.js +1 -0
- package/dist/assets/{TransactionDetailScreen-CcO0FUjf.js → TransactionDetailScreen-CLcV-jRc.js} +2 -2
- package/dist/assets/TransactionListRoutes-BPNmT8kF.js +1 -0
- package/dist/assets/{TreasuryRoutes-D_yTnBTc.js → TreasuryRoutes-DvD-DWnN.js} +6 -6
- package/dist/assets/{VendorsRoutes-BVvoooN6.js → VendorsRoutes-DbSolQnQ.js} +17 -17
- package/dist/assets/WiseConfirmationScreen-i6t2NQeo.js +12 -0
- package/dist/assets/ZeniAccountRoutes-BAzrGiFl.js +57 -0
- package/dist/assets/ZeniAccountStatementScreen-CILP6MbP.js +9 -0
- package/dist/assets/{accountMappingHelper-DqBiQF6x.js → accountMappingHelper-DCRT8uBQ.js} +1 -1
- package/dist/assets/{analytics-D6GpUSOP.js → analytics-DCG-BJ2B.js} +1 -1
- package/dist/assets/{analyticsHelper-H1Xp9Uyk.js → analyticsHelper-DFvWpT7U.js} +1 -1
- package/dist/assets/{core-B5mDy9pu.js → core-BomyDm3r.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DANuhXnG.js → decodeURIComponentSafe-BrV-0DZb.js} +1 -1
- package/dist/assets/{dnd-CGWe1ZMP.js → dnd-I9CGHlPV.js} +1 -1
- package/dist/assets/{empty-Dj4ZMRNZ.js → empty-CgcXQukc.js} +1 -1
- package/dist/assets/{empty-D0y6rZ_X.js → empty-DZpTY4GY.js} +1 -1
- package/dist/assets/{emptyVideoElement-BbYSqu6F.js → emptyVideoElement-CXDZcpYA.js} +1 -1
- package/dist/assets/epic-CaRC9CI2.js +2 -0
- package/dist/assets/expenseAutomationHelper-Bla5A-j_.js +1 -0
- package/dist/assets/{getLocaleForTenant-xZFgPOZu.js → getLocaleForTenant-CdcSWjO0.js} +1 -1
- package/dist/assets/{index-k1-Pd2Ki.js → index-7l3psPwp.js} +1 -1
- package/dist/assets/{index-CrBk11WI.js → index-B9ZeVIAQ.js} +30661 -31464
- package/dist/assets/{index-BQBXaLiB.js → index-Bo4EoZt1.js} +1 -1
- package/dist/assets/{index-8s12XWuB.js → index-ByxVb88B.js} +1 -1
- package/dist/assets/index-D0WIHul0.js +1 -0
- package/dist/assets/{index-CI8tXM3D.js → index-DXY4DpFj.js} +1 -1
- package/dist/assets/{index-G6Wb7pfX.js → index-Dtcx6iOp.js} +2 -2
- package/dist/assets/{index-fq0DUtem.js → index-IJef17q5.js} +1 -1
- package/dist/assets/{lexical-DW4lC8Zx.js → lexical-CYgmazu1.js} +1 -1
- package/dist/assets/{liveblocks-UOzcPsHa.js → liveblocks-D9xsLz4C.js} +2 -2
- package/dist/assets/{lottie-C5eNvt0I.js → lottie-DZ7H5U6k.js} +1 -1
- package/dist/assets/{mui-Do6nLzGb.js → mui-CsJ_uybP.js} +1 -1
- package/dist/assets/{pathToGoBack-DP_bGWF-.js → pathToGoBack-Bk1syfU7.js} +1 -1
- package/dist/assets/{pdf-DjwvAC2g.js → pdf-BcamkVED.js} +3 -3
- package/dist/assets/{pdf-lib-CZXOqgb4.js → pdf-lib-H_eegAHa.js} +1 -1
- package/dist/assets/{plaid-0g_vwjSd.js → plaid-Bs9WL7ZA.js} +1 -1
- package/dist/assets/{pusher-BwlPp2s7.js → pusher-BiXDawCL.js} +1 -1
- package/dist/assets/{react-BsXfT48C.js → react-BszTkffz.js} +1 -1
- package/dist/assets/{react-CU01hiuh.js → react-CnZloJMh.js} +1 -1
- package/dist/assets/{react-RZilWHYG.js → react-Cp_3CHK0.js} +1 -1
- package/dist/assets/{react-Bja4MeVO.js → react-D0IREB0P.js} +1 -1
- package/dist/assets/{react-DkYBVdJJ.js → react-Di6q_3ld.js} +1 -1
- package/dist/assets/{react-Dex3foBA.js → react-Dn9xz1wp.js} +1 -1
- package/dist/assets/{recharts-uFX1dZS-.js → recharts-CkiZYv6b.js} +1 -1
- package/dist/assets/{routePaths-CeCPwkIf.js → routePaths-B7kYeIqd.js} +1 -1
- package/dist/assets/{sentry-DHDsO12F.js → sentry-BMvyJSqc.js} +1 -1
- package/dist/assets/{url-BxiN6LKq.js → url-BfDVlhyh.js} +1 -1
- package/dist/assets/{url-CLCy7GPP.js → url-CmcLvJyo.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CSs_vZyp.js → useAiCfoDashboardSuggestedQuestionsChips-BSgtWLpu.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-DkXoRZ45.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents--oeBBRmO.js → useChargeCardPusherEvents-B9vV64BE.js} +1 -1
- package/dist/assets/{useDeviceId-Bi38IJl0.js → useDeviceId-CpSKwPZ4.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-C-cGd7Tb.js → useEmailConnectResultRefresh-CAYfUMY-.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-Bwvu8W79.js → useInitialThreadRequest-Pe6lvpTh.js} +1 -1
- package/dist/assets/useTaskManagerAccess-fnX1J0jB.js +1 -0
- package/dist/assets/{utils-BsODCDYR.js → utils-CZJ3iF9S.js} +1 -1
- package/dist/assets/withTransactionSidePanel-mCp4nNUj.js +25 -0
- package/dist/assets/{zeni-epic-state-7eY0g-Bc.js → zeni-epic-state-C6RT9e71.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +6 -6
- package/dist/assets/AccountMappingScreen-BPRZHuGA.js +0 -9
- package/dist/assets/ActualMatchingMatchDetailScreen-CoU3K4PM.js +0 -1
- package/dist/assets/AddressRoutes-3x6JmFfR.js +0 -1
- package/dist/assets/AddressScreen-DhOzuvLT.js +0 -9
- package/dist/assets/AiCfoScreen-Blx6lCnY.js +0 -22
- package/dist/assets/BillPayRoutes-T-Lct0sH.js +0 -119
- package/dist/assets/BusinessVerificationPageScreen-CPnmoF6z.js +0 -9
- package/dist/assets/CardsAiCfoScreen-CIq15Z-M.js +0 -14
- package/dist/assets/ChargeCardRoutes-BKDstMtL.js +0 -71
- package/dist/assets/CompanyPassportScreen-D3aXSi-v.js +0 -1
- package/dist/assets/ConnectionAuthScreen-1A7_ld_X.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-7T0XvKs6.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-DGMYJzFE.js +0 -18
- package/dist/assets/EntityDetailRoutes-Db8C6L2J.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-Cjko15u2.js +0 -38
- package/dist/assets/FeaturePreviewScreen-B5Hq_fA2.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-B6Nn-XMl.js +0 -1
- package/dist/assets/InboxNotificationsProvider-BmF5-_KA.js +0 -1
- package/dist/assets/InvoicingRoutes-0xj-PlaS.js +0 -2
- package/dist/assets/MagicLinkRoutes-B9y3UF8M.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-vHrJm7dw.js +0 -12
- package/dist/assets/MobileAppDrawer-CjKRvtSN.js +0 -1
- package/dist/assets/NotFoundScreen-MJal1hew.js +0 -1
- package/dist/assets/NotificationRoutes-CT24D8Uv.js +0 -1
- package/dist/assets/OAuthConsentScreen-CFMLbvn8.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-ByUQV7tm.js +0 -1
- package/dist/assets/PeopleRoutes-DOJEhG7S.js +0 -22
- package/dist/assets/PerformanceRoutes-CdWAF5sI.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-CEEFZS8r.js +0 -1
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-5MNnVAqy.js +0 -1
- package/dist/assets/ReportsRoutes-Bgz_pVpt.js +0 -1
- package/dist/assets/RewardsRoutes-Bcb3M70b.js +0 -1
- package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-luC81eat.js +0 -33
- package/dist/assets/ScreenRoutes-DA06Fnfd.js +0 -2
- package/dist/assets/SignInScreen-NP6vHITl.js +0 -1
- package/dist/assets/SignOutScreen-D28SfRtf.js +0 -9
- package/dist/assets/TaskRoutes-DLlKeXMA.js +0 -9
- package/dist/assets/TransactionDetailRoutes-BszvDFhJ.js +0 -1
- package/dist/assets/TransactionListRoutes-C1dcOuNI.js +0 -1
- package/dist/assets/WiseConfirmationScreen-l0eeo939.js +0 -12
- package/dist/assets/ZeniAccountRoutes-DImTioOs.js +0 -57
- package/dist/assets/ZeniAccountStatementScreen-wUD7vElb.js +0 -9
- package/dist/assets/epic-mSW644GG.js +0 -2
- package/dist/assets/expenseAutomationHelper-DBDpSggk.js +0 -1
- package/dist/assets/index-6yt3BfRL.js +0 -1
- package/dist/assets/stripSplatSuffix-CQQXAy0N.js +0 -1
- package/dist/assets/useActualMatchingMatchDetail-CAkhwxRr.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BamKKcjy.js +0 -1
- package/dist/assets/useTaskManagerAccess-CdPkYUw1.js +0 -1
- package/dist/assets/withTransactionSidePanel-Co9xwJi4.js +0 -25
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import{j as y}from"./liveblocks-UOzcPsHa.js";import{a as A}from"./sentry-DHDsO12F.js";import{i as G,u as H,h as Q,g as ee,j as h,l as te}from"./core-B5mDy9pu.js";import{WA as Fe,WB as Ve,l$ as ae,sr as Me,sD as Ge,sT as Re,sR as $e,sU as Ke,sW as Ue,WC as Ye,fF as K,Vz as pe,WD as Se,g_ as ne,cB as se,cC as le,F6 as ve,WE as Ce,Fa as We,gO as ce,su as ze,t2 as qe,dD as Ze,dC as Xe,SX as fe,F4 as He,E_ as Qe,WF as De,ES as et,ER as tt,EM as at,EX as nt,Fb as st,WG as Y,WH as ge,ET as lt,VA as oe,Fr as Ae,Fk as Ie,WI as xe,sx as Te,Fe as Be,Fc as Le,WJ as Je,Fy as we,Fv as be,Ff as je,Fx as _e}from"./zeni-epic-state-7eY0g-Bc.js";import{a4 as de,aY as ie,aZ as ct,z as ot,h as dt,a7 as it,a8 as ue,j as N,av as ut,a_ as rt,p as V,G as Ee,M as ye,a$ as ht,b0 as mt,b1 as pt}from"./index-CrBk11WI.js";import{n as re}from"./mui-Do6nLzGb.js";import{p as St}from"./pathToGoBack-DP_bGWF-.js";import X from"./NotFoundScreen-MJal1hew.js";import{c as M}from"./routePaths-CeCPwkIf.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]="33cc0e6f-16f2-40af-a22a-0d69479b3272",e._sentryDebugIdIdentifier="sentry-dbid-33cc0e6f-16f2-40af-a22a-0d69479b3272")}catch{}})();function $t({isRenderedInPanel:e=!1,accrualIdOverride:t,onPanelNavigateBack:c}={}){const{accrualId:s}=G(),l=t??s,n=H(),i=Q(),a=ee(),{accrual:d,actionFetchState:o,detailFetchState:m,localData:I}=h((u=>Fe(u,l??""))),p=h((u=>Ve(u))),C=h((u=>ae(u))),g=A.useCallback((()=>{const u=de(a.state?.pathnameStackToGoBack);i(u.poppedPathname??St(4),{state:{pathnameStackToGoBack:u.newStack}})}),[a.state,i]),f=A.useRef(!1);return A.useEffect((()=>{o.fetchState!=="In-Progress"&&f.current&&o.fetchState==="Completed"&&(f.current=!1,g())}),[o.fetchState,g]),A.useEffect((()=>{l!=null&&d==null&&m.fetchState==="Not-Started"&&n(Me(l))}),[l,d,m.fetchState]),A.useEffect((()=>{n(Ge({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[n]),l==null?y.jsx(X,{}):d==null?m.fetchState==="Not-Started"||m.fetchState==="In-Progress"?y.jsx(ie,{}):y.jsx(X,{}):y.jsx(ft,{children:y.jsx(ct,{isRenderedInPanel:e,accrual:d,actionFetchState:o.fetchState,isAccountingClassesEnabled:C,localData:I,newAccrualAccountsView:p,onAccrualFormChange:(u,r)=>{n(Ye({accrualId:u,localData:r}))},onAccrualFormClear:u=>{n(Ue({accrualId:u}))},onApproveAndPost:u=>{n(Ke(l,u))},onNavigateBack:c??g,onRevert:(u,r)=>{f.current=!0,n($e(l,u,r))},onSkip:(u,r)=>{n(Re(l,u,r))}})})}const ft=re.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 0 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,Dt=Ee.getLocalizedStrings(),gt=te((function(e,t){const c=Se(e,t.scheduleTab),s=e.tenantState.currentTenantId;return{authParams:{userId:t.signedInUser.userId??"",sessionId:t.signedInUser.zeniSessionId??"",tenantId:s??""},linkBillExpenseView:c.linkBillExpenseView,transactions:c.linkBillExpenseView.transactions}}),(function(e,t){const{navigate:c,location:s}=t;return{onTransactionSelect(l){e(Ce({selectedTransaction:l}))},onBackClick:()=>{c("..",{relative:"path"})},onCancel(){e(Ce({selectedTransaction:void 0})),e(We()),c("..",{relative:"path"})},onTransactionClick:l=>{const n=`${M(l,t.tenantEmailDomain)}`,i=V(s.state?.pathnameStackToGoBack,s.pathname);c(n,{state:{pathnameStackToGoBack:i}})},onLinkSave(){t.setShouldNavigateBack(!1),e(ve(t.scheduleTab,t.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}}))(rt),Kt=({setShouldNavigateBack:e})=>{const t=Q(),c=ee(),{scheduleDetailId:s,tenantEmailDomain:l}=G(),{scheduleType:n}=G();if(l==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const i=h((g=>K(g))),a=pe(n)??"accrued_expenses",d=ot.getSignedInUser();if(d==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(s==null)throw Error("Invalid Schedule Detail Id");const o=h((g=>Se(g,a))),m=o.selectedJELinkRowIndex,I=h((g=>ne(g,i.companyId))),p=dt(o.updateStatus.fetchState);A.useEffect((()=>{p==="In-Progress"&&o.updateStatus.fetchState==="Completed"&&t("..",{relative:"path"})}),[p,o.updateStatus.fetchState]),A.useEffect((()=>{o.fetchState==="Not-Started"&&t("..",{relative:"path"})}),[]),A.useEffect((()=>{o.selectedJEAccruedSchedule!=null&&o.selectedJELinkRowIndex!=null||t("..",{relative:"path"})}),[o.selectedJEAccruedSchedule,o.selectedJELinkRowIndex]);const C=o.linkBillExpenseView.fetchState==="Completed";return y.jsx(y.Fragment,{children:o.linkBillExpenseView.fetchState==="In-Progress"?y.jsx(it,{fetchState:o.linkBillExpenseView.fetchState}):o.selectedJEAccruedSchedule!=null&&m!=null?y.jsxs(y.Fragment,{children:[C===!0?y.jsx(ue,{analytics:N,onLoad:()=>{Et(o,a,I)}}):null,y.jsx(gt,{signedInUser:d,attachmentEndPoint:`${ut}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:o.selectedJEAccruedSchedule.vendor.id??"",location:c,tenantEmailDomain:l,scheduleAccruedDetailsView:o,saveFetchState:o.updateStatus.fetchState,scheduleTab:a,navigate:t,analytics:N,controllerUserDetails:I,saveStatus:o.updateStatus.fetchState,jeAccruedSchedule:o.selectedJEAccruedSchedule,localData:o.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},Ne=e=>{const t=Dt.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(t)??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(t)??null,endMonth:e.endDate?.format(t)??null}},Et=(e,t,c)=>{const s=e.selectedJEAccruedSchedule,l=e.selectedJELinkRowIndex;let n;l!=null&&s!=null&&(n=s.scheduledJournalEntry[l]);const{transactions:i}=e.linkBillExpenseView,a=i.some((m=>m.isRecommendedTransaction===!0)),d=se(c.controllers),o=le(c.controllerUserIds);s!=null&&N.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:t,schedule:{...Ne(s)},scheduleExpenseCategoryAndClass:{expenseCategory:s.jeDebit.account?.accountName??null,expenseClass:s.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:a,journalEntryPostingStatus:n?.status.label??""},vendorName:s.vendor.name??null,controllerEmails:d,controllerUserIds:o})};function ke({jeScheduleId:e,scheduleKey:t,scheduleType:c,onDecided:s}){const l=H(),{ignoreStatusById:n,revertStatusById:i}=h((I=>ce(I).jeSchedules)),a=A.useRef(void 0),d=t==null||a.current==null?void 0:a.current==="ignore"?n[t]?.fetchState:i[t]?.fetchState,o=A.useRef(!1),m=A.useRef(s);return m.current=s,A.useEffect((()=>{o.current&&d==="Completed"&&(o.current=!1,m.current())}),[d]),{onScheduleDecision:A.useCallback(((I,p,C)=>{if(t!=null){if(I==="ignore")return(function(g){return Ze.includes(g)})(p)?(o.current=!0,a.current="ignore",void l(ze(t,c,p,C))):void 0;e!=null&&(function(g){return Xe.includes(g)})(p)&&(o.current=!0,a.current="revert",l(qe(e,t,c,p,C)))}}),[l,e,t,c]),scheduleDecisionStatus:d}}const yt=re.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
min-height: 100%;
|
|
12
|
-
width: 100%;
|
|
13
|
-
flex: 1 0 auto;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
align-items: center;
|
|
16
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
`,kt=te((function(e){const t=K(e),c=e.entityAutoCompleteState.autoCompleteText.common,s=De(e,"common");return{tenantName:t.companyName,vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:s}}}),(function(e,t){const{navigate:c,location:s}=t,l="accrued_expenses";return{onNavigateBack:()=>{if(t.onPanelNavigateBack!=null)return void t.onPanelNavigateBack();const n=de(s.state?.pathnameStackToGoBack);n.poppedPathname==null?c("../schedules/accrued_expenses"):c(n.poppedPathname,{state:{pathnameStackToGoBack:n.newStack}})},onZeniLogoClick:()=>{t.themeState.toggle()},onSave:n=>{t.setShouldNavigateBack(!0),e(ve(l,n))},onDelete:n=>{e(lt(l,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(n,i)=>{n.trim().length>=2?e(ge({searchString:n,entityType:i,searchOrigin:"common"})):n.trim().length===0&&e(Y("common"))},onCancelAutoComplete:()=>{e(Y("common"))}},onEditAmount:(n,i)=>{e(st(l,n,i))},onJELinkClick:n=>{e(nt({selectedJELinkRowIndex:n})),c("./edit_link")},onCancelAccrual:(n,i,a)=>{e(at(n,i,a))},onTransactionClick:n=>{const i=`${M(n,t.tenantEmailDomain)}`,a=V(s.state?.pathnameStackToGoBack,s.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onViewPostedJE:n=>{const i=`${M(n,t.tenantEmailDomain)}`,a=V(s.state?.pathnameStackToGoBack,s.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onViewRecordedJE:n=>{const i=`${M(n,t.tenantEmailDomain)}`,a=V(s.state?.pathnameStackToGoBack,s.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onViewBillExpense:n=>{const i=`${M(n,t.tenantEmailDomain)}`,a=V(s.state?.pathnameStackToGoBack,s.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onDetailPageChange:(n,i,a)=>{const{scheduleDetailsAccruedExpensesSection:d}=n,{amount:o,memo:m,months:I,scheduleAccruedExpenseCategory:p,scheduleClass:C,scheduleExpenseCategory:g,startDate:f,vendor:u}=d,r=C.selectedOption!=null?t.classList.find((B=>B.classId===C.selectedOption)):void 0,v=g.selectedOption!=null?t.accountList.find((B=>B.qboId===g.selectedOption)):void 0,D=p.selectedOption!=null?t.accruedAccountList.find((B=>B.qboId===p.selectedOption)):void 0,J=I?.selectedOption;e(et({scheduleType:l,localData:i,selectedJeScheduleDetailId:t.scheduleDetailId})),a!==!1||t.scheduleDetailId!=null||v?.accountId==null||t.isAccountingClassesEnabled!==!1&&r?.classId==null||D==null||u.selectedOption==null||m==null||o==null&&o==0||f==null||J==null||e(tt({scheduleType:l}))}}}))(ht),Ut=({shouldNavigateBack:e,setShouldNavigateBack:t,isRenderedInPanel:c=!1,scheduleDetailIdOverride:s,onPanelCloseAfterDecision:l,onPanelNavigateBack:n}={})=>{const[i,a]=A.useState(!1),d=e??i,o=t??a,m=Q(),I=ee(),p=H(),C=ye(),{tenantEmailDomain:g}=G(),[f,u]=A.useState(!1);if(g==null)throw new Error("Can't access this page without a tenantEmailDomain");const{scheduleDetailId:r}=G(),v=s??r;let D;v!=="new"&&(D=v);const J=Ct(v),B=h((L=>L.scheduleAccruedDetailState.selectedJEAccruedScheduleKey)),w="accrued_expenses",k=h((L=>Se(L,"accrued_expenses"))),b=h((L=>fe(L))),j=h((L=>L.classListState.fetchState)),x=h((L=>ae(L))),_=b!=="Completed"||j!=="Completed";A.useEffect((()=>{f===!1&&_?(p(He(w,D)),u(!0)):_===!1&&f===!1&&v!=="new"&&(p(Qe(w,v)),u(!0))}),[f]);const P=h((L=>K(L))),T=h((L=>ne(L,P.companyId))),O=I.state?.message==="expenseAutomation",W=h((L=>ce(L).selectedPeriod)),U=c||O,{onScheduleDecision:z,scheduleDecisionStatus:q}=ke({jeScheduleId:k.selectedJEAccruedSchedule?.jeScheduleId,scheduleKey:k.selectedJEAccruedSchedule?.jeAccruedScheduleKey,scheduleType:w,onDecided:()=>{if(l==null)if(O!==!0)m("../schedules/accrued_expenses");else{const{month:L,year:Pe}=W;m(`../../month_end_close_checks/review/je_schedules/${L}-${Pe}`)}else l()}}),F=k.fetchState,R=k.allAccountList,Z=k.allClassList,E=k.allAccruedAccountList,S=k.scheduleAccruedDetailsLocalData;if(J!==!0||k.fetchState==="Error")return y.jsx(X,{});const $=F==="Completed"&&f===!0,Oe=k.selectedJEAccruedSchedule!=null;return F==="Completed"||F==="Not-Started"||c===!0&&Oe?y.jsxs(yt,{children:[$===!0?y.jsx(ue,{analytics:N,onLoad:()=>{vt(k,w,T)}}):null,y.jsx(kt,{onScheduleDecision:U?z:void 0,scheduleDecisionStatus:q,isRenderedInPanel:c,onPanelNavigateBack:n,setShouldNavigateBack:o,scheduleAccruedDetailsView:k,location:I,navigate:m,classList:Z,accountList:R,shouldNavigateBack:d,accruedAccountList:E,scheduleLocalData:S,selectedJEScheduleKey:B,scheduleDetailId:D,selectedScheduledJournalEntries:k.selectedJEAccruedSchedule?.scheduledJournalEntry??[],themeState:C,tenantEmailDomain:g,analytics:N,controllerUserDetails:T,isAccountingClassesEnabled:x,status:k.selectedJEAccruedSchedule?.status.code})]}):y.jsx(ie,{})},Ct=e=>e!=null,vt=(e,t,c)=>{const s=e.selectedJEAccruedSchedule,l=se(c.controllers),n=le(c.controllerUserIds);s!=null&&N.trackScheduleAccruedDetailsLoaded({scheduleType:t,scheduleExpenseCategoryAndClass:{expenseCategory:s.jeDebit.account?.accountName??null,expenseClass:s.jeDebit.accountingClass?.className??null},schedule:{...Ne(s)},vendorName:s.vendor.name??null,controllerEmails:l,controllerUserIds:n})},At=re.div`
|
|
18
|
-
display: flex;
|
|
19
|
-
min-height: 100%;
|
|
20
|
-
width: 100%;
|
|
21
|
-
flex: 1 0 auto;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
align-items: center;
|
|
24
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
25
|
-
`,he=Ee.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat,It=te((function(e){const t=K(e),c=oe(e,"fixed_assets");return{tenantName:t.companyName,scheduleDetailsView:c}}),(function(e,t){const{navigate:c,location:s,vendorSearchAutoCompleteData:l,selectedScheduledJournalEntries:n}=t,i="fixed_assets",a=n.flatMap((d=>d.error)).filter((d=>!!d))??[];return{onNavigateBack:()=>{if(t.onPanelNavigateBack!=null)return void t.onPanelNavigateBack();const d=de(t.location.state?.pathnameStackToGoBack);d.poppedPathname==null?c("../schedules/fixed_assets"):t.navigate(d.poppedPathname,{state:{pathnameStackToGoBack:d.newStack}})},onZeniLogoClick:()=>{t.themeState.toggle()},onSave:d=>{e(_e(i,d,a.length>0))},onDelete:d=>{e(je(i,d))},onMarkAsComplete:()=>{t.selectedJEScheduleKey!=null&&e(be(i,t.selectedJEScheduleKey))},onEditAmount:(d,o)=>{e(we(i,d,o))},onJELinkClick:d=>{e(Je({selectedJELinkRowIndex:d})),c("./edit_link")},onTransactionClick:d=>{const o=`${M(d,t.tenantEmailDomain)}`,m=V(s.state?.pathnameStackToGoBack,s.pathname);c(o,{state:{pathnameStackToGoBack:m,message:"comingFromScheduleDetailsFixedAssets"}})},onViewLinkedJE:d=>{const o=`${M(d,t.tenantEmailDomain)}`,m=V(s.state?.pathnameStackToGoBack,s.pathname);c(o,{state:{pathnameStackToGoBack:m}})},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(d,o)=>{d.trim().length>=2?e(ge({searchString:d,entityType:o,searchOrigin:"common"})):d.trim().length===0&&e(Y("common"))},onCancelAutoComplete:()=>{e(Y("common"))}},onDetailPageChange:(d,o)=>{const{scheduleDetailsFixedAssetsSection:m,scheduleDetailsListSection:I}=d,{scheduleClass:p,scheduleExpenseCategory:C,accumulatedDepreciationCategory:g,assetId:f,months:u,startDate:r,postingDate:v,vendor:D}=m,J=l.entityAutoCompleteView.vendor.length>0?l.entityAutoCompleteView.vendor.find((T=>T.id===D?.selectedOption)):void 0,B={id:J?.zeniId??D?.selectedOption??"",name:J?.name??D?.defaultOptions.find((T=>T.value===D?.selectedOption))?.label??"",logo:J?.logo},w=p.selectedOption!=null?t.classList.find((T=>T.classId===p.selectedOption)):void 0,k=C.selectedOption!=null?t.accountList.find((T=>T.qboId===C.selectedOption)):void 0,b=g.selectedOption!=null?t.depAccountList.find((T=>T.qboId===g.selectedOption)):void 0,j=u?.selectedOption,x=I.map(((T,O)=>({...t.scheduleLocalData.jeScheduleDetails[O],amount:{...t.scheduleLocalData.jeScheduleDetails[O].amount,amount:T.amount}}))),_=v.type==="day"?v.dayOfMonth?v.dayOfMonth:1:void 0,P=v.type==="lastDayOfMonth"||void 0;e(Be({scheduleType:i,localData:{selectedAccount:k?.accountId,selectedClass:w?.classId,selectedAccumulatedDepreciationCategory:b?.accountId,selectedDate:r,selectedMonths:j,assetId:f,jeScheduleDetails:x,lastDayOfMonth:P,selectedDayOfMonth:_,selectedVendor:B},selectedJeScheduleDetailId:t.scheduleDetailId})),o!==!1||b?.accountId==null||t.scheduleDetailId!=null&&t.status!=="draft"&&t.status!=="marked_as_completed"||k?.accountId==null||t.isAccountingClassesEnabled!==!1&&w?.classId==null||r==null||j==null||P!==!0&&_==null||e(Le({scheduleType:i}))}}}))(mt),Yt=({isRenderedInPanel:e=!1,scheduleDetailIdOverride:t,onPanelCloseAfterDecision:c,onPanelNavigateBack:s}={})=>{const l=Q(),n=ee(),i=H(),a=ye(),{tenantEmailDomain:d}=G(),[o,m]=A.useState(!1),{scheduleDetailId:I}=G(),p=t??I,C=n.state?.message==="expenseAutomation",g=xt(p),f=h((E=>E.scheduleDetailState.selectedJEScheduleKey));A.useEffect((()=>{f!=null&&f.length!==0||p!=="new"||l("../schedules/fixed_assets")}),[f,p]);const u="fixed_assets",r=h((E=>oe(E,u))),v=h((E=>E.entityAutoCompleteState.autoCompleteText.common)),D=h((E=>De(E,"common"))),J=h((E=>fe(E))),B=h((E=>E.classListState.fetchState)),w=h((E=>ae(E))),k=h((E=>ce(E).selectedPeriod)),b=J!=="Completed"||B!=="Completed";A.useEffect((()=>{o===!1&&b?(i(Ae(u,F,!0)),m(!0)):b===!1&&o===!1&&(i(Ie(u,p==="new"?void 0:p,!0)),m(!0))}),[o]),A.useEffect((()=>{if(r.markAsCompleteStatus.fetchState==="Completed")if(i(xe()),C===!0){const{month:E,year:S}=k;l(`../../month_end_close_checks/review/je_schedules/${E}-${S}`)}else l("../schedules/fixed_assets")}),[r.markAsCompleteStatus.fetchState]);const j=h((E=>K(E))),x=h((E=>ne(E,j.companyId))),_=e||C,{onScheduleDecision:P,scheduleDecisionStatus:T}=ke({jeScheduleId:r.selectedJEScheduleTransaction?.jeScheduleId,scheduleKey:r.selectedJEScheduleTransaction?.jeScheduleTransactionKey,scheduleType:u,onDecided:()=>{if(c==null)if(C!==!0)l("../schedules/fixed_assets");else{const{month:E,year:S}=k;l(`../../month_end_close_checks/review/je_schedules/${E}-${S}`)}else c()}}),O=r.fetchState,W=r.allAccountList,U=r.allClassList,z=r.allDepreciationAccountList,q=r.scheduleDetailsLocalData.fixed_assets;let F;if(p!=="new"&&(F=p),g!==!0||r.fetchState==="Error")return y.jsx(X,{});const R=O==="Completed"&&o===!0,Z=r.selectedJEScheduleTransaction!=null;return O==="Completed"||e===!0&&Z?y.jsxs(At,{children:[R===!0?y.jsx(ue,{analytics:N,onLoad:()=>{Bt(r,u,x)}}):null,y.jsx(It,{onScheduleDecision:_?P:void 0,scheduleDecisionStatus:T,isRenderedInPanel:e,onPanelNavigateBack:s,location:n,navigate:l,classList:U,vendorSearchEntityAutoCompleteView:D,vendorSearchAutoCompleteData:{autoCompleteText:v,entityAutoCompleteView:D},expenseAutomationSelectedPeriod:k,usedInExpenseAutomation:C,removeJeScheduleTransactionKey:(E,S)=>{i(Te(E,S))},accountList:W,depAccountList:z,scheduleLocalData:q,selectedJEScheduleKey:f,scheduleDetailId:F,selectedScheduledJournalEntries:r.selectedJEScheduleTransaction?.scheduledJournalEntry??[],themeState:a,tenantEmailDomain:d,analytics:N,controllerUserDetails:x,isAccountingClassesEnabled:w,status:r.selectedJEScheduleTransaction?.status.code})]}):y.jsx(ie,{})},xt=e=>e!=null,Tt=e=>({transactionDate:e.date.format(he),transactionAmount:e.amount,scheduleCategory:e.account.accountName,scheduleClass:e.classBase?.className??null,description:e.memo}),Bt=(e,t,c)=>{const s=e.selectedJEScheduleTransaction?.baseTransaction,l=e.selectedJEScheduleTransaction,n=se(c.controllers),i=le(c.controllerUserIds);var a;s!=null&&l!=null&&N.trackScheduleDetailsLoaded({scheduleType:t,transaction:{...Tt(s)},scheduleExpenseCategoryAndClass:{expenseCategory:l.jeDebit.account?.accountName??null,expenseClass:l.jeDebit.accountingClass?.className??null},scheduledTransaction:{...(a=l,{currentBalance:a.balanceAsOfToday??null,currentStatus:a.status.label,period:a.period??null,startMonth:a.startDate?.format(he)??null,endMonth:a.endDate?.format(he)??null})},vendorName:l.vendor.name??null,fixedAssetsDetails:{accumulatedDepreciationCategory:l.jeCredit.account?.accountName??null,assetId:l.otherAttributes.assetId??null},controllerEmails:n,controllerUserIds:i})},Lt=re.div`
|
|
26
|
-
display: flex;
|
|
27
|
-
min-height: 100%;
|
|
28
|
-
width: 100%;
|
|
29
|
-
flex: 1 0 auto;
|
|
30
|
-
flex-direction: column;
|
|
31
|
-
align-items: center;
|
|
32
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
33
|
-
`,me=Ee.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat,Jt=te((function(e,t){const c=K(e),s=oe(e,t.scheduleTab);return{tenantName:c.companyName,scheduleDetailsView:s}}),(function(e,t){const{navigate:c,location:s,vendorSearchAutoCompleteData:l,selectedScheduledJournalEntries:n}=t,i=n.flatMap((a=>a.error)).filter((a=>!!a))??[];return{onNavigateBack:()=>{if(t.onPanelNavigateBack!=null)return void t.onPanelNavigateBack();const a=de(t.location.state?.pathnameStackToGoBack);a.poppedPathname==null?c("../schedules/prepaid_expenses"):t.navigate(a.poppedPathname,{state:{pathnameStackToGoBack:a.newStack}})},onZeniLogoClick:()=>{t.themeState.toggle()},onSave:a=>{e(_e(t.scheduleTab,a,i.length>0))},onDelete:a=>{e(je(t.scheduleTab,a))},onMarkAsComplete:()=>{t.selectedJEScheduleKey!=null&&e(be(t.scheduleTab,t.selectedJEScheduleKey))},onEditAmount:(a,d)=>{e(we(t.scheduleTab,a,d))},onJELinkClick:a=>{e(Je({selectedJELinkRowIndex:a})),c("./edit_link")},onTransactionClick:a=>{const d=`${M(a,t.tenantEmailDomain)}`,o=V(s.state?.pathnameStackToGoBack,s.pathname);c(d,{state:{pathnameStackToGoBack:o,message:"comingFromScheduleDetails"}})},onViewLinkedJE:a=>{const d=`${M(a,t.tenantEmailDomain)}`,o=V(s.state?.pathnameStackToGoBack,s.pathname);c(d,{state:{pathnameStackToGoBack:o}})},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(a,d)=>{a.trim().length>=2?e(ge({searchString:a,entityType:d,searchOrigin:"common"})):a.trim().length===0&&e(Y("common"))},onCancelAutoComplete:()=>{e(Y("common"))}},onDetailPageChange:(a,d)=>{const{scheduleDetailsSection:o,scheduleDetailsListSection:m}=a,{scheduleClass:I,scheduleExpenseCategory:p,months:C,startDate:g,postingDate:f,vendor:u}=o,r=l.entityAutoCompleteView.vendor.length>0?l.entityAutoCompleteView.vendor.find((x=>x.id===u?.selectedOption)):void 0,v={id:r?.zeniId??u?.selectedOption??"",name:r?.name??u?.defaultOptions.find((x=>x.value===u?.selectedOption))?.label??"",logo:r?.logo},D=I.selectedOption!=null?t.classList.find((x=>x.classId===I.selectedOption)):void 0,J=p.selectedOption!=null?t.accountList.find((x=>x.qboId===p.selectedOption)):void 0,B=C?.selectedOption,w=m.map(((x,_)=>({...t.scheduleLocalData.jeScheduleDetails[_],amount:{...t.scheduleLocalData.jeScheduleDetails[_].amount,amount:x.amount}}))),k=f.type==="day"?f.dayOfMonth?f.dayOfMonth:1:void 0,b=f.type==="lastDayOfMonth"||void 0,j={selectedAccount:J?.accountId,selectedClass:D?.classId,selectedDate:g,selectedMonths:B,jeScheduleDetails:w,lastDayOfMonth:b,selectedVendor:v,selectedDayOfMonth:k};e(Be({scheduleType:t.scheduleTab,localData:j,selectedJeScheduleDetailId:t.scheduleDetailId})),d!==!1||t.scheduleDetailId!=null&&t.status!=="draft"&&t.status!=="marked_as_completed"||J?.accountId==null||t.isAccountingClassesEnabled!==!1&&D?.classId==null||g==null||B==null||b!==!0&&k==null||e(Le({scheduleType:t.scheduleTab}))}}}))(pt),Wt=({isRenderedInPanel:e=!1,scheduleDetailIdOverride:t,scheduleTypeOverride:c,onPanelCloseAfterDecision:s,onPanelNavigateBack:l}={})=>{const n=Q(),i=ee(),a=H(),d=ye(),{tenantEmailDomain:o}=G(),[m,I]=A.useState(!1),p=i.state?.message==="expenseAutomation",{scheduleType:C,scheduleDetailId:g}=G(),f=t??g,u=wt(c??C,f),r=h((S=>S.scheduleDetailState.selectedJEScheduleKey));A.useEffect((()=>{r!=null&&r.length!==0||f!=="new"||n("../schedules/prepaid_expenses")}),[r,f]);const v=c??pe(C)??"prepaid_expenses",D=h((S=>oe(S,v))),J=h((S=>S.entityAutoCompleteState.autoCompleteText.common)),B=h((S=>De(S,"common"))),w=h((S=>fe(S))),k=h((S=>S.classListState.fetchState)),b=h((S=>ae(S))),j=h((S=>ce(S).selectedPeriod)),x=w!=="Completed"||k!=="Completed";A.useEffect((()=>{m===!1&&x?(a(Ae(v,R,!0)),I(!0)):x===!1&&m===!1&&(a(Ie(v,f==="new"?void 0:f,!0)),I(!0))}),[m]),A.useEffect((()=>{if(D.markAsCompleteStatus.fetchState==="Completed")if(a(xe()),p===!0){const{month:S,year:$}=j;n(`../../month_end_close_checks/review/je_schedules/${S}-${$}`)}else n("../schedules/prepaid_expenses")}),[D.markAsCompleteStatus.fetchState]);const _=h((S=>K(S))),P=h((S=>ne(S,_.companyId))),T=e||p,{onScheduleDecision:O,scheduleDecisionStatus:W}=ke({jeScheduleId:D.selectedJEScheduleTransaction?.jeScheduleId,scheduleKey:D.selectedJEScheduleTransaction?.jeScheduleTransactionKey,scheduleType:v,onDecided:()=>{if(s==null)if(p!==!0)n("../schedules/prepaid_expenses");else{const{month:S,year:$}=j;n(`../../month_end_close_checks/review/je_schedules/${S}-${$}`)}else s()}}),U=D.fetchState,z=D.allAccountList,q=D.allClassList,F=D.scheduleDetailsLocalData;let R;if(f!=="new"&&(R=f),u!==!0||D.fetchState==="Error")return y.jsx(X,{});const Z=U==="Completed"&&m===!0,E=D.selectedJEScheduleTransaction!=null;return U==="Completed"||e===!0&&E?y.jsxs(Lt,{children:[Z===!0?y.jsx(ue,{analytics:N,onLoad:()=>{jt(D,v,P)}}):null,y.jsx(Jt,{onScheduleDecision:T?O:void 0,scheduleDecisionStatus:W,isRenderedInPanel:e,onPanelNavigateBack:l,location:i,vendorSearchEntityAutoCompleteView:B,vendorSearchAutoCompleteData:{autoCompleteText:J,entityAutoCompleteView:B},usedInExpenseAutomation:p,removeJeScheduleTransactionKey:(S,$)=>{a(Te(S,$))},expenseAutomationSelectedPeriod:j,navigate:n,classList:q,accountList:z,scheduleLocalData:F[v],selectedJEScheduleKey:r,scheduleDetailId:R,selectedScheduledJournalEntries:D.selectedJEScheduleTransaction?.scheduledJournalEntry??[],themeState:d,tenantEmailDomain:o,scheduleTab:v,analytics:N,controllerUserDetails:P,isAccountingClassesEnabled:b,status:D.selectedJEScheduleTransaction?.status.code})]}):y.jsx(ie,{})},wt=(e,t)=>pe(e)!=null&&t!=null,bt=e=>({transactionDate:e.date.format(me),transactionAmount:e.amount,scheduleCategory:e.account.accountName,scheduleClass:e.classBase?.className??null,description:e.memo}),jt=(e,t,c)=>{const s=e.selectedJEScheduleTransaction?.baseTransaction,l=e.selectedJEScheduleTransaction,n=se(c.controllers),i=le(c.controllerUserIds);var a;s!=null&&l!=null&&N.trackScheduleDetailsLoaded({scheduleType:t,transaction:{...bt(s)},scheduleExpenseCategoryAndClass:{expenseCategory:l.jeDebit.account?.accountName??null,expenseClass:l.jeDebit.accountingClass?.className??null},scheduledTransaction:{...(a=l,{currentBalance:a.balanceAsOfToday??null,currentStatus:a.status.label,period:a.period??null,startMonth:a.startDate?.format(me)??null,endMonth:a.endDate?.format(me)??null})},vendorName:l.vendor.name??null,controllerEmails:n,controllerUserIds:i})};export{$t as J,Yt as S,Ut as a,Wt as b,Kt as c};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-MJal1hew.js","assets/sentry-DHDsO12F.js","assets/core-B5mDy9pu.js","assets/zeni-epic-state-7eY0g-Bc.js","assets/index-CrBk11WI.js","assets/mui-Do6nLzGb.js","assets/analytics-D6GpUSOP.js","assets/utils-BsODCDYR.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-CZNxS99K.js","assets/withTransactionSidePanel-Co9xwJi4.js","assets/useAskAiCfoHostNavButtonProps-BamKKcjy.js","assets/TransactionDetailScreen-CcO0FUjf.js","assets/decodeURIComponentSafe-DANuhXnG.js","assets/useInitialThreadRequest-Bwvu8W79.js","assets/routePaths-CeCPwkIf.js","assets/expenseAutomationHelper-DBDpSggk.js","assets/stripSplatSuffix-CQQXAy0N.js","assets/analyticsHelper-H1Xp9Uyk.js","assets/CompanyPassportScreen-D3aXSi-v.js","assets/MobileAppDrawer-CjKRvtSN.js","assets/InboxNotificationsProvider-BmF5-_KA.js","assets/useTaskManagerAccess-CdPkYUw1.js","assets/useAiCfoDashboardSuggestedQuestionsChips-CSs_vZyp.js","assets/FeaturePreviewScreen-B5Hq_fA2.js","assets/BillPayRoutes-T-Lct0sH.js","assets/AddressScreen-DhOzuvLT.js","assets/DomesticWireDetailScreen-DGMYJzFE.js","assets/BusinessVerificationPageScreen-CPnmoF6z.js","assets/DrawerScreen-0c_ealW2.js","assets/SetupPagesScreen-DL_o3Z3i.js","assets/BillPayApprovalRoutes-Bu8vaB46.js","assets/ReimbursementApprovalRuleDetailScreen-5MNnVAqy.js","assets/getLocaleForTenant-xZFgPOZu.js","assets/ReimbursementRoutes-G7JKpwJT.js","assets/ReimbursementApprovalRoutes-CEEFZS8r.js","assets/TransactionListRoutes-C1dcOuNI.js","assets/ZeniAccountStatementScreen-wUD7vElb.js","assets/SettingsRoutes-BrsZS6Xg.js","assets/AccountMappingScreen-BPRZHuGA.js","assets/QBOConnectionScreen-CvbLmaBz.js","assets/empty-Dj4ZMRNZ.js","assets/index-k1-Pd2Ki.js","assets/url-BxiN6LKq.js","assets/index-6yt3BfRL.js","assets/accountMappingHelper-DqBiQF6x.js","assets/useEmailConnectResultRefresh-C-cGd7Tb.js","assets/ReportsRoutes-Bgz_pVpt.js","assets/ChargeCardRoutes-BKDstMtL.js","assets/useChargeCardPusherEvents--oeBBRmO.js","assets/PeopleRoutes-DOJEhG7S.js","assets/ExpenseAutomationRoutes-Cjko15u2.js","assets/useActualMatchingMatchDetail-CAkhwxRr.js","assets/ScheduleDetailsPrepaidExpensesScreen-luC81eat.js","assets/pathToGoBack-DP_bGWF-.js","assets/TreasuryRoutes-D_yTnBTc.js","assets/VendorsRoutes-BVvoooN6.js","assets/ZeniAccountRoutes-DImTioOs.js","assets/AddressRoutes-3x6JmFfR.js","assets/PandLWithForecastRoutes-ByUQV7tm.js","assets/CustomerOnboardingRoutes-BivxymAu.js","assets/TransactionDetailRoutes-BszvDFhJ.js","assets/EntityDetailRoutes-Db8C6L2J.js","assets/InvoicingRoutes-0xj-PlaS.js","assets/NotificationRoutes-CT24D8Uv.js","assets/PerformanceRoutes-CdWAF5sI.js","assets/ActualMatchingMatchDetailScreen-CoU3K4PM.js","assets/RewardsRoutes-Bcb3M70b.js","assets/TaskRoutes-DLlKeXMA.js","assets/TaskListScreen-W52vNP7m.js","assets/AiCfoScreen-Blx6lCnY.js","assets/CardsAiCfoScreen-CIq15Z-M.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as s,bn as Es,fF as hs,d_ as ps,dZ as xs,AV as gs,di as Rs,c8 as js,gJ as Is,g9 as Ts,df as pe,cG as As,gn as bs,cy as Ds,bE as ys,br as fs,U0 as Cs,v as vs,U3 as Us,bq as Os,U4 as Ps,bK as ws,bJ as Fs,bt as Ls,cu as Vs,U5 as ks,U6 as Hs,da as Ss,dd as Bs,dc as Ns,cF as Ms,cM as Zs,pS as xe,gi as ge,gY as Gs,gk as Re,gL as je,gM as Ie,gl as $s}from"./zeni-epic-state-7eY0g-Bc.js";import{j as e}from"./liveblocks-UOzcPsHa.js";import{a as P}from"./sentry-DHDsO12F.js";import{N as u,u as zs,h as qs,i as Ys,g as Js,j as G,q as Te,n as Ws,o as n}from"./core-B5mDy9pu.js";import{I as l,E as Ks,u as Qs,z as f,N as Xs,e as et,q as st,c as B,g as tt,J as nt,U as at,L as F,G as Ae,t as _,P as ot,K as rt,j as ne}from"./index-CrBk11WI.js";import"./mui-Do6nLzGb.js";import{f as be}from"./analyticsHelper-H1Xp9Uyk.js";import{t as it}from"./getLocaleForTenant-xZFgPOZu.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},D=new o.Error().stack;D&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[D]="615b58f0-28b6-4759-abe9-e7aa53486bdb",o._sentryDebugIdIdentifier="sentry-dbid-615b58f0-28b6-4759-abe9-e7aa53486bdb")}catch{}})();const lt=l((()=>s((()=>import("./NotFoundScreen-MJal1hew.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ut=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),dt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),De=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),fe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),C=({showZeniAccountRoute:o,isUserHasBillPayAccess:D,isUserHasReimbursementAccess:N,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:U,tenantEmailDomain:v})=>{if(V===!0){if(o)return e.jsx(ye,{tenantEmailDomain:v});if(i)return e.jsx(De,{tenantEmailDomain:v});if(U)return e.jsx(fe,{tenantEmailDomain:v})}return o?e.jsx(ye,{tenantEmailDomain:v}):i?e.jsx(De,{tenantEmailDomain:v}):U?e.jsx(fe,{tenantEmailDomain:v}):D?e.jsx(dt,{tenantEmailDomain:v}):N?e.jsx(ut,{tenantEmailDomain:v}):e.jsx(lt,{})},ct={dashboard:()=>s((()=>import("./DashboardRoutes-CZNxS99K.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])),bills:()=>s((()=>import("./BillPayRoutes-T-Lct0sH.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-G7JKpwJT.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])),transactions:()=>s((()=>import("./TransactionListRoutes-C1dcOuNI.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])),settings:()=>s((()=>import("./SettingsRoutes-BrsZS6Xg.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])),reports:()=>s((()=>import("./ReportsRoutes-Bgz_pVpt.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-BKDstMtL.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])),people:()=>s((()=>import("./PeopleRoutes-DOJEhG7S.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-Cjko15u2.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])),treasury:()=>s((()=>import("./TreasuryRoutes-D_yTnBTc.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])),vendors:()=>s((()=>import("./VendorsRoutes-BVvoooN6.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-DImTioOs.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8]))},mt=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},_t=l((()=>s((()=>import("./ReportsRoutes-Bgz_pVpt.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])))),Et=l((()=>s((()=>import("./AddressRoutes-3x6JmFfR.js")),__vite__mapDeps([58,1,2,3,26,4,5,6,7,0,8])))),ht=l((()=>s((()=>import("./PeopleRoutes-DOJEhG7S.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])))),pt=l((()=>s((()=>import("./PandLWithForecastRoutes-ByUQV7tm.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,24,11,14,15,20,21,22,8])))),xt=l((()=>s((()=>import("./CustomerOnboardingRoutes-BivxymAu.js")),__vite__mapDeps([60,1,2,3,26,4,5,6,7,0,40,41,42,43,44,13,46,49,8])))),gt=l((()=>s((()=>import("./VendorsRoutes-BVvoooN6.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])))),Rt=l((()=>s((()=>import("./TransactionDetailRoutes-BszvDFhJ.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-Db8C6L2J.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),jt=l((()=>s((()=>import("./DashboardRoutes-CZNxS99K.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])))),ve=l((()=>s((()=>import("./BillPayRoutes-T-Lct0sH.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])))),It=l((()=>s((()=>import("./SettingsRoutes-BrsZS6Xg.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])))),Tt=l((()=>s((()=>import("./InvoicingRoutes-0xj-PlaS.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,26,0,20,21,22,40,41,42,43,44,13,8])))),Ue=l((()=>s((()=>import("./ReimbursementRoutes-G7JKpwJT.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])))),At=l((()=>s((()=>import("./ZeniAccountRoutes-DImTioOs.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8])))),bt=l((()=>s((()=>import("./TreasuryRoutes-D_yTnBTc.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])))),Dt=l((()=>s((()=>import("./TransactionListRoutes-C1dcOuNI.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])))),yt=l((()=>s((()=>import("./ChargeCardRoutes-BKDstMtL.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])))),ft=l((()=>s((()=>import("./NotificationRoutes-CT24D8Uv.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,11,22,8])))),Ct=l((()=>s((()=>import("./PerformanceRoutes-CdWAF5sI.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,11,20,21,22,8])))),vt=l((()=>s((()=>import("./ExpenseAutomationRoutes-Cjko15u2.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])))),Ut=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-CoU3K4PM.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,52,17,13,15,0,8])))),Ot=l((()=>s((()=>import("./RewardsRoutes-Bcb3M70b.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,0,8])))),Pt=l((()=>s((()=>import("./TaskRoutes-DLlKeXMA.js")),__vite__mapDeps([68,1,2,3,0,4,5,6,7,14,20,21,22,69,11,8])))),wt=l((()=>s((()=>import("./AiCfoScreen-Blx6lCnY.js")),__vite__mapDeps([70,1,2,3,4,5,6,7,23,54,15,8])))),Oe=l((()=>s((()=>import("./CardsAiCfoScreen-CIq15Z-M.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,8])))),b=l((()=>s((()=>import("./NotFoundScreen-MJal1hew.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Ft=l((()=>s((()=>import("./TaskListScreen-W52vNP7m.js").then((o=>o.f))),__vite__mapDeps([69,1,2,3,4,5,6,7,11,20,21,22,8])))),Lt=({isDashboardAccess:o,showZeniAccountRoute:D,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:i,showTreasuryRoute:V,isTenantBankingOnly:U,isTenantCardsOnly:v,showChargeCardRoute:k})=>{if(U===!0){if(D)return e.jsx(u,{to:"checking"});if(V)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return v===!0&&k?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):D?e.jsx(u,{to:"checking"}):V?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Pe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),Gt=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const D=zs(),N=qs(),{tenantEmailDomain:i}=Ys(),V=Ks().mode,{setLoading:U,clearAllLoading:v,clearLoading:k}=Qs(),y=f.getSignedInUserTenant(i)?.tenantId,I=f.getSignedInUser(),W=Es(I),$=Js(),[L,we]=P.useState(!1),r=G((a=>hs(a))),{useFeatureGate:H}=Xs(),M=et(),K=st(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=H(B.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=H(B.isDebitCardFeatureEnabled),T=G((a=>a.tenantState.fetchState)),p=G((a=>a.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?ps(oe,r):void 0,Q=p==="Completed"||T==="Completed"?xs(r):void 0,re=p==="Completed"||T==="Completed"?gs(r)&&!Rs(r):void 0,ke=tt(r,Ve,oe),{isCardsHidden:He}=nt(r?.tenantId),Se=!ke||!!He,{isFeatureEnabled:Be}=H(B.isSettingsFeatureEnabled),{isFeatureEnabled:X}=H(B.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=H(B.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||rt==="DEV",Ze=r?.userRole!=null&&js(r.userRole),z=G((a=>Is(a)));if(i!=null){const a=f.getSignedInUserTenant(i);I!=null&&a!=null&&be(I,r,V)}const Z={tenantId:y,userId:I?.userId,sessionId:I?.zeniSessionId},ie=Ts(),h=at(),Ge=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),$e=As(h?.loggedInUserRoleMap),ee=Te("/:tenantEmailDomain/onboarding/*")!==null,ze=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=ze?.params.selectedPeriod,qe=G((a=>Z.tenantId!=null?bs(a,Z.tenantId):void 0));P.useEffect((()=>{U(F.TENANT_FETCHING),o(i)}),[i]),P.useEffect((()=>{if(se!=null&&y!=null){const a=se.split("-");if(a.length===2){const A=Ds(Number(a[0])),c=Number(a[1]),t=ys(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=fs();t.isAfter(d,"month")===!1?D(Cs(y,{month:A,year:c})):N(`/${i}/month_end_close_checks/review`)}}}),[se,i,y]),P.useEffect((()=>{L||(we(!0),U(F.TENANT_FETCHING))}),[L,Z,ie,I,D,f]),P.useLayoutEffect((()=>{!vs(ie,Z)&&f.isSignedIn()&&(U(F.TENANT_FETCHING),(function(a,A,c,t){if(ge(A?.userId,A?.zeniSessionId,a.tenantId),c(Gs(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=f.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(it(t)),d?.tenantEmailDomain!=null&&f.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?ne.identify(a.userId,{tenant_id:a.tenantId}):ne.resetUserIdentity()})(Z,I,D,qe))}),[y]),P.useEffect((()=>{f.isSignedIn()&&(U(F.TENANT_FETCHING),(function(a,A,c,t,d,q,S){if(c==null&&t==null)return void console.warn("There is no current tenant selected!!");const Y=t!=null&&d?.zeniSessionId!=null,cs=c==null||c.tenantId!==t,ms=c!=null&&c.excludedResources==null,_s=c!=null&&c.externalConnections==null;if(Y&&cs){S(Re(t));const J=f.getSignedInUserTenantWithId(t);J?.tenantEmailDomain!=null&&f.saveActiveTenantDomainForUser(J?.tenantEmailDomain),ge(d?.userId,d?.zeniSessionId,t),_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),S(je(d.userId,t))),_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),S(Ie(d.userId,t)))}else Y&&ms&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),S(je(d.userId,t))),Y&&_s&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),S(Ie(d.userId,t)));if(Y){ne.identify(d.userId,{tenant_id:t});const J=t==null||t!=null&&(A==="Completed"||A==="Error");a==="Completed"||A!=="Not-Started"&&A!=="Error"||t==null||!_.shouldFetchActiveTenant(t)||(_.markActiveTenantFetchStarted(t),q(F.TENANT_FETCHING),S($s(d.userId,t,d.zeniSessionId))),J&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),S(xe(d.userId,d.zeniSessionId)))}})(T,p,r,y,I,U,D))}),[y,p]),P.useEffect((()=>{f.isSignedIn()&&T==="Completed"&&z.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),f.saveSignedInUserTenants(Us(z.tenantsBaseInOrder)),I!=null&&be(I,r,V,void 0,z.tenantsBaseInOrder))}),[z,T,r,I]),P.useEffect((()=>{p==="In-Progress"&&U(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&y!=null?(v(),_.markActiveTenantFetchCompleted(y)):p==="Error"&&y!=null&&(_.markActiveTenantFetchFailed(y),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,y,L]);const le=P.useRef(!1);P.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(a=mt,A=3e3){setTimeout((()=>{const c=t=>{if(t>=a.length)return;const d=a[t],q=ct[d];q!=null?q().then((()=>ae((()=>c(t+1))))).catch((()=>ae((()=>c(t+1))))):c(t+1)};ae((()=>c(0)))}),A)})())}),[p,L]);const O=r?.userRole!=null&&Os(r?.userRole),{isFeatureEnabled:Ye}=H(B.isReferralFeatureEnabled),{isFeatureEnabled:Je}=H(B.isAccrualEnabled),We=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Ke=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!O,de=!Se&&!O,Qe=Ps(h?.loggedInUserRoleMap),Xe=r.externalConnections?.accounting[0]?.isValid,es=r.externalConnections?.fetchState==="Completed",te=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!O,me=ce&&ws(h?.loggedInUserRoleMap),_e=Fe&&!O,ss=Le&&!O,ts=ue&&Fs(h?.loggedInUserRoleMap),ns=de&&Ls(h?.loggedInUserRoleMap),as=_e&&Vs(h?.loggedInUserRoleMap),os=ks(h?.loggedInUserRoleMap),rs=Hs(h?.loggedInUserRoleMap),is=Ss(h?.loggedInUserRoleMap),ls=Bs(h?.loggedInUserRoleMap),us=Ns(h?.loggedInUserRoleMap),x=Ms(h?.loggedInUserRoleMap),g=Zs(h?.loggedInUserRoleMap),Ee=ue&&x,he=ce&&g,R=_e&&is,j=ss&&ls,m=de&&us,ds=r.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||$e===!0||Qe===!0||os===!0||rs===!0;return f.isSignedIn()?y==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&T!=="In-Progress"&&D(xe(I.userId,I.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(te===!0||W&&!ee)&&es&&Xe!==!0&&E===!1&&Q===!1&&re===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||te!==!0||ee||W?!L||te!==!1||ee||W?L&&r?.userRole&&E!=null&&Q!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ws,{children:e.jsxs(n,{element:e.jsx(ot,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Lt,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,isTenantCardsOnly:Q,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(jt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(_t,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"people/*",element:ds||w?e.jsx(ht,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(pt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(xt,{})}),e.jsx(n,{path:"transaction/*",element:w&&O===!1||We||Ke?e.jsx(Rt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"transactions/*",element:w&&O===!1?e.jsx(Dt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"customer/*",element:w&&O===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,isTenantBankingOnly:E,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"vendor/*",element:w&&O===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"tasks",element:e.jsx(Ft,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Pt,{})}),e.jsx(n,{path:"address/*",element:ts||me||as||ns?e.jsx(Et,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(At,{}):e.jsx(b,{})}),e.jsx(n,{path:"treasury/*",element:j?e.jsx(bt,{}):e.jsx(b,{})}),e.jsx(n,{path:"performance",element:K===!0?e.jsx(Ct,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:K===!0&&O===!1?e.jsx(vt,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:K===!0&&O===!1&&Je===!0?e.jsx(Ut,{}):e.jsx(b,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(ft,{})}),e.jsx(n,{path:"vendors/*",element:Ge?e.jsx(gt,{}):e.jsx(b,{})}),e.jsx(n,{path:"bill/*",element:Ee?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"bills/*",element:Ee?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursement/*",element:he?e.jsx(Ue,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursements/*",element:he?e.jsx(Ue,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"settings/*",element:Be?e.jsx(It,{hasAdminLevelAccess:me}):e.jsx(b,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(Tt,{}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask",element:m&&M?e.jsx(Oe,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Oe,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(yt,{}):e.jsx(b,{})}),e.jsx(n,{path:"rewards/*",element:Ye?e.jsx(Ot,{}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:M?e.jsx(wt,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"*",element:e.jsx(b,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{C as F,Gt as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-UOzcPsHa.js";import{a as f,R as T,q as A}from"./sentry-DHDsO12F.js";import{u as j,h as z,j as l,g as D,N as F,l as M}from"./core-B5mDy9pu.js";import{u as O,z as s,E as P,j as w,G as N,Q as _,S as B,T as $,X as V,Y as q,Z as v}from"./index-CrBk11WI.js";import{fF as J,TL as Q,U3 as R,gi as W,gk as X,U8 as G,gU as H,dj as Y,U9 as b,Ua as Z,Ub as K,b$ as U}from"./zeni-epic-state-7eY0g-Bc.js";import"./mui-Do6nLzGb.js";import{u as ee}from"./useDeviceId-Bi38IJl0.js";import{f as te}from"./analyticsHelper-H1Xp9Uyk.js";import{t as ne}from"./getLocaleForTenant-xZFgPOZu.js";import"./recharts-uFX1dZS-.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="0b518c63-64b7-451e-a808-68f489bd3ac3",t._sentryDebugIdIdentifier="sentry-dbid-0b518c63-64b7-451e-a808-68f489bd3ac3")}catch{}})();const ie=M((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(K({authCode:n,oauthProvider:a,appType:"web",redirectUri:U(c),sourceUri:U(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Z(n,a)))},clearSignInError:()=>{t(b())}}}))(q),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=j(),d=z(),{clearAllLoading:g}=O(),n=s.getSignedInUser();f.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:L,accountLocked:y,accountUnlockTime:k}=l((e=>e.tenantState)),p=l((e=>e.tenantState.fetchState)),h=l((e=>e.tenantState.activeTenantFetchState.fetchState)),S=l((e=>e.tenantState.signInState)),o=l((e=>e.tenantState.loggedInUser)),r=l((e=>J(e))),I=l((e=>Q(e))),m=D(),E=P().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(f.useEffect((()=>{L.fetchState==="Completed"&&c!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[L.fetchState,c]),f.useEffect((()=>{t(void 0)}),[]),f.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&h!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(R(I.tenantsInOrder),o.zeniSessionId),W(o.userId,o.zeniSessionId,r.tenantId),i(X(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(G("Completed")),N.updateAppLocaleID(ne(r)),te(o,r,E,void 0,I.tenantsInOrder),H().then((()=>{const e=V();e!=null&&_(e)})),setTimeout((()=>{w.trackLogin(B.Event.loginSuccess,o.authProvider??"google",Y(r.productSettings))}),2e3))}),[S,p,h,o,r,I,E,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return u.jsx(F,{to:e,state:{...m.state,origin:""}})}return u.jsxs(u.Fragment,{children:[u.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),y===!0&&k!=null?u.jsx($,{onClose:()=>i(b()),unlockDate:k}):null]})}export{ve as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-UOzcPsHa.js";import{a as i}from"./sentry-DHDsO12F.js";import{u as l,g as d,N as u}from"./core-B5mDy9pu.js";import{z as n,j as a,S as m,a7 as p}from"./index-CrBk11WI.js";import{gX as g,Up as b}from"./zeni-epic-state-7eY0g-Bc.js";import{n as y}from"./mui-Do6nLzGb.js";import"./recharts-uFX1dZS-.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.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]="03ebd2f3-e2e2-4b24-b1c9-b1ec30f0b8c9",e._sentryDebugIdIdentifier="sentry-dbid-03ebd2f3-e2e2-4b24-b1c9-b1ec30f0b8c9")}catch{}})();function N(){const e=l(),t=d(),r=i.useRef(!1),c=n.isSignedIn(),o=t.state?.message==="logout"||c;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),b(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(f){console.error("Error during sign out:",f)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=y.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;export{N as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-UOzcPsHa.js";import ue from"./NotFoundScreen-MJal1hew.js";import{a as k}from"./sentry-DHDsO12F.js";import{h as Y,u as ee,j as b,g as de,i as ke,N as pe,l as me,n as Se,o as E}from"./core-B5mDy9pu.js";import{PR as ae,PU as fe,PO as Te,ZH as ge,fF as te,a1P as se,Qe as g,Q6 as T,PL as he,QK as Ee,QD as be,a1Q as ne,gh as oe,a1R as V,PH as Ie,PE as De,uT as Ce,uH as Ge,mz as Re,Q4 as _e,a1S as Ue,QX as ye,Q0 as Pe,Qp as xe,Qm as Be,PX as je,Qj as we,Qi as ve}from"./zeni-epic-state-7eY0g-Bc.js";import{z as _,e5 as Ae,M as Fe,N as Le,c as G,a4 as ie,p as R,a8 as Ke,j as M,S as Qe,e6 as $e,Z as q,ae as Ne}from"./index-CrBk11WI.js";import{n as Oe}from"./mui-Do6nLzGb.js";import{u as ze}from"./useInitialThreadRequest-Bwvu8W79.js";import{M as Ze}from"./MobileAppDrawer-CjKRvtSN.js";import{b as Ve,a as Me,u as qe,T as f,t as He,c as H,d as X,e as Xe}from"./TaskListScreen-W52vNP7m.js";import"./recharts-uFX1dZS-.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.js";import"./InboxNotificationsProvider-BmF5-_KA.js";import"./useTaskManagerAccess-CdPkYUw1.js";import"./useAskAiCfoHostNavButtonProps-BamKKcjy.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]="a3f5236d-09ca-4945-8ef0-f09d08e9712f",e._sentryDebugIdIdentifier="sentry-dbid-a3f5236d-09ca-4945-8ef0-f09d08e9712f")}catch{}})();function Je(){const e=Y(),a=ee(),n=_.getSignedInUser(),{cannedResponses:c,fetchState:s,saveFetchState:u}=b((o=>o.cannedResponsesState)),d=k.useCallback((()=>{a(ae())}),[a]),m=k.useCallback(((o,I,D)=>{a(fe({name:o,content:I,cannedResponseId:D}))}),[a]),t=k.useCallback((o=>{a(Te({cannedResponseId:o}))}),[a]);if(n==null)throw Error("Can't access quick responses page without signing in...");return r.jsx(Ae,{cannedResponses:c,isLoading:s==="In-Progress"||s==="Not-Started",isSaving:u==="In-Progress",onBackClick:()=>e(-1),onDelete:t,onFetch:d,onSave:m})}const L=e=>e?.taskState?.taskByID,A=(e,a)=>{const n=L(e);if(a!=null&&n!=null)return n[a]?.parentTaskId??void 0},We=ge([A,(e,a)=>{const n=A(e,a),c=L(e);if(n!=null&&c!=null)return c[n]?.name},(e,a)=>{const n=A(e,a),c=L(e);return n!=null&&c!=null&&c[n]!=null}],((e,a,n)=>{if(e!=null&&n===!0)return{id:e,name:a??""}}));let J,W=[];const Ye=me((function(e,a){const{location:n,taskGroupId:c}=a,s=ne(e,a.taskId),u=te(e),d=We(e,a.taskId),m=s.taskGroupId??c,t=m!=null?V(e.taskGroupState,m):void 0,o=_.getSignedInUser(),I=u.tenantId,D={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:I??""},x=se(e),{tenantEmailDomain:B}=u,U=s.recurringSourceTaskId,j=U!=null?`${q.appUrl}/${B}/tasks/${encodeURIComponent(U)}`:void 0;var h;return{taskDetailSelectorView:s,authParams:D,isZeniUser:_.isZeniUser(),userGroupList:((h=e.userGroupsState.userGroupByUserGroupId)!==J&&(J=h,W=Object.values(h)),W),isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:Ne.fileMicroServiceBaseUrl,companyName:a.currentTenant.companyName,companyId:a.currentTenant.companyId,currentUrl:`${q.appUrl}${a.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:j,tagListView:x,taskGroupName:m!=null&&t!=null&&t.isDefault===!1?t.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((S=>V(e.taskGroupState,S))).filter((S=>S!=null&&!S.isDeleted)).map((S=>({id:S.id,name:S.name,isDefault:S.isDefault}))),subtasks:s.subtasks,parentTaskRef:d,subTaskCreateStatus:e.taskDetailState?.subTaskCreateStatus?.fetchState}}),(function(e,a){const{taskId:n,navigate:c,currentTenant:s,location:u,taskGroupId:d}=a,{tenantEmailDomain:m}=s;return{onSaveChangesToLocalStore:t=>{e(ve({taskDetailLocalData:t,taskId:n}))},onSaveDetailClick:t=>{e(we(n,t??d))},onArchiveTaskClick:()=>{a.taskId!=null&&e(je(a.taskId))},onSnoozeTask:(t,o)=>{e(Be(t,o))},onUnsnoozeTask:t=>{e(xe(t))},onCreateSubtask:(t,o)=>{e(Pe({...o,parentTaskId:t}))},onSubtaskUpdate:(t,o)=>{e(ye({task:t,updates:o}))},onShowToast:t=>{e(oe(t))},onSubtaskRowClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:R(u.state?.pathnameStackToGoBack,u.pathname)}})},onParentBreadcrumbClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:R(u.state?.pathnameStackToGoBack,u.pathname)}})},onDismissClick:()=>{if(u.state?.message==="triggerBackClick"){const t=ie(u.state?.pathnameStackToGoBack),o=t.poppedPathname??"../../dashboard";c(o,{state:{pathnameStackToGoBack:t.newStack}})}else{const t=P(m),o=R(u.state?.pathnameStackToGoBack,u.pathname);c(t,{state:{pathnameStackToGoBack:o}})}e(Ue({taskId:n}))},onDeleteTaskClick:()=>{e(_e(n))},updateFilesEntity:t=>{e(Re({files:t}))},onDeleteFile:t=>{e(Ge(t))},onEditFileName:(t,o)=>{e(Ce(t,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(g(!1,n))},onCreateTagClick:t=>{e(De(t,n))},onDeleteTagClick:t=>{e(Ie(t,n))},onFetchCannedResponses:()=>{e(ae())},onManageTemplatesClick:()=>{c(`/${s.tenantEmailDomain}/tasks/quick-responses`)}}}))($e);function F(){const e=Y(),a=ee(),n=de(),c=Fe(),{taskId:s,taskGroupId:u}=ke(),d=b((i=>te(i))),m=ze(d?.companyId),{useFeatureGate:t}=Le(),{isFeatureEnabled:o}=t(G.isTaskSnoozeEnabled),{isFeatureEnabled:I}=t(G.isTaskVisibilityEnabled),{isFeatureEnabled:D}=t(G.isTaskCannedResponsesEnabled),{isFeatureEnabled:x}=t(G.isTaskRecurringParentEnabled),{isFeatureEnabled:B}=t(G.isTaskGroupAssigneesEnabled),[U,j]=k.useState(!1),[h,S]=k.useState(!1),[K,re]=k.useState(!1),[Q,w]=k.useState(!1),C=k.useRef(!1),y=b((i=>i.taskListState.updateTasksFetchState.fetchState)),$=b((i=>se(i))),N=b((i=>i.taskGroupViewState.fetchState));k.useEffect((()=>{a(g(!1,s)),s!=null&&a(T(s))}),[a,s]);const O=_.getSignedInUser()?.userId,ce=k.useMemo((()=>{const i=[f.TASK_CREATED,f.TASK_UPDATED,f.TASKS_BULK_UPDATED,f.TASKS_BULK_DELETED],l=[...i,f.TASK_SNOOZE_RESURFACED];return[...Ve(d?.companyId,i),...Me(O,l)]}),[d?.companyId,O]);qe({events:ce,onSubscribed:()=>{s!=null&&(a(g(!0,s)),a(T(s)))},onEvent:(i,l)=>{if(s!=null)switch(i){case f.TASK_CREATED:{X(l)?.parent_task_id===s&&(a(g(!0,s)),a(T(s)));break}case f.TASK_UPDATED:{const p=X(l);if(p==null)break;p.task_id===s?(a(g(!0,s)),a(T(s))):p.parent_task_id===s&&a(T(s));break}case f.TASKS_BULK_UPDATED:{const p=H(l);if(p==null)break;p.task_ids.includes(s)&&a(g(!0,s)),a(T(s));break}case f.TASKS_BULK_DELETED:{const p=H(l);if(p==null)break;if(p.task_ids.includes(s)){a(oe({messageSection:"delete_task",messageText:"success",type:"success"})),d?.tenantEmailDomain!=null&&e(P(d.tenantEmailDomain));break}a(T(s));break}case f.TASK_SNOOZE_RESURFACED:{He(l)?.task_id===s&&a(g(!0,s));break}}}}),k.useEffect((()=>{h||$.fetchState==="Completed"||(S(!0),a(he()))}),[h,a,$.fetchState]),k.useEffect((()=>{K||N==="Completed"||(re(!0),a(Ee()))}),[K,a,N]);const le=k.useCallback((()=>{s!=null&&(C.current=!1,a(be([s],null,{isArchived:!1})),w(!0))}),[a,s]);k.useEffect((()=>{if(Q)if(y!=="In-Progress"){if(C.current){if(y==="Error")return w(!1),void(C.current=!1);if(y==="Completed"){w(!1),C.current=!1;const{tenantEmailDomain:i}=d;if(n.state?.message==="triggerBackClick"){const l=ie(n.state?.pathnameStackToGoBack);e(l.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:l.newStack}})}else{const l=P(i);e(l,{state:{pathnameStackToGoBack:R(n.state?.pathnameStackToGoBack,n.pathname)}})}}}}else C.current=!0}),[Q,y,d,n,e]);const z=b((i=>ne(i,s))),v=z.fetchState,Z=_.getSignedInUser();if(Z==null)throw Error("Can't access task detail page without signing in...");if(v==="Error"&&z.error?.code===400){const{tenantEmailDomain:i}=d,l=P(i),p=R(n.state?.pathnameStackToGoBack,n.pathname);return r.jsx(pe,{to:l,state:{pathnameStackToGoBack:p}})}return r.jsxs(r.Fragment,{children:[v==="Completed"?r.jsx(Ke,{analytics:M,onLoad:i=>(l=>l.trackPageLoaded(Qe.Event.taskDetailPage))(i)}):null,r.jsxs(ea,{children:[r.jsx(Ze,{isAppContentDrawerOpen:U,handleDrawerToggle:i=>{j(i)}}),r.jsx(Ye,{analytics:M,currentTenant:d,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:m,location:n,loggedInUser:Z,navigate:e,taskGroupId:u,taskId:s,taskDetailFetchState:v,onUnarchiveTaskClick:le,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:I,isTaskCannedResponsesEnabled:D,isTaskRecurringParentEnabled:x,isTaskGroupAssigneesEnabled:B})]})]})}const ea=Oe.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
|
-
`,P=e=>`/${e}/tasks`;function Da(){return r.jsxs(Se,{children:[r.jsx(E,{path:"/new",element:r.jsx(F,{})}),r.jsx(E,{path:"/new/:taskGroupId",element:r.jsx(F,{})}),r.jsx(E,{path:"/group/:taskGroupId",element:r.jsx(Xe,{})}),r.jsx(E,{path:"/quick-responses",element:r.jsx(Je,{})}),r.jsx(E,{path:"/:taskId",element:r.jsx(F,{})}),r.jsx(E,{path:"*",element:r.jsx(ue,{})})]})}export{Da as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-UOzcPsHa.js";import i from"./NotFoundScreen-MJal1hew.js";import{T as r}from"./TransactionDetailScreen-CcO0FUjf.js";import"./sentry-DHDsO12F.js";import{n as a,o as e}from"./core-B5mDy9pu.js";import"./zeni-epic-state-7eY0g-Bc.js";import"./recharts-uFX1dZS-.js";import"./index-CrBk11WI.js";import"./mui-Do6nLzGb.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.js";import"./useAskAiCfoHostNavButtonProps-BamKKcjy.js";import"./decodeURIComponentSafe-DANuhXnG.js";import"./useInitialThreadRequest-Bwvu8W79.js";import"./routePaths-CeCPwkIf.js";import"./expenseAutomationHelper-DBDpSggk.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]="bfd19369-9f5a-4875-9ff9-f0a50fe2624d",o._sentryDebugIdIdentifier="sentry-dbid-bfd19369-9f5a-4875-9ff9-f0a50fe2624d")}catch{}})();function z(){return t.jsxs(a,{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{z as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-UOzcPsHa.js";import{h as K,g as J,u as Q,i as X,j as g,N as U,l as Z,n as Me,o as C}from"./core-B5mDy9pu.js";import{fF as H,u6 as ee,lf as p,eE as te,RU as Se,br as pe,$w as Be,l$ as ae,W2 as ne,$x as fe,$y as Fe,bE as k,RQ as he,$z as Le,$A as Te,$B as Ge,RT as ge,$C as Oe,$D as De,$E as $e,$F as Ie,$G as ze,$H as we,$I as ye,T4 as Re}from"./zeni-epic-state-7eY0g-Bc.js";import{N as ce,c as N,j as L,G as ke,de as oe,p as w,a4 as se,aq as _e,q as Ve}from"./index-CrBk11WI.js";import"./mui-Do6nLzGb.js";import{a as y}from"./sentry-DHDsO12F.js";import{w as ie}from"./withTransactionSidePanel-Co9xwJi4.js";import{p as re,c as de}from"./routePaths-CeCPwkIf.js";import{w as qe}from"./utils-BsODCDYR.js";import{d as j}from"./decodeURIComponentSafe-DANuhXnG.js";import{Z as Ne}from"./ZeniAccountStatementScreen-wUD7vElb.js";import"./recharts-uFX1dZS-.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./useAskAiCfoHostNavButtonProps-BamKKcjy.js";import"./TransactionDetailScreen-CcO0FUjf.js";import"./useInitialThreadRequest-Bwvu8W79.js";import"./expenseAutomationHelper-DBDpSggk.js";import"./stripSplatSuffix-CQQXAy0N.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]="892f8840-ebe4-449a-ba41-6dc401375932",a._sentryDebugIdIdentifier="sentry-dbid-892f8840-ebe4-449a-ba41-6dc401375932")}catch{}})();const Je=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],q=a=>qe(a),Ye=()=>{const{common:a,uncategorizedTransactionList:e}=ke.getLocalizedStrings();return{amount:e.missingReceipt.missingReceiptMinAmount.amount,currencyCode:a.currency.currencyCode,currencySymbol:a.currency.currencySymbol}},Ue=Z((function(a,e){const t=Be(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,q(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=q(e.selectedAccount.tranListType),d=Ke(t,n,c,o,e.bookCloseDate);L.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(fe({uiState:{dateRange:d},type:q(e.selectedAccount.tranListType)})),a(Se(o,p(d),!1,o==="missingReceipts"?Ye():void 0)),e.onSelectedTimePeriodChange(p(d))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({uiState:{scrollYOffset:t},type:q(e.selectedAccount.tranListType)}))}}}))(oe),V=ie((function({...a}){const e=K(),t=J(),n=Q(),c=t.pathname.split("/").find((l=>Je.includes(l))),o=c??"uncategorized-expense",{tenantEmailDomain:d}=X(),{accountType:Y,title:b,subTitle:A}=He(o),f="month",T=g((l=>H(l))),v=T.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:S}=ce(),{isFeatureEnabled:h}=S(N.isProjectsTransactionsEnabled),I=g((l=>ee(l)))&&h,{dataAvailable:x,initialTimeframeTick:G}=We(o,v,T.bookCloseDate),[E,O]=y.useState(!1),[P,$]=y.useState(void 0),u=y.useMemo((()=>{const l=p(G);return{tranListType:o,accountType:te(Y),title:b,subTitle:A,timeframe:f,period:l}}),[o,f,Y,x]);y.useEffect((()=>{if(!E&&u!=null){O(!0),L.trackTransactionList(void 0,void 0,void 0,u.title);const l=q(u.tranListType);n(Se(l,u.period,!0,l==="missingReceipts"?Ye():void 0))}}),[E,u,n]);let M=u;return u!=null&&P!=null&&(M={...u,period:P}),c==null||M==null?s.jsx(U,{to:"../"}):s.jsx(Ue,{firstMonthOfFY:v,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:x,navigate:e,showProjectField:I,selectedAccount:M,referrerType:o,bookCloseDate:T.bookCloseDate,onSelectedTimePeriodChange:l=>$(l),...a})})),He=a=>{let e="",t="";const n=ke.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.common.texts.uncategorizedExpenses;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.common.texts.receipts}return{accountType:e,title:t,subTitle:""}},We=(a,e,t)=>{const n=pe();let c=pe().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:re(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ke=(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},Qe=Z((function(a,e){const t=Le(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:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??be();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)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(he(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(oe),Xe=ie((function({referrerType:a,...e}){const t=K(),n=J(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,classIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=X(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),G=g((r=>Fe(r.transactionListState,h,S,I))),[E,O]=y.useState(!1),[P,$]=y.useState(void 0),u=g((r=>H(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(N.isProjectsTransactionsEnabled),z=g((r=>ee(r)))&&m;let i;const F=Ze(S,h,I,A,f,T,x);if(F){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},_=et(G?.dateRange,r);i={accountId:h,accountType:te(S),classId:I,title:x,timeframe:A,period:_}}y.useEffect((()=>{E||i==null||(O(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(he(i.accountId,i.accountType,i.classId,i.period)))}),[E,i,c]);let B=i;i!=null&&P!=null&&(B={...i,period:P});const R=[d,Y,b,A,f,T,v].filter((r=>r!=null));return F&&B!=null?s.jsx(Qe,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:z,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>$(r),...e}):s.jsx(U,{to:be(R.length)})})),be=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ze=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),tt=Z((function(a,e){const t=Oe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ve();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)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(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,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(oe),at=ie((function({referrerType:a,...e}){const t=K(),n=J(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,projectIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=X(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),G=g((r=>Ge(r.transactionListState,h,S,I))),[E,O]=y.useState(!1),[P,$]=y.useState(void 0),u=g((r=>H(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(N.isProjectsTransactionsEnabled),z=g((r=>ee(r)))&&m;let i;const F=nt(S,h,I,A,f,T,x);if(F){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},_=ct(G?.dateRange,r);i={accountId:h,accountType:te(S),projectId:I,title:x,timeframe:A,period:_}}y.useEffect((()=>{E||i==null||(O(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(ge(i.accountId,i.accountType,i.projectId,i.period)))}),[E,i,c]);let B=i;i!=null&&P!=null&&(B={...i,period:P});const R=[d,Y,b,A,f,T,v].filter((r=>r!=null));return F&&B!=null?s.jsx(tt,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:z,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>$(r),...e}):s.jsx(U,{to:ve(R.length)})})),ve=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},nt=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,ct=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),ot=Z((function(a,e){const t=ze(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&we(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ee();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)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(Ie(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=rt(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(oe),Ae=ie((function({referrerType:a,...e}){const t=K(),n=J(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,timeframe:b,startDate:A,endDate:f,titleEncoded:T,excludeSubAccounts:v}=X(),S=j(d??""),h=j(Y??""),I=j(T??""),x=!(v!=null&&v==="exclude_subaccounts"),G=g((D=>$e(D.transactionListState,h,S))),[E,O]=y.useState(!1),[P,$]=y.useState(void 0),u=g((D=>H(D))),M=u.company?.featuresActivationInfo.connectedAccountProvider==="unit",l=u.company?.companyInfo.firstMonthOfFY??1;let m;const z=st(S,h,b,A,f,I);if(z){const D={startDate:k(A,"YYYY-MM-DD"),endDate:k(f,"YYYY-MM-DD")},le=it(G?.dateRange,D);m={accountId:h,accountType:te(S),title:I,timeframe:b,period:le}}let i=m;m!=null&&P!=null&&(i={...m,period:P});const{useFeatureGate:F}=ce(),{isFeatureEnabled:B}=F(N.isTransactionCommentingEnabled),R=y.useCallback(((D,le)=>{if(o==null)return;const me=D.url.split(`/${o}/`)[1];if(me==null)return;const[je,xe]=me.split("?"),W=new URLSearchParams(xe??"");W.set("view","full"),W.set("thread_id",le),W.set("entity_type",D.entityType);const Ce=w(n.state?.pathnameStackToGoBack,n.pathname);t(`/${o}/${je}?${W.toString()}`,{state:{pathnameStackToGoBack:Ce}})}),[t,o,n.state,n.pathname]),{isFeatureEnabled:r}=F(N.isProjectsTransactionsEnabled),_=g((D=>ee(D)))&&r,{areTenantIdsInSync:ue}=_e();y.useEffect((()=>{!E&&m!=null&&ue&&(O(!0),L.trackTransactionList(m.accountId,void 0,a,m.title),c(Ie(m.accountId,m.accountType,m.period,void 0,!1,x)))}),[E,m,c,ue]);const Pe=[d,Y,b,A,f,T].filter((D=>D!=null));return z&&i!=null?s.jsx(ot,{firstMonthOfFY:l,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:M,isTransactionCommentingEnabled:B,onCommentThreadClick:R,showProjectField:_,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:D=>$(D),...e}):s.jsx(U,{to:Ee(Pe.length)})})),Ee=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},st=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&k(n,"YYYY-MM-DD").isValid()&&k(c,"YYYY-MM-DD").isValid()&&o!=null,it=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),rt=a=>`/${a}/transactions/${Re}/statements`;function Bt(){const a=J().state?.referrer,e=g((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[g((n=>H(n))).tenantId],t=Ve();return s.jsxs(Me,{children:[s.jsx(C,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/zeni-clearing-account/statements",element:s.jsx(Ne,{})}),s.jsx(C,{path:"/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/uncategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/uncategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/missing-receipts/*",element:t?s.jsx(U,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(C,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Xe,{referrerType:a})}),s.jsx(C,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(at,{referrerType:a})})]})}export{Bt as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-UOzcPsHa.js";import{a as c}from"./sentry-DHDsO12F.js";import{t as u,u as h,j as y,N as b}from"./core-B5mDy9pu.js";import{Um as I,gi as w,Jp as j}from"./zeni-epic-state-7eY0g-Bc.js";import{z as f,a7 as x,af as S,ag as D}from"./index-CrBk11WI.js";import{n as l}from"./mui-Do6nLzGb.js";import"./recharts-uFX1dZS-.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.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]="771620ac-060e-4e8c-b021-b565d06c67c3",e._sentryDebugIdIdentifier="sentry-dbid-771620ac-060e-4e8c-b021-b565d06c67c3")}catch{}})();const B=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",g=e.get("profileId")??"",[n,p]=c.useState(!1),a=h(),s=y((m=>I(m))),r=f.getSignedInUser(),d=f.getSignedInUserTenantWithId(i);if(r==null||d==null)return o.jsx(b,{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),c.useEffect((()=>{n||(p(!0),a(j(t,g,i)))}),[n,a]),s.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:s.error?.message??""})}):(s.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=l.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
|
-
`,_=l(D.LargeRegular)`
|
|
10
|
-
display: flex;
|
|
11
|
-
color: ${S.important};
|
|
12
|
-
`;export{B as default};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-UOzcPsHa.js";import{u as z,h as ae,g as W,i as N,j as D,l as te,N as ee,n as $e,o as C}from"./core-B5mDy9pu.js";import{$8 as Fe,Lh as Ue,$9 as _e,fF as R,Gz as ze,$a as An,cu as ne,cv as Me,Gt as kn,$b as Dn,$c as In,Gw as Sn,GD as ge,Gq as bn,Gn as Pn,YI as le,$d as vn,OO as jn,WF as En,OQ as Tn,mI as Pe,$e as On,uT as Ve,uH as Ze,mz as He,mC as ve,WG as je,WH as Bn,$f as Ln,mB as Rn,mY as $n,mq as Fn,kQ as Un,kP as _n,$g as zn,$h as fe,Ov as Mn,$i as Vn,$j as Zn,YY as ye,$k as Ee,$l as Hn,O$ as Gn,Zi as Wn,Mm as Ge,C5 as We,$m as Nn,OY as Yn,$n as Ne,da as xe,P3 as Ye,dZ as qe,d_ as Ce,P1 as qn,Mg as Kn,OV as Qn,$o as Ke,$p as Qe,Ox as Je,OH as Te,$q as Jn,Z9 as Xn,P4 as ea,bq as na,bJ as aa,cG as ta,bK as oa,bt as sa,U4 as ia}from"./zeni-epic-state-7eY0g-Bc.js";import{U as oe,N as Z,c as _,z as b,av as we,E as $,a7 as de,cY as ra,a1 as V,ab as Y,a4 as Xe,h as ca,n as Oe,j as O,cZ as la,ae as Ae,c_ as da,a8 as ue,c$ as ua,S as ke,bi as G,d0 as pa,aq as ma,as as en,d1 as Be,d2 as ga,p as ce,d3 as fa,ai as ha,d4 as ya,d5 as xa,g as Ca,H as wa}from"./index-CrBk11WI.js";import{n as F,D as q,S as K}from"./mui-Do6nLzGb.js";import X from"./NotFoundScreen-MJal1hew.js";import{S as Le}from"./SetupPagesScreen-DL_o3Z3i.js";import{F as nn}from"./FeaturePreviewScreen-B5Hq_fA2.js";import{a as m}from"./sentry-DHDsO12F.js";import{M as pe}from"./MobileAppDrawer-CjKRvtSN.js";import{A as Aa,D as ka,V as Da}from"./DomesticWireDetailScreen-DGMYJzFE.js";import{A as Ia}from"./AddressScreen-DhOzuvLT.js";import{u as an}from"./useAskAiCfoHostNavButtonProps-BamKKcjy.js";import{Z as Sa}from"./ZeniAccountStatementScreen-wUD7vElb.js";import"./recharts-uFX1dZS-.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.js";import"./BusinessVerificationPageScreen-CPnmoF6z.js";import"./routePaths-CeCPwkIf.js";import"./analyticsHelper-H1Xp9Uyk.js";import"./InboxNotificationsProvider-BmF5-_KA.js";import"./useTaskManagerAccess-CdPkYUw1.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="f20f8b20-36b5-4f4a-a765-f2ee11602fc3",n._sentryDebugIdIdentifier="sentry-dbid-f20f8b20-36b5-4f4a-a765-f2ee11602fc3")}catch{}})();const ba=F.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${n=>n.theme.colors.grey4};
|
|
9
|
-
`;function Re({isEditDrawerOpen:n}){const a=$(),[i,t]=m.useState(!1),{autoTransferRulePageProps:o,isLoading:r}=(function({isEditDrawerOpen:d=!1}={}){const c=z(),p=ae(),f=W(),{ruleId:h,tenantEmailDomain:s}=N(),l=oe(),{useFeatureGate:g}=Z(),y=D((u=>Fe(u))),w=D((u=>Ue(u.depositAccountState,u.depositAccountListState))),I=D((u=>_e(u))),A=D((u=>R(u))),{isFeatureEnabled:P}=g(_.isTreasuryEnabled),x=y?.fetchState??"Not-Started",k=A?.companyId??(s==null?void 0:b.getSignedInUserTenant(s)?.companyId);m.useEffect((()=>{x==="Not-Started"&&k!=null&&c(ze(!0))}),[c,x,k]);const v=y?.fetchState!=="Completed";if(v)return{autoTransferRulePageProps:void 0,isLoading:v};const B=A?.company!=null&&An(A.company),j=!!(P&&B),E=ne(l?.loggedInUserRoleMap)||Me(l?.loggedInUserRoleMap),T=b.getSignedInUser(),L={userId:T?.userId??"",sessionId:T?.zeniSessionId??"",tenantId:A?.tenantId??""},S=!!f.state?.scrollToAddRule;return{isLoading:v,autoTransferRulePageProps:{autoTransferRuleView:y,companyName:A?.companyName??"",hasAdminLevelAccess:E,includeTreasuryOption:j,transferLimit:5e5,authParams:L,currentTenant:A,depositAccountListView:w,downloadAccountDetailEndPoint:`${we}/account_details`,editingRuleId:h,isEditDrawerOpen:d,scrollToAddRule:S,zeniAccountsConfigDetail:I,onBackClick:()=>p(".."),onCreateRule:()=>{c(Pn())},onUpdateRule:u=>{c(ge(u))},onDeleteClick:u=>{c(bn(u))},onPauseClick:u=>{c(ge(u,!0,!1))},onResumeClick:u=>{c(ge(u,!1,!0))},onActivityClick:(u,M)=>{c(Sn(u,M))},onUpdateRuleLocalData:u=>{c(In(u))},clearRuleLocalData:()=>{c(Dn())},onEditClick:u=>{p(`./${u}/edit`)},onEditDrawerClose:()=>{p("../../",{relative:"path"})},onReviewClick:()=>{c(kn())}}}})({isEditDrawerOpen:n});return r||o==null?e.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}}):e.jsxs(ba,{children:[e.jsx(pe,{isAppContentDrawerOpen:i,handleDrawerToggle:d=>{t(d)}}),e.jsx(ra,{...o})]})}const Pa={overlayWidth:new Y(100,100,58)},va=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:i})=>{const t=z(),o=$(),r=V();if(b.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(q,{onClose:()=>{i(!0),t(le())},anchor:"right",open:a,PaperProps:{style:{width:Pa.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(ja,{onClick:d=>d.stopPropagation(),children:e.jsx(Aa,{vendorIdParam:n,accountContext:"express-pay"})})})},ja=F(K)`
|
|
10
|
-
display: flex;
|
|
11
|
-
min-height: 100%;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
`,Ea={overlayWidth:new Y(100,100,58)},Ta=({isDrawerOpen:n,closeDrawerHandler:a})=>{const i=z(),t=$(),o=V();if(b.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return e.jsx(q,{onClose:()=>{a(!0),i(le())},anchor:"right",open:n,PaperProps:{style:{width:Ea.overlayWidth.valuePercentage(o),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Oa,{onClick:r=>r.stopPropagation(),children:e.jsx(Ia,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Oa=F(K)`
|
|
14
|
-
display: flex;
|
|
15
|
-
min-height: 100%;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
`,Ba={overlayWidth:new Y(100,100,58)},La=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:i})=>{const t=z(),o=$(),r=V();if(b.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(q,{onClose:()=>{i(!0),t(le())},anchor:"right",open:a,PaperProps:{style:{width:Ba.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Ra,{onClick:d=>d.stopPropagation(),children:e.jsx(ka,{vendorIdParam:n,accountContext:"express-pay"})})})},Ra=F(K)`
|
|
18
|
-
display: flex;
|
|
19
|
-
min-height: 100%;
|
|
20
|
-
flex-direction: column;
|
|
21
|
-
`,$a=F.div`
|
|
22
|
-
display: flex;
|
|
23
|
-
height: 100vh;
|
|
24
|
-
width: 100%;
|
|
25
|
-
flex: 1 1 auto;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
align-items: center;
|
|
28
|
-
background-color: ${n=>n.theme.colors.grey4};
|
|
29
|
-
`,Fa=te((function(n,a){const i=R(n),t=b.getSignedInUser(),o=i.tenantId,r={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:o??""},d=a.expressPayDetails,c=n.entityAutoCompleteState.autoCompleteText.common,p=En(n,"common");return{expressPayDetails:d,fileProps:{authParams:r,filesEndPoint:`${Ae.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:p},analytics:a.analytics}}),(function(n,a){const{navigate:i}=a;return{onSaveVendor:t=>{n(_n(t,void 0,void 0,!0))},saveVendorDetailLocalData:(t,o)=>{n(ve({vendorId:o,localData:t}))},saveExpressPayLocalData:t=>{n(Un({localData:t}))},onVendorSelected:t=>{t!=null&&n(Fn(t,!1))},updateSelectedVendorForCreate:t=>{n($n(t))},initializeVendorAddress:()=>{n(Rn())},resetVendorSaveStatus:t=>{n(Ln({vendorId:t}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(t,o)=>{t.trim().length>=2?n(Bn({searchString:t,entityType:o,searchOrigin:"common"})):t.trim().length===0&&n(je("common"))},onCancelAutoComplete:()=>{n(je("common"))}},chooseNewVendor:t=>{n(ve({localData:{vendorName:t}}))},onClickAddAccount:t=>{t.method.toLowerCase().indexOf("ach")!==-1?i("./add-ach",{relative:"path"}):t.method.toLowerCase().indexOf("wire")!==-1&&t.method.toLowerCase().indexOf("domestic")!==-1&&i("./add-wire",{relative:"path"})},updateFilesEntity:t=>{n(He({files:t}))},onDeleteFile:t=>{n(Ze(t))},onEditFileName:(t,o)=>{n(Ve(t,o.split(".")[0]))},onBackClick:t=>{t!=null&&n(Pe(t)),n(Pe()),n(On()),n(le()),i("../",{relative:"path"})},onSchedulePayment:()=>{n(Tn())}}}))(la);function ie({isAddACHDrawerOpen:n,isAddWireDrawerOpen:a,isAddAddressDrawerOpen:i}){const t=ae(),o=W(),r=z(),[d,c]=m.useState(!1),{tenantEmailDomain:p}=N(),f=oe(),h=D((u=>u.expressPayState.fetchState)),s=D((u=>R(u))),l=D((u=>vn(u))),g=l.expressPayLocalData?.vendorId,y=s.companyId??b.getSignedInUserTenant(p)?.companyId,[w,I]=m.useState(!1),[A,P]=m.useState(!1),[x,k]=m.useState(!1),v=Xe(o.state?.pathnameStackToGoBack),{poppedPathname:B}=v,j=B?.split("/"),E=j?.[j.length-1];m.useEffect((()=>{n===!0?I(!0):(I(!1),document.body.style.overflow="auto")}),[n]),m.useEffect((()=>{a===!0?P(!0):(P(!1),document.body.style.overflow="auto")}),[a]),m.useEffect((()=>{i===!0?k(!0):(k(!1),document.body.style.overflow="auto")}),[i]),m.useEffect((()=>{h==="Not-Started"&&r(jn(!0,!0))}),[h,r]);const T=ca(l.vendorViewDetails.bankAccountCreationState?.fetchState);if(m.useEffect((()=>{T==="In-Progress"&&l.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&S()}),[T,l.vendorViewDetails.bankAccountCreationState?.fetchState]),b.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const L=u=>{c(u)},S=()=>{I(!1),P(!1),t("../",{relative:"path"})};return e.jsxs($a,{children:[Oe(o)?e.jsx(pe,{isAppContentDrawerOpen:d,handleDrawerToggle:L}):null,w===!0?e.jsx(va,{vendorId:g,closeDrawerHandler:S,isDrawerOpen:w}):null,A===!0?e.jsx(La,{vendorId:g,closeDrawerHandler:S,isDrawerOpen:A}):null,x===!0?e.jsx(Ta,{closeDrawerHandler:S,isDrawerOpen:x}):null,e.jsx(Da,{vendorId:g,isExpressPayPage:!0}),e.jsx(Fa,{navigate:t,location:o,companyId:y,accountId:E,analytics:O,currentTenant:s,vendorId:g,roleMap:f?.loggedInUserRoleMap,isSettings:Oe(o),expressPayDetails:l,onClickMenuIcon:()=>{L(!0)}})]})}const Ua={overlayWidth:new Y(100,100,58)},_a=({authParams:n,downloadAccountDetailEndPoint:a,isAccountInfoDrawerOpen:i,zeniBankAccountDetail:t,closeDrawerHandler:o})=>{const r=$(),d=V(),c=D((s=>_e(s))),p=D((s=>R(s)));if(b.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const f=()=>{o(!0)},h={depositAccount:t,onDismissClick:f,zeniAccountsConfigDetail:c,authParams:n,downloadAccountDetailEndPoint:a,currentTenant:p};return e.jsx(q,{anchor:"right",open:i,PaperProps:{style:{width:Ua.overlayWidth.valuePercentage(d),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>f(),children:e.jsx(za,{onClick:s=>s.stopPropagation(),children:e.jsx(da,{...h})})})},za=F(K)`
|
|
30
|
-
display: flex;
|
|
31
|
-
min-height: 100%;
|
|
32
|
-
flex-direction: column;
|
|
33
|
-
`,Ma={overlayWidth:new Y(100,100,58)},tn=({isCheckDepositDrawerOpen:n,closeDrawerHandler:a})=>{const i=$(),t=V(),o=z(),r=D((s=>R(s))),d=b.getSignedInUser(),c=r.tenantId,p={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c??""};if(d==null)throw Error("Can't access check deposit page without signing in...");const f=D((s=>zn(s))),h={analytics:O,checkDeposit:f,filesEndPoint:`${Ae.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:s=>{o(Vn(s))},updateFilesEntity:s=>{o(He({files:s}))},onAnotherTransferClick:()=>{o(fe())},onDeleteFile:s=>{o(Ze(s))},onEditFileName:(s,l)=>{o(Ve(s,l.split(".")[0]))},onCheckDpositClick:()=>{o(Mn())},onDismissClick:()=>{a(!0),o(fe())}};return e.jsxs(e.Fragment,{children:[e.jsx(ue,{analytics:O,onLoad:s=>(l=>l.trackPageLoaded(ke.Event.accountsDepositCheckFormViewed))(s)}),e.jsx(q,{anchor:"right",open:n,PaperProps:{style:{width:Ma.overlayWidth.valuePercentage(t),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(s,l)=>(l==="backdropClick"||l==="escapeKeyDown")&&(a(!0),void o(fe())),children:e.jsx(Va,{onClick:s=>s.stopPropagation(),children:e.jsx(ua,{...h})})})]})},Va=F(K)`
|
|
34
|
-
display: flex;
|
|
35
|
-
min-height: 100%;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
`,Za={overlayWidth:new Y(100,100,58)},Ha=te((function(n,a){const i=a.currentTenant?.companyId;return{plaidConnectionDetails:Wn(n,i,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Ue(n.depositAccountState,n.depositAccountListState)}}),(function(n,a){return{onReviewClick:()=>n(Yn()),clearReviewTransferDetail:()=>n(Nn()),onFetchLinkTokenClick:i=>{n(We("external_account",i))},onEstablishConnectionClick:i=>{n(Ge(i,a.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}}))(pa),on=({isTransferDrawerOpen:n,authParams:a,downloadAccountDetailEndPoint:i,closeDrawerHandler:t,zeniAccountsConfig:o})=>{const r=D((x=>Zn(x))),d=D((x=>R(x))),c=$(),p=V(),f=z(),{accountId:h}=N(),[s,l]=m.useState("achTransfer"),[g,y]=m.useState(!1);if(b.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:w}=Z(),{configValue:I}=w(G.zeniAccountsConfig),A=ye(I),P=()=>{t(!0),f(Ee())};return m.useEffect((()=>{r.reviewTransferDetail.fetchState==="Completed"&&y(!0)}),[y,r.reviewTransferDetail.fetchState]),e.jsxs(e.Fragment,{children:[e.jsx(ue,{analytics:O,onLoad:x=>(k=>k.trackPageLoaded(ke.Event.zeniAccountsTransferFormViewed))(x)}),e.jsx(q,{onClose:()=>{(s==="achTransfer"&&g===!1||s==="achTransfer"&&g&&r.fetchState==="Completed")&&P()},anchor:"right",open:n,PaperProps:{style:{width:Za.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Ga,{onClick:x=>x.stopPropagation(),children:e.jsx(Ha,{analytics:O,transferDetails:r,authParams:a,downloadAccountDetailEndPoint:i,onTransferClick:()=>{O.trackTransferBetweenAccountsFormClicked("Transfer",r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",r.transferDetailLocalData.transferFrom?.label,r.transferDetailLocalData.transferTo?.label,r.transferDetailLocalData.amount.amount,r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,r.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,r.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&r.transferDetailLocalData.transferTo?.accType==="depositAccount"&&o.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&r.transferDetailLocalData.amount.amount>o.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),f(Gn(h))},onDismissClick:P,onSaveChangesToLocalStore:x=>{f(Hn(x))},onAnotherTransferClick:()=>{y(!1),f(Ee())},currentTenant:d,zeniAccountsConfigDetail:o,currentDrawerContent:s,setCurrentDrawerContent:l,showReviewContent:g,setShowReviewContent:y,onBackClick:()=>{},maxInsuredAmount:A.maxInsuredAmount})})})]})},Ga=F(K)`
|
|
38
|
-
display: flex;
|
|
39
|
-
min-height: 100%;
|
|
40
|
-
flex-direction: column;
|
|
41
|
-
`,Wa=F.div`
|
|
42
|
-
display: flex;
|
|
43
|
-
min-height: 100%;
|
|
44
|
-
width: 100%;
|
|
45
|
-
flex: 1 1 auto;
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
align-items: center;
|
|
48
|
-
background-color: ${n=>n.theme.colors.grey4};
|
|
49
|
-
`,Na=te((function(n,a){return{zeniAccountListView:Ne(n),isExpressPayEnabled:a.isExpressPayEnabled,analytics:a.analytics}}),(function(n,a){const{navigate:i,currentTenant:t,location:o,companyId:r,handleDrawerToggle:d,analytics:c,isBillPayEnabled:p,isDebitCardFeatureEnabled:f}=a,{tenantEmailDomain:h}=t;return{onZeniAccountClick:(s,l)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",l,"active");const g=Ya(h,s),y=ce(o.state?.pathnameStackToGoBack,o.pathname);i(g,{state:{pathnameStackToGoBack:y}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),i("setup")},onReloadTransactions:()=>{n(Ye(!1))},handleMoveMoneyOptionSelection:(s,l)=>{let g="page-not-found";s==="sendMoney"&&(g=ln(h)),s==="payBill"?g=sn(t,p,f):s==="transfer"?(g=rn(h),l!=null&&n(Ke(l))):s==="checkDeposit"&&(g=cn(h));const y=ce(o.state?.pathnameStackToGoBack,o.pathname);i(g,{state:{pathnameStackToGoBack:y}})},unlinkPaymentAccount:(s,l)=>{c.trackAccountsListPageClicked("Unlink Account",l),n(Qn(s))},onFetchLinkTokenClick:(s,l)=>{n(We("external_account",s,l))},onUpdatePaymentAccountStatus:(s,l,g)=>{n(Kn(s,l,"zeni_accounts","external_account",g))},onEstablishConnectionClick:s=>{n(Ge(s,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:s=>{n(qn(s))},onClickMenuIcon:()=>{d(!0)},onAutoTransferClick:s=>{const l="./auto-transfer";s?i(l,{state:{...o.state,scrollToAddRule:!0}}):i(l)}}}))(ga);function he({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a}){const i=W(),t=ae(),o=z(),r=V(),{tenantEmailDomain:d}=N(),{useDynamicConfig:c,useFeatureGate:p}=Z(),f=$(),{configValue:h}=c(G.zeniAccountsConfig),{isFeatureEnabled:s}=p(_.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=p(_.isAutoTransferRuleEnabled),{isFeatureEnabled:g}=p(_.isCheckingCommentingEnabled),y=ye(h),w=D((U=>R(U))),I=w.companyId??b.getSignedInUserTenant(d)?.companyId,{configValue:A}=c(G.expressPayConfig),P=A.is_enable_all_tenants===!0||A.tenant_ids!=null&&A.tenant_ids.includes(w.tenantId),[x,k]=m.useState(!1),[v,B]=m.useState(!1),[j,E]=m.useState(!1),[T,L]=m.useState(!1),S=D((U=>Ne(U))),u=S.fetchState,M=D((U=>Fe(U))),Q=M?.fetchState??"Not-Started",me=!!w.companyZeniAccountInfo?.info?.isZeniAccountEnabled,se=oe(),H=!!w.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,J=ne(se?.loggedInUserRoleMap),dn=xe(se?.loggedInUserRoleMap),un=!!w.companyBillPayInfo?.info?.isBillPayEnabled,De=b.getSignedInUser(),pn={userId:De?.userId??"",sessionId:De?.zeniSessionId??"",tenantId:w.tenantId??""},mn=`${we}/account_details`,{areTenantIdsInSync:Ie}=ma();m.useEffect((()=>{!x&&Ie&&(k(!0),o(Ye(!1)))}),[x,o,u,Ie]),m.useEffect((()=>{!v&&Q==="Not-Started"&&I&&(B(!0),o(ze(!0)))}),[v,Q,I,o]),m.useEffect((()=>{n!=null&&n===!0?E(!0):(E(!1),document.body.style.overflow="auto")}),[n]),m.useEffect((()=>{L(a!=null&&a===!0)}),[a]);const Se=()=>{E(!1),t("..")},[gn,fn]=m.useState(!1),be=U=>{fn(U)},{isAiCfoAccessEnabled:hn,onAskAiCfoClick:yn}=an({mobileExploreReferrer:"Checking Accounts"});en({isDataReady:u==="Completed"});const xn=qe(w),Cn=Ce(s,w);return xn===!0&&Cn!==!0?e.jsx(nn,{}):me?e.jsxs(e.Fragment,{children:[S.fetchState==="Completed"&&j===!1&&T===!1?e.jsx(ue,{analytics:O,onLoad:U=>(wn=>{wn.trackAccountsListPageViewed(S.depositAccountsSelectorView.depositAccounts.length,S.externalAccountsSelectorView.paymentAccounts.length,Be(S.summary?.totalBalance.available.amount??0),Be(S.summary?.totalInterest.available.amount??0),S.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield)})(U)}):null,j===!0?e.jsx(on,{closeDrawerHandler:Se,isTransferDrawerOpen:j,zeniAccountsConfig:S.zeniAccountsConfig,authParams:pn,downloadAccountDetailEndPoint:mn}):null,T===!0?e.jsx(tn,{closeDrawerHandler:Se,isCheckDepositDrawerOpen:T}):null,e.jsxs(Wa,{windowSize:r,children:[e.jsx(pe,{isAppContentDrawerOpen:gn,handleDrawerToggle:be}),e.jsx(Na,{zeniBankListView:S,navigate:t,currentTenant:w,location:i,companyId:I,analytics:O,maxInsuredAmount:y.maxInsuredAmount,isExpressPayEnabled:P,isBillPayEnabled:un,isCheckingCommentingEnabled:g,isDebitCardFeatureEnabled:s,isAutoTransferRuleEnabled:l,handleDrawerToggle:be,isAiCfoAccessEnabled:hn,onAskAiCfoClick:yn})]})]}):H&&J?e.jsx(ee,{to:"../setup"}):w.companyZeniAccountInfo?.info&&!H&&dn?e.jsx(ee,{to:"../promo",state:i.state}):e.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:f.colors.grey5}})}const sn=(n,a,i)=>{const t=Ce(i,n),{tenantEmailDomain:o}=n;return t===!0||a===!1?`/${o}/bills`:`/${o}/bill/new`},Ya=(n,a)=>`/${n}/checking/${a}`,rn=(n,a)=>a==null?`/${n}/checking/transfer`:`/${n}/checking/${a}/transfer`,cn=(n,a)=>a==null?`/${n}/checking/check-deposit`:`/${n}/checking/${a}/check-deposit`,ln=n=>`/${n}/checking/express-pay`,qa=F.div`
|
|
50
|
-
display: flex;
|
|
51
|
-
width: 100%;
|
|
52
|
-
flex: 1 1 auto;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
align-items: center;
|
|
55
|
-
min-height: 100vh;
|
|
56
|
-
background-color: ${n=>n.theme.colors.grey4};
|
|
57
|
-
`,Ka=te((function(n,a){const{currentTenant:i}=a,t=Qe(n,a.accountId),o=b.getSignedInUser(),r=n.tenantState.currentTenantId,d={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:r??""},c=t.accountDetail?.id??"";return{currentTenantCompanyName:i.companyName??"",authParams:d,downloadEndPoint:`${Ae.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:t,isExpressPayEnabled:a.isExpressPayEnabled,fetchState:t.fetchState}}),(function(n,a){const{navigate:i,currentTenant:t,location:o,accountId:r}=a,{tenantEmailDomain:d}=t;return{handleMoveMoneyOptionSelection:(c,p)=>{let f="page-not-found";c==="sendMoney"?f=ln(d):c==="payBill"?f=sn(t,a.isBillPayEnabled,a.isDebitCardFeatureEnabled):c==="transfer"?(f=rn(d,r),p!=null&&n(Ke(p))):c==="checkDeposit"?(f=cn(d,r),p!=null&&n(Jn(p))):c==="accountStatement"&&(f=Ja(d,r));const h=ce(o.state?.pathnameStackToGoBack,o.pathname);i(f,{state:{pathnameStackToGoBack:h}})},onAccountDetailClick:()=>{const c=Qa(d,r),p=ce(o.state?.pathnameStackToGoBack,o.pathname);i(c,{state:{pathnameStackToGoBack:p}})},onEditNameClick:c=>{n(Te(r,"editName",c))},onReloadZeniAccountDetailPage:()=>{n(Je(r,!1))},onCloseAccountClick:()=>{n(Te(r,"closeAccount",""))},onBackClick:()=>{i("../",{relative:"path"})}}}))(fa);function re({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a,isAccountInfoDrawerOpen:i}){const t=W(),o=ae(),r=z(),d=V(),{tenantEmailDomain:c,accountId:p}=N(),{useDynamicConfig:f}=Z(),{useFeatureGate:h}=Z(),{isFeatureEnabled:s}=h(_.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=h(_.isCheckingCommentingEnabled),g=D((J=>R(J))),{configValue:y}=f(G.expressPayConfig),w=y.is_enable_all_tenants===!0||y.tenant_ids!=null&&y.tenant_ids.includes(g.tenantId),I=!!g.companyBillPayInfo?.info?.isBillPayEnabled,A=b.getSignedInUser(),P=g.companyId??b.getSignedInUserTenant(c)?.companyId,x={userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:g.tenantId??""},k=`${we}/account_details`,[v,B]=m.useState(!1),[j,E]=m.useState(!1),[T,L]=m.useState(!1),[S,u]=m.useState(!1),M=D((J=>Qe(J,p??""))),Q=M.fetchState,{isAiCfoAccessEnabled:me,onAskAiCfoClick:se}=an({mobileExploreReferrer:"Checking Account Detail"});en({isDataReady:Q==="Completed"}),m.useEffect((()=>{v||(r(Je(p??"",!1)),B(!0))}),[v,r,Q]),m.useEffect((()=>{u(i!=null&&i===!0)}),[i]),m.useEffect((()=>{n!=null&&n===!0?E(!0):(E(!1),document.body.style.overflow="auto")}),[n]),m.useEffect((()=>{L(a!=null&&a===!0)}),[a]);const H=()=>{u(!1),o("..")};return e.jsxs(e.Fragment,{children:[S===!0&&M.accountDetail!=null?e.jsx(_a,{authParams:x,downloadAccountDetailEndPoint:k,closeDrawerHandler:H,isAccountInfoDrawerOpen:S,zeniBankAccountDetail:M.accountDetail}):null,j===!0?e.jsx(on,{closeDrawerHandler:H,isTransferDrawerOpen:j,zeniAccountsConfig:M.zeniAccountsConfig,authParams:x,downloadAccountDetailEndPoint:k}):null,T===!0?e.jsx(tn,{closeDrawerHandler:H,isCheckDepositDrawerOpen:T}):null,e.jsx(qa,{windowSize:d,children:e.jsx(Ka,{navigate:o,currentTenant:g,location:t,companyId:P,isDebitCardFeatureEnabled:s,accountId:p??"",isBillPayEnabled:I,isCheckingCommentingEnabled:l,isExpressPayEnabled:w,isAiCfoAccessEnabled:me,onAskAiCfoClick:se})})]})}const Qa=(n,a)=>`/${n}/checking/${a}/account-info`,Ja=(n,a)=>`/${n}/checking/${a}/statements`,Xa=te((function(n,a){const{companyId:i}=a;return{zeniAccountSetupView:Xn(n,i)}}),(function(n,a){const{navigate:i,companyId:t}=a;return{onSetupButtonClick:()=>{O.trackAccountsPromoPageClicked("Setup Accounts"),n(ea(t))},onBackClick:()=>{i("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{i("../setup",{relative:"path"})}}}))(xa),et=()=>{const n=ae(),a=W(),{tenantEmailDomain:i}=N(),{useDynamicConfig:t}=Z(),o=ha(),r=$(),[d,c]=m.useState(!1),[p,f]=m.useState(!1),h=D((k=>R(k))),{configValue:s}=t(G.zeniAccountsConfig),l=ye(s);m.useEffect((()=>{p===!1&&a.state?.message==="activation"&&f(!0)}),[a.state]);const g=b.getSignedInUserTenant(i)?.companyId??h.companyId,y=b.getSignedInUser(),w=!!h.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,I=k=>{c(k)};if(y==null)throw Error("Can't access Zeni account promo page without signing in...");const A=oe(),P=ne(A?.loggedInUserRoleMap),x=xe(A?.loggedInUserRoleMap);if(w&&P)return e.jsx(ee,{to:"../../checking/setup"});if(h.company?.companyZeniAccountInfo&&(!w&&P||x)){if(a.state?.message==="activation"){const k=Xe(a.state?.pathnameStackToGoBack);n(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:k.newStack}})}return e.jsxs(e.Fragment,{children:[e.jsx(ya,{showConfetti:p}),e.jsx(ue,{analytics:O,onLoad:k=>(v=>v.trackPageLoaded(ke.Event.accountsPromoPageViewed))(k)}),e.jsx(pe,{isAppContentDrawerOpen:d,handleDrawerToggle:I}),e.jsx(Xa,{analytics:O,navigate:n,companyId:g,meetingUrl:o("zeni_accounts_promo"),onClickMenuIcon:()=>{I(!0)},maxAnnualPercentageYield:l.maxAnnualPercentageYield,maxInsuredAmount:l.maxInsuredAmount,exampleBankBalance:3e6})]})}return e.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}})};function Et(){const n=W(),a=D((L=>R(L))),i=$(),{useFeatureGate:t,useDynamicConfig:o}=Z(),r=oe(),d=ne(r?.loggedInUserRoleMap),c=xe(r?.loggedInUserRoleMap),p=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled,f=!!a.company?.companyZeniAccountInfo?.isZeniAccountTOSAccepted,{isFeatureEnabled:h}=t(_.isChargeCardFeatureEnabled),{isFeatureEnabled:s}=t(_.isDebitCardFeatureEnabled),l=qe(a),g=Ce(s,a),y=a?.userRole!=null&&na(a?.userRole),w=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!y)&&aa(r?.loggedInUserRoleMap),I=ta(r?.loggedInUserRoleMap),A=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!y)&&oa(r?.loggedInUserRoleMap),P=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!y,{configValue:x}=o(G.expressPayConfig),k=x.is_enable_all_tenants===!0||x.tenant_ids!=null&&x.tenant_ids.includes(a.tenantId),{isFeatureEnabled:v}=t(_.isAutoTransferRuleEnabled),B=Ca(a,h,s)&&!y&&sa(r?.loggedInUserRoleMap),j=ia(r?.loggedInUserRoleMap),E=P&&ne(r?.loggedInUserRoleMap),T=E||Me(r?.loggedInUserRoleMap);return e.jsxs($e,{children:[e.jsx(C,{path:"setup",element:e.jsx(Le,{isBillPayAdminLevelAccess:w,isUserHasOnlyBillPayAccess:I,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:E,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:j,productType:"zeni_accounts",type:"setup"})}),e.jsx(C,{path:"verification",element:e.jsx(Le,{isBillPayAdminLevelAccess:w,isUserHasOnlyBillPayAccess:I,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:E,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:j,productType:"zeni_accounts",type:"verification"})}),v?e.jsxs(e.Fragment,{children:[e.jsx(C,{path:"auto-transfer",element:e.jsx(Re,{})}),T?e.jsx(C,{path:"auto-transfer/:ruleId/edit",element:e.jsx(Re,{isEditDrawerOpen:!0})}):null]}):e.jsx(C,{path:"auto-transfer",element:e.jsx(X,{})}),k&&d?e.jsxs(e.Fragment,{children:[e.jsx(C,{path:"express-pay",element:e.jsx(ie,{})}),e.jsx(C,{path:"express-pay/add-ach",element:e.jsx(ie,{isAddACHDrawerOpen:!0})}),e.jsx(C,{path:"express-pay/add-wire/add-address",element:e.jsx(ie,{isAddAddressDrawerOpen:!0})}),e.jsx(C,{path:"express-pay/add-wire",element:e.jsx(ie,{isAddWireDrawerOpen:!0})})]}):e.jsx(C,{path:"express-pay",element:e.jsx(X,{})}),e.jsx(C,{path:"promo",element:e.jsx(et,{})}),l&&!g?e.jsx(C,{path:"/*",element:e.jsx(nn,{})}):p?e.jsxs(e.Fragment,{children:[e.jsx(C,{path:"/",element:e.jsx(he,{})}),e.jsx(C,{path:"transfer",element:e.jsx(he,{isTransferDrawerOpen:!0})}),e.jsx(C,{path:"check-deposit",element:e.jsx(he,{isCheckDepositDrawerOpen:!0})}),e.jsx(C,{path:"cash_management/*",element:e.jsx(X,{})}),e.jsx(C,{path:":accountId/*",element:e.jsx(nt,{})}),e.jsx(C,{path:"*",element:e.jsx(X,{})})]}):f&&d?e.jsx(C,{path:"*",element:e.jsx(ee,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&c?e.jsx(C,{path:"*",element:e.jsx(ee,{to:"../promo",state:n.state})}):e.jsx(C,{path:"*",element:e.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:i.colors.grey5,boxShadow:`0px 2px ${wa.sp1} ${i.colors.dropShadowNormal}`}})})]})}function nt(){return e.jsxs($e,{children:[e.jsx(C,{path:"/",element:e.jsx(re,{})}),e.jsx(C,{path:"account-info",element:e.jsx(re,{isAccountInfoDrawerOpen:!0})}),e.jsx(C,{path:"transfer",element:e.jsx(re,{isTransferDrawerOpen:!0})}),e.jsx(C,{path:"check-deposit",element:e.jsx(re,{isCheckDepositDrawerOpen:!0})}),e.jsx(C,{path:"statements",element:e.jsx(Sa,{})}),e.jsx(C,{path:"*",element:e.jsx(X,{})})]})}export{Et as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-UOzcPsHa.js";import{a as f}from"./sentry-DHDsO12F.js";import{h as $,u as x,g as T,i as j,j as p}from"./core-B5mDy9pu.js";import{T4 as s,T3 as v,$r as B,fF as C,$s as E}from"./zeni-epic-state-7eY0g-Bc.js";import{a1 as z,ae as g,E as D,z as L,a7 as P,d6 as N,a4 as U}from"./index-CrBk11WI.js";import{n as _}from"./mui-Do6nLzGb.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="33433877-b0e7-4dcb-98a9-691d7c5dbeab",e._sentryDebugIdIdentifier="sentry-dbid-33433877-b0e7-4dcb-98a9-691d7c5dbeab")}catch{}})();const G=_.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;function H(){const e=$(),n=x(),d=z(),l=T();let{accountId:a}=j(),m=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,m=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[u,b]=f.useState(!1),h=D();f.useEffect((()=>{u||(b(!0),n(v(a??"",!1)))}),[u,n]);const o=p((t=>B(t,a??""))),y=()=>{const t=U(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},r=L.getSignedInUser(),c=p((t=>C(t))),I={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c.tenantId??""},w=E(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=c.company?.companyInfo.companyLegalName??c.companyName;if(r==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(P,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):i.jsx(G,{windowSize:d,children:i.jsx(N,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:y,authParams:I,downloadEndPoint:m})})}export{H as Z};
|