@zeniai/web-app-ui 5.3.29-dev → 5.3.29-next
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AccountMappingScreen-DLqsZAiC.js +9 -0
- package/dist/assets/AddressRoutes-D_wB5jsM.js +1 -0
- package/dist/assets/AddressScreen-JumAvrZ3.js +9 -0
- package/dist/assets/{AiCfoScreen-CL9wzpIP.js → AiCfoScreen-CC9jm17A.js} +1 -1
- package/dist/assets/{AppDrawer-CBFgx_xO.js → AppDrawer-D7aI_YKO.js} +3 -3
- package/dist/assets/{BillPayApprovalRoutes-DmmLz8dY.js → BillPayApprovalRoutes-yBVcG2oD.js} +1 -1
- package/dist/assets/{BillPayRoutes-C_uGbX5e.js → BillPayRoutes-rWwWriZX.js} +18 -18
- package/dist/assets/{BusinessVerificationPageScreen-CBOgxA4z.js → BusinessVerificationPageScreen-Beiv2wWt.js} +2 -2
- package/dist/assets/{CardsAiCfoScreen-B8SHn0bs.js → CardsAiCfoScreen-DxtgAXt5.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-Dkpm3e49.js → ChargeCardRoutes-CrAMoNqm.js} +7 -7
- package/dist/assets/CompanyPassportScreen-Dh6ISdGa.js +1 -0
- package/dist/assets/ConnectionAuthScreen-CxF4cvt_.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-Dyga76yH.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-BRdsXEtS.js → CustomerOnboardingRoutes-BNr6zX1e.js} +3 -3
- package/dist/assets/{DashboardRoutes-CLhCpuhB.js → DashboardRoutes-Ct18dV3E.js} +3 -3
- package/dist/assets/{DefaultTenantHome-Btkw8Ap3.js → DefaultTenantHome-B9KqwUsn.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-CYu196qX.js +18 -0
- package/dist/assets/{DrawerScreen-Cq2VoXGn.js → DrawerScreen-Dp0jZCG0.js} +1 -1
- package/dist/assets/EntityDetailRoutes-DIC7oWh0.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-Dsuu9sFZ.js → ExpenseAutomationRoutes-CxRO__bU.js} +4 -4
- package/dist/assets/FeaturePreviewScreen-2119k0r-.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen--fF6ku_7.js +1 -0
- package/dist/assets/{InboxNotificationsProvider-Y2y35nP6.js → InboxNotificationsProvider-CP3zxjLQ.js} +1 -1
- package/dist/assets/{InvoicingRoutes-MDlqxyil.js → InvoicingRoutes-BZcNn-tl.js} +2 -2
- package/dist/assets/{MagicLinkRoutes-CP3vqiHe.js → MagicLinkRoutes-BpaEqGXh.js} +7 -7
- package/dist/assets/MagicLinkSignInScreen-B-_ZbplW.js +12 -0
- package/dist/assets/{MobileAppDrawer-DLiH8K3Y.js → MobileAppDrawer-gXWJpapq.js} +1 -1
- package/dist/assets/NotFoundScreen-CGJyt_LJ.js +1 -0
- package/dist/assets/NotificationRoutes-CBkN1Ya_.js +1 -0
- package/dist/assets/OAuthConsentScreen-CtTUNPZo.js +1 -0
- package/dist/assets/{PandLWithForecastRoutes-aW5WT5CH.js → PandLWithForecastRoutes-BeN00ZXg.js} +1 -1
- package/dist/assets/{PaymentLinkScreen-C2OZJlFd.js → PaymentLinkScreen-CfVHnFpP.js} +8 -8
- package/dist/assets/PeopleRoutes-B8szeAgH.js +22 -0
- package/dist/assets/PerformanceRoutes-CE-jrSuh.js +1 -0
- package/dist/assets/{Preview-BeiBQxK-.js → Preview-D6qXIKMp.js} +1 -1
- package/dist/assets/QBOConnectionScreen-Bo0_X0MI.js +100 -0
- package/dist/assets/ReimbursementApprovalRoutes-BoD0vQUM.js +1 -0
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-Dv9XBlq2.js +1 -0
- package/dist/assets/{ReimbursementRoutes-DmbcBT5E.js → ReimbursementRoutes-DEhXwY_S.js} +6 -6
- package/dist/assets/{ReportsRoutes-BQmYqXvS.js → ReportsRoutes-eETmTdJv.js} +1 -1
- package/dist/assets/RewardsRoutes-BzPF7ESQ.js +1 -0
- package/dist/assets/ScreenRoutes-Bx6TZEsJ.js +2 -0
- package/dist/assets/SettingsRoutes-HYTJzq8P.js +49 -0
- package/dist/assets/{SetupPagesScreen-28K-Ej_i.js → SetupPagesScreen-DLQcLLtM.js} +5 -5
- package/dist/assets/SignInScreen-B0jkyn82.js +1 -0
- package/dist/assets/SignOutScreen-BtTjPRmW.js +9 -0
- package/dist/assets/TaskListScreen-Bi0mVkIS.js +9 -0
- package/dist/assets/TaskRoutes-CjSDqIWx.js +9 -0
- package/dist/assets/TransactionDetailRoutes-S39SXRtu.js +1 -0
- package/dist/assets/{TransactionDetailScreen-B1_fDc_7.js → TransactionDetailScreen-Bptg87Ad.js} +2 -2
- package/dist/assets/TransactionListRoutes-smEeg3HS.js +1 -0
- package/dist/assets/{TreasuryRoutes-Dnwm_7bw.js → TreasuryRoutes-CHPkeS5P.js} +5 -5
- package/dist/assets/{VendorsRoutes-BCbNpFFW.js → VendorsRoutes-Bhty5IJn.js} +20 -20
- package/dist/assets/WiseConfirmationScreen-B5ZRnOvD.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-CQnM-9GW.js → ZeniAccountRoutes-B9xhn1Bk.js} +9 -9
- package/dist/assets/ZeniAccountStatementScreen-LrjmuO5T.js +9 -0
- package/dist/assets/{accountMappingHelper-CJgy_TdU.js → accountMappingHelper-hg3790bD.js} +1 -1
- package/dist/assets/{analytics-drf9tsEq.js → analytics-nbGnR8yw.js} +1 -1
- package/dist/assets/{analyticsHelper-CDqT9wg1.js → analyticsHelper-CTQJAyGI.js} +1 -1
- package/dist/assets/{core-OUhaP0nM.js → core-BGTqSI0U.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-CoJI0rbl.js → decodeURIComponentSafe-Ddo_DmUd.js} +1 -1
- package/dist/assets/{dnd-XtKnRPbJ.js → dnd-SEGszg0m.js} +1 -1
- package/dist/assets/{empty-DC6SKf2K.js → empty-CAvd4Dif.js} +1 -1
- package/dist/assets/{empty-CJaMNnL0.js → empty-u_z2Liw4.js} +1 -1
- package/dist/assets/{emptyVideoElement-b-LZRj6t.js → emptyVideoElement-Du1VNFWi.js} +1 -1
- package/dist/assets/epic-Cg0rGj9v.js +2 -0
- package/dist/assets/{expenseAutomationHelper-DlI9q6Vn.js → expenseAutomationHelper-D7bKnox3.js} +1 -1
- package/dist/assets/{getLocaleForTenant-aTGgtilb.js → getLocaleForTenant-C9hGHLTR.js} +1 -1
- package/dist/assets/{index-BjnriIg-.js → index-Bkd2suv7.js} +27688 -28602
- package/dist/assets/{index-9ur6Fy2d.js → index-C7BClp-h.js} +1 -1
- package/dist/assets/{index-DkPv0SRW.js → index-C_JFSB_S.js} +1 -1
- package/dist/assets/{index-DWbw7UWG.js → index-Clep-E8B.js} +1 -1
- package/dist/assets/{index-B1OJLTM8.js → index-DG8fRlZf.js} +2 -2
- package/dist/assets/{index-Ic-s4E7h.js → index-Dk7GKkvt.js} +1 -1
- package/dist/assets/{index-BEdQXZ7l.js → index-DpEDhaMK.js} +1 -1
- package/dist/assets/{index-DmRkUvqd.js → index-DqOzvxxV.js} +1 -1
- package/dist/assets/{lexical-cGeYDtsl.js → lexical-DtJP5Abm.js} +1 -1
- package/dist/assets/{liveblocks-QA8yK6T_.js → liveblocks-BohEqL-M.js} +1 -1
- package/dist/assets/{lottie-DaBLQBPb.js → lottie-3kdnx6OO.js} +1 -1
- package/dist/assets/{mui-BtZD__8k.js → mui-Bm9pLHsq.js} +1 -1
- package/dist/assets/{pathToGoBack-C7Q0VFSf.js → pathToGoBack-CDhhO2GE.js} +1 -1
- package/dist/assets/{pdf-BMGNA2GO.js → pdf-CSx-lDs_.js} +3 -3
- package/dist/assets/{pdf-lib-BukwiyrA.js → pdf-lib-DDkyZRb6.js} +1 -1
- package/dist/assets/{plaid-Bbika4Gn.js → plaid-DdB4B-ZM.js} +1 -1
- package/dist/assets/{pusher-9ZM5Kdsl.js → pusher-B3Hk1ZP3.js} +1 -1
- package/dist/assets/{react-B7VQZShg.js → react-6J5OT8WE.js} +1 -1
- package/dist/assets/{react-_5p9PyE0.js → react-BTJ6vybO.js} +1 -1
- package/dist/assets/{react-SMF3sABx.js → react-DM5Ga2d6.js} +1 -1
- package/dist/assets/{react-DyjJC6aa.js → react-HajlVskC.js} +1 -1
- package/dist/assets/{react-BbnUu-8y.js → react-evJyB8hR.js} +1 -1
- package/dist/assets/{react-Cvhq9zob.js → react-t6NipQhp.js} +1 -1
- package/dist/assets/{recharts-CnI5kYGO.js → recharts-DZSO8gqO.js} +1 -1
- package/dist/assets/{routePaths-Cz-sxWeK.js → routePaths-DkfFbFdK.js} +1 -1
- package/dist/assets/{sentry-DX8X0N2R.js → sentry-DZasNYxC.js} +1 -1
- package/dist/assets/url-CIyGuAwg.js +6 -0
- package/dist/assets/{url-DEE9M609.js → url-ir6tVPow.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CCxuDvI3.js → useAiCfoDashboardSuggestedQuestionsChips-BKnqg0kj.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-DNmjed6f.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-u2vXo3UU.js → useChargeCardPusherEvents-C5ybq--A.js} +1 -1
- package/dist/assets/{useDeviceId-Bunv1-ta.js → useDeviceId-C5wTdvqD.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-BSYV58Ci.js +1 -0
- package/dist/assets/{useInitialThreadRequest-BR_6LodZ.js → useInitialThreadRequest-C-FNgRyS.js} +1 -1
- package/dist/assets/useTaskManagerAccess-DoD7gL98.js +1 -0
- package/dist/assets/utils-CgRt4NQh.js +36 -0
- package/dist/assets/{withTransactionSidePanel-DRyJqOb1.js → withTransactionSidePanel-pLmAxMeA.js} +2 -2
- package/dist/assets/{zeni-epic-state-DzFY1eNZ.js → zeni-epic-state-BD9w4cbh.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/AccountMappingScreen-CDcb3dR7.js +0 -9
- package/dist/assets/AddressRoutes-loJi-MTb.js +0 -1
- package/dist/assets/AddressScreen-KciR_hsZ.js +0 -9
- package/dist/assets/CompanyPassportScreen-C-SlqPHT.js +0 -1
- package/dist/assets/ConnectionAuthScreen-IHk0kFrL.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-9EVdL7z6.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-Dzk5sa_d.js +0 -18
- package/dist/assets/EntityDetailRoutes-CTolGUo8.js +0 -1
- package/dist/assets/FeaturePreviewScreen-h7p9MMUf.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-BTzQvozK.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-BMClM24d.js +0 -12
- package/dist/assets/NotFoundScreen-CBOeKuhG.js +0 -1
- package/dist/assets/NotificationRoutes-Dhiufflf.js +0 -1
- package/dist/assets/OAuthConsentScreen-Ca-lx4xM.js +0 -1
- package/dist/assets/PeopleRoutes-B2NEnvyj.js +0 -22
- package/dist/assets/PerformanceRoutes-DphKMt6B.js +0 -1
- package/dist/assets/QBOConnectionScreen-O0kY1C3B.js +0 -100
- package/dist/assets/ReimbursementApprovalRoutes-Dzvw2fZr.js +0 -1
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-BaxtZSL2.js +0 -1
- package/dist/assets/RewardsRoutes-DvgOSJy0.js +0 -1
- package/dist/assets/ScreenRoutes-D76vOiPC.js +0 -2
- package/dist/assets/SettingsRoutes-DNrMSB0r.js +0 -49
- package/dist/assets/SignInScreen-JKxT9Chm.js +0 -1
- package/dist/assets/SignOutScreen-DkhnXWYi.js +0 -9
- package/dist/assets/TaskListScreen-D13comxS.js +0 -9
- package/dist/assets/TaskRoutes-BOftPZQw.js +0 -9
- package/dist/assets/TransactionDetailRoutes-Br_-ul_i.js +0 -1
- package/dist/assets/TransactionListRoutes-DQwcR30R.js +0 -1
- package/dist/assets/WiseConfirmationScreen-mPs6_3sL.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-CTIued6H.js +0 -9
- package/dist/assets/epic-Cg0CX13O.js +0 -2
- package/dist/assets/url-DKOm_9Da.js +0 -6
- package/dist/assets/useAskAiCfoHostNavButtonProps-B4mPUD91.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-DRqxGzlR.js +0 -1
- package/dist/assets/useTaskManagerAccess-3mEVnK_N.js +0 -1
- package/dist/assets/utils-CHDSUF0P.js +0 -36
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-QA8yK6T_.js";import W from"./NotFoundScreen-CBOeKuhG.js";import{a as p}from"./sentry-DX8X0N2R.js";import{h as C,g as D,u as V,j as u,N as k,l as U,n as Y,o as g}from"./core-OUhaP0nM.js";import{fB as E,Yh as h,Yy as R,MY as N,MU as B,MX as f,MN as L,YX as M,MR as X,M_ as z}from"./zeni-epic-state-DzFY1eNZ.js";import{z as T,w as $,c7 as K,l as _,bQ as Q,c8 as q}from"./index-BjnriIg-.js";import"./mui-BtZD__8k.js";import{u as F,R as x}from"./ReimbursementApprovalRuleDetailScreen-BaxtZSL2.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]="b9167535-79e7-453b-8234-6e937df608da",e._sentryDebugIdIdentifier="sentry-dbid-b9167535-79e7-453b-8234-6e937df608da")}catch{}})();const A="reimbursement-approval-rule-update",G=U((function(e){return{approvalView:h(e),remiSetupApproverViewUpdateData:R(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(A)&&e(M(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(L(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))($(K)),H=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,w]=p.useState(!1),S=u((o=>o.remiSetupApproverViewState.fetchState)),c=u((o=>E(o))),d=u((o=>h(o))),b=u((o=>R(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{b?.updateStatus.fetchState==="Completed"&&a(N())}),[b]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(B(!0,!1,!1,!1)))}),[t,S,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(w(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${A}`]:[],eventCallback:(o,y,j)=>{o.endsWith(A)&&j.onApprovalRulesEventReceived(o)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(G,{currentTenant:c,location:n,navigate:s,...m})},I="reimbursement-approval-rule-update",J=U((function(e){const s=h(e),n=R(e).remiSetupApproverViewUpdateData,a={};for(const l of Object.values(e.vendorState.vendorByID))l?.id!=null&&(a[l.id]=l.name);const t={};for(const l of Object.values(e.classState.classesByKey))l?.classId!=null&&(t[l.classId]=l.className);return{approvalView:s,remiSetupApproverViewUpdateData:n,vendorNamesById:a,departmentNamesById:t}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(I)&&e(M(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(L(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(z(t,!0))}}}))($(q)),P=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=Q(e?.tenantId);return s?r.jsx(Z,{isLoading:n}):r.jsx(H,{isLoading:n})},Z=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,w]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),b=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),o=u((i=>h(i)));F();const y=u((i=>R(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{y?.updateStatus.fetchState==="Completed"&&a(N())}),[y]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(B(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||b!=="Not-Started"||e||(w(!0),a(X(!1,!0)))}),[v,b,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{o.allApprovalRules.length===0&&o.fetchState==="Completed"&&(S||(c(!0),a(f())),s("./new"))}),[S,o,a]);const j={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${I}`]:[],eventCallback:(i,ee,O)=>{i.endsWith(I)&&O.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(J,{currentTenant:m,location:n,navigate:s,isLoading:e,...j})};function le(){return r.jsxs(Y,{children:[r.jsx(g,{path:"/",element:r.jsx(P,{})}),r.jsx(g,{path:"/new",element:r.jsx(x,{})}),r.jsx(g,{path:"/:approvalRuleId/edit",element:r.jsx(x,{})}),r.jsx(g,{path:"*",element:r.jsx(W,{})})]})}export{le as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-QA8yK6T_.js";import{a as f}from"./sentry-DX8X0N2R.js";import{u as U,j as g,h as C,g as O,i as V,l as k}from"./core-OUhaP0nM.js";import{mn as q,Yy as w,Yh as _,MQ as B,N1 as j,MY as A,MZ as E,Yz as N,fB as L,MX as z}from"./zeni-epic-state-DzFY1eNZ.js";import{z as F,E as P,a5 as $,b_ as Q,l as M,bQ as K,b$ as W}from"./index-BjnriIg-.js";import"./mui-BtZD__8k.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]="373a50a5-e6e5-4ffc-9822-8d59ed0cbe98",e._sentryDebugIdIdentifier="sentry-dbid-373a50a5-e6e5-4ffc-9822-8d59ed0cbe98")}catch{}})();function X(){const e=U(),s=f.useRef(!1),t=g((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=g((o=>o.vendorListState.allVendorIdsBillsTab.length>0));f.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(q({})))}),[p,t,e])}const Z=k((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return s.approvalRuleId&&(l=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:l,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=M(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const S=[];return v.forEach((u=>{const I=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),R=u.actors.selectedNonUsers.map((m=>{const y=(b=m.value,N(b)==null);var b;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}})),c=I.concat(R);S.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),S},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:l,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(j(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(Q);function G(){const e=C(),s=U(),t=O(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),l=P(),r=g((n=>w(n))),i=g((n=>_(n))),[a,d]=f.useState(!1);if(f.useEffect((()=>{a||(d(!0),s(B(!0)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(Z,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t})}function pe(e){return N(e)==null}const H=k((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],l={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),l[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:l,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:_(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=M(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((y=>{const b=y.actorKind?.selectedOption,Y=y.selectedRole?.selectedNonUsers??[];let D=[];b==="role"?D=Y.map((T=>({type:"attribute",subType:T.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):b==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map((T=>({type:"user",subType:void 0,userId:T.userId,idType:"user",isImplicitActor:!1}))));const x=y.action??"require_approval";m.push({action:x,actors:D,operator:D.length>1?x==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,S=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const I=v?.selection.selectedOptions??[];I.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:I});const R=S?.selection.selectedOptions??[];if(R.length>0&&(u.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:R}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:l,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(j(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(z(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(W);function ne(){const e=g((t=>L(t))),{isApprovalRulesV3Enabled:s}=K(e?.tenantId);return s?h.jsx(J,{}):h.jsx(G,{})}function J(){const e=C(),s=U(),t=O(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),l=P(),r=g((n=>w(n))),i=g((n=>_(n))),[a,d]=f.useState(!1);if(X(),f.useEffect((()=>{a||(d(!0),s(B(!1)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(H,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t},p??"new")}export{ne as R,pe as i,X as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-QA8yK6T_.js";import{z as b,a6 as N,h as f,Q as S,d_ as E,O as k,y as I}from"./index-BjnriIg-.js";import"./mui-BtZD__8k.js";import g from"./NotFoundScreen-CBOeKuhG.js";import{a as c}from"./sentry-DX8X0N2R.js";import{u as C,j as h,h as F,g as L,l as _,n as T,o as d,N as y}from"./core-OUhaP0nM.js";import{fB as U,a13 as w,a14 as p,D6 as P,pX as V,a15 as z,D4 as B}from"./zeni-epic-state-DzFY1eNZ.js";import"./recharts-CnI5kYGO.js";import"./analytics-drf9tsEq.js";import"./plaid-Bbika4Gn.js";import"./dnd-XtKnRPbJ.js";import"./stripe-cKAAJElX.js";import"./lottie-DaBLQBPb.js";import"./lexical-cGeYDtsl.js";import"./pdf-BMGNA2GO.js";import"./utils-CHDSUF0P.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]="216bc121-eca2-4673-ba4b-d54b553a077a",e._sentryDebugIdIdentifier="sentry-dbid-216bc121-eca2-4673-ba4b-d54b553a077a")}catch{}})();const G=_((function(e,t){const n=w(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=b.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((l=>{s.push(l.companyName),r.push(l.emailIds[0])})),f.trackInviteEmailClicked("send",s,r,s.length)}e(B())},onUpdateInviteFormLocalData:s=>{e(z({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&f.trackInviteEmailClicked("cancel")}}}))(E),O=()=>{const e=C(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>U(o))),l=F(),j=L(),u=b.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const m=h((o=>w(o))),x=u?.firstName!=null?u.firstName:"User";c.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),c.useEffect((()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[m.fetchState,e]);const D=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(N,{analytics:f,onLoad:o=>(v=>v.trackPageLoaded(S.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:l,location:j,currentTenant:r,companyName:D,userName:x,inviteFormCompayData:m.localData})]})};function ne(){const{useFeatureGate:e}=k(),{isFeatureEnabled:t}=e(I.isReferralFeatureEnabled);return a.jsxs(T,{children:[a.jsx(d,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(O,{}):a.jsx(g,{})}),a.jsx(d,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-CBOeKuhG.js","assets/sentry-DX8X0N2R.js","assets/core-OUhaP0nM.js","assets/zeni-epic-state-DzFY1eNZ.js","assets/index-BjnriIg-.js","assets/mui-BtZD__8k.js","assets/analytics-drf9tsEq.js","assets/utils-CHDSUF0P.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-CLhCpuhB.js","assets/withTransactionSidePanel-DRyJqOb1.js","assets/useAskAiCfoHostNavButtonProps-B4mPUD91.js","assets/TransactionDetailScreen-B1_fDc_7.js","assets/decodeURIComponentSafe-CoJI0rbl.js","assets/useInitialThreadRequest-BR_6LodZ.js","assets/routePaths-Cz-sxWeK.js","assets/expenseAutomationHelper-DlI9q6Vn.js","assets/analyticsHelper-CDqT9wg1.js","assets/CompanyPassportScreen-C-SlqPHT.js","assets/MobileAppDrawer-DLiH8K3Y.js","assets/InboxNotificationsProvider-Y2y35nP6.js","assets/useTaskManagerAccess-3mEVnK_N.js","assets/useAiCfoDashboardSuggestedQuestionsChips-CCxuDvI3.js","assets/FeaturePreviewScreen-h7p9MMUf.js","assets/BillPayRoutes-C_uGbX5e.js","assets/AddressScreen-KciR_hsZ.js","assets/DomesticWireDetailScreen-Dzk5sa_d.js","assets/BusinessVerificationPageScreen-CBOgxA4z.js","assets/DrawerScreen-Cq2VoXGn.js","assets/SetupPagesScreen-28K-Ej_i.js","assets/BillPayApprovalRoutes-DmmLz8dY.js","assets/ReimbursementApprovalRuleDetailScreen-BaxtZSL2.js","assets/getLocaleForTenant-aTGgtilb.js","assets/ReimbursementRoutes-DmbcBT5E.js","assets/ReimbursementApprovalRoutes-Dzvw2fZr.js","assets/TransactionListRoutes-DQwcR30R.js","assets/ZeniAccountStatementScreen-CTIued6H.js","assets/SettingsRoutes-DNrMSB0r.js","assets/AccountMappingScreen-CDcb3dR7.js","assets/QBOConnectionScreen-O0kY1C3B.js","assets/empty-CJaMNnL0.js","assets/index-DWbw7UWG.js","assets/url-DKOm_9Da.js","assets/index-DmRkUvqd.js","assets/accountMappingHelper-CJgy_TdU.js","assets/useEmailConnectResultRefresh-DRqxGzlR.js","assets/ReportsRoutes-BQmYqXvS.js","assets/ChargeCardRoutes-Dkpm3e49.js","assets/useChargeCardPusherEvents-u2vXo3UU.js","assets/PeopleRoutes-B2NEnvyj.js","assets/ExpenseAutomationRoutes-Dsuu9sFZ.js","assets/TreasuryRoutes-Dnwm_7bw.js","assets/VendorsRoutes-BCbNpFFW.js","assets/pathToGoBack-C7Q0VFSf.js","assets/ZeniAccountRoutes-CQnM-9GW.js","assets/AddressRoutes-loJi-MTb.js","assets/PandLWithForecastRoutes-aW5WT5CH.js","assets/CustomerOnboardingRoutes-BRdsXEtS.js","assets/TransactionDetailRoutes-Br_-ul_i.js","assets/EntityDetailRoutes-CTolGUo8.js","assets/InvoicingRoutes-MDlqxyil.js","assets/NotificationRoutes-Dhiufflf.js","assets/PerformanceRoutes-DphKMt6B.js","assets/RewardsRoutes-DvgOSJy0.js","assets/TaskRoutes-BOftPZQw.js","assets/TaskListScreen-D13comxS.js","assets/AiCfoScreen-CL9wzpIP.js","assets/CardsAiCfoScreen-B8SHn0bs.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as s,bn as cs,fB as ms,dV as _s,dU as Es,Aj as hs,de as ps,gG as gs,g5 as xs,db as pe,cF as Rs,gj as js,cx as Is,bE as Ts,br as As,Tp as bs,v as fs,Tr as ys,bq as Ds,Ts as Cs,bK as vs,bJ as Os,bt as Ps,ct as Us,Tt as ws,Tu as Fs,d6 as Ls,d9 as Vs,d8 as ks,cE as Hs,cL as Bs,pO as ge,ge as xe,gV as Ss,gg as Re,gI as je,gJ as Ie,gh as Ns}from"./zeni-epic-state-DzFY1eNZ.js";import{j as e}from"./liveblocks-QA8yK6T_.js";import{a as U}from"./sentry-DX8X0N2R.js";import{N as u,u as Ms,h as Zs,i as Gs,g as $s,j as $,q as Te,n as zs,o as n}from"./core-OUhaP0nM.js";import{J as l,E as qs,u as Ws,z as y,O as Ys,d as Js,W as Ks,y as M,f as Xs,K as Qs,V as et,L as F,G as Ae,t as _,P as st,M as tt,h as te}from"./index-BjnriIg-.js";import"./mui-BtZD__8k.js";import{f as be}from"./analyticsHelper-CDqT9wg1.js";import{t as nt}from"./getLocaleForTenant-aTGgtilb.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},A=new a.Error().stack;A&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[A]="2590d965-53a8-4bd9-ae07-41556cbf73d9",a._sentryDebugIdIdentifier="sentry-dbid-2590d965-53a8-4bd9-ae07-41556cbf73d9")}catch{}})();const at=l((()=>s((()=>import("./NotFoundScreen-CBOeKuhG.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ot=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/reimbursements`}),rt=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/bills`}),fe=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/treasury`}),ye=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/checking`}),De=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/cards`}),D=({showZeniAccountRoute:a,isUserHasBillPayAccess:A,isUserHasReimbursementAccess:B,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(V===!0){if(a)return e.jsx(ye,{tenantEmailDomain:v});if(i)return e.jsx(fe,{tenantEmailDomain:v});if(O)return e.jsx(De,{tenantEmailDomain:v})}return a?e.jsx(ye,{tenantEmailDomain:v}):i?e.jsx(fe,{tenantEmailDomain:v}):O?e.jsx(De,{tenantEmailDomain:v}):A?e.jsx(rt,{tenantEmailDomain:v}):B?e.jsx(ot,{tenantEmailDomain:v}):e.jsx(at,{})},it={dashboard:()=>s((()=>import("./DashboardRoutes-CLhCpuhB.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,0,17,18,19,20,21,22,23,8])),bills:()=>s((()=>import("./BillPayRoutes-C_uGbX5e.js")),__vite__mapDeps([24,1,2,3,4,5,6,7,25,0,26,11,14,27,15,19,20,21,28,23,29,17,30,31,32,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-DmbcBT5E.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,11,14,28,34,31,32,8])),transactions:()=>s((()=>import("./TransactionListRoutes-DQwcR30R.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])),settings:()=>s((()=>import("./SettingsRoutes-DNrMSB0r.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,21,38,19,20,39,40,41,42,43,13,44,25,0,17,27,15,18,45,30,31,34,8])),reports:()=>s((()=>import("./ReportsRoutes-BQmYqXvS.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-Dkpm3e49.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])),people:()=>s((()=>import("./PeopleRoutes-B2NEnvyj.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-Dsuu9sFZ.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,10,44,28,8])),treasury:()=>s((()=>import("./TreasuryRoutes-Dnwm_7bw.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])),vendors:()=>s((()=>import("./VendorsRoutes-BCbNpFFW.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,25,0,23,53,15,11,19,20,21,28,44,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-CQnM-9GW.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8]))},lt=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ne=a=>{"requestIdleCallback"in window?requestIdleCallback(a):setTimeout(a,100)},ut=l((()=>s((()=>import("./ReportsRoutes-BQmYqXvS.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])))),dt=l((()=>s((()=>import("./AddressRoutes-loJi-MTb.js")),__vite__mapDeps([55,1,2,3,25,4,5,6,7,0,8])))),ct=l((()=>s((()=>import("./PeopleRoutes-B2NEnvyj.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])))),mt=l((()=>s((()=>import("./PandLWithForecastRoutes-aW5WT5CH.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,0,23,11,14,15,19,20,21,8])))),_t=l((()=>s((()=>import("./CustomerOnboardingRoutes-BRdsXEtS.js")),__vite__mapDeps([57,1,2,3,25,4,5,6,7,0,39,40,41,42,43,13,45,48,8])))),Et=l((()=>s((()=>import("./VendorsRoutes-BCbNpFFW.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,25,0,23,53,15,11,19,20,21,28,44,8])))),ht=l((()=>s((()=>import("./TransactionDetailRoutes-Br_-ul_i.js")),__vite__mapDeps([58,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-CTolGUo8.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,13,10,11,12,14,15,16,8])))),pt=l((()=>s((()=>import("./DashboardRoutes-CLhCpuhB.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,0,17,18,19,20,21,22,23,8])))),ve=l((()=>s((()=>import("./BillPayRoutes-C_uGbX5e.js")),__vite__mapDeps([24,1,2,3,4,5,6,7,25,0,26,11,14,27,15,19,20,21,28,23,29,17,30,31,32,8])))),gt=l((()=>s((()=>import("./SettingsRoutes-DNrMSB0r.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,21,38,19,20,39,40,41,42,43,13,44,25,0,17,27,15,18,45,30,31,34,8])))),xt=l((()=>s((()=>import("./InvoicingRoutes-MDlqxyil.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,25,0,19,20,21,39,40,41,42,43,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-DmbcBT5E.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,11,14,28,34,31,32,8])))),Rt=l((()=>s((()=>import("./ZeniAccountRoutes-CQnM-9GW.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8])))),jt=l((()=>s((()=>import("./TreasuryRoutes-Dnwm_7bw.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])))),It=l((()=>s((()=>import("./TransactionListRoutes-DQwcR30R.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])))),Tt=l((()=>s((()=>import("./ChargeCardRoutes-Dkpm3e49.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])))),At=l((()=>s((()=>import("./NotificationRoutes-Dhiufflf.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,11,21,8])))),bt=l((()=>s((()=>import("./PerformanceRoutes-DphKMt6B.js")),__vite__mapDeps([62,1,2,3,0,4,5,6,7,11,19,20,21,8])))),ft=l((()=>s((()=>import("./ExpenseAutomationRoutes-Dsuu9sFZ.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,10,44,28,8])))),yt=l((()=>s((()=>import("./RewardsRoutes-DvgOSJy0.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,0,8])))),Dt=l((()=>s((()=>import("./TaskRoutes-BOftPZQw.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,14,19,20,21,65,11,8])))),Ct=l((()=>s((()=>import("./AiCfoScreen-CL9wzpIP.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,22,53,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-B8SHn0bs.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,8])))),C=l((()=>s((()=>import("./NotFoundScreen-CBOeKuhG.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),vt=l((()=>s((()=>import("./TaskListScreen-D13comxS.js").then((a=>a.f))),__vite__mapDeps([65,1,2,3,4,5,6,7,11,19,20,21,8])))),Ot=({isDashboardAccess:a,showZeniAccountRoute:A,isUserHasBillPayAccess:B,isUserHasReimbursementAccess:i,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:v,showChargeCardRoute:k})=>{if(O===!0){if(A)return e.jsx(u,{to:"checking"});if(V)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return v===!0&&k?e.jsx(u,{to:"cards"}):a?e.jsx(u,{to:"dashboard"}):A?e.jsx(u,{to:"checking"}):V?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):B?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Ue=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/dashboard`}),Bt=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:a}){const A=Ms(),B=Zs(),{tenantEmailDomain:i}=Gs(),V=qs().mode,{setLoading:O,clearAllLoading:v,clearLoading:k}=Ws(),b=y.getSignedInUserTenant(i)?.tenantId,I=y.getSignedInUser(),J=cs(I),z=$s(),[L,we]=U.useState(!1),r=$((o=>ms(o))),{useFeatureGate:S}=Ys(),Z=Js(),ae=Ks(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=S(M.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=S(M.isDebitCardFeatureEnabled),T=$((o=>o.tenantState.fetchState)),p=$((o=>o.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?_s(oe,r):void 0,K=p==="Completed"||T==="Completed"?Es(r):void 0,re=p==="Completed"||T==="Completed"?hs(r)&&!ps(r):void 0,ke=Xs(r,Ve,oe),{isCardsHidden:He}=Qs(r?.tenantId),Be=!ke||!!He,{isFeatureEnabled:Se}=S(M.isSettingsFeatureEnabled),{isFeatureEnabled:X}=S(M.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=S(M.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||tt==="DEV",q=$((o=>gs(o)));if(i!=null){const o=y.getSignedInUserTenant(i);I!=null&&o!=null&&be(I,r,V)}const G={tenantId:b,userId:I?.userId,sessionId:I?.zeniSessionId},ie=xs(),h=et(),Ze=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),Ge=Rs(h?.loggedInUserRoleMap),Q=Te("/:tenantEmailDomain/onboarding/*")!==null,ee=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),$e=$((o=>G.tenantId!=null?js(o,G.tenantId):void 0));U.useEffect((()=>{O(F.TENANT_FETCHING),a(i)}),[i]),U.useEffect((()=>{if(ee!=null&&b!=null){const o=ee.params.selectedPeriod;if(o!=null){const f=o.split("-");if(f.length===2){const d=Is(Number(f[0])),t=Number(f[1]),c=Ts(`01-${d<10?`0${d}`:d}-${t}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),N=As();c.isAfter(N,"month")===!1?A(bs(b,{month:d,year:t})):B(`/${i}/month_end_close_checks/review`)}}}}),[ee,b]),U.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,G,ie,I,A,y]),U.useLayoutEffect((()=>{!fs(ie,G)&&y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,f,d,t){if(xe(f?.userId,f?.zeniSessionId,o.tenantId),d(Ss(!0)),d(Re(o.tenantId)),o.tenantId!=null&&_.clearTenant(o.tenantId),o.tenantId!=null){const c=y.getSignedInUserTenantWithId(o.tenantId);t&&Ae.updateAppLocaleID(nt(t)),c?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}o.userId!=null?te.identify(o.userId,{tenant_id:o.tenantId}):te.resetUserIdentity()})(G,I,A,$e))}),[b]),U.useEffect((()=>{y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,f,d,t,c,N,H){if(d==null&&t==null)return void console.warn("There is no current tenant selected!!");const W=t!=null&&c?.zeniSessionId!=null,ls=d==null||d.tenantId!==t,us=d!=null&&d.excludedResources==null,ds=d!=null&&d.externalConnections==null;if(W&&ls){H(Re(t));const Y=y.getSignedInUserTenantWithId(t);Y?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,t),_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),H(je(c.userId,t))),_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),H(Ie(c.userId,t)))}else W&&us&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),H(je(c.userId,t))),W&&ds&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),H(Ie(c.userId,t)));if(W){te.identify(c.userId,{tenant_id:t});const Y=t==null||t!=null&&(f==="Completed"||f==="Error");o==="Completed"||f!=="Not-Started"&&f!=="Error"||t==null||!_.shouldFetchActiveTenant(t)||(_.markActiveTenantFetchStarted(t),N(F.TENANT_FETCHING),H(Ns(c.userId,t,c.zeniSessionId))),Y&&(o==="Not-Started"||o==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(ge(c.userId,c.zeniSessionId)))}})(T,p,r,b,I,O,A))}),[b,p]),U.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&q.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),y.saveSignedInUserTenants(ys(q.tenantsBaseInOrder)),I!=null&&be(I,r,V,void 0,q.tenantsBaseInOrder))}),[q,T,r,I]),U.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&b!=null?(v(),_.markActiveTenantFetchCompleted(b)):p==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,b,L]);const le=U.useRef(!1);U.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(o=lt,f=3e3){setTimeout((()=>{const d=t=>{if(t>=o.length)return;const c=o[t],N=it[c];N!=null?N().then((()=>ne((()=>d(t+1))))).catch((()=>ne((()=>d(t+1))))):d(t+1)};ne((()=>d(0)))}),f)})())}),[p,L]);const P=r?.userRole!=null&&Ds(r?.userRole),{isFeatureEnabled:ze}=S(M.isReferralFeatureEnabled),qe=r?.userRole!=null&&r.userRole.includes("charge_card_user"),We=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!P,de=!Be&&!P,Ye=Cs(h?.loggedInUserRoleMap),Je=r.externalConnections?.accounting[0]?.isValid,Ke=r.externalConnections?.fetchState==="Completed",se=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!P,me=ce&&vs(h?.loggedInUserRoleMap),_e=Fe&&!P,Xe=Le&&!P,Qe=ue&&Os(h?.loggedInUserRoleMap),es=de&&Ps(h?.loggedInUserRoleMap),ss=_e&&Us(h?.loggedInUserRoleMap),ts=ws(h?.loggedInUserRoleMap),ns=Fs(h?.loggedInUserRoleMap),as=Ls(h?.loggedInUserRoleMap),os=Vs(h?.loggedInUserRoleMap),rs=ks(h?.loggedInUserRoleMap),g=Hs(h?.loggedInUserRoleMap),x=Bs(h?.loggedInUserRoleMap),Ee=ue&&g,he=ce&&x,R=_e&&as,j=Xe&&os,m=de&&rs,is=r.excludedResources?.resources?.find((o=>o.resource==="/invites"))!=null||Ge===!0||Ye===!0||ts===!0||ns===!0;return y.isSignedIn()?b==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(I!=null&&T!=="In-Progress"&&A(ge(I.userId,I.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(se===!0||J&&!Q)&&Ke&&Je!==!0&&E===!1&&K===!1&&re===!1?(a(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||se!==!0||Q||J?!L||se!==!1||Q||J?L&&r?.userRole&&E!=null&&K!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(zs,{children:e.jsxs(n,{element:e.jsx(st,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Ot,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,isTenantCardsOnly:K,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(pt,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(ut,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"people/*",element:is||w?e.jsx(ct,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(mt,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(_t,{})}),e.jsx(n,{path:"transaction/*",element:w&&P===!1||qe||We?e.jsx(ht,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"transactions/*",element:w&&P===!1?e.jsx(It,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"customer/*",element:w&&P===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isTenantBankingOnly:E,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"vendor/*",element:w&&P===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"tasks",element:e.jsx(vt,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Dt,{})}),e.jsx(n,{path:"address/*",element:Qe||me||ss||es?e.jsx(dt,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(Rt,{}):e.jsx(C,{})}),e.jsx(n,{path:"treasury/*",element:j?e.jsx(jt,{}):e.jsx(C,{})}),e.jsx(n,{path:"performance",element:ae===!0?e.jsx(bt,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:ae===!0&&P===!1?e.jsx(ft,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(n,{path:"notifications/*",element:e.jsx(At,{})}),e.jsx(n,{path:"vendors/*",element:Ze?e.jsx(Et,{}):e.jsx(C,{})}),e.jsx(n,{path:"bill/*",element:Ee?e.jsx(ve,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"bills/*",element:Ee?e.jsx(ve,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursement/*",element:he?e.jsx(Oe,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursements/*",element:he?e.jsx(Oe,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"settings/*",element:Se?e.jsx(gt,{hasAdminLevelAccess:me}):e.jsx(C,{})}),e.jsx(n,{path:"invoicing/*",element:Me?e.jsx(xt,{}):e.jsx(C,{})}),e.jsx(n,{path:"cards/ask",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:X}):e.jsx(C,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:X}):e.jsx(C,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(Tt,{}):e.jsx(C,{})}),e.jsx(n,{path:"rewards/*",element:ze?e.jsx(yt,{}):e.jsx(C,{})}),e.jsx(n,{path:"/ai-cfo",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(n,{path:"/ai-cfo/",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:Z?e.jsx(Ct,{isFileUploadEnabled:X}):e.jsx(C,{})}),e.jsx(n,{path:"*",element:e.jsx(C,{})})]})}):null:(a(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(a(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),a(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{D as F,Bt as S};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-QA8yK6T_.js";import{a as d}from"./sentry-DX8X0N2R.js";import{h as N,g as Z,u as T,i as V,j as C,l as H,n as z,o as k}from"./core-OUhaP0nM.js";import{fB as w,YA as je,MU as ve,Y8 as we,Yh as Ae,c7 as W,cQ as De,cR as Ue,bq as Te,da as Re,Ff as _e,YB as Me,Ol as Be,LL as Fe,LC as de,Lz as Le,Fj as ue,LF as pe,LI as ge,LO as X,Bv as ee,Fi as Oe,lq as G,lt as me,YC as Ne,mD as Ve,FB as Ye,UQ as $e,UR as Ge,lo as Ze,YD as He,lr as Ke,t$ as Qe,UL as qe,UM as ze,u3 as Je,hS as We,TL as q,hK as ae,hH as Xe,hP as en,TM as nn,Fy as tn,YE as an,YF as on,M0 as sn,lX as rn,dU as fe,dV as he,YG as ln,gz as cn,T_ as dn,Fx as oe,gE as se,gD as un,Fw as pn,gC as gn,gB as mn,YH as fn,Te as Ce,YI as hn,YJ as Cn,YK as yn,YL as bn,YM as Sn,YN as In,FE as xn,YO as En,Fv as ie,Fp as $,YP as kn,YQ as Pn,YR as re,YS as jn,dN as vn,YT as wn,YU as An,YV as Dn,To as Un,b$ as Tn,c6 as Rn,c5 as _n,c0 as Mn,YW as Bn,c3 as Fn,c2 as Ln,c4 as On,c1 as Nn}from"./zeni-epic-state-DzFY1eNZ.js";import{bQ as Vn,z as v,V as Y,a5 as ne,c0 as Yn,h as K,O as te,y as L,f as ye,K as be,c1 as $n,g as Gn,U as Se,c2 as Zn,ag as Hn,c3 as Kn,c4 as Qn,ao as qn,c5 as zn,p as Jn,c as Ie,c6 as Wn}from"./index-BjnriIg-.js";import{n as B}from"./mui-BtZD__8k.js";import{u as xe}from"./useTaskManagerAccess-3mEVnK_N.js";import{U as Xn}from"./AccountMappingScreen-CDcb3dR7.js";import{t as et,A as nt}from"./AddressScreen-KciR_hsZ.js";import O from"./NotFoundScreen-CBOeKuhG.js";import{g as tt}from"./analyticsHelper-CDqT9wg1.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-CBOgxA4z.js";import{C as st}from"./CompanyPassportScreen-C-SlqPHT.js";import{M as _}from"./MobileAppDrawer-DLiH8K3Y.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-DRqxGzlR.js";import{q as le}from"./QBOConnectionScreen-O0kY1C3B.js";import{B as lt}from"./BillPayApprovalRoutes-DmmLz8dY.js";import{R as ct}from"./ReimbursementApprovalRoutes-Dzvw2fZr.js";import"./recharts-CnI5kYGO.js";import"./analytics-drf9tsEq.js";import"./plaid-Bbika4Gn.js";import"./dnd-XtKnRPbJ.js";import"./stripe-cKAAJElX.js";import"./lottie-DaBLQBPb.js";import"./lexical-cGeYDtsl.js";import"./pdf-BMGNA2GO.js";import"./utils-CHDSUF0P.js";import"./accountMappingHelper-CJgy_TdU.js";import"./routePaths-Cz-sxWeK.js";import"./InboxNotificationsProvider-Y2y35nP6.js";import"./empty-CJaMNnL0.js";import"./pdf-lib-BukwiyrA.js";import"./index-DWbw7UWG.js";import"./url-DKOm_9Da.js";import"./index-DmRkUvqd.js";import"./decodeURIComponentSafe-CoJI0rbl.js";import"./ReimbursementApprovalRuleDetailScreen-BaxtZSL2.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="299af742-236a-48d8-9aad-8bb42a94bb80",e._sentryDebugIdIdentifier="sentry-dbid-299af742-236a-48d8-9aad-8bb42a94bb80")}catch{}})();const dt=B.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,ut=H((function(e,l){const o=w(e),i=we(e),r=Ae(e),n=l.roleMap.bill_pay_admin;return{isDisabled:(W(o?.userRole??[])||n)&&"readonly",billpayApprovalView:i,remiApproverView:r,analytics:K}}),(function(e,l){const{navigate:o,currentTenant:i}=l;return{onSetupApprovalRulesBillPaySectionClick:()=>{o("bills/approval-rules")},onSetupApprovalRulesRemiSectionClick:()=>{o("reimbursements/approval-rules")},onBackClick:()=>{i?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&i.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")}}}))(Yn),pt=()=>{const e=N(),l=Z(),o=T(),{tenantEmailDomain:i}=V(),[r,n]=d.useState(!1),[t,s]=d.useState(!1),c=C((g=>w(g)));at();const u=C((g=>g.remiSetupApproverViewState.fetchState)),h=C((g=>je(g))),{isApprovalRulesV3Enabled:b,isLoading:m}=Vn(c?.tenantId),p=c.companyId??v.getSignedInUserTenant(i)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access Approval Rules settings page without signing in...");const S=Y();d.useEffect((()=>{t||u!=="Not-Started"||m||c?.tenantId==null||(s(!0),o(ve(!0,!1,!1,b)))}),[t,u,m,b,c?.tenantId,o]);const E=g=>{n(g)};return S?.loggedInUserRoleMap!=null?a.jsxs(dt,{children:[a.jsx(_,{isAppContentDrawerOpen:r,handleDrawerToggle:E}),a.jsx(ut,{navigate:e,location:l,companyId:p,currentTenant:c,roleMap:S.loggedInUserRoleMap,onClickMenuIcon:()=>{E(!0)}})]}):a.jsx(ne,{fetchState:h.fetchState})},gt=B.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
height: 100%;
|
|
12
|
-
width: 100%;
|
|
13
|
-
flex: 1 1 auto;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
align-items: center;
|
|
16
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
`,mt=H((function(e,l){const{companyId:o,isZeniAccountEnabled:i,isChargeCardEnabled:r,isBillPayEnabled:n,isRemiEnabled:t,isTreasuryEnabled:s}=l,c=w(e);return{bankSetupView:Me(e,o,n,t,i,r,s),connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:K}}),(function(e,l){const{navigate:o,currentTenant:i,companyId:r}=l;return{onFetchLinkTokenClick:(n,t,s)=>{e(ee(t,n,s))},onEstablishConnectionClick:(n,t,s)=>{e(X(n,r,t,s))},onUpdatePaymentAccountStatus:(n,t,s,c,u)=>{e(ge(n,t,u,c,s))},onUpdatePaymentAccountLoginStatus:(n,t,s,c)=>{e(pe(!1,n,c,s,t))},onEstablishConnectionSuccess:(n,t)=>{e(ue(t,n))},onUpdateAccountClick:(n,t,s,c,u)=>{e(u==="paymentAccount"?de(n,t,s,c):Le(c,n,t))},onUpdatePrimaryFundingAccount:(n,t,s)=>{e(Fe(r,t,n,s))},onRemoveConnection:n=>{e(Be(n))},onBackClick:()=>{i?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&i.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")}}}))($n),ft=()=>{const e=N(),l=Z(),o=T(),{tenantEmailDomain:i}=V(),r=Y(),{useFeatureGate:n}=te(),{isFeatureEnabled:t}=n(L.isChargeCardFeatureEnabled),{isFeatureEnabled:s}=n(L.isDebitCardFeatureEnabled),[c,u]=d.useState(!1),[h,b]=d.useState(!1),m=C((A=>w(A))),p=C((A=>A.settingsViewState.bankConnection.fetchState)),S=De(m,r?.loggedInUserRoleMap),E=Ue(m,r?.loggedInUserRoleMap),g=m?.userRole!=null&&Te(m.userRole),j=!!m.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!g,P=m.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!g,R=ye(m,t,s),D=Re(m,r?.loggedInUserRoleMap)&&R,{isCardsHidden:I}=be(m?.tenantId),x=m.companyId??v.getSignedInUserTenant(i)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");d.useEffect((()=>{h||p==="Completed"||(b(!0),o(_e(!1)))}),[h,o,p]);const M=A=>{u(A)};return S||j||E||D?a.jsxs(gt,{children:[a.jsx(_,{isAppContentDrawerOpen:c,handleDrawerToggle:M}),a.jsx(mt,{navigate:e,location:l,companyId:x,currentTenant:m,roleMap:r.loggedInUserRoleMap,isBillPayEnabled:S,isRemiEnabled:E,isZeniAccountEnabled:j,isChargeCardEnabled:D,isChargeCardsHidden:I,isTreasuryEnabled:P,onClickMenuIcon:()=>{M(!0)}})]}):a.jsx(O,{})},ht=B.div`
|
|
18
|
-
display: flex;
|
|
19
|
-
height: 100%;
|
|
20
|
-
width: 100%;
|
|
21
|
-
flex: 1 1 auto;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
align-items: center;
|
|
24
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
25
|
-
`,Ct=H((function(e,l){const{companyId:o}=l,i=w(e),r=l.roleMap.bill_pay_admin,n=Ne(e,o),{uiState:t}=n,s=(W(i?.userRole??[])||r)&&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:Se.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:i.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:s,analytics:K}}),(function(e,l){const{navigate:o,currentTenant:i,companyId:r}=l;return{onFetchLinkTokenClick:(n,t)=>{e(ee("billing_setup",n,t))},onEstablishConnectionClick:n=>{e(X(n,r,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(ue("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,t,s)=>{e(ge(n,t,"billing","billing_setup",s))},onUpdatePaymentAccountLoginStatus:(n,t)=>{e(pe(!1,n,"billing","billing_setup",t))},onUpdateAccountClick:(n,t)=>{e(de(n,t,"billing","billing_setup"))},onBackClick:()=>{i?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&i.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")},handleCreateCardSetupIntent:n=>{e(me(n))},handleConfirmCardSetupIntent:n=>{e(Ke(n))},updateCardPaymentModalState:n=>{e(He({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,t,s)=>{e(Ze(n,t,s))},handleFetchPaymentSources:()=>{e(G())},resetCardPaymentViewState:()=>{e(Ge())},handleResetCardPaymentErrorStatuses:()=>{e($e())},onBillingAddressSave:n=>{e(Ye(n))},onAddressEditHandler:n=>{if(n!=null){const t=et(n);e(Ve({addressType:"subscription_billing_address",addressToCreate:t}))}}}}))(Zn),yt=()=>{const e=N(),l=Z(),o=T(),{tenantEmailDomain:i}=V(),[r,n]=d.useState(!1),[t,s]=d.useState(!1),[c,u]=d.useState(!1),h=C((P=>w(P))),b=C((P=>P.cardPaymentViewState)),m=C((P=>P.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState)),p=Gn(b.addCardPaymentSourceStatus.fetchState),S=b.addCardPaymentSourceStatus.fetchState,E=h.companyId??v.getSignedInUserTenant(i)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const g=Y();d.useEffect((()=>{E!=null&&o(Oe(E,!1))}),[E,o]),d.useEffect((()=>{t||(s(!0),o(G()))}),[t,o]),d.useEffect((()=>{c||(me(["card"]),u(!0))}),[c]),d.useEffect((()=>{p==="In-Progress"&&S==="Completed"&&o(G())}),[p,S]);const j=P=>{n(P)};return g?.loggedInUserRoleMap!=null?a.jsxs(ht,{children:[a.jsx(_,{isAppContentDrawerOpen:r,handleDrawerToggle:j}),a.jsx(Ct,{navigate:e,location:l,companyId:E,currentTenant:h,roleMap:g.loggedInUserRoleMap,onClickMenuIcon:()=>{j(!0)},googleAPIKey:Se.googleMapsAPIKey})]}):a.jsx(ne,{fetchState:m})},J="external_integrations",bt=H((function(e){const l=ze(e,J);return{notifyMeRegisteredSlugs:new Set(l.map((o=>o.additionalInfo)).filter((o=>o!=null)))}}),(function(e,l){const{navigate:o,integrationsView:i,signedInUserEmail:r,tenantEmailDomain:n,tenantId:t}=l;return{onBackClick:()=>{o("../")},onNavigateToDashboard:()=>{o("../dashboard")},onReconnectQBO:()=>{le.init("/connection/auth",n),le.handleClick()},onRefreshClick:()=>{i.integrations.refreshQBO.fetchState!=="In-Progress"&&e(tn())},onSaveChargeBeeCredentials:(s,c)=>{const u=i.externalConnections?.revenue?.find((h=>h.connectionName==="chargebee"))?.connectionId;u!=null&&e(en(t,u,q("revenue"),nn("chargebee"),{api_key:s,site:c}))},onConnectHubSpot:(s,c)=>{const u=i.externalConnections?.revenue?.find((h=>h.connectionName==="hubspot"))?.connectionId;if(u!=null){const h=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:s,client_secret:c,connection_id:u,redirect_uri:h,tenant_id:t}));const b="oauth crm.objects.deals.read crm.objects.owners.read";window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(s)}&scope=${encodeURIComponent(b)}&redirect_uri=${encodeURIComponent(h)}`}},onDisconnect:(s,c)=>{e(Xe(t,s,q(c)))},onConnectGmail:()=>{e(ae(t,"gmail",window.location.href))},onConnectOutlook:()=>{e(ae(t,"outlook",window.location.href))},onSaveConnectorCredentials:s=>{e(We(t,q("payments"),s))},onNotifyMe:s=>{K.trackIntegrationsNotifyMeClicked("Settings",s),e(Je(J,s,r))}}}))(Kn),St=()=>{const e=Hn(),l=N(),o=T(),{tenantEmailDomain:i}=V(),{pendingAutoFocusTabId:r}=it(),[n,t]=d.useState(!1),s=C((I=>I.tenantState.fetchState)),c=C((I=>w(I))),u=c.companyId??v.getSignedInUserTenant(i)?.companyId,h=v.getSignedInUser(),b=Y(),m=W(c.userRole??[]);if(h==null)throw Error("Can't access Integrations page without signing in...");d.useEffect((()=>{o(Qe(J))}),[o]);const[p,S]=d.useState(!1);d.useEffect((()=>{p||(S(!0),o(G()))}),[p,o]);const E=I=>{t(I)},g=C((I=>qe(I,u))),j=C((I=>I.plaidAccountViewState.external_account.plaidConnectionDetails)),{plaidAccounts:P,onAddPlaidAccount:R,onReLoginPlaidAccount:D}=rt({companyId:u??c.companyId});return b?.loggedInUserRoleMap!=null?a.jsxs(It,{children:[a.jsx(_,{isAppContentDrawerOpen:n,handleDrawerToggle:E}),a.jsx(bt,{navigate:l,meetingUrl:e("settings_integrations"),onClickMenuIcon:()=>{E(!0)},isAdmin:m,integrationsView:g,signedInUserEmail:h.userEmail??"",tenantEmailDomain:c.tenantEmailDomain??i??"",tenantId:c.tenantId,saveChargeBeeState:g.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:g.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:g.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:g.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:g.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(g.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map((([I,x])=>[I,x?.message]))),deleteConnectionState:g.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:g.externalConnections?.deleteConnectionError?.message,isLoading:s==="In-Progress",autoFocusTabId:r??void 0,plaidAccounts:P,onAddPlaidAccount:R,onReLoginPlaidAccount:D,plaidConnectionDetails:j})]}):a.jsx(ne,{fetchState:s})},It=B.div`
|
|
26
|
-
display: flex;
|
|
27
|
-
height: 100%;
|
|
28
|
-
width: 100%;
|
|
29
|
-
flex: 1 1 auto;
|
|
30
|
-
flex-direction: column;
|
|
31
|
-
align-items: center;
|
|
32
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
33
|
-
`,xt=B.div`
|
|
34
|
-
display: flex;
|
|
35
|
-
height: 100%;
|
|
36
|
-
width: 100%;
|
|
37
|
-
flex: 1 1 auto;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
align-items: center;
|
|
40
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
41
|
-
`,Et=()=>{const e=T(),{tenantEmailDomain:l}=V(),[o,i]=d.useState(!1),r=C((p=>w(p))).companyId??v.getSignedInUserTenant(l)?.companyId,n=v.getSignedInUser();if(n==null)throw Error("Can't access my bank connections page without signing in...");const t=C((p=>an(p,n.userId))),s=C((p=>on(p,r,"bill_pay","user_reimbursement_account"))),{plaidConnectionDetails:c}=s,u=p=>{i(p)},h=d.useCallback((p=>{e(ee("user_reimbursement_account",p))}),[]),b=d.useCallback((p=>{e(X(p,r,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))}),[]);d.useEffect((()=>{t.fetchState!=="Completed"&&t.fetchState!=="In-Progress"&&e(sn(n.userId))}),[n.userId,t.fetchState]);const m=t.fetchState==="Not-Started"||t.fetchState==="In-Progress";return a.jsxs(xt,{children:[a.jsx(_,{isAppContentDrawerOpen:o,handleDrawerToggle:u}),a.jsx(Qn,{plaidConnectionDetails:c,isLoading:m,myBankConnectionsView:t,onFetchLinkTokenClick:h,onEstablishConnectionClick:b,onClickMenuIcon:()=>{u(!0)}})]})},kt=B.div`
|
|
42
|
-
display: flex;
|
|
43
|
-
height: 100%;
|
|
44
|
-
width: 100%;
|
|
45
|
-
flex: 1 1 auto;
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
align-items: center;
|
|
48
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
49
|
-
`,ce=({appContent:e})=>{const l=T(),o=N(),i=Z(),[r,n]=d.useState(!1),t=C((y=>w(y))),{tenantEmailDomain:s}=t,c=t.companyId??v.getSignedInUserTenant(s)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:u}=te(),h=!!t.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:b}=u(L.isChargeCardFeatureEnabled),{isFeatureEnabled:m}=u(L.isDebitCardFeatureEnabled),p=t.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=C((y=>rn(y))),E=fe(t),g=he(m,t),j=!g&&S,P=ye(t,b,m),{isCardsHidden:R}=be(t?.tenantId),D=!P||R,{areTenantIdsInSync:I}=qn();d.useEffect((()=>{I&&l(ln(c,j))}),[c,l,j,I]);const x=C((y=>cn(y,j))),M=x.fetchState==="Not-Started"||x.fetchState==="In-Progress"||c==null,A=dn(t),f=!!t.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=y=>{n(y)};return a.jsxs(kt,{children:[a.jsx(_,{isAppContentDrawerOpen:r,handleDrawerToggle:U}),e!=null?a.jsx(a.Fragment,{children:e}):a.jsx(zn,{myProfileView:x,isAccountingClassesEnabled:S,isReimbursementDisabled:f===!1,isZeniAccountsDisabled:h===!1,isChargeCardDisabled:D,isTreasuryDisabled:p===!1,isLiteRoleDisabled:A===!1,onClickMenuIcon:()=>{U(!0)},isLoading:M,isBankingOnlyTenant:g,isCardsOnlyTenant:E,onAddressClick:y=>{const F=(function(ke,Pe){let Q=`/${ke}/settings/my_profile`;return Q=Q.concat(`/new/${Pe}`),Q})(s,y),Ee=Jn(i.state?.pathnameStackToGoBack,i.pathname);o(F,{state:{pathnameStackToGoBack:Ee}})},onGetOtp:y=>{const F={...x.myProfileLocalData,phone:y};l(oe({localData:F})),l(mn(y,"MyProfile"))},onResendOtp:y=>{l(gn(y,"MyProfile"))},onCancelClick:()=>{l(pn())},onSaveClick:()=>{l(se("MyProfile",x.myProfileLocalData.phone,x.myProfileLocalData.otpChallenge,x.myProfileLocalData.dateOfBirth,x.addressData?.addressToCreate))},onVerifyOtp:(y,F)=>{l(un(y,F,"MyProfile"))},onVerifyOtpSuccess:y=>{y!=null&&v.saveZeniOtpToken(y),l(se("MyProfile",x.myProfileLocalData.phone,x.myProfileLocalData.otpChallenge,x.myProfileLocalData.dateOfBirth,x.addressData?.addressToCreate))},updateMyProfileLocalData:y=>{l(oe({localData:y}))}})]})};function Pt(){const e=T(),l=C((f=>w(f))),o=l.companyId,i=l.tenantId,r=C((f=>fn(f))),n=C((f=>Ce(f))),t=C((f=>hn(f.notificationRegistryState))),s=C((f=>Cn(f))),c=C((f=>yn(f))),u=Ie(),{isZeniUser:h,isNotificationControlsEnabled:b}=xe(u),[m,p]=d.useState(!1),S=d.useCallback((f=>{p(f)}),[]),E=d.useCallback((f=>{e(bn(f))}),[]),g=d.useCallback((()=>{u?.userEmail!=null&&e(Sn({loggedInUserEmail:u.userEmail})),e(In())}),[u?.userEmail]),j=d.useCallback((()=>{e(xn()),c&&e(En())}),[c]);if(u==null)throw Error("Can't access Notification Settings page without signing in...");const P=d.useCallback((()=>{const f=n.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ie(f,o)),e($())}),[o,n.notificationSettings.monthEndInsightsNotificationSettings.enabled]),R=d.useCallback((()=>{e(kn())}),[]),D=d.useCallback(((f,U,y)=>{e(Pn({eventId:f,channel:re(U),enabled:y}))}),[e]),I=d.useCallback(((f,U)=>{e(jn({groupId:f,frequency:vn(U)}))}),[e]),x=d.useCallback(((f,U,y)=>{e(wn({groupId:f,channel:re(U),enabled:y}))}),[e]),M=d.useMemo((()=>{if(b&&t!=null)return{isZeniUser:h,registry:t,preferences:s,onToggleEventChannel:D,onSetGroupFrequency:I,onSetGroupChannelMaster:x}}),[b,h,t,s,D,I,x]);d.useEffect((()=>{i!=null&&n.fetchState==="Not-Started"&&e($())}),[e,i,n.fetchState]);const A=d.useRef(i);return d.useEffect((()=>{A.current!==i&&(e(An()),e(Dn()),e($()),A.current=i)}),[e,i]),d.useEffect((()=>{if(n.fetchState==="Completed"&&r.fetchState!=="In-Progress"&&r.fetchState!=="Completed"){const f=n.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ie(f,o))}}),[r.fetchState,o,n.notificationSettings.monthEndInsightsNotificationSettings.enabled,n.fetchState]),a.jsxs(a.Fragment,{children:[a.jsx(_,{isAppContentDrawerOpen:m,handleDrawerToggle:S}),a.jsx(Wn,{notificationSettingsView:r,onFormDataChange:E,onCancel:g,onSave:j,onClickMenuIcon:()=>{S(!0)},signedInUser:u,onRefresh:P,resetUpdateStatus:R,taskNotifications:M,isTaskNotificationsDirty:c})]})}function da(e){const[l,o]=d.useState(!1),i=C((S=>Ce(S))),r=C((S=>w(S))),n=Y(),t=Ie(),s=T(),{useFeatureGate:c}=te(),{isFeatureEnabled:u}=c(L.isDebitCardFeatureEnabled),{isTaskManagerAccessEnabled:h}=xe(t),b=t?.userEmail==null||i.fetchState!=="Completed"||Un(i.notificationSettings,t.userEmail,u,r,h);d.useEffect((()=>{i.fetchState!=="In-Progress"&&i.fetchState!=="Completed"&&l===!1&&(o(!0),s($()))}),[i.fetchState,l]);const m=he(u,r),p=fe(r);return i.fetchState!=="In-Progress"&&i.fetchState!=="Not-Started"||b!==!0?Tn(r)?a.jsxs(z,{children:[Rn(n?.loggedInUserRole??[],u,r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"accounting/*",element:a.jsx(Xn,{})}),_n(n?.loggedInUserRole??[],u,r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"approval_rules/*",element:a.jsx(jt,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),Mn(r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"my_bank_connections",element:a.jsx(Et,{})}),Bn(r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"bank_connections",element:a.jsx(ft,{})}),Fn(r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"business_verification",element:a.jsx(ot,{productType:m?"zeni_accounts":p?"charge_cards":tt(r,n?.loggedInUserRoleMap)})}),Ln(n?.loggedInUserRole??[],r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"company_details",element:a.jsx(st,{})}),On(n?.loggedInUserRole??[],r)&&a.jsx(k,{path:"billing",element:a.jsx(yt,{})}),Nn(n?.loggedInUserRole??[],u,r)&&a.jsx(k,{path:"integrations",element:a.jsx(St,{})}),a.jsx(k,{path:"my_profile/new/:addressType",element:a.jsx(ce,{appContent:a.jsx(nt,{isSubPage:!1})})}),a.jsx(k,{path:"my_profile",element:a.jsx(ce,{})}),b&&a.jsx(k,{path:"notifications",element:a.jsx(Pt,{})}),a.jsx(k,{path:"*",element:a.jsx(O,{})})]}):a.jsx(z,{children:a.jsx(k,{path:"*",element:a.jsx(O,{})})}):null}function jt(e){return a.jsxs(z,{children:[a.jsx(k,{path:"/",element:a.jsx(pt,{})}),a.jsx(k,{path:"bills/approval-rules/*",element:a.jsx(lt,{})}),a.jsx(k,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?a.jsx(ct,{}):a.jsx(O,{})}),a.jsx(k,{path:"*",element:a.jsx(O,{})})]})}export{da as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-QA8yK6T_.js";import{a as u,R as C,q as A}from"./sentry-DX8X0N2R.js";import{u as z,h as D,j as l,g as M,N as O,l as j}from"./core-OUhaP0nM.js";import{u as P,z as s,E as _,h as E,G as F,N,Q as B,R,S as V,T as $,U as b}from"./index-BjnriIg-.js";import{fB as q,Tb as J,Tr as Q,ge as W,gg as G,Tw as H,gR as K,df as X,Tx as y,Ty as Y,Tz as Z,b_ as v}from"./zeni-epic-state-DzFY1eNZ.js";import"./mui-BtZD__8k.js";import{u as ee}from"./useDeviceId-Bunv1-ta.js";import{f as te}from"./analyticsHelper-CDqT9wg1.js";import{t as ne}from"./getLocaleForTenant-aTGgtilb.js";import"./recharts-CnI5kYGO.js";import"./analytics-drf9tsEq.js";import"./plaid-Bbika4Gn.js";import"./dnd-XtKnRPbJ.js";import"./stripe-cKAAJElX.js";import"./lottie-DaBLQBPb.js";import"./lexical-cGeYDtsl.js";import"./pdf-BMGNA2GO.js";import"./utils-CHDSUF0P.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]="3c764fdf-b2d3-4ae2-bdc8-b6571ebb38f5",t._sentryDebugIdIdentifier="sentry-dbid-3c764fdf-b2d3-4ae2-bdc8-b6571ebb38f5")}catch{}})();const ie=j((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:b.googleClientId,microsoftClientId:b.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:v(c),sourceUri:v(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Y(n,a)))},clearSignInError:()=>{t(y())}}}))($),ae=C.memo(ie);function be({setTenantEmailDomain:t}){const i=z(),d=D(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:h,accountLocked:T,accountUnlockTime:L}=l((e=>e.tenantState)),p=l((e=>e.tenantState.fetchState)),k=l((e=>e.tenantState.activeTenantFetchState.fetchState)),S=l((e=>e.tenantState.signInState)),o=l((e=>e.tenantState.loggedInUser)),r=l((e=>q(e))),I=l((e=>J(e))),m=M(),w=_().mode,U=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect((()=>{h.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[h.fetchState,c]),u.useEffect((()=>{t(void 0)}),[]),u.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&k!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(Q(I.tenantsInOrder),o.zeniSessionId),W(o.userId,o.zeniSessionId,r.tenantId),i(G(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(H("Completed")),F.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),K().then((()=>{const e=V();e!=null&&N(e)})),setTimeout((()=>{E.trackLogin(B.Event.loginSuccess,o.authProvider??"google",X(r.productSettings))}),2e3))}),[S,p,k,o,r,I,w,m.state,i]),S==="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:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),T===!0&&L!=null?f.jsx(R,{onClose:()=>i(y()),unlockDate:L}):null]})}export{be as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-QA8yK6T_.js";import{a as i}from"./sentry-DX8X0N2R.js";import{u as c,g as d,N as u}from"./core-OUhaP0nM.js";import{z as n,h as a,Q as m,a5 as p}from"./index-BjnriIg-.js";import{gU as g,TN as y}from"./zeni-epic-state-DzFY1eNZ.js";import{n as b}from"./mui-BtZD__8k.js";import"./recharts-CnI5kYGO.js";import"./analytics-drf9tsEq.js";import"./plaid-Bbika4Gn.js";import"./dnd-XtKnRPbJ.js";import"./stripe-cKAAJElX.js";import"./lottie-DaBLQBPb.js";import"./lexical-cGeYDtsl.js";import"./pdf-BMGNA2GO.js";import"./utils-CHDSUF0P.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="96b186c5-39ba-4640-9408-426124f45d62",t._sentryDebugIdIdentifier="sentry-dbid-96b186c5-39ba-4640-9408-426124f45d62")}catch{}})();function L(){const t=c(),e=d(),r=i.useRef(!1),f=n.isSignedIn(),o=e.state?.message==="logout"||f;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{t(g()),y(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(l){console.error("Error during sign out:",l)}finally{window.location.replace("/signin/auth")}}}),[o,t]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=b.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
9
|
-
`;export{L as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-QA8yK6T_.js";import{a as T}from"./sentry-DX8X0N2R.js";import{h as pe,u as fe,g as Te,k as ge,j as F,i as _e,l as me}from"./core-OUhaP0nM.js";import{aI as De,aJ as be,z as x,O as Se,y as G,aq as he,a6 as Ee,h as ye,Q as Ae,e1 as Ce,p as R,a2 as Ge}from"./index-BjnriIg-.js";import{fB as Ie,a1a as X,Qm as B,a1b as Y,a16 as Be,PK as M,a1c as Ke,PS as q,Ps as ve,P4 as Le,Qn as V,a1d as W,gd as we,Qd as Re,Qi as Ue,Q5 as Pe,Q3 as J,Qj as Fe,Q0 as je,a1e as xe,a1f as Oe,a1g as $e,a1h as Ne,a1i as I,dt as Qe,ds as ze,a1j as Ze,Pp as Me}from"./zeni-epic-state-DzFY1eNZ.js";import{n as qe}from"./mui-BtZD__8k.js";import{u as Ve}from"./useAskAiCfoHostNavButtonProps-B4mPUD91.js";import{M as We}from"./MobileAppDrawer-DLiH8K3Y.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]="182ee7ef-1dd0-44be-80f3-01f551571ef5",a._sentryDebugIdIdentifier="sentry-dbid-182ee7ef-1dd0-44be-80f3-01f551571ef5")}catch{}})();const c={TASK_CREATED:"task-created",TASK_UPDATED:"task-updated",TASK_SNOOZE_RESURFACED:"task-snooze-resurfaced",TASKS_BULK_UPDATED:"tasks-bulk-updated",TASKS_BULK_DELETED:"tasks-bulk-deleted"},Je=(a,e)=>a==null||a===""?[]:e.map((n=>`private-encrypted-${a}.${n}`)),He=(a,e)=>a==null||a===""?[]:e.map((n=>`private-encrypted-${a}.${n}`)),U=a=>Array.isArray(a)&&a.every((e=>typeof e=="string")),Xe=a=>{if(a==null||typeof a!="object")return null;const e=a,n=typeof e.task_id=="string"?e.task_id:typeof e.id=="string"?e.id:null;if(n==null||typeof e.tenant_id!="string"||typeof e.event_type!="string")return null;const o={task_id:n,tenant_id:e.tenant_id,event_type:e.event_type};return typeof e.is_private=="boolean"&&(o.is_private=e.is_private),U(e.assignees)&&(o.assignees=e.assignees),U(e.direct_assignees)&&(o.direct_assignees=e.direct_assignees),typeof e.created_by=="string"&&(o.created_by=e.created_by),U(e.task_group_ids)&&(o.task_group_ids=e.task_group_ids),typeof e.name=="string"&&(o.name=e.name),typeof e.parent_task_id=="string"&&(o.parent_task_id=e.parent_task_id),o},Ye=a=>{if(a==null||typeof a!="object")return null;const e=a;return U(e.task_ids)?{task_ids:e.task_ids}:null},pa=a=>{if(a==null||typeof a!="object")return null;const e=a;return typeof e.task_id!="string"?null:{task_id:e.task_id}},ea=a=>{const{events:e,onEvent:n,onSubscribed:o}=a,i=De(),g=T.useRef(n),l=T.useRef(o),_=T.useRef(0);T.useEffect((()=>{g.current=n}),[n]),T.useEffect((()=>{l.current=o}),[o]);const t=T.useMemo((()=>[...e].sort().join("|")),[e]);T.useEffect((()=>{if(i==null||e.length===0)return;const s=[],p=new Set,S=()=>{if(l.current==null)return;const m=Date.now();m-_.current<5e3||(_.current=m,l.current())};return e.forEach((m=>{const[D,b]=be(m);if(b==="")return;const E=i.channel(D),y=f=>{g.current(b,f)};let k;if(E?.subscribed===!0){if(k=E,k.bind(b,y),!p.has(D)){p.add(D),S();const f=()=>{S()};k.bind("pusher:subscription_succeeded",f),s.push((()=>{k.unbind("pusher:subscription_succeeded",f)}))}s.push((()=>{E.unbind(b,y)}))}else{if(k=E??i.subscribe(D),k.bind(b,y),!p.has(D)){p.add(D);const f=()=>{S()};k.bind("pusher:subscription_succeeded",f),s.push((()=>{k.unbind("pusher:subscription_succeeded",f)}))}s.push((()=>{k.unbind(b,y)}))}})),()=>{s.forEach((m=>m()))}}),[i,t])},aa=qe.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: ${a=>a.theme.colors.grey4};
|
|
9
|
-
`,ta=me((function(a,e){const n=X(a,e.isTaskTemplatesEnabled),{taskGroupId:o}=e,i=o!=null&&o!==""?{...n,taskGroupsWithTasksList:n.taskGroupsWithTasksList.map((t=>({...t,tasks:t.tasks.filter((s=>s.taskGroupIds.includes(o)))}))).filter((t=>t.tasks.length>0))}:n,g=Be(a),l=x.isZeniUser(),_=a.taskDetailState?.subTaskCreateStatus?.fetchState;return{taskListView:i,tagListView:g,localData:i.localData,isTaskTemplatesEnabled:e.isTaskTemplatesEnabled,isZeniUser:l,subTaskCreateStatus:_}}),(function(a,e){const{navigate:n,currentTenant:o,location:i,isTaskTemplatesEnabled:g}=e,{tenantEmailDomain:l}=o,{groupByKey:_}=e.uiState;return{onTaskManagementRowClick:t=>{const s=H(l,t),p=R(i.state?.pathnameStackToGoBack,i.pathname);n(s,{state:{pathnameStackToGoBack:p}})},onReloadTasks:()=>{a(B(!0,g))},onTabChange:t=>{a(Ne(t))},onParentTaskClick:t=>{const s=H(l,t);window.open(s,"_blank","noopener")},bulkUpdateTasks:(t,s)=>{a(J(t,null,s))},onNewTaskClick:()=>{if(e.localData.defaultTaskGroupId!=null){const t=j(l,e.localData.defaultTaskGroupId),s=R(i.state?.pathnameStackToGoBack,i.pathname);n(t,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(t,s)=>{a(W({uiState:{sortKey:t,sortOrder:s}}))},onFiltersChange:t=>{a($e({filters:t}))},onSearchTextChanged:t=>{a(Oe({searchText:t}))},onReloadCards:()=>{a(B(!0,g))},onBackClick:()=>{if(i.state?.message==="triggerBackClick"){const t=Ge(i.state?.pathnameStackToGoBack),s=t.poppedPathname??"../";n(s,{state:{pathnameStackToGoBack:t.newStack}})}else n("../")},updateLocalData:t=>{a(xe({localData:t}))},resetLocalData:()=>{a(Y({taskGroupById:e.taskGroupState.taskGroupById}))},handleCreateGroup:t=>{a(je(e.localData.newTaskGroupName,t))},assignGroupToTasks:t=>{a(J(e.localData.selectedTaskIds,t,Fe(e.uiState.groupByKey,t)))},onDeleteTaskGroup:t=>{a(Pe(t))},onAddNewTaskToTaskGroup:t=>{if(e.localData.defaultTaskGroupId!=null){const s=na(_,t);a(M({taskDetailLocalData:s}));const p=j(l,e.uiState.groupByKey==="groupName"?t:e.localData.defaultTaskGroupId),S=R(i.state?.pathnameStackToGoBack,i.pathname);n(p,{state:{pathnameStackToGoBack:S,message:"comingFromTaskListPage"}})}},onDragNDrop:(t,s)=>{a(Ue(e.localData.selectedTaskIds.length>0?e.localData.selectedTaskIds:[t],s))},onTaskGroupRename:(t,s)=>{a(Re(t,s))},onTimeSpentUpdate:(t,s)=>{a(V({task:t,updates:s}))},onShowToast:t=>{a(we(t))},onGroupByFilterChange:t=>{a(W({uiState:{groupByKey:t}}))},updateTask:(t,s)=>{a(V({task:t,updates:s}))},onCreateTagClick:(t,s)=>{a(Le(t,s))},onSubtaskCreation:(t,s)=>{a(ve({...s,parentTaskId:t}))},handleGroupTemplateClick:t=>{a(q(t,[]))},handleGroupTemplateTaskClick:(t,s)=>{a(q(t,[s]))},handleNewTaskInitialization:t=>{if(a(M({taskDetailLocalData:{...Ke,name:t}})),e.localData.defaultTaskGroupId!=null){const s=j(l,e.localData.defaultTaskGroupId),p=R(i.state?.pathnameStackToGoBack,i.pathname);n(s,{state:{pathnameStackToGoBack:p,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:t=>{n(`/${l}/tasks/group/${t}`)},onQuickResponsesClick:()=>{n(`/${l}/tasks/quick-responses`)}}}))(Ce);function sa(){const a=pe(),e=fe(),n=Te(),o=x.getSignedInUser(),i=x.isZeniUser(),g=ge(),l=F((u=>Ie(u))),{taskGroupId:_}=_e(),{useFeatureGate:t}=Se(),{isFeatureEnabled:s}=t(G.isTaskTemplatesEnabled),{isFeatureEnabled:p}=t(G.isTaskCannedResponsesEnabled),{isFeatureEnabled:S}=t(G.isTaskCategorizationEnabled),{isFeatureEnabled:m}=t(G.isTaskBulkResolutionEnabled),{isFeatureEnabled:D}=t(G.isTaskGroupAssigneesEnabled),{isFeatureEnabled:b}=t(G.isTaskRecurringParentEnabled),[E,y]=T.useState(!1),k=F((u=>X(u,s))),f=F((u=>u.taskGroupState)),K=k.fetchState,{isAiCfoAccessEnabled:ee,onAskAiCfoClick:ae}=Ve({mobileExploreReferrer:"Task Checklist"});he({isDataReady:K==="Completed"}),T.useEffect((()=>{e(B(!1,s))}),[l?.tenantId,e,s]);const te=T.useMemo((()=>{const u=[c.TASK_CREATED,c.TASK_UPDATED,c.TASKS_BULK_UPDATED,c.TASKS_BULK_DELETED],A=[c.TASK_CREATED,c.TASK_UPDATED,c.TASK_SNOOZE_RESURFACED,c.TASKS_BULK_UPDATED];return[...Je(l?.companyId,u),...He(o?.userId,A)]}),[l?.companyId,o?.userId]);if(ea({events:te,onEvent:(u,A)=>{switch(u){case c.TASK_CREATED:case c.TASK_UPDATED:{const r=Xe(A);if(r!=null){const w=g.getState(),O=r.task_id,h=O!=null?w.taskState.taskByID?.[O]:void 0,P=h!=null;if(!i)if(r.is_private===!0){if(!P)return}else{const v=o?.userId,L=new Set([...r.assignees??[],...r.direct_assignees??[]]);if(r.created_by!=null&&r.created_by!==""&&L.add(r.created_by),!(v!=null&&L.has(v))&&!P)return}if(u===c.TASK_UPDATED&&P&&h!=null&&Array.isArray(r.task_group_ids)){const v=new Set(Object.values(w.taskGroupState.taskGroupById??{}).filter((d=>d!=null&&!d.isDeleted)).map((d=>d.id))),L=(h.taskGroupIds??[]).filter((d=>v.has(d))),$=(r.task_group_ids??[]).filter((d=>v.has(d))),se=L.length===$.length&&L.every((d=>$.includes(d))),N=h.taskGroupIds??[],Q=r.task_group_ids??[],ne=N.length!==Q.length||!N.every((d=>Q.includes(d))),oe=(d,de)=>{const z=d??[],Z=de??[];if(z.length!==Z.length)return!1;const ce=new Set(Z);return z.every((ke=>ce.has(ke)))},re=r.name==null||r.name===h.name,ie=r.is_private==null||r.is_private===h.isPrivate,le=r.assignees==null||oe(r.assignees,h.assignees),ue=r.direct_assignees==null;if(se&&ne&&re&&ie&&le&&ue)return}}return void e(B(!0,s))}case c.TASKS_BULK_DELETED:{const r=Ye(A);return r==null?void 0:void r.task_ids.forEach((w=>e(Me(w))))}case c.TASKS_BULK_UPDATED:case c.TASK_SNOOZE_RESURFACED:return void e(B(!0,s))}},onSubscribed:()=>{e(B(!0,s))}}),T.useEffect((()=>{K==="Completed"&&e(Y({taskGroupById:f.taskGroupById}))}),[K,f.taskGroupById]),o==null)throw Error("Can't access task list page without signing in...");return C.jsxs(C.Fragment,{children:[K==="Completed"?C.jsx(Ee,{analytics:ye,onLoad:u=>(A=>A.trackPageLoaded(Ae.Event.taskListPage))(u)}):null,C.jsxs(aa,{children:[C.jsx(We,{isAppContentDrawerOpen:E,handleDrawerToggle:u=>{y(u)}}),C.jsx(ta,{location:n,navigate:a,currentTenant:l,taskGroupId:_,taskGroupState:f,localData:k.localData,uiState:k.uiState,isTaskTemplatesEnabled:s,taskListFetchState:K,isTaskCategorizationEnabled:S,isTaskCannedResponsesEnabled:p,isTaskBulkResolutionEnabled:m,isTaskGroupAssigneesEnabled:D,isTaskRecurringParentEnabled:b,isAiCfoAccessEnabled:ee,onAskAiCfoClick:ae})]})]})}const H=(a,e)=>`/${a}/tasks/${encodeURIComponent(e)}`,j=(a,e)=>`/${a}/tasks/new/${e}`,na=(a,e)=>{if(a==="assignee"){const n=e.split(",");return{...I.taskDetailLocalData,assignee:n}}if(a==="priority"){const n=Qe(e);return{...I.taskDetailLocalData,priority:n}}if(a==="status"){const n=ze(e);return{...I.taskDetailLocalData,status:n}}if(a==="tag"){const n=e.split(",");return{...I.taskDetailLocalData,tagIds:n}}if(a==="dueDate"){const n=Ze(e);return{...I.taskDetailLocalData,dueDate:n}}return{...I.taskDetailLocalData}},fa=Object.freeze(Object.defineProperty({__proto__:null,default:sa},Symbol.toStringTag,{value:"Module"}));export{c as T,He as a,Je as b,Ye as c,Xe as d,sa as e,fa as f,pa as t,ea as u};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-QA8yK6T_.js";import ue from"./NotFoundScreen-CBOeKuhG.js";import{a as k}from"./sentry-DX8X0N2R.js";import{h as H,u as ee,j as E,g as de,i as ke,N as pe,l as me,n as Se,o as b}from"./core-OUhaP0nM.js";import{Ph as ae,Pk as fe,Pe as Te,Z1 as ge,fB as te,a16 as se,PG as g,Py as T,Pb as he,Qa as be,Q3 as Ee,a17 as ne,gd as oe,a18 as q,P7 as Ie,P4 as De,ui as Ce,u6 as Ge,mv as Pe,Pw as _e,a19 as ye,Qn as Re,Ps as Ue,PR as Be,PO as we,Pn as xe,PL as ve,PK as Ae}from"./zeni-epic-state-DzFY1eNZ.js";import{z as _,d$ as je,_ as Le,O as Fe,y as G,a2 as ie,p as P,a6 as Ke,h as M,Q as $e,e0 as Ne,U as Q,ac as Oe}from"./index-BjnriIg-.js";import{n as ze}from"./mui-BtZD__8k.js";import{u as Ve}from"./useInitialThreadRequest-BR_6LodZ.js";import{M as Ze}from"./MobileAppDrawer-DLiH8K3Y.js";import{b as qe,a as Me,u as Qe,T as f,t as Je,c as J,d as W,e as We}from"./TaskListScreen-D13comxS.js";import"./recharts-CnI5kYGO.js";import"./analytics-drf9tsEq.js";import"./plaid-Bbika4Gn.js";import"./dnd-XtKnRPbJ.js";import"./stripe-cKAAJElX.js";import"./lottie-DaBLQBPb.js";import"./lexical-cGeYDtsl.js";import"./pdf-BMGNA2GO.js";import"./utils-CHDSUF0P.js";import"./InboxNotificationsProvider-Y2y35nP6.js";import"./useTaskManagerAccess-3mEVnK_N.js";import"./useAskAiCfoHostNavButtonProps-B4mPUD91.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]="02bfca09-489a-40b1-88b7-6d4cf27daca9",e._sentryDebugIdIdentifier="sentry-dbid-02bfca09-489a-40b1-88b7-6d4cf27daca9")}catch{}})();function Xe(){const e=H(),a=ee(),n=_.getSignedInUser(),{cannedResponses:c,fetchState:s,saveFetchState:u}=E((o=>o.cannedResponsesState)),d=k.useCallback((()=>{a(ae())}),[a]),m=k.useCallback(((o,I,D)=>{a(fe({name:o,content:I,cannedResponseId:D}))}),[a]),t=k.useCallback((o=>{a(Te({cannedResponseId:o}))}),[a]);if(n==null)throw Error("Can't access quick responses page without signing in...");return r.jsx(je,{cannedResponses:c,isLoading:s==="In-Progress"||s==="Not-Started",isSaving:u==="In-Progress",onBackClick:()=>e(-1),onDelete:t,onFetch:d,onSave:m})}const F=e=>e?.taskState?.taskByID,j=(e,a)=>{const n=F(e);if(a!=null&&n!=null)return n[a]?.parentTaskId??void 0},Ye=ge([j,(e,a)=>{const n=j(e,a),c=F(e);if(n!=null&&c!=null)return c[n]?.name},(e,a)=>{const n=j(e,a),c=F(e);return n!=null&&c!=null&&c[n]!=null}],((e,a,n)=>{if(e!=null&&n===!0)return{id:e,name:a??""}}));let X,Y=[];const He=me((function(e,a){const{location:n,taskGroupId:c}=a,s=ne(e,a.taskId),u=te(e),d=Ye(e,a.taskId),m=s.taskGroupId??c,t=m!=null?q(e.taskGroupState,m):void 0,o=_.getSignedInUser(),I=u.tenantId,D={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:I??""},B=se(e),{tenantEmailDomain:w}=u,y=s.recurringSourceTaskId,x=y!=null?`${Q.appUrl}/${w}/tasks/${encodeURIComponent(y)}`:void 0;var h;return{taskDetailSelectorView:s,authParams:D,isZeniUser:_.isZeniUser(),userGroupList:((h=e.userGroupsState.userGroupByUserGroupId)!==X&&(X=h,Y=Object.values(h)),Y),isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:Oe.fileMicroServiceBaseUrl,companyName:a.currentTenant.companyName,companyId:a.currentTenant.companyId,currentUrl:`${Q.appUrl}${a.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:x,tagListView:B,taskGroupName:m!=null&&t!=null&&t.isDefault===!1?t.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((S=>q(e.taskGroupState,S))).filter((S=>S!=null&&!S.isDeleted)).map((S=>({id:S.id,name:S.name,isDefault:S.isDefault}))),subtasks:s.subtasks,parentTaskRef:d,subTaskCreateStatus:e.taskDetailState?.subTaskCreateStatus?.fetchState}}),(function(e,a){const{taskId:n,navigate:c,currentTenant:s,location:u,taskGroupId:d}=a,{tenantEmailDomain:m}=s;return{onSaveChangesToLocalStore:t=>{e(Ae({taskDetailLocalData:t,taskId:n}))},onSaveDetailClick:t=>{e(ve(n,t??d))},onArchiveTaskClick:()=>{a.taskId!=null&&e(xe(a.taskId))},onSnoozeTask:(t,o)=>{e(we(t,o))},onUnsnoozeTask:t=>{e(Be(t))},onCreateSubtask:(t,o)=>{e(Ue({...o,parentTaskId:t}))},onSubtaskUpdate:(t,o)=>{e(Re({task:t,updates:o}))},onShowToast:t=>{e(oe(t))},onSubtaskRowClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:P(u.state?.pathnameStackToGoBack,u.pathname)}})},onParentBreadcrumbClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:P(u.state?.pathnameStackToGoBack,u.pathname)}})},onDismissClick:()=>{if(u.state?.message==="triggerBackClick"){const t=ie(u.state?.pathnameStackToGoBack),o=t.poppedPathname??"../../dashboard";c(o,{state:{pathnameStackToGoBack:t.newStack}})}else{const t=U(m),o=P(u.state?.pathnameStackToGoBack,u.pathname);c(t,{state:{pathnameStackToGoBack:o}})}e(ye({taskId:n}))},onDeleteTaskClick:()=>{e(_e(n))},updateFilesEntity:t=>{e(Pe({files:t}))},onDeleteFile:t=>{e(Ge(t))},onEditFileName:(t,o)=>{e(Ce(t,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(g(!1,n))},onCreateTagClick:t=>{e(De(t,n))},onDeleteTagClick:t=>{e(Ie(t,n))},onFetchCannedResponses:()=>{e(ae())},onManageTemplatesClick:()=>{c(`/${s.tenantEmailDomain}/tasks/quick-responses`)}}}))(Ne);function L(){const e=H(),a=ee(),n=de(),c=Le(),{taskId:s,taskGroupId:u}=ke(),d=E((i=>te(i))),m=Ve(d?.companyId),{useFeatureGate:t}=Fe(),{isFeatureEnabled:o}=t(G.isTaskSnoozeEnabled),{isFeatureEnabled:I}=t(G.isTaskVisibilityEnabled),{isFeatureEnabled:D}=t(G.isTaskCannedResponsesEnabled),{isFeatureEnabled:B}=t(G.isTaskRecurringParentEnabled),{isFeatureEnabled:w}=t(G.isTaskGroupAssigneesEnabled),[y,x]=k.useState(!1),[h,S]=k.useState(!1),[K,re]=k.useState(!1),[$,v]=k.useState(!1),C=k.useRef(!1),R=E((i=>i.taskListState.updateTasksFetchState.fetchState)),N=E((i=>se(i))),O=E((i=>i.taskGroupViewState.fetchState));k.useEffect((()=>{a(g(!1,s)),s!=null&&a(T(s))}),[a,s]);const z=_.getSignedInUser()?.userId,ce=k.useMemo((()=>{const i=[f.TASK_CREATED,f.TASK_UPDATED,f.TASKS_BULK_UPDATED,f.TASKS_BULK_DELETED],l=[...i,f.TASK_SNOOZE_RESURFACED];return[...qe(d?.companyId,i),...Me(z,l)]}),[d?.companyId,z]);Qe({events:ce,onSubscribed:()=>{s!=null&&(a(g(!0,s)),a(T(s)))},onEvent:(i,l)=>{if(s!=null)switch(i){case f.TASK_CREATED:{W(l)?.parent_task_id===s&&(a(g(!0,s)),a(T(s)));break}case f.TASK_UPDATED:{const p=W(l);if(p==null)break;p.task_id===s?(a(g(!0,s)),a(T(s))):p.parent_task_id===s&&a(T(s));break}case f.TASKS_BULK_UPDATED:{const p=J(l);if(p==null)break;p.task_ids.includes(s)&&a(g(!0,s)),a(T(s));break}case f.TASKS_BULK_DELETED:{const p=J(l);if(p==null)break;if(p.task_ids.includes(s)){a(oe({messageSection:"delete_task",messageText:"success",type:"success"})),d?.tenantEmailDomain!=null&&e(U(d.tenantEmailDomain));break}a(T(s));break}case f.TASK_SNOOZE_RESURFACED:{Je(l)?.task_id===s&&a(g(!0,s));break}}}}),k.useEffect((()=>{h||N.fetchState==="Completed"||(S(!0),a(he()))}),[h,a,N.fetchState]),k.useEffect((()=>{K||O==="Completed"||(re(!0),a(be()))}),[K,a,O]);const le=k.useCallback((()=>{s!=null&&(C.current=!1,a(Ee([s],null,{isArchived:!1})),v(!0))}),[a,s]);k.useEffect((()=>{if($)if(R!=="In-Progress"){if(C.current){if(R==="Error")return v(!1),void(C.current=!1);if(R==="Completed"){v(!1),C.current=!1;const{tenantEmailDomain:i}=d;if(n.state?.message==="triggerBackClick"){const l=ie(n.state?.pathnameStackToGoBack);e(l.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:l.newStack}})}else{const l=U(i);e(l,{state:{pathnameStackToGoBack:P(n.state?.pathnameStackToGoBack,n.pathname)}})}}}}else C.current=!0}),[$,R,d,n,e]);const V=E((i=>ne(i,s))),A=V.fetchState,Z=_.getSignedInUser();if(Z==null)throw Error("Can't access task detail page without signing in...");if(A==="Error"&&V.error?.code===400){const{tenantEmailDomain:i}=d,l=U(i),p=P(n.state?.pathnameStackToGoBack,n.pathname);return r.jsx(pe,{to:l,state:{pathnameStackToGoBack:p}})}return r.jsxs(r.Fragment,{children:[A==="Completed"?r.jsx(Ke,{analytics:M,onLoad:i=>(l=>l.trackPageLoaded($e.Event.taskDetailPage))(i)}):null,r.jsxs(ea,{children:[r.jsx(Ze,{isAppContentDrawerOpen:y,handleDrawerToggle:i=>{x(i)}}),r.jsx(He,{analytics:M,currentTenant:d,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:m,location:n,loggedInUser:Z,navigate:e,taskGroupId:u,taskId:s,taskDetailFetchState:A,onUnarchiveTaskClick:le,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:I,isTaskCannedResponsesEnabled:D,isTaskRecurringParentEnabled:B,isTaskGroupAssigneesEnabled:w})]})]})}const ea=ze.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
|
-
`,U=e=>`/${e}/tasks`;function Da(){return r.jsxs(Se,{children:[r.jsx(b,{path:"/new",element:r.jsx(L,{})}),r.jsx(b,{path:"/new/:taskGroupId",element:r.jsx(L,{})}),r.jsx(b,{path:"/group/:taskGroupId",element:r.jsx(We,{})}),r.jsx(b,{path:"/quick-responses",element:r.jsx(Xe,{})}),r.jsx(b,{path:"/:taskId",element:r.jsx(L,{})}),r.jsx(b,{path:"*",element:r.jsx(ue,{})})]})}export{Da as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-QA8yK6T_.js";import i from"./NotFoundScreen-CBOeKuhG.js";import{T as r}from"./TransactionDetailScreen-B1_fDc_7.js";import"./sentry-DX8X0N2R.js";import{n as a,o}from"./core-OUhaP0nM.js";import"./zeni-epic-state-DzFY1eNZ.js";import"./recharts-CnI5kYGO.js";import"./index-BjnriIg-.js";import"./mui-BtZD__8k.js";import"./analytics-drf9tsEq.js";import"./plaid-Bbika4Gn.js";import"./dnd-XtKnRPbJ.js";import"./stripe-cKAAJElX.js";import"./lottie-DaBLQBPb.js";import"./lexical-cGeYDtsl.js";import"./pdf-BMGNA2GO.js";import"./utils-CHDSUF0P.js";import"./useAskAiCfoHostNavButtonProps-B4mPUD91.js";import"./decodeURIComponentSafe-CoJI0rbl.js";import"./useInitialThreadRequest-BR_6LodZ.js";import"./routePaths-Cz-sxWeK.js";import"./expenseAutomationHelper-DlI9q6Vn.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]="9520d72a-46e5-44e2-9697-a97671635162",e._sentryDebugIdIdentifier="sentry-dbid-9520d72a-46e5-44e2-9697-a97671635162")}catch{}})();function z(){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{z as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-QA8yK6T_.js";import{h as Z,g as q,u as K,i as Q,j as g,N,l as H,n as Me,o as C}from"./core-OUhaP0nM.js";import{fB as W,tx as ee,lb as p,et as te,Rk as Se,br as pe,_U as Be,lX as ae,Vz as ne,_V as fe,_W as Le,bE as k,Rg as he,_X as Fe,_Y as Te,_Z as Oe,Rj as ge,__ as Ge,_$ as De,$0 as we,$1 as Ie,$2 as $e,$3 as ze,$4 as ye,Sw as _e}from"./zeni-epic-state-DzFY1eNZ.js";import{O as ce,y as U,h as F,G as ke,da as oe,p as z,a2 as se,ao as Re,W as Ve}from"./index-BjnriIg-.js";import"./mui-BtZD__8k.js";import{a as y}from"./sentry-DX8X0N2R.js";import{w as ie}from"./withTransactionSidePanel-DRyJqOb1.js";import{p as re,c as de}from"./routePaths-Cz-sxWeK.js";import{w as Je}from"./utils-CHDSUF0P.js";import{d as j}from"./decodeURIComponentSafe-CoJI0rbl.js";import{Z as Ue}from"./ZeniAccountStatementScreen-CTIued6H.js";import"./recharts-CnI5kYGO.js";import"./analytics-drf9tsEq.js";import"./plaid-Bbika4Gn.js";import"./dnd-XtKnRPbJ.js";import"./stripe-cKAAJElX.js";import"./lottie-DaBLQBPb.js";import"./lexical-cGeYDtsl.js";import"./pdf-BMGNA2GO.js";import"./useAskAiCfoHostNavButtonProps-B4mPUD91.js";import"./TransactionDetailScreen-B1_fDc_7.js";import"./useInitialThreadRequest-BR_6LodZ.js";import"./expenseAutomationHelper-DlI9q6Vn.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]="52b03c8f-d01a-466e-8745-49d179c98653",a._sentryDebugIdIdentifier="sentry-dbid-52b03c8f-d01a-466e-8745-49d179c98653")}catch{}})();const qe=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],J=a=>Je(a),Ye=()=>{const{common:a,uncategorizedTransactionList:e}=ke.getLocalizedStrings();return{amount:e.missingReceipt.missingReceiptMinAmount.amount,currencyCode:a.currency.currencyCode,currencySymbol:a.currency.currencySymbol}},Ne=H((function(a,e){const t=Be(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,J(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=J(e.selectedAccount.tranListType),d=Ze(t,n,c,o,e.bookCloseDate);F.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(fe({uiState:{dateRange:d},type:J(e.selectedAccount.tranListType)})),a(Se(o,p(d),!1,o==="missingReceipts"?Ye():void 0)),e.onSelectedTimePeriodChange(p(d))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=z(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({uiState:{scrollYOffset:t},type:J(e.selectedAccount.tranListType)}))}}}))(oe),V=ie((function({...a}){const e=Z(),t=q(),n=K(),c=t.pathname.split("/").find((l=>qe.includes(l))),o=c??"uncategorized-expense",{tenantEmailDomain:d}=Q(),{accountType:Y,title:b,subTitle:A}=We(o),f="month",T=g((l=>W(l))),v=T.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:S}=ce(),{isFeatureEnabled:h}=S(U.isProjectsTransactionsEnabled),I=g((l=>ee(l)))&&h,{dataAvailable:x,initialTimeframeTick:O}=Xe(o,v,T.bookCloseDate),[P,G]=y.useState(!1),[E,w]=y.useState(void 0),u=y.useMemo((()=>{const l=p(O);return{tranListType:o,accountType:te(Y),title:b,subTitle:A,timeframe:f,period:l}}),[o,f,Y,x]);y.useEffect((()=>{if(!P&&u!=null){G(!0),F.trackTransactionList(void 0,void 0,void 0,u.title);const l=J(u.tranListType);n(Se(l,u.period,!0,l==="missingReceipts"?Ye():void 0))}}),[P,u,n]);let M=u;return u!=null&&E!=null&&(M={...u,period:E}),c==null||M==null?s.jsx(N,{to:"../"}):s.jsx(Ne,{firstMonthOfFY:v,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:x,navigate:e,showProjectField:I,selectedAccount:M,referrerType:o,bookCloseDate:T.bookCloseDate,onSelectedTimePeriodChange:l=>w(l),...a})})),We=a=>{let e="",t="";const n=ke.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.common.texts.uncategorizedExpenses;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.common.texts.receipts}return{accountType:e,title:t,subTitle:""}},Xe=(a,e,t)=>{const n=pe();let c=pe().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:re(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ze=(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},Ke=H((function(a,e){const t=Fe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??be();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(he(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=z(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(oe),Qe=ie((function({referrerType:a,...e}){const t=Z(),n=q(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,classIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=Q(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),O=g((r=>Le(r.transactionListState,h,S,I))),[P,G]=y.useState(!1),[E,w]=y.useState(void 0),u=g((r=>W(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(U.isProjectsTransactionsEnabled),$=g((r=>ee(r)))&&m;let i;const L=He(S,h,I,A,f,T,x);if(L){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},R=et(O?.dateRange,r);i={accountId:h,accountType:te(S),classId:I,title:x,timeframe:A,period:R}}y.useEffect((()=>{P||i==null||(G(!0),F.trackTransactionList(i.accountId,void 0,a,i.title),c(he(i.accountId,i.accountType,i.classId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const _=[d,Y,b,A,f,T,v].filter((r=>r!=null));return L&&B!=null?s.jsx(Ke,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:$,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>w(r),...e}):s.jsx(N,{to:be(_.length)})})),be=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},He=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),tt=H((function(a,e){const t=Ge(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ve();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=z(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(oe),at=ie((function({referrerType:a,...e}){const t=Z(),n=q(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,projectIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=Q(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),O=g((r=>Oe(r.transactionListState,h,S,I))),[P,G]=y.useState(!1),[E,w]=y.useState(void 0),u=g((r=>W(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(U.isProjectsTransactionsEnabled),$=g((r=>ee(r)))&&m;let i;const L=nt(S,h,I,A,f,T,x);if(L){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},R=ct(O?.dateRange,r);i={accountId:h,accountType:te(S),projectId:I,title:x,timeframe:A,period:R}}y.useEffect((()=>{P||i==null||(G(!0),F.trackTransactionList(i.accountId,void 0,a,i.title),c(ge(i.accountId,i.accountType,i.projectId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const _=[d,Y,b,A,f,T,v].filter((r=>r!=null));return L&&B!=null?s.jsx(tt,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:$,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>w(r),...e}):s.jsx(N,{to:ve(_.length)})})),ve=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},nt=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,ct=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),ot=H((function(a,e){const t=$e(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ze(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Pe();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)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(Ie(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=z(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=rt(e.tenantEmailDomain),n=z(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(oe),Ae=ie((function({referrerType:a,...e}){const t=Z(),n=q(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,timeframe:b,startDate:A,endDate:f,titleEncoded:T,excludeSubAccounts:v}=Q(),S=j(d??""),h=j(Y??""),I=j(T??""),x=!(v!=null&&v==="exclude_subaccounts"),O=g((D=>we(D.transactionListState,h,S))),[P,G]=y.useState(!1),[E,w]=y.useState(void 0),u=g((D=>W(D))),M=u.company?.featuresActivationInfo.connectedAccountProvider==="unit",l=u.company?.companyInfo.firstMonthOfFY??1;let m;const $=st(S,h,b,A,f,I);if($){const D={startDate:k(A,"YYYY-MM-DD"),endDate:k(f,"YYYY-MM-DD")},le=it(O?.dateRange,D);m={accountId:h,accountType:te(S),title:I,timeframe:b,period:le}}let i=m;m!=null&&E!=null&&(i={...m,period:E});const{useFeatureGate:L}=ce(),{isFeatureEnabled:B}=L(U.isTransactionCommentingEnabled),_=y.useCallback(((D,le)=>{if(o==null)return;const me=D.url.split(`/${o}/`)[1];if(me==null)return;const[je,xe]=me.split("?"),X=new URLSearchParams(xe??"");X.set("view","full"),X.set("thread_id",le),X.set("entity_type",D.entityType);const Ce=z(n.state?.pathnameStackToGoBack,n.pathname);t(`/${o}/${je}?${X.toString()}`,{state:{pathnameStackToGoBack:Ce}})}),[t,o,n.state,n.pathname]),{isFeatureEnabled:r}=L(U.isProjectsTransactionsEnabled),R=g((D=>ee(D)))&&r,{areTenantIdsInSync:ue}=Re();y.useEffect((()=>{!P&&m!=null&&ue&&(G(!0),F.trackTransactionList(m.accountId,void 0,a,m.title),c(Ie(m.accountId,m.accountType,m.period,void 0,!1,x)))}),[P,m,c,ue]);const Ee=[d,Y,b,A,f,T].filter((D=>D!=null));return $&&i!=null?s.jsx(ot,{firstMonthOfFY:l,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:M,isTransactionCommentingEnabled:B,onCommentThreadClick:_,showProjectField:R,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:D=>w(D),...e}):s.jsx(N,{to:Pe(Ee.length)})})),Pe=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},st=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&k(n,"YYYY-MM-DD").isValid()&&k(c,"YYYY-MM-DD").isValid()&&o!=null,it=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),rt=a=>`/${a}/transactions/${_e}/statements`;function Mt(){const a=q().state?.referrer,e=g((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[g((n=>W(n))).tenantId],t=Ve();return s.jsxs(Me,{children:[s.jsx(C,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/zeni-clearing-account/statements",element:s.jsx(Ue,{})}),s.jsx(C,{path:"/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/uncategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/uncategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/missing-receipts/*",element:t?s.jsx(N,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(C,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Qe,{referrerType:a})}),s.jsx(C,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(at,{referrerType:a})})]})}export{Mt as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-QA8yK6T_.js";import{a as l}from"./sentry-DX8X0N2R.js";import{t as u,u as h,j as y,N as I}from"./core-OUhaP0nM.js";import{TK as w,ge as b,IR as j}from"./zeni-epic-state-DzFY1eNZ.js";import{z as f,a5 as x,ad as S,ae as D}from"./index-BjnriIg-.js";import{n as c}from"./mui-BtZD__8k.js";import"./recharts-CnI5kYGO.js";import"./analytics-drf9tsEq.js";import"./plaid-Bbika4Gn.js";import"./dnd-XtKnRPbJ.js";import"./stripe-cKAAJElX.js";import"./lottie-DaBLQBPb.js";import"./lexical-cGeYDtsl.js";import"./pdf-BMGNA2GO.js";import"./utils-CHDSUF0P.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]="874d1604-504d-4ce6-8e1c-3ae6d9435982",e._sentryDebugIdIdentifier="sentry-dbid-874d1604-504d-4ce6-8e1c-3ae6d9435982")}catch{}})();const B=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=l.useState(!1),a=h(),i=y((m=>w(m))),r=f.getSignedInUser(),d=f.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 b(r.userId,r.zeniSessionId,d?.tenantId),l.useEffect((()=>{n||(p(!0),a(j(t,g,s)))}),[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(T,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=c.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
|
-
`,T=c(D.LargeRegular)`
|
|
10
|
-
display: flex;
|
|
11
|
-
color: ${S.important};
|
|
12
|
-
`;export{B as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-QA8yK6T_.js";import{a as u}from"./sentry-DX8X0N2R.js";import{h as x,u as $,g as j,i as v,j as p}from"./core-OUhaP0nM.js";import{Sw as s,Sv as B,_P as C,fB as E,_Q as P}from"./zeni-epic-state-DzFY1eNZ.js";import{$ as T,ac as g,E as _,z,a5 as D,d2 as L,a2 as N}from"./index-BjnriIg-.js";import{n as U}from"./mui-BtZD__8k.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]="321bb31c-edf5-47ed-a612-cbf97cee41c0",e._sentryDebugIdIdentifier="sentry-dbid-321bb31c-edf5-47ed-a612-cbf97cee41c0")}catch{}})();const G=U.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;function F(){const e=x(),n=$(),d=T(),l=j();let{accountId:a}=v(),f=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,f=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[m,b]=u.useState(!1),h=_();u.useEffect((()=>{m||(b(!0),n(B(a??"",!1)))}),[m,n]);const o=p((t=>C(t,a??""))),y=()=>{const t=N(l.state?.pathnameStackToGoBack),k=t.poppedPathname??"..";e(k,{state:{pathnameStackToGoBack:t.newStack}})},c=z.getSignedInUser(),r=p((t=>E(t))),I={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:r.tenantId??""},w=P(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",S=r.company?.companyInfo.companyLegalName??r.companyName;if(c==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(D,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):i.jsx(G,{windowSize:d,children:i.jsx(L,{currentTenantCompanyName:S,statementListView:o,accountLast4:w,onBackClick:y,authParams:I,downloadEndPoint:f})})}export{F as Z};
|