@zeniai/web-app-ui 5.0.73-qa → 5.0.74-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-oYMlFQPx.js +1 -0
- package/dist/assets/AddressScreen-DuqDDwbX.js +9 -0
- package/dist/assets/{AiCfoScreen-BuWzYLYw.js → AiCfoScreen-DmlMKQ45.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-Bt8Z0pVh.js → BillPayApprovalRoutes-ZlmnVSSW.js} +1 -1
- package/dist/assets/{BillPayRoutes-D5KWvYEu.js → BillPayRoutes-CeziCNtw.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-B4Ydn5q-.js → BusinessVerificationPageScreen--aJrL6sY.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-ClxIUSvt.js → ChargeCardRoutes-Bseixdt5.js} +8 -8
- package/dist/assets/{CompanyPassportScreen-C-PG6LRZ.js → CompanyPassportScreen-DZYGX7Ak.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-SPlAQ_Np.js → ConnectionAuthScreen-DYlxkvSU.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-CtksFbgx.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-DPukj_Rw.js → CustomerOnboardingRoutes-BmEKqRSj.js} +3 -3
- package/dist/assets/{DashboardRoutes-hwqRQl7V.js → DashboardRoutes-CogbIDn5.js} +4 -4
- package/dist/assets/{DefaultTenantHome-CJT8TR8y.js → DefaultTenantHome-BNhdpEJE.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-D0FJ0DFE.js → DomesticWireDetailScreen-DOvHZ_oC.js} +3 -3
- package/dist/assets/DrawerScreen-DwJwVhuI.js +1 -0
- package/dist/assets/{EntityDetailRoutes-OIVD1I9e.js → EntityDetailRoutes-B5Mz_0tK.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-Bddv7sbf.js → ExpenseAutomationRoutes-43io-wzv.js} +4 -4
- package/dist/assets/{FeaturePreviewScreen-BlSIKXFS.js → FeaturePreviewScreen-BCjtGP_L.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-CLjAH-ee.js → HubSpotOAuthCallbackScreen-DP_xp7gX.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-BQnKzZaB.js → MagicLinkRoutes-5gC2RMuC.js} +6 -6
- package/dist/assets/{MagicLinkSignInScreen-uHKvnjU8.js → MagicLinkSignInScreen-1TZssQ2L.js} +1 -1
- package/dist/assets/{MobileAppDrawer-Dm68rJiS.js → MobileAppDrawer-CKb5yG63.js} +1 -1
- package/dist/assets/NotFoundScreen-DuU91hRO.js +1 -0
- package/dist/assets/{NotificationRoutes-YFiOMG6k.js → NotificationRoutes-thxZPpjj.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-kpejh2UL.js → OAuthConsentScreen-COOk_lDh.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-DOPekVsK.js → PandLWithForecastRoutes-BHTypoFG.js} +1 -1
- package/dist/assets/{PeopleRoutes-CHh9S1ES.js → PeopleRoutes-BKLG-Nkw.js} +4 -4
- package/dist/assets/PerformanceRoutes-DZWxI-5H.js +1 -0
- package/dist/assets/{Preview-63x8M4Zb.js → Preview-DzpWuMNc.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CVxTOUos.js → QBOConnectionScreen-Bsxzkv43.js} +1 -1
- package/dist/assets/ReferralListScreen-Dg_jKXHY.js +5 -0
- package/dist/assets/{ReimbursementApprovalRoutes-BXvb2Znx.js → ReimbursementApprovalRoutes-UcfqpWRh.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-obTxBD8v.js → ReimbursementApprovalRuleDetailScreen-EaQ9JUjP.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DzuMZgdz.js → ReimbursementRoutes-DxXqSY1z.js} +5 -5
- package/dist/assets/{ReportsRoutes-Du1FN7AL.js → ReportsRoutes-CzzokNSO.js} +1 -1
- package/dist/assets/RewardsRoutes-C7-632Cj.js +1 -0
- package/dist/assets/{ScreenRoutes-C1s0Nxp2.js → ScreenRoutes-scBYKN6D.js} +2 -2
- package/dist/assets/{SettingsRoutes-CvzF47Mb.js → SettingsRoutes-C1mTTPPp.js} +7 -7
- package/dist/assets/{SetupPagesScreen-D9to9dY7.js → SetupPagesScreen-CMNbCjoJ.js} +1 -1
- package/dist/assets/{SignInScreen-C-T0IXf6.js → SignInScreen-Bw9YZhPQ.js} +1 -1
- package/dist/assets/{SignOutScreen-Czon70VP.js → SignOutScreen-CP-AKuF8.js} +1 -1
- package/dist/assets/{TaskListScreen-Xzvf8Hgp.js → TaskListScreen-B8MV3xma.js} +2 -2
- package/dist/assets/TaskRoutes-CC0KU-1O.js +9 -0
- package/dist/assets/TransactionDetailRoutes-BY0yRYBD.js +1 -0
- package/dist/assets/{TransactionDetailScreen-Cx4z6equ.js → TransactionDetailScreen-CrO7VjQP.js} +2 -2
- package/dist/assets/TransactionListRoutes-D1V74e9e.js +1 -0
- package/dist/assets/{TreasuryRoutes-Bsh24hmh.js → TreasuryRoutes-fdgElXNz.js} +1 -1
- package/dist/assets/{VendorsRoutes-Dghnmhef.js → VendorsRoutes-D5J5iuOk.js} +1 -1
- package/dist/assets/WiseConfirmationScreen-CQWm6HGp.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-BwL43X6f.js → ZeniAccountRoutes-Dw3YCzKk.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-CXCXyV_O.js → ZeniAccountStatementScreen-YrMsUI59.js} +1 -1
- package/dist/assets/{accountMappingHelper-DEVWShIB.js → accountMappingHelper-CP3zTfM5.js} +1 -1
- package/dist/assets/{analytics-CLyVqw3m.js → analytics-TpOPKTBE.js} +1 -1
- package/dist/assets/{analyticsHelper-C6OV8Lji.js → analyticsHelper-C6rQwSxW.js} +1 -1
- package/dist/assets/{core-B8DAi0nh.js → core-DR8tDM_G.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-2RJaUBNT.js → decodeURIComponentSafe-BRa5aIWn.js} +1 -1
- package/dist/assets/{dnd-DNrenqEc.js → dnd-Tv7XXetM.js} +1 -1
- package/dist/assets/{empty-CMYkwe6B.js → empty-NmpZ4nNi.js} +1 -1
- package/dist/assets/{empty-D1H0TyYI.js → empty-oHPXgZDu.js} +1 -1
- package/dist/assets/{emptyVideoElement-89AhO6II.js → emptyVideoElement-8zuBwn96.js} +1 -1
- package/dist/assets/{epic-occCJYrK.js → epic-BA-x1krm.js} +1 -1
- package/dist/assets/{getLocaleForTenant-CzzxyTLH.js → getLocaleForTenant-DmihGqyc.js} +1 -1
- package/dist/assets/{index-DXkdnQWz.js → index-B3GU_r7Y.js} +1 -1
- package/dist/assets/{index-CVyF-mcC.js → index-BUaPDlId.js} +1 -1
- package/dist/assets/{index-CrWxCSey.js → index-BXSudR0L.js} +1 -1
- package/dist/assets/{index-eEUBMv7A.js → index-B_HEzhpc.js} +1 -1
- package/dist/assets/{index-CrhTmqTp.js → index-CjFymAYP.js} +8920 -8911
- package/dist/assets/{index-orAkddId.js → index-DvDHGUrV.js} +1 -1
- package/dist/assets/{index-LbX_nh30.js → index-LDid1hRj.js} +2 -2
- package/dist/assets/{index-o5I9Rsf6.js → index-YEViLwBF.js} +1 -1
- package/dist/assets/{lexical-BbcB7U6u.js → lexical-XdnXYpvk.js} +1 -1
- package/dist/assets/{liveblocks-6nZkQHFl.js → liveblocks-DH0u65Kt.js} +1 -1
- package/dist/assets/{lottie-Cp94NU-O.js → lottie-DXjy-4kQ.js} +1 -1
- package/dist/assets/{mui-DOBONCVx.js → mui-EgTXI2De.js} +1 -1
- package/dist/assets/{pathToGoBack-CuzLi8kB.js → pathToGoBack-Dzbxi3-3.js} +1 -1
- package/dist/assets/{pdf-B9LwAnPJ.js → pdf-C1ZWoPlC.js} +4 -4
- package/dist/assets/{pdf-lib-B6W-Zb6c.js → pdf-lib-D_Q1qkRs.js} +1 -1
- package/dist/assets/{plaid-BJER8-rG.js → plaid-C9BN4j5u.js} +1 -1
- package/dist/assets/{pusher-BKAvW8Ej.js → pusher-CrhyJDIe.js} +1 -1
- package/dist/assets/{react-XdIGJaYE.js → react-AvYNnxbu.js} +1 -1
- package/dist/assets/{react-Ch8Qff_2.js → react-BvYpSoIW.js} +1 -1
- package/dist/assets/{react-DZuEKM1F.js → react-CUhJjbx2.js} +1 -1
- package/dist/assets/{react-BsAtiQ73.js → react-CnsEuq7i.js} +1 -1
- package/dist/assets/{react-m-TEyxm9.js → react-CqNkdHXi.js} +1 -1
- package/dist/assets/{react-Az4VFoYA.js → react-DLMbYpVK.js} +1 -1
- package/dist/assets/{recharts-CDgByeDS.js → recharts-BN9u8kqw.js} +1 -1
- package/dist/assets/{routePaths-9AUhVaii.js → routePaths-BSK2K3Sa.js} +1 -1
- package/dist/assets/{sentry-Dr5FPm4d.js → sentry-Z2EfLBjp.js} +1 -1
- package/dist/assets/{url-DhbS62gt.js → url-DYeBp6T3.js} +1 -1
- package/dist/assets/{url-CgpVackm.js → url-ce6M3nR5.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-CT7gco_a.js +1 -0
- package/dist/assets/{useDeviceId-fW8BPEnA.js → useDeviceId-DAVwENt1.js} +1 -1
- package/dist/assets/{useFetchSuggestedQuestionsWhenReady-Z1RjapDK.js → useFetchSuggestedQuestionsWhenReady-CQWT0XHy.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-D2GYlrz4.js → useInitialThreadRequest-XTK7FDn_.js} +1 -1
- package/dist/assets/{utils-XBrV3QeH.js → utils-CYYHm9mY.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-C0vsYVl3.js → withTransactionSidePanel-DlYx7LYJ.js} +1 -1
- package/dist/assets/{zeni-epic-state-DITtSXPQ.js → zeni-epic-state-TB4o69vJ.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/AddressRoutes-BNwO1euv.js +0 -1
- package/dist/assets/AddressScreen-CQqRda3s.js +0 -9
- package/dist/assets/CustomerOnboardingAuthScreen-BLm7f-pp.js +0 -1
- package/dist/assets/DrawerScreen-BJd9OmNB.js +0 -1
- package/dist/assets/NotFoundScreen-DsEEwwTx.js +0 -1
- package/dist/assets/PerformanceRoutes-BH98gSrX.js +0 -1
- package/dist/assets/ReferralListScreen-bP3lCOJY.js +0 -5
- package/dist/assets/RewardsRoutes-Be9Ge6Wf.js +0 -1
- package/dist/assets/TaskRoutes-DCXtf0K8.js +0 -9
- package/dist/assets/TransactionDetailRoutes-BTqPhOdT.js +0 -1
- package/dist/assets/TransactionListRoutes-DRiy7_ZT.js +0 -1
- package/dist/assets/WiseConfirmationScreen-D2hivvGc.js +0 -12
- package/dist/assets/useAskAiCfoHostNavButtonProps-DH6rjWyj.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-DH0u65Kt.js";import{a as p}from"./sentry-Z2EfLBjp.js";import{j as _,u as B,h as k,g as h,k as R,l as F,n as X,o as C}from"./core-DR8tDM_G.js";import{bn as xe,eO as j,gG as de,KX as Ee,Jk as Ae,jA as ue,lT as we,gI as je,KZ as ve,KY as ke,Nm as Pe,xj as De,BO as Ue,MX as Me,N4 as _e,c1 as W,cG as Te,cH as Be,J1 as Re,Nn as Fe,J2 as Ve,vL as Ne,No as Oe,E2 as Le,Bu as $e,Bl as pe,Bi as Je,vP as ge,Bo as me,Br as fe,Bx as ee,sm as ne,vO as ze,jc as Q,jf as he,Np as Ge,kg as Ke,w2 as Ze,JS as He,JT as qe,ja as Xe,Nq as Qe,jd as Ye,qM as We,Nr as en,Ns as nn,qQ as tn,gi as an,Ja as se,gp as sn,Jb as on,v$ as cn,Nt as rn,Nu as ln,BL as dn,eS as be,eU as Se,Nv as un,fw as pn,Jl as gn,v_ as oe,fB as ie,fA as mn,vZ as fn,fz as hn,fy as bn,Nw as Sn,eX as ye,Nx as yn,Ny as In,w5 as Cn,vY as ce,Nz as xn,fd as En,vV as An,bU as wn,c0 as jn,b$ as vn,bV as kn,bZ as Pn,bY as Dn,bX as Un,b_ as Mn,bW as _n}from"./zeni-epic-state-TB4o69vJ.js";import{y as te,S as U,z as x,ac as Ie,bB as Tn,c as J,e as Bn,k as V,B as ae,bC as Rn,bD as Fn,an as Vn,f as Ce,bE as Nn,bF as On,bG as Ln,a6 as $n,R as Jn,bH as zn,j as Gn,bI as Kn}from"./index-CjFymAYP.js";import{n as M}from"./mui-EgTXI2De.js";import{M as P}from"./MobileAppDrawer-CKb5yG63.js";import{a as L,g as $,m as Zn}from"./accountMappingHelper-CP3zTfM5.js";import{t as Hn,A as qn}from"./AddressScreen-DuqDDwbX.js";import T from"./NotFoundScreen-DuU91hRO.js";import{g as Xn}from"./analyticsHelper-C6rQwSxW.js";import{B as Qn}from"./BusinessVerificationPageScreen--aJrL6sY.js";import{C as Yn}from"./CompanyPassportScreen-DZYGX7Ak.js";import{q as re}from"./QBOConnectionScreen-Bsxzkv43.js";import{B as Wn}from"./BillPayApprovalRoutes-ZlmnVSSW.js";import{R as et}from"./ReimbursementApprovalRoutes-UcfqpWRh.js";import"./recharts-BN9u8kqw.js";import"./analytics-TpOPKTBE.js";import"./plaid-C9BN4j5u.js";import"./dnd-Tv7XXetM.js";import"./stripe-DMRn4zHo.js";import"./lottie-DXjy-4kQ.js";import"./lexical-XdnXYpvk.js";import"./pdf-C1ZWoPlC.js";import"./utils-CYYHm9mY.js";import"./routePaths-BSK2K3Sa.js";import"./empty-NmpZ4nNi.js";import"./pdf-lib-D_Q1qkRs.js";import"./index-B3GU_r7Y.js";import"./url-ce6M3nR5.js";import"./index-YEViLwBF.js";import"./decodeURIComponentSafe-BRa5aIWn.js";import"./ReimbursementApprovalRuleDetailScreen-EaQ9JUjP.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="bd8315a5-a504-4dc2-926a-0caac4a357e5",e._sentryDebugIdIdentifier="sentry-dbid-bd8315a5-a504-4dc2-926a-0caac4a357e5")}catch{}})();const nt=M.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,7 +6,7 @@ import{j as a}from"./liveblocks-6nZkQHFl.js";import{a as p}from"./sentry-Dr5FPm4
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,tt=R(function(e,s){return{accountMappingView:s.accountMappingView,isFiling1099FeatureEnabled:s.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:s.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:
|
|
9
|
+
`,tt=R(function(e,s){return{accountMappingView:s.accountMappingView,isFiling1099FeatureEnabled:s.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:s.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:ue(e),isAccountingClassesUpdateInProgress:e.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:Ae(e),meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true"}},function(e,s){const{navigate:o,location:c,isFiling1099FeatureEnabled:i}=s;return{onAccountMappingChange:n=>{const{uncategorizedAccountSection:t,billsAccountSection:r,reimbursementsAccountSection:u,vendorsAccountSection:d,filing1099Section:g}=n,{incomeAccount:f,expenseAccount:m}=t,{billPayAccount:l}=r,{reimbursementsAccount:E}=u,{prepaidExpensesAccount:y,fixedAssetsAccount:w,accruedExpensesAccount:S}=d,{bankAccount:I,expenseCategory1099:N}=g,A=L(s.accountMappingView.incomeAccountList,f.selectedOption),z=L(s.accountMappingView.expenseAccountList,m.selectedOption),G=L(s.accountMappingView.billPayAccountList,l.selectedOption),K=L(s.accountMappingView.reimbursementsAccountList,E.selectedOption),O=$(s.accountMappingView.prepaidExpensesAccountList,y.selectedOptions),b=$(s.accountMappingView.fixedAssetsAccountList,w.selectedOptions),D=$(s.accountMappingView.accruedExpensesAccountList,S.selectedOptions),Z=$(s.accountMappingView.bankAccounts1099FilingAccountList,I.selectedOptions),H=Zn(s.accountMappingView.expenseAccounts1099FilingAccountList,N),q={selectedIncomeAccountId:A?.accountId,selectedExpenseAccountId:z?.accountId,selectedBillPayAccountId:G?.accountId,selectedReimbursementsAccountId:K?.accountId,selectedPrepaidExpensesAccountIds:O.map(v=>v.accountId),selectedFixedAssetsAccountIds:b.map(v=>v.accountId),selectedAccruedExpensesAccountIds:D.map(v=>v.accountId),selectedBankAccounts1099FilingAccountIds:Z.map(v=>v.accountId),selectedExpenseAccounts1099FilingAccountIds:H};e(ke({data:q}))},onBackClick:()=>{Ie(c)===!1?(o("../../dashboard"),e(ve())):e(de())},onSaveClick:()=>{e(je()),i&&J.track(Bn.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:n=>{e(we(s.currentTenant.companyId,n))}}})(Tn),at=()=>{const e=_(),s=B(),o=k(),{useFeatureGate:c}=te(),{isFeatureEnabled:i}=c(U.isFiling1099FeatureEnabled),{isFeatureEnabled:n}=c(U.isScheduledJEAccruedExpensesFeatureEnabled),t=x.getSignedInUser(),r=xe(t),u=h(y=>j(y)),[d,g]=p.useState(!1),[f,m]=p.useState(!1);p.useEffect(()=>{d===!1&&(o(de()),g(!0))},[d]);const l=h(y=>Ee(y)),E=y=>{m(y)};return a.jsxs(nt,{children:[a.jsx(P,{isAppContentDrawerOpen:f,handleDrawerToggle:E}),a.jsx(tt,{currentTenant:u,navigate:e,accountMappingView:l,isFiling1099FeatureEnabled:i&&r,isAccruedExpensesFeatureEnabled:n,location:s,isSettings:Ie(s),onClickMenuIcon:()=>E(!0)})]})},st=M.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
height: 100%;
|
|
12
12
|
width: 100%;
|
|
@@ -14,7 +14,7 @@ import{j as a}from"./liveblocks-6nZkQHFl.js";import{a as p}from"./sentry-Dr5FPm4
|
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
align-items: center;
|
|
16
16
|
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
`,ot=R(function(e,s){const o=j(e),c=Me(e),i=_e(e),n=s.roleMap.bill_pay_admin;return{isDisabled:(
|
|
17
|
+
`,ot=R(function(e,s){const o=j(e),c=Me(e),i=_e(e),n=s.roleMap.bill_pay_admin;return{isDisabled:(W(o?.userRole??[])||n)&&"readonly",billpayApprovalView:c,remiApproverView:i,analytics:J}},function(e,s){const{navigate:o,currentTenant:c}=s;return{onSetupApprovalRulesBillPaySectionClick:()=>{o("bills/approval-rules")},onSetupApprovalRulesRemiSectionClick:()=>{o("reimbursements/approval-rules")},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")}}})(Rn),it=()=>{const e=_(),s=B(),o=k(),{tenantEmailDomain:c}=F(),[i,n]=p.useState(!1),[t,r]=p.useState(!1),[u,d]=p.useState(!1),g=h(S=>j(S)),f=h(S=>S.billPaySetupApproverViewState.fetchState),m=h(S=>S.remiSetupApproverViewState.fetchState),l=h(S=>Pe(S)),E=g.companyId??x.getSignedInUserTenant(c)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access Approval Rules settings page without signing in...");const y=V();p.useEffect(()=>{u||f!=="Not-Started"||(d(!0),o(De(!0)))},[u,f,o]),p.useEffect(()=>{t||m!=="Not-Started"||(r(!0),o(Ue(!0)))},[t,m,o]);const w=S=>{n(S)};return y?.loggedInUserRoleMap!=null?a.jsxs(st,{children:[a.jsx(P,{isAppContentDrawerOpen:i,handleDrawerToggle:w}),a.jsx(ot,{navigate:e,location:s,companyId:E,currentTenant:g,roleMap:y.loggedInUserRoleMap,onClickMenuIcon:()=>{w(!0)}})]}):a.jsx(ae,{fetchState:l.fetchState})},ct=M.div`
|
|
18
18
|
display: flex;
|
|
19
19
|
height: 100%;
|
|
20
20
|
width: 100%;
|
|
@@ -22,7 +22,7 @@ import{j as a}from"./liveblocks-6nZkQHFl.js";import{a as p}from"./sentry-Dr5FPm4
|
|
|
22
22
|
flex-direction: column;
|
|
23
23
|
align-items: center;
|
|
24
24
|
background-color: ${e=>e.theme.colors.grey4};
|
|
25
|
-
`,rt=R(function(e,s){const{companyId:o,isZeniAccountEnabled:c,isChargeCardEnabled:i,isBillPayEnabled:n,isRemiEnabled:t,isTreasuryEnabled:r}=s,u=j(e);return{bankSetupView:Oe(e,o,n,t,c,i,r),connectedAccountProvider:u.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:J}},function(e,s){const{navigate:o,currentTenant:c,companyId:i}=s;return{onFetchLinkTokenClick:(n,t,r)=>{e(
|
|
25
|
+
`,rt=R(function(e,s){const{companyId:o,isZeniAccountEnabled:c,isChargeCardEnabled:i,isBillPayEnabled:n,isRemiEnabled:t,isTreasuryEnabled:r}=s,u=j(e);return{bankSetupView:Oe(e,o,n,t,c,i,r),connectedAccountProvider:u.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:J}},function(e,s){const{navigate:o,currentTenant:c,companyId:i}=s;return{onFetchLinkTokenClick:(n,t,r)=>{e(ne(t,n,r))},onEstablishConnectionClick:(n,t,r)=>{e(ee(n,i,t,r))},onUpdatePaymentAccountStatus:(n,t,r,u,d)=>{e(fe(n,t,d,u,r))},onUpdatePaymentAccountLoginStatus:(n,t,r,u)=>{e(me(!1,n,u,r,t))},onEstablishConnectionSuccess:(n,t)=>{e(ge(t,n))},onUpdateAccountClick:(n,t,r,u,d)=>{e(d==="paymentAccount"?pe(n,t,r,u):Je(u,n,t))},onUpdatePrimaryFundingAccount:(n,t,r)=>{e($e(i,t,n,r))},onRemoveConnection:n=>{e(Le(n))},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")}}})(Fn),lt=()=>{const e=_(),s=B(),o=k(),{tenantEmailDomain:c}=F(),i=V(),[n,t]=p.useState(!1),[r,u]=p.useState(!1),d=h(I=>j(I)),g=h(I=>I.settingsViewState.bankConnection.fetchState),f=Te(d,i?.loggedInUserRoleMap),m=Be(d,i?.loggedInUserRoleMap),l=Re(d,i?.loggedInUserRoleMap),E=Fe(d,i?.loggedInUserRoleMap),y=Ve(d,i?.loggedInUserRoleMap),w=d.companyId??x.getSignedInUserTenant(c)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");p.useEffect(()=>{r||g==="Completed"||(u(!0),o(Ne(!1)))},[r,o,g]);const S=I=>{t(I)};return f||l||m||y?a.jsxs(ct,{children:[a.jsx(P,{isAppContentDrawerOpen:n,handleDrawerToggle:S}),a.jsx(rt,{navigate:e,location:s,companyId:w,currentTenant:d,roleMap:i.loggedInUserRoleMap,isBillPayEnabled:f,isRemiEnabled:m,isZeniAccountEnabled:l,isChargeCardEnabled:y,isTreasuryEnabled:E,onClickMenuIcon:()=>{S(!0)}})]}):a.jsx(T,{})},dt=M.div`
|
|
26
26
|
display: flex;
|
|
27
27
|
height: 100%;
|
|
28
28
|
width: 100%;
|
|
@@ -30,7 +30,7 @@ import{j as a}from"./liveblocks-6nZkQHFl.js";import{a as p}from"./sentry-Dr5FPm4
|
|
|
30
30
|
flex-direction: column;
|
|
31
31
|
align-items: center;
|
|
32
32
|
background-color: ${e=>e.theme.colors.grey4};
|
|
33
|
-
`,ut=R(function(e,s){const{companyId:o}=s,c=j(e),i=s.roleMap.bill_pay_admin,n=Ge(e,o),{uiState:t}=n,r=(
|
|
33
|
+
`,ut=R(function(e,s){const{companyId:o}=s,c=j(e),i=s.roleMap.bill_pay_admin,n=Ge(e,o),{uiState:t}=n,r=(W(c?.userRole??[])||i)&&n.setupView.accountFetchStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.accountUpdateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{billingSetupView:n,uiState:t,stripeKey:Ce.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:r,analytics:J}},function(e,s){const{navigate:o,currentTenant:c,companyId:i}=s;return{onFetchLinkTokenClick:(n,t)=>{e(ne("billing_setup",n,t))},onEstablishConnectionClick:n=>{e(ee(n,i,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(ge("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,t,r)=>{e(fe(n,t,"billing","billing_setup",r))},onUpdatePaymentAccountLoginStatus:(n,t)=>{e(me(!1,n,"billing","billing_setup",t))},onUpdateAccountClick:(n,t)=>{e(pe(n,t,"billing","billing_setup"))},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")},handleCreateCardSetupIntent:n=>{e(he(n))},handleConfirmCardSetupIntent:n=>{e(Ye(n))},updateCardPaymentModalState:n=>{e(Qe({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,t,r)=>{e(Xe(n,t,r))},handleFetchPaymentSources:()=>{e(Q())},resetCardPaymentViewState:()=>{e(qe())},handleResetCardPaymentErrorStatuses:()=>{e(He())},onBillingAddressSave:n=>{e(Ze(n))},onAddressEditHandler:n=>{if(n!=null){const t=Hn(n);e(Ke({addressType:"subscription_billing_address",addressToCreate:t}))}}}})(Nn),pt=()=>{const e=_(),s=B(),o=k(),{tenantEmailDomain:c}=F(),[i,n]=p.useState(!1),[t,r]=p.useState(!1),[u,d]=p.useState(!1),g=h(I=>j(I)),f=h(I=>I.cardPaymentViewState),m=h(I=>I.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState),l=Vn(f.addCardPaymentSourceStatus.fetchState),E=f.addCardPaymentSourceStatus.fetchState,y=g.companyId??x.getSignedInUserTenant(c)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const w=V();p.useEffect(()=>{y!=null&&o(ze(y,!1))},[y,o]),p.useEffect(()=>{t||(r(!0),o(Q()))},[t,o]),p.useEffect(()=>{u||(he(["card"]),d(!0))},[u]),p.useEffect(()=>{l==="In-Progress"&&E==="Completed"&&o(Q())},[l,E]);const S=I=>{n(I)};return w?.loggedInUserRoleMap!=null?a.jsxs(dt,{children:[a.jsx(P,{isAppContentDrawerOpen:i,handleDrawerToggle:S}),a.jsx(ut,{navigate:e,location:s,companyId:y,currentTenant:g,roleMap:w.loggedInUserRoleMap,onClickMenuIcon:()=>{S(!0)},googleAPIKey:Ce.googleMapsAPIKey})]}):a.jsx(ae,{fetchState:m})},Y="external_integrations",gt=R(function(e){const s=nn(e,Y);return{meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",notifyMeRegisteredSlugs:new Set(s.map(o=>o.additionalInfo).filter(o=>o!=null))}},function(e,s){const{navigate:o,integrationsView:c,signedInUserEmail:i,tenantEmailDomain:n,tenantId:t}=s;return{onBackClick:()=>{o("../")},onNavigateToDashboard:()=>{o("../dashboard")},onReconnectQBO:()=>{re.init("/connection/auth",n),re.handleClick()},onRefreshClick:()=>{c.integrations.refreshQBO.fetchState!=="In-Progress"&&e(cn())},onSaveChargeBeeCredentials:(r,u)=>{const d=c.externalConnections?.revenue?.find(g=>g.connectionName==="chargebee")?.connectionId;d!=null&&e(sn(t,d,se("revenue"),on("chargebee"),{api_key:r,site:u}))},onConnectHubSpot:(r,u)=>{const d=c.externalConnections?.revenue?.find(g=>g.connectionName==="hubspot")?.connectionId;if(d!=null){const g=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:r,client_secret:u,connection_id:d,redirect_uri:g,tenant_id:t}));const f="oauth crm.objects.deals.read crm.objects.owners.read";window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(r)}&scope=${encodeURIComponent(f)}&redirect_uri=${encodeURIComponent(g)}`}},onDisconnect:(r,u)=>{e(an(t,r,se(u)))},onNotifyMe:r=>{e(tn(Y,r,i))}}})(On),mt=()=>{const e=_(),s=k(),{tenantEmailDomain:o}=F(),[c,i]=p.useState(!1),n=h(l=>l.tenantState.fetchState),t=h(l=>j(l)),r=t.companyId??x.getSignedInUserTenant(o)?.companyId,u=x.getSignedInUser(),d=V(),g=W(t.userRole??[]);if(u==null)throw Error("Can't access Integrations page without signing in...");p.useEffect(()=>{s(We(Y))},[s]);const f=l=>{i(l)},m=h(l=>en(l,r));return d?.loggedInUserRoleMap!=null?a.jsxs(ft,{children:[a.jsx(P,{isAppContentDrawerOpen:c,handleDrawerToggle:f}),a.jsx(gt,{navigate:e,onClickMenuIcon:()=>{f(!0)},isAdmin:g,integrationsView:m,signedInUserEmail:u.userEmail??"",tenantEmailDomain:t.tenantEmailDomain??o??"",tenantId:t.tenantId,saveChargeBeeState:m.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:m.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:m.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:m.externalConnections?.saveOAuthConnectionError?.message,deleteConnectionState:m.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:m.externalConnections?.deleteConnectionError?.message,isLoading:n==="In-Progress"})]}):a.jsx(ae,{fetchState:n})},ft=M.div`
|
|
34
34
|
display: flex;
|
|
35
35
|
height: 100%;
|
|
36
36
|
width: 100%;
|
|
@@ -46,7 +46,7 @@ import{j as a}from"./liveblocks-6nZkQHFl.js";import{a as p}from"./sentry-Dr5FPm4
|
|
|
46
46
|
flex-direction: column;
|
|
47
47
|
align-items: center;
|
|
48
48
|
background-color: ${e=>e.theme.colors.grey4};
|
|
49
|
-
`,bt=()=>{const e=k(),{tenantEmailDomain:s}=F(),[o,c]=p.useState(!1),i=h(l=>j(l)).companyId??x.getSignedInUserTenant(s)?.companyId,n=x.getSignedInUser();if(n==null)throw Error("Can't access my bank connections page without signing in...");const t=h(l=>rn(l,n.userId)),r=h(l=>ln(l,i,"bill_pay","user_reimbursement_account")),{plaidConnectionDetails:u}=r,d=l=>{c(l)},g=p.useCallback(l=>{e(
|
|
49
|
+
`,bt=()=>{const e=k(),{tenantEmailDomain:s}=F(),[o,c]=p.useState(!1),i=h(l=>j(l)).companyId??x.getSignedInUserTenant(s)?.companyId,n=x.getSignedInUser();if(n==null)throw Error("Can't access my bank connections page without signing in...");const t=h(l=>rn(l,n.userId)),r=h(l=>ln(l,i,"bill_pay","user_reimbursement_account")),{plaidConnectionDetails:u}=r,d=l=>{c(l)},g=p.useCallback(l=>{e(ne("user_reimbursement_account",l))},[]),f=p.useCallback(l=>{e(ee(l,i,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},[]);p.useEffect(()=>{t.fetchState!=="Completed"&&t.fetchState!=="In-Progress"&&e(dn(n.userId))},[n.userId,t.fetchState]);const m=t.fetchState==="Not-Started"||t.fetchState==="In-Progress";return a.jsxs(ht,{children:[a.jsx(P,{isAppContentDrawerOpen:o,handleDrawerToggle:d}),a.jsx(Ln,{plaidConnectionDetails:u,isLoading:m,myBankConnectionsView:t,onFetchLinkTokenClick:g,onEstablishConnectionClick:f,onClickMenuIcon:()=>{d(!0)}})]})},St=M.div`
|
|
50
50
|
display: flex;
|
|
51
51
|
height: 100%;
|
|
52
52
|
width: 100%;
|
|
@@ -54,4 +54,4 @@ import{j as a}from"./liveblocks-6nZkQHFl.js";import{a as p}from"./sentry-Dr5FPm4
|
|
|
54
54
|
flex-direction: column;
|
|
55
55
|
align-items: center;
|
|
56
56
|
background-color: ${e=>e.theme.colors.grey4};
|
|
57
|
-
`,
|
|
57
|
+
`,le=({appContent:e})=>{const s=k(),o=_(),c=B(),[i,n]=p.useState(!1),t=h(b=>j(b)),{tenantEmailDomain:r}=t,u=t.companyId??x.getSignedInUserTenant(r)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:d}=te(),{isFeatureEnabled:g}=d(U.isDepositAccountsFeatureEnabled),{isFeatureEnabled:f}=d(U.isChargeCardFeatureEnabled),{isFeatureEnabled:m}=d(U.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=d(U.isTreasuryEnabled),E=h(b=>ue(b)),y=be(t),w=Se(m,t),S=!w&&E,I=$n(t,f,m),{areTenantIdsInSync:N}=Jn();p.useEffect(()=>{N&&s(un(u,S))},[u,s,S,N]);const A=h(b=>pn(b,S)),z=A.fetchState==="Not-Started"||A.fetchState==="In-Progress"||u==null,G=gn(t),K=!!t.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,O=b=>{n(b)};return a.jsxs(St,{children:[a.jsx(P,{isAppContentDrawerOpen:i,handleDrawerToggle:O}),e!=null?a.jsx(a.Fragment,{children:e}):a.jsx(zn,{myProfileView:A,isAccountingClassesEnabled:E,isReimbursementDisabled:K===!1,isZeniAccountsDisabled:g===!1,isChargeCardDisabled:I===!1,isTreasuryDisabled:l===!1,isLiteRoleDisabled:G===!1,onClickMenuIcon:()=>{O(!0)},isLoading:z,isBankingOnlyTenant:w,isCardsOnlyTenant:y,onAddressClick:b=>{const D=function(H,q){let v=`/${H}/settings/my_profile`;return v=v.concat(`/new/${q}`),v}(r,b),Z=Gn(c.state?.pathnameStackToGoBack,c.pathname);o(D,{state:{pathnameStackToGoBack:Z}})},onGetOtp:b=>{const D={...A.myProfileLocalData,phone:b};s(oe({localData:D})),s(bn(b,"MyProfile"))},onResendOtp:b=>{s(hn(b,"MyProfile"))},onCancelClick:()=>{s(fn())},onSaveClick:()=>{s(ie("MyProfile",A.myProfileLocalData.phone,A.myProfileLocalData.otpChallenge,A.myProfileLocalData.dateOfBirth,A.addressData?.addressToCreate))},onVerifyOtp:(b,D)=>{s(mn(b,D,"MyProfile"))},onVerifyOtpSuccess:b=>{b!=null&&x.saveZeniOtpToken(b),s(ie("MyProfile",A.myProfileLocalData.phone,A.myProfileLocalData.otpChallenge,A.myProfileLocalData.dateOfBirth,A.addressData?.addressToCreate))},updateMyProfileLocalData:b=>{s(oe({localData:b}))}})]})};function yt(){const e=k(),s=h(l=>j(l)).companyId,o=h(l=>Sn(l)),c=h(l=>ye(l)),i=x.getSignedInUser(),[n,t]=p.useState(!1),r=p.useCallback(l=>{t(l)},[]),u=p.useCallback(l=>{e(yn(l))},[]),d=p.useCallback(()=>{i?.userEmail!=null&&e(In({loggedInUserEmail:i.userEmail}))},[i?.userEmail]),g=p.useCallback(()=>{e(Cn())},[]);if(i==null)throw Error("Can't access Notification Settings page without signing in...");const f=p.useCallback(()=>{const l=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ce(l,s))},[s,c.notificationSettings.monthEndInsightsNotificationSettings.enabled]),m=p.useCallback(()=>{e(xn())},[]);return p.useEffect(()=>{if(c.fetchState==="Completed"&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"){const l=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ce(l,s))}},[o.fetchState,s,c.notificationSettings.monthEndInsightsNotificationSettings.enabled,c.fetchState]),a.jsxs(a.Fragment,{children:[a.jsx(P,{isAppContentDrawerOpen:n,handleDrawerToggle:r}),a.jsx(Kn,{notificationSettingsView:o,onFormDataChange:u,onCancel:d,onSave:g,onClickMenuIcon:()=>{r(!0)},signedInUser:i,onRefresh:f,resetUpdateStatus:m})]})}function ea(e){const[s,o]=p.useState(!1),c=h(l=>ye(l)),i=h(l=>j(l)),n=V(),t=x.getSignedInUser(),r=k(),{useFeatureGate:u}=te(),{isFeatureEnabled:d}=u(U.isDebitCardFeatureEnabled),g=t?.userEmail==null||c.fetchState!=="Completed"||En(c.notificationSettings,t.userEmail,d,i);p.useEffect(()=>{c.fetchState!=="In-Progress"&&c.fetchState!=="Completed"&&s===!1&&(o(!0),r(An()))},[c.fetchState,s]);const f=Se(d,i),m=be(i);return c.fetchState!=="In-Progress"&&c.fetchState!=="Not-Started"||g!==!0?wn(i)?a.jsxs(X,{children:[jn(n?.loggedInUserRole??[],d,i,n?.loggedInUserRoleMap)&&a.jsx(C,{path:"accounting/*",element:a.jsx(at,{})}),vn(n?.loggedInUserRole??[],d,i,n?.loggedInUserRoleMap)&&a.jsx(C,{path:"approval_rules/*",element:a.jsx(It,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),kn(i,n?.loggedInUserRoleMap)&&a.jsx(C,{path:"my_bank_connections",element:a.jsx(bt,{})}),Pn(i,n?.loggedInUserRoleMap)&&a.jsx(C,{path:"bank_connections",element:a.jsx(lt,{})}),Dn(i,n?.loggedInUserRoleMap)&&a.jsx(C,{path:"business_verification",element:a.jsx(Qn,{productType:f?"zeni_accounts":m?"charge_cards":Xn(i,n?.loggedInUserRoleMap)})}),Un(n?.loggedInUserRole??[],i,n?.loggedInUserRoleMap)&&a.jsx(C,{path:"company_details",element:a.jsx(Yn,{})}),Mn(n?.loggedInUserRole??[],i)&&a.jsx(C,{path:"billing",element:a.jsx(pt,{})}),_n(n?.loggedInUserRole??[],d,i)&&a.jsx(C,{path:"integrations",element:a.jsx(mt,{})}),a.jsx(C,{path:"my_profile/new/:addressType",element:a.jsx(le,{appContent:a.jsx(qn,{isSubPage:!1})})}),a.jsx(C,{path:"my_profile",element:a.jsx(le,{})}),g&&a.jsx(C,{path:"notifications",element:a.jsx(yt,{})}),a.jsx(C,{path:"*",element:a.jsx(T,{})})]}):a.jsx(X,{children:a.jsx(C,{path:"*",element:a.jsx(T,{})})}):null}function It(e){return a.jsxs(X,{children:[a.jsx(C,{path:"/",element:a.jsx(it,{})}),a.jsx(C,{path:"bills/approval-rules/*",element:a.jsx(Wn,{})}),a.jsx(C,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?a.jsx(et,{}):a.jsx(T,{})}),a.jsx(C,{path:"*",element:a.jsx(T,{})})]})}export{ea as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-
|
|
1
|
+
import{j as u}from"./liveblocks-DH0u65Kt.js";import{j as X,u as Q,h as Y,l as W,g as E,N as j,k as H,q as Qe}from"./core-DR8tDM_G.js";import{bE as Ye,ck as Ie,ML as ye,eO as x,cw as en,xu as Z,xj as nn,MX as tn,M_ as an,pO as ee,pC as ne,k8 as te,rU as z,N0 as Ae,fA as $e,fz as We,fy as He,N1 as sn,xD as on,Bu as ke,Bl as _e,Bi as ve,B9 as K,Bo as Pe,Br as Ee,Bx as we,sm as Te,fP as cn,cr as rn,eU as un,eS as dn,eT as ln,bs as pn,N2 as mn,Ab as le,AP as yn,N3 as fn,bF as gn,CK as pe,BO as Sn,N4 as bn,N5 as hn,CO as Cn,CS as In,rN as An,Ha as kn,Dn as Ce,Eg as me,N6 as _n,N7 as vn,N8 as Pn,N9 as Ge,Na as En,JF as wn,M8 as Tn,JR as Dn,Nb as qe,Nc as Fe,DB as Ke,kg as Un,pF as Je,rW as On,bD as Ne,s6 as je,cu as Bn,Nd as Xe,fc as Fn,D5 as xn,D9 as Vn,Ne as Nn,Dq as Re,Nf as jn,Ng as Rn,Nh as zn,Ni as Ln,fI as Mn,yO as Zn,Nj as $n,yT as Wn,yS as Hn}from"./zeni-epic-state-TB4o69vJ.js";import{k as ae,y as ie,S as de,m as De,aK as J,z as T,s as se,c as w,B as Ue,e as $,bq as Gn,aq as oe,br as V,bs as qn,bt as Kn,ac as Ve,bu as Jn,j as ze,ar as Le,Z as Xn,C as Qn,bv as Yn,bw as et,bx as nt,a3 as tt}from"./index-CjFymAYP.js";import{a as C}from"./sentry-Z2EfLBjp.js";import{n as xe,D as at,S as it}from"./mui-EgTXI2De.js";import{M as fe}from"./MobileAppDrawer-CKb5yG63.js";import R from"./NotFoundScreen-DuU91hRO.js";import{a as Me}from"./analyticsHelper-C6rQwSxW.js";import{c as Ze}from"./routePaths-BSK2K3Sa.js";import{B as Be}from"./BusinessVerificationPageScreen--aJrL6sY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="91f722c6-fbce-4b31-9689-6402bf9b72c8",e._sentryDebugIdIdentifier="sentry-dbid-91f722c6-fbce-4b31-9689-6402bf9b72c8")}catch{}})();const st=xe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-
|
|
1
|
+
import{j as f}from"./liveblocks-DH0u65Kt.js";import{a as u,b as T,q as A}from"./sentry-Z2EfLBjp.js";import{h as D,j as z,g as c,u as M,N as O,k as P}from"./core-DR8tDM_G.js";import{u as j,z as s,m as F,c as E,D as B,d as _,e as N,$,g as V,r as W,f as v}from"./index-CjFymAYP.js";import{eO as q,IQ as H,IR as J,eP as Q,fi as R,IW as X,fH as Y,cT as Z,IX as C,IY as G,IZ as K,bS as y}from"./zeni-epic-state-TB4o69vJ.js";import"./mui-EgTXI2De.js";import{u as ee}from"./useDeviceId-DAVwENt1.js";import{f as te}from"./analyticsHelper-C6rQwSxW.js";import{t as ne}from"./getLocaleForTenant-DmihGqyc.js";import"./recharts-BN9u8kqw.js";import"./analytics-TpOPKTBE.js";import"./plaid-C9BN4j5u.js";import"./dnd-Tv7XXetM.js";import"./stripe-DMRn4zHo.js";import"./lottie-DXjy-4kQ.js";import"./lexical-XdnXYpvk.js";import"./pdf-C1ZWoPlC.js";import"./utils-CYYHm9mY.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]="d816e66f-d63d-411f-acd1-c7efcc664552",t._sentryDebugIdIdentifier="sentry-dbid-d816e66f-d63d-411f-acd1-c7efcc664552")}catch{}})();const ie=P(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}},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 l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(K({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(l),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(G(n,a)))},clearSignInError:()=>{t(C())}}})(W),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=j(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),l=c(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:U,accountUnlockTime:k}=c(e=>e.tenantState),p=c(e=>e.tenantState.fetchState),L=c(e=>e.tenantState.activeTenantFetchState.fetchState),I=c(e=>e.tenantState.signInState),o=c(e=>e.tenantState.loggedInUser),r=c(e=>q(e)),S=c(e=>H(e)),m=M(),w=F().mode,b=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))},[h.fetchState,l]),u.useEffect(()=>{t(void 0)},[]),u.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(J(S.tenantsInOrder),o.zeniSessionId),Q(o.userId,o.zeniSessionId,r.tenantId),i(R(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(X("Completed")),B.updateAppLocaleID(ne(r)),te(o,r,w,void 0,S.tenantsInOrder),Y().then(()=>{const e=V();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(N.Event.loginSuccess,o.authProvider??"google",Z(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 f.jsx(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.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?f.jsx($,{onClose:()=>i(C()),unlockDate:k}):null]})}export{ve as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-DH0u65Kt.js";import{a as n}from"./sentry-Z2EfLBjp.js";import{h as u,u as m,j as p,N as g}from"./core-DR8tDM_G.js";import{z as f,B as y,t as h,c as d,e as b}from"./index-CjFymAYP.js";import{fM as x,fN as I,Jc as j}from"./zeni-epic-state-TB4o69vJ.js";import{n as w}from"./mui-EgTXI2De.js";import"./recharts-BN9u8kqw.js";import"./analytics-TpOPKTBE.js";import"./plaid-C9BN4j5u.js";import"./dnd-Tv7XXetM.js";import"./stripe-DMRn4zHo.js";import"./lottie-DXjy-4kQ.js";import"./lexical-XdnXYpvk.js";import"./pdf-C1ZWoPlC.js";import"./utils-CYYHm9mY.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]="d1de2f4c-23a1-424a-adfc-b26950971633",e._sentryDebugIdIdentifier="sentry-dbid-d1de2f4c-23a1-424a-adfc-b26950971633")}catch{}})();function U(){const e=u(),t=m(),i=p(),a=n.useRef(!1),c=f.isSignedIn(),r=t.state?.message==="logout",o=r||c;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{f.clearAll(),e(x()),e(I(!1)),j(),h.reset(),d.trackLogout(b.Event.logoutSuccess),d.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=w.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as
|
|
1
|
+
import{j as p}from"./liveblocks-DH0u65Kt.js";import{a as g}from"./sentry-Z2EfLBjp.js";import{j as U,h as _,u as z,g as G,l as O,k as M}from"./core-DR8tDM_G.js";import{z as R,y as Z,S as d,s as V,c as W,e as q,cI as H,j as f,p as J}from"./index-CjFymAYP.js";import{eO as X,Q1 as x,FO as y,Q2 as A,PZ as Y,Fe as S,Q3 as aa,Fi as I,EN as ea,FP as F,Q4 as B,gM as ta,FF as sa,FK as oa,Fx as na,Fv as w,FL as ia,Fs as la,Q5 as ra,Q6 as ca,Q7 as ka,Q8 as ua,Q9 as m,ea as pa,Qa as da,Qb as ma}from"./zeni-epic-state-TB4o69vJ.js";import{n as Ta}from"./mui-EgTXI2De.js";import{u as ga}from"./useAskAiCfoHostNavButtonProps-CT7gco_a.js";import{c as fa}from"./useFetchSuggestedQuestionsWhenReady-CQWT0XHy.js";import{M as ha}from"./MobileAppDrawer-CKb5yG63.js";import"./recharts-BN9u8kqw.js";import"./analytics-TpOPKTBE.js";import"./plaid-C9BN4j5u.js";import"./dnd-Tv7XXetM.js";import"./stripe-DMRn4zHo.js";import"./lottie-DXjy-4kQ.js";import"./lexical-XdnXYpvk.js";import"./pdf-C1ZWoPlC.js";import"./utils-CYYHm9mY.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]="0eb490e6-6b13-49c8-8ee2-898af4d0e1ca",e._sentryDebugIdIdentifier="sentry-dbid-0eb490e6-6b13-49c8-8ee2-898af4d0e1ca")}catch{}})();const Da=Ta.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,4 +6,4 @@ import{j as d}from"./liveblocks-6nZkQHFl.js";import{a as g}from"./sentry-Dr5FPm4
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,ba=M(function(e,t){const o=x(e,t.isTaskTemplatesEnabled),{taskGroupId:c}=t,i=c!=null&&c!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(a=>a.taskGroupIds.includes(c))})).filter(l=>l.tasks.length>0)}:o,u=Y(e),n=R.isZeniUser();return{taskListView:i,tagListView:u,localData:i.localData,isTaskTemplatesEnabled:t.isTaskTemplatesEnabled,isZeniUser:n}},function(e,t){const{navigate:o,currentTenant:c,location:i,isTaskTemplatesEnabled:u}=t,{tenantEmailDomain:n}=c,{groupByKey:l}=t.uiState;return{onTaskManagementRowClick:a=>{const s=L(n,a),k=f(i.state?.pathnameStackToGoBack,i.pathname);o(s,{state:{pathnameStackToGoBack:k}})},onReloadTasks:()=>{e(y(!0,u))},onTabChange:a=>{e(ua(a))},onParentTaskClick:a=>{const s=L(n,a);window.open(s,"_blank","noopener")},bulkUpdateTasks:(a,s)=>{e(w(a,null,s))},onNewTaskClick:()=>{if(t.localData.defaultTaskGroupId!=null){const a=C(n,t.localData.defaultTaskGroupId),s=f(i.state?.pathnameStackToGoBack,i.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{e(B({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{e(ka({filters:a}))},onSearchTextChanged:a=>{e(ca({searchText:a}))},onReloadCards:()=>{e(y(!0,u))},onBackClick:()=>{if(i.state?.message==="triggerBackClick"){const a=J(i.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{e(ra({localData:a}))},resetLocalData:()=>{e(A({taskGroupById:t.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{e(la(t.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{e(w(t.localData.selectedTaskIds,a,ia(t.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{e(na(a))},onAddNewTaskToTaskGroup:a=>{if(t.localData.defaultTaskGroupId!=null){const s=Ga(l,a);e(S({taskDetailLocalData:s}));const k=C(n,t.uiState.groupByKey==="groupName"?a:t.localData.defaultTaskGroupId),h=f(i.state?.pathnameStackToGoBack,i.pathname);o(k,{state:{pathnameStackToGoBack:h,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{e(oa(t.localData.selectedTaskIds.length>0?t.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{e(sa(a,s))},onTimeSpentUpdate:(a,s)=>{e(F({task:a,updates:s}))},onShowToast:a=>{e(ta(a))},onGroupByFilterChange:a=>{e(B({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{e(F({task:a,updates:s}))},onCreateTagClick:(a,s)=>{e(ea(a,s))},handleGroupTemplateClick:a=>{e(I(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{e(I(a,[s]))},handleNewTaskInitialization:a=>{if(e(S({taskDetailLocalData:{...aa,name:a}})),t.localData.defaultTaskGroupId!=null){const s=C(n,t.localData.defaultTaskGroupId),k=f(i.state?.pathnameStackToGoBack,i.pathname);o(s,{state:{pathnameStackToGoBack:k,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${n}/tasks/group/${a}`)},onQuickResponsesClick:()=>{o(`/${n}/tasks/quick-responses`)}}})(H);function Ka(){const e=U(),t=_(),o=z(),c=R.getSignedInUser(),i=G(r=>X(r)),{taskGroupId:u}=O(),{useFeatureGate:n}=Z(),{isFeatureEnabled:l}=n(
|
|
9
|
+
`,ba=M(function(e,t){const o=x(e,t.isTaskTemplatesEnabled),{taskGroupId:c}=t,i=c!=null&&c!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(a=>a.taskGroupIds.includes(c))})).filter(l=>l.tasks.length>0)}:o,u=Y(e),n=R.isZeniUser();return{taskListView:i,tagListView:u,localData:i.localData,isTaskTemplatesEnabled:t.isTaskTemplatesEnabled,isZeniUser:n}},function(e,t){const{navigate:o,currentTenant:c,location:i,isTaskTemplatesEnabled:u}=t,{tenantEmailDomain:n}=c,{groupByKey:l}=t.uiState;return{onTaskManagementRowClick:a=>{const s=L(n,a),k=f(i.state?.pathnameStackToGoBack,i.pathname);o(s,{state:{pathnameStackToGoBack:k}})},onReloadTasks:()=>{e(y(!0,u))},onTabChange:a=>{e(ua(a))},onParentTaskClick:a=>{const s=L(n,a);window.open(s,"_blank","noopener")},bulkUpdateTasks:(a,s)=>{e(w(a,null,s))},onNewTaskClick:()=>{if(t.localData.defaultTaskGroupId!=null){const a=C(n,t.localData.defaultTaskGroupId),s=f(i.state?.pathnameStackToGoBack,i.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{e(B({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{e(ka({filters:a}))},onSearchTextChanged:a=>{e(ca({searchText:a}))},onReloadCards:()=>{e(y(!0,u))},onBackClick:()=>{if(i.state?.message==="triggerBackClick"){const a=J(i.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{e(ra({localData:a}))},resetLocalData:()=>{e(A({taskGroupById:t.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{e(la(t.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{e(w(t.localData.selectedTaskIds,a,ia(t.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{e(na(a))},onAddNewTaskToTaskGroup:a=>{if(t.localData.defaultTaskGroupId!=null){const s=Ga(l,a);e(S({taskDetailLocalData:s}));const k=C(n,t.uiState.groupByKey==="groupName"?a:t.localData.defaultTaskGroupId),h=f(i.state?.pathnameStackToGoBack,i.pathname);o(k,{state:{pathnameStackToGoBack:h,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{e(oa(t.localData.selectedTaskIds.length>0?t.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{e(sa(a,s))},onTimeSpentUpdate:(a,s)=>{e(F({task:a,updates:s}))},onShowToast:a=>{e(ta(a))},onGroupByFilterChange:a=>{e(B({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{e(F({task:a,updates:s}))},onCreateTagClick:(a,s)=>{e(ea(a,s))},handleGroupTemplateClick:a=>{e(I(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{e(I(a,[s]))},handleNewTaskInitialization:a=>{if(e(S({taskDetailLocalData:{...aa,name:a}})),t.localData.defaultTaskGroupId!=null){const s=C(n,t.localData.defaultTaskGroupId),k=f(i.state?.pathnameStackToGoBack,i.pathname);o(s,{state:{pathnameStackToGoBack:k,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${n}/tasks/group/${a}`)},onQuickResponsesClick:()=>{o(`/${n}/tasks/quick-responses`)}}})(H);function Ka(){const e=U(),t=_(),o=z(),c=R.getSignedInUser(),i=G(r=>X(r)),{taskGroupId:u}=O(),{useFeatureGate:n}=Z(),{isFeatureEnabled:l}=n(d.isTaskTemplatesEnabled),{isFeatureEnabled:a}=n(d.isTaskCannedResponsesEnabled),{isFeatureEnabled:s}=n(d.isTaskCategorizationEnabled),{isFeatureEnabled:k}=n(d.isTaskBulkResolutionEnabled),{isFeatureEnabled:h}=n(d.isTaskGroupAssigneesEnabled),{isFeatureEnabled:Q}=n(d.isTaskRecurringParentEnabled),[E,P]=g.useState(!1),[j,N]=g.useState(!1),D=G(r=>x(r,l)),b=G(r=>r.taskGroupState),T=D.fetchState,{isAiCfoAccessEnabled:$,onAskAiCfoClick:v}=ga({mobileExploreReferrer:"Task Checklist"});if(fa({isDataReady:T==="Completed"}),g.useEffect(()=>{E||(P(!0),t(y(!1,l)))},[E,t]),g.useEffect(()=>{T==="Completed"&&t(A({taskGroupById:b.taskGroupById}))},[T,b.taskGroupById]),c==null)throw Error("Can't access task list page without signing in...");return p.jsxs(p.Fragment,{children:[T==="Completed"?p.jsx(V,{analytics:W,onLoad:r=>(K=>K.trackPageLoaded(q.Event.taskListPage))(r)}):null,p.jsxs(Da,{children:[p.jsx(ha,{isAppContentDrawerOpen:j,handleDrawerToggle:r=>{N(r)}}),p.jsx(ba,{location:o,navigate:e,currentTenant:i,taskGroupId:u,taskGroupState:b,localData:D.localData,uiState:D.uiState,isTaskTemplatesEnabled:l,taskListFetchState:T,isTaskCategorizationEnabled:s,isTaskCannedResponsesEnabled:a,isTaskBulkResolutionEnabled:k,isTaskGroupAssigneesEnabled:h,isTaskRecurringParentEnabled:Q,isAiCfoAccessEnabled:$,onAskAiCfoClick:v})]})]})}const L=(e,t)=>`/${e}/tasks/${encodeURIComponent(t)}`,C=(e,t)=>`/${e}/tasks/new/${t}`,Ga=(e,t)=>{if(e==="assignee"){const o=t.split(",");return{...m.taskDetailLocalData,assignee:o}}if(e==="priority"){const o=pa(t);return{...m.taskDetailLocalData,priority:o}}if(e==="status"){const o=da(t);return{...m.taskDetailLocalData,status:o}}if(e==="tag"){const o=t.split(",");return{...m.taskDetailLocalData,tagIds:o}}if(e==="dueDate"){const o=ma(t);return{...m.taskDetailLocalData,dueDate:o}}return{...m.taskDetailLocalData}};export{Ka as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{j as n}from"./liveblocks-DH0u65Kt.js";import se from"./NotFoundScreen-DuU91hRO.js";import{a as c}from"./sentry-Z2EfLBjp.js";import{j as O,h as Z,g as f,u as ne,l as oe,N as ie,k as re,n as ce,o as g}from"./core-DR8tDM_G.js";import{FS as M,FV as le,FY as de,eO as Q,PZ as H,Fa as J,EU as pe,FC as ue,Fv as ke,P_ as K,P$ as V,EQ as me,EN as ge,pO as fe,pC as he,k8 as Se,F0 as Ie,Q0 as Te,F5 as be,F2 as Ee,EX as Ce,Ff as Ge,Fe as De}from"./zeni-epic-state-TB4o69vJ.js";import{z as G,cG as Fe,n as xe,y as ye,S as b,p as W,j,s as je,c as z,e as ve,cH as we,f as _,aq as Re}from"./index-CjFymAYP.js";import{n as Pe}from"./mui-EgTXI2De.js";import{u as Be}from"./useInitialThreadRequest-XTK7FDn_.js";import{M as Ue}from"./MobileAppDrawer-CKb5yG63.js";import Le from"./TaskListScreen-B8MV3xma.js";import"./recharts-BN9u8kqw.js";import"./analytics-TpOPKTBE.js";import"./plaid-C9BN4j5u.js";import"./dnd-Tv7XXetM.js";import"./stripe-DMRn4zHo.js";import"./lottie-DXjy-4kQ.js";import"./lexical-XdnXYpvk.js";import"./pdf-C1ZWoPlC.js";import"./utils-CYYHm9mY.js";import"./useAskAiCfoHostNavButtonProps-CT7gco_a.js";import"./useFetchSuggestedQuestionsWhenReady-CQWT0XHy.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]="cceb57db-5527-4792-becd-89ad928adaa5",e._sentryDebugIdIdentifier="sentry-dbid-cceb57db-5527-4792-becd-89ad928adaa5")}catch{}})();function $e(){const e=O(),t=Z(),s=G.getSignedInUser(),{cannedResponses:d,fetchState:r,saveFetchState:p}=f(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(Fe,{cannedResponses:d,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:p==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let q,A=[];const Ne=re(function(e,t){const{location:s,taskGroupId:d}=t,r=K(e,t.taskId),p=Q(e),l=d!=null?V(e.taskGroupState,d):void 0,k=G.getSignedInUser(),a=p.tenantId,o={userId:k?.userId??"",sessionId:k?.zeniSessionId??"",tenantId:a??""},h=H(e),{tenantEmailDomain:S}=p,E=r.recurringSourceTaskId,D=E!=null?`${_.appUrl}/${S}/tasks/${encodeURIComponent(E)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:o,isZeniUser:G.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==q&&(q=I,A=Object.values(I)),A),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Re.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${_.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=>V(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(Ee(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(p.state?.message==="triggerBackClick"){const a=W(p.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";d(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=v(k),o=j(p.state?.pathnameStackToGoBack,p.pathname);d(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Ie(s))},updateFilesEntity:a=>{e(Se({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(fe(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(J(!1,s))},onCreateTagClick:a=>{e(ge(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(M())},onManageTemplatesClick:()=>{d(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(we);function y(){const e=O(),t=Z(),s=ne(),d=xe(),{taskId:r,taskGroupId:p}=oe(),l=f(i=>Q(i)),k=Be(l?.companyId),{useFeatureGate:a}=ye(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:E}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:D}=a(b.isTaskGroupAssigneesEnabled),[I,u]=c.useState(!1),[w,X]=c.useState(!1),[R,Y]=c.useState(!1),[P,ee]=c.useState(!1),[B,F]=c.useState(!1),T=c.useRef(!1),C=f(i=>i.taskListState.updateTasksFetchState.fetchState),U=f(i=>H(i)),L=f(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{w||(X(!0),t(J(!1,r)))},[w,t]),c.useEffect(()=>{R||U.fetchState==="Completed"||(Y(!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&&(T.current=!1,t(ke([r],null,{isArchived:!1})),F(!0))},[t,r]);c.useEffect(()=>{if(B)if(C!=="In-Progress"){if(T.current){if(C==="Error")return F(!1),void(T.current=!1);if(C==="Completed"){F(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=W(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=v(i);e(m,{state:{pathnameStackToGoBack:j(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[B,C,l,s,e]);const $=f(i=>K(i,r)),x=$.fetchState,N=G.getSignedInUser();if(N==null)throw Error("Can't access task detail page without signing in...");if(x==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=l,m=v(i),te=j(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[x==="Completed"?n.jsx(je,{analytics:z,onLoad:i=>(m=>m.trackPageLoaded(ve.Event.taskDetailPage))(i)}):null,n.jsxs(Ve,{children:[n.jsx(Ue,{isAppContentDrawerOpen:I,handleDrawerToggle:i=>{u(i)}}),n.jsx(Ne,{analytics:z,currentTenant:l,handleZeniLogoClick:()=>{d.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:N,navigate:e,taskGroupId:p,taskId:r,taskDetailFetchState:x,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:E,isTaskGroupAssigneesEnabled:D})]})]})}const Ve=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
|
+
`,v=e=>`/${e}/tasks`;function ra(){return n.jsxs(ce,{children:[n.jsx(g,{path:"/new",element:n.jsx(y,{})}),n.jsx(g,{path:"/new/:taskGroupId",element:n.jsx(y,{})}),n.jsx(g,{path:"/group/:taskGroupId",element:n.jsx(Le,{})}),n.jsx(g,{path:"/quick-responses",element:n.jsx($e,{})}),n.jsx(g,{path:"/:taskId",element:n.jsx(y,{})}),n.jsx(g,{path:"*",element:n.jsx(se,{})})]})}export{ra as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./liveblocks-DH0u65Kt.js";import i from"./NotFoundScreen-DuU91hRO.js";import{T as r}from"./TransactionDetailScreen-CrO7VjQP.js";import"./sentry-Z2EfLBjp.js";import{n as a,o}from"./core-DR8tDM_G.js";import"./zeni-epic-state-TB4o69vJ.js";import"./recharts-BN9u8kqw.js";import"./index-CjFymAYP.js";import"./mui-EgTXI2De.js";import"./analytics-TpOPKTBE.js";import"./plaid-C9BN4j5u.js";import"./dnd-Tv7XXetM.js";import"./stripe-DMRn4zHo.js";import"./lottie-DXjy-4kQ.js";import"./lexical-XdnXYpvk.js";import"./pdf-C1ZWoPlC.js";import"./utils-CYYHm9mY.js";import"./useAskAiCfoHostNavButtonProps-CT7gco_a.js";import"./useFetchSuggestedQuestionsWhenReady-CQWT0XHy.js";import"./decodeURIComponentSafe-BRa5aIWn.js";import"./routePaths-BSK2K3Sa.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]="eb8d9915-3f2e-47a0-a713-5db167080b95",e._sentryDebugIdIdentifier="sentry-dbid-eb8d9915-3f2e-47a0-a713-5db167080b95")}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};
|
package/dist/assets/{TransactionDetailScreen-Cx4z6equ.js → TransactionDetailScreen-CrO7VjQP.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{j as I}from"./liveblocks-
|
|
1
|
+
import{j as I}from"./liveblocks-DH0u65Kt.js";import{a as d}from"./sentry-Z2EfLBjp.js";import{h as j,g as S,u as re,j as le,l as de,N as Re,k as Ge}from"./core-DR8tDM_G.js";import{bn as je,eO as K,cP as ue,bv as me,pt as Y,K3 as B,L4 as pe,L5 as J,Kt as he,jL as fe,L6 as ge,Ky as Z,Kz as Q,kA as Se,H2 as X,JZ as x,jF as ye,jD as Te,jP as $e,L7 as Me,L8 as We,tp as G,jK as ve,Gp as Ee,cU as qe,cV as He,L9 as Ke,JY as Ye,La as Je,tt as Ze,Lb as Qe,Lc as Xe,Ld as ea,Le as aa,Lf as ta,jO as na,Lg as oa,Lh as sa,J_ as ia,Li as ca,Lj as ra,Lk as la,Gj as da,G7 as ua,GB as ma,jQ as pa,H3 as ie,Gg as ha}from"./zeni-epic-state-TB4o69vJ.js";import{z as De,y as ee,S as _,aK as Ce,m as fa,Z as ga,aL as Sa,C as ya,p as q,k as Ta,aM as va,j as H,c as be,aN as Ea,aq as Da,W}from"./index-CjFymAYP.js";import{n as Ca,S as ba,D as Ia}from"./mui-EgTXI2De.js";import{u as ka}from"./useAskAiCfoHostNavButtonProps-CT7gco_a.js";import{c as La}from"./useFetchSuggestedQuestionsWhenReady-CQWT0XHy.js";import{d as Ie}from"./decodeURIComponentSafe-BRa5aIWn.js";import{h as ke,g as Ua,d as Aa,b as xa}from"./routePaths-BSK2K3Sa.js";import{t as _a}from"./utils-CYYHm9mY.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]="c56857a8-05b6-4574-977c-27e4907959fc",a._sentryDebugIdIdentifier="sentry-dbid-c56857a8-05b6-4574-977c-27e4907959fc")}catch{}})();const ae=()=>{const a=De.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(_.isChainOfThoughtEnabled);return d.useMemo(()=>je(a)&&s,[a,s])};function Le(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=>K(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:y}=t(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:b}=t(_.isExpenseAutomationEnabled),{configValue:h}=n(Ce.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,k=ae(),T=d.useMemo(()=>({id:a,type:Y(e)}),[a,e]),m=S(u=>B(u,T)),C=S(u=>{const N=B(u,T)?.transactionDetailLocalData.vendorUpdates?.id;return N==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[N]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Le(m?.transaction):void 0,[m?.fetchState,m?.transaction]),E=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),L=S(u=>J(u)),V=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),$=o.company?.companyInfo.firstMonthOfFY??1,M=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)},[]),[U,A]=d.useState(!1),z=V?.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:z??E}))):(s(Z()),s(Q()),P(!0),s(Se(p))))},[s,c,m?.fetchState,m?.transaction,p,i,l,g,w,F,E,z]),d.useEffect(()=>{L.newVendorState?.vendorDetailLocalData?.vendorName!=null?A(!0):A(!1)},[L.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(x("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:y,isExpenseAutomationEnabled:b,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:k,selectedTransaction:T,transactionDetail:m,vendorSaveStatus:C,tranEntity:p,defaultTrendTransactionTimePeriod:E,vendorViewDetails:L,uiState:V,firstMonthOfFY:$,uncategorizedAccounts:M,resetTrendIsFetchedStates:D,isCreateVendorDrawerOpen:U,setIsCreateVendorDrawerOpen:A}}const Va={overlayWidth:new ya(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)),y=()=>{t()},b={vendorDetailView:n??g,onSaveSuccess:()=>{l(Te()),l($e("Not-Started")),s()},onSaveVendor:e,onCancelClick:y,saveVendorDetailLocalData:h=>{l(ye({vendorId:void 0,localData:h}))}};return I.jsx(Ia,{anchor:"right",open:a,PaperProps:{style:{width:Va.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:y,children:I.jsx(Ba,{onClick:h=>h.stopPropagation(),children:I.jsx(Sa,{...b})})})},Ba=Ca(ba)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
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(),y=e??g,C=s??Ie(l??"");let h;ke(y,C)&&(h={id:y,type:Y(C)});const f=h!=null?S(T=>B(T,h)):void 0,k=()=>{const T=q(t.state?.pathnameStackToGoBack),m=T.poppedPathname??((b=2)=>{let p="../";for(let E=0;E<b;E++)p=`${p}../`;return p})(1);n(m,{state:{pathnameStackToGoBack:T.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 T=f?.transactionDetailLocalData.vendorUpdates,m={id:f?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:f?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:T?.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(G(m,f?.transaction?.amount.amount,b,!1,!1,i))}k()},onCancel:()=>{h!=null&&o(Me({transactionId:h})),o(Te()),o(We()),a(!0),k()}}},Fa=Ge(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=Ke(a,e.entity,"TransactionDetail"));const l=a.entityAutoCompleteState.autoCompleteText.common,g=Ye(a,"common"),y=K(a);return{transactionDetail:s,transactionAttachmentEndpointToDownload:`${W}/transaction_attachment`,transactionAttachmentsEndpointToFetch:y.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${W}/transaction_attachments_accounting_provider`:`${W}/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(x("common")),e.onBackClick!=null)return void e.onBackClick();const t=q(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ue(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=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(xa(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(x("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=q(e.location.state?.pathnameStackToGoBack);if(t.poppedPathname!=null){const n=_a(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=`${Ua(e.tenantEmailDomain)}`;e.navigate(i)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const i=`${Aa(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(x("common"))},onCancelAutoComplete:()=>{a(x("common"))}},onFetchRecommendationsForEntity:(t,n,o,i)=>{a(G(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(G(o,i,l,!1,!1,s)),a(ye({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,y=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(g.type??"")}/${g.id}/vendor/create`,{state:{pathnameStackToGoBack:y}})}},onSaveCustomerInLocalData:(t,n,o,i,l)=>{a(ta({transactionId:t,customerUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(G(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=Ta(),i=S(r=>K(r)),l=i.userRole.includes("charge_card_user")||i.userRole.includes("charge_card_admin"),g=i.userRole!=null&&ue(i.userRole),y=i.userRole!=null&&me(i.userRole),{isFeatureEnabled:C}=t(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:h}=t(_.isExpenseAutomationEnabled),{configValue:f}=n(be.enableUncategorizedExpenseCategory),k=f?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:T,transactionTypeEncoded:m,transactionId:b}=de(),[p,E]=d.useState(!1),L=Ie(m??""),V=ke(b,L),$=S(r=>r.transactionVendorViewState),M=ae(),{isFeatureEnabled:w}=t(_.isTransactionCommentingEnabled),P=o?.currentTenant?.companyId,F=o?.currentTenant?.companyName;let v;V&&(v={id:b,type:Y(L)});const c=v!=null?S(r=>B(r,v)):void 0,O=c?.transactionDetailLocalData.vendorUpdates?.id!=null?$.editVendorStateById[c?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",D=c?.fetchState==="Completed"?Le(c?.transaction):void 0,U=S(r=>D!=null?pe(r.customerIncomeState,r.vendorExpenseState,r.trendState,D,"month"):void 0),A=S(r=>J(r)),z=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")),[Ae,te]=d.useState(!1),[xe,ne]=d.useState(!1),[_e,Ve]=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=H(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(()=>{_e||c==null||c.transaction==null||(e(ge({id:c.transaction.id,type:c.transaction.type})),Ve(!0)),D==null&&c?.fetchState==="Completed"&&ce(c?.transaction),D!=null&&(!l||g&&y===!1)&&(Ae?xe||U==null||(ne(!0),e(X(D,"TransactionDetail",{timeframe:"month",timePeriod:z?.selectedPeriod?.timePeriod??U}))):(e(Z()),e(Q()),ce(c?.transaction),te(!0),e(Se(D))))},[c?.fetchState,c?.transaction,U,l]),d.useEffect(()=>{A.newVendorState?.vendorDetailLocalData?.vendorName!=null?E(!0):E(!1)},[A.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{e(x("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:ze,onAskAiCfoClick:Ne}=ka({mobileExploreReferrer:"Transaction Details"});return La({isDataReady:c?.fetchState==="Completed"}),V?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:T,location:s,navigate:a,selectedTransaction:v,entity:D,isCOTEnabled:M,defaultTrendTransactionTimePeriod:U,resetTrendIsFetchedStates:oe,transaction:c?.transaction,uncategorizedAccounts:N,vendorSaveStatus:O,isVendorBulkUpdateOnTransactionEnabled:C,isExpenseAutomationEnabled:h,isUncategorizedExpenseCategoryEnabled:k,isAiCfoAccessEnabled:ze,onAskAiCfoClick:Ne,isTransactionCommentingEnabled:w,companyId:P,companyName:F})]}):I.jsx(Re,{to:Ue(Be.length)})}const Ue=(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=za(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}},za=a=>qe(a)===!0?a.customer?.name??"":He(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};
|
|
5
|
+
`,wa=({closeDrawerHandler:a,overrideTransactionId:e,overrideTransactionType:s})=>{const t=re(),n=le(),o=j(),i=ae(),{transactionTypeEncoded:l,transactionId:g}=de(),y=e??g,b=s??Ie(l??"");let h;ke(y,b)&&(h={id:y,type:Y(b)});const f=h!=null?S(T=>B(T,h)):void 0,k=()=>{const T=q(t.state?.pathnameStackToGoBack),m=T.poppedPathname??((C=2)=>{let p="../";for(let E=0;E<C;E++)p=`${p}../`;return p})(1);n(m,{state:{pathnameStackToGoBack:T.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 T=f?.transactionDetailLocalData.vendorUpdates,m={id:f?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:f?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:T?.name,qboId:f?.transactionDetailLocalData.vendorUpdates?.qboId??""},C={transactionId:{id:f?.transaction?.id,type:f?.transaction?.type},transaction:f?.transaction,lineIds:f?.transaction?.lines?.map(p=>p.id)??[]};o(G(m,f?.transaction?.amount.amount,C,!1,!1,i))}k()},onCancel:()=>{h!=null&&o(Me({transactionId:h})),o(Te()),o(We()),a(!0),k()}}},Fa=Ge(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=Ke(a,e.entity,"TransactionDetail"));const l=a.entityAutoCompleteState.autoCompleteText.common,g=Ye(a,"common"),y=K(a);return{transactionDetail:s,transactionAttachmentEndpointToDownload:`${W}/transaction_attachment`,transactionAttachmentsEndpointToFetch:y.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${W}/transaction_attachments_accounting_provider`:`${W}/transaction_attachments`,attachmentUploadEndpoint:`${Da.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:i,trendReport:t,analytics:be,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(x("common")),e.onBackClick!=null)return void e.onBackClick();const t=q(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ue(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=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(xa(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(x("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=q(e.location.state?.pathnameStackToGoBack);if(t.poppedPathname!=null){const n=_a(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=`${Ua(e.tenantEmailDomain)}`;e.navigate(i)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const i=`${Aa(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(x("common"))},onCancelAutoComplete:()=>{a(x("common"))}},onFetchRecommendationsForEntity:(t,n,o,i)=>{a(G(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(G(o,i,l,!1,!1,s)),a(ye({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,y=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(g.type??"")}/${g.id}/vendor/create`,{state:{pathnameStackToGoBack:y}})}},onSaveCustomerInLocalData:(t,n,o,i,l)=>{a(ta({transactionId:t,customerUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(G(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=Ta(),i=S(r=>K(r)),l=i.userRole.includes("charge_card_user")||i.userRole.includes("charge_card_admin"),g=i.userRole!=null&&ue(i.userRole),y=i.userRole!=null&&me(i.userRole),{isFeatureEnabled:b}=t(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:h}=t(_.isExpenseAutomationEnabled),{configValue:f}=n(Ce.enableUncategorizedExpenseCategory),k=f?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:T,transactionTypeEncoded:m,transactionId:C}=de(),[p,E]=d.useState(!1),L=Ie(m??""),V=ke(C,L),$=S(r=>r.transactionVendorViewState),M=ae(),{isFeatureEnabled:w}=t(_.isTransactionCommentingEnabled),P=o?.currentTenant?.companyId,F=o?.currentTenant?.companyName;let v;V&&(v={id:C,type:Y(L)});const c=v!=null?S(r=>B(r,v)):void 0,O=c?.transactionDetailLocalData.vendorUpdates?.id!=null?$.editVendorStateById[c?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",D=c?.fetchState==="Completed"?Le(c?.transaction):void 0,U=S(r=>D!=null?pe(r.customerIncomeState,r.vendorExpenseState,r.trendState,D,"month"):void 0),A=S(r=>J(r)),z=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")),[Ae,te]=d.useState(!1),[xe,ne]=d.useState(!1),[_e,Ve]=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=H(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(()=>{_e||c==null||c.transaction==null||(e(ge({id:c.transaction.id,type:c.transaction.type})),Ve(!0)),D==null&&c?.fetchState==="Completed"&&ce(c?.transaction),D!=null&&(!l||g&&y===!1)&&(Ae?xe||U==null||(ne(!0),e(X(D,"TransactionDetail",{timeframe:"month",timePeriod:z?.selectedPeriod?.timePeriod??U}))):(e(Z()),e(Q()),ce(c?.transaction),te(!0),e(Se(D))))},[c?.fetchState,c?.transaction,U,l]),d.useEffect(()=>{A.newVendorState?.vendorDetailLocalData?.vendorName!=null?E(!0):E(!1)},[A.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{e(x("common"))},[]);const Be=[m,C].filter(r=>r!=null),{transactionId:se,onSaveVendor:we,onSaveSuccess:Fe,onCancel:Oe}=wa({closeDrawerHandler:r=>{E(!1),a(r?"../":"../..")}}),{isAiCfoAccessEnabled:ze,onAskAiCfoClick:Ne}=ka({mobileExploreReferrer:"Transaction Details"});return La({isDataReady:c?.fetchState==="Completed"}),V?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:T,location:s,navigate:a,selectedTransaction:v,entity:D,isCOTEnabled:M,defaultTrendTransactionTimePeriod:U,resetTrendIsFetchedStates:oe,transaction:c?.transaction,uncategorizedAccounts:N,vendorSaveStatus:O,isVendorBulkUpdateOnTransactionEnabled:b,isExpenseAutomationEnabled:h,isUncategorizedExpenseCategoryEnabled:k,isAiCfoAccessEnabled:ze,onAskAiCfoClick:Ne,isTransactionCommentingEnabled:w,companyId:P,companyName:F})]}):I.jsx(Re,{to:Ue(Be.length)})}const Ue=(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=za(a);be.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}},za=a=>qe(a)===!0?a.customer?.name??"":He(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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as i}from"./liveblocks-DH0u65Kt.js";import{j as U,u as R,h as q,l as Z,g as j,N as C,k as H,n as Ae,o as b}from"./core-DR8tDM_G.js";import{eO as $,iZ as T,Os as K,GV as ue,bq as ie,Ot as he,jA as Q,Kv as W,Ou as se,Ov as Se,bD as x,GS as me,Ow as ke,Ox as re,Oy as Ie,Oz as pe,OA as be,OB as ve,OC as de,I6 as Ye,bn as xe}from"./zeni-epic-state-TB4o69vJ.js";import{D as X,c as z,c6 as ee,j as w,p as te,y as fe,S as J,R as Ee,z as Pe}from"./index-CjFymAYP.js";import"./mui-EgTXI2De.js";import{a as y}from"./sentry-Z2EfLBjp.js";import{w as ae}from"./withTransactionSidePanel-DlYx7LYJ.js";import{p as ne,b as ce}from"./routePaths-BSK2K3Sa.js";import{u as Oe}from"./utils-CYYHm9mY.js";import{d as O}from"./decodeURIComponentSafe-BRa5aIWn.js";import{Z as je}from"./ZeniAccountStatementScreen-YrMsUI59.js";import"./recharts-BN9u8kqw.js";import"./analytics-TpOPKTBE.js";import"./plaid-C9BN4j5u.js";import"./dnd-Tv7XXetM.js";import"./stripe-DMRn4zHo.js";import"./lottie-DXjy-4kQ.js";import"./lexical-XdnXYpvk.js";import"./pdf-C1ZWoPlC.js";import"./useAskAiCfoHostNavButtonProps-CT7gco_a.js";import"./useFetchSuggestedQuestionsWhenReady-CQWT0XHy.js";import"./TransactionDetailScreen-CrO7VjQP.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]="2d66ba7c-7f5d-4501-89f4-ef14c3ae91fc",a._sentryDebugIdIdentifier="sentry-dbid-2d66ba7c-7f5d-4501-89f4-ef14c3ae91fc")}catch{}})();const Le=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],_=a=>Oe(a),Ce=H(function(a,e){const t=he(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,_(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:Q(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=X.getLocalizedStrings(),s=_(e.selectedAccount.tranListType),r=Me(t,n,c,s,e.bookCloseDate);z.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(se({uiState:{dateRange:r},type:_(e.selectedAccount.tranListType)})),a(ue(s,T(r),!1,s==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(T(r))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(se({uiState:{scrollYOffset:t},type:_(e.selectedAccount.tranListType)}))}}})(ee),G=ae(function({...a}){const e=U(),t=R(),n=q(),c=t.pathname.split("/").find(d=>Le.includes(d)),o=c??"uncategorized-expense",{tenantEmailDomain:s}=Z(),r=X.getLocalizedStrings(),{accountType:p,title:A,subTitle:h}=ze(o),S="month",k=j(d=>$(d)),D=k.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:g,initialTimeframeTick:v}=Be(o,D,k.bookCloseDate),[E,B]=y.useState(!1),[Y,M]=y.useState(void 0),l=y.useMemo(()=>{const d=T(v);return{tranListType:o,accountType:K(p),title:A,subTitle:h,timeframe:S,period:d}},[o,S,p,g]);y.useEffect(()=>{if(!E&&l!=null){B(!0),z.trackTransactionList(void 0,void 0,void 0,l.title);const d=_(l.tranListType);n(ue(d,l.period,!0,d==="missingReceipts"?r.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[E,l,n]);let P=l;return l!=null&&Y!=null&&(P={...l,period:Y}),c==null||P==null?i.jsx(C,{to:"../"}):i.jsx(Ce,{firstMonthOfFY:D,tenantEmailDomain:s,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:g,navigate:e,selectedAccount:P,referrerType:o,bookCloseDate:k.bookCloseDate,onSelectedTimePeriodChange:d=>M(d),...a})}),ze=a=>{let e="",t="";const n=X.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;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.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},Be=(a,e,t)=>{const n=ie();let c=ie().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ne(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Me=(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},Fe=H(function(a,e){const t=ke(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:Q(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Te();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),z.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(me(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ee),Ge=ae(function({referrerType:a,...e}){const t=U(),n=R(),c=q(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,classIdEncoded:p,timeframe:A,startDate:h,endDate:S,titleEncoded:k}=Z(),D=O(s??""),g=O(r??""),v=O(p??""),E=O(k??""),B=j(f=>Se(f.transactionListState,g,D,v)),[Y,M]=y.useState(!1),[l,P]=y.useState(void 0),d=j(f=>$(f)),V=d.company?.companyInfo.firstMonthOfFY??1;let u;const m=_e(D,g,v,A,h,S,E);if(m){const f={startDate:x(h,"YYYY-MM-DD"),endDate:x(S,"YYYY-MM-DD")},N=we(B?.dateRange,f);u={accountId:g,accountType:K(D),classId:v,title:E,timeframe:A,period:N}}y.useEffect(()=>{Y||u==null||(M(!0),z.trackTransactionList(u.accountId,void 0,a,u.title),c(me(u.accountId,u.accountType,u.classId,u.period)))},[Y,u,c]);let L=u;u!=null&&l!=null&&(L={...u,period:l});const F=[s,r,p,A,h,S,k].filter(f=>f!=null);return m&&L!=null?i.jsx(Fe,{firstMonthOfFY:V,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:f=>P(f),...e}):i.jsx(C,{to:Te(F.length)})}),Te=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},_e=(a,e,t,n,c,o,s)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&x(c,"YYYY-MM-DD").isValid()&&x(o,"YYYY-MM-DD").isValid()&&s!=null,we=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),Re=H(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ve(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:Q(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??De();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),z.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=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,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=Ne(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ee),le=ae(function({referrerType:a,...e}){const t=U(),n=R(),c=q(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,timeframe:p,startDate:A,endDate:h,titleEncoded:S,excludeSubAccounts:k}=Z(),D=O(s??""),g=O(r??""),v=O(S??""),E=!(k!=null&&k==="exclude_subaccounts"),B=j(I=>Ie(I.transactionListState,g,D)),[Y,M]=y.useState(!1),[l,P]=y.useState(void 0),d=j(I=>$(I)),V=d.company?.featuresActivationInfo.connectedAccountProvider==="unit",u=d.company?.companyInfo.firstMonthOfFY??1;let m;const L=$e(D,g,p,A,h,v);if(L){const I={startDate:x(A,"YYYY-MM-DD"),endDate:x(h,"YYYY-MM-DD")},ye=Ve(B?.dateRange,I);m={accountId:g,accountType:K(D),title:v,timeframe:p,period:ye}}let F=m;m!=null&&l!=null&&(F={...m,period:l});const{useFeatureGate:f}=fe(),{isFeatureEnabled:N}=f(J.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Ee();y.useEffect(()=>{!Y&&m!=null&&oe&&(M(!0),z.trackTransactionList(m.accountId,void 0,a,m.title),c(pe(m.accountId,m.accountType,m.period,void 0,!1,E)))},[Y,m,c,oe]);const ge=[s,r,p,A,h,S].filter(I=>I!=null);return L&&F!=null?i.jsx(Re,{firstMonthOfFY:u,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:V,isTransactionCommentingEnabled:N,selectedAccount:F,referrerType:a,onSelectedTimePeriodChange:I=>P(I),...e}):i.jsx(C,{to:De(ge.length)})}),De=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},$e=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&x(n,"YYYY-MM-DD").isValid()&&x(c,"YYYY-MM-DD").isValid()&&o!=null,Ve=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),Ne=a=>`/${a}/transactions/${Ye}/statements`;function pt(){const a=R().state?.referrer,e=Pe.getSignedInUser(),t=xe(e),{useFeatureGate:n}=fe(),{isFeatureEnabled:c}=n(J.isExpenseAutomationEnabled),o=j(p=>p.expenseAutomationViewState.selectedPeriodByTenantId)[j(p=>$(p)).tenantId],{isFeatureEnabled:s}=n(J.isExpenseAutomationEnabledV2),r=s||c&&t;return i.jsxs(Ae,{children:[i.jsx(b,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:i.jsx(le,{referrerType:a})}),i.jsx(b,{path:"/zeni-clearing-account/statements",element:i.jsx(je,{})}),i.jsx(b,{path:"/*",element:i.jsx(le,{referrerType:a})}),i.jsx(b,{path:"/uncategorized-income/*",element:i.jsx(G,{})}),i.jsx(b,{path:"/uncategorized-expense/*",element:r?i.jsx(C,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(b,{path:"/miscategorized-income/*",element:i.jsx(G,{})}),i.jsx(b,{path:"/miscategorized-expense/*",element:r?i.jsx(C,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(b,{path:"/missing-receipts/*",element:r?i.jsx(C,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(b,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:i.jsx(Ge,{referrerType:a})})]})}export{pt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-
|
|
1
|
+
import{j as e}from"./liveblocks-DH0u65Kt.js";import{j as B,u as L,h as P,l as N,g as f,N as U,k as M,n as xe,o as C}from"./core-DR8tDM_G.js";import{cl as V,eO as D,Nd as R,Dn as ae,fc as H,D5 as ne,Nf as we,Dq as Te,Nb as Ie,Nc as se,Nu as ke,Bx as Ce,sm as je,Nh as be,DB as Ae,Ne as re,cO as Z,ws as oe,eS as Ee,eU as ve,Op as De,Oq as Fe,D6 as Ue,Or as Be,D7 as Le,Dg as Pe,bv as Re,bE as Oe,cw as Ne,bF as Me,ck as Ve,fb as _e,bs as ze,IS as $e,cj as Ge}from"./zeni-epic-state-TB4o69vJ.js";import{k as _,an as qe,z as A,s as z,c as j,b$ as He,c0 as Ze,c1 as q,Z as W,m as We,R as Je,y as ie,S as v,C as Ke,B as Qe,c2 as Xe,aq as J,j as Ye,c3 as et,p as K,c4 as tt,T as X,c5 as at,a6 as nt}from"./index-CjFymAYP.js";import{D as st,n as O,S as rt}from"./mui-EgTXI2De.js";import ot from"./NotFoundScreen-DuU91hRO.js";import{S as Y}from"./SetupPagesScreen-CMNbCjoJ.js";import{a as d}from"./sentry-Z2EfLBjp.js";import{u as it}from"./useAskAiCfoHostNavButtonProps-CT7gco_a.js";import{c as ct}from"./useFetchSuggestedQuestionsWhenReady-CQWT0XHy.js";import{M as ce}from"./MobileAppDrawer-CKb5yG63.js";import{F as lt}from"./FeaturePreviewScreen-BCjtGP_L.js";import{a as ee}from"./analyticsHelper-C6rQwSxW.js";import"./recharts-BN9u8kqw.js";import"./analytics-TpOPKTBE.js";import"./plaid-C9BN4j5u.js";import"./dnd-Tv7XXetM.js";import"./stripe-DMRn4zHo.js";import"./lottie-DXjy-4kQ.js";import"./lexical-XdnXYpvk.js";import"./pdf-C1ZWoPlC.js";import"./utils-CYYHm9mY.js";import"./routePaths-BSK2K3Sa.js";import"./BusinessVerificationPageScreen--aJrL6sY.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="5e798e4c-6152-4951-a634-8cbed592e91f",t._sentryDebugIdIdentifier="sentry-dbid-5e798e4c-6152-4951-a634-8cbed592e91f")}catch{}})();const ut=M(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(t,n),analytics:j}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Te(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}})(He);function dt(){const t=B(),a=L(),n=P(),{tenantEmailDomain:o}=N(),p=_(),r=f(k=>k.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=qe(r),s=V(p?.loggedInUserRoleMap),[c,i]=d.useState(!1),[y,I]=d.useState(!1),[u,l]=d.useState(!1),g=f(k=>D(k)),S=A.getSignedInUserTenant(o)?.companyId??g.companyId,w=A.getSignedInUser(),h=f(k=>R(k,S)),T=f(k=>k.treasurySetupViewState.fetchState),x=f(k=>k.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(k=>k.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(w==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{c||T!=="Not-Started"||S==null||(i(!0),n(ae(S,!0,!1)))},[c,T,S,n]),d.useEffect(()=>{u||F!=="Not-Started"||S==null||(l(!0),n(H()))},[u,F,S,n]),d.useEffect(()=>{y||x!=="Not-Started"||S==null||(I(!0),n(ne()))},[y,x,S,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(U,{to:"../promo"});const E=g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||T!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(ut,{navigate:t,location:a,companyId:S,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:h,analytics:j})]})}const pt=M(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{q(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{q(a.analytics,"confirm",r,m,"Transfer"),t(Ae())},onSaveChangesToLocalStore:s=>{t(be(s))},onFetchLinkTokenClick:s=>{t(je("treasury_setup",s))},onEstablishConnectionClick:s=>{t(Ce(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Ze),mt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=N(),o=P(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[c,i]=d.useState(!1),[y,I]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),l=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),g=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),S=f(x=>D(x)),w=A.getSignedInUserTenant(n)?.companyId??S.companyId,h=f(x=>Ie(x)),T=f(x=>R(x,w));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||w==null||(s(!0),o(ae(w,!0,!1)))},[m,u,w,o]),d.useEffect(()=>{c||l!=="Not-Started"||w==null||(i(!0),o(H()))},[c,l,w,o]),d.useEffect(()=>{y||g!=="Not-Started"||w==null||(I(!0),o(ne()))},[y,g,w,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{analytics:j,navigate:a,transferDetails:h,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:S,treasurySetupView:T,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{q(j,"review",h.treasuryTransferMoneyLocalData,T.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},ft=O.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-
|
|
1
|
+
import{j as l}from"./liveblocks-DH0u65Kt.js";import{a as g}from"./sentry-Z2EfLBjp.js";import{j as J,u as z,l as U,g as S,k as M,h as Y,n as at,o as B,N as G}from"./core-DR8tDM_G.js";import{eO as L,JV as Ee,JW as Ke,fP as X,cr as be,cs as Ie,v1 as St,JX as nt,v5 as Yt,HZ as ee,jA as te,u$ as zt,uV as qt,JY as Re,uN as Ht,uM as Wt,uG as Zt,uS as Qt,v6 as Xt,JZ as he,J_ as Ne,uO as ea,J$ as pe,eZ as ft,vl as gt,ve as vt,K0 as xt,o1 as Tt,v9 as yt,v7 as Dt,K1 as Ct,vs as Et,vp as bt,va as It,vr as Je,Gp as kt,K2 as ta,K3 as aa,cu as na,K4 as sa,K5 as oa,K6 as me,K7 as ie,K8 as ke,H_ as Me,vH as ye,HY as De,vu as wt,v2 as Ge,K9 as la,H$ as H,Ka as $e,uY as ia,Kb as ca,Kc as da,Kd as Ye,Ke as ze,Kf as qe,Kg as He,vB as we,Kh as At,vi as jt,Ki as ra,Kj as ua,Kk as ha,Kl as pa,Km as ma,Kn as Sa,Ko as fa,Kp as ga,sy as va,sz as xa,H3 as je,Kq as Ta,Kr as ya,iZ as Fe,bq as Da,Ks as Ca,Kt as Ea,ky as ba,kH as Ia,H2 as Pe,bD as st,Ku as Ft,GK as Pt,Kv as ka,Kw as wa,Kx as Aa,kJ as ja,Ky as ot,Kz as lt,KA as it,KB as ct,KC as Fa,kF as Pa,KD as _a,kI as Va,KE as La,KF as _t,Hp as Vt,jY as Ba,KG as Oa,KH as _e,KI as Lt,Hn as Bt,xU as Ua,KJ as Ka,KK as Ra,kg as Ot,KL as Na,KM as Ja,HB as Ma,q7 as Ga,KN as Ut,KO as dt,Hy as Ve,KP as rt,KQ as $a,HD as Ya,KR as za,KS as qa,KT as Ha,KU as Wa,KV as Za,qa as Qa,KW as Xa,I0 as en,KX as tn,Hg as Le,gI as an,KY as nn,KZ as sn,gG as on,K_ as ln,K$ as cn,xY as dn,L0 as rn,L1 as un,L2 as hn,L3 as pn,k0 as mn,bn as Sn,eU as fn,eS as gn}from"./zeni-epic-state-TB4o69vJ.js";import{z as K,an as Be,B as Kt,s as Z,c as j,W as Q,at as vn,j as N,D as Ce,n as ce,au as We,av as xn,aw as Tn,p as Ze,ax as yn,m as Dn,Z as de,C as Qe,y as ae,S as $,ay as Cn,f as Xe,az as En,aA as Rt,R as bn,aB as In,k as kn,aC as wn,aq as Nt,aD as An,o as W,w as jn,E as Jt,G as Fn,aE as Pn,aF as _n,e as et,aG as Vn,aH as Ln,i as Bn,aI as On,aJ as Un}from"./index-CjFymAYP.js";import{n as R,D as Kn,S as Mt}from"./mui-EgTXI2De.js";import{t as Rn,A as Nn}from"./AddressScreen-DuqDDwbX.js";import le from"./NotFoundScreen-DuU91hRO.js";import{F as Jn}from"./FeaturePreviewScreen-BCjtGP_L.js";import{b as q,v as tt,c as Mn}from"./routePaths-BSK2K3Sa.js";import{p as Gt}from"./pathToGoBack-Dzbxi3-3.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-CT7gco_a.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-CQWT0XHy.js";import{M as ge}from"./MobileAppDrawer-CKb5yG63.js";import{D as Gn}from"./DrawerScreen-DwJwVhuI.js";import{g as $n,m as Yn}from"./accountMappingHelper-CP3zTfM5.js";import"./recharts-BN9u8kqw.js";import"./analytics-TpOPKTBE.js";import"./plaid-C9BN4j5u.js";import"./dnd-Tv7XXetM.js";import"./stripe-DMRn4zHo.js";import"./lottie-DXjy-4kQ.js";import"./lexical-XdnXYpvk.js";import"./pdf-C1ZWoPlC.js";import"./utils-CYYHm9mY.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]="926d5543-087d-4c3d-ac7f-5cb53be341c4",e._sentryDebugIdIdentifier="sentry-dbid-926d5543-087d-4c3d-ac7f-5cb53be341c4")}catch{}})();const zn=Ce.getLocalizedStrings(),qn=M(function(e,a){const s=Ke(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(Yt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=N(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(vn),Hn=({setShouldNavigateBack:e})=>{const a=J(),s=z(),{scheduleDetailId:t,tenantEmailDomain:n}=U(),{scheduleType:o}=U();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>L(f)),r=Ee(o)??"accrued_expenses",h=K.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Ke(f,r)),m=i.selectedJELinkRowIndex,d=S(f=>X(f,c.companyId)),u=Be(i.updateStatus.fetchState);g.useEffect(()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[u,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const p=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Kt,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(Z,{analytics:j,onLoad:()=>{Wn(i,r,d)}}):null,l.jsx(qn,{signedInUser:h,attachmentEndPoint:`${Q}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:j,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},$t=e=>{const a=zn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Wn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some(m=>m.isRecommendedTransaction===!0),h=be(s.controllers),i=Ie(s.controllerUserIds);t!=null&&j.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...$t(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Zn=R.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{j as o}from"./liveblocks-DH0u65Kt.js";import{a as f}from"./sentry-Z2EfLBjp.js";import{q as u,h,g as y,N as I}from"./core-DR8tDM_G.js";import{J9 as b,eP as w,zd as x}from"./zeni-epic-state-TB4o69vJ.js";import{z as l,B as j,E as S,G as E}from"./index-CjFymAYP.js";import{n as g}from"./mui-EgTXI2De.js";import"./recharts-BN9u8kqw.js";import"./analytics-TpOPKTBE.js";import"./plaid-C9BN4j5u.js";import"./dnd-Tv7XXetM.js";import"./stripe-DMRn4zHo.js";import"./lottie-DXjy-4kQ.js";import"./lexical-XdnXYpvk.js";import"./pdf-C1ZWoPlC.js";import"./utils-CYYHm9mY.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]="f675e146-81d4-455e-8d8b-093555301810",e._sentryDebugIdIdentifier="sentry-dbid-f675e146-81d4-455e-8d8b-093555301810")}catch{}})();const W=()=>{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(D,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},D=g.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100vh;
|
|
5
|
+
flex-direction: row;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: ${e=>e.theme.colors.grey5};
|
|
9
|
+
`,_=g(E.LargeRegular)`
|
|
10
|
+
display: flex;
|
|
11
|
+
color: ${S.important};
|
|
12
|
+
`;export{W as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-
|
|
1
|
+
import{j as n}from"./liveblocks-DH0u65Kt.js";import{j as Y,u as K,h as z,l as G,g as w,k as q,N as ne,n as Ve,o as k}from"./core-DR8tDM_G.js";import{eO as M,O4 as Ce,O5 as $e,ck as te,cl as Ze,fb as Ge,wq as ke,AD as He,wk as Tn,O6 as On,O7 as Bn,wn as Fn,wu as fe,wh as Rn,we as Ln,MS as le,O8 as Un,DX as zn,JY as Mn,DZ as _n,kh as Oe,O9 as Vn,pO as Ne,pC as We,k8 as Ye,kb as Be,JZ as Fe,J_ as $n,Oa as Zn,ka as Gn,kx as Hn,j$ as Nn,iy as Wn,ix as Yn,Ob as Kn,Oc as ye,DE as qn,Od as Jn,Oe as Qn,ML as we,Of as Re,Og as Xn,E8 as et,Nu as nt,Bx as Ke,sm as qe,Oh as tt,E5 as at,Oi as Je,cM as Ae,Ec as Qe,fc as ot,eS as Xe,eU as De,Ea as st,Br as rt,E2 as it,Oj as en,Ok as nn,DG as tn,DQ as Le,Ol as ct,DK as lt,Om as dt,Ni as ut,Ed as pt,bv as mt,bE as ht,cw as gt,bF as ft,bs as yt,IS as xt}from"./zeni-epic-state-TB4o69vJ.js";import{k as ae,y as $,z as D,S as O,m as _,B as de,bP as Ct,W as Ie,Z as V,C as J,p as an,an as kt,ac as Ue,c as R,bQ as wt,aq as Se,bR as At,s as ue,bS as Dt,e as be,aK as W,bT as It,R as St,a9 as bt,bU as ze,bV as Et,j as ee,bW as vt,bX as jt,bY as Pt,bZ as Tt,a6 as Ot,o as Bt}from"./index-CjFymAYP.js";import{n as L,D as Q,S as X}from"./mui-EgTXI2De.js";import ce from"./NotFoundScreen-DuU91hRO.js";import{S as Me}from"./SetupPagesScreen-CMNbCjoJ.js";import{F as on}from"./FeaturePreviewScreen-BCjtGP_L.js";import{a as u}from"./sentry-Z2EfLBjp.js";import{M as pe}from"./MobileAppDrawer-CKb5yG63.js";import{A as Ft,D as Rt,V as Lt}from"./DomesticWireDetailScreen-DOvHZ_oC.js";import{A as Ut}from"./AddressScreen-DuqDDwbX.js";import{u as sn}from"./useAskAiCfoHostNavButtonProps-CT7gco_a.js";import{c as rn}from"./useFetchSuggestedQuestionsWhenReady-CQWT0XHy.js";import{Z as zt}from"./ZeniAccountStatementScreen-YrMsUI59.js";import"./recharts-BN9u8kqw.js";import"./analytics-TpOPKTBE.js";import"./plaid-C9BN4j5u.js";import"./dnd-Tv7XXetM.js";import"./stripe-DMRn4zHo.js";import"./lottie-DXjy-4kQ.js";import"./lexical-XdnXYpvk.js";import"./pdf-C1ZWoPlC.js";import"./utils-CYYHm9mY.js";import"./analyticsHelper-C6rQwSxW.js";import"./routePaths-BSK2K3Sa.js";import"./BusinessVerificationPageScreen--aJrL6sY.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]="4c7b9966-18e9-40a1-b294-d58aa3e13215",e._sentryDebugIdIdentifier="sentry-dbid-4c7b9966-18e9-40a1-b294-d58aa3e13215")}catch{}})();const Mt=L.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-
|
|
1
|
+
import{j as i}from"./liveblocks-DH0u65Kt.js";import{a as u}from"./sentry-Z2EfLBjp.js";import{j as x,h as j,u as B,l as $,g as p}from"./core-DR8tDM_G.js";import{I6 as s,I5 as v,On as C,eO as T,Oo as z}from"./zeni-epic-state-TB4o69vJ.js";import{Z as D,aq as g,m as E,z as L,B as P,b_ as _,p as N}from"./index-CjFymAYP.js";import{n as O}from"./mui-EgTXI2De.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]="f74eef44-b250-4fa0-82d3-2a622eb0edc8",e._sentryDebugIdIdentifier="sentry-dbid-f74eef44-b250-4fa0-82d3-2a622eb0edc8")}catch{}})();const U=O.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./sentry-
|
|
1
|
+
import"./sentry-Z2EfLBjp.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]="aeade864-8999-4b65-a5fe-284d93c9cae4",e._sentryDebugIdIdentifier="sentry-dbid-aeade864-8999-4b65-a5fe-284d93c9cae4")}catch{}})();function d(e,t){if(t!=null)return e.find(n=>n.qboId===t)}function i(e,t){return e.filter(n=>n.qboId!=null&&t.includes(n.qboId))}function a(e,t){return t.map(n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""}))}export{d as a,i as g,a as m};
|