@zeniai/web-app-ui 5.0.71-dev → 5.0.72-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/dist/assets/AddressRoutes-C-QI3DFo.js +1 -0
  2. package/dist/assets/{AddressScreen-IPMb-Lqg.js → AddressScreen--B-G7QO-.js} +2 -2
  3. package/dist/assets/{AiCfoScreen-DxwryQBf.js → AiCfoScreen-B1XtoO1j.js} +3 -3
  4. package/dist/assets/{BillPayApprovalRoutes-B33P7K39.js → BillPayApprovalRoutes-BTct1_HT.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-D2OQNHTr.js → BillPayRoutes-0Ir4R_dy.js} +17 -17
  6. package/dist/assets/{BusinessVerificationPageScreen-BI3GYpKu.js → BusinessVerificationPageScreen-C5SO6Pvr.js} +2 -2
  7. package/dist/assets/{ChargeCardRoutes-DZTXpkWd.js → ChargeCardRoutes-DYWYfiCF.js} +9 -9
  8. package/dist/assets/CompanyPassportScreen-ImtgWbLz.js +1 -0
  9. package/dist/assets/ConnectionAuthScreen-Cb9jSvP9.js +11 -0
  10. package/dist/assets/CustomerOnboardingAuthScreen-C59aPPyy.js +1 -0
  11. package/dist/assets/CustomerOnboardingRoutes-D083k3se.js +23 -0
  12. package/dist/assets/{DashboardRoutes-Ckl1eEC2.js → DashboardRoutes-DCYo-RgX.js} +3 -3
  13. package/dist/assets/{DefaultTenantHome-TLtEW787.js → DefaultTenantHome-BZpowVvC.js} +1 -1
  14. package/dist/assets/DomesticWireDetailScreen-C7OJwgdT.js +18 -0
  15. package/dist/assets/{DrawerScreen-B_tMe04S.js → DrawerScreen-BZUjw4oO.js} +1 -1
  16. package/dist/assets/EntityDetailRoutes-D0h8mKin.js +1 -0
  17. package/dist/assets/{ExpenseAutomationRoutes-BqK3TSEk.js → ExpenseAutomationRoutes-CsEeiul8.js} +5 -5
  18. package/dist/assets/FeaturePreviewScreen-K5aATczv.js +1 -0
  19. package/dist/assets/HubSpotOAuthCallbackScreen-BQBDXWqr.js +1 -0
  20. package/dist/assets/MagicLinkRoutes-CE-gub2V.js +72 -0
  21. package/dist/assets/MagicLinkSignInScreen-CQSnWkbc.js +12 -0
  22. package/dist/assets/{MobileAppDrawer-BDT0TmvR.js → MobileAppDrawer-Cgt4TE38.js} +1 -1
  23. package/dist/assets/NotFoundScreen-gdNFrdCn.js +1 -0
  24. package/dist/assets/{NotificationRoutes-BblXuLTj.js → NotificationRoutes-BdPqco6s.js} +1 -1
  25. package/dist/assets/OAuthConsentScreen-D0N2LAnp.js +1 -0
  26. package/dist/assets/PandLWithForecastRoutes-Bm69S-Ti.js +1 -0
  27. package/dist/assets/PeopleRoutes-jbfRIyVB.js +22 -0
  28. package/dist/assets/PerformanceRoutes-Bmd54T25.js +1 -0
  29. package/dist/assets/{Preview-IJkS64Sk.js → Preview-fN-QilxH.js} +1 -1
  30. package/dist/assets/{QBOConnectionScreen-DQkFbpJH.js → QBOConnectionScreen-BdH_dfqU.js} +1 -1
  31. package/dist/assets/ReferralListScreen-ChHWDxsd.js +5 -0
  32. package/dist/assets/ReimbursementApprovalRoutes-TgmzGWOx.js +1 -0
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DMdpETrG.js → ReimbursementApprovalRuleDetailScreen-DC3PDULr.js} +1 -1
  34. package/dist/assets/{ReimbursementRoutes-u-qnVfy0.js → ReimbursementRoutes-CSWRe0vq.js} +5 -5
  35. package/dist/assets/{ReportsRoutes-CqNp_xpd.js → ReportsRoutes-DKXm4KKp.js} +1 -1
  36. package/dist/assets/RewardsRoutes-vGbrbx2s.js +1 -0
  37. package/dist/assets/ScreenRoutes-C_esjW3S.js +2 -0
  38. package/dist/assets/SettingsRoutes-DVvUA_Bx.js +57 -0
  39. package/dist/assets/{SetupPagesScreen-Cdo59_U5.js → SetupPagesScreen-DucLsH4D.js} +5 -5
  40. package/dist/assets/SignInScreen-0ZDiC6ii.js +1 -0
  41. package/dist/assets/SignOutScreen-BBFPJdbD.js +9 -0
  42. package/dist/assets/{TaskListScreen-C1G-Z2qb.js → TaskListScreen-38bto6MZ.js} +2 -2
  43. package/dist/assets/TaskRoutes-Tf445JV3.js +9 -0
  44. package/dist/assets/TransactionDetailRoutes-DiMG8Ceq.js +1 -0
  45. package/dist/assets/TransactionDetailScreen-eONbl3-5.js +5 -0
  46. package/dist/assets/{TransactionListRoutes-r3XEp13P.js → TransactionListRoutes-zno0rGgt.js} +1 -1
  47. package/dist/assets/{TreasuryRoutes-Cp7F7y4J.js → TreasuryRoutes-LPcPr4Bm.js} +6 -6
  48. package/dist/assets/{VendorsRoutes-BBf47BBb.js → VendorsRoutes-B9bJ-Aua.js} +21 -21
  49. package/dist/assets/WiseConfirmationScreen-QWHy02om.js +12 -0
  50. package/dist/assets/{ZeniAccountRoutes--fSibHTb.js → ZeniAccountRoutes-Dsy44Rah.js} +12 -12
  51. package/dist/assets/ZeniAccountStatementScreen-vtEr6xSK.js +9 -0
  52. package/dist/assets/{accountMappingHelper-COFGwnKa.js → accountMappingHelper-yvOeY36k.js} +1 -1
  53. package/dist/assets/{analytics-CgF6EPDF.js → analytics-CFOBCmx3.js} +1 -1
  54. package/dist/assets/{analyticsHelper-DUlInMOD.js → analyticsHelper-ByPPdEaS.js} +1 -1
  55. package/dist/assets/{core-C_ZreJAw.js → core-B86WF2Ww.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-BP018w8C.js → decodeURIComponentSafe-C-DNZuqb.js} +1 -1
  57. package/dist/assets/{dnd-C3uQO7Bn.js → dnd-DrUSXn8k.js} +1 -1
  58. package/dist/assets/{empty-wr1Sjolf.js → empty-CRbjQ82E.js} +1 -1
  59. package/dist/assets/empty-Dfl21Uq6.js +1 -0
  60. package/dist/assets/{emptyVideoElement-DDjbVU1E.js → emptyVideoElement-Cn2ijyYz.js} +1 -1
  61. package/dist/assets/epic-D4mIFLgi.js +2 -0
  62. package/dist/assets/getLocaleForTenant-CRLTWbEq.js +1 -0
  63. package/dist/assets/{index-CGS6zWWp.js → index-B7GRpDkc.js} +14093 -13666
  64. package/dist/assets/index-BHE-07hU.js +1 -0
  65. package/dist/assets/{index-DpCPl3KC.js → index-BaOA81A8.js} +1 -1
  66. package/dist/assets/{empty-D-N5n4Nc.js → index-BeL81npV.js} +1 -1
  67. package/dist/assets/{index-T4vVJHIk.js → index-CcACvObI.js} +1 -1
  68. package/dist/assets/{index-CWsQVRWF.js → index-Ch8CfHB9.js} +1 -1
  69. package/dist/assets/{index-BYIPlMHr.js → index-D-Bl3J2P.js} +1 -1
  70. package/dist/assets/{index-CnROQyBG.js → index-vzrF8p0m.js} +2 -2
  71. package/dist/assets/{lexical-E_ubWL4u.js → lexical-COpm991f.js} +1 -1
  72. package/dist/assets/{liveblocks-BdePShct.js → liveblocks-D41N0IlG.js} +1 -1
  73. package/dist/assets/{lottie-CUKBWgbe.js → lottie-BHETr187.js} +1 -1
  74. package/dist/assets/{mui-BtnH6ELy.js → mui-DZd7XaFW.js} +1 -1
  75. package/dist/assets/{pathToGoBack-Bg0yBLYd.js → pathToGoBack-Dt_z5GBF.js} +1 -1
  76. package/dist/assets/{pdf-CH0jWS01.js → pdf-BdWka_4Q.js} +4 -4
  77. package/dist/assets/{pdf-lib-th4agIPv.js → pdf-lib-DmLnrwkt.js} +1 -1
  78. package/dist/assets/{plaid-CLHQ0yLv.js → plaid-CZm5yErz.js} +1 -1
  79. package/dist/assets/{pusher-DTlPALAn.js → pusher-BTnbGSy-.js} +1 -1
  80. package/dist/assets/{react-B1z9ZoMC.js → react-5WKYmmJ2.js} +1 -1
  81. package/dist/assets/{react-BYz405pF.js → react-BBgH-vWa.js} +1 -1
  82. package/dist/assets/{react-COj3_dzF.js → react-BcXMc1LZ.js} +1 -1
  83. package/dist/assets/{react-4Ap2VUmu.js → react-CEFsrN8T.js} +1 -1
  84. package/dist/assets/{react-CcfFphdJ.js → react-CqgPSYXh.js} +1 -1
  85. package/dist/assets/{react-Bxo6GPqK.js → react-DLXiwY4W.js} +1 -1
  86. package/dist/assets/{recharts-CHr9O26_.js → recharts-BHLF4b4u.js} +1 -1
  87. package/dist/assets/{routePaths-DZkWYInw.js → routePaths-PD5Rqyfc.js} +1 -1
  88. package/dist/assets/{sentry-CX_3yQh7.js → sentry-Bhr8KU--.js} +1 -1
  89. package/dist/assets/{url-CcaHVDFu.js → url-CgMNpbBl.js} +1 -1
  90. package/dist/assets/{url-BBCQjahk.js → url-qE7MaS1D.js} +1 -1
  91. package/dist/assets/useAskAiCfoHostNavButtonProps-BfmyGytS.js +1 -0
  92. package/dist/assets/{useDeviceId-DtlEyHOn.js → useDeviceId-rK1IEgER.js} +1 -1
  93. package/dist/assets/useFetchSuggestedQuestionsWhenReady-B1r7XRNi.js +1 -0
  94. package/dist/assets/{useInitialThreadRequest-AyrSL871.js → useInitialThreadRequest-Oe-7-CI7.js} +1 -1
  95. package/dist/assets/{utils-Dw8b4HCO.js → utils-Mvk27uIx.js} +1 -1
  96. package/dist/assets/{withTransactionSidePanel-BmH5jBz_.js → withTransactionSidePanel-7uc9rYEd.js} +2 -2
  97. package/dist/assets/{zeni-epic-state-H6DZSSlf.js → zeni-epic-state-BLvcbIPk.js} +6 -6
  98. package/dist/index.html +1 -1
  99. package/package.json +3 -3
  100. package/dist/assets/AddressRoutes-DkpE57wD.js +0 -1
  101. package/dist/assets/CompanyPassportScreen-kKTXGF13.js +0 -1
  102. package/dist/assets/ConnectionAuthScreen-CYS4bJsi.js +0 -11
  103. package/dist/assets/CustomerOnboardingAuthScreen-CFcE03ug.js +0 -1
  104. package/dist/assets/CustomerOnboardingRoutes-jk197VvK.js +0 -23
  105. package/dist/assets/DomesticWireDetailScreen-BkEDowN8.js +0 -18
  106. package/dist/assets/EntityDetailRoutes-DlKVqtyC.js +0 -1
  107. package/dist/assets/FeaturePreviewScreen-aYYY9m7f.js +0 -1
  108. package/dist/assets/MagicLinkRoutes-BLaYeloO.js +0 -72
  109. package/dist/assets/MagicLinkSignInScreen-CUegQSoi.js +0 -12
  110. package/dist/assets/NotFoundScreen-C4aqnA8_.js +0 -1
  111. package/dist/assets/OAuthConsentScreen-sykQomv8.js +0 -1
  112. package/dist/assets/PandLWithForecastRoutes-CBrTW5wX.js +0 -1
  113. package/dist/assets/PeopleRoutes-B9d9GdEF.js +0 -22
  114. package/dist/assets/PerformanceRoutes-BFJ-jyRc.js +0 -1
  115. package/dist/assets/ReferralListScreen-CyoB8VnU.js +0 -5
  116. package/dist/assets/ReimbursementApprovalRoutes-B00fD8b9.js +0 -1
  117. package/dist/assets/RewardsRoutes-R2VgDdnw.js +0 -1
  118. package/dist/assets/ScreenRoutes-9MMqpDv8.js +0 -2
  119. package/dist/assets/SettingsRoutes-KHzSnNUm.js +0 -57
  120. package/dist/assets/SignInScreen-DX4DUgMU.js +0 -1
  121. package/dist/assets/SignOutScreen-DOTJzbce.js +0 -9
  122. package/dist/assets/TaskRoutes-DeZTJnM4.js +0 -9
  123. package/dist/assets/TransactionDetailRoutes-CxGTwTQr.js +0 -1
  124. package/dist/assets/TransactionDetailScreen-DbXqL9Dv.js +0 -5
  125. package/dist/assets/WiseConfirmationScreen-BZsn9iwu.js +0 -12
  126. package/dist/assets/ZeniAccountStatementScreen-BKbkGQh4.js +0 -9
  127. package/dist/assets/epic-DKrR9LyJ.js +0 -2
  128. package/dist/assets/getLocaleForTenant-C-vhBCTM.js +0 -1
  129. package/dist/assets/index-CUa_5F-3.js +0 -1
  130. package/dist/assets/index-DJtUADrm.js +0 -1
  131. package/dist/assets/useAskAiCfoHostNavButtonProps-Nsv7MqoG.js +0 -1
  132. package/dist/assets/useFetchSuggestedQuestionsWhenReady-C86A67zi.js +0 -1
@@ -1,57 +0,0 @@
1
- import{j as t}from"./liveblocks-BdePShct.js";import{a as u}from"./sentry-CX_3yQh7.js";import{j as T,u as B,h as P,g as m,k as R,l as _,n as X,o as C}from"./core-C_ZreJAw.js";import{bn as Ie,eO as k,gw as ce,KF as Ce,J2 as xe,jr as le,lK as Ee,gy as Ae,KH as je,KG as ke,N4 as we,x3 as Pe,By as ve,MF as De,MO as Me,c1 as re,cG as Ue,cH as Te,IN as Fe,N5 as Be,IO as Re,vv as _e,N6 as Ve,DO as Oe,Be as Le,B5 as de,B2 as Ne,vz as ue,B8 as pe,Bb as ge,Bh as W,s6 as Y,vy as $e,j3 as q,j6 as me,N7 as Ge,k7 as Ke,vO as ze,JA as Je,JB as Ze,j1 as He,N8 as Qe,j4 as Xe,N9 as qe,vL as We,Na as Ye,Nb as en,Bv as nn,eS as fe,eU as he,Nc as tn,fw as an,J3 as sn,vK as te,fB as ae,fA as on,vJ as cn,fz as ln,fy as rn,Nd as dn,eX as be,Ne as un,Nf as pn,vR as gn,vI as se,Ng as mn,fd as fn,vF as hn,bU as bn,c0 as yn,b$ as Sn,bV as In,bZ as Cn,bY as xn,bX as En,b_ as An,bW as jn}from"./zeni-epic-state-H6DZSSlf.js";import{y as ee,$ as M,z as x,ac as ye,bC as kn,c as G,f as wn,k as V,B as ne,bD as Pn,bE as vn,an as Dn,i as Se,bF as Mn,bG as Un,bH as Tn,a6 as Fn,R as Bn,bI as Rn,s as _n,bJ as Vn}from"./index-CGS6zWWp.js";import{n as U}from"./mui-BtnH6ELy.js";import{M as v}from"./MobileAppDrawer-BDT0TmvR.js";import{a as N,g as $,m as On}from"./accountMappingHelper-COFGwnKa.js";import{t as Ln,A as Nn}from"./AddressScreen-IPMb-Lqg.js";import F from"./NotFoundScreen-C4aqnA8_.js";import{g as $n}from"./analyticsHelper-DUlInMOD.js";import{B as Gn}from"./BusinessVerificationPageScreen-BI3GYpKu.js";import{C as Kn}from"./CompanyPassportScreen-kKTXGF13.js";import{q as oe}from"./QBOConnectionScreen-DQkFbpJH.js";import{B as zn}from"./BillPayApprovalRoutes-B33P7K39.js";import{R as Jn}from"./ReimbursementApprovalRoutes-B00fD8b9.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.js";import"./routePaths-DZkWYInw.js";import"./empty-wr1Sjolf.js";import"./pdf-lib-th4agIPv.js";import"./index-T4vVJHIk.js";import"./url-CcaHVDFu.js";import"./index-CUa_5F-3.js";import"./decodeURIComponentSafe-BP018w8C.js";import"./ReimbursementApprovalRuleDetailScreen-DMdpETrG.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]="e200ea95-156d-44fc-bc0b-22b55a2a9d03",e._sentryDebugIdIdentifier="sentry-dbid-e200ea95-156d-44fc-bc0b-22b55a2a9d03")}catch{}})();const Zn=U.div`
2
- display: flex;
3
- height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,Hn=R(function(e,a){return{accountMappingView:a.accountMappingView,isFiling1099FeatureEnabled:a.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:a.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:le(e),isAccountingClassesUpdateInProgress:e.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:xe(e),meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true"}},function(e,a){const{navigate:i,location:c,isFiling1099FeatureEnabled:o}=a;return{onAccountMappingChange:n=>{const{uncategorizedAccountSection:s,billsAccountSection:r,reimbursementsAccountSection:p,vendorsAccountSection:d,filing1099Section:f}=n,{incomeAccount:b,expenseAccount:g}=s,{billPayAccount:l}=r,{reimbursementsAccount:E}=p,{prepaidExpensesAccount:S,fixedAssetsAccount:j,accruedExpensesAccount:y}=d,{bankAccount:I,expenseCategory1099:O}=f,A=N(a.accountMappingView.incomeAccountList,b.selectedOption),K=N(a.accountMappingView.expenseAccountList,g.selectedOption),z=N(a.accountMappingView.billPayAccountList,l.selectedOption),J=N(a.accountMappingView.reimbursementsAccountList,E.selectedOption),L=$(a.accountMappingView.prepaidExpensesAccountList,S.selectedOptions),h=$(a.accountMappingView.fixedAssetsAccountList,j.selectedOptions),D=$(a.accountMappingView.accruedExpensesAccountList,y.selectedOptions),Z=$(a.accountMappingView.bankAccounts1099FilingAccountList,I.selectedOptions),H=On(a.accountMappingView.expenseAccounts1099FilingAccountList,O),Q={selectedIncomeAccountId:A?.accountId,selectedExpenseAccountId:K?.accountId,selectedBillPayAccountId:z?.accountId,selectedReimbursementsAccountId:J?.accountId,selectedPrepaidExpensesAccountIds:L.map(w=>w.accountId),selectedFixedAssetsAccountIds:h.map(w=>w.accountId),selectedAccruedExpensesAccountIds:D.map(w=>w.accountId),selectedBankAccounts1099FilingAccountIds:Z.map(w=>w.accountId),selectedExpenseAccounts1099FilingAccountIds:H};e(ke({data:Q}))},onBackClick:()=>{ye(c)===!1?(i("../../dashboard"),e(je())):e(ce())},onSaveClick:()=>{e(Ae()),o&&G.track(wn.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:n=>{e(Ee(a.currentTenant.companyId,n))}}})(kn),Qn=()=>{const e=T(),a=B(),i=P(),{useFeatureGate:c}=ee(),{isFeatureEnabled:o}=c(M.isFiling1099FeatureEnabled),{isFeatureEnabled:n}=c(M.isScheduledJEAccruedExpensesFeatureEnabled),s=x.getSignedInUser(),r=Ie(s),p=m(S=>k(S)),[d,f]=u.useState(!1),[b,g]=u.useState(!1);u.useEffect(()=>{d===!1&&(i(ce()),f(!0))},[d]);const l=m(S=>Ce(S)),E=S=>{g(S)};return t.jsxs(Zn,{children:[t.jsx(v,{isAppContentDrawerOpen:b,handleDrawerToggle:E}),t.jsx(Hn,{currentTenant:p,navigate:e,accountMappingView:l,isFiling1099FeatureEnabled:o&&r,isAccruedExpensesFeatureEnabled:n,location:a,isSettings:ye(a),onClickMenuIcon:()=>E(!0)})]})},Xn=U.div`
10
- display: flex;
11
- height: 100%;
12
- width: 100%;
13
- flex: 1 1 auto;
14
- flex-direction: column;
15
- align-items: center;
16
- background-color: ${e=>e.theme.colors.grey4};
17
- `,qn=R(function(e,a){const i=k(e),c=De(e),o=Me(e),n=a.roleMap.bill_pay_admin;return{isDisabled:(re(i?.userRole??[])||n)&&"readonly",billpayApprovalView:c,remiApproverView:o,analytics:G}},function(e,a){const{navigate:i,currentTenant:c}=a;return{onSetupApprovalRulesBillPaySectionClick:()=>{i("bills/approval-rules")},onSetupApprovalRulesRemiSectionClick:()=>{i("reimbursements/approval-rules")},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?i("../.."):i("../")},onNavigateToDashboard:()=>{i("../dashboard")}}})(Pn),Wn=()=>{const e=T(),a=B(),i=P(),{tenantEmailDomain:c}=_(),[o,n]=u.useState(!1),[s,r]=u.useState(!1),[p,d]=u.useState(!1),f=m(y=>k(y)),b=m(y=>y.billPaySetupApproverViewState.fetchState),g=m(y=>y.remiSetupApproverViewState.fetchState),l=m(y=>we(y)),E=f.companyId??x.getSignedInUserTenant(c)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access Approval Rules settings page without signing in...");const S=V();u.useEffect(()=>{p||b!=="Not-Started"||(d(!0),i(Pe(!0)))},[p,b,i]),u.useEffect(()=>{s||g!=="Not-Started"||(r(!0),i(ve(!0)))},[s,g,i]);const j=y=>{n(y)};return S?.loggedInUserRoleMap!=null?t.jsxs(Xn,{children:[t.jsx(v,{isAppContentDrawerOpen:o,handleDrawerToggle:j}),t.jsx(qn,{navigate:e,location:a,companyId:E,currentTenant:f,roleMap:S.loggedInUserRoleMap,onClickMenuIcon:()=>{j(!0)}})]}):t.jsx(ne,{fetchState:l.fetchState})},Yn=U.div`
18
- display: flex;
19
- height: 100%;
20
- width: 100%;
21
- flex: 1 1 auto;
22
- flex-direction: column;
23
- align-items: center;
24
- background-color: ${e=>e.theme.colors.grey4};
25
- `,et=R(function(e,a){const{companyId:i,isZeniAccountEnabled:c,isChargeCardEnabled:o,isBillPayEnabled:n,isRemiEnabled:s,isTreasuryEnabled:r}=a,p=k(e);return{bankSetupView:Ve(e,i,n,s,c,o,r),connectedAccountProvider:p.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:G}},function(e,a){const{navigate:i,currentTenant:c,companyId:o}=a;return{onFetchLinkTokenClick:(n,s,r)=>{e(Y(s,n,r))},onEstablishConnectionClick:(n,s,r)=>{e(W(n,o,s,r))},onUpdatePaymentAccountStatus:(n,s,r,p,d)=>{e(ge(n,s,d,p,r))},onUpdatePaymentAccountLoginStatus:(n,s,r,p)=>{e(pe(!1,n,p,r,s))},onEstablishConnectionSuccess:(n,s)=>{e(ue(s,n))},onUpdateAccountClick:(n,s,r,p,d)=>{e(d==="paymentAccount"?de(n,s,r,p):Ne(p,n,s))},onUpdatePrimaryFundingAccount:(n,s,r)=>{e(Le(o,s,n,r))},onRemoveConnection:n=>{e(Oe(n))},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?i("../.."):i("../")},onNavigateToDashboard:()=>{i("../dashboard")}}})(vn),nt=()=>{const e=T(),a=B(),i=P(),{tenantEmailDomain:c}=_(),o=V(),[n,s]=u.useState(!1),[r,p]=u.useState(!1),d=m(I=>k(I)),f=m(I=>I.settingsViewState.bankConnection.fetchState),b=Ue(d,o?.loggedInUserRoleMap),g=Te(d,o?.loggedInUserRoleMap),l=Fe(d,o?.loggedInUserRoleMap),E=Be(d,o?.loggedInUserRoleMap),S=Re(d,o?.loggedInUserRoleMap),j=d.companyId??x.getSignedInUserTenant(c)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");u.useEffect(()=>{r||f==="Completed"||(p(!0),i(_e(!1)))},[r,i,f]);const y=I=>{s(I)};return b||l||g||S?t.jsxs(Yn,{children:[t.jsx(v,{isAppContentDrawerOpen:n,handleDrawerToggle:y}),t.jsx(et,{navigate:e,location:a,companyId:j,currentTenant:d,roleMap:o.loggedInUserRoleMap,isBillPayEnabled:b,isRemiEnabled:g,isZeniAccountEnabled:l,isChargeCardEnabled:S,isTreasuryEnabled:E,onClickMenuIcon:()=>{y(!0)}})]}):t.jsx(F,{})},tt=U.div`
26
- display: flex;
27
- height: 100%;
28
- width: 100%;
29
- flex: 1 1 auto;
30
- flex-direction: column;
31
- align-items: center;
32
- background-color: ${e=>e.theme.colors.grey4};
33
- `,at=R(function(e,a){const{companyId:i}=a,c=k(e),o=a.roleMap.bill_pay_admin,n=Ge(e,i),{uiState:s}=n,r=(re(c?.userRole??[])||o)&&n.setupView.accountFetchStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.accountUpdateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{billingSetupView:n,uiState:s,stripeKey:Se.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:r,analytics:G}},function(e,a){const{navigate:i,currentTenant:c,companyId:o}=a;return{onFetchLinkTokenClick:(n,s)=>{e(Y("billing_setup",n,s))},onEstablishConnectionClick:n=>{e(W(n,o,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(ue("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,s,r)=>{e(ge(n,s,"billing","billing_setup",r))},onUpdatePaymentAccountLoginStatus:(n,s)=>{e(pe(!1,n,"billing","billing_setup",s))},onUpdateAccountClick:(n,s)=>{e(de(n,s,"billing","billing_setup"))},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?i("../.."):i("../")},onNavigateToDashboard:()=>{i("../dashboard")},handleCreateCardSetupIntent:n=>{e(me(n))},handleConfirmCardSetupIntent:n=>{e(Xe(n))},updateCardPaymentModalState:n=>{e(Qe({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,s,r)=>{e(He(n,s,r))},handleFetchPaymentSources:()=>{e(q())},resetCardPaymentViewState:()=>{e(Ze())},handleResetCardPaymentErrorStatuses:()=>{e(Je())},onBillingAddressSave:n=>{e(ze(n))},onAddressEditHandler:n=>{if(n!=null){const s=Ln(n);e(Ke({addressType:"subscription_billing_address",addressToCreate:s}))}}}})(Mn),st=()=>{const e=T(),a=B(),i=P(),{tenantEmailDomain:c}=_(),[o,n]=u.useState(!1),[s,r]=u.useState(!1),[p,d]=u.useState(!1),f=m(I=>k(I)),b=m(I=>I.cardPaymentViewState),g=m(I=>I.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState),l=Dn(b.addCardPaymentSourceStatus.fetchState),E=b.addCardPaymentSourceStatus.fetchState,S=f.companyId??x.getSignedInUserTenant(c)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const j=V();u.useEffect(()=>{S!=null&&i($e(S,!1))},[S,i]),u.useEffect(()=>{s||(r(!0),i(q()))},[s,i]),u.useEffect(()=>{p||(me(["card"]),d(!0))},[p]),u.useEffect(()=>{l==="In-Progress"&&E==="Completed"&&i(q())},[l,E]);const y=I=>{n(I)};return j?.loggedInUserRoleMap!=null?t.jsxs(tt,{children:[t.jsx(v,{isAppContentDrawerOpen:o,handleDrawerToggle:y}),t.jsx(at,{navigate:e,location:a,companyId:S,currentTenant:f,roleMap:j.loggedInUserRoleMap,onClickMenuIcon:()=>{y(!0)},googleAPIKey:Se.googleMapsAPIKey})]}):t.jsx(ne,{fetchState:g})},ot=R(function(){return{meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true"}},function(e,a){const{navigate:i,integrationsView:c,tenantEmailDomain:o}=a;return{onBackClick:()=>{i("../")},onNavigateToDashboard:()=>{i("../dashboard")},onReconnectQBO:()=>{oe.init("/connection/auth",o),oe.handleClick()},onRefreshClick:()=>{c.integrations.refreshQBO.fetchState!=="In-Progress"&&e(We())}}})(Un),it=()=>{const e=T(),{tenantEmailDomain:a}=_(),[i,c]=u.useState(!1),o=m(g=>g.tenantState.fetchState),n=m(g=>k(g)),s=n.companyId??x.getSignedInUserTenant(a)?.companyId,r=x.getSignedInUser(),p=V(),d=p?.loggedInUserRole.includes("admin")===!0;if(r==null)throw Error("Can't access Integrations page without signing in...");const f=g=>{c(g)},b=m(g=>qe(g,s));return p?.loggedInUserRoleMap!=null?t.jsxs(ct,{children:[t.jsx(v,{isAppContentDrawerOpen:i,handleDrawerToggle:f}),t.jsx(ot,{navigate:e,onClickMenuIcon:()=>{f(!0)},isAdmin:d,integrationsView:b,isLoading:o==="In-Progress",tenantEmailDomain:n.tenantEmailDomain})]}):t.jsx(ne,{fetchState:o})},ct=U.div`
34
- display: flex;
35
- height: 100%;
36
- width: 100%;
37
- flex: 1 1 auto;
38
- flex-direction: column;
39
- align-items: center;
40
- background-color: ${e=>e.theme.colors.grey4};
41
- `,lt=U.div`
42
- display: flex;
43
- height: 100%;
44
- width: 100%;
45
- flex: 1 1 auto;
46
- flex-direction: column;
47
- align-items: center;
48
- background-color: ${e=>e.theme.colors.grey4};
49
- `,rt=()=>{const e=P(),{tenantEmailDomain:a}=_(),[i,c]=u.useState(!1),o=m(l=>k(l)).companyId??x.getSignedInUserTenant(a)?.companyId,n=x.getSignedInUser();if(n==null)throw Error("Can't access my bank connections page without signing in...");const s=m(l=>Ye(l,n.userId)),r=m(l=>en(l,o,"bill_pay","user_reimbursement_account")),{plaidConnectionDetails:p}=r,d=l=>{c(l)},f=u.useCallback(l=>{e(Y("user_reimbursement_account",l))},[]),b=u.useCallback(l=>{e(W(l,o,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},[]);u.useEffect(()=>{s.fetchState!=="Completed"&&s.fetchState!=="In-Progress"&&e(nn(n.userId))},[n.userId,s.fetchState]);const g=s.fetchState==="Not-Started"||s.fetchState==="In-Progress";return t.jsxs(lt,{children:[t.jsx(v,{isAppContentDrawerOpen:i,handleDrawerToggle:d}),t.jsx(Tn,{plaidConnectionDetails:p,isLoading:g,myBankConnectionsView:s,onFetchLinkTokenClick:f,onEstablishConnectionClick:b,onClickMenuIcon:()=>{d(!0)}})]})},dt=U.div`
50
- display: flex;
51
- height: 100%;
52
- width: 100%;
53
- flex: 1 1 auto;
54
- flex-direction: column;
55
- align-items: center;
56
- background-color: ${e=>e.theme.colors.grey4};
57
- `,ie=({appContent:e})=>{const a=P(),i=T(),c=B(),[o,n]=u.useState(!1),s=m(h=>k(h)),{tenantEmailDomain:r}=s,p=s.companyId??x.getSignedInUserTenant(r)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:d}=ee(),{isFeatureEnabled:f}=d(M.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(M.isChargeCardFeatureEnabled),{isFeatureEnabled:g}=d(M.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=d(M.isTreasuryEnabled),E=m(h=>le(h)),S=fe(s),j=he(g,s),y=!j&&E,I=Fn(s,b,g),{areTenantIdsInSync:O}=Bn();u.useEffect(()=>{O&&a(tn(p,y))},[p,a,y,O]);const A=m(h=>an(h,y)),K=A.fetchState==="Not-Started"||A.fetchState==="In-Progress"||p==null,z=sn(s),J=!!s.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,L=h=>{n(h)};return t.jsxs(dt,{children:[t.jsx(v,{isAppContentDrawerOpen:o,handleDrawerToggle:L}),e!=null?t.jsx(t.Fragment,{children:e}):t.jsx(Rn,{myProfileView:A,isAccountingClassesEnabled:E,isReimbursementDisabled:J===!1,isZeniAccountsDisabled:f===!1,isChargeCardDisabled:I===!1,isTreasuryDisabled:l===!1,isLiteRoleDisabled:z===!1,onClickMenuIcon:()=>{L(!0)},isLoading:K,isBankingOnlyTenant:j,isCardsOnlyTenant:S,onAddressClick:h=>{const D=function(H,Q){let w=`/${H}/settings/my_profile`;return w=w.concat(`/new/${Q}`),w}(r,h),Z=_n(c.state?.pathnameStackToGoBack,c.pathname);i(D,{state:{pathnameStackToGoBack:Z}})},onGetOtp:h=>{const D={...A.myProfileLocalData,phone:h};a(te({localData:D})),a(rn(h,"MyProfile"))},onResendOtp:h=>{a(ln(h,"MyProfile"))},onCancelClick:()=>{a(cn())},onSaveClick:()=>{a(ae("MyProfile",A.myProfileLocalData.phone,A.myProfileLocalData.otpChallenge,A.myProfileLocalData.dateOfBirth,A.addressData?.addressToCreate))},onVerifyOtp:(h,D)=>{a(on(h,D,"MyProfile"))},onVerifyOtpSuccess:h=>{h!=null&&x.saveZeniOtpToken(h),a(ae("MyProfile",A.myProfileLocalData.phone,A.myProfileLocalData.otpChallenge,A.myProfileLocalData.dateOfBirth,A.addressData?.addressToCreate))},updateMyProfileLocalData:h=>{a(te({localData:h}))}})]})};function ut(){const e=P(),a=m(l=>k(l)).companyId,i=m(l=>dn(l)),c=m(l=>be(l)),o=x.getSignedInUser(),[n,s]=u.useState(!1),r=u.useCallback(l=>{s(l)},[]),p=u.useCallback(l=>{e(un(l))},[]),d=u.useCallback(()=>{o?.userEmail!=null&&e(pn({loggedInUserEmail:o.userEmail}))},[o?.userEmail]),f=u.useCallback(()=>{e(gn())},[]);if(o==null)throw Error("Can't access Notification Settings page without signing in...");const b=u.useCallback(()=>{const l=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(se(l,a))},[a,c.notificationSettings.monthEndInsightsNotificationSettings.enabled]),g=u.useCallback(()=>{e(mn())},[]);return u.useEffect(()=>{if(c.fetchState==="Completed"&&i.fetchState!=="In-Progress"&&i.fetchState!=="Completed"){const l=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(se(l,a))}},[i.fetchState,a,c.notificationSettings.monthEndInsightsNotificationSettings.enabled,c.fetchState]),t.jsxs(t.Fragment,{children:[t.jsx(v,{isAppContentDrawerOpen:n,handleDrawerToggle:r}),t.jsx(Vn,{notificationSettingsView:i,onFormDataChange:p,onCancel:d,onSave:f,onClickMenuIcon:()=>{r(!0)},signedInUser:o,onRefresh:b,resetUpdateStatus:g})]})}function Jt(e){const[a,i]=u.useState(!1),c=m(l=>be(l)),o=m(l=>k(l)),n=V(),s=x.getSignedInUser(),r=P(),{useFeatureGate:p}=ee(),{isFeatureEnabled:d}=p(M.isDebitCardFeatureEnabled),f=s?.userEmail==null||c.fetchState!=="Completed"||fn(c.notificationSettings,s.userEmail,d,o);u.useEffect(()=>{c.fetchState!=="In-Progress"&&c.fetchState!=="Completed"&&a===!1&&(i(!0),r(hn()))},[c.fetchState,a]);const b=he(d,o),g=fe(o);return c.fetchState!=="In-Progress"&&c.fetchState!=="Not-Started"||f!==!0?bn(o)?t.jsxs(X,{children:[yn(n?.loggedInUserRole??[],d,o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"accounting/*",element:t.jsx(Qn,{})}),Sn(n?.loggedInUserRole??[],d,o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"approval_rules/*",element:t.jsx(pt,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),In(o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"my_bank_connections",element:t.jsx(rt,{})}),Cn(o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"bank_connections",element:t.jsx(nt,{})}),xn(o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"business_verification",element:t.jsx(Gn,{productType:b?"zeni_accounts":g?"charge_cards":$n(o,n?.loggedInUserRoleMap)})}),En(n?.loggedInUserRole??[],o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"company_details",element:t.jsx(Kn,{})}),An(n?.loggedInUserRole??[],o)&&t.jsx(C,{path:"billing",element:t.jsx(st,{})}),jn(n?.loggedInUserRole??[],d,o)&&t.jsx(C,{path:"integrations",element:t.jsx(it,{})}),t.jsx(C,{path:"my_profile/new/:addressType",element:t.jsx(ie,{appContent:t.jsx(Nn,{isSubPage:!1})})}),t.jsx(C,{path:"my_profile",element:t.jsx(ie,{})}),f&&t.jsx(C,{path:"notifications",element:t.jsx(ut,{})}),t.jsx(C,{path:"*",element:t.jsx(F,{})})]}):t.jsx(X,{children:t.jsx(C,{path:"*",element:t.jsx(F,{})})}):null}function pt(e){return t.jsxs(X,{children:[t.jsx(C,{path:"/",element:t.jsx(Wn,{})}),t.jsx(C,{path:"bills/approval-rules/*",element:t.jsx(zn,{})}),t.jsx(C,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?t.jsx(Jn,{}):t.jsx(F,{})}),t.jsx(C,{path:"*",element:t.jsx(F,{})})]})}export{Jt as default};
@@ -1 +0,0 @@
1
- import{j as u}from"./liveblocks-BdePShct.js";import{a as f,b as T,q as A}from"./sentry-CX_3yQh7.js";import{h as D,j as z,g as l,u as M,N as O,k as P}from"./core-C_ZreJAw.js";import{u as j,z as s,m as B,c as E,D as F,e as _,f as N,g as H,h as J,n as V,i as v}from"./index-CGS6zWWp.js";import{eO as $,IA as q,IB as G,eP as W,fi as K,IG as Q,fH as R,cT as X,IH as C,II as Y,IJ as Z,bS as y}from"./zeni-epic-state-H6DZSSlf.js";import"./mui-BtnH6ELy.js";import{u as ee}from"./useDeviceId-DtlEyHOn.js";import{f as te}from"./analyticsHelper-DUlInMOD.js";import{t as ne}from"./getLocaleForTenant-C-vhBCTM.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.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]="c88a7050-139a-4d03-837d-ae7a3e7e0436",t._sentryDebugIdIdentifier="sentry-dbid-c88a7050-139a-4d03-837d-ae7a3e7e0436")}catch{}})();const ie=P(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}},function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(c),sourceUri:y(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(Y(n,a)))},clearSignInError:()=>{t(C())}}})(V),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=j(),n=s.getSignedInUser();f.useLayoutEffect(()=>{g()},[g]);const a=ee(),c=l(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:U,accountUnlockTime:k}=l(e=>e.tenantState),p=l(e=>e.tenantState.fetchState),L=l(e=>e.tenantState.activeTenantFetchState.fetchState),I=l(e=>e.tenantState.signInState),o=l(e=>e.tenantState.loggedInUser),r=l(e=>$(e)),S=l(e=>q(e)),m=M(),w=B().mode,b=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(f.useEffect(()=>{h.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))},[h.fetchState,c]),f.useEffect(()=>{t(void 0)},[]),f.useEffect(()=>{I!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(G(S.tenantsInOrder),o.zeniSessionId),W(o.userId,o.zeniSessionId,r.tenantId),i(K(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(Q("Completed")),F.updateAppLocaleID(ne(r)),te(o,r,w,void 0,S.tenantsInOrder),R().then(()=>{const e=J();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(N.Event.loginSuccess,o.authProvider??"google",X(r.productSettings))},2e3))},[I,p,L,o,r,S,w,m.state,i]),I==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return u.jsx(O,{to:e,state:{...m.state,origin:""}})}return u.jsxs(u.Fragment,{children:[u.jsx(ae,{magicLinkExpired:!!b,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),U===!0&&k!=null?u.jsx(H,{onClose:()=>i(C()),unlockDate:k}):null]})}export{ve as default};
@@ -1,9 +0,0 @@
1
- import{j as s}from"./liveblocks-BdePShct.js";import{a as n}from"./sentry-CX_3yQh7.js";import{h as u,u as m,j as p,N as g}from"./core-C_ZreJAw.js";import{z as f,B as b,t as y,c,f as h}from"./index-CGS6zWWp.js";import{fM as I,fN as x,IW as j}from"./zeni-epic-state-H6DZSSlf.js";import{n as w}from"./mui-BtnH6ELy.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.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]="b354cbd7-0302-4a59-8b6f-5ca4fa80abae",e._sentryDebugIdIdentifier="sentry-dbid-b354cbd7-0302-4a59-8b6f-5ca4fa80abae")}catch{}})();function W(){const e=u(),t=m(),a=p(),i=n.useRef(!1),d=f.isSignedIn(),r=t.state?.message==="logout",o=r||d;return n.useEffect(()=>{o&&!i.current&&(i.current=!0,setTimeout(()=>{try{f.clearAll(),e(I()),e(x(!1)),j(),y.reset(),c.trackLogout(h.Event.logoutSuccess),c.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||a("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(b,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=w.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{W as default};
@@ -1,9 +0,0 @@
1
- import{j as n}from"./liveblocks-BdePShct.js";import se from"./NotFoundScreen-C4aqnA8_.js";import{a as c}from"./sentry-CX_3yQh7.js";import{j as _,h as H,g,u as ne,l as oe,N as ie,k as re,n as ce,o as f}from"./core-C_ZreJAw.js";import{FC as M,FF as le,FI as de,eO as Z,PG as J,EW as W,EE as pe,Fm as ue,Ff as ke,PH as K,PI as N,EA as me,Ex as fe,pF as ge,pt as he,j$ as Se,EM as Ie,PJ as Ee,ER as Te,EO as be,EH as Ce,E$ as Ge,E_ as De}from"./zeni-epic-state-H6DZSSlf.js";import{z as G,cH as xe,V as ye,y as je,$ as T,q as X,s as F,A as Fe,c as V,f as we,cI as ve,i as z,aq as Re}from"./index-CGS6zWWp.js";import{n as Pe}from"./mui-BtnH6ELy.js";import{u as Be}from"./useInitialThreadRequest-AyrSL871.js";import{M as Ue}from"./MobileAppDrawer-BDT0TmvR.js";import Le from"./TaskListScreen-C1G-Z2qb.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.js";import"./useAskAiCfoHostNavButtonProps-Nsv7MqoG.js";import"./useFetchSuggestedQuestionsWhenReady-C86A67zi.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]="acf37df3-f09b-4a4e-876a-8d994cf87c97",e._sentryDebugIdIdentifier="sentry-dbid-acf37df3-f09b-4a4e-876a-8d994cf87c97")}catch{}})();function $e(){const e=_(),t=H(),s=G.getSignedInUser(),{cannedResponses:d,fetchState:r,saveFetchState:p}=g(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(M())},[t]),k=c.useCallback((o,h,S)=>{t(le({name:o,content:h,cannedResponseId:S}))},[t]),a=c.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(xe,{cannedResponses:d,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:p==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let q,O=[];const Ae=re(function(e,t){const{location:s,taskGroupId:d}=t,r=K(e,t.taskId),p=Z(e),l=d!=null?N(e.taskGroupState,d):void 0,k=G.getSignedInUser(),a=p.tenantId,o={userId:k?.userId??"",sessionId:k?.zeniSessionId??"",tenantId:a??""},h=J(e),{tenantEmailDomain:S}=p,b=r.recurringSourceTaskId,D=b!=null?`${z.appUrl}/${S}/tasks/${encodeURIComponent(b)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:o,isZeniUser:G.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==q&&(q=I,O=Object.values(I)),O),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Re.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${z.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:D,tagListView:h,taskGroupName:d!=null&&l!=null&&l.isDefault===!1?l.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(u=>N(e.taskGroupState,u)).filter(u=>u!=null&&!u.isDeleted).map(u=>({id:u.id,name:u.name,isDefault:u.isDefault}))}},function(e,t){const{taskId:s,navigate:d,currentTenant:r,location:p,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ge(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ce(t.taskId))},onSnoozeTask:(a,o)=>{e(be(a,o))},onUnsnoozeTask:a=>{e(Te(a))},onDismissClick:()=>{if(p.state?.message==="triggerBackClick"){const a=X(p.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";d(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=w(k),o=F(p.state?.pathnameStackToGoBack,p.pathname);d(a,{state:{pathnameStackToGoBack:o}})}e(Ee({taskId:s}))},onDeleteTaskClick:()=>{e(Ie(s))},updateFilesEntity:a=>{e(Se({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(ge(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(W(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(M())},onManageTemplatesClick:()=>{d(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(ve);function j(){const e=_(),t=H(),s=ne(),d=ye(),{taskId:r,taskGroupId:p}=oe(),l=g(i=>Z(i)),k=Be(l?.companyId),{useFeatureGate:a}=je(),{isFeatureEnabled:o}=a(T.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(T.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(T.isTaskCannedResponsesEnabled),{isFeatureEnabled:b}=a(T.isTaskRecurringParentEnabled),{isFeatureEnabled:D}=a(T.isTaskGroupAssigneesEnabled),[I,u]=c.useState(!1),[v,Y]=c.useState(!1),[R,Q]=c.useState(!1),[P,ee]=c.useState(!1),[B,x]=c.useState(!1),E=c.useRef(!1),C=g(i=>i.taskListState.updateTasksFetchState.fetchState),U=g(i=>J(i)),L=g(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{v||(Y(!0),t(W(!1,r)))},[v,t]),c.useEffect(()=>{R||U.fetchState==="Completed"||(Q(!0),t(pe()))},[R,t,U.fetchState]),c.useEffect(()=>{P||L==="Completed"||(ee(!0),t(ue()))},[P,t,L]);const ae=c.useCallback(()=>{r!=null&&(E.current=!1,t(ke([r],null,{isArchived:!1})),x(!0))},[t,r]);c.useEffect(()=>{if(B)if(C!=="In-Progress"){if(E.current){if(C==="Error")return x(!1),void(E.current=!1);if(C==="Completed"){x(!1),E.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=X(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=w(i);e(m,{state:{pathnameStackToGoBack:F(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else E.current=!0},[B,C,l,s,e]);const $=g(i=>K(i,r)),y=$.fetchState,A=G.getSignedInUser();if(A==null)throw Error("Can't access task detail page without signing in...");if(y==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=l,m=w(i),te=F(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[y==="Completed"?n.jsx(Fe,{analytics:V,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(Ne,{children:[n.jsx(Ue,{isAppContentDrawerOpen:I,handleDrawerToggle:i=>{u(i)}}),n.jsx(Ae,{analytics:V,currentTenant:l,handleZeniLogoClick:()=>{d.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:A,navigate:e,taskGroupId:p,taskId:r,taskDetailFetchState:y,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:b,isTaskGroupAssigneesEnabled:D})]})]})}const Ne=Pe.div`
2
- display: flex;
3
- min-height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,w=e=>`/${e}/tasks`;function ra(){return n.jsxs(ce,{children:[n.jsx(f,{path:"/new",element:n.jsx(j,{})}),n.jsx(f,{path:"/new/:taskGroupId",element:n.jsx(j,{})}),n.jsx(f,{path:"/group/:taskGroupId",element:n.jsx(Le,{})}),n.jsx(f,{path:"/quick-responses",element:n.jsx($e,{})}),n.jsx(f,{path:"/:taskId",element:n.jsx(j,{})}),n.jsx(f,{path:"*",element:n.jsx(se,{})})]})}export{ra as default};
@@ -1 +0,0 @@
1
- import{j as t}from"./liveblocks-BdePShct.js";import i from"./NotFoundScreen-C4aqnA8_.js";import{T as r}from"./TransactionDetailScreen-DbXqL9Dv.js";import"./sentry-CX_3yQh7.js";import{n as a,o}from"./core-C_ZreJAw.js";import"./zeni-epic-state-H6DZSSlf.js";import"./recharts-CHr9O26_.js";import"./index-CGS6zWWp.js";import"./mui-BtnH6ELy.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.js";import"./useAskAiCfoHostNavButtonProps-Nsv7MqoG.js";import"./useFetchSuggestedQuestionsWhenReady-C86A67zi.js";import"./decodeURIComponentSafe-BP018w8C.js";import"./routePaths-DZkWYInw.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]="50e87735-4ba7-4a09-8438-0ea2bea3d928",e._sentryDebugIdIdentifier="sentry-dbid-50e87735-4ba7-4a09-8438-0ea2bea3d928")}catch{}})();function q(){return t.jsxs(a,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{q as default};
@@ -1,5 +0,0 @@
1
- import{j as I}from"./liveblocks-BdePShct.js";import{a as d}from"./sentry-CX_3yQh7.js";import{h as j,g as S,u as re,j as le,l as de,N as Re,k as ze}from"./core-C_ZreJAw.js";import{bn as je,eO as H,cP as ue,bv as me,pk as Y,JN as B,KO as pe,KP as J,Kb as he,jC as fe,KQ as ge,Kg as Z,Kh as Q,kr as Se,GO as X,JH as _,jw as Te,ju as ye,jG as Ke,KR as $e,KS as Me,t9 as z,jB as ve,G9 as Ee,cU as We,cV as qe,KT as He,JG as Ye,KU as Je,td as Ze,KV as Qe,KW as Xe,KX as ea,KY as aa,KZ as ta,jF as na,K_ as oa,K$ as sa,JI as ia,L0 as ca,L1 as ra,L2 as la,G3 as da,FT as ua,Gl as ma,jH as pa,GP as ie,G0 as ha}from"./zeni-epic-state-H6DZSSlf.js";import{z as De,y as ee,$ as V,aK as be,m as fa,Z as ga,aL as Sa,E as Ta,q as W,k as ya,aM as va,s as q,c as Ce,aN as Ea,aq as Da,W as M}from"./index-CGS6zWWp.js";import{n as ba,S as Ca,D as Ia}from"./mui-BtnH6ELy.js";import{u as ka}from"./useAskAiCfoHostNavButtonProps-Nsv7MqoG.js";import{c as Ua}from"./useFetchSuggestedQuestionsWhenReady-C86A67zi.js";import{d as Ie}from"./decodeURIComponentSafe-BP018w8C.js";import{h as ke,g as Aa,d as xa,b as _a}from"./routePaths-DZkWYInw.js";import{t as Va}from"./utils-Dw8b4HCO.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]="fd6c862e-4be7-4574-ade2-ef7b86459ff8",a._sentryDebugIdIdentifier="sentry-dbid-fd6c862e-4be7-4574-ade2-ef7b86459ff8")}catch{}})();const ae=()=>{const a=De.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(V.isChainOfThoughtEnabled);return d.useMemo(()=>je(a)&&s,[a,s])};function Ue(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Ja(a,e){const s=j(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>H(u)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ue(o.userRole),g=o.userRole!=null&&me(o.userRole),{isFeatureEnabled:T}=t(V.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:C}=t(V.isExpenseAutomationEnabled),{configValue:h}=n(be.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,k=ae(),y=d.useMemo(()=>({id:a,type:Y(e)}),[a,e]),m=S(u=>B(u,y)),b=S(u=>{const N=B(u,y)?.transactionDetailLocalData.vendorUpdates?.id;return N==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[N]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Ue(m?.transaction):void 0,[m?.fetchState,m?.transaction]),E=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),U=S(u=>J(u)),L=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),K=o.company?.companyInfo.firstMonthOfFY??1,$=S(u=>fe(u.accountState,u.accountListState,"accountList")),[w,P]=d.useState(!1),[F,v]=d.useState(!1),[c,O]=d.useState(!1);d.useEffect(()=>{P(!1),v(!1),O(!1)},[a,e]);const D=d.useCallback(()=>{P(!1),v(!1)},[]),[A,x]=d.useState(!1),G=L?.selectedPeriod?.timePeriod;return d.useEffect(()=>{c||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),O(!0)),p!=null&&(!i||l&&g===!1)&&(w?F||E==null||(v(!0),s(X(p,"TransactionDetail",{timeframe:"month",timePeriod:G??E}))):(s(Z()),s(Q()),P(!0),s(Se(p))))},[s,c,m?.fetchState,m?.transaction,p,i,l,g,w,F,E,G]),d.useEffect(()=>{U.newVendorState?.vendorDetailLocalData?.vendorName!=null?x(!0):x(!1)},[U.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(_("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:T,isExpenseAutomationEnabled:C,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:k,selectedTransaction:y,transactionDetail:m,vendorSaveStatus:b,tranEntity:p,defaultTrendTransactionTimePeriod:E,vendorViewDetails:U,uiState:L,firstMonthOfFY:K,uncategorizedAccounts:$,resetTrendIsFetchedStates:D,isCreateVendorDrawerOpen:A,setIsCreateVendorDrawerOpen:x}}const La={overlayWidth:new Ta(100,100,58)},Pa=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=fa(),i=ga(),l=j(),g=S(h=>J(h)),T=()=>{t()},C={vendorDetailView:n??g,onSaveSuccess:()=>{l(ye()),l(Ke("Not-Started")),s()},onSaveVendor:e,onCancelClick:T,saveVendorDetailLocalData:h=>{l(Te({vendorId:void 0,localData:h}))}};return I.jsx(Ia,{anchor:"right",open:a,PaperProps:{style:{width:La.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:T,children:I.jsx(Ba,{onClick:h=>h.stopPropagation(),children:I.jsx(Sa,{...C})})})},Ba=ba(Ca)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,wa=({closeDrawerHandler:a,overrideTransactionId:e,overrideTransactionType:s})=>{const t=re(),n=le(),o=j(),i=ae(),{transactionTypeEncoded:l,transactionId:g}=de(),T=e??g,C=s??Ie(l??"");let h;ke(T,C)&&(h={id:T,type:Y(C)});const f=h!=null?S(y=>B(y,h)):void 0,k=()=>{const y=W(t.state?.pathnameStackToGoBack),m=y.poppedPathname??((b=2)=>{let p="../";for(let E=0;E<b;E++)p=`${p}../`;return p})(1);n(m,{state:{pathnameStackToGoBack:y.newStack}})};return{transactionId:h,onSaveVendor:()=>{o(ve(h,void 0))},onSaveSuccess:()=>{if(f!=null&&f?.transaction&&f?.transactionDetailLocalData.vendorUpdates?.qboId!=null&&f?.transactionDetailLocalData.vendorUpdates?.id!=null){const y=f?.transactionDetailLocalData.vendorUpdates,m={id:f?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:f?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:y?.name,qboId:f?.transactionDetailLocalData.vendorUpdates?.qboId??""},b={transactionId:{id:f?.transaction?.id,type:f?.transaction?.type},transaction:f?.transaction,lineIds:f?.transaction?.lines?.map(p=>p.id)??[]};o(z(m,f?.transaction?.amount.amount,b,!1,!1,i))}k()},onCancel:()=>{h!=null&&o($e({transactionId:h})),o(ye()),o(Me()),a(!0),k()}}},Fa=ze(function(a,e){const s=B(a,e.selectedTransaction);let t;s==null&&console.warn("Check if the you've selected the transaction before getting the details");const n=De.getSignedInUser(),o=a.tenantState.currentTenantId,i={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""};s!=null&&s.fetchState==="Completed"&&s.transaction!=null&&e.entity!=null&&(t=He(a,e.entity,"TransactionDetail"));const l=a.entityAutoCompleteState.autoCompleteText.common,g=Ye(a,"common"),T=H(a);return{transactionDetail:s,transactionAttachmentEndpointToDownload:`${M}/transaction_attachment`,transactionAttachmentsEndpointToFetch:T.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${M}/transaction_attachments_accounting_provider`:`${M}/transaction_attachments`,attachmentUploadEndpoint:`${Da.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:i,trendReport:t,analytics:Ce,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:l,entityAutoCompleteView:g},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails")}},function(a,e){const{isCOTEnabled:s}=e;return{onBackClick:()=>{if(a(_("common")),e.onBackClick!=null)return void e.onBackClick();const t=W(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ae(2);e.navigate(n,{state:{pathnameStackToGoBack:t.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(t,n)=>{e.transaction!=null&&a(ha({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:t,customerId:n}))},onTransactionClick:t=>{e.resetTrendIsFetchedStates(),a(Z()),a(Q());const n=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(_a(t,e.tenantEmailDomain),{state:{pathnameStackToGoBack:n}})},onTrendSelectedPeriodChange:t=>{if(t==null)e.defaultTrendTransactionTimePeriod!=null&&a(ie(e.entity,"TransactionDetail",{timeframe:"month",timePeriod:e.defaultTrendTransactionTimePeriod}));else{const n=t.currentTimePeriod==null?t.addTimePeriod:{startDate:t.addTimePeriod.startDate,endDate:t.currentTimePeriod.endDate};a(X(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:t.addTimePeriod})),a(ie(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:n}))}},onSaveUpdates:(t,n,o,i)=>{a(i===!0&&o!=null?ve(t,o,!0,e.isExpenseAutomationEnabled,e.isUncategorizedExpenseCategoryEnabled):pa({transactionId:t,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:n,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled})),a(_("common"))},onUploadAttachmentAttachment:t=>{a(ma(t))},onDeleteAttachment:t=>{e.transaction!=null&&a(ua(t,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(t,n)=>{a(da({transactionId:t,transactionLocalData:n}))},onUpdateAllChecked:(t,n,o,i)=>{e.transaction!=null&&a(la(e.selectedTransaction,e.transaction,t,n,o,i))},onResetLineItemsCategoryClassInLocalData:(t,n,o,i,l,g)=>{a(ra(t,n,o,i,l,g))},onChangeCategoryClassWhenUpdateAllIsChecked:(t,n)=>{e.transaction!=null&&a(ca({id:e.transaction.id,type:e.transaction.type},e.transaction,t,n))},onSaveSuccess:()=>{const t=W(e.location.state?.pathnameStackToGoBack);if(t.poppedPathname!=null){const n=Va(t.poppedPathname,"/").split("/"),o=n[n.length-1];if(["uncategorized-income","uncategorized-expense","missing-receipts"].includes(o)&&e.navigate(t.poppedPathname,{state:{pathnameStackToGoBack:t.newStack}}),e.location.state?.message==="comingFromScheduleDetails"){const i=`${Aa(e.tenantEmailDomain)}`;e.navigate(i)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const i=`${xa(e.tenantEmailDomain)}`;e.navigate(i)}}},onPageRefresh:()=>{a(Ee(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?a(ia({searchString:t,entityType:n,searchOrigin:"common"})):t.trim().length===0&&a(_("common"))},onCancelAutoComplete:()=>{a(_("common"))}},onFetchRecommendationsForEntity:(t,n,o,i)=>{a(z(t,n,o,i,!1,s))},clearRecommendationForLineId:t=>{const{transactionId:n,transaction:o,lineId:i}=t;a(sa(n,o,i))},resetUpdateErrorState:()=>{const t={id:e.selectedTransaction.id,type:e.selectedTransaction.type};a(oa(t))},onSaveVendorInLocalData:(t,n,o,i,l)=>{if(a(na({transactionId:t,vendorUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(z(o,i,l,!1,!1,s)),a(Te({vendorId:n.id?n.id:void 0,localData:{vendorName:n.name,vendorId:n.id?n.id:void 0}})),!n.id&&e.transaction!=null){const g=e.transaction,T=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(g.type??"")}/${g.id}/vendor/create`,{state:{pathnameStackToGoBack:T}})}},onSaveCustomerInLocalData:(t,n,o,i,l)=>{a(ta({transactionId:t,customerUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(z(o,i,l,!1,!1,s))},onUpdateAllTranactionsWithCurrentVendorChecked:t=>{a(aa({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:t}))},onClickUpdateVendorToAllLineItems:(t,n,o)=>{a(ea(t,n,o))},onResetVendorToAllLineItems:(t,n,o)=>{a(Xe(t,n,o))},saveLatestSelectedEntity:(t,n,o)=>{a(Qe({transactionId:t,lineId:n,entity:o}))},updateVendorBulkRecommendationsFetchStatus:(t,n)=>{a(Ze(t,n))},setIsVendorUpdateAllChecked:(t,n,o)=>{a(Je(t,n,o))}}})(Ea);function Za(){const a=le(),e=j(),s=re(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=ya(),i=S(r=>H(r)),l=i.userRole.includes("charge_card_user")||i.userRole.includes("charge_card_admin"),g=i.userRole!=null&&ue(i.userRole),T=i.userRole!=null&&me(i.userRole),{isFeatureEnabled:C}=t(V.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:h}=t(V.isExpenseAutomationEnabled),{configValue:f}=n(be.enableUncategorizedExpenseCategory),k=f?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:y,transactionTypeEncoded:m,transactionId:b}=de(),[p,E]=d.useState(!1),U=Ie(m??""),L=ke(b,U),K=S(r=>r.transactionVendorViewState),$=ae(),{isFeatureEnabled:w}=t(V.isTransactionCommentingEnabled),P=o?.currentTenant?.companyId,F=o?.currentTenant?.companyName;let v;L&&(v={id:b,type:Y(U)});const c=v!=null?S(r=>B(r,v)):void 0,O=c?.transactionDetailLocalData.vendorUpdates?.id!=null?K.editVendorStateById[c?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",D=c?.fetchState==="Completed"?Ue(c?.transaction):void 0,A=S(r=>D!=null?pe(r.customerIncomeState,r.vendorExpenseState,r.trendState,D,"month"):void 0),x=S(r=>J(r)),G=S(r=>D!=null?he(r.trendWithTransactionsState,D,"TransactionDetail"):void 0),u=i.company?.companyInfo.firstMonthOfFY??1,N=S(r=>fe(r.accountState,r.accountListState,"accountList")),[xe,te]=d.useState(!1),[_e,ne]=d.useState(!1),[Ve,Le]=d.useState(!1),oe=()=>{te(!1),ne(!1)},Pe=va();d.useEffect(()=>{if(v!=null&&c!=null&&c.fetchState==="Not-Started")e(Ee(v)),oe();else if(v!=null&&c!=null&&c.fetchState==="Error"){const r=q(s.state?.pathnameStackToGoBack,s.pathname),R={pathnameStackToGoBack:r,message:"pageNotFound",origin:"transaction_detail"};Pe&&(R.message="expenseAutomation",R.origin="transaction_categorization",R.pathnameStackToGoBack=r),a("page-not-found",{replace:!0,state:R})}},[v]),d.useEffect(()=>{Ve||c==null||c.transaction==null||(e(ge({id:c.transaction.id,type:c.transaction.type})),Le(!0)),D==null&&c?.fetchState==="Completed"&&ce(c?.transaction),D!=null&&(!l||g&&T===!1)&&(xe?_e||A==null||(ne(!0),e(X(D,"TransactionDetail",{timeframe:"month",timePeriod:G?.selectedPeriod?.timePeriod??A}))):(e(Z()),e(Q()),ce(c?.transaction),te(!0),e(Se(D))))},[c?.fetchState,c?.transaction,A,l]),d.useEffect(()=>{x.newVendorState?.vendorDetailLocalData?.vendorName!=null?E(!0):E(!1)},[x.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{e(_("common"))},[]);const Be=[m,b].filter(r=>r!=null),{transactionId:se,onSaveVendor:we,onSaveSuccess:Fe,onCancel:Oe}=wa({closeDrawerHandler:r=>{E(!1),a(r?"../":"../..")}}),{isAiCfoAccessEnabled:Ge,onAskAiCfoClick:Ne}=ka({mobileExploreReferrer:"Transaction Details"});return Ua({isDataReady:c?.fetchState==="Completed"}),L?I.jsxs(I.Fragment,{children:[se!=null&&p&&I.jsx(Pa,{isOpen:p,transactionId:se,onSaveVendor:we,onSaveSuccess:Fe,onCancel:Oe}),I.jsx(Fa,{hideDeleteAttachment:!0,firstMonthOfFY:u,isDisabled:c?.transaction?.type==="transfer"&&o?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:y,location:s,navigate:a,selectedTransaction:v,entity:D,isCOTEnabled:$,defaultTrendTransactionTimePeriod:A,resetTrendIsFetchedStates:oe,transaction:c?.transaction,uncategorizedAccounts:N,vendorSaveStatus:O,isVendorBulkUpdateOnTransactionEnabled:C,isExpenseAutomationEnabled:h,isUncategorizedExpenseCategoryEnabled:k,isAiCfoAccessEnabled:Ge,onAskAiCfoClick:Ne,isTransactionCommentingEnabled:w,companyId:P,companyName:F})]}):I.jsx(Re,{to:Ae(Be.length)})}const Ae=(a=2)=>{let e="../";for(let s=0;s<a;s++)e=`${e}../`;return e},ce=a=>{if(a!=null){const{transactionCategory:e,transactionClass:s}=Oa(a),t=Ga(a);Ce.trackTransactionDetails(a.account?.accountId,a.account?.accountName,a.id,t,e.length>0?e:void 0,s.length>0?s:void 0,a.type,a.amount,a.memo,a.lines?.length??0,a.attachments?.map(n=>n.fileName))}},Oa=a=>{const e=[],s=[];return a.lines?.forEach(t=>{switch(t.type){case"transaction_with_account_and_class_line":case"transaction_with_product_or_service_line":case"journal_entry_transaction_line":case"linked_transaction_line":{const n=t;n!=null&&n.account!=null&&n.account.accountName?.length>0&&e.push(n.account.accountName),n.class!=null&&n.class.className?.length>0&&s.push(n.class.className);break}}}),{transactionCategory:e,transactionClass:s}},Ga=a=>We(a)===!0?a.customer?.name??"":qe(a)===!0?a.vendor?.name??"":a.memo!=null?a.memo:a.type;export{Pa as C,Za as T,wa as a,Fa as b,ae as c,Ja as u};
@@ -1,12 +0,0 @@
1
- import{j as o}from"./liveblocks-BdePShct.js";import{a as f}from"./sentry-CX_3yQh7.js";import{q as u,h,g as y,N as I}from"./core-C_ZreJAw.js";import{IV as b,eP as w,yZ as x}from"./zeni-epic-state-H6DZSSlf.js";import{z as l,B as j,G as S,H as D}from"./index-CGS6zWWp.js";import{n as g}from"./mui-BtnH6ELy.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.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]="daadf993-b058-4b93-8750-453ff1588d13",e._sentryDebugIdIdentifier="sentry-dbid-daadf993-b058-4b93-8750-453ff1588d13")}catch{}})();const V=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[n,m]=f.useState(!1),a=h(),i=y(c=>b(c)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(m(!0),a(x(t,p,s)))},[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},E=g.div`
2
- display: flex;
3
- width: 100%;
4
- height: 100vh;
5
- flex-direction: row;
6
- justify-content: center;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey5};
9
- `,_=g(D.LargeRegular)`
10
- display: flex;
11
- color: ${S.important};
12
- `;export{V as default};
@@ -1,9 +0,0 @@
1
- import{j as i}from"./liveblocks-BdePShct.js";import{a as f}from"./sentry-CX_3yQh7.js";import{j as x,h as $,u as j,l as B,g as p}from"./core-C_ZreJAw.js";import{HS as s,HR as v,O4 as C,eO as T,O5 as z}from"./zeni-epic-state-H6DZSSlf.js";import{Z as D,aq as g,m as E,z as L,B as P,b$ as N,q as O}from"./index-CGS6zWWp.js";import{n as _}from"./mui-BtnH6ELy.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]="d1b403a9-e0da-4e8c-9e48-844b2358d958",e._sentryDebugIdIdentifier="sentry-dbid-d1b403a9-e0da-4e8c-9e48-844b2358d958")}catch{}})();const U=_.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 R(){const e=x(),n=$(),d=D(),l=j();let{accountId:a}=B(),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,h]=f.useState(!1),y=E();f.useEffect(()=>{u||(h(!0),n(v(a??"",!1)))},[u,n]);const o=p(t=>C(t,a??"")),b=()=>{const t=O(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},r=L.getSignedInUser(),c=p(t=>T(t)),I={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c.tenantId??""},w=z(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:y.colors.grey5}}):i.jsx(U,{windowSize:d,children:i.jsx(N,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:b,authParams:I,downloadEndPoint:m})})}export{R as Z};