@zeniai/web-app-ui 5.3.40-qa → 5.3.41-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AccountMappingScreen-BBc4_4t5.js → AccountMappingScreen-BCgETeoP.js} +2 -2
- package/dist/assets/AddressRoutes-DC3JM7a7.js +1 -0
- package/dist/assets/{AddressScreen-ueBXhh2E.js → AddressScreen-zTtPIjPs.js} +2 -2
- package/dist/assets/{AiCfoScreen-CSA0NZQ_.js → AiCfoScreen-CEkPZFk2.js} +1 -1
- package/dist/assets/{AppDrawer-BtmKncXK.js → AppDrawer-De73GA72.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-DIMv5HVt.js → BillPayApprovalRoutes-BTEGJSVP.js} +1 -1
- package/dist/assets/{BillPayRoutes-CWQjup6l.js → BillPayRoutes-D0Zcg2S5.js} +18 -18
- package/dist/assets/{BusinessVerificationPageScreen-gxvPC9Nc.js → BusinessVerificationPageScreen-DXdSHPE6.js} +2 -2
- package/dist/assets/{CardsAiCfoScreen-X_JzwNdn.js → CardsAiCfoScreen-DwHXFelb.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-Bh1W2yGQ.js → ChargeCardRoutes-D7doeHf8.js} +1 -1
- package/dist/assets/CompanyPassportScreen-DEbgj-ZU.js +1 -0
- package/dist/assets/ConnectionAuthScreen-Bf4vqlR2.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-BxvU90OD.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-DTHzcTqs.js → CustomerOnboardingRoutes-Coi-ieaU.js} +2 -2
- package/dist/assets/{DashboardRoutes-CxJPxihE.js → DashboardRoutes-kEzQGszS.js} +1 -1
- package/dist/assets/{DefaultTenantHome-DyfCOvBU.js → DefaultTenantHome-_85KjJUE.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-Ci1M06dc.js +18 -0
- package/dist/assets/{DrawerScreen-BT9F-F5I.js → DrawerScreen-DzidbbNY.js} +1 -1
- package/dist/assets/EntityDetailRoutes---pzooN0.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-Hq-aTHMY.js +38 -0
- package/dist/assets/FeaturePreviewScreen-BsptTDQw.js +1 -0
- package/dist/assets/{HubSpotOAuthCallbackScreen-C1emp8KW.js → HubSpotOAuthCallbackScreen-CxLQj57b.js} +1 -1
- package/dist/assets/{InboxNotificationsProvider-BU6hQETc.js → InboxNotificationsProvider-D007v5X6.js} +1 -1
- package/dist/assets/{InvoicingRoutes-BVupJlN7.js → InvoicingRoutes-4pD2cLam.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-ujyytXrV.js → MagicLinkRoutes-lsTO85h_.js} +7 -7
- package/dist/assets/MagicLinkSignInScreen-CELeUyfh.js +12 -0
- package/dist/assets/{MobileAppDrawer-DH0tVOfv.js → MobileAppDrawer-BPpLxyPF.js} +1 -1
- package/dist/assets/NotFoundScreen-Bii3lrih.js +1 -0
- package/dist/assets/{NotificationRoutes-CnZ8t_aV.js → NotificationRoutes-DIujlAht.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-CXv-sRc6.js → OAuthConsentScreen-BPXn-hZj.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-D_qmzE70.js → PandLWithForecastRoutes-Blj7LUYo.js} +1 -1
- package/dist/assets/{PaymentLinkScreen-CRIOI45V.js → PaymentLinkScreen-BuvjTvnx.js} +8 -8
- package/dist/assets/PeopleRoutes-DP4ITyk4.js +22 -0
- package/dist/assets/PerformanceRoutes-DbTlyJ7g.js +1 -0
- package/dist/assets/{Preview-Cbn9H8uJ.js → Preview-DA8U2xpZ.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-3h-qdoms.js → QBOConnectionScreen-DTJHrTBk.js} +23 -23
- package/dist/assets/{ReimbursementApprovalRoutes-Bt3jod66.js → ReimbursementApprovalRoutes-L2HInkgU.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Bc4MC7ZP.js → ReimbursementApprovalRuleDetailScreen-B_399PgL.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DGCHkbRG.js → ReimbursementRoutes-CxctCJTH.js} +6 -6
- package/dist/assets/{ReportsRoutes-C7NbqVqm.js → ReportsRoutes-t4V__ucH.js} +1 -1
- package/dist/assets/RewardsRoutes-2jmm5cDs.js +1 -0
- package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-BJF3mh7B.js +33 -0
- package/dist/assets/ScreenRoutes-CLWbi-Mu.js +2 -0
- package/dist/assets/{SettingsRoutes-CapPSjQN.js → SettingsRoutes-B80l8XL-.js} +6 -6
- package/dist/assets/{SetupPagesScreen-D0wYkNmR.js → SetupPagesScreen-B69hot1T.js} +5 -5
- package/dist/assets/SignInScreen-D9tkVCb4.js +1 -0
- package/dist/assets/SignOutScreen-XsQVTTei.js +9 -0
- package/dist/assets/{TaskListScreen-CsxsJBj1.js → TaskListScreen-CqKYMM38.js} +2 -2
- package/dist/assets/{TaskRoutes-DjWmgiZP.js → TaskRoutes-ByH3im-3.js} +2 -2
- package/dist/assets/TransactionDetailRoutes-DAAv4zNm.js +1 -0
- package/dist/assets/{TransactionDetailScreen-p3o65tsz.js → TransactionDetailScreen-DL95NJxK.js} +2 -2
- package/dist/assets/{TransactionListRoutes-BNdbZ30T.js → TransactionListRoutes-CAMdM58-.js} +1 -1
- package/dist/assets/{TreasuryRoutes-DR87vhnp.js → TreasuryRoutes-BBcktIxt.js} +4 -4
- package/dist/assets/{VendorsRoutes-CropWmWa.js → VendorsRoutes-be9h9k3f.js} +10 -10
- package/dist/assets/{WiseConfirmationScreen-Of1qjtDz.js → WiseConfirmationScreen-B04nGYSU.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-BROaca6I.js → ZeniAccountRoutes-CdVwCUVp.js} +9 -9
- package/dist/assets/{ZeniAccountStatementScreen-CBSpTdBS.js → ZeniAccountStatementScreen-CF3L4na6.js} +1 -1
- package/dist/assets/{accountMappingHelper-DeDocU0d.js → accountMappingHelper-qlU24D2s.js} +1 -1
- package/dist/assets/{analytics-N153TuwK.js → analytics-BvodL4nJ.js} +1 -1
- package/dist/assets/{analyticsHelper-BSm7IqEZ.js → analyticsHelper-X6BcuRxb.js} +1 -1
- package/dist/assets/{core-1xnf2RtE.js → core-gUqdW_kq.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DcD-XNVX.js → decodeURIComponentSafe-Cst3Y24b.js} +1 -1
- package/dist/assets/{dnd-DsH8jkrb.js → dnd-YSyN45zY.js} +1 -1
- package/dist/assets/{empty-Cvto7Qa_.js → empty-BAVoovBk.js} +1 -1
- package/dist/assets/{empty-GMcl-a5k.js → empty-CkcqWk4Z.js} +1 -1
- package/dist/assets/{emptyVideoElement-3SZu1zsn.js → emptyVideoElement-DMVtoCOe.js} +1 -1
- package/dist/assets/{epic-FXcGvl3F.js → epic-DHyjKhvW.js} +1 -1
- package/dist/assets/{expenseAutomationHelper-CNRtAWpH.js → expenseAutomationHelper-DDRCXr7k.js} +1 -1
- package/dist/assets/{getLocaleForTenant-Ct5cBG_c.js → getLocaleForTenant-DQPwSKjF.js} +1 -1
- package/dist/assets/{index-Bdznf1tI.js → index-1WLkQfLs.js} +1 -1
- package/dist/assets/{index-CAK36XTm.js → index-6dqseRo4.js} +1 -1
- package/dist/assets/{index-Ctq16f6K.js → index-70FTEc4H.js} +1 -1
- package/dist/assets/{index-B9A0BRu3.js → index-BhZ9H0Qw.js} +1 -1
- package/dist/assets/{index-DXVI9ztu.js → index-BhyEYQTn.js} +15908 -15944
- package/dist/assets/{index-BuVXkUYw.js → index-BzFSQsxk.js} +2 -2
- package/dist/assets/{index-C_EhkY0q.js → index-ChcsxO47.js} +1 -1
- package/dist/assets/{index-Dc3AC-iD.js → index-DhQKJDfi.js} +1 -1
- package/dist/assets/{lexical-d2so_3As.js → lexical-Euc6kCJG.js} +1 -1
- package/dist/assets/{liveblocks-C_WAhyd7.js → liveblocks-B3m51ZRo.js} +1 -1
- package/dist/assets/{lottie-NIzYzhlS.js → lottie-DLBd_qLT.js} +1 -1
- package/dist/assets/{mui-BAsIRnB1.js → mui-DCW4m3lZ.js} +1 -1
- package/dist/assets/{pathToGoBack-BmzgWhs1.js → pathToGoBack-Ds-XNEX3.js} +1 -1
- package/dist/assets/{pdf-BKNPlqtE.js → pdf-BDXl9G7N.js} +4 -4
- package/dist/assets/{pdf-lib-RqzDns79.js → pdf-lib-Bku26ZcE.js} +1 -1
- package/dist/assets/{plaid-dW1_MCaE.js → plaid-BrXe9xNf.js} +1 -1
- package/dist/assets/{pusher-BVnEdZ0V.js → pusher-BzxZmWnS.js} +1 -1
- package/dist/assets/{react-xy8FhgjK.js → react-C43HbBFY.js} +1 -1
- package/dist/assets/{react-BFlpt3K4.js → react-Cp8yT8Rr.js} +1 -1
- package/dist/assets/{react-Dq2pDn48.js → react-Db0eqcPH.js} +1 -1
- package/dist/assets/{react-gANl8FSl.js → react-DtuhKjd8.js} +1 -1
- package/dist/assets/{react-ClcLrViu.js → react-FxzlmTOI.js} +1 -1
- package/dist/assets/{react-hvFnEVKT.js → react-pusavzWL.js} +1 -1
- package/dist/assets/{recharts-C2rsrRI6.js → recharts-HpXoq1DR.js} +1 -1
- package/dist/assets/{routePaths-3iKgurJn.js → routePaths-DAdB7ufZ.js} +1 -1
- package/dist/assets/{sentry-lC29HHPj.js → sentry-DI7gLUjw.js} +1 -1
- package/dist/assets/{url-B8rnjauu.js → url-BVmez_R2.js} +1 -1
- package/dist/assets/{url-LYbpMOZt.js → url-qyBRakHR.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DtwiUC9S.js → useAiCfoDashboardSuggestedQuestionsChips-FMXCfhJm.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BVUNtLFK.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-BQSY-ppK.js → useChargeCardPusherEvents-ldgEvsXz.js} +1 -1
- package/dist/assets/{useDeviceId-BX84j5B2.js → useDeviceId-kl-tdydV.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-BzSlD1q5.js → useEmailConnectResultRefresh-BDGN0_Dv.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-BFDb_b7F.js → useInitialThreadRequest-DTQjUnhP.js} +1 -1
- package/dist/assets/{useTaskManagerAccess-B7YJLgDK.js → useTaskManagerAccess-U48bmWaI.js} +1 -1
- package/dist/assets/{utils-BBaMea9r.js → utils-8Dv5nUFZ.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-CkEUNYr4.js → withTransactionSidePanel-0Fy2VPJ-.js} +2 -2
- package/dist/assets/{zeni-epic-state-BVNUxmav.js → zeni-epic-state-C-d25VTi.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/AddressRoutes-DUeinmsu.js +0 -1
- package/dist/assets/CompanyPassportScreen-XQqdGh6R.js +0 -1
- package/dist/assets/ConnectionAuthScreen-BKS6qkfS.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-_W8JsjC9.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-Cpm9Bc_C.js +0 -18
- package/dist/assets/EntityDetailRoutes-GrYbpLDE.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-BAcJRoU4.js +0 -38
- package/dist/assets/FeaturePreviewScreen-CWY6I3fG.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-yhSK6wYK.js +0 -12
- package/dist/assets/NotFoundScreen-BF2gJW91.js +0 -1
- package/dist/assets/PeopleRoutes-BBOCzTBv.js +0 -22
- package/dist/assets/PerformanceRoutes-C5sk5hTF.js +0 -1
- package/dist/assets/RewardsRoutes-CnXmBpce.js +0 -1
- package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-CplHlAVo.js +0 -25
- package/dist/assets/ScreenRoutes-DW0KFZF8.js +0 -2
- package/dist/assets/SignInScreen-ByJdILpU.js +0 -1
- package/dist/assets/SignOutScreen-BAACKxOn.js +0 -9
- package/dist/assets/TransactionDetailRoutes-B97JNzan.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-C4hcJx1x.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as
|
|
1
|
+
import{j as r}from"./liveblocks-B3m51ZRo.js";import W from"./NotFoundScreen-Bii3lrih.js";import{a as p}from"./sentry-DI7gLUjw.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-gUqdW_kq.js";import{fE as I,Yl as h,YC as R,MY as N,MU as L,MX as f,MN as $,Y$ as B,MR as q,M_ as z}from"./zeni-epic-state-C-d25VTi.js";import{z as M,w as T,c9 as K,q as _,bS as X,ca as F}from"./index-BhyEYQTn.js";import"./mui-DCW4m3lZ.js";import{u as G,R as x}from"./ReimbursementApprovalRuleDetailScreen-B_399PgL.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]="2e89e605-99dd-45fe-ad3a-ed1fbcb18eda",e._sentryDebugIdIdentifier="sentry-dbid-2e89e605-99dd-45fe-ad3a-ed1fbcb18eda")}catch{}})();const A="reimbursement-approval-rule-update",H=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(B(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(T(K)),J=({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)),d=u((o=>I(o))),c=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(L(!0,!1,!1,!1)))}),[t,S,e,a]),M.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(v||(w(!0),a(f())),s("./new"))}),[v,c,a]);const m={events:d.companyId!=null?[`private-encrypted-${d.companyId}.${A}`]:[],eventCallback:(o,y,j)=>{o.endsWith(A)&&j.onApprovalRulesEventReceived(o)}};return d?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(H,{currentTenant:d,location:n,navigate:s,...m})},E="reimbursement-approval-rule-update",P=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(E)&&e(B(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(z(t,!0))}}}))(T(F)),Q=()=>{const e=u((a=>I(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=X(e?.tenantId);return s?r.jsx(Z,{isLoading:n}):r.jsx(J,{isLoading:n})},Z=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,w]=p.useState(!1),[S,d]=p.useState(!1),c=u((i=>i.remiSetupApproverViewState.fetchState)),b=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>I(i))),o=u((i=>h(i)));G();const y=u((i=>R(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{y?.updateStatus.fetchState==="Completed"&&a(N())}),[y]),p.useEffect((()=>{t||c!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!0)))}),[t,c,e,a]),p.useEffect((()=>{v||b!=="Not-Started"||e||(w(!0),a(q(!1,!0)))}),[v,b,e,a]),M.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{o.allApprovalRules.length===0&&o.fetchState==="Completed"&&(S||(d(!0),a(f())),s("./new"))}),[S,o,a]);const j={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${E}`]:[],eventCallback:(i,ee,O)=>{i.endsWith(E)&&O.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(P,{currentTenant:m,location:n,navigate:s,isLoading:e,...j})};function le(){return r.jsxs(Y,{children:[r.jsx(g,{path:"/",element:r.jsx(Q,{})}),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 +1 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-
|
|
1
|
+
import{j as h}from"./liveblocks-B3m51ZRo.js";import{a as f}from"./sentry-DI7gLUjw.js";import{u as U,j as g,h as _,g as O,i as V,l as k}from"./core-gUqdW_kq.js";import{mq as $,YC as w,Yl as C,MQ as B,N1 as j,MY as A,MZ as E,YD as N,fE as L,MX as z}from"./zeni-epic-state-C-d25VTi.js";import{z as F,E as P,a7 as q,c0 as K,q as M,bS as Q,c1 as W}from"./index-BhyEYQTn.js";import"./mui-DCW4m3lZ.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]="88ba043a-bfc3-446f-94c8-8def68548271",e._sentryDebugIdIdentifier="sentry-dbid-88ba043a-bfc3-446f-94c8-8def68548271")}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($({})))}),[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 R=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),b=u.actors.selectedNonUsers.map((m=>{const y=(I=m.value,N(I)==null);var I;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}})),c=R.concat(b);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("../")}}}))(K);function G(){const e=_(),s=U(),t=O(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),l=P(),r=g((n=>w(n))),i=g((n=>C(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(q,{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:C(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 I=y.actorKind?.selectedOption,Y=y.selectedRole?.selectedNonUsers??[];let D=[];I==="role"?D=Y.map((T=>({type:"attribute",subType:T.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):I==="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 R=v?.selection.selectedOptions??[];R.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:R});const b=S?.selection.selectedOptions??[];if(b.length>0&&(u.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:b}),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}=Q(e?.tenantId);return s?h.jsx(J,{}):h.jsx(G,{})}function J(){const e=_(),s=U(),t=O(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),l=P(),r=g((n=>w(n))),i=g((n=>C(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(q,{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,10 +1,10 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-C_WAhyd7.js";import{u as ae,j as v,h as Q,g as J,i as ie,N as $,l as ee,q as ct,n as dt,o as w}from"./core-1xnf2RtE.js";import{fE as Z,MU as ut,_6 as ge,c8 as he,L_ as Le,m9 as pt,Md as ce,Mc as de,_7 as bt,bn as fe,gU as _e,_8 as gt,W4 as ht,l_ as Me,W5 as Ce,W6 as ft,kM as St,Y7 as It,k$ as yt,LO as Rt,Bx as vt,kT as At,Mz as $e,_9 as Pe,_a as Ee,_b as kt,_c as Ct,_d as Et,Mj as we,l5 as wt,Yg as xt,Mb as Bt,LY as Tt,_e as Dt,LX as jt,_f as Ft,M3 as xe,Mn as Ut,Mm as Lt,Mi as _t,_g as Ne,Rx as Mt,bo as $t,M6 as Pt,MR as Nt,_h as Ot,_i as zt,Mv as Gt,Ms as Be,XD as Vt,LV as Zt,_j as Oe,Ni as Te,Nq as Wt,_k as Ht,_l as X,_m as qt,_n as ze,_o as Xt,_p as Ge,_q as Ve,MH as ue,bu as Yt,bK as Se,cM as Ie,dY as Ze,dX as We,_r as Jt,gg as Kt,XQ as Qt,_s as en,_t as He,XU as tn,YC as nn,_u as an,Y$ as sn,Nn as De,Nm as on,_v as rn,_w as ln,_x as mn,_y as cn,_z as dn,Ym as un,Nd as pn,Nh as bn,bq as gn,bJ as hn,cG as fn,cu as Sn,bt as In,Tw as yn,d9 as Rn,dc as vn,db as An,cF as kn}from"./zeni-epic-state-BVNUxmav.js";import{bS as Cn,X as qe,a1 as Xe,M as oe,y as x,z as _,cT as Ye,a8 as re,h as C,aS as je,I as F,ae as se,af as En,G as Je,cU as wn,p as Y,as as Ke,cV as xn,V as le,cW as Bn,aq as Tn,ab as Dn,a7 as ye,R as Qe,w as jn,bA as Fn,av as Un,ai as Ln,E as et,cX as _n,g as Mn}from"./index-DXVI9ztu.js";import{n as P,S as $n}from"./mui-BAsIRnB1.js";import pe from"./NotFoundScreen-BF2gJW91.js";import{S as Fe}from"./SetupPagesScreen-D0wYkNmR.js";import{F as tt}from"./FeaturePreviewScreen-CWY6I3fG.js";import{a as h}from"./sentry-lC29HHPj.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-C4hcJx1x.js";import{u as nt}from"./useInitialThreadRequest-BFDb_b7F.js";import{D as Pn}from"./DrawerScreen-BT9F-F5I.js";import{M as at}from"./MobileAppDrawer-DH0tVOfv.js";import{F as Nn}from"./ScreenRoutes-DW0KFZF8.js";import{R as On}from"./ReimbursementApprovalRoutes-Bt3jod66.js";import"./recharts-C2rsrRI6.js";import"./analytics-N153TuwK.js";import"./plaid-dW1_MCaE.js";import"./dnd-DsH8jkrb.js";import"./stripe-cKAAJElX.js";import"./lottie-NIzYzhlS.js";import"./lexical-d2so_3As.js";import"./pdf-BKNPlqtE.js";import"./utils-BBaMea9r.js";import"./BusinessVerificationPageScreen-gxvPC9Nc.js";import"./routePaths-3iKgurJn.js";import"./analyticsHelper-BSm7IqEZ.js";import"./InboxNotificationsProvider-BU6hQETc.js";import"./useTaskManagerAccess-B7YJLgDK.js";import"./getLocaleForTenant-Ct5cBG_c.js";import"./ReimbursementApprovalRuleDetailScreen-Bc4MC7ZP.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]="2a467b25-7434-4eee-bed5-15fe86cce806",e._sentryDebugIdIdentifier="sentry-dbid-2a467b25-7434-4eee-bed5-15fe86cce806")}catch{}})();const st=e=>`/${e}/reimbursements`,zn=e=>h.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},h.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Je.getLocalizedStrings(),Gn=ee((function(e,t){const n=t.currentTenant?.companyId,r=bt(e.plaidAccountViewState,"user_reimbursement_account"),c=_.getSignedInUser(),d=fe(c),m=r.plaidConnectionDetails,o=_e(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),b=gt(e,c?.userId??"");let y=`${c?.firstName} ${c?.lastName}`,f=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,f=c?.userId===l.createdBy?.userId);const B=e.entityAutoCompleteState?.autoCompleteText?.common,u=ht(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:B,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:f,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Me(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=_.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(de(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(xe(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(_t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(xe(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Dt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(we(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Ee({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ce({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Et({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Ct({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ee({}));const i=st(o),l=Y(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e($e(n)))},onSaveBankAccount:()=>{a?.userId&&e(At(a?.userId,n))},onFetchLinkTokenClick:i=>{e(vt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(Rt(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(yt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(St({fetchState:"Not-Started"})),e(It())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(ft({searchString:i,entityType:l,searchOrigin:"common"})):e(Ce("common"))},onCancelAutoComplete:()=>{e(Ce("common"))}}}}))(wn);function Ue(){const e=Q(),t=ae(),n=J(),{reimbursementId:r}=ie(),c=qe(),d=Xe(),[m,o]=h.useState(r==null),[a,i]=h.useState(1),{useFeatureGate:l}=oe(),{isFeatureEnabled:b}=l(x.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(x.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:f}=l(x.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:B,onAskAiCfoClick:u}=Re({mobileExploreReferrer:"Reimbursement Details"}),T=J().pathname,D=T.includes("edit"),j=T.includes("reimbursement/new"),[A,k]=h.useState(!1),E=_.getSignedInUser(),I=v((p=>Z(p))),g=v((p=>ge(p,r))),U=nt(I?.companyId,{clearParams:g.fetchState==="Completed"}),L=he(I?.userRole??[]);(function(){const p=ae(),N=v((K=>Z(K))),O=N?.tenantId,{isApprovalRulesV3Enabled:z,isLoading:W}=Cn(O),H=v((K=>K.remiSetupApproverViewState.fetchState));h.useEffect((()=>{O==null||W||H==="Not-Started"&&p(ut(!0,!1,!1,z))}),[O,W,z,H,p])})(),h.useEffect((()=>{(j&&!A||D&&!A&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(k(!0),t(Le(!1,b,y,r)))}));const M=v((p=>pt(p.accountState,p.accountListState,"reimbursementAccountList")));if(E==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||L&&g.billStatus==="rejected"||L===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx($,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Ye,{isNewReimbursement:r==null}):s.jsxs(Vn,{windowSize:d,children:[s.jsx(re,{analytics:C,onLoad:p=>(N=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&N.trackReimbursementEditReimbursement(r)})(p)}),m&&d!=="small"?s.jsx(Zn,{}):null,m&&d!=="small"?s.jsx(Wn,{children:s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,m&&d==="small"?s.jsxs(Hn,{children:[s.jsx(qn,{onClick:()=>o(!1),children:s.jsx(zn,{})}),s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Xn,{windowSize:d,children:s.jsx(Gn,{initialOpenThreadRequest:U??void 0,isReimbursementCommentingEnabled:f,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:c,uncategorizedAccounts:M,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:B,onAskAiCfoClick:u})})]})}const Vn=P.div`
|
|
1
|
+
import{j as s}from"./liveblocks-B3m51ZRo.js";import{u as ae,j as v,h as Q,g as J,i as ie,N as $,l as ee,q as ct,n as dt,o as w}from"./core-gUqdW_kq.js";import{fE as V,MU as ut,_6 as ge,c8 as he,L_ as Le,m9 as pt,Md as ce,Mc as de,_7 as bt,bn as fe,gU as _e,_8 as gt,W4 as ht,l_ as Me,W5 as Ce,W6 as ft,kM as St,Y7 as It,k$ as yt,LO as Rt,Bx as vt,kT as At,Mz as $e,_9 as Pe,_a as Ee,_b as kt,_c as Ct,_d as Et,Mj as we,l5 as wt,Yg as xt,Mb as Bt,LY as Tt,_e as Dt,LX as jt,_f as Ft,M3 as xe,Mn as Ut,Mm as Lt,Mi as _t,_g as Ne,Rx as Mt,bo as $t,M6 as Pt,MR as Nt,_h as Ot,_i as zt,Mv as Gt,Ms as Be,XD as Zt,LV as Vt,_j as Oe,Ni as Te,Nq as Wt,_k as Ht,_l as Y,_m as qt,_n as ze,_o as Yt,_p as Ge,_q as Ze,MH as ue,bu as Xt,bK as Se,cM as Ie,dY as Ve,dX as We,_r as Jt,gg as Kt,XQ as Qt,_s as en,_t as He,XU as tn,YC as nn,_u as an,Y$ as sn,Nn as De,Nm as on,_v as rn,_w as ln,_x as mn,_y as cn,_z as dn,Ym as un,Nd as pn,Nh as bn,bq as gn,bJ as hn,cG as fn,cu as Sn,bt as In,Tw as yn,d9 as Rn,dc as vn,db as An,cF as kn}from"./zeni-epic-state-C-d25VTi.js";import{bS as Cn,c as qe,a1 as Ye,M as oe,y as x,z as _,cT as Xe,a8 as re,k as C,aS as je,J as F,ae as se,af as En,G as Je,cU as wn,p as X,as as Ke,cV as xn,Q as le,cW as Bn,aq as Tn,ab as Dn,a7 as ye,U as Qe,w as jn,bA as Fn,av as Un,ai as Ln,E as et,cX as _n,g as Mn}from"./index-BhyEYQTn.js";import{n as P,S as $n}from"./mui-DCW4m3lZ.js";import pe from"./NotFoundScreen-Bii3lrih.js";import{S as Fe}from"./SetupPagesScreen-B69hot1T.js";import{F as tt}from"./FeaturePreviewScreen-BsptTDQw.js";import{a as h}from"./sentry-DI7gLUjw.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-BVUNtLFK.js";import{u as nt}from"./useInitialThreadRequest-DTQjUnhP.js";import{D as Pn}from"./DrawerScreen-DzidbbNY.js";import{M as at}from"./MobileAppDrawer-BPpLxyPF.js";import{F as Nn}from"./ScreenRoutes-CLWbi-Mu.js";import{R as On}from"./ReimbursementApprovalRoutes-L2HInkgU.js";import"./recharts-HpXoq1DR.js";import"./analytics-BvodL4nJ.js";import"./plaid-BrXe9xNf.js";import"./dnd-YSyN45zY.js";import"./stripe-cKAAJElX.js";import"./lottie-DLBd_qLT.js";import"./lexical-Euc6kCJG.js";import"./pdf-BDXl9G7N.js";import"./utils-8Dv5nUFZ.js";import"./BusinessVerificationPageScreen-DXdSHPE6.js";import"./routePaths-DAdB7ufZ.js";import"./analyticsHelper-X6BcuRxb.js";import"./InboxNotificationsProvider-D007v5X6.js";import"./useTaskManagerAccess-U48bmWaI.js";import"./getLocaleForTenant-DQPwSKjF.js";import"./ReimbursementApprovalRuleDetailScreen-B_399PgL.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]="dc52b9f6-f41e-4b2b-8ff1-4e6d4b8c19f4",e._sentryDebugIdIdentifier="sentry-dbid-dc52b9f6-f41e-4b2b-8ff1-4e6d4b8c19f4")}catch{}})();const st=e=>`/${e}/reimbursements`,zn=e=>h.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},h.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Je.getLocalizedStrings(),Gn=ee((function(e,t){const n=t.currentTenant?.companyId,r=bt(e.plaidAccountViewState,"user_reimbursement_account"),c=_.getSignedInUser(),d=fe(c),m=r.plaidConnectionDetails,o=_e(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),b=gt(e,c?.userId??"");let y=`${c?.firstName} ${c?.lastName}`,f=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,f=c?.userId===l.createdBy?.userId);const B=e.entityAutoCompleteState?.autoCompleteText?.common,u=ht(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:B,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:f,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Me(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=_.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(de(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(xe(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(_t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(xe(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Dt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(we(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Ee({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ce({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Et({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Ct({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ee({}));const i=st(o),l=X(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e($e(n)))},onSaveBankAccount:()=>{a?.userId&&e(At(a?.userId,n))},onFetchLinkTokenClick:i=>{e(vt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(Rt(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(yt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(St({fetchState:"Not-Started"})),e(It())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(ft({searchString:i,entityType:l,searchOrigin:"common"})):e(Ce("common"))},onCancelAutoComplete:()=>{e(Ce("common"))}}}}))(wn);function Ue(){const e=Q(),t=ae(),n=J(),{reimbursementId:r}=ie(),c=qe(),d=Ye(),[m,o]=h.useState(r==null),[a,i]=h.useState(1),{useFeatureGate:l}=oe(),{isFeatureEnabled:b}=l(x.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(x.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:f}=l(x.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:B,onAskAiCfoClick:u}=Re({mobileExploreReferrer:"Reimbursement Details"}),T=J().pathname,D=T.includes("edit"),j=T.includes("reimbursement/new"),[A,k]=h.useState(!1),E=_.getSignedInUser(),I=v((p=>V(p))),g=v((p=>ge(p,r))),U=nt(I?.companyId,{clearParams:g.fetchState==="Completed"}),L=he(I?.userRole??[]);(function(){const p=ae(),N=v((K=>V(K))),O=N?.tenantId,{isApprovalRulesV3Enabled:z,isLoading:W}=Cn(O),H=v((K=>K.remiSetupApproverViewState.fetchState));h.useEffect((()=>{O==null||W||H==="Not-Started"&&p(ut(!0,!1,!1,z))}),[O,W,z,H,p])})(),h.useEffect((()=>{(j&&!A||D&&!A&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(k(!0),t(Le(!1,b,y,r)))}));const M=v((p=>pt(p.accountState,p.accountListState,"reimbursementAccountList")));if(E==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||L&&g.billStatus==="rejected"||L===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx($,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Xe,{isNewReimbursement:r==null}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(re,{analytics:C,onLoad:p=>(N=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&N.trackReimbursementEditReimbursement(r)})(p)}),m&&d!=="small"?s.jsx(Vn,{}):null,m&&d!=="small"?s.jsx(Wn,{children:s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,m&&d==="small"?s.jsxs(Hn,{children:[s.jsx(qn,{onClick:()=>o(!1),children:s.jsx(zn,{})}),s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Yn,{windowSize:d,children:s.jsx(Gn,{initialOpenThreadRequest:U??void 0,isReimbursementCommentingEnabled:f,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:c,uncategorizedAccounts:M,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:B,onAskAiCfoClick:u})})]})}const Zn=P.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
5
5
|
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
6
6
|
background-color: ${e=>e.theme.colors.grey4};
|
|
7
|
-
`,
|
|
7
|
+
`,Vn=P.div`
|
|
8
8
|
position: fixed;
|
|
9
9
|
top: 0;
|
|
10
10
|
left: 0;
|
|
@@ -48,12 +48,12 @@ import{j as s}from"./liveblocks-C_WAhyd7.js";import{u as ae,j as v,h as Q,g as J
|
|
|
48
48
|
width: ${F.sp4};
|
|
49
49
|
height: ${F.sp4};
|
|
50
50
|
}
|
|
51
|
-
`,
|
|
51
|
+
`,Yn=P.div`
|
|
52
52
|
display: flex;
|
|
53
53
|
flex-direction: column;
|
|
54
54
|
width: 100%;
|
|
55
55
|
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
56
|
-
`,
|
|
56
|
+
`,Xn=ee((function(e,t){const n=Ne(e,t.reimbursementId),r=_.getSignedInUser(),c=fe(r),d=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:d??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Ot(n.remiActivities,zt(t.currentTenant),r));const i=he(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:c,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:Me(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e(Pe());const a=st(o),i=X(c.state?.pathnameStackToGoBack,c.pathname);d(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(Vt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Zt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(Be(n,a.type,"")):e(Be(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=X(c.state?.pathnameStackToGoBack,c.pathname);d("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{C.trackReimbursementDeleteReimbursement(n),e($e(n))},cancelAndDeleteReport:a=>{a===!0?C.trackReimbursementCancelAndDeleteReimbursement(n):C.trackReimbursementCancelReimbursement(n),e(Gt(n,a))},handleZeniLogoClick:()=>{m.toggle()}}}))(xn);function Jn(){const e=Q(),t=ae(),n=J(),r=n.hash.substring(1),c=qe(),{reimbursementId:d}=ie(),m=_.getSignedInUser(),o=v((R=>V(R))),a=v((R=>Ne(R,d??""))),i=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=nt(o?.companyId,{clearParams:a.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:b,onAskAiCfoClick:y}=Re({mobileExploreReferrer:"Reimbursement Details"});Ke({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:f}=oe(),{isFeatureEnabled:B}=f(x.isLimitedCategoryForReimbursement),[u,T]=h.useState(!1),[D,j]=h.useState(!1),[A,k]=h.useState(!1),{isFeatureEnabled:E}=f(x.isReimbursementCommentingEnabled),{isFeatureEnabled:I}=f(x.isShowDeletedReimbursementsFeatureEnabled),g=v((R=>ge(R,d??""))),U=Mt(o),L=$t(o.userRole),M=a.fetchState;if(h.useEffect((()=>{u||d==null?u==1&&M==="Error"&&e("page-not-found",{replace:!0}):(T(!0),t(Pt(d,!1,I)))}),[u,d,t,M]),h.useEffect((()=>{I&&a.remiDetails?.isDeleted===!0||o.isZeni===!0&&m?.userEmailDomain==="zeni.ai"&&U===!1?k(!1):k(a.remiActivities[0]?.isRealTimeApprovalEnabled&&(L||a.allApprovers.find((R=>R.user.userId===m?.userId))!=null||a.remiDetails?.lastUpdatedBy===m?.userId))}),[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,L,o.isZeni,U,m]),h.useEffect((()=>{D||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||g.fetchState=="Completed"||g.fetchState=="In-Progress"||(j(!0),t(Le(!1,B,I,d)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(Nt(!1,!0,!0,a.lastUpdatedByUserId)))}),[D,a,d,t]),m==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx($,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(Xe,{}):s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:C,onLoad:R=>(p=>{d!=null&&p.trackReimbursementReimbursementDetails(d)})(R)}),s.jsx(Xn,{initialOpenThreadRequest:l??void 0,scrollId:r,isReimbursementCommentingEnabled:E,isShowDeletedReimbursementEnabled:I,location:n,navigate:e,isRealTimeApprovalEnabled:A,currentTenant:o,reimbursementId:d??"",themeState:c,isAiCfoAccessEnabled:b,onAskAiCfoClick:y})]})}const Kn=ee((function(e,t){return{remisReviewView:Oe(e),analytics:t.analytics}}),(function(e,t){return{onCloseOverlay:()=>{t.navigate(`/${t.tenantEmailDomain}/reimbursements`),e(Y())},onCloseReviewItem:n=>{e(Ht(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Wt());break;case"approve":e(Te("approved",r??""));break;case"reject":e(Te("rejected",r??""))}}}}))(Bn);function Qn({tenantEmailDomain:e}){const t=Q(),n=v((m=>m.remisBulkActionViewState.bulkSubmissionFetchState.fetchState)),{remisForReview:r}=v((m=>Oe(m))),c=le(),d=c?.loggedInUserRole?.includes("admin")===!0;return h.useEffect((()=>{n!=="Completed"&&r.length!==0||t(`/${e}/reimbursements`)}),[n,r.length,e]),s.jsx(Kn,{navigate:t,analytics:C,isAdmin:d,tenantEmailDomain:e})}const Z=tn(),it="bulk-operation-update",be="reimbursement-approval-rule-update",{spendManagement:ea,common:me}=Je.getLocalizedStrings(),ta=ea.reimbursement.bulkActions,na=P.div`
|
|
57
57
|
display: flex;
|
|
58
58
|
min-height: 100%;
|
|
59
59
|
width: 100%;
|
|
@@ -61,8 +61,8 @@ import{j as s}from"./liveblocks-C_WAhyd7.js";import{u as ae,j as v,h as Q,g as J
|
|
|
61
61
|
flex-direction: column;
|
|
62
62
|
align-items: center;
|
|
63
63
|
background-color: ${e=>e.theme.colors.grey4};
|
|
64
|
-
`,aa=ee((function(e,t){const n=
|
|
64
|
+
`,aa=ee((function(e,t){const n=Ze(e,Z,t.isBulkActionEnabled);let r=n.allSubTabs;const c=_.getSignedInUser(),d=fe(c),m=e.tenantState.currentTenantId,o=V(e),a=o?.companyName??"",i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter((f=>f!=="deleted")));const b=n.fetchState,y=nn(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter((f=>f.isDeleted===!1)),isAdmin:t.isAdmin,isZeniUser:d,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:b,botEmail:n.reimbursementBotEmail,analytics:C,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:Z,spendManagementEndPoint:`${Un}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:y.affectedEntityIds}}),(function(e,t){const{navigate:n,currentTenant:r,location:c,period:d}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(Y()),e(ze(o))},onSubtabChange:o=>{e(Y()),e(Ge(o))},onTransactionClick:(o,a)=>{const i=oa(m,o,a),l=X(c.state?.pathnameStackToGoBack,c.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=ia(m),a=X(c.state?.pathnameStackToGoBack,c.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;C?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=X(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:i}})},onColumnSortConfigChanged:(o,a)=>{e(dn({uiState:{sortKey:o,sortOrder:a},period:t.period}))},onSearchTextChanged:o=>{e(cn(o))},onFiltersChange:o=>{e(mn({filters:o})),o.categories.every((a=>a.field!=null&&a.values?.length!==0))&&C.trackSpendManagmentFilterChange("reimbursement",o.categories.map((a=>`${a.field}-${JSON.stringify(a.values)}`)))},updateDownloadStateHandler:o=>{o==="In-Progress"&&C.trackSpendManagementDownloadClick("reimbursement"),e(ln({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(ue(d,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(rn(o))},removeAllTransactionsFromBulkActionList:()=>{e(Y())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(on(o,a??""));break;case"send_for_approval":e(De("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(De("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(be)&&e(sn(!1))},onEventReceived:o=>{o===it&&e(an())}}}))(jn(Fn));function sa(){const e=Q(),t=ae(),n=J(),r=n.state,c=Ye(),[d,m]=h.useState(null),o=ct("/:tenantEmailDomain/reimbursements/bulk-review")!=null;h.useEffect((()=>{if(r?.tab!=null&&r?.subTab!=null){const S=qt(r.tab.toString());S!=null?t(ze(S)):console.log("Warning:Not a valid remiListTab");const G=Yt(r.subTab.toString());G!=null?t(Ge(G)):console.log("Warning:Not a valid remiListSubTab")}return()=>{t(Y())}}),[]);const{useFeatureGate:a}=oe(),{isFeatureEnabled:i}=a(x.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:l}=a(x.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:b}=a(x.isBillPayCommentingEnabled),{isFeatureEnabled:y}=a(x.isReimbursementCommentingEnabled),{isFeatureEnabled:f}=a(x.isReimbursementBulkActionEnabled),B=_.getSignedInUser(),u=v((S=>V(S))),[T,D]=h.useState(!1),[j,A]=h.useState(!1),k=le(),E=k?.loggedInUserRole?.includes("admin")===!0,I=v((S=>Ze(S,Z,f))),{areTenantIdsInSync:g}=Tn(),U=I.fetchState,{isAiCfoAccessEnabled:L,onAskAiCfoClick:M}=Re({mobileExploreReferrer:"Reimbursement List"});if(Ke({isDataReady:U==="Completed"}),h.useEffect((()=>{!j&&g&&(A(!0),t(ue(Z,!0,l,!1,!0)))}),[j,Z,t,g]),B==null)throw Error("Can't access address page without signing in...");const R=!!u?.userRole&&Xt(u),p=Se(k?.loggedInUserRoleMap),N=Ie(k?.loggedInUserRoleMap),O=!!u.userReimbursementInfo?.isReimbursementTOSAccepted,z=!!u.companyReimbursementInfo?.info?.isReimbursementEnabled,W=!!u.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,H=v((S=>_e(S.companyState,u.companyId))),K=H?.company.featuresActivationInfo.connectedAccountProvider,ve=S=>{D(S)},{isFeatureEnabled:ot}=a(x.isDebitCardFeatureEnabled),rt=Ve(ot,u),lt=We(u),{remisProcessed:te,remisProcessing:Ae}=v((S=>Jt(S)));h.useEffect((()=>{te===Ae&&d!=null&&(t(Kt({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:te>1?me.texts.reports2:ta.report},{variableName:"_has_",variableValue:te>1?me.texts.have:me.texts.has},{variableName:"_action_",variableValue:Qt(d)}]})),t(en()),setTimeout((()=>{t(ue(Z,!0,l,!1,!0,!0))}),3e3),m(null))}),[te,Ae]);const mt={events:u.companyId!=null?[`private-encrypted-${u.companyId}.${it}`,`private-encrypted-${u.companyId}.${be}`]:[],eventCallback:(S,G,ke)=>{S.endsWith(be)?ke.onReimbursementApprovalRulesEventReceived?.(S):G.entity_type==="reimbursement"&&(m(G.operation_type),ke.onEventReceived(S))}};return n.pathname.endsWith("/reimbursements/")||n.pathname.endsWith("/reimbursements")||n.pathname.endsWith("/reimbursements/bulk-review")?rt===!0||lt===!0?s.jsx(tt,{}):z&&(!R||p)||N&&O?s.jsxs(s.Fragment,{children:[U==="Completed"?s.jsx(re,{analytics:C,onLoad:S=>(G=>G.trackPageLoaded(Qe.Event.reimbursementHome))(S)}):null,s.jsx(at,{isAppContentDrawerOpen:T,handleDrawerToggle:ve}),s.jsxs(na,{windowSize:c,children:[s.jsx(Pn,{isOpen:o,drawerLeftMargin:new Dn(0,0,300,600),onClose:()=>{e(`/${u.tenantEmailDomain}/reimbursements`),t(Y())},children:s.jsx(ra,{onClick:S=>S.stopPropagation(),children:s.jsx(Qn,{tenantEmailDomain:u.tenantEmailDomain})})}),s.jsx(aa,{isShowDeletedBillsEnabled:i,isShowDeletedReimbursementEnabled:l,isBillPayCommentingEnabled:b,isReimbursementCommentingEnabled:y,location:n,navigate:e,currentTenant:u,period:Z,isAdmin:E,isEmployee:R,entity:"reimbursement",onClickMenuIcon:()=>{ve(!0)},createdByUserList:I.createdByUserList,createdByUserListFetchState:I.createdByUserListFetchState,isDownloadEnabled:I.isDownloadEnabled,connectedAccountProvider:K,isBulkActionEnabled:f,bulkSubmissionLimit:I.remiBulkSubmissionLimit,bulkSubmissionFetchState:I.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:L,onAskAiCfoClick:M,...mt})]})]}):W&&p?s.jsx($,{to:"../setup"}):k!=null&&He(u,k.loggedInUserRoleMap)?s.jsx($,{to:"../promo"}):s.jsx(ye,{fetchState:"In-Progress"}):s.jsx(pe,{})}const ia=e=>`/${e}/reimbursements/setup`,oa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},ra=P($n)`
|
|
65
65
|
display: flex;
|
|
66
66
|
min-height: 100%;
|
|
67
67
|
flex-direction: column;
|
|
68
|
-
`,la=ee((function(e,t){const{companyId:n}=t;return{reimbursementSetupView:un(e,n),analytics:C,videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}}),(function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(bn(n))},onCreateNewRemiButtonClick:()=>{e(pn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}}))(_n),ma=()=>{const e=Ln(),t=Q(),n=J(),{tenantEmailDomain:r}=ie(),c=et(),[d,m]=h.useState(!1),o=v((A=>
|
|
68
|
+
`,la=ee((function(e,t){const{companyId:n}=t;return{reimbursementSetupView:un(e,n),analytics:C,videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}}),(function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(bn(n))},onCreateNewRemiButtonClick:()=>{e(pn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}}))(_n),ma=()=>{const e=Ln(),t=Q(),n=J(),{tenantEmailDomain:r}=ie(),c=et(),[d,m]=h.useState(!1),o=v((A=>V(A))),a=_.getSignedInUserTenant(r)?.companyId??o.companyId,i=_.getSignedInUser(),l=o.userRoleId,b=!!o.userRole?.includes("reimbursements_user"),y=le(),f=Se(y?.loggedInUserRoleMap),B=Ie(y?.loggedInUserRoleMap),u=!!o.userReimbursementInfo?.isReimbursementTOSAccepted,T=!!o.companyReimbursementInfo?.info?.isReimbursementEnabled,D=!!o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,j=A=>{m(A)};if(i==null)throw Error("Can't access reimbursement promo page without signing in...");return T&&B&&u?s.jsx($,{to:"../../../reimbursements"}):D&&f?s.jsx($,{to:"../../reimbursements/setup"}):o.companyReimbursementInfo&&!D||o.userReimbursementInfo&&B&&u===!1?s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:C,onLoad:A=>(k=>k.trackPageLoaded(Qe.Event.reimbursementPromoPage))(A)}),s.jsx(at,{isAppContentDrawerOpen:d,handleDrawerToggle:j}),s.jsx(la,{companyId:a,navigate:t,meetingUrl:e("reimbursement_promo"),location:n,userReimbursementInfo:o.userReimbursementInfo,userRoleId:l,isEmployee:b,onClickMenuIcon:()=>{j(!0)}})]}):s.jsx(ye,{fetchState:"In-Progress",style:{backgroundColor:c.colors.grey5}})};function Oa(){const e=v((H=>V(H))),t=le(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=et(),c=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,d=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:m}=oe(),{isFeatureEnabled:o}=m(x.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=m(x.isDebitCardFeatureEnabled),i=Ve(a,e),l=We(e),b=e?.userRole!=null&&gn(e?.userRole),y=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!b)&&hn(t?.loggedInUserRoleMap),f=fn(t?.loggedInUserRoleMap),B=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!b,u=Se(t?.loggedInUserRoleMap),T=B&&u,D=!!e.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!b,j=D&&Sn(t?.loggedInUserRoleMap),A=Mn(e,o,a)&&!b,k=A&&In(t?.loggedInUserRoleMap),E=yn(t?.loggedInUserRoleMap),I=Rn(t?.loggedInUserRoleMap),g=vn(t?.loggedInUserRoleMap),U=D&&I,L=e.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!b&&g,M=An(t?.loggedInUserRoleMap),R=kn(t?.loggedInUserRoleMap),p=Ie(t?.loggedInUserRoleMap),N=A&&M,{tenantEmailDomain:O}=ie(),z=J(),W=n===!0&&(u||p&&d);return s.jsxs(dt,{children:[z.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(w,{path:"verification",element:s.jsx(Fe,{isBillPayAdminLevelAccess:y,isUserHasOnlyBillPayAccess:f,isReimbursementAdminLevelAccess:T,isZeniAccountAdminLevelAccess:j,isChargeCardAdminLevelAccess:k,isUserHasOnlyCardAccess:E,productType:"reimbursement",type:"verification"})}),s.jsx(w,{path:"setup",element:s.jsx(Fe,{isBillPayAdminLevelAccess:y,isUserHasOnlyBillPayAccess:f,isReimbursementAdminLevelAccess:T,isZeniAccountAdminLevelAccess:j,isChargeCardAdminLevelAccess:k,isUserHasOnlyCardAccess:E,productType:"reimbursement",type:"setup"})}),s.jsx(w,{path:"promo",element:s.jsx(ma,{})}),s.jsx(w,{path:"approval-rules/*",element:T?s.jsx(On,{}):s.jsx(Nn,{showZeniAccountRoute:U,isUserHasBillPayAccess:R,isUserHasReimbursementAccess:p,showTreasuryRoute:L,isTenantBankingOnly:i,showChargeCardRoute:N,tenantEmailDomain:O??""})}),W&&s.jsx(w,{path:"*",element:s.jsx(sa,{})}),(i===!0||l===!0)&&s.jsx(w,{path:"/*",element:s.jsx(tt,{})}),t!=null&&He(e,t?.loggedInUserRoleMap)&&s.jsx(w,{path:"*",element:s.jsx($,{to:"../promo"})}),c&&u&&s.jsx(w,{path:"*",element:s.jsx($,{to:"../setup"})})]}):z.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(w,{path:"new",element:s.jsx(Ue,{})}),s.jsx(w,{path:":reimbursementId",element:s.jsx(Jn,{})}),s.jsx(w,{path:":reimbursementId/edit",element:s.jsx(Ue,{})}),s.jsx(w,{path:"*",element:s.jsx(pe,{})})]}):s.jsx(w,{path:"*",element:s.jsx(ye,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${F.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(w,{path:"*",element:s.jsx(pe,{})})]})}export{Oa as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-C_WAhyd7.js";import{g as W,h as De,u as Fe,i as Oe,j as d,l as Ae,n as Pe,o as ee}from"./core-1xnf2RtE.js";import{fE as $,Dt as R,U1 as Ee,l_ as le,tA as ce,up as O,lF as Le,lO as A,lG as P,kJ as E,kA as L,kz as Me,CD as ie,uu as Be,bq as ve,U2 as Ve,bn as xe,DQ as ze,U3 as Ge,U4 as Ye,ci as S,Cw as He,U5 as ae,U6 as qe,U7 as Ne,U8 as $e,U9 as Qe,Ua as Ze,Ub as Je,Uc as Xe,Ud as Ke,Ue as We,Uf as ea,Ug as aa,Uh as sa,Ui as U,Uj as M,Uk as B,Ul as v,Um as V,Un as x,Uo as z,Up as G,Uq as Y,Ur as H,eb as ta,Du as oa,Dh as se,Di as te,DA as na,Dm as oe,DG as ra,Us as la,Ut as ca,Uu as ia,Uv as da,Uw as pa,Ux as _a,Uy as fa,Uz as ma,UA as ua,UB as ba,dY as ha,dX as ya}from"./zeni-epic-state-BVNUxmav.js";import{an as wa,ao as Ca,ap as ga,a as Sa,a1 as Ia,M as de,y as q,z as pe,aq as Ra,V as Ta,d as Ua,ar as ja,as as ka,a8 as Da,h as N,R as Fa,v as Oa,p as _e,at as Aa,au as Pa,av as Ea}from"./index-DXVI9ztu.js";import"./mui-BAsIRnB1.js";import La from"./NotFoundScreen-BF2gJW91.js";import{F as Ma}from"./FeaturePreviewScreen-CWY6I3fG.js";import{a as u}from"./sentry-lC29HHPj.js";import{u as Ba}from"./useInitialThreadRequest-BFDb_b7F.js";import{t as ne,a as re,b as va}from"./routePaths-3iKgurJn.js";import{M as Va}from"./MobileAppDrawer-DH0tVOfv.js";import"./recharts-C2rsrRI6.js";import"./analytics-N153TuwK.js";import"./plaid-dW1_MCaE.js";import"./dnd-DsH8jkrb.js";import"./stripe-cKAAJElX.js";import"./lottie-NIzYzhlS.js";import"./lexical-d2so_3As.js";import"./pdf-BKNPlqtE.js";import"./utils-BBaMea9r.js";import"./InboxNotificationsProvider-BU6hQETc.js";import"./useTaskManagerAccess-B7YJLgDK.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="4524b71a-8356-4c6c-9c21-899e4cd2fe54",e._sentryDebugIdIdentifier="sentry-dbid-4524b71a-8356-4c6c-9c21-899e4cd2fe54")}catch{}})();const xa=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",y=e=>{e(H({resetLeftScroll:!0})),e(Y({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(V({resetLeftScroll:!0})),e(M({resetLeftScroll:!0})),e(v({resetLeftScroll:!0})),e(B({resetLeftScroll:!0}))},za=e=>{e(ca()),e(ia()),e(da()),e(pa()),e(_a()),e(fa()),e(ma()),e(ua()),e(ba())},Ga=Ae((function(e){const o=pe.getSignedInUser(),_=e.tenantState.currentTenantId,m=$(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:_??""},t=R(e),r=Ve(m);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:N,isZeniUser:xe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:le(e),isAccountingProjectsEnabled:ce(e),currentTenantCompanyName:a,statementEndPoint:`${Ea}/statement`,authParams:s,isZeniCOAUsed:r}}),(function(e,o){const{navigate:_,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(O(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(la(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ra(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:f,balancesRange:i}=l;let c=[...f];a==="year"&&(c=c.filter((w=>w!=="this_period_vs_same_period_last_year"&&w!=="this_period_vs_same_period_last_year_percent"&&w!=="same_period_last_year"))),e(se(o.firstMonthOfFY,r,i.numberOfPeriods<1?1:i.numberOfPeriods,c)),f.length>0&&e(te(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",i.numberOfPeriods<1?1:i.numberOfPeriods,c))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(U(a)),(I(a)||S(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(oe({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ae({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(oe(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(na(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(se(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(te(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout((()=>y(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(oa({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=ta(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const f=a.accountName===""?a.accountDescription:a.accountName,i=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return ne(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return re(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?va(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,f,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?re(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,l):a.accountType!=null?ne(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l):void 0})();if(i!=null){const c=_e(o.location.state?.pathnameStackToGoBack,o.location.pathname);_(i,{state:{pathnameStackToGoBack:c,referrer:j(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(H({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(Y({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(G({scrollPosition:s}));break;case"balance_sheet":e(z({scrollPosition:s}));break;case"balance_sheet_by_classes":e(x({scrollPosition:s}));break;case"balance_sheet_by_projects":e(V({scrollPosition:s}));break;case"cash_flow_by_classes":e(v({scrollPosition:s}));break;case"cash_flow_by_projects":e(B({scrollPosition:s}));break;case"cash_flow":e(M({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(V({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(v({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(B({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(M({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{_("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,r=I(t),l=S(t);l?(e(Xe({viewMode:a})),e(Ke({viewMode:a}))):r?(e(We({viewMode:a})),e(ea({viewMode:a}))):(e(aa({viewMode:a})),e(sa({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",j(t)),e(U(l?"cash_flow_by_classes":r?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",j(t)),e(U(l?"cash_flow_by_projects":r?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",j(t)),e(U(l?"cash_flow":r?"balance_sheet":"profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{S(o.selectedReportID)?e(Qe({classesToFilterOut:a})):I(o.selectedReportID)?e(Ze({classesToFilterOut:a})):e(Je({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{S(o.selectedReportID)?e(qe({projectsToFilterOut:a})):I(o.selectedReportID)?e(Ne({projectsToFilterOut:a})):e($e({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(ae({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=S(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?L():He()),o.isAccountingProjectsEnabled&&e(s?A():a?E():ie())},onUpdateDisplayOrder:a=>{e(Ye(a))},onUpdateReportFormat:a=>{za(e),e(Ge(a))},onClickMenuIcon:()=>{m(!0)},onResyncReports:()=>{const a=o.selectedReportID;e(a!=="balance_sheet_by_classes"?a!=="balance_sheet_by_projects"?a!=="cash_flow_by_classes"?a!=="cash_flow_by_projects"?ze(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):A(!0):P(!0):E(!0):L(!0))}}}))(Aa);function Ya(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Sa(),_=Ia(),m=Pa(_),a=De(),s=Fe(),t=W(),{tenantEmailDomain:r}=Oe(),{useFeatureGate:l}=de(),{isFeatureEnabled:f}=l(q.isReportsHorizontalClassLayoutSwitchEnabled),i=pe.getSignedInUser(),[c,w]=u.useState(!1),[Q,fe]=u.useState(!1),{isFeatureEnabled:Z}=l(q.isReportsCommentingEnabled);if(i==null)throw Error("Can't access reports page without signing in...");const k=d((n=>$(n))),me=k.masterTOSInfo?.isMasterTOSAccepted??!1,ue=k.company?.companyInfo.firstMonthOfFY??1,be=Ba(Z?k?.companyId:void 0),C=d((n=>R(n).fetchState)),he=d((n=>Ee(n))),{areTenantIdsInSync:b}=Ra(),D=d((n=>n.financeStatementState.selectedReportId)),T=d((n=>le(n))),g=d((n=>ce(n))),ye=d((n=>R(n).isCompareModeOn)),h=d((n=>R(n).filter)),F=d((n=>R(n).selectedReportAndTimeframeFetchState)),we=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!c&&b&&(w(!0),s(O(i.userId,!0,!0,!1)))}),[c,i,s,b]),u.useEffect((()=>{c&&!Q&&C==="Completed"&&b&&(s(O(i.userId,!1,!0,!1)),fe(!0))}),[c,Q,C,b]),u.useEffect((()=>{if(c&&F.fetchState==="Not-Started"&&h.timeframe!=="free_range"&&h.timeframe!=="week"&&b)switch(D){case"profit_and_loss":case"profit_and_loss_by_classes":s(Be(h.timeframe));break;case"profit_and_loss_by_projects":g&&s(ie());break;case"balance_sheet":s(Me(h.timeframe));break;case"balance_sheet_by_classes":T&&s(L());break;case"balance_sheet_by_projects":g&&s(E());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":g&&s(A());break;case"cash_flow":s(Le(h.timeframe))}}),[c,D,F,b,T,g]);const J=Ta(),Ce=J?.loggedInUserRole!=null&&ve(J?.loggedInUserRole)!==!0,[ge,Se]=u.useState(!1),X=n=>{Se(n)},Ie=Ua(),Re=ja();return(function(n){const{isDataReady:Te}=n,{pathname:Ue}=W(),K=wa(Ue??"")==="reports",je=Ca(Te),ke=u.useMemo((()=>K?xa:void 0),[K]);ga({canFetchSuggestedQuestions:je,pageContexts:ke})})({isDataReady:C==="Completed"}),ka({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(Da,{analytics:N,onLoad:n=>n.trackPageLoaded(Fa.Event.reports)}):null,p.jsx(Va,{isAppContentDrawerOpen:ge,handleDrawerToggle:X}),p.jsx(Ga,{firstMonthOfFY:ue,tenantEmailDomain:r,location:t,navigate:a,windowSize:_,classViewLayout:we,selectedReportID:D,analytics:N,filter:h,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:g,isCompareModeOn:ye,hasTransactionAccess:Ce,signedInUser:i,selectedReportAndTimeframeFetchState:F,handleDrawerToggle:X,reportsResyncFetchState:he.reportsResyncFetchState,isAiCfoAccessEnabled:Re&&Ie&&!e,onAskAiCfoClick:()=>{if(me)if(m){const n=_e(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else Oa({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:f,isReportsCommentingEnabled:Z,initialOpenThreadRequest:be})]})}const j=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function _s(){const e=d((s=>$(s))),{useFeatureGate:o}=de(),{isFeatureEnabled:_}=o(q.isDebitCardFeatureEnabled),m=ha(_,e),a=ya(e);return m===!0||a===!0?p.jsx(Ma,{}):p.jsxs(Pe,{children:[p.jsx(ee,{path:"/",element:p.jsx(Ya,{})}),p.jsx(ee,{path:"*",element:p.jsx(La,{})})]})}export{_s as default};
|
|
1
|
+
import{j as p}from"./liveblocks-B3m51ZRo.js";import{g as W,h as De,u as Fe,i as Oe,j as d,l as Ae,n as Pe,o as ee}from"./core-gUqdW_kq.js";import{fE as $,Dt as R,U1 as Ee,l_ as le,tA as ce,up as O,lF as Le,lO as A,lG as P,kJ as E,kA as L,kz as Me,CD as ie,uu as Be,bq as ve,U2 as Ve,bn as xe,DQ as ze,U3 as Ge,U4 as Ye,ci as S,Cw as He,U5 as ae,U6 as qe,U7 as Ne,U8 as $e,U9 as Qe,Ua as Ze,Ub as Je,Uc as Xe,Ud as Ke,Ue as We,Uf as ea,Ug as aa,Uh as sa,Ui as U,Uj as M,Uk as B,Ul as v,Um as V,Un as x,Uo as z,Up as G,Uq as Y,Ur as H,eb as ta,Du as oa,Dh as se,Di as te,DA as na,Dm as oe,DG as ra,Us as la,Ut as ca,Uu as ia,Uv as da,Uw as pa,Ux as _a,Uy as fa,Uz as ma,UA as ba,UB as ua,dY as ha,dX as ya}from"./zeni-epic-state-C-d25VTi.js";import{an as wa,ao as Ca,ap as ga,a as Sa,a1 as Ia,M as de,y as q,z as pe,aq as Ra,Q as Ta,e as Ua,ar as ka,as as ja,a8 as Da,k as N,U as Fa,A as Oa,p as _e,at as Aa,au as Pa,av as Ea}from"./index-BhyEYQTn.js";import"./mui-DCW4m3lZ.js";import La from"./NotFoundScreen-Bii3lrih.js";import{F as Ma}from"./FeaturePreviewScreen-BsptTDQw.js";import{a as b}from"./sentry-DI7gLUjw.js";import{u as Ba}from"./useInitialThreadRequest-DTQjUnhP.js";import{t as ne,a as re,b as va}from"./routePaths-DAdB7ufZ.js";import{M as Va}from"./MobileAppDrawer-BPpLxyPF.js";import"./recharts-HpXoq1DR.js";import"./analytics-BvodL4nJ.js";import"./plaid-BrXe9xNf.js";import"./dnd-YSyN45zY.js";import"./stripe-cKAAJElX.js";import"./lottie-DLBd_qLT.js";import"./lexical-Euc6kCJG.js";import"./pdf-BDXl9G7N.js";import"./utils-8Dv5nUFZ.js";import"./InboxNotificationsProvider-D007v5X6.js";import"./useTaskManagerAccess-U48bmWaI.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="a7f3b170-5e36-4c0b-b1be-de16a7b0b459",e._sentryDebugIdIdentifier="sentry-dbid-a7f3b170-5e36-4c0b-b1be-de16a7b0b459")}catch{}})();const xa=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",y=e=>{e(H({resetLeftScroll:!0})),e(Y({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(V({resetLeftScroll:!0})),e(M({resetLeftScroll:!0})),e(v({resetLeftScroll:!0})),e(B({resetLeftScroll:!0}))},za=e=>{e(ca()),e(ia()),e(da()),e(pa()),e(_a()),e(fa()),e(ma()),e(ba()),e(ua())},Ga=Ae((function(e){const o=pe.getSignedInUser(),_=e.tenantState.currentTenantId,m=$(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:_??""},t=R(e),r=Ve(m);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:N,isZeniUser:xe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:le(e),isAccountingProjectsEnabled:ce(e),currentTenantCompanyName:a,statementEndPoint:`${Ea}/statement`,authParams:s,isZeniCOAUsed:r}}),(function(e,o){const{navigate:_,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(O(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(la(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ra(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:f,balancesRange:i}=l;let c=[...f];a==="year"&&(c=c.filter((w=>w!=="this_period_vs_same_period_last_year"&&w!=="this_period_vs_same_period_last_year_percent"&&w!=="same_period_last_year"))),e(se(o.firstMonthOfFY,r,i.numberOfPeriods<1?1:i.numberOfPeriods,c)),f.length>0&&e(te(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",i.numberOfPeriods<1?1:i.numberOfPeriods,c))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(U(a)),(I(a)||S(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(oe({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ae({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(oe(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(na(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(se(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(te(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout((()=>y(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(oa({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=ta(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const f=a.accountName===""?a.accountDescription:a.accountName,i=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return ne(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return re(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?va(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,f,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?re(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,l):a.accountType!=null?ne(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l):void 0})();if(i!=null){const c=_e(o.location.state?.pathnameStackToGoBack,o.location.pathname);_(i,{state:{pathnameStackToGoBack:c,referrer:k(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(H({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(Y({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(G({scrollPosition:s}));break;case"balance_sheet":e(z({scrollPosition:s}));break;case"balance_sheet_by_classes":e(x({scrollPosition:s}));break;case"balance_sheet_by_projects":e(V({scrollPosition:s}));break;case"cash_flow_by_classes":e(v({scrollPosition:s}));break;case"cash_flow_by_projects":e(B({scrollPosition:s}));break;case"cash_flow":e(M({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(V({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(v({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(B({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(M({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{_("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,r=I(t),l=S(t);l?(e(Xe({viewMode:a})),e(Ke({viewMode:a}))):r?(e(We({viewMode:a})),e(ea({viewMode:a}))):(e(aa({viewMode:a})),e(sa({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",k(t)),e(U(l?"cash_flow_by_classes":r?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",k(t)),e(U(l?"cash_flow_by_projects":r?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",k(t)),e(U(l?"cash_flow":r?"balance_sheet":"profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{S(o.selectedReportID)?e(Qe({classesToFilterOut:a})):I(o.selectedReportID)?e(Ze({classesToFilterOut:a})):e(Je({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{S(o.selectedReportID)?e(qe({projectsToFilterOut:a})):I(o.selectedReportID)?e(Ne({projectsToFilterOut:a})):e($e({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(ae({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=S(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?L():He()),o.isAccountingProjectsEnabled&&e(s?A():a?E():ie())},onUpdateDisplayOrder:a=>{e(Ye(a))},onUpdateReportFormat:a=>{za(e),e(Ge(a))},onClickMenuIcon:()=>{m(!0)},onResyncReports:()=>{const a=o.selectedReportID;e(a!=="balance_sheet_by_classes"?a!=="balance_sheet_by_projects"?a!=="cash_flow_by_classes"?a!=="cash_flow_by_projects"?ze(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):A(!0):P(!0):E(!0):L(!0))}}}))(Aa);function Ya(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Sa(),_=Ia(),m=Pa(_),a=De(),s=Fe(),t=W(),{tenantEmailDomain:r}=Oe(),{useFeatureGate:l}=de(),{isFeatureEnabled:f}=l(q.isReportsHorizontalClassLayoutSwitchEnabled),i=pe.getSignedInUser(),[c,w]=b.useState(!1),[Q,fe]=b.useState(!1),{isFeatureEnabled:Z}=l(q.isReportsCommentingEnabled);if(i==null)throw Error("Can't access reports page without signing in...");const j=d((n=>$(n))),me=j.masterTOSInfo?.isMasterTOSAccepted??!1,be=j.company?.companyInfo.firstMonthOfFY??1,ue=Ba(Z?j?.companyId:void 0),C=d((n=>R(n).fetchState)),he=d((n=>Ee(n))),{areTenantIdsInSync:u}=Ra(),D=d((n=>n.financeStatementState.selectedReportId)),T=d((n=>le(n))),g=d((n=>ce(n))),ye=d((n=>R(n).isCompareModeOn)),h=d((n=>R(n).filter)),F=d((n=>R(n).selectedReportAndTimeframeFetchState)),we=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));b.useEffect((()=>{!c&&u&&(w(!0),s(O(i.userId,!0,!0,!1)))}),[c,i,s,u]),b.useEffect((()=>{c&&!Q&&C==="Completed"&&u&&(s(O(i.userId,!1,!0,!1)),fe(!0))}),[c,Q,C,u]),b.useEffect((()=>{if(c&&F.fetchState==="Not-Started"&&h.timeframe!=="free_range"&&h.timeframe!=="week"&&u)switch(D){case"profit_and_loss":case"profit_and_loss_by_classes":s(Be(h.timeframe));break;case"profit_and_loss_by_projects":g&&s(ie());break;case"balance_sheet":s(Me(h.timeframe));break;case"balance_sheet_by_classes":T&&s(L());break;case"balance_sheet_by_projects":g&&s(E());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":g&&s(A());break;case"cash_flow":s(Le(h.timeframe))}}),[c,D,F,u,T,g]);const J=Ta(),Ce=J?.loggedInUserRole!=null&&ve(J?.loggedInUserRole)!==!0,[ge,Se]=b.useState(!1),X=n=>{Se(n)},Ie=Ua(),Re=ka();return(function(n){const{isDataReady:Te}=n,{pathname:Ue}=W(),K=wa(Ue??"")==="reports",ke=Ca(Te),je=b.useMemo((()=>K?xa:void 0),[K]);ga({canFetchSuggestedQuestions:ke,pageContexts:je})})({isDataReady:C==="Completed"}),ja({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(Da,{analytics:N,onLoad:n=>n.trackPageLoaded(Fa.Event.reports)}):null,p.jsx(Va,{isAppContentDrawerOpen:ge,handleDrawerToggle:X}),p.jsx(Ga,{firstMonthOfFY:be,tenantEmailDomain:r,location:t,navigate:a,windowSize:_,classViewLayout:we,selectedReportID:D,analytics:N,filter:h,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:g,isCompareModeOn:ye,hasTransactionAccess:Ce,signedInUser:i,selectedReportAndTimeframeFetchState:F,handleDrawerToggle:X,reportsResyncFetchState:he.reportsResyncFetchState,isAiCfoAccessEnabled:Re&&Ie&&!e,onAskAiCfoClick:()=>{if(me)if(m){const n=_e(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else Oa({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:f,isReportsCommentingEnabled:Z,initialOpenThreadRequest:ue})]})}const k=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function _s(){const e=d((s=>$(s))),{useFeatureGate:o}=de(),{isFeatureEnabled:_}=o(q.isDebitCardFeatureEnabled),m=ha(_,e),a=ya(e);return m===!0||a===!0?p.jsx(Ma,{}):p.jsxs(Pe,{children:[p.jsx(ee,{path:"/",element:p.jsx(Ya,{})}),p.jsx(ee,{path:"*",element:p.jsx(La,{})})]})}export{_s as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as a}from"./liveblocks-B3m51ZRo.js";import{z as j,a8 as N,k as f,U as S,e3 as b,M as k,y as C}from"./index-BhyEYQTn.js";import"./mui-DCW4m3lZ.js";import g from"./NotFoundScreen-Bii3lrih.js";import{a as m}from"./sentry-DI7gLUjw.js";import{u as I,j as y,h as F,g as L,l as U,n as _,o as d,N as h}from"./core-gUqdW_kq.js";import{fE as T,a17 as w,a18 as p,D8 as P,p_ as V,a19 as z,D6 as G}from"./zeni-epic-state-C-d25VTi.js";import"./recharts-HpXoq1DR.js";import"./analytics-BvodL4nJ.js";import"./plaid-BrXe9xNf.js";import"./dnd-YSyN45zY.js";import"./stripe-cKAAJElX.js";import"./lottie-DLBd_qLT.js";import"./lexical-Euc6kCJG.js";import"./pdf-BDXl9G7N.js";import"./utils-8Dv5nUFZ.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]="066c9869-6c82-453d-8e38-d179132ac322",e._sentryDebugIdIdentifier="sentry-dbid-066c9869-6c82-453d-8e38-d179132ac322")}catch{}})();const M=U((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=j.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((c=>{s.push(c.companyName),r.push(c.emailIds[0])})),f.trackInviteEmailClicked("send",s,r,s.length)}e(G())},onUpdateInviteFormLocalData:s=>{e(z({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&f.trackInviteEmailClicked("cancel")}}}))(b),R=()=>{const e=I(),[t,n]=m.useState(!1),[i,s]=m.useState(!1),r=y((o=>T(o))),c=F(),x=L(),u=j.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const l=y((o=>w(o))),D=u?.firstName!=null?u.firstName:"User";m.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),m.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[l.fetchState,e]);const v=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(N,{analytics:f,onLoad:o=>(E=>E.trackPageLoaded(S.Event.inviteEmailViewed))(o)}):null,a.jsx(M,{navigate:c,location:x,currentTenant:r,companyName:v,userName:D,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=k(),{isFeatureEnabled:t}=e(C.isReferralFeatureEnabled);return a.jsxs(_,{children:[a.jsx(d,{path:"/",element:a.jsx(h,{to:"refer",replace:!0})}),a.jsx(d,{path:"how-it-works",element:a.jsx(h,{to:"refer",replace:!0})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(R,{}):a.jsx(g,{})}),a.jsx(d,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import{j as k}from"./liveblocks-B3m51ZRo.js";import{a as A}from"./sentry-DI7gLUjw.js";import{i as $,u as X,h as Q,g as ee,j as h,l as te}from"./core-gUqdW_kq.js";import{V$ as Ve,W0 as Me,l_ as ae,rS as Ge,s2 as $e,sk as Re,si as Fe,sl as Ke,so as Ue,W1 as Ye,fE as K,U_ as pe,W2 as Se,gZ as ne,cB as le,cC as se,Ey as ve,W3 as Ce,EC as We,gN as ce,rV as qe,sw as ze,dB as Ze,dA as He,Sn as fe,Ew as Xe,Eq as Qe,W4 as De,Ei as et,Eh as tt,Ec as at,En as nt,ED as lt,W5 as Y,W6 as ge,Ej as st,U$ as oe,ET as Ae,EM as Ie,W7 as xe,rY as Te,EG as Be,EE as we,W8 as Le,E_ as je,EX as be,EH as Je,EZ as _e}from"./zeni-epic-state-C-d25VTi.js";import{a4 as de,aY as ie,aZ as ct,z as ot,j as dt,a7 as it,a8 as ue,k as N,av as ut,a_ as rt,p as M,G as Ee,c as ke,a$ as ht,b0 as mt,b1 as pt}from"./index-BhyEYQTn.js";import{n as re}from"./mui-DCW4m3lZ.js";import{p as St}from"./pathToGoBack-Ds-XNEX3.js";import H from"./NotFoundScreen-Bii3lrih.js";import{c as G}from"./routePaths-DAdB7ufZ.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]="825e7279-2036-4081-9ba1-96f70186f8e8",e._sentryDebugIdIdentifier="sentry-dbid-825e7279-2036-4081-9ba1-96f70186f8e8")}catch{}})();function Ft({isRenderedInPanel:e=!1,accrualIdOverride:t,onPanelNavigateBack:c}={}){const{accrualId:l}=$(),s=t??l,n=X(),i=Q(),a=ee(),{accrual:d,actionFetchState:o,detailFetchState:m,localData:I}=h((u=>Ve(u,s??""))),p=h((u=>Me(u))),C=h((u=>ae(u))),g=A.useCallback((()=>{const u=de(a.state?.pathnameStackToGoBack);i(u.poppedPathname??St(4),{state:{pathnameStackToGoBack:u.newStack}})}),[a.state,i]),f=A.useRef(!1);return A.useEffect((()=>{o.fetchState!=="In-Progress"&&f.current&&o.fetchState==="Completed"&&(f.current=!1,g())}),[o.fetchState,g]),A.useEffect((()=>{s!=null&&d==null&&m.fetchState==="Not-Started"&&n(Ge(s))}),[s,d,m.fetchState]),A.useEffect((()=>{n($e({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[n]),s==null?k.jsx(H,{}):d==null?m.fetchState==="Not-Started"||m.fetchState==="In-Progress"?k.jsx(ie,{}):k.jsx(H,{}):k.jsx(ft,{children:k.jsx(ct,{isRenderedInPanel:e,accrual:d,actionFetchState:o.fetchState,isAccountingClassesEnabled:C,localData:I,newAccrualAccountsView:p,onAccrualFormChange:(u,r)=>{n(Ye({accrualId:u,localData:r}))},onAccrualFormClear:u=>{n(Ue({accrualId:u}))},onApproveAndPost:u=>{n(Ke(s,u))},onNavigateBack:c??g,onRevert:(u,r)=>{f.current=!0,n(Fe(s,u,r))},onSkip:(u,r)=>{n(Re(s,u,r))}})})}const ft=re.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
width: 100%;
|
|
5
|
+
flex: 1 0 auto;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
+
`,Dt=Ee.getLocalizedStrings(),gt=te((function(e,t){const c=Se(e,t.scheduleTab),l=e.tenantState.currentTenantId;return{authParams:{userId:t.signedInUser.userId??"",sessionId:t.signedInUser.zeniSessionId??"",tenantId:l??""},linkBillExpenseView:c.linkBillExpenseView,transactions:c.linkBillExpenseView.transactions}}),(function(e,t){const{navigate:c,location:l}=t;return{onTransactionSelect(s){e(Ce({selectedTransaction:s}))},onBackClick:()=>{c("..",{relative:"path"})},onCancel(){e(Ce({selectedTransaction:void 0})),e(We()),c("..",{relative:"path"})},onTransactionClick:s=>{const n=`${G(s,t.tenantEmailDomain)}`,i=M(l.state?.pathnameStackToGoBack,l.pathname);c(n,{state:{pathnameStackToGoBack:i}})},onLinkSave(){t.setShouldNavigateBack(!1),e(ve(t.scheduleTab,t.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}}))(rt),Kt=({setShouldNavigateBack:e})=>{const t=Q(),c=ee(),{scheduleDetailId:l,tenantEmailDomain:s}=$(),{scheduleType:n}=$();if(s==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const i=h((g=>K(g))),a=pe(n)??"accrued_expenses",d=ot.getSignedInUser();if(d==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(l==null)throw Error("Invalid Schedule Detail Id");const o=h((g=>Se(g,a))),m=o.selectedJELinkRowIndex,I=h((g=>ne(g,i.companyId))),p=dt(o.updateStatus.fetchState);A.useEffect((()=>{p==="In-Progress"&&o.updateStatus.fetchState==="Completed"&&t("..",{relative:"path"})}),[p,o.updateStatus.fetchState]),A.useEffect((()=>{o.fetchState==="Not-Started"&&t("..",{relative:"path"})}),[]),A.useEffect((()=>{o.selectedJEAccruedSchedule!=null&&o.selectedJELinkRowIndex!=null||t("..",{relative:"path"})}),[o.selectedJEAccruedSchedule,o.selectedJELinkRowIndex]);const C=o.linkBillExpenseView.fetchState==="Completed";return k.jsx(k.Fragment,{children:o.linkBillExpenseView.fetchState==="In-Progress"?k.jsx(it,{fetchState:o.linkBillExpenseView.fetchState}):o.selectedJEAccruedSchedule!=null&&m!=null?k.jsxs(k.Fragment,{children:[C===!0?k.jsx(ue,{analytics:N,onLoad:()=>{Et(o,a,I)}}):null,k.jsx(gt,{signedInUser:d,attachmentEndPoint:`${ut}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:o.selectedJEAccruedSchedule.vendor.id??"",location:c,tenantEmailDomain:s,scheduleAccruedDetailsView:o,saveFetchState:o.updateStatus.fetchState,scheduleTab:a,navigate:t,analytics:N,controllerUserDetails:I,saveStatus:o.updateStatus.fetchState,jeAccruedSchedule:o.selectedJEAccruedSchedule,localData:o.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},Ne=e=>{const t=Dt.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(t)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(t)??null,endMonth:e.endDate?.format(t)??null}},Et=(e,t,c)=>{const l=e.selectedJEAccruedSchedule,s=e.selectedJELinkRowIndex;let n;s!=null&&l!=null&&(n=l.scheduledJournalEntry[s]);const{transactions:i}=e.linkBillExpenseView,a=i.some((m=>m.isRecommendedTransaction===!0)),d=le(c.controllers),o=se(c.controllerUserIds);l!=null&&N.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:t,schedule:{...Ne(l)},scheduleExpenseCategoryAndClass:{expenseCategory:l.jeDebit.account?.accountName??null,expenseClass:l.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:a,journalEntryPostingStatus:n?.status.label??""},vendorName:l.vendor.name??null,controllerEmails:d,controllerUserIds:o})};function ye({jeScheduleId:e,scheduleKey:t,scheduleType:c,onDecided:l}){const s=X(),{ignoreStatusById:n,revertStatusById:i}=h((I=>ce(I).jeSchedules)),a=A.useRef(void 0),d=t==null||a.current==null?void 0:a.current==="ignore"?n[t]?.fetchState:i[t]?.fetchState,o=A.useRef(!1),m=A.useRef(l);return m.current=l,A.useEffect((()=>{o.current&&d==="Completed"&&(o.current=!1,m.current())}),[d]),{onScheduleDecision:A.useCallback(((I,p,C)=>{if(t!=null){if(I==="ignore")return(function(g){return Ze.includes(g)})(p)?(o.current=!0,a.current="ignore",void s(qe(t,c,p,C))):void 0;e!=null&&(function(g){return He.includes(g)})(p)&&(o.current=!0,a.current="revert",s(ze(e,t,c,p,C)))}}),[s,e,t,c]),scheduleDecisionStatus:d}}const kt=re.div`
|
|
10
|
+
display: flex;
|
|
11
|
+
min-height: 100%;
|
|
12
|
+
width: 100%;
|
|
13
|
+
flex: 1 0 auto;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
align-items: center;
|
|
16
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
+
`,yt=te((function(e){const t=K(e),c=e.entityAutoCompleteState.autoCompleteText.common,l=De(e,"common");return{tenantName:t.companyName,vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:l}}}),(function(e,t){const{navigate:c,location:l}=t,s="accrued_expenses";return{onNavigateBack:()=>{if(t.onPanelNavigateBack!=null)return void t.onPanelNavigateBack();const n=de(l.state?.pathnameStackToGoBack);n.poppedPathname==null?c("../schedules/accrued_expenses"):c(n.poppedPathname,{state:{pathnameStackToGoBack:n.newStack}})},onZeniLogoClick:()=>{t.themeState.toggle()},onSave:n=>{t.setShouldNavigateBack(!0),e(ve(s,n))},onDelete:n=>{e(st(s,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(n,i)=>{n.trim().length>=2?e(ge({searchString:n,entityType:i,searchOrigin:"common"})):n.trim().length===0&&e(Y("common"))},onCancelAutoComplete:()=>{e(Y("common"))}},onEditAmount:(n,i)=>{e(lt(s,n,i))},onJELinkClick:n=>{e(nt({selectedJELinkRowIndex:n})),c("./edit_link")},onCancelAccrual:(n,i,a)=>{e(at(n,i,a))},onTransactionClick:n=>{const i=`${G(n,t.tenantEmailDomain)}`,a=M(l.state?.pathnameStackToGoBack,l.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onViewPostedJE:n=>{const i=`${G(n,t.tenantEmailDomain)}`,a=M(l.state?.pathnameStackToGoBack,l.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onViewRecordedJE:n=>{const i=`${G(n,t.tenantEmailDomain)}`,a=M(l.state?.pathnameStackToGoBack,l.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onViewBillExpense:n=>{const i=`${G(n,t.tenantEmailDomain)}`,a=M(l.state?.pathnameStackToGoBack,l.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onDetailPageChange:(n,i,a)=>{const{scheduleDetailsAccruedExpensesSection:d}=n,{amount:o,memo:m,months:I,scheduleAccruedExpenseCategory:p,scheduleClass:C,scheduleExpenseCategory:g,startDate:f,vendor:u}=d,r=C.selectedOption!=null?t.classList.find((B=>B.classId===C.selectedOption)):void 0,v=g.selectedOption!=null?t.accountList.find((B=>B.qboId===g.selectedOption)):void 0,D=p.selectedOption!=null?t.accruedAccountList.find((B=>B.qboId===p.selectedOption)):void 0,L=I?.selectedOption;e(et({scheduleType:s,localData:i,selectedJeScheduleDetailId:t.scheduleDetailId})),a!==!1||t.scheduleDetailId!=null||v?.accountId==null||t.isAccountingClassesEnabled!==!1&&r?.classId==null||D==null||u.selectedOption==null||m==null||o==null&&o==0||f==null||L==null||e(tt({scheduleType:s}))}}}))(ht),Ut=({shouldNavigateBack:e,setShouldNavigateBack:t,isRenderedInPanel:c=!1,scheduleDetailIdOverride:l,onPanelCloseAfterDecision:s,onPanelNavigateBack:n}={})=>{const[i,a]=A.useState(!1),d=e??i,o=t??a,m=Q(),I=ee(),p=X(),C=ke(),{tenantEmailDomain:g}=$(),[f,u]=A.useState(!1);if(g==null)throw new Error("Can't access this page without a tenantEmailDomain");const{scheduleDetailId:r}=$(),v=l??r;let D;v!=="new"&&(D=v);const L=Ct(v),B=h((w=>w.scheduleAccruedDetailState.selectedJEAccruedScheduleKey)),j="accrued_expenses",y=h((w=>Se(w,"accrued_expenses"))),b=h((w=>fe(w))),J=h((w=>w.classListState.fetchState)),x=h((w=>ae(w))),_=b!=="Completed"||J!=="Completed";A.useEffect((()=>{f===!1&&_?(p(Xe(j,D)),u(!0)):_===!1&&f===!1&&v!=="new"&&(p(Qe(j,v)),u(!0))}),[f]);const P=h((w=>K(w))),T=h((w=>ne(w,P.companyId))),O=I.state?.message==="expenseAutomation",W=h((w=>ce(w).selectedPeriod)),U=c||O,{onScheduleDecision:q,scheduleDecisionStatus:z}=ye({jeScheduleId:y.selectedJEAccruedSchedule?.jeScheduleId,scheduleKey:y.selectedJEAccruedSchedule?.jeAccruedScheduleKey,scheduleType:j,onDecided:()=>{if(s==null)if(O!==!0)m("../schedules/accrued_expenses");else{const{month:w,year:Pe}=W;m(`../../month_end_close_checks/review/je_schedules/${w}-${Pe}`)}else s()}}),V=y.fetchState,R=y.allAccountList,Z=y.allClassList,E=y.allAccruedAccountList,S=y.scheduleAccruedDetailsLocalData;if(L!==!0||y.fetchState==="Error")return k.jsx(H,{});const F=V==="Completed"&&f===!0,Oe=y.selectedJEAccruedSchedule!=null;return V==="Completed"||V==="Not-Started"||c===!0&&Oe?k.jsxs(kt,{children:[F===!0?k.jsx(ue,{analytics:N,onLoad:()=>{vt(y,j,T)}}):null,k.jsx(yt,{onScheduleDecision:U?q:void 0,scheduleDecisionStatus:z,isRenderedInPanel:c,onPanelNavigateBack:n,setShouldNavigateBack:o,scheduleAccruedDetailsView:y,location:I,navigate:m,classList:Z,accountList:R,shouldNavigateBack:d,accruedAccountList:E,scheduleLocalData:S,selectedJEScheduleKey:B,scheduleDetailId:D,selectedScheduledJournalEntries:y.selectedJEAccruedSchedule?.scheduledJournalEntry??[],themeState:C,tenantEmailDomain:g,analytics:N,controllerUserDetails:T,isAccountingClassesEnabled:x,status:y.selectedJEAccruedSchedule?.status.code})]}):k.jsx(ie,{})},Ct=e=>e!=null,vt=(e,t,c)=>{const l=e.selectedJEAccruedSchedule,s=le(c.controllers),n=se(c.controllerUserIds);l!=null&&N.trackScheduleAccruedDetailsLoaded({scheduleType:t,scheduleExpenseCategoryAndClass:{expenseCategory:l.jeDebit.account?.accountName??null,expenseClass:l.jeDebit.accountingClass?.className??null},schedule:{...Ne(l)},vendorName:l.vendor.name??null,controllerEmails:s,controllerUserIds:n})},At=re.div`
|
|
18
|
+
display: flex;
|
|
19
|
+
min-height: 100%;
|
|
20
|
+
width: 100%;
|
|
21
|
+
flex: 1 0 auto;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
align-items: center;
|
|
24
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
25
|
+
`,he=Ee.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat,It=te((function(e){const t=K(e),c=oe(e,"fixed_assets");return{tenantName:t.companyName,scheduleDetailsView:c}}),(function(e,t){const{navigate:c,location:l,vendorSearchAutoCompleteData:s,selectedScheduledJournalEntries:n}=t,i="fixed_assets",a=n.flatMap((d=>d.error)).filter((d=>!!d))??[];return{onNavigateBack:()=>{if(t.onPanelNavigateBack!=null)return void t.onPanelNavigateBack();const d=de(t.location.state?.pathnameStackToGoBack);d.poppedPathname==null?c("../schedules/fixed_assets"):t.navigate(d.poppedPathname,{state:{pathnameStackToGoBack:d.newStack}})},onZeniLogoClick:()=>{t.themeState.toggle()},onSave:d=>{e(_e(i,d,a.length>0))},onDelete:d=>{e(Je(i,d))},onMarkAsComplete:()=>{t.selectedJEScheduleKey!=null&&e(be(i,t.selectedJEScheduleKey))},onEditAmount:(d,o)=>{e(je(i,d,o))},onJELinkClick:d=>{e(Le({selectedJELinkRowIndex:d})),c("./edit_link")},onTransactionClick:d=>{const o=`${G(d,t.tenantEmailDomain)}`,m=M(l.state?.pathnameStackToGoBack,l.pathname);c(o,{state:{pathnameStackToGoBack:m,message:"comingFromScheduleDetailsFixedAssets"}})},onViewLinkedJE:d=>{const o=`${G(d,t.tenantEmailDomain)}`,m=M(l.state?.pathnameStackToGoBack,l.pathname);c(o,{state:{pathnameStackToGoBack:m}})},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(d,o)=>{d.trim().length>=2?e(ge({searchString:d,entityType:o,searchOrigin:"common"})):d.trim().length===0&&e(Y("common"))},onCancelAutoComplete:()=>{e(Y("common"))}},onDetailPageChange:(d,o)=>{const{scheduleDetailsFixedAssetsSection:m,scheduleDetailsListSection:I}=d,{scheduleClass:p,scheduleExpenseCategory:C,accumulatedDepreciationCategory:g,assetId:f,months:u,startDate:r,postingDate:v,vendor:D}=m,L=s.entityAutoCompleteView.vendor.length>0?s.entityAutoCompleteView.vendor.find((T=>T.id===D?.selectedOption)):void 0,B={id:L?.zeniId??D?.selectedOption??"",name:L?.name??D?.defaultOptions.find((T=>T.value===D?.selectedOption))?.label??"",logo:L?.logo},j=p.selectedOption!=null?t.classList.find((T=>T.classId===p.selectedOption)):void 0,y=C.selectedOption!=null?t.accountList.find((T=>T.qboId===C.selectedOption)):void 0,b=g.selectedOption!=null?t.depAccountList.find((T=>T.qboId===g.selectedOption)):void 0,J=u?.selectedOption,x=I.map(((T,O)=>({...t.scheduleLocalData.jeScheduleDetails[O],amount:{...t.scheduleLocalData.jeScheduleDetails[O].amount,amount:T.amount}}))),_=v.type==="day"?v.dayOfMonth?v.dayOfMonth:1:void 0,P=v.type==="lastDayOfMonth"||void 0;e(Be({scheduleType:i,localData:{selectedAccount:y?.accountId,selectedClass:j?.classId,selectedAccumulatedDepreciationCategory:b?.accountId,selectedDate:r,selectedMonths:J,assetId:f,jeScheduleDetails:x,lastDayOfMonth:P,selectedDayOfMonth:_,selectedVendor:B},selectedJeScheduleDetailId:t.scheduleDetailId})),o!==!1||b?.accountId==null||t.scheduleDetailId!=null&&t.status!=="draft"&&t.status!=="marked_as_completed"||y?.accountId==null||t.isAccountingClassesEnabled!==!1&&j?.classId==null||r==null||J==null||P!==!0&&_==null||e(we({scheduleType:i}))}}}))(mt),Yt=({isRenderedInPanel:e=!1,scheduleDetailIdOverride:t,onPanelCloseAfterDecision:c,onPanelNavigateBack:l}={})=>{const s=Q(),n=ee(),i=X(),a=ke(),{tenantEmailDomain:d}=$(),[o,m]=A.useState(!1),{scheduleDetailId:I}=$(),p=t??I,C=n.state?.message==="expenseAutomation",g=xt(p),f=h((E=>E.scheduleDetailState.selectedJEScheduleKey));A.useEffect((()=>{f!=null&&f.length!==0||p!=="new"||s("../schedules/fixed_assets")}),[f,p]);const u="fixed_assets",r=h((E=>oe(E,u))),v=h((E=>E.entityAutoCompleteState.autoCompleteText.common)),D=h((E=>De(E,"common"))),L=h((E=>fe(E))),B=h((E=>E.classListState.fetchState)),j=h((E=>ae(E))),y=h((E=>ce(E).selectedPeriod)),b=L!=="Completed"||B!=="Completed";A.useEffect((()=>{o===!1&&b?(i(Ae(u,V,!0)),m(!0)):b===!1&&o===!1&&(i(Ie(u,p==="new"?void 0:p,!0)),m(!0))}),[o]),A.useEffect((()=>{if(r.markAsCompleteStatus.fetchState==="Completed")if(i(xe()),C===!0){const{month:E,year:S}=y;s(`../../month_end_close_checks/review/je_schedules/${E}-${S}`)}else s("../schedules/fixed_assets")}),[r.markAsCompleteStatus.fetchState]);const J=h((E=>K(E))),x=h((E=>ne(E,J.companyId))),_=e||C,{onScheduleDecision:P,scheduleDecisionStatus:T}=ye({jeScheduleId:r.selectedJEScheduleTransaction?.jeScheduleId,scheduleKey:r.selectedJEScheduleTransaction?.jeScheduleTransactionKey,scheduleType:u,onDecided:()=>{if(c==null)if(C!==!0)s("../schedules/fixed_assets");else{const{month:E,year:S}=y;s(`../../month_end_close_checks/review/je_schedules/${E}-${S}`)}else c()}}),O=r.fetchState,W=r.allAccountList,U=r.allClassList,q=r.allDepreciationAccountList,z=r.scheduleDetailsLocalData.fixed_assets;let V;if(p!=="new"&&(V=p),g!==!0||r.fetchState==="Error")return k.jsx(H,{});const R=O==="Completed"&&o===!0,Z=r.selectedJEScheduleTransaction!=null;return O==="Completed"||e===!0&&Z?k.jsxs(At,{children:[R===!0?k.jsx(ue,{analytics:N,onLoad:()=>{Bt(r,u,x)}}):null,k.jsx(It,{onScheduleDecision:_?P:void 0,scheduleDecisionStatus:T,isRenderedInPanel:e,onPanelNavigateBack:l,location:n,navigate:s,classList:U,vendorSearchEntityAutoCompleteView:D,vendorSearchAutoCompleteData:{autoCompleteText:v,entityAutoCompleteView:D},expenseAutomationSelectedPeriod:y,usedInExpenseAutomation:C,removeJeScheduleTransactionKey:(E,S)=>{i(Te(E,S))},accountList:W,depAccountList:q,scheduleLocalData:z,selectedJEScheduleKey:f,scheduleDetailId:V,selectedScheduledJournalEntries:r.selectedJEScheduleTransaction?.scheduledJournalEntry??[],themeState:a,tenantEmailDomain:d,analytics:N,controllerUserDetails:x,isAccountingClassesEnabled:j,status:r.selectedJEScheduleTransaction?.status.code})]}):k.jsx(ie,{})},xt=e=>e!=null,Tt=e=>({transactionDate:e.date.format(he),transactionAmount:e.amount,scheduleCategory:e.account.accountName,scheduleClass:e.classBase?.className??null,description:e.memo}),Bt=(e,t,c)=>{const l=e.selectedJEScheduleTransaction?.baseTransaction,s=e.selectedJEScheduleTransaction,n=le(c.controllers),i=se(c.controllerUserIds);var a;l!=null&&s!=null&&N.trackScheduleDetailsLoaded({scheduleType:t,transaction:{...Tt(l)},scheduleExpenseCategoryAndClass:{expenseCategory:s.jeDebit.account?.accountName??null,expenseClass:s.jeDebit.accountingClass?.className??null},scheduledTransaction:{...(a=s,{currentBalance:a.balanceAsOfToday??null,currentStatus:a.status.label,period:a.period??null,startMonth:a.startDate?.format(he)??null,endMonth:a.endDate?.format(he)??null})},vendorName:s.vendor.name??null,fixedAssetsDetails:{accumulatedDepreciationCategory:s.jeCredit.account?.accountName??null,assetId:s.otherAttributes.assetId??null},controllerEmails:n,controllerUserIds:i})},wt=re.div`
|
|
26
|
+
display: flex;
|
|
27
|
+
min-height: 100%;
|
|
28
|
+
width: 100%;
|
|
29
|
+
flex: 1 0 auto;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
align-items: center;
|
|
32
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
33
|
+
`,me=Ee.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat,Lt=te((function(e,t){const c=K(e),l=oe(e,t.scheduleTab);return{tenantName:c.companyName,scheduleDetailsView:l}}),(function(e,t){const{navigate:c,location:l,vendorSearchAutoCompleteData:s,selectedScheduledJournalEntries:n}=t,i=n.flatMap((a=>a.error)).filter((a=>!!a))??[];return{onNavigateBack:()=>{if(t.onPanelNavigateBack!=null)return void t.onPanelNavigateBack();const a=de(t.location.state?.pathnameStackToGoBack);a.poppedPathname==null?c("../schedules/prepaid_expenses"):t.navigate(a.poppedPathname,{state:{pathnameStackToGoBack:a.newStack}})},onZeniLogoClick:()=>{t.themeState.toggle()},onSave:a=>{e(_e(t.scheduleTab,a,i.length>0))},onDelete:a=>{e(Je(t.scheduleTab,a))},onMarkAsComplete:()=>{t.selectedJEScheduleKey!=null&&e(be(t.scheduleTab,t.selectedJEScheduleKey))},onEditAmount:(a,d)=>{e(je(t.scheduleTab,a,d))},onJELinkClick:a=>{e(Le({selectedJELinkRowIndex:a})),c("./edit_link")},onTransactionClick:a=>{const d=`${G(a,t.tenantEmailDomain)}`,o=M(l.state?.pathnameStackToGoBack,l.pathname);c(d,{state:{pathnameStackToGoBack:o,message:"comingFromScheduleDetails"}})},onViewLinkedJE:a=>{const d=`${G(a,t.tenantEmailDomain)}`,o=M(l.state?.pathnameStackToGoBack,l.pathname);c(d,{state:{pathnameStackToGoBack:o}})},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(a,d)=>{a.trim().length>=2?e(ge({searchString:a,entityType:d,searchOrigin:"common"})):a.trim().length===0&&e(Y("common"))},onCancelAutoComplete:()=>{e(Y("common"))}},onDetailPageChange:(a,d)=>{const{scheduleDetailsSection:o,scheduleDetailsListSection:m}=a,{scheduleClass:I,scheduleExpenseCategory:p,months:C,startDate:g,postingDate:f,vendor:u}=o,r=s.entityAutoCompleteView.vendor.length>0?s.entityAutoCompleteView.vendor.find((x=>x.id===u?.selectedOption)):void 0,v={id:r?.zeniId??u?.selectedOption??"",name:r?.name??u?.defaultOptions.find((x=>x.value===u?.selectedOption))?.label??"",logo:r?.logo},D=I.selectedOption!=null?t.classList.find((x=>x.classId===I.selectedOption)):void 0,L=p.selectedOption!=null?t.accountList.find((x=>x.qboId===p.selectedOption)):void 0,B=C?.selectedOption,j=m.map(((x,_)=>({...t.scheduleLocalData.jeScheduleDetails[_],amount:{...t.scheduleLocalData.jeScheduleDetails[_].amount,amount:x.amount}}))),y=f.type==="day"?f.dayOfMonth?f.dayOfMonth:1:void 0,b=f.type==="lastDayOfMonth"||void 0,J={selectedAccount:L?.accountId,selectedClass:D?.classId,selectedDate:g,selectedMonths:B,jeScheduleDetails:j,lastDayOfMonth:b,selectedVendor:v,selectedDayOfMonth:y};e(Be({scheduleType:t.scheduleTab,localData:J,selectedJeScheduleDetailId:t.scheduleDetailId})),d!==!1||t.scheduleDetailId!=null&&t.status!=="draft"&&t.status!=="marked_as_completed"||L?.accountId==null||t.isAccountingClassesEnabled!==!1&&D?.classId==null||g==null||B==null||b!==!0&&y==null||e(we({scheduleType:t.scheduleTab}))}}}))(pt),Wt=({isRenderedInPanel:e=!1,scheduleDetailIdOverride:t,scheduleTypeOverride:c,onPanelCloseAfterDecision:l,onPanelNavigateBack:s}={})=>{const n=Q(),i=ee(),a=X(),d=ke(),{tenantEmailDomain:o}=$(),[m,I]=A.useState(!1),p=i.state?.message==="expenseAutomation",{scheduleType:C,scheduleDetailId:g}=$(),f=t??g,u=jt(c??C,f),r=h((S=>S.scheduleDetailState.selectedJEScheduleKey));A.useEffect((()=>{r!=null&&r.length!==0||f!=="new"||n("../schedules/prepaid_expenses")}),[r,f]);const v=c??pe(C)??"prepaid_expenses",D=h((S=>oe(S,v))),L=h((S=>S.entityAutoCompleteState.autoCompleteText.common)),B=h((S=>De(S,"common"))),j=h((S=>fe(S))),y=h((S=>S.classListState.fetchState)),b=h((S=>ae(S))),J=h((S=>ce(S).selectedPeriod)),x=j!=="Completed"||y!=="Completed";A.useEffect((()=>{m===!1&&x?(a(Ae(v,R,!0)),I(!0)):x===!1&&m===!1&&(a(Ie(v,f==="new"?void 0:f,!0)),I(!0))}),[m]),A.useEffect((()=>{if(D.markAsCompleteStatus.fetchState==="Completed")if(a(xe()),p===!0){const{month:S,year:F}=J;n(`../../month_end_close_checks/review/je_schedules/${S}-${F}`)}else n("../schedules/prepaid_expenses")}),[D.markAsCompleteStatus.fetchState]);const _=h((S=>K(S))),P=h((S=>ne(S,_.companyId))),T=e||p,{onScheduleDecision:O,scheduleDecisionStatus:W}=ye({jeScheduleId:D.selectedJEScheduleTransaction?.jeScheduleId,scheduleKey:D.selectedJEScheduleTransaction?.jeScheduleTransactionKey,scheduleType:v,onDecided:()=>{if(l==null)if(p!==!0)n("../schedules/prepaid_expenses");else{const{month:S,year:F}=J;n(`../../month_end_close_checks/review/je_schedules/${S}-${F}`)}else l()}}),U=D.fetchState,q=D.allAccountList,z=D.allClassList,V=D.scheduleDetailsLocalData;let R;if(f!=="new"&&(R=f),u!==!0||D.fetchState==="Error")return k.jsx(H,{});const Z=U==="Completed"&&m===!0,E=D.selectedJEScheduleTransaction!=null;return U==="Completed"||e===!0&&E?k.jsxs(wt,{children:[Z===!0?k.jsx(ue,{analytics:N,onLoad:()=>{Jt(D,v,P)}}):null,k.jsx(Lt,{onScheduleDecision:T?O:void 0,scheduleDecisionStatus:W,isRenderedInPanel:e,onPanelNavigateBack:s,location:i,vendorSearchEntityAutoCompleteView:B,vendorSearchAutoCompleteData:{autoCompleteText:L,entityAutoCompleteView:B},usedInExpenseAutomation:p,removeJeScheduleTransactionKey:(S,F)=>{a(Te(S,F))},expenseAutomationSelectedPeriod:J,navigate:n,classList:z,accountList:q,scheduleLocalData:V[v],selectedJEScheduleKey:r,scheduleDetailId:R,selectedScheduledJournalEntries:D.selectedJEScheduleTransaction?.scheduledJournalEntry??[],themeState:d,tenantEmailDomain:o,scheduleTab:v,analytics:N,controllerUserDetails:P,isAccountingClassesEnabled:b,status:D.selectedJEScheduleTransaction?.status.code})]}):k.jsx(ie,{})},jt=(e,t)=>pe(e)!=null&&t!=null,bt=e=>({transactionDate:e.date.format(me),transactionAmount:e.amount,scheduleCategory:e.account.accountName,scheduleClass:e.classBase?.className??null,description:e.memo}),Jt=(e,t,c)=>{const l=e.selectedJEScheduleTransaction?.baseTransaction,s=e.selectedJEScheduleTransaction,n=le(c.controllers),i=se(c.controllerUserIds);var a;l!=null&&s!=null&&N.trackScheduleDetailsLoaded({scheduleType:t,transaction:{...bt(l)},scheduleExpenseCategoryAndClass:{expenseCategory:s.jeDebit.account?.accountName??null,expenseClass:s.jeDebit.accountingClass?.className??null},scheduledTransaction:{...(a=s,{currentBalance:a.balanceAsOfToday??null,currentStatus:a.status.label,period:a.period??null,startMonth:a.startDate?.format(me)??null,endMonth:a.endDate?.format(me)??null})},vendorName:s.vendor.name??null,controllerEmails:n,controllerUserIds:i})};export{Ft as J,Yt as S,Ut as a,Wt as b,Kt as c};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-Bii3lrih.js","assets/sentry-DI7gLUjw.js","assets/core-gUqdW_kq.js","assets/zeni-epic-state-C-d25VTi.js","assets/index-BhyEYQTn.js","assets/mui-DCW4m3lZ.js","assets/analytics-BvodL4nJ.js","assets/utils-8Dv5nUFZ.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-kEzQGszS.js","assets/withTransactionSidePanel-0Fy2VPJ-.js","assets/useAskAiCfoHostNavButtonProps-BVUNtLFK.js","assets/TransactionDetailScreen-DL95NJxK.js","assets/decodeURIComponentSafe-Cst3Y24b.js","assets/useInitialThreadRequest-DTQjUnhP.js","assets/routePaths-DAdB7ufZ.js","assets/expenseAutomationHelper-DDRCXr7k.js","assets/analyticsHelper-X6BcuRxb.js","assets/CompanyPassportScreen-DEbgj-ZU.js","assets/MobileAppDrawer-BPpLxyPF.js","assets/InboxNotificationsProvider-D007v5X6.js","assets/useTaskManagerAccess-U48bmWaI.js","assets/useAiCfoDashboardSuggestedQuestionsChips-FMXCfhJm.js","assets/FeaturePreviewScreen-BsptTDQw.js","assets/BillPayRoutes-D0Zcg2S5.js","assets/AddressScreen-zTtPIjPs.js","assets/DomesticWireDetailScreen-Ci1M06dc.js","assets/BusinessVerificationPageScreen-DXdSHPE6.js","assets/DrawerScreen-DzidbbNY.js","assets/SetupPagesScreen-B69hot1T.js","assets/BillPayApprovalRoutes-BTEGJSVP.js","assets/ReimbursementApprovalRuleDetailScreen-B_399PgL.js","assets/getLocaleForTenant-DQPwSKjF.js","assets/ReimbursementRoutes-CxctCJTH.js","assets/ReimbursementApprovalRoutes-L2HInkgU.js","assets/TransactionListRoutes-CAMdM58-.js","assets/ZeniAccountStatementScreen-CF3L4na6.js","assets/SettingsRoutes-B80l8XL-.js","assets/AccountMappingScreen-BCgETeoP.js","assets/QBOConnectionScreen-DTJHrTBk.js","assets/empty-CkcqWk4Z.js","assets/index-70FTEc4H.js","assets/url-qyBRakHR.js","assets/index-DhQKJDfi.js","assets/accountMappingHelper-qlU24D2s.js","assets/useEmailConnectResultRefresh-BDGN0_Dv.js","assets/ReportsRoutes-t4V__ucH.js","assets/ChargeCardRoutes-D7doeHf8.js","assets/useChargeCardPusherEvents-ldgEvsXz.js","assets/PeopleRoutes-DP4ITyk4.js","assets/ExpenseAutomationRoutes-Hq-aTHMY.js","assets/ScheduleDetailsPrepaidExpensesScreen-BJF3mh7B.js","assets/pathToGoBack-Ds-XNEX3.js","assets/TreasuryRoutes-BBcktIxt.js","assets/VendorsRoutes-be9h9k3f.js","assets/ZeniAccountRoutes-CdVwCUVp.js","assets/AddressRoutes-DC3JM7a7.js","assets/PandLWithForecastRoutes-Blj7LUYo.js","assets/CustomerOnboardingRoutes-Coi-ieaU.js","assets/TransactionDetailRoutes-DAAv4zNm.js","assets/EntityDetailRoutes---pzooN0.js","assets/InvoicingRoutes-4pD2cLam.js","assets/NotificationRoutes-DIujlAht.js","assets/PerformanceRoutes-DbTlyJ7g.js","assets/RewardsRoutes-2jmm5cDs.js","assets/TaskRoutes-ByH3im-3.js","assets/TaskListScreen-CqKYMM38.js","assets/AiCfoScreen-CEkPZFk2.js","assets/CardsAiCfoScreen-DwHXFelb.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as s,bn as ms,fE as _s,dY as Es,dX as hs,Al as ps,dh as gs,c8 as Rs,gI as xs,g8 as Is,de as pe,cG as js,gm as Ts,cy as As,bE as bs,br as ys,Ts as Ds,v as fs,Tv as Cs,bq as vs,Tw as Os,bK as Ps,bJ as ws,bt as Us,cu as Fs,Tx as Ls,Ty as ks,d9 as Hs,dc as Vs,db as Ss,cF as Bs,cM as Ns,pR as ge,gh as Re,gX as Ms,gj as xe,gK as Ie,gL as je,gk as Zs}from"./zeni-epic-state-C-d25VTi.js";import{j as e}from"./liveblocks-B3m51ZRo.js";import{a as w}from"./sentry-DI7gLUjw.js";import{N as u,u as Gs,h as $s,i as zs,g as Ys,j as $,q as Te,n as qs,o as t}from"./core-gUqdW_kq.js";import{O as l,E as Ws,u as Xs,z as D,M as Ks,e as Qs,s as Js,y as M,g as en,P as sn,Q as nn,L as F,G as Ae,t as _,R as tn,S as an,k as ne}from"./index-BhyEYQTn.js";import"./mui-DCW4m3lZ.js";import{f as be}from"./analyticsHelper-X6BcuRxb.js";import{t as on}from"./getLocaleForTenant-DQPwSKjF.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]="00753516-2b53-43b7-8839-98e19983a39b",a._sentryDebugIdIdentifier="sentry-dbid-00753516-2b53-43b7-8839-98e19983a39b")}catch{}})();const rn=l((()=>s((()=>import("./NotFoundScreen-Bii3lrih.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ln=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/reimbursements`}),un=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/bills`}),ye=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/treasury`}),De=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/checking`}),fe=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/cards`}),f=({showZeniAccountRoute:a,isUserHasBillPayAccess:A,isUserHasReimbursementAccess:S,showTreasuryRoute:i,isTenantBankingOnly:k,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(k===!0){if(a)return e.jsx(De,{tenantEmailDomain:v});if(i)return e.jsx(ye,{tenantEmailDomain:v});if(O)return e.jsx(fe,{tenantEmailDomain:v})}return a?e.jsx(De,{tenantEmailDomain:v}):i?e.jsx(ye,{tenantEmailDomain:v}):O?e.jsx(fe,{tenantEmailDomain:v}):A?e.jsx(un,{tenantEmailDomain:v}):S?e.jsx(ln,{tenantEmailDomain:v}):e.jsx(rn,{})},dn={dashboard:()=>s((()=>import("./DashboardRoutes-kEzQGszS.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-D0Zcg2S5.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-CxctCJTH.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-CAMdM58-.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])),settings:()=>s((()=>import("./SettingsRoutes-B80l8XL-.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-t4V__ucH.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-D7doeHf8.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-DP4ITyk4.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-Hq-aTHMY.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,51,52,10,44,28,8])),treasury:()=>s((()=>import("./TreasuryRoutes-BBcktIxt.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])),vendors:()=>s((()=>import("./VendorsRoutes-be9h9k3f.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,25,0,23,51,52,15,11,19,20,21,28,44,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-CdVwCUVp.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8]))},cn=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],te=a=>{"requestIdleCallback"in window?requestIdleCallback(a):setTimeout(a,100)},mn=l((()=>s((()=>import("./ReportsRoutes-t4V__ucH.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])))),_n=l((()=>s((()=>import("./AddressRoutes-DC3JM7a7.js")),__vite__mapDeps([56,1,2,3,25,4,5,6,7,0,8])))),En=l((()=>s((()=>import("./PeopleRoutes-DP4ITyk4.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])))),hn=l((()=>s((()=>import("./PandLWithForecastRoutes-Blj7LUYo.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,23,11,14,15,19,20,21,8])))),pn=l((()=>s((()=>import("./CustomerOnboardingRoutes-Coi-ieaU.js")),__vite__mapDeps([58,1,2,3,25,4,5,6,7,0,39,40,41,42,43,13,45,48,8])))),gn=l((()=>s((()=>import("./VendorsRoutes-be9h9k3f.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,25,0,23,51,52,15,11,19,20,21,28,44,8])))),Rn=l((()=>s((()=>import("./TransactionDetailRoutes-DAAv4zNm.js")),__vite__mapDeps([59,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes---pzooN0.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,13,10,11,12,14,15,16,8])))),xn=l((()=>s((()=>import("./DashboardRoutes-kEzQGszS.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-D0Zcg2S5.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])))),In=l((()=>s((()=>import("./SettingsRoutes-B80l8XL-.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])))),jn=l((()=>s((()=>import("./InvoicingRoutes-4pD2cLam.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,25,0,19,20,21,39,40,41,42,43,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-CxctCJTH.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])))),Tn=l((()=>s((()=>import("./ZeniAccountRoutes-CdVwCUVp.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8])))),An=l((()=>s((()=>import("./TreasuryRoutes-BBcktIxt.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])))),bn=l((()=>s((()=>import("./TransactionListRoutes-CAMdM58-.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])))),yn=l((()=>s((()=>import("./ChargeCardRoutes-D7doeHf8.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])))),Dn=l((()=>s((()=>import("./NotificationRoutes-DIujlAht.js")),__vite__mapDeps([62,1,2,3,0,4,5,6,7,11,21,8])))),fn=l((()=>s((()=>import("./PerformanceRoutes-DbTlyJ7g.js")),__vite__mapDeps([63,1,2,3,0,4,5,6,7,11,19,20,21,8])))),Cn=l((()=>s((()=>import("./ExpenseAutomationRoutes-Hq-aTHMY.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,51,52,10,44,28,8])))),vn=l((()=>s((()=>import("./RewardsRoutes-2jmm5cDs.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,0,8])))),On=l((()=>s((()=>import("./TaskRoutes-ByH3im-3.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,14,19,20,21,66,11,8])))),Pn=l((()=>s((()=>import("./AiCfoScreen-CEkPZFk2.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,22,52,15,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-DwHXFelb.js")),__vite__mapDeps([68,1,2,3,4,5,6,7,8])))),C=l((()=>s((()=>import("./NotFoundScreen-Bii3lrih.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),wn=l((()=>s((()=>import("./TaskListScreen-CqKYMM38.js").then((a=>a.f))),__vite__mapDeps([66,1,2,3,4,5,6,7,11,19,20,21,8])))),Un=({isDashboardAccess:a,showZeniAccountRoute:A,isUserHasBillPayAccess:S,isUserHasReimbursementAccess:i,showTreasuryRoute:k,isTenantBankingOnly:O,isTenantCardsOnly:v,showChargeCardRoute:H})=>{if(O===!0){if(A)return e.jsx(u,{to:"checking"});if(k)return e.jsx(u,{to:"treasury"});if(H)return e.jsx(u,{to:"cards"})}return v===!0&&H?e.jsx(u,{to:"cards"}):a?e.jsx(u,{to:"dashboard"}):A?e.jsx(u,{to:"checking"}):k?e.jsx(u,{to:"treasury"}):H?e.jsx(u,{to:"cards"}):S?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},we=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/dashboard`}),Mn=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:a}){const A=Gs(),S=$s(),{tenantEmailDomain:i}=zs(),k=Ws().mode,{setLoading:O,clearAllLoading:v,clearLoading:H}=Xs(),b=D.getSignedInUserTenant(i)?.tenantId,j=D.getSignedInUser(),X=ms(j),z=Ys(),[L,Ue]=w.useState(!1),r=$((o=>_s(o))),{useFeatureGate:B}=Ks(),Z=Qs(),ae=Js(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ke}=B(M.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=B(M.isDebitCardFeatureEnabled),T=$((o=>o.tenantState.fetchState)),p=$((o=>o.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?Es(oe,r):void 0,K=p==="Completed"||T==="Completed"?hs(r):void 0,re=p==="Completed"||T==="Completed"?ps(r)&&!gs(r):void 0,He=en(r,ke,oe),{isCardsHidden:Ve}=sn(r?.tenantId),Se=!He||!!Ve,{isFeatureEnabled:Be}=B(M.isSettingsFeatureEnabled),{isFeatureEnabled:Q}=B(M.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=B(M.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||an==="DEV",Ze=r?.userRole!=null&&Rs(r.userRole),Y=$((o=>xs(o)));if(i!=null){const o=D.getSignedInUserTenant(i);j!=null&&o!=null&&be(j,r,k)}const G={tenantId:b,userId:j?.userId,sessionId:j?.zeniSessionId},ie=Is(),h=nn(),Ge=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),$e=js(h?.loggedInUserRoleMap),J=Te("/:tenantEmailDomain/onboarding/*")!==null,ee=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),ze=$((o=>G.tenantId!=null?Ts(o,G.tenantId):void 0));w.useEffect((()=>{O(F.TENANT_FETCHING),a(i)}),[i]),w.useEffect((()=>{if(ee!=null&&b!=null){const o=ee.params.selectedPeriod;if(o!=null){const y=o.split("-");if(y.length===2){const d=As(Number(y[0])),n=Number(y[1]),c=bs(`01-${d<10?`0${d}`:d}-${n}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),N=ys();c.isAfter(N,"month")===!1?A(Ds(b,{month:d,year:n})):S(`/${i}/month_end_close_checks/review`)}}}}),[ee,b]),w.useEffect((()=>{L||(Ue(!0),O(F.TENANT_FETCHING))}),[L,G,ie,j,A,D]),w.useLayoutEffect((()=>{!fs(ie,G)&&D.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,y,d,n){if(Re(y?.userId,y?.zeniSessionId,o.tenantId),d(Ms(!0)),d(xe(o.tenantId)),o.tenantId!=null&&_.clearTenant(o.tenantId),o.tenantId!=null){const c=D.getSignedInUserTenantWithId(o.tenantId);n&&Ae.updateAppLocaleID(on(n)),c?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}o.userId!=null?ne.identify(o.userId,{tenant_id:o.tenantId}):ne.resetUserIdentity()})(G,j,A,ze))}),[b]),w.useEffect((()=>{D.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,y,d,n,c,N,V){if(d==null&&n==null)return void console.warn("There is no current tenant selected!!");const q=n!=null&&c?.zeniSessionId!=null,us=d==null||d.tenantId!==n,ds=d!=null&&d.excludedResources==null,cs=d!=null&&d.externalConnections==null;if(q&&us){V(xe(n));const W=D.getSignedInUserTenantWithId(n);W?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(W?.tenantEmailDomain),Re(c?.userId,c?.zeniSessionId,n),_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),V(Ie(c.userId,n))),_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),V(je(c.userId,n)))}else q&&ds&&_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),V(Ie(c.userId,n))),q&&cs&&_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),V(je(c.userId,n)));if(q){ne.identify(c.userId,{tenant_id:n});const W=n==null||n!=null&&(y==="Completed"||y==="Error");o==="Completed"||y!=="Not-Started"&&y!=="Error"||n==null||!_.shouldFetchActiveTenant(n)||(_.markActiveTenantFetchStarted(n),N(F.TENANT_FETCHING),V(Zs(c.userId,n,c.zeniSessionId))),W&&(o==="Not-Started"||o==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),V(ge(c.userId,c.zeniSessionId)))}})(T,p,r,b,j,O,A))}),[b,p]),w.useEffect((()=>{D.isSignedIn()&&T==="Completed"&&Y.tenantsBaseInOrder.length>0&&(H(F.TENANT_FETCHING),D.saveSignedInUserTenants(Cs(Y.tenantsBaseInOrder)),j!=null&&be(j,r,k,void 0,Y.tenantsBaseInOrder))}),[Y,T,r,j]),w.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),H(F.TENANT_FETCHING),H(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,b,L]);const le=w.useRef(!1);w.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(o=cn,y=3e3){setTimeout((()=>{const d=n=>{if(n>=o.length)return;const c=o[n],N=dn[c];N!=null?N().then((()=>te((()=>d(n+1))))).catch((()=>te((()=>d(n+1))))):d(n+1)};te((()=>d(0)))}),y)})())}),[p,L]);const P=r?.userRole!=null&&vs(r?.userRole),{isFeatureEnabled:Ye}=B(M.isReferralFeatureEnabled),qe=r?.userRole!=null&&r.userRole.includes("charge_card_user"),We=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),U=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!P,de=!Se&&!P,Xe=Os(h?.loggedInUserRoleMap),Ke=r.externalConnections?.accounting[0]?.isValid,Qe=r.externalConnections?.fetchState==="Completed",se=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!P,me=ce&&Ps(h?.loggedInUserRoleMap),_e=Fe&&!P,Je=Le&&!P,es=ue&&ws(h?.loggedInUserRoleMap),ss=de&&Us(h?.loggedInUserRoleMap),ns=_e&&Fs(h?.loggedInUserRoleMap),ts=Ls(h?.loggedInUserRoleMap),as=ks(h?.loggedInUserRoleMap),os=Hs(h?.loggedInUserRoleMap),rs=Vs(h?.loggedInUserRoleMap),is=Ss(h?.loggedInUserRoleMap),g=Bs(h?.loggedInUserRoleMap),R=Ns(h?.loggedInUserRoleMap),Ee=ue&&g,he=ce&&R,x=_e&&os,I=Je&&rs,m=de&&is,ls=r.excludedResources?.resources?.find((o=>o.resource==="/invites"))!=null||$e===!0||Xe===!0||ts===!0||as===!0;return D.isSignedIn()?b==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(j!=null&&T!=="In-Progress"&&A(ge(j.userId,j.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(se===!0||X&&!J)&&Qe&&Ke!==!0&&E===!1&&K===!1&&re===!1?(a(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||se!==!0||J||X?!L||se!==!1||J||X?L&&r?.userRole&&E!=null&&K!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(qs,{children:e.jsxs(t,{element:e.jsx(tn,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Un,{isDashboardAccess:U,showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:E,isTenantCardsOnly:K,showChargeCardRoute:m})}),e.jsx(t,{path:"dashboard/*",element:U?e.jsx(xn,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reports/*",element:U?e.jsx(mn,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"people/*",element:ls||U?e.jsx(En,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"forecast/*",element:U?e.jsx(hn,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(pn,{})}),e.jsx(t,{path:"transaction/*",element:U&&P===!1||qe||We?e.jsx(Rn,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"transactions/*",element:U&&P===!1?e.jsx(bn,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"customer/*",element:U&&P===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,isTenantBankingOnly:E,showTreasuryRoute:I,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"vendor/*",element:U&&P===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"tasks",element:e.jsx(wn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(On,{})}),e.jsx(t,{path:"address/*",element:es||me||ns||ss?e.jsx(_n,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"checking/*",element:x?e.jsx(Tn,{}):e.jsx(C,{})}),e.jsx(t,{path:"treasury/*",element:I?e.jsx(An,{}):e.jsx(C,{})}),e.jsx(t,{path:"performance",element:ae===!0?e.jsx(fn,{}):e.jsx(we,{tenantEmailDomain:i})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ae===!0&&P===!1?e.jsx(Cn,{}):e.jsx(we,{tenantEmailDomain:i})}),e.jsx(t,{path:"notifications/*",element:e.jsx(Dn,{})}),e.jsx(t,{path:"vendors/*",element:Ge?e.jsx(gn,{}):e.jsx(C,{})}),e.jsx(t,{path:"bill/*",element:Ee?e.jsx(ve,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"bills/*",element:Ee?e.jsx(ve,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursement/*",element:he?e.jsx(Oe,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursements/*",element:he?e.jsx(Oe,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"settings/*",element:Be?e.jsx(In,{hasAdminLevelAccess:me}):e.jsx(C,{})}),e.jsx(t,{path:"invoicing/*",element:Me&&Ze?e.jsx(jn,{}):e.jsx(C,{})}),e.jsx(t,{path:"cards/ask",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:Q}):e.jsx(C,{})}),e.jsx(t,{path:"cards/ask/:session_id",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:Q}):e.jsx(C,{})}),e.jsx(t,{path:"cards/*",element:m?e.jsx(yn,{}):e.jsx(C,{})}),e.jsx(t,{path:"rewards/*",element:Ye?e.jsx(vn,{}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo/",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Z?e.jsx(Pn,{isFileUploadEnabled:Q}):e.jsx(C,{})}),e.jsx(t,{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{f as F,Mn as S};
|