@zeniai/web-app-ui 5.3.32-dev → 5.3.32-prod
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-BXftSVn-.js +9 -0
- package/dist/assets/AddressRoutes-Dx1aQN-n.js +1 -0
- package/dist/assets/{AddressScreen-LFBV9KsX.js → AddressScreen-TLZdvXNy.js} +2 -2
- package/dist/assets/{AiCfoScreen-N1tWqaxl.js → AiCfoScreen-DmLnUFml.js} +1 -1
- package/dist/assets/{AppDrawer-DmTC2F7R.js → AppDrawer-BnHpD6dG.js} +3 -3
- package/dist/assets/{BillPayApprovalRoutes-sbvXc3_Z.js → BillPayApprovalRoutes-DPALyyf2.js} +1 -1
- package/dist/assets/{BillPayRoutes-Cf4T_cOn.js → BillPayRoutes-qAhjjusa.js} +18 -18
- package/dist/assets/BusinessVerificationPageScreen-BYV8fDWH.js +9 -0
- package/dist/assets/{CardsAiCfoScreen-p_ZDfSVk.js → CardsAiCfoScreen-Cd63K_-0.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-DWtJK7tn.js → ChargeCardRoutes-BH9evnp_.js} +7 -7
- package/dist/assets/{CompanyPassportScreen-Cr55ZhHa.js → CompanyPassportScreen-D0g6Nmxq.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-CpG3pE-i.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-CXLOaLgp.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-CI_z4poM.js +30 -0
- package/dist/assets/{DashboardRoutes-DmGJojZS.js → DashboardRoutes-C_4oAXQg.js} +3 -3
- package/dist/assets/{DefaultTenantHome-CWi1XNJj.js → DefaultTenantHome-D3eb-jo9.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-i7JC-m7w.js +18 -0
- package/dist/assets/{DrawerScreen-DVJ1nhu5.js → DrawerScreen-DUO1Z5ow.js} +1 -1
- package/dist/assets/EntityDetailRoutes-B2ai8pR3.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-OyBtxM5J.js → ExpenseAutomationRoutes-DQA6yQ4O.js} +4 -4
- package/dist/assets/FeaturePreviewScreen-CjFoHQHk.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-qemWA0jI.js +1 -0
- package/dist/assets/{InboxNotificationsProvider-DBc6Mphu.js → InboxNotificationsProvider-7eYmgI1F.js} +1 -1
- package/dist/assets/{InvoicingRoutes-B1FBFxmX.js → InvoicingRoutes-DOUUybBE.js} +2 -2
- package/dist/assets/{MagicLinkRoutes-70CKQAmw.js → MagicLinkRoutes-CTs6OYkH.js} +7 -7
- package/dist/assets/MagicLinkSignInScreen-CDEl_Ic_.js +12 -0
- package/dist/assets/MobileAppDrawer-BMvh-RAa.js +1 -0
- package/dist/assets/NotFoundScreen-Wkt8x0Ja.js +1 -0
- package/dist/assets/NotificationRoutes-BF1aTPUh.js +1 -0
- package/dist/assets/OAuthConsentScreen-8oM_ijmg.js +1 -0
- package/dist/assets/{PandLWithForecastRoutes-DHCQWgYM.js → PandLWithForecastRoutes-DvwOSp2G.js} +1 -1
- package/dist/assets/{PaymentLinkScreen-nMdnk521.js → PaymentLinkScreen-D0VzMTpF.js} +4 -4
- package/dist/assets/PeopleRoutes-CMx_k0hr.js +22 -0
- package/dist/assets/PerformanceRoutes-OuxZJbf_.js +1 -0
- package/dist/assets/{Preview-C_55fm97.js → Preview-Dkzm36JB.js} +1 -1
- package/dist/assets/QBOConnectionScreen-Cxvr0UGn.js +100 -0
- package/dist/assets/ReimbursementApprovalRoutes-ChPdj5ky.js +1 -0
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-kIivYyt0.js +1 -0
- package/dist/assets/ReimbursementRoutes-DlTMcw_k.js +68 -0
- package/dist/assets/{ReportsRoutes-BMuQOI7M.js → ReportsRoutes-DUvTlB32.js} +1 -1
- package/dist/assets/RewardsRoutes-CANJzBfw.js +1 -0
- package/dist/assets/ScreenRoutes-B2jpCRd2.js +2 -0
- package/dist/assets/{SettingsRoutes-6XcFcNwI.js → SettingsRoutes-D405mYiE.js} +7 -7
- package/dist/assets/{SetupPagesScreen-BxDIT7Xu.js → SetupPagesScreen-o-PhLBXH.js} +5 -5
- package/dist/assets/SignInScreen-CsdAWM0a.js +1 -0
- package/dist/assets/SignOutScreen-DjO_hTaY.js +9 -0
- package/dist/assets/TaskListScreen-D5rs0HLr.js +9 -0
- package/dist/assets/TaskRoutes-IWzYaX-F.js +9 -0
- package/dist/assets/TransactionDetailRoutes-DExFe-03.js +1 -0
- package/dist/assets/{TransactionDetailScreen-2kUyCbFm.js → TransactionDetailScreen-7v-3l9dA.js} +2 -2
- package/dist/assets/TransactionListRoutes-hxVuwPcb.js +1 -0
- package/dist/assets/TreasuryRoutes-C4GA1Tde.js +37 -0
- package/dist/assets/{VendorsRoutes-zeljYW53.js → VendorsRoutes-DLC5o9yJ.js} +20 -20
- package/dist/assets/WiseConfirmationScreen-BJNaaQrG.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-Dl9FUScI.js → ZeniAccountRoutes-CPdfqL23.js} +9 -9
- package/dist/assets/ZeniAccountStatementScreen-Butd8DWu.js +9 -0
- package/dist/assets/{accountMappingHelper-ZLBxLrOl.js → accountMappingHelper-DsN6SM7a.js} +1 -1
- package/dist/assets/{analytics-DHBkdK00.js → analytics-NBT5BH2R.js} +1 -1
- package/dist/assets/{analyticsHelper-C8sM1z8L.js → analyticsHelper-Bw6Cjeqd.js} +1 -1
- package/dist/assets/{core-DuNHGHBC.js → core-Dlma5MIa.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-CcNRl55W.js → decodeURIComponentSafe-MgEJs-XP.js} +1 -1
- package/dist/assets/{dnd-DKR3QBLX.js → dnd-BgBEAfSC.js} +1 -1
- package/dist/assets/{empty-DRiI770H.js → empty-BRn9rxGR.js} +1 -1
- package/dist/assets/{empty-BA0WbUFe.js → empty-DpC6uPKD.js} +1 -1
- package/dist/assets/{emptyVideoElement-h3Sv0Oh_.js → emptyVideoElement-BpruyOrt.js} +1 -1
- package/dist/assets/epic-TdjWG3DC.js +2 -0
- package/dist/assets/{expenseAutomationHelper-DGi7tuOw.js → expenseAutomationHelper-BpaM_jjL.js} +1 -1
- package/dist/assets/{getLocaleForTenant-D1jcEP43.js → getLocaleForTenant-B0nO-Z7L.js} +1 -1
- package/dist/assets/{index-CxkwDRG8.js → index-Blw4A66-.js} +30310 -31275
- package/dist/assets/{index-y1KlwLzp.js → index-BtQ2P-s4.js} +1 -1
- package/dist/assets/{index-DgXVMYGv.js → index-CYHgs6V3.js} +1 -1
- package/dist/assets/{index-CFb8siio.js → index-CexFEAIL.js} +1 -1
- package/dist/assets/{index-DplrRYRh.js → index-Cr8P80rT.js} +1 -1
- package/dist/assets/{index-DRythsNE.js → index-DHUOQOTf.js} +1 -1
- package/dist/assets/{index-bPK7WXlx.js → index-YntXYqu4.js} +2 -2
- package/dist/assets/{index-B21g9_qj.js → index-ui_UfE_7.js} +1 -1
- package/dist/assets/{lexical-CcqvVKiN.js → lexical-Cc-23sPJ.js} +1 -1
- package/dist/assets/{liveblocks-BkTNzfNi.js → liveblocks-BD1fi6wA.js} +1 -1
- package/dist/assets/{lottie-DACJJNY9.js → lottie-Dd5kLrRz.js} +1 -1
- package/dist/assets/{mui-DaLeH41l.js → mui-DPmPgDDD.js} +1 -1
- package/dist/assets/{pathToGoBack-CmznLvKE.js → pathToGoBack-C5NlBrdk.js} +1 -1
- package/dist/assets/{pdf-BjtwR-dW.js → pdf-BCsxh4ki.js} +3 -3
- package/dist/assets/{pdf-lib-oygBYinp.js → pdf-lib-BSghpPvP.js} +1 -1
- package/dist/assets/{plaid-BVNoSR_u.js → plaid-w5kSeMkL.js} +1 -1
- package/dist/assets/{pusher-Db4sFIYV.js → pusher-D_NnYp1B.js} +1 -1
- package/dist/assets/{react-CYKQo_kF.js → react-BRcmo_so.js} +1 -1
- package/dist/assets/{react-1oTTb5wo.js → react-BYFmdCmG.js} +1 -1
- package/dist/assets/{react-CEkBTHgm.js → react-BiCIC8nJ.js} +1 -1
- package/dist/assets/{react-CMoOPPDa.js → react-CKnkKWiv.js} +1 -1
- package/dist/assets/{react-CNf8hG5M.js → react-Co4WxHXe.js} +1 -1
- package/dist/assets/{react-eY-XTCmQ.js → react-wEOgqpw3.js} +1 -1
- package/dist/assets/{recharts-CkuQpH_L.js → recharts-WuCIKI4c.js} +1 -1
- package/dist/assets/{routePaths-CKTfFzY9.js → routePaths-1GgW-roh.js} +1 -1
- package/dist/assets/{sentry-CNLjKkQW.js → sentry-C6D8WJ15.js} +1 -1
- package/dist/assets/{url-C3nvEZls.js → url-7hMA9KrE.js} +1 -1
- package/dist/assets/url-BVCS53n5.js +6 -0
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BnMQqj78.js → useAiCfoDashboardSuggestedQuestionsChips-Cox0FTmj.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-5qRN6gKs.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-B74EcXIV.js → useChargeCardPusherEvents-Cu201ke6.js} +1 -1
- package/dist/assets/{useDeviceId-J3kskmrp.js → useDeviceId-p2IpPhWq.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-pFVkjSX_.js +1 -0
- package/dist/assets/{useInitialThreadRequest-DANB6KeB.js → useInitialThreadRequest-Ddm4sao-.js} +1 -1
- package/dist/assets/useTaskManagerAccess-BKVtGCGL.js +1 -0
- package/dist/assets/utils-Bv9LDtmr.js +36 -0
- package/dist/assets/{withTransactionSidePanel-CbsHNOl9.js → withTransactionSidePanel-QyMR1bIP.js} +2 -2
- package/dist/assets/{zeni-epic-state-IKQP0lNP.js → zeni-epic-state-2zvjmkUL.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/AccountMappingScreen-Dst-9gUw.js +0 -9
- package/dist/assets/AddressRoutes-O-cTW9EV.js +0 -1
- package/dist/assets/BusinessVerificationPageScreen--LjYD0BK.js +0 -9
- package/dist/assets/ConnectionAuthScreen-D-vDZGov.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-Cs_F35vo.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-deFe2P-n.js +0 -30
- package/dist/assets/DomesticWireDetailScreen-D5RLzOT3.js +0 -18
- package/dist/assets/EntityDetailRoutes-DJgrP2Nz.js +0 -1
- package/dist/assets/FeaturePreviewScreen-BhrA_knX.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-Dm5LF-fb.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-CC7wdqci.js +0 -12
- package/dist/assets/MobileAppDrawer-BtnNKdri.js +0 -1
- package/dist/assets/NotFoundScreen-DjDyDYWZ.js +0 -1
- package/dist/assets/NotificationRoutes-Jy_Q0gUN.js +0 -1
- package/dist/assets/OAuthConsentScreen-DB2EvPsq.js +0 -1
- package/dist/assets/PeopleRoutes-rPdm-Ydn.js +0 -22
- package/dist/assets/PerformanceRoutes-CF0jBH_I.js +0 -1
- package/dist/assets/QBOConnectionScreen-Dlky0ESM.js +0 -100
- package/dist/assets/ReimbursementApprovalRoutes-Bf9cBzdf.js +0 -1
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-XQSOHGYn.js +0 -1
- package/dist/assets/ReimbursementRoutes-CgvBDllF.js +0 -68
- package/dist/assets/RewardsRoutes-CF7hyIJJ.js +0 -1
- package/dist/assets/ScreenRoutes-vV1s5761.js +0 -2
- package/dist/assets/SignInScreen-UcqpfzAX.js +0 -1
- package/dist/assets/SignOutScreen-14vW04Vy.js +0 -9
- package/dist/assets/TaskListScreen-CwNgkHwd.js +0 -9
- package/dist/assets/TaskRoutes-uBt2S29g.js +0 -9
- package/dist/assets/TransactionDetailRoutes-Burs226A.js +0 -1
- package/dist/assets/TransactionListRoutes-Dm5jOGqp.js +0 -1
- package/dist/assets/TreasuryRoutes-C3nO4w9n.js +0 -37
- package/dist/assets/WiseConfirmationScreen-BBqG7Bw5.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-BjcRzB88.js +0 -9
- package/dist/assets/epic-leJAVePQ.js +0 -2
- package/dist/assets/url-CaYHIgYK.js +0 -6
- package/dist/assets/useAskAiCfoHostNavButtonProps-D-XiURTy.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-F2D_LM69.js +0 -1
- package/dist/assets/useTaskManagerAccess-CgZlooKP.js +0 -1
- package/dist/assets/utils-BN2UhEgk.js +0 -36
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-BkTNzfNi.js";import W from"./NotFoundScreen-DjDyDYWZ.js";import{a as p}from"./sentry-CNLjKkQW.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-DuNHGHBC.js";import{fB as E,Yh as h,Yy as R,MY as N,MU as B,MX as f,MN as L,YX as M,MR as X,M_ as z}from"./zeni-epic-state-IKQP0lNP.js";import{z as T,w as $,c7 as K,l as _,bQ as Q,c8 as q}from"./index-CxkwDRG8.js";import"./mui-DaLeH41l.js";import{u as F,R as x}from"./ReimbursementApprovalRuleDetailScreen-XQSOHGYn.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="b9167535-79e7-453b-8234-6e937df608da",e._sentryDebugIdIdentifier="sentry-dbid-b9167535-79e7-453b-8234-6e937df608da")}catch{}})();const A="reimbursement-approval-rule-update",G=U((function(e){return{approvalView:h(e),remiSetupApproverViewUpdateData:R(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(A)&&e(M(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(L(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))($(K)),H=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,w]=p.useState(!1),S=u((o=>o.remiSetupApproverViewState.fetchState)),c=u((o=>E(o))),d=u((o=>h(o))),b=u((o=>R(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{b?.updateStatus.fetchState==="Completed"&&a(N())}),[b]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(B(!0,!1,!1,!1)))}),[t,S,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(w(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${A}`]:[],eventCallback:(o,y,j)=>{o.endsWith(A)&&j.onApprovalRulesEventReceived(o)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(G,{currentTenant:c,location:n,navigate:s,...m})},I="reimbursement-approval-rule-update",J=U((function(e){const s=h(e),n=R(e).remiSetupApproverViewUpdateData,a={};for(const l of Object.values(e.vendorState.vendorByID))l?.id!=null&&(a[l.id]=l.name);const t={};for(const l of Object.values(e.classState.classesByKey))l?.classId!=null&&(t[l.classId]=l.className);return{approvalView:s,remiSetupApproverViewUpdateData:n,vendorNamesById:a,departmentNamesById:t}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(I)&&e(M(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(L(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(z(t,!0))}}}))($(q)),P=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=Q(e?.tenantId);return s?r.jsx(Z,{isLoading:n}):r.jsx(H,{isLoading:n})},Z=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,w]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),b=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),o=u((i=>h(i)));F();const y=u((i=>R(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{y?.updateStatus.fetchState==="Completed"&&a(N())}),[y]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(B(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||b!=="Not-Started"||e||(w(!0),a(X(!1,!0)))}),[v,b,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{o.allApprovalRules.length===0&&o.fetchState==="Completed"&&(S||(c(!0),a(f())),s("./new"))}),[S,o,a]);const j={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${I}`]:[],eventCallback:(i,ee,O)=>{i.endsWith(I)&&O.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(J,{currentTenant:m,location:n,navigate:s,isLoading:e,...j})};function le(){return r.jsxs(Y,{children:[r.jsx(g,{path:"/",element:r.jsx(P,{})}),r.jsx(g,{path:"/new",element:r.jsx(x,{})}),r.jsx(g,{path:"/:approvalRuleId/edit",element:r.jsx(x,{})}),r.jsx(g,{path:"*",element:r.jsx(W,{})})]})}export{le as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-BkTNzfNi.js";import{a as f}from"./sentry-CNLjKkQW.js";import{u as U,j as g,h as C,g as O,i as V,l as k}from"./core-DuNHGHBC.js";import{mn as q,Yy as w,Yh as _,MQ as B,N1 as j,MY as A,MZ as E,Yz as N,fB as L,MX as z}from"./zeni-epic-state-IKQP0lNP.js";import{z as F,E as P,a5 as $,b_ as Q,l as M,bQ as K,b$ as W}from"./index-CxkwDRG8.js";import"./mui-DaLeH41l.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="373a50a5-e6e5-4ffc-9822-8d59ed0cbe98",e._sentryDebugIdIdentifier="sentry-dbid-373a50a5-e6e5-4ffc-9822-8d59ed0cbe98")}catch{}})();function X(){const e=U(),s=f.useRef(!1),t=g((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=g((o=>o.vendorListState.allVendorIdsBillsTab.length>0));f.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(q({})))}),[p,t,e])}const Z=k((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return s.approvalRuleId&&(l=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:l,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=M(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const S=[];return v.forEach((u=>{const I=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),R=u.actors.selectedNonUsers.map((m=>{const y=(b=m.value,N(b)==null);var b;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}})),c=I.concat(R);S.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),S},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:l,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(j(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(Q);function G(){const e=C(),s=U(),t=O(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),l=P(),r=g((n=>w(n))),i=g((n=>_(n))),[a,d]=f.useState(!1);if(f.useEffect((()=>{a||(d(!0),s(B(!0)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(Z,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t})}function pe(e){return N(e)==null}const H=k((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],l={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),l[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:l,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:_(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=M(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((y=>{const b=y.actorKind?.selectedOption,Y=y.selectedRole?.selectedNonUsers??[];let D=[];b==="role"?D=Y.map((T=>({type:"attribute",subType:T.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):b==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map((T=>({type:"user",subType:void 0,userId:T.userId,idType:"user",isImplicitActor:!1}))));const x=y.action??"require_approval";m.push({action:x,actors:D,operator:D.length>1?x==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,S=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const I=v?.selection.selectedOptions??[];I.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:I});const R=S?.selection.selectedOptions??[];if(R.length>0&&(u.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:R}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:l,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(j(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(z(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(W);function ne(){const e=g((t=>L(t))),{isApprovalRulesV3Enabled:s}=K(e?.tenantId);return s?h.jsx(J,{}):h.jsx(G,{})}function J(){const e=C(),s=U(),t=O(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),l=P(),r=g((n=>w(n))),i=g((n=>_(n))),[a,d]=f.useState(!1);if(X(),f.useEffect((()=>{a||(d(!0),s(B(!1)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(H,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t},p??"new")}export{ne as R,pe as i,X as u};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BkTNzfNi.js";import{u as ae,j as v,h as K,g as Q,i as ie,N as P,l as ee,q as ct,n as dt,o as w}from"./core-DuNHGHBC.js";import{fB as Z,MU as ut,_2 as ge,c7 as he,L_ as Le,m6 as pt,Md as ce,Mc as de,_3 as bt,bn as fe,gS as _e,_4 as gt,V0 as ht,lX as Me,V1 as Ce,V2 as ft,kJ as St,Y3 as It,kY as yt,LO as Rt,Bv as vt,kQ as At,Mz as Pe,_5 as $e,_6 as Ee,_7 as kt,_8 as Ct,_9 as Et,Mj as we,l2 as wt,Yc as xt,Mb as Bt,LY as Tt,_a as Dt,LX as jt,_b as Ft,M3 as xe,Mn as Ut,Mm as Lt,Mi as _t,_c as Ne,Rx as Mt,bo as Pt,M6 as $t,MR as Nt,_d as Ot,_e as zt,Mv as Gt,Ms as Be,Xz as Vt,LV as Zt,_f as Oe,Ni as Te,Nq as Ht,_g as Wt,_h as Y,_i as qt,_j as ze,_k as Yt,_l as Ge,_m as Ve,MH as ue,bu as Xt,bK as Se,cL as Ie,dV as Ze,dU as He,_n as Qt,gd as Jt,XM as Kt,_o as en,_p as We,XQ as tn,Yy as nn,_q as an,YX as sn,Nn as De,Nm as on,_r as rn,_s as ln,_t as mn,_u as cn,_v as dn,Yi as un,Nd as pn,Nh as bn,bq as gn,bJ as hn,cF as fn,ct as Sn,bt as In,Ts as yn,d6 as Rn,d9 as vn,d8 as An,cE as kn}from"./zeni-epic-state-IKQP0lNP.js";import{bQ as Cn,U as qe,$ as Ye,O as oe,y as x,z as _,cP as Xe,a6 as re,h as C,aW as je,F,ac as se,ad as En,G as Qe,cQ as wn,p as X,aq as Je,cR as xn,V as le,cS as Bn,ao as Tn,a9 as Dn,a5 as ye,N as Ke,w as jn,by as Fn,at as Un,ag as Ln,E as et,cT as _n,f as Mn}from"./index-CxkwDRG8.js";import{n as $,S as Pn}from"./mui-DaLeH41l.js";import pe from"./NotFoundScreen-DjDyDYWZ.js";import{S as Fe}from"./SetupPagesScreen-BxDIT7Xu.js";import{F as tt}from"./FeaturePreviewScreen-BhrA_knX.js";import{a as h}from"./sentry-CNLjKkQW.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-D-XiURTy.js";import{u as nt}from"./useInitialThreadRequest-DANB6KeB.js";import{D as $n}from"./DrawerScreen-DVJ1nhu5.js";import{M as at}from"./MobileAppDrawer-BtnNKdri.js";import{F as Nn}from"./ScreenRoutes-vV1s5761.js";import{R as On}from"./ReimbursementApprovalRoutes-Bf9cBzdf.js";import"./recharts-CkuQpH_L.js";import"./analytics-DHBkdK00.js";import"./plaid-BVNoSR_u.js";import"./dnd-DKR3QBLX.js";import"./stripe-cKAAJElX.js";import"./lottie-DACJJNY9.js";import"./lexical-CcqvVKiN.js";import"./pdf-BjtwR-dW.js";import"./utils-BN2UhEgk.js";import"./BusinessVerificationPageScreen--LjYD0BK.js";import"./routePaths-CKTfFzY9.js";import"./analyticsHelper-C8sM1z8L.js";import"./InboxNotificationsProvider-DBc6Mphu.js";import"./useTaskManagerAccess-CgZlooKP.js";import"./getLocaleForTenant-D1jcEP43.js";import"./ReimbursementApprovalRuleDetailScreen-XQSOHGYn.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]="c5c8caca-6474-4c40-a38e-2631f112e9df",e._sentryDebugIdIdentifier="sentry-dbid-c5c8caca-6474-4c40-a38e-2631f112e9df")}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}}}=Qe.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($e()),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(Pe(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=K(),t=ae(),n=Q(),{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=Q().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((J=>Z(J))),O=N?.tenantId,{isApprovalRulesV3Enabled:z,isLoading:H}=Cn(O),W=v((J=>J.remiSetupApproverViewState.fetchState));h.useEffect((()=>{O==null||H||W==="Not-Started"&&p(ut(!0,!1,!1,z))}),[O,H,z,W,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(P,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Xe,{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(Hn,{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(Wn,{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 Vn=$.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
position: relative;
|
|
4
|
-
height: 100vh;
|
|
5
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
6
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
7
|
-
`,Zn=$.div`
|
|
8
|
-
position: fixed;
|
|
9
|
-
top: 0;
|
|
10
|
-
left: 0;
|
|
11
|
-
right: 0;
|
|
12
|
-
bottom: 0;
|
|
13
|
-
background-color: ${En.overlayBackgroundBlack};
|
|
14
|
-
z-index: 5;
|
|
15
|
-
`,Hn=$.div`
|
|
16
|
-
position: absolute;
|
|
17
|
-
top: 0;
|
|
18
|
-
left: 0;
|
|
19
|
-
width: 42%;
|
|
20
|
-
height: 100%;
|
|
21
|
-
z-index: 6;
|
|
22
|
-
display: flex;
|
|
23
|
-
background-color: transparent;
|
|
24
|
-
overflow: hidden;
|
|
25
|
-
`,Wn=$.div`
|
|
26
|
-
position: fixed;
|
|
27
|
-
top: 0;
|
|
28
|
-
left: 0;
|
|
29
|
-
right: 0;
|
|
30
|
-
bottom: 0;
|
|
31
|
-
z-index: 11;
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
overflow-y: auto;
|
|
35
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
-
`,qn=$.button`
|
|
37
|
-
align-self: flex-end;
|
|
38
|
-
background: none;
|
|
39
|
-
border: none;
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
padding: ${F.sp2} ${F.sp3};
|
|
42
|
-
line-height: 1;
|
|
43
|
-
color: ${e=>e.theme.colors.hero};
|
|
44
|
-
&:hover {
|
|
45
|
-
color: ${e=>e.theme.colors.primary};
|
|
46
|
-
}
|
|
47
|
-
svg {
|
|
48
|
-
width: ${F.sp4};
|
|
49
|
-
height: ${F.sp4};
|
|
50
|
-
}
|
|
51
|
-
`,Yn=$.div`
|
|
52
|
-
display: flex;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
width: 100%;
|
|
55
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
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($e());const a=st(o),i=X(c.state?.pathnameStackToGoBack,c.pathname);d(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(Zt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Vt({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(Pe(n))},cancelAndDeleteReport:a=>{a===!0?C.trackReimbursementCancelAndDeleteReimbursement(n):C.trackReimbursementCancelReimbursement(n),e(Gt(n,a))},handleZeniLogoClick:()=>{m.toggle()}}}))(xn);function Qn(){const e=K(),t=ae(),n=Q(),r=n.hash.substring(1),c=qe(),{reimbursementId:d}=ie(),m=_.getSignedInUser(),o=v((R=>Z(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"});Je({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=Pt(o.userRole),M=a.fetchState;if(h.useEffect((()=>{u||d==null?u==1&&M==="Error"&&e("page-not-found",{replace:!0}):(T(!0),t($t(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(P,{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 Jn=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(Wt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Ht());break;case"approve":e(Te("approved",r??""));break;case"reject":e(Te("rejected",r??""))}}}}))(Bn);function Kn({tenantEmailDomain:e}){const t=K(),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(Jn,{navigate:t,analytics:C,isAdmin:d,tenantEmailDomain:e})}const V=tn(),it="bulk-operation-update",be="reimbursement-approval-rule-update",{spendManagement:ea,common:me}=Qe.getLocalizedStrings(),ta=ea.reimbursement.bulkActions,na=$.div`
|
|
57
|
-
display: flex;
|
|
58
|
-
min-height: 100%;
|
|
59
|
-
width: 100%;
|
|
60
|
-
flex: 1 1 auto;
|
|
61
|
-
flex-direction: column;
|
|
62
|
-
align-items: center;
|
|
63
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
64
|
-
`,aa=ee((function(e,t){const n=Ve(e,V,t.isBulkActionEnabled);let r=n.allSubTabs;const c=_.getSignedInUser(),d=fe(c),m=e.tenantState.currentTenantId,o=Z(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:V,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=K(),t=ae(),n=Q(),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=>Z(S))),[T,D]=h.useState(!1),[j,A]=h.useState(!1),k=le(),E=k?.loggedInUserRole?.includes("admin")===!0,I=v((S=>Ve(S,V,f))),{areTenantIdsInSync:g}=Tn(),U=I.fetchState,{isAiCfoAccessEnabled:L,onAskAiCfoClick:M}=Re({mobileExploreReferrer:"Reimbursement List"});if(Je({isDataReady:U==="Completed"}),h.useEffect((()=>{!j&&g&&(A(!0),t(ue(V,!0,l,!1,!0)))}),[j,V,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,H=!!u.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,W=v((S=>_e(S.companyState,u.companyId))),J=W?.company.featuresActivationInfo.connectedAccountProvider,ve=S=>{D(S)},{isFeatureEnabled:ot}=a(x.isDebitCardFeatureEnabled),rt=Ze(ot,u),lt=He(u),{remisProcessed:te,remisProcessing:Ae}=v((S=>Qt(S)));h.useEffect((()=>{te===Ae&&d!=null&&(t(Jt({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:Kt(d)}]})),t(en()),setTimeout((()=>{t(ue(V,!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(Ke.Event.reimbursementHome))(S)}):null,s.jsx(at,{isAppContentDrawerOpen:T,handleDrawerToggle:ve}),s.jsxs(na,{windowSize:c,children:[s.jsx($n,{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(Kn,{tenantEmailDomain:u.tenantEmailDomain})})}),s.jsx(aa,{isShowDeletedBillsEnabled:i,isShowDeletedReimbursementEnabled:l,isBillPayCommentingEnabled:b,isReimbursementCommentingEnabled:y,location:n,navigate:e,currentTenant:u,period:V,isAdmin:E,isEmployee:R,entity:"reimbursement",onClickMenuIcon:()=>{ve(!0)},createdByUserList:I.createdByUserList,createdByUserListFetchState:I.createdByUserListFetchState,isDownloadEnabled:I.isDownloadEnabled,connectedAccountProvider:J,isBulkActionEnabled:f,bulkSubmissionLimit:I.remiBulkSubmissionLimit,bulkSubmissionFetchState:I.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:L,onAskAiCfoClick:M,...mt})]})]}):H&&p?s.jsx(P,{to:"../setup"}):k!=null&&We(u,k.loggedInUserRoleMap)?s.jsx(P,{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=$(Pn)`
|
|
65
|
-
display: flex;
|
|
66
|
-
min-height: 100%;
|
|
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=K(),n=Q(),{tenantEmailDomain:r}=ie(),c=et(),[d,m]=h.useState(!1),o=v((A=>Z(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(P,{to:"../../../reimbursements"}):D&&f?s.jsx(P,{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(Ke.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((W=>Z(W))),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=Ze(a,e),l=He(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=Q(),H=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??""})}),H&&s.jsx(w,{path:"*",element:s.jsx(sa,{})}),(i===!0||l===!0)&&s.jsx(w,{path:"/*",element:s.jsx(tt,{})}),t!=null&&We(e,t?.loggedInUserRoleMap)&&s.jsx(w,{path:"*",element:s.jsx(P,{to:"../promo"})}),c&&u&&s.jsx(w,{path:"*",element:s.jsx(P,{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(Qn,{})}),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 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-BkTNzfNi.js";import{z as w,a6 as v,h as f,N as S,d_ as E,O as k,y as I}from"./index-CxkwDRG8.js";import"./mui-DaLeH41l.js";import g from"./NotFoundScreen-DjDyDYWZ.js";import{a as m}from"./sentry-CNLjKkQW.js";import{u as C,j as h,h as F,g as L,l as _,n as T,o as u,N as y}from"./core-DuNHGHBC.js";import{fB as U,a13 as j,a14 as p,D6 as P,pX as V,a15 as z,D4 as B}from"./zeni-epic-state-IKQP0lNP.js";import"./recharts-CkuQpH_L.js";import"./analytics-DHBkdK00.js";import"./plaid-BVNoSR_u.js";import"./dnd-DKR3QBLX.js";import"./stripe-cKAAJElX.js";import"./lottie-DACJJNY9.js";import"./lexical-CcqvVKiN.js";import"./pdf-BjtwR-dW.js";import"./utils-BN2UhEgk.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]="83c76056-2926-465c-9cb7-ee29ca244657",e._sentryDebugIdIdentifier="sentry-dbid-83c76056-2926-465c-9cb7-ee29ca244657")}catch{}})();const G=_((function(e,t){const n=j(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=w.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(B())},onUpdateInviteFormLocalData:s=>{e(z({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&f.trackInviteEmailClicked("cancel")}}}))(E),O=()=>{const e=C(),[t,n]=m.useState(!1),[i,s]=m.useState(!1),r=h((o=>U(o))),c=F(),x=L(),d=w.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const l=h((o=>j(o))),b=d?.firstName!=null?d.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 D=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(v,{analytics:f,onLoad:o=>(N=>N.trackPageLoaded(S.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:c,location:x,currentTenant:r,companyName:D,userName:b,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=k(),{isFeatureEnabled:t}=e(I.isReferralFeatureEnabled);return a.jsxs(T,{children:[a.jsx(u,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(u,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(u,{path:"refer/*",element:t?a.jsx(O,{}):a.jsx(g,{})}),a.jsx(u,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-DjDyDYWZ.js","assets/sentry-CNLjKkQW.js","assets/core-DuNHGHBC.js","assets/zeni-epic-state-IKQP0lNP.js","assets/index-CxkwDRG8.js","assets/mui-DaLeH41l.js","assets/analytics-DHBkdK00.js","assets/utils-BN2UhEgk.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-DmGJojZS.js","assets/withTransactionSidePanel-CbsHNOl9.js","assets/useAskAiCfoHostNavButtonProps-D-XiURTy.js","assets/TransactionDetailScreen-2kUyCbFm.js","assets/decodeURIComponentSafe-CcNRl55W.js","assets/useInitialThreadRequest-DANB6KeB.js","assets/routePaths-CKTfFzY9.js","assets/expenseAutomationHelper-DGi7tuOw.js","assets/analyticsHelper-C8sM1z8L.js","assets/CompanyPassportScreen-Cr55ZhHa.js","assets/MobileAppDrawer-BtnNKdri.js","assets/InboxNotificationsProvider-DBc6Mphu.js","assets/useTaskManagerAccess-CgZlooKP.js","assets/useAiCfoDashboardSuggestedQuestionsChips-BnMQqj78.js","assets/FeaturePreviewScreen-BhrA_knX.js","assets/BillPayRoutes-Cf4T_cOn.js","assets/AddressScreen-LFBV9KsX.js","assets/DomesticWireDetailScreen-D5RLzOT3.js","assets/BusinessVerificationPageScreen--LjYD0BK.js","assets/DrawerScreen-DVJ1nhu5.js","assets/SetupPagesScreen-BxDIT7Xu.js","assets/BillPayApprovalRoutes-sbvXc3_Z.js","assets/ReimbursementApprovalRuleDetailScreen-XQSOHGYn.js","assets/getLocaleForTenant-D1jcEP43.js","assets/ReimbursementRoutes-CgvBDllF.js","assets/ReimbursementApprovalRoutes-Bf9cBzdf.js","assets/TransactionListRoutes-Dm5jOGqp.js","assets/ZeniAccountStatementScreen-BjcRzB88.js","assets/SettingsRoutes-6XcFcNwI.js","assets/AccountMappingScreen-Dst-9gUw.js","assets/QBOConnectionScreen-Dlky0ESM.js","assets/empty-BA0WbUFe.js","assets/index-DplrRYRh.js","assets/url-CaYHIgYK.js","assets/index-DgXVMYGv.js","assets/accountMappingHelper-ZLBxLrOl.js","assets/useEmailConnectResultRefresh-F2D_LM69.js","assets/ReportsRoutes-BMuQOI7M.js","assets/ChargeCardRoutes-DWtJK7tn.js","assets/useChargeCardPusherEvents-B74EcXIV.js","assets/PeopleRoutes-rPdm-Ydn.js","assets/ExpenseAutomationRoutes-OyBtxM5J.js","assets/TreasuryRoutes-C3nO4w9n.js","assets/VendorsRoutes-zeljYW53.js","assets/pathToGoBack-CmznLvKE.js","assets/ZeniAccountRoutes-Dl9FUScI.js","assets/AddressRoutes-O-cTW9EV.js","assets/PandLWithForecastRoutes-DHCQWgYM.js","assets/CustomerOnboardingRoutes-deFe2P-n.js","assets/TransactionDetailRoutes-Burs226A.js","assets/EntityDetailRoutes-DJgrP2Nz.js","assets/InvoicingRoutes-B1FBFxmX.js","assets/NotificationRoutes-Jy_Q0gUN.js","assets/PerformanceRoutes-CF0jBH_I.js","assets/RewardsRoutes-CF7hyIJJ.js","assets/TaskRoutes-uBt2S29g.js","assets/TaskListScreen-CwNgkHwd.js","assets/AiCfoScreen-N1tWqaxl.js","assets/CardsAiCfoScreen-p_ZDfSVk.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as s,bn as cs,fB as ms,dV as _s,dU as Es,Aj as hs,de as ps,gG as gs,g5 as xs,db as pe,cF as Rs,gj as Is,cx as js,bE as Ts,br as As,Tp as bs,v as fs,Tr as ys,bq as Ds,Ts as Cs,bK as vs,bJ as Os,bt as Ps,ct as Us,Tt as ws,Tu as Fs,d6 as Ls,d9 as Vs,d8 as Hs,cE as ks,cL as Bs,pO as ge,ge as xe,gV as Ss,gg as Re,gI as Ie,gJ as je,gh as Ns}from"./zeni-epic-state-IKQP0lNP.js";import{j as e}from"./liveblocks-BkTNzfNi.js";import{a as U}from"./sentry-CNLjKkQW.js";import{N as u,u as Ms,h as Zs,i as Gs,g as $s,j as $,q as Te,n as zs,o as t}from"./core-DuNHGHBC.js";import{H as l,E as qs,u as Ys,z as y,O as Js,d as Ws,n as Ks,y as M,f as Qs,I as Xs,V as en,L as F,G as Ae,t as _,P as sn,J as nn,h as ne}from"./index-CxkwDRG8.js";import"./mui-DaLeH41l.js";import{f as be}from"./analyticsHelper-C8sM1z8L.js";import{t as tn}from"./getLocaleForTenant-D1jcEP43.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]="b9cfb2b4-695b-4e1b-959d-6b91d115e1fb",a._sentryDebugIdIdentifier="sentry-dbid-b9cfb2b4-695b-4e1b-959d-6b91d115e1fb")}catch{}})();const an=l((()=>s((()=>import("./NotFoundScreen-DjDyDYWZ.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),on=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/reimbursements`}),rn=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/bills`}),fe=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/treasury`}),ye=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/checking`}),De=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/cards`}),D=({showZeniAccountRoute:a,isUserHasBillPayAccess:A,isUserHasReimbursementAccess:B,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(V===!0){if(a)return e.jsx(ye,{tenantEmailDomain:v});if(i)return e.jsx(fe,{tenantEmailDomain:v});if(O)return e.jsx(De,{tenantEmailDomain:v})}return a?e.jsx(ye,{tenantEmailDomain:v}):i?e.jsx(fe,{tenantEmailDomain:v}):O?e.jsx(De,{tenantEmailDomain:v}):A?e.jsx(rn,{tenantEmailDomain:v}):B?e.jsx(on,{tenantEmailDomain:v}):e.jsx(an,{})},ln={dashboard:()=>s((()=>import("./DashboardRoutes-DmGJojZS.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-Cf4T_cOn.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-CgvBDllF.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-Dm5jOGqp.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])),settings:()=>s((()=>import("./SettingsRoutes-6XcFcNwI.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-BMuQOI7M.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-DWtJK7tn.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-rPdm-Ydn.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-OyBtxM5J.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,10,44,28,8])),treasury:()=>s((()=>import("./TreasuryRoutes-C3nO4w9n.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])),vendors:()=>s((()=>import("./VendorsRoutes-zeljYW53.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,25,0,23,53,15,11,19,20,21,28,44,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-Dl9FUScI.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8]))},un=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],te=a=>{"requestIdleCallback"in window?requestIdleCallback(a):setTimeout(a,100)},dn=l((()=>s((()=>import("./ReportsRoutes-BMuQOI7M.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])))),cn=l((()=>s((()=>import("./AddressRoutes-O-cTW9EV.js")),__vite__mapDeps([55,1,2,3,25,4,5,6,7,0,8])))),mn=l((()=>s((()=>import("./PeopleRoutes-rPdm-Ydn.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])))),_n=l((()=>s((()=>import("./PandLWithForecastRoutes-DHCQWgYM.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,0,23,11,14,15,19,20,21,8])))),En=l((()=>s((()=>import("./CustomerOnboardingRoutes-deFe2P-n.js")),__vite__mapDeps([57,1,2,3,25,4,5,6,7,0,39,40,41,42,43,13,45,48,8])))),hn=l((()=>s((()=>import("./VendorsRoutes-zeljYW53.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,25,0,23,53,15,11,19,20,21,28,44,8])))),pn=l((()=>s((()=>import("./TransactionDetailRoutes-Burs226A.js")),__vite__mapDeps([58,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-DJgrP2Nz.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,13,10,11,12,14,15,16,8])))),gn=l((()=>s((()=>import("./DashboardRoutes-DmGJojZS.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-Cf4T_cOn.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])))),xn=l((()=>s((()=>import("./SettingsRoutes-6XcFcNwI.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])))),Rn=l((()=>s((()=>import("./InvoicingRoutes-B1FBFxmX.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,25,0,19,20,21,39,40,41,42,43,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-CgvBDllF.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])))),In=l((()=>s((()=>import("./ZeniAccountRoutes-Dl9FUScI.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8])))),jn=l((()=>s((()=>import("./TreasuryRoutes-C3nO4w9n.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])))),Tn=l((()=>s((()=>import("./TransactionListRoutes-Dm5jOGqp.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])))),An=l((()=>s((()=>import("./ChargeCardRoutes-DWtJK7tn.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])))),bn=l((()=>s((()=>import("./NotificationRoutes-Jy_Q0gUN.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,11,21,8])))),fn=l((()=>s((()=>import("./PerformanceRoutes-CF0jBH_I.js")),__vite__mapDeps([62,1,2,3,0,4,5,6,7,11,19,20,21,8])))),yn=l((()=>s((()=>import("./ExpenseAutomationRoutes-OyBtxM5J.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,10,44,28,8])))),Dn=l((()=>s((()=>import("./RewardsRoutes-CF7hyIJJ.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,0,8])))),Cn=l((()=>s((()=>import("./TaskRoutes-uBt2S29g.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,14,19,20,21,65,11,8])))),vn=l((()=>s((()=>import("./AiCfoScreen-N1tWqaxl.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,22,53,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-p_ZDfSVk.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,8])))),C=l((()=>s((()=>import("./NotFoundScreen-DjDyDYWZ.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),On=l((()=>s((()=>import("./TaskListScreen-CwNgkHwd.js").then((a=>a.f))),__vite__mapDeps([65,1,2,3,4,5,6,7,11,19,20,21,8])))),Pn=({isDashboardAccess:a,showZeniAccountRoute:A,isUserHasBillPayAccess:B,isUserHasReimbursementAccess:i,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:v,showChargeCardRoute:H})=>{if(O===!0){if(A)return e.jsx(u,{to:"checking"});if(V)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"}):V?e.jsx(u,{to:"treasury"}):H?e.jsx(u,{to:"cards"}):B?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Ue=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/dashboard`}),Sn=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:a}){const A=Ms(),B=Zs(),{tenantEmailDomain:i}=Gs(),V=qs().mode,{setLoading:O,clearAllLoading:v,clearLoading:H}=Ys(),b=y.getSignedInUserTenant(i)?.tenantId,j=y.getSignedInUser(),W=cs(j),z=$s(),[L,we]=U.useState(!1),r=$((o=>ms(o))),{useFeatureGate:S}=Js(),Z=Ws(),ae=Ks(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=S(M.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=S(M.isDebitCardFeatureEnabled),T=$((o=>o.tenantState.fetchState)),p=$((o=>o.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?_s(oe,r):void 0,K=p==="Completed"||T==="Completed"?Es(r):void 0,re=p==="Completed"||T==="Completed"?hs(r)&&!ps(r):void 0,He=Qs(r,Ve,oe),{isCardsHidden:ke}=Xs(r?.tenantId),Be=!He||!!ke,{isFeatureEnabled:Se}=S(M.isSettingsFeatureEnabled),{isFeatureEnabled:Q}=S(M.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=S(M.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||nn==="DEV",q=$((o=>gs(o)));if(i!=null){const o=y.getSignedInUserTenant(i);j!=null&&o!=null&&be(j,r,V)}const G={tenantId:b,userId:j?.userId,sessionId:j?.zeniSessionId},ie=xs(),h=en(),Ze=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),Ge=Rs(h?.loggedInUserRoleMap),X=Te("/:tenantEmailDomain/onboarding/*")!==null,ee=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),$e=$((o=>G.tenantId!=null?Is(o,G.tenantId):void 0));U.useEffect((()=>{O(F.TENANT_FETCHING),a(i)}),[i]),U.useEffect((()=>{if(ee!=null&&b!=null){const o=ee.params.selectedPeriod;if(o!=null){const f=o.split("-");if(f.length===2){const d=js(Number(f[0])),n=Number(f[1]),c=Ts(`01-${d<10?`0${d}`:d}-${n}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),N=As();c.isAfter(N,"month")===!1?A(bs(b,{month:d,year:n})):B(`/${i}/month_end_close_checks/review`)}}}}),[ee,b]),U.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,G,ie,j,A,y]),U.useLayoutEffect((()=>{!fs(ie,G)&&y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,f,d,n){if(xe(f?.userId,f?.zeniSessionId,o.tenantId),d(Ss(!0)),d(Re(o.tenantId)),o.tenantId!=null&&_.clearTenant(o.tenantId),o.tenantId!=null){const c=y.getSignedInUserTenantWithId(o.tenantId);n&&Ae.updateAppLocaleID(tn(n)),c?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}o.userId!=null?ne.identify(o.userId,{tenant_id:o.tenantId}):ne.resetUserIdentity()})(G,j,A,$e))}),[b]),U.useEffect((()=>{y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,f,d,n,c,N,k){if(d==null&&n==null)return void console.warn("There is no current tenant selected!!");const Y=n!=null&&c?.zeniSessionId!=null,ls=d==null||d.tenantId!==n,us=d!=null&&d.excludedResources==null,ds=d!=null&&d.externalConnections==null;if(Y&&ls){k(Re(n));const J=y.getSignedInUserTenantWithId(n);J?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(J?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,n),_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),k(Ie(c.userId,n))),_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),k(je(c.userId,n)))}else Y&&us&&_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),k(Ie(c.userId,n))),Y&&ds&&_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),k(je(c.userId,n)));if(Y){ne.identify(c.userId,{tenant_id:n});const J=n==null||n!=null&&(f==="Completed"||f==="Error");o==="Completed"||f!=="Not-Started"&&f!=="Error"||n==null||!_.shouldFetchActiveTenant(n)||(_.markActiveTenantFetchStarted(n),N(F.TENANT_FETCHING),k(Ns(c.userId,n,c.zeniSessionId))),J&&(o==="Not-Started"||o==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(ge(c.userId,c.zeniSessionId)))}})(T,p,r,b,j,O,A))}),[b,p]),U.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&q.tenantsBaseInOrder.length>0&&(H(F.TENANT_FETCHING),y.saveSignedInUserTenants(ys(q.tenantsBaseInOrder)),j!=null&&be(j,r,V,void 0,q.tenantsBaseInOrder))}),[q,T,r,j]),U.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&b!=null?(v(),_.markActiveTenantFetchCompleted(b)):p==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),H(F.TENANT_FETCHING),H(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,b,L]);const le=U.useRef(!1);U.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(o=un,f=3e3){setTimeout((()=>{const d=n=>{if(n>=o.length)return;const c=o[n],N=ln[c];N!=null?N().then((()=>te((()=>d(n+1))))).catch((()=>te((()=>d(n+1))))):d(n+1)};te((()=>d(0)))}),f)})())}),[p,L]);const P=r?.userRole!=null&&Ds(r?.userRole),{isFeatureEnabled:ze}=S(M.isReferralFeatureEnabled),qe=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Ye=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!P,de=!Be&&!P,Je=Cs(h?.loggedInUserRoleMap),We=r.externalConnections?.accounting[0]?.isValid,Ke=r.externalConnections?.fetchState==="Completed",se=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!P,me=ce&&vs(h?.loggedInUserRoleMap),_e=Fe&&!P,Qe=Le&&!P,Xe=ue&&Os(h?.loggedInUserRoleMap),es=de&&Ps(h?.loggedInUserRoleMap),ss=_e&&Us(h?.loggedInUserRoleMap),ns=ws(h?.loggedInUserRoleMap),ts=Fs(h?.loggedInUserRoleMap),as=Ls(h?.loggedInUserRoleMap),os=Vs(h?.loggedInUserRoleMap),rs=Hs(h?.loggedInUserRoleMap),g=ks(h?.loggedInUserRoleMap),x=Bs(h?.loggedInUserRoleMap),Ee=ue&&g,he=ce&&x,R=_e&&as,I=Qe&&os,m=de&&rs,is=r.excludedResources?.resources?.find((o=>o.resource==="/invites"))!=null||Ge===!0||Je===!0||ns===!0||ts===!0;return y.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||W&&!X)&&Ke&&We!==!0&&E===!1&&K===!1&&re===!1?(a(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||se!==!0||X||W?!L||se!==!1||X||W?L&&r?.userRole&&E!=null&&K!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(zs,{children:e.jsxs(t,{element:e.jsx(sn,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Pn,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,isTenantCardsOnly:K,showChargeCardRoute:m})}),e.jsx(t,{path:"dashboard/*",element:w?e.jsx(gn,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reports/*",element:w?e.jsx(dn,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"people/*",element:is||w?e.jsx(mn,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"forecast/*",element:w?e.jsx(_n,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(En,{})}),e.jsx(t,{path:"transaction/*",element:w&&P===!1||qe||Ye?e.jsx(pn,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"transactions/*",element:w&&P===!1?e.jsx(Tn,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"customer/*",element:w&&P===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isTenantBankingOnly:E,showTreasuryRoute:I,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"vendor/*",element:w&&P===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"tasks",element:e.jsx(On,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(Cn,{})}),e.jsx(t,{path:"address/*",element:Xe||me||ss||es?e.jsx(cn,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"checking/*",element:R?e.jsx(In,{}):e.jsx(C,{})}),e.jsx(t,{path:"treasury/*",element:I?e.jsx(jn,{}):e.jsx(C,{})}),e.jsx(t,{path:"performance",element:ae===!0?e.jsx(fn,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ae===!0&&P===!1?e.jsx(yn,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(t,{path:"notifications/*",element:e.jsx(bn,{})}),e.jsx(t,{path:"vendors/*",element:Ze?e.jsx(hn,{}):e.jsx(C,{})}),e.jsx(t,{path:"bill/*",element:Ee?e.jsx(ve,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"bills/*",element:Ee?e.jsx(ve,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursement/*",element:he?e.jsx(Oe,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursements/*",element:he?e.jsx(Oe,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"settings/*",element:Se?e.jsx(xn,{hasAdminLevelAccess:me}):e.jsx(C,{})}),e.jsx(t,{path:"invoicing/*",element:Me?e.jsx(Rn,{}):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(An,{}):e.jsx(C,{})}),e.jsx(t,{path:"rewards/*",element:ze?e.jsx(Dn,{}):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(vn,{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{D as F,Sn as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-BkTNzfNi.js";import{a as u,R as U,q as A}from"./sentry-CNLjKkQW.js";import{u as z,h as D,j as l,g as M,N as O,l as j}from"./core-DuNHGHBC.js";import{u as P,z as s,E as _,h as E,G as F,M as N,N as B,Q as R,R as V,S as $,T as v}from"./index-CxkwDRG8.js";import{fB as q,Tb as J,Tr as Q,ge as W,gg as G,Tw as H,gR as K,df as X,Tx as T,Ty as Y,Tz as Z,b_ as y}from"./zeni-epic-state-IKQP0lNP.js";import"./mui-DaLeH41l.js";import{u as ee}from"./useDeviceId-J3kskmrp.js";import{f as te}from"./analyticsHelper-C8sM1z8L.js";import{t as ne}from"./getLocaleForTenant-D1jcEP43.js";import"./recharts-CkuQpH_L.js";import"./analytics-DHBkdK00.js";import"./plaid-BVNoSR_u.js";import"./dnd-DKR3QBLX.js";import"./stripe-cKAAJElX.js";import"./lottie-DACJJNY9.js";import"./lexical-CcqvVKiN.js";import"./pdf-BjtwR-dW.js";import"./utils-BN2UhEgk.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="ff5eea34-8d4c-4ef7-bcdf-2989ee57965d",t._sentryDebugIdIdentifier="sentry-dbid-ff5eea34-8d4c-4ef7-bcdf-2989ee57965d")}catch{}})();const ie=j((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(c),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Y(n,a)))},clearSignInError:()=>{t(T())}}}))($),ae=U.memo(ie);function ve({setTenantEmailDomain:t}){const i=z(),d=D(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:h,accountLocked:b,accountUnlockTime:L}=l((e=>e.tenantState)),p=l((e=>e.tenantState.fetchState)),k=l((e=>e.tenantState.activeTenantFetchState.fetchState)),S=l((e=>e.tenantState.signInState)),o=l((e=>e.tenantState.loggedInUser)),r=l((e=>q(e))),I=l((e=>J(e))),m=M(),w=_().mode,x=m.state?.magicLinkExpired,C=m.state?.magicLinkAlreadyUsed;if(u.useEffect((()=>{h.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[h.fetchState,c]),u.useEffect((()=>{t(void 0)}),[]),u.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&k!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(Q(I.tenantsInOrder),o.zeniSessionId),W(o.userId,o.zeniSessionId,r.tenantId),i(G(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(H("Completed")),F.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),K().then((()=>{const e=V();e!=null&&N(e)})),setTimeout((()=>{E.trackLogin(B.Event.loginSuccess,o.authProvider??"google",X(r.productSettings))}),2e3))}),[S,p,k,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!x,magicLinkAlreadyUsed:!!C,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),b===!0&&L!=null?f.jsx(R,{onClose:()=>i(T()),unlockDate:L}):null]})}export{ve as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BkTNzfNi.js";import{a as i}from"./sentry-CNLjKkQW.js";import{u as l,g as c,N as u}from"./core-DuNHGHBC.js";import{z as n,h as a,N as m,a5 as p}from"./index-CxkwDRG8.js";import{gU as g,TN as b}from"./zeni-epic-state-IKQP0lNP.js";import{n as y}from"./mui-DaLeH41l.js";import"./recharts-CkuQpH_L.js";import"./analytics-DHBkdK00.js";import"./plaid-BVNoSR_u.js";import"./dnd-DKR3QBLX.js";import"./stripe-cKAAJElX.js";import"./lottie-DACJJNY9.js";import"./lexical-CcqvVKiN.js";import"./pdf-BjtwR-dW.js";import"./utils-BN2UhEgk.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]="3b1d8ea1-8d03-4688-8b19-fbf233213190",e._sentryDebugIdIdentifier="sentry-dbid-3b1d8ea1-8d03-4688-8b19-fbf233213190")}catch{}})();function L(){const e=l(),t=c(),r=i.useRef(!1),f=n.isSignedIn(),o=t.state?.message==="logout"||f;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),b(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(d){console.error("Error during sign out:",d)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=y.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;export{L as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-BkTNzfNi.js";import{a as f}from"./sentry-CNLjKkQW.js";import{h as pa,u as Ta,g as fa,k as ga,j as F,i as _a,l as ma}from"./core-DuNHGHBC.js";import{aI as ba,aJ as Da,z as x,O as Sa,y as G,aq as ha,a6 as Ea,h as ya,N as Aa,e1 as Ca,p as R,a2 as Ga}from"./index-CxkwDRG8.js";import{fB as Ia,a1a as X,Qm as B,a1b as Y,a16 as Ba,PK as M,a1c as Ka,PS as q,Ps as va,P4 as La,Qn as V,a1d as W,gd as wa,Qd as Ra,Qi as Ua,Q5 as Pa,Q3 as J,Qj as Fa,Q0 as ja,a1e as xa,a1f as Oa,a1g as Na,a1h as $a,a1i as I,dt as Qa,ds as za,a1j as Za,Pp as Ma}from"./zeni-epic-state-IKQP0lNP.js";import{n as qa}from"./mui-DaLeH41l.js";import{u as Va}from"./useAskAiCfoHostNavButtonProps-D-XiURTy.js";import{M as Wa}from"./MobileAppDrawer-BtnNKdri.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="1ac5ddb2-cc02-4c4d-aaa9-ee0eb7b4651e",e._sentryDebugIdIdentifier="sentry-dbid-1ac5ddb2-cc02-4c4d-aaa9-ee0eb7b4651e")}catch{}})();const d={TASK_CREATED:"task-created",TASK_UPDATED:"task-updated",TASK_SNOOZE_RESURFACED:"task-snooze-resurfaced",TASKS_BULK_UPDATED:"tasks-bulk-updated",TASKS_BULK_DELETED:"tasks-bulk-deleted"},Ja=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),Ha=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),U=e=>Array.isArray(e)&&e.every((a=>typeof a=="string")),Xa=e=>{if(e==null||typeof e!="object")return null;const a=e,n=typeof a.task_id=="string"?a.task_id:typeof a.id=="string"?a.id:null;if(n==null||typeof a.tenant_id!="string"||typeof a.event_type!="string")return null;const o={task_id:n,tenant_id:a.tenant_id,event_type:a.event_type};return typeof a.is_private=="boolean"&&(o.is_private=a.is_private),U(a.assignees)&&(o.assignees=a.assignees),U(a.direct_assignees)&&(o.direct_assignees=a.direct_assignees),typeof a.created_by=="string"&&(o.created_by=a.created_by),U(a.task_group_ids)&&(o.task_group_ids=a.task_group_ids),typeof a.name=="string"&&(o.name=a.name),typeof a.parent_task_id=="string"&&(o.parent_task_id=a.parent_task_id),o},Ya=e=>{if(e==null||typeof e!="object")return null;const a=e;return U(a.task_ids)?{task_ids:a.task_ids}:null},pe=e=>{if(e==null||typeof e!="object")return null;const a=e;return typeof a.task_id!="string"?null:{task_id:a.task_id}},ae=e=>{const{events:a,onEvent:n,onSubscribed:o}=e,i=ba(),g=f.useRef(n),l=f.useRef(o),_=f.useRef(0);f.useEffect((()=>{g.current=n}),[n]),f.useEffect((()=>{l.current=o}),[o]);const t=f.useMemo((()=>[...a].sort().join("|")),[a]);f.useEffect((()=>{if(i==null||a.length===0)return;const s=[],p=new Set,S=()=>{if(l.current==null)return;const m=Date.now();m-_.current<5e3||(_.current=m,l.current())};return a.forEach((m=>{const[b,D]=Da(m);if(D==="")return;const E=i.channel(b),y=T=>{g.current(D,T)};let k;if(E?.subscribed===!0){if(k=E,k.bind(D,y),!p.has(b)){p.add(b),S();const T=()=>{S()};k.bind("pusher:subscription_succeeded",T),s.push((()=>{k.unbind("pusher:subscription_succeeded",T)}))}s.push((()=>{E.unbind(D,y)}))}else{if(k=E??i.subscribe(b),k.bind(D,y),!p.has(b)){p.add(b);const T=()=>{S()};k.bind("pusher:subscription_succeeded",T),s.push((()=>{k.unbind("pusher:subscription_succeeded",T)}))}s.push((()=>{k.unbind(D,y)}))}})),()=>{s.forEach((m=>m()))}}),[i,t])},ee=qa.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,te=ma((function(e,a){const n=X(e,a.isTaskTemplatesEnabled),{taskGroupId:o}=a,i=o!=null&&o!==""?{...n,taskGroupsWithTasksList:n.taskGroupsWithTasksList.map((t=>({...t,tasks:t.tasks.filter((s=>s.taskGroupIds.includes(o)))}))).filter((t=>t.tasks.length>0))}:n,g=Ba(e),l=x.isZeniUser(),_=e.taskDetailState?.subTaskCreateStatus?.fetchState;return{taskListView:i,tagListView:g,localData:i.localData,isTaskTemplatesEnabled:a.isTaskTemplatesEnabled,isZeniUser:l,subTaskCreateStatus:_}}),(function(e,a){const{navigate:n,currentTenant:o,location:i,isTaskTemplatesEnabled:g}=a,{tenantEmailDomain:l}=o,{groupByKey:_}=a.uiState;return{onTaskManagementRowClick:t=>{const s=H(l,t),p=R(i.state?.pathnameStackToGoBack,i.pathname);n(s,{state:{pathnameStackToGoBack:p}})},onReloadTasks:()=>{e(B(!0,g))},onTabChange:t=>{e($a(t))},onParentTaskClick:t=>{const s=H(l,t);window.open(s,"_blank","noopener")},bulkUpdateTasks:(t,s)=>{e(J(t,null,s))},onNewTaskClick:()=>{if(a.localData.defaultTaskGroupId!=null){const t=j(l,a.localData.defaultTaskGroupId),s=R(i.state?.pathnameStackToGoBack,i.pathname);n(t,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(t,s)=>{e(W({uiState:{sortKey:t,sortOrder:s}}))},onFiltersChange:t=>{e(Na({filters:t}))},onSearchTextChanged:t=>{e(Oa({searchText:t}))},onReloadCards:()=>{e(B(!0,g))},onBackClick:()=>{if(i.state?.message==="triggerBackClick"){const t=Ga(i.state?.pathnameStackToGoBack),s=t.poppedPathname??"../";n(s,{state:{pathnameStackToGoBack:t.newStack}})}else n("../")},updateLocalData:t=>{e(xa({localData:t}))},resetLocalData:()=>{e(Y({taskGroupById:a.taskGroupState.taskGroupById}))},handleCreateGroup:t=>{e(ja(a.localData.newTaskGroupName,t))},assignGroupToTasks:t=>{e(J(a.localData.selectedTaskIds,t,Fa(a.uiState.groupByKey,t)))},onDeleteTaskGroup:t=>{e(Pa(t))},onAddNewTaskToTaskGroup:t=>{if(a.localData.defaultTaskGroupId!=null){const s=ne(_,t);e(M({taskDetailLocalData:s}));const p=j(l,a.uiState.groupByKey==="groupName"?t:a.localData.defaultTaskGroupId),S=R(i.state?.pathnameStackToGoBack,i.pathname);n(p,{state:{pathnameStackToGoBack:S,message:"comingFromTaskListPage"}})}},onDragNDrop:(t,s)=>{e(Ua(a.localData.selectedTaskIds.length>0?a.localData.selectedTaskIds:[t],s))},onTaskGroupRename:(t,s)=>{e(Ra(t,s))},onTimeSpentUpdate:(t,s)=>{e(V({task:t,updates:s}))},onShowToast:t=>{e(wa(t))},onGroupByFilterChange:t=>{e(W({uiState:{groupByKey:t}}))},updateTask:(t,s)=>{e(V({task:t,updates:s}))},onCreateTagClick:(t,s)=>{e(La(t,s))},onSubtaskCreation:(t,s)=>{e(va({...s,parentTaskId:t}))},handleGroupTemplateClick:t=>{e(q(t,[]))},handleGroupTemplateTaskClick:(t,s)=>{e(q(t,[s]))},handleNewTaskInitialization:t=>{if(e(M({taskDetailLocalData:{...Ka,name:t}})),a.localData.defaultTaskGroupId!=null){const s=j(l,a.localData.defaultTaskGroupId),p=R(i.state?.pathnameStackToGoBack,i.pathname);n(s,{state:{pathnameStackToGoBack:p,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:t=>{n(`/${l}/tasks/group/${t}`)},onQuickResponsesClick:()=>{n(`/${l}/tasks/quick-responses`)}}}))(Ca);function se(){const e=pa(),a=Ta(),n=fa(),o=x.getSignedInUser(),i=x.isZeniUser(),g=ga(),l=F((u=>Ia(u))),{taskGroupId:_}=_a(),{useFeatureGate:t}=Sa(),{isFeatureEnabled:s}=t(G.isTaskTemplatesEnabled),{isFeatureEnabled:p}=t(G.isTaskCannedResponsesEnabled),{isFeatureEnabled:S}=t(G.isTaskCategorizationEnabled),{isFeatureEnabled:m}=t(G.isTaskBulkResolutionEnabled),{isFeatureEnabled:b}=t(G.isTaskGroupAssigneesEnabled),{isFeatureEnabled:D}=t(G.isTaskRecurringParentEnabled),[E,y]=f.useState(!1),k=F((u=>X(u,s))),T=F((u=>u.taskGroupState)),K=k.fetchState,{isAiCfoAccessEnabled:aa,onAskAiCfoClick:ea}=Va({mobileExploreReferrer:"Task Checklist"});ha({isDataReady:K==="Completed"}),f.useEffect((()=>{a(B(!1,s))}),[l?.tenantId,a,s]);const ta=f.useMemo((()=>{const u=[d.TASK_CREATED,d.TASK_UPDATED,d.TASKS_BULK_UPDATED,d.TASKS_BULK_DELETED],A=[d.TASK_CREATED,d.TASK_UPDATED,d.TASK_SNOOZE_RESURFACED,d.TASKS_BULK_UPDATED];return[...Ja(l?.companyId,u),...Ha(o?.userId,A)]}),[l?.companyId,o?.userId]);if(ae({events:ta,onEvent:(u,A)=>{switch(u){case d.TASK_CREATED:case d.TASK_UPDATED:{const r=Xa(A);if(r!=null){const w=g.getState(),O=r.task_id,h=O!=null?w.taskState.taskByID?.[O]:void 0,P=h!=null;if(!i)if(r.is_private===!0){if(!P)return}else{const v=o?.userId,L=new Set([...r.assignees??[],...r.direct_assignees??[]]);if(r.created_by!=null&&r.created_by!==""&&L.add(r.created_by),!(v!=null&&L.has(v))&&!P)return}if(u===d.TASK_UPDATED&&P&&h!=null&&Array.isArray(r.task_group_ids)){const v=new Set(Object.values(w.taskGroupState.taskGroupById??{}).filter((c=>c!=null&&!c.isDeleted)).map((c=>c.id))),L=(h.taskGroupIds??[]).filter((c=>v.has(c))),N=(r.task_group_ids??[]).filter((c=>v.has(c))),sa=L.length===N.length&&L.every((c=>N.includes(c))),$=h.taskGroupIds??[],Q=r.task_group_ids??[],na=$.length!==Q.length||!$.every((c=>Q.includes(c))),oa=(c,ca)=>{const z=c??[],Z=ca??[];if(z.length!==Z.length)return!1;const da=new Set(Z);return z.every((ka=>da.has(ka)))},ra=r.name==null||r.name===h.name,ia=r.is_private==null||r.is_private===h.isPrivate,la=r.assignees==null||oa(r.assignees,h.assignees),ua=r.direct_assignees==null;if(sa&&na&&ra&&ia&&la&&ua)return}}return void a(B(!0,s))}case d.TASKS_BULK_DELETED:{const r=Ya(A);return r==null?void 0:void r.task_ids.forEach((w=>a(Ma(w))))}case d.TASKS_BULK_UPDATED:case d.TASK_SNOOZE_RESURFACED:return void a(B(!0,s))}},onSubscribed:()=>{a(B(!0,s))}}),f.useEffect((()=>{K==="Completed"&&a(Y({taskGroupById:T.taskGroupById}))}),[K,T.taskGroupById]),o==null)throw Error("Can't access task list page without signing in...");return C.jsxs(C.Fragment,{children:[K==="Completed"?C.jsx(Ea,{analytics:ya,onLoad:u=>(A=>A.trackPageLoaded(Aa.Event.taskListPage))(u)}):null,C.jsxs(ee,{children:[C.jsx(Wa,{isAppContentDrawerOpen:E,handleDrawerToggle:u=>{y(u)}}),C.jsx(te,{location:n,navigate:e,currentTenant:l,taskGroupId:_,taskGroupState:T,localData:k.localData,uiState:k.uiState,isTaskTemplatesEnabled:s,taskListFetchState:K,isTaskCategorizationEnabled:S,isTaskCannedResponsesEnabled:p,isTaskBulkResolutionEnabled:m,isTaskGroupAssigneesEnabled:b,isTaskRecurringParentEnabled:D,isAiCfoAccessEnabled:aa,onAskAiCfoClick:ea})]})]})}const H=(e,a)=>`/${e}/tasks/${encodeURIComponent(a)}`,j=(e,a)=>`/${e}/tasks/new/${a}`,ne=(e,a)=>{if(e==="assignee"){const n=a.split(",");return{...I.taskDetailLocalData,assignee:n}}if(e==="priority"){const n=Qa(a);return{...I.taskDetailLocalData,priority:n}}if(e==="status"){const n=za(a);return{...I.taskDetailLocalData,status:n}}if(e==="tag"){const n=a.split(",");return{...I.taskDetailLocalData,tagIds:n}}if(e==="dueDate"){const n=Za(a);return{...I.taskDetailLocalData,dueDate:n}}return{...I.taskDetailLocalData}},Te=Object.freeze(Object.defineProperty({__proto__:null,default:se},Symbol.toStringTag,{value:"Module"}));export{d as T,Ha as a,Ja as b,Ya as c,Xa as d,se as e,Te as f,pe as t,ae as u};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-BkTNzfNi.js";import de from"./NotFoundScreen-DjDyDYWZ.js";import{a as k}from"./sentry-CNLjKkQW.js";import{h as H,u as ee,j as E,g as ue,i as ke,N as pe,l as me,n as Se,o as b}from"./core-DuNHGHBC.js";import{Ph as ae,Pk as fe,Pe as Te,Z1 as ge,fB as te,a16 as se,PG as g,Py as T,Pb as he,Qa as be,Q3 as Ee,a17 as ne,gd as oe,a18 as q,P7 as Ie,P4 as De,ui as Ce,u6 as Ge,mv as Pe,Pw as ye,a19 as _e,Qn as Re,Ps as Ue,PR as Be,PO as we,Pn as xe,PL as ve,PK as Ae}from"./zeni-epic-state-IKQP0lNP.js";import{z as y,d$ as je,U as Le,O as Fe,y as G,a2 as ie,p as P,a6 as Ke,h as M,N as $e,e0 as Ne,T as Q,ac as Oe}from"./index-CxkwDRG8.js";import{n as ze}from"./mui-DaLeH41l.js";import{u as Ve}from"./useInitialThreadRequest-DANB6KeB.js";import{M as Ze}from"./MobileAppDrawer-BtnNKdri.js";import{b as qe,a as Me,u as Qe,T as f,t as Je,c as J,d as W,e as We}from"./TaskListScreen-CwNgkHwd.js";import"./recharts-CkuQpH_L.js";import"./analytics-DHBkdK00.js";import"./plaid-BVNoSR_u.js";import"./dnd-DKR3QBLX.js";import"./stripe-cKAAJElX.js";import"./lottie-DACJJNY9.js";import"./lexical-CcqvVKiN.js";import"./pdf-BjtwR-dW.js";import"./utils-BN2UhEgk.js";import"./InboxNotificationsProvider-DBc6Mphu.js";import"./useTaskManagerAccess-CgZlooKP.js";import"./useAskAiCfoHostNavButtonProps-D-XiURTy.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="12bbb62d-9edf-4d20-ad35-d2a288240970",e._sentryDebugIdIdentifier="sentry-dbid-12bbb62d-9edf-4d20-ad35-d2a288240970")}catch{}})();function Xe(){const e=H(),a=ee(),n=y.getSignedInUser(),{cannedResponses:c,fetchState:s,saveFetchState:d}=E((o=>o.cannedResponsesState)),u=k.useCallback((()=>{a(ae())}),[a]),m=k.useCallback(((o,I,D)=>{a(fe({name:o,content:I,cannedResponseId:D}))}),[a]),t=k.useCallback((o=>{a(Te({cannedResponseId:o}))}),[a]);if(n==null)throw Error("Can't access quick responses page without signing in...");return r.jsx(je,{cannedResponses:c,isLoading:s==="In-Progress"||s==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:t,onFetch:u,onSave:m})}const F=e=>e?.taskState?.taskByID,j=(e,a)=>{const n=F(e);if(a!=null&&n!=null)return n[a]?.parentTaskId??void 0},Ye=ge([j,(e,a)=>{const n=j(e,a),c=F(e);if(n!=null&&c!=null)return c[n]?.name},(e,a)=>{const n=j(e,a),c=F(e);return n!=null&&c!=null&&c[n]!=null}],((e,a,n)=>{if(e!=null&&n===!0)return{id:e,name:a??""}}));let X,Y=[];const He=me((function(e,a){const{location:n,taskGroupId:c}=a,s=ne(e,a.taskId),d=te(e),u=Ye(e,a.taskId),m=s.taskGroupId??c,t=m!=null?q(e.taskGroupState,m):void 0,o=y.getSignedInUser(),I=d.tenantId,D={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:I??""},B=se(e),{tenantEmailDomain:w}=d,_=s.recurringSourceTaskId,x=_!=null?`${Q.appUrl}/${w}/tasks/${encodeURIComponent(_)}`:void 0;var h;return{taskDetailSelectorView:s,authParams:D,isZeniUser:y.isZeniUser(),userGroupList:((h=e.userGroupsState.userGroupByUserGroupId)!==X&&(X=h,Y=Object.values(h)),Y),isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:Oe.fileMicroServiceBaseUrl,companyName:a.currentTenant.companyName,companyId:a.currentTenant.companyId,currentUrl:`${Q.appUrl}${a.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:x,tagListView:B,taskGroupName:m!=null&&t!=null&&t.isDefault===!1?t.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((S=>q(e.taskGroupState,S))).filter((S=>S!=null&&!S.isDeleted)).map((S=>({id:S.id,name:S.name,isDefault:S.isDefault}))),subtasks:s.subtasks,parentTaskRef:u,subTaskCreateStatus:e.taskDetailState?.subTaskCreateStatus?.fetchState}}),(function(e,a){const{taskId:n,navigate:c,currentTenant:s,location:d,taskGroupId:u}=a,{tenantEmailDomain:m}=s;return{onSaveChangesToLocalStore:t=>{e(Ae({taskDetailLocalData:t,taskId:n}))},onSaveDetailClick:t=>{e(ve(n,t??u))},onArchiveTaskClick:()=>{a.taskId!=null&&e(xe(a.taskId))},onSnoozeTask:(t,o)=>{e(we(t,o))},onUnsnoozeTask:t=>{e(Be(t))},onCreateSubtask:(t,o)=>{e(Ue({...o,parentTaskId:t}))},onSubtaskUpdate:(t,o)=>{e(Re({task:t,updates:o}))},onShowToast:t=>{e(oe(t))},onSubtaskRowClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:P(d.state?.pathnameStackToGoBack,d.pathname)}})},onParentBreadcrumbClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:P(d.state?.pathnameStackToGoBack,d.pathname)}})},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const t=ie(d.state?.pathnameStackToGoBack),o=t.poppedPathname??"../../dashboard";c(o,{state:{pathnameStackToGoBack:t.newStack}})}else{const t=U(m),o=P(d.state?.pathnameStackToGoBack,d.pathname);c(t,{state:{pathnameStackToGoBack:o}})}e(_e({taskId:n}))},onDeleteTaskClick:()=>{e(ye(n))},updateFilesEntity:t=>{e(Pe({files:t}))},onDeleteFile:t=>{e(Ge(t))},onEditFileName:(t,o)=>{e(Ce(t,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(g(!1,n))},onCreateTagClick:t=>{e(De(t,n))},onDeleteTagClick:t=>{e(Ie(t,n))},onFetchCannedResponses:()=>{e(ae())},onManageTemplatesClick:()=>{c(`/${s.tenantEmailDomain}/tasks/quick-responses`)}}}))(Ne);function L(){const e=H(),a=ee(),n=ue(),c=Le(),{taskId:s,taskGroupId:d}=ke(),u=E((i=>te(i))),m=Ve(u?.companyId),{useFeatureGate:t}=Fe(),{isFeatureEnabled:o}=t(G.isTaskSnoozeEnabled),{isFeatureEnabled:I}=t(G.isTaskVisibilityEnabled),{isFeatureEnabled:D}=t(G.isTaskCannedResponsesEnabled),{isFeatureEnabled:B}=t(G.isTaskRecurringParentEnabled),{isFeatureEnabled:w}=t(G.isTaskGroupAssigneesEnabled),[_,x]=k.useState(!1),[h,S]=k.useState(!1),[K,re]=k.useState(!1),[$,v]=k.useState(!1),C=k.useRef(!1),R=E((i=>i.taskListState.updateTasksFetchState.fetchState)),N=E((i=>se(i))),O=E((i=>i.taskGroupViewState.fetchState));k.useEffect((()=>{a(g(!1,s)),s!=null&&a(T(s))}),[a,s]);const z=y.getSignedInUser()?.userId,ce=k.useMemo((()=>{const i=[f.TASK_CREATED,f.TASK_UPDATED,f.TASKS_BULK_UPDATED,f.TASKS_BULK_DELETED],l=[...i,f.TASK_SNOOZE_RESURFACED];return[...qe(u?.companyId,i),...Me(z,l)]}),[u?.companyId,z]);Qe({events:ce,onSubscribed:()=>{s!=null&&(a(g(!0,s)),a(T(s)))},onEvent:(i,l)=>{if(s!=null)switch(i){case f.TASK_CREATED:{W(l)?.parent_task_id===s&&(a(g(!0,s)),a(T(s)));break}case f.TASK_UPDATED:{const p=W(l);if(p==null)break;p.task_id===s?(a(g(!0,s)),a(T(s))):p.parent_task_id===s&&a(T(s));break}case f.TASKS_BULK_UPDATED:{const p=J(l);if(p==null)break;p.task_ids.includes(s)&&a(g(!0,s)),a(T(s));break}case f.TASKS_BULK_DELETED:{const p=J(l);if(p==null)break;if(p.task_ids.includes(s)){a(oe({messageSection:"delete_task",messageText:"success",type:"success"})),u?.tenantEmailDomain!=null&&e(U(u.tenantEmailDomain));break}a(T(s));break}case f.TASK_SNOOZE_RESURFACED:{Je(l)?.task_id===s&&a(g(!0,s));break}}}}),k.useEffect((()=>{h||N.fetchState==="Completed"||(S(!0),a(he()))}),[h,a,N.fetchState]),k.useEffect((()=>{K||O==="Completed"||(re(!0),a(be()))}),[K,a,O]);const le=k.useCallback((()=>{s!=null&&(C.current=!1,a(Ee([s],null,{isArchived:!1})),v(!0))}),[a,s]);k.useEffect((()=>{if($)if(R!=="In-Progress"){if(C.current){if(R==="Error")return v(!1),void(C.current=!1);if(R==="Completed"){v(!1),C.current=!1;const{tenantEmailDomain:i}=u;if(n.state?.message==="triggerBackClick"){const l=ie(n.state?.pathnameStackToGoBack);e(l.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:l.newStack}})}else{const l=U(i);e(l,{state:{pathnameStackToGoBack:P(n.state?.pathnameStackToGoBack,n.pathname)}})}}}}else C.current=!0}),[$,R,u,n,e]);const V=E((i=>ne(i,s))),A=V.fetchState,Z=y.getSignedInUser();if(Z==null)throw Error("Can't access task detail page without signing in...");if(A==="Error"&&V.error?.code===400){const{tenantEmailDomain:i}=u,l=U(i),p=P(n.state?.pathnameStackToGoBack,n.pathname);return r.jsx(pe,{to:l,state:{pathnameStackToGoBack:p}})}return r.jsxs(r.Fragment,{children:[A==="Completed"?r.jsx(Ke,{analytics:M,onLoad:i=>(l=>l.trackPageLoaded($e.Event.taskDetailPage))(i)}):null,r.jsxs(ea,{children:[r.jsx(Ze,{isAppContentDrawerOpen:_,handleDrawerToggle:i=>{x(i)}}),r.jsx(He,{analytics:M,currentTenant:u,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:m,location:n,loggedInUser:Z,navigate:e,taskGroupId:d,taskId:s,taskDetailFetchState:A,onUnarchiveTaskClick:le,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:I,isTaskCannedResponsesEnabled:D,isTaskRecurringParentEnabled:B,isTaskGroupAssigneesEnabled:w})]})]})}const ea=ze.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,U=e=>`/${e}/tasks`;function Da(){return r.jsxs(Se,{children:[r.jsx(b,{path:"/new",element:r.jsx(L,{})}),r.jsx(b,{path:"/new/:taskGroupId",element:r.jsx(L,{})}),r.jsx(b,{path:"/group/:taskGroupId",element:r.jsx(We,{})}),r.jsx(b,{path:"/quick-responses",element:r.jsx(Xe,{})}),r.jsx(b,{path:"/:taskId",element:r.jsx(L,{})}),r.jsx(b,{path:"*",element:r.jsx(de,{})})]})}export{Da as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-BkTNzfNi.js";import i from"./NotFoundScreen-DjDyDYWZ.js";import{T as r}from"./TransactionDetailScreen-2kUyCbFm.js";import"./sentry-CNLjKkQW.js";import{n as a,o}from"./core-DuNHGHBC.js";import"./zeni-epic-state-IKQP0lNP.js";import"./recharts-CkuQpH_L.js";import"./index-CxkwDRG8.js";import"./mui-DaLeH41l.js";import"./analytics-DHBkdK00.js";import"./plaid-BVNoSR_u.js";import"./dnd-DKR3QBLX.js";import"./stripe-cKAAJElX.js";import"./lottie-DACJJNY9.js";import"./lexical-CcqvVKiN.js";import"./pdf-BjtwR-dW.js";import"./utils-BN2UhEgk.js";import"./useAskAiCfoHostNavButtonProps-D-XiURTy.js";import"./decodeURIComponentSafe-CcNRl55W.js";import"./useInitialThreadRequest-DANB6KeB.js";import"./routePaths-CKTfFzY9.js";import"./expenseAutomationHelper-DGi7tuOw.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9520d72a-46e5-44e2-9697-a97671635162",e._sentryDebugIdIdentifier="sentry-dbid-9520d72a-46e5-44e2-9697-a97671635162")}catch{}})();function z(){return t.jsxs(a,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{z as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BkTNzfNi.js";import{h as W,g as q,u as K,i as Q,j as g,N,l as H,n as Me,o as C}from"./core-DuNHGHBC.js";import{fB as X,tx as ee,lb as p,et as te,Rk as Se,br as pe,_U as Be,lX as ae,Vz as ne,_V as fe,_W as Le,bE as k,Rg as he,_X as Fe,_Y as Te,_Z as Oe,Rj as ge,__ as Ge,_$ as De,$0 as we,$1 as Ie,$2 as $e,$3 as ze,$4 as ye,Sw as _e}from"./zeni-epic-state-IKQP0lNP.js";import{O as ce,y as U,h as F,G as ke,da as oe,p as z,a2 as se,ao as Re,n as Ve}from"./index-CxkwDRG8.js";import"./mui-DaLeH41l.js";import{a as y}from"./sentry-CNLjKkQW.js";import{w as ie}from"./withTransactionSidePanel-CbsHNOl9.js";import{p as re,c as de}from"./routePaths-CKTfFzY9.js";import{w as Je}from"./utils-BN2UhEgk.js";import{d as j}from"./decodeURIComponentSafe-CcNRl55W.js";import{Z as Ue}from"./ZeniAccountStatementScreen-BjcRzB88.js";import"./recharts-CkuQpH_L.js";import"./analytics-DHBkdK00.js";import"./plaid-BVNoSR_u.js";import"./dnd-DKR3QBLX.js";import"./stripe-cKAAJElX.js";import"./lottie-DACJJNY9.js";import"./lexical-CcqvVKiN.js";import"./pdf-BjtwR-dW.js";import"./useAskAiCfoHostNavButtonProps-D-XiURTy.js";import"./TransactionDetailScreen-2kUyCbFm.js";import"./useInitialThreadRequest-DANB6KeB.js";import"./expenseAutomationHelper-DGi7tuOw.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="f9e98317-0501-4de7-bb89-1a0f7fd8806e",a._sentryDebugIdIdentifier="sentry-dbid-f9e98317-0501-4de7-bb89-1a0f7fd8806e")}catch{}})();const qe=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],J=a=>Je(a),Ye=()=>{const{common:a,uncategorizedTransactionList:e}=ke.getLocalizedStrings();return{amount:e.missingReceipt.missingReceiptMinAmount.amount,currencyCode:a.currency.currencyCode,currencySymbol:a.currency.currencySymbol}},Ne=H((function(a,e){const t=Be(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,J(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=J(e.selectedAccount.tranListType),d=We(t,n,c,o,e.bookCloseDate);F.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(fe({uiState:{dateRange:d},type:J(e.selectedAccount.tranListType)})),a(Se(o,p(d),!1,o==="missingReceipts"?Ye():void 0)),e.onSelectedTimePeriodChange(p(d))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=z(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({uiState:{scrollYOffset:t},type:J(e.selectedAccount.tranListType)}))}}}))(oe),V=ie((function({...a}){const e=W(),t=q(),n=K(),c=t.pathname.split("/").find((l=>qe.includes(l))),o=c??"uncategorized-expense",{tenantEmailDomain:d}=Q(),{accountType:Y,title:b,subTitle:A}=Xe(o),f="month",T=g((l=>X(l))),v=T.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:S}=ce(),{isFeatureEnabled:h}=S(U.isProjectsTransactionsEnabled),I=g((l=>ee(l)))&&h,{dataAvailable:x,initialTimeframeTick:O}=Ze(o,v,T.bookCloseDate),[P,G]=y.useState(!1),[E,w]=y.useState(void 0),u=y.useMemo((()=>{const l=p(O);return{tranListType:o,accountType:te(Y),title:b,subTitle:A,timeframe:f,period:l}}),[o,f,Y,x]);y.useEffect((()=>{if(!P&&u!=null){G(!0),F.trackTransactionList(void 0,void 0,void 0,u.title);const l=J(u.tranListType);n(Se(l,u.period,!0,l==="missingReceipts"?Ye():void 0))}}),[P,u,n]);let M=u;return u!=null&&E!=null&&(M={...u,period:E}),c==null||M==null?s.jsx(N,{to:"../"}):s.jsx(Ne,{firstMonthOfFY:v,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:x,navigate:e,showProjectField:I,selectedAccount:M,referrerType:o,bookCloseDate:T.bookCloseDate,onSelectedTimePeriodChange:l=>w(l),...a})})),Xe=a=>{let e="",t="";const n=ke.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.common.texts.uncategorizedExpenses;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.common.texts.receipts}return{accountType:e,title:t,subTitle:""}},Ze=(a,e,t)=>{const n=pe();let c=pe().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:re(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},We=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Ke=H((function(a,e){const t=Fe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??be();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(he(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=z(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(oe),Qe=ie((function({referrerType:a,...e}){const t=W(),n=q(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,classIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=Q(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),O=g((r=>Le(r.transactionListState,h,S,I))),[P,G]=y.useState(!1),[E,w]=y.useState(void 0),u=g((r=>X(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(U.isProjectsTransactionsEnabled),$=g((r=>ee(r)))&&m;let i;const L=He(S,h,I,A,f,T,x);if(L){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},R=et(O?.dateRange,r);i={accountId:h,accountType:te(S),classId:I,title:x,timeframe:A,period:R}}y.useEffect((()=>{P||i==null||(G(!0),F.trackTransactionList(i.accountId,void 0,a,i.title),c(he(i.accountId,i.accountType,i.classId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const _=[d,Y,b,A,f,T,v].filter((r=>r!=null));return L&&B!=null?s.jsx(Ke,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:$,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>w(r),...e}):s.jsx(N,{to:be(_.length)})})),be=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},He=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),tt=H((function(a,e){const t=Ge(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ve();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=z(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(oe),at=ie((function({referrerType:a,...e}){const t=W(),n=q(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,projectIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=Q(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),O=g((r=>Oe(r.transactionListState,h,S,I))),[P,G]=y.useState(!1),[E,w]=y.useState(void 0),u=g((r=>X(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(U.isProjectsTransactionsEnabled),$=g((r=>ee(r)))&&m;let i;const L=nt(S,h,I,A,f,T,x);if(L){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},R=ct(O?.dateRange,r);i={accountId:h,accountType:te(S),projectId:I,title:x,timeframe:A,period:R}}y.useEffect((()=>{P||i==null||(G(!0),F.trackTransactionList(i.accountId,void 0,a,i.title),c(ge(i.accountId,i.accountType,i.projectId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const _=[d,Y,b,A,f,T,v].filter((r=>r!=null));return L&&B!=null?s.jsx(tt,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:$,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>w(r),...e}):s.jsx(N,{to:ve(_.length)})})),ve=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},nt=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,ct=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),ot=H((function(a,e){const t=$e(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ze(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Pe();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(Ie(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=z(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=rt(e.tenantEmailDomain),n=z(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(oe),Ae=ie((function({referrerType:a,...e}){const t=W(),n=q(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,timeframe:b,startDate:A,endDate:f,titleEncoded:T,excludeSubAccounts:v}=Q(),S=j(d??""),h=j(Y??""),I=j(T??""),x=!(v!=null&&v==="exclude_subaccounts"),O=g((D=>we(D.transactionListState,h,S))),[P,G]=y.useState(!1),[E,w]=y.useState(void 0),u=g((D=>X(D))),M=u.company?.featuresActivationInfo.connectedAccountProvider==="unit",l=u.company?.companyInfo.firstMonthOfFY??1;let m;const $=st(S,h,b,A,f,I);if($){const D={startDate:k(A,"YYYY-MM-DD"),endDate:k(f,"YYYY-MM-DD")},le=it(O?.dateRange,D);m={accountId:h,accountType:te(S),title:I,timeframe:b,period:le}}let i=m;m!=null&&E!=null&&(i={...m,period:E});const{useFeatureGate:L}=ce(),{isFeatureEnabled:B}=L(U.isTransactionCommentingEnabled),_=y.useCallback(((D,le)=>{if(o==null)return;const me=D.url.split(`/${o}/`)[1];if(me==null)return;const[je,xe]=me.split("?"),Z=new URLSearchParams(xe??"");Z.set("view","full"),Z.set("thread_id",le),Z.set("entity_type",D.entityType);const Ce=z(n.state?.pathnameStackToGoBack,n.pathname);t(`/${o}/${je}?${Z.toString()}`,{state:{pathnameStackToGoBack:Ce}})}),[t,o,n.state,n.pathname]),{isFeatureEnabled:r}=L(U.isProjectsTransactionsEnabled),R=g((D=>ee(D)))&&r,{areTenantIdsInSync:ue}=Re();y.useEffect((()=>{!P&&m!=null&&ue&&(G(!0),F.trackTransactionList(m.accountId,void 0,a,m.title),c(Ie(m.accountId,m.accountType,m.period,void 0,!1,x)))}),[P,m,c,ue]);const Ee=[d,Y,b,A,f,T].filter((D=>D!=null));return $&&i!=null?s.jsx(ot,{firstMonthOfFY:l,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:M,isTransactionCommentingEnabled:B,onCommentThreadClick:_,showProjectField:R,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:D=>w(D),...e}):s.jsx(N,{to:Pe(Ee.length)})})),Pe=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},st=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&k(n,"YYYY-MM-DD").isValid()&&k(c,"YYYY-MM-DD").isValid()&&o!=null,it=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),rt=a=>`/${a}/transactions/${_e}/statements`;function Mt(){const a=q().state?.referrer,e=g((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[g((n=>X(n))).tenantId],t=Ve();return s.jsxs(Me,{children:[s.jsx(C,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/zeni-clearing-account/statements",element:s.jsx(Ue,{})}),s.jsx(C,{path:"/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/uncategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/uncategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/missing-receipts/*",element:t?s.jsx(N,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(C,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Qe,{referrerType:a})}),s.jsx(C,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(at,{referrerType:a})})]})}export{Mt as default};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-BkTNzfNi.js";import{h as F,g as L,u as U,i as V,j as y,N as D,l as O,n as xe,o as k}from"./core-DuNHGHBC.js";import{cu as M,fB as v,Yr as B,NK as ae,Nr as Y,Ns as ne,Yt as Ie,NN as we,Yp as Ce,Yq as se,YF as ke,LO as je,Bv as Ae,Yv as Ee,NU as be,Ys as re,d9 as Z,F$ as oe,dU as ve,dV as De,_R as Fe,_S as Le,Nt as Ue,_T as Be,Nu as Pe,ND as Re,bq as Ne,bJ as Ve,cF as Oe,bK as Me,ct as _e,bt as $e,Ts as ze,cs as Ge}from"./zeni-epic-state-IKQP0lNP.js";import{V as _,g as qe,z as b,a6 as $,h as A,d3 as Ye,d4 as Ze,d5 as q,$ as H,E as He,ao as Ke,aq as We,O as ie,y as R,a9 as Je,a5 as Xe,d6 as Qe,ac as K,p as et,d7 as tt,a2 as W,d8 as at,ag as nt,X,d9 as st,f as rt}from"./index-CxkwDRG8.js";import{D as ot,n as N,S as it}from"./mui-DaLeH41l.js";import ct from"./NotFoundScreen-DjDyDYWZ.js";import{S as Q}from"./SetupPagesScreen-BxDIT7Xu.js";import{a as p}from"./sentry-CNLjKkQW.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-D-XiURTy.js";import{u as ut}from"./useInitialThreadRequest-DANB6KeB.js";import{M as ce}from"./MobileAppDrawer-BtnNKdri.js";import{F as dt}from"./FeaturePreviewScreen-BhrA_knX.js";import{a as ee}from"./analyticsHelper-C8sM1z8L.js";import"./recharts-CkuQpH_L.js";import"./analytics-DHBkdK00.js";import"./plaid-BVNoSR_u.js";import"./dnd-DKR3QBLX.js";import"./stripe-cKAAJElX.js";import"./lottie-DACJJNY9.js";import"./lexical-CcqvVKiN.js";import"./pdf-BjtwR-dW.js";import"./utils-BN2UhEgk.js";import"./BusinessVerificationPageScreen--LjYD0BK.js";import"./routePaths-CKTfFzY9.js";import"./InboxNotificationsProvider-DBc6Mphu.js";import"./useTaskManagerAccess-CgZlooKP.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="44106a13-995e-4854-82af-a7c872f4cfd1",t._sentryDebugIdIdentifier="sentry-dbid-44106a13-995e-4854-82af-a7c872f4cfd1")}catch{}})();const pt=O((function(t,a){const{companyId:n}=a;return{treasurySetupView:B(t,n),analytics:A}}),(function(t,a){const{navigate:n,analytics:o,treasurySetupView:i}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=i.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(we(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Ie(r))}}}))(Ye);function mt(){const t=F(),a=L(),n=U(),{tenantEmailDomain:o}=V(),i=_(),r=y((w=>w.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState)),m=qe(r),s=M(i?.loggedInUserRoleMap),[d,c]=p.useState(!1),[S,x]=p.useState(!1),[l,u]=p.useState(!1),T=y((w=>v(w))),f=b.getSignedInUserTenant(o)?.companyId??T.companyId,C=b.getSignedInUser(),h=y((w=>B(w,f))),g=y((w=>w.treasurySetupViewState.fetchState)),j=y((w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),I=y((w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState));if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect((()=>{d||g!=="Not-Started"||f==null||(c(!0),n(ae(f,!0,!1)))}),[d,g,f,n]),p.useEffect((()=>{l||I!=="Not-Started"||f==null||(u(!0),n(Y()))}),[l,I,f,n]),p.useEffect((()=>{S||j!=="Not-Started"||f==null||(x(!0),n(ne()))}),[S,j,f,n]),p.useEffect((()=>{m==="In-Progress"&&r==="Completed"&&t("../")}),[m,r,t]),T.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(D,{to:"../promo"});const P=T.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||g!=="Completed";return e.jsxs(e.Fragment,{children:[!P&&e.jsx($,{analytics:A,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:f,isEditMode:!0,isLoading:P,isReadOnly:!s,treasurySetupView:h,analytics:A})]})}const ft=O((function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:B(t,n)}}),(function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:i}=a,r=o.treasuryTransferMoneyLocalData,m=i.fundAllocationLocalData;return{onCancelClick:()=>{q(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{q(a.analytics,"confirm",r,m,"Transfer"),t(be())},onSaveChangesToLocalStore:s=>{t(Ee(s))},onFetchLinkTokenClick:s=>{t(Ae("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}}))(Ze),yt=({isFirstTransfer:t,isTransactionsLoaded:a})=>{const n=F(),{tenantEmailDomain:o}=V(),i=U(),[r,m]=p.useState(!1),[s,d]=p.useState(!1),[c,S]=p.useState(!1),[x,l]=p.useState(!1),u=y((I=>I.treasurySetupViewState.fetchState)),T=y((I=>I.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),f=y((I=>I.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),C=y((I=>v(I))),h=b.getSignedInUserTenant(o)?.companyId??C.companyId,g=y((I=>Ce(I))),j=y((I=>B(I,h)));if(b.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect((()=>{s||u!=="Not-Started"||h==null||(d(!0),i(ae(h,!0,!1)))}),[s,u,h,i]),p.useEffect((()=>{c||T!=="Not-Started"||h==null||(S(!0),i(Y()))}),[c,T,h,i]),p.useEffect((()=>{x||f!=="Not-Started"||h==null||(l(!0),i(ne()))}),[x,f,h,i]),e.jsxs(e.Fragment,{children:[e.jsx($,{analytics:A,onLoad:()=>{}}),e.jsx(ft,{analytics:A,navigate:n,transferDetails:g,onAnotherTransferClick:()=>{m(!1),i(se())},currentTenant:C,treasurySetupView:j,showReviewContent:r,maxInsuredAmount:5e5,onReviewClick:()=>{q(A,"review",g.treasuryTransferMoneyLocalData,j.fundAllocationLocalData,"Transfer"),m(!0)},isFirstTransfer:t,isTransactionsLoaded:a,setShowReviewContent:m,onBackClick:()=>{}})]})},gt=N.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
9
|
-
`,St={overlayWidth:new Je(100,100,48)},ht=O((function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:B(t,o),downloadEndPoint:`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}}),(function(t,a){const{navigate:n,currentTenant:o,location:i,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:d=>{let c="page-not-found";d==="editPortfolio"?c=Tt(s):d==="statements"?c=xt(s):d==="taxLetter"?c=It(s):d==="settings"&&(c=wt(s));const S=et(i.state?.pathnameStackToGoBack,i.pathname);n(c,{state:{pathnameStackToGoBack:S}})},onColumnSortConfigChanged:(d,c)=>{t(Fe({uiState:{sortKey:d,sortOrder:c}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}}))(Qe);function G({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=L(),o=F(),i=U(),r=H(),m=He(),s=y((E=>v(E))),{tenantEmailDomain:d}=V(),c=s.companyId??b.getSignedInUserTenant(d)?.companyId,[S,x]=p.useState(!1),l=y((E=>re(E))),u=l.fetchState,T=l.accountSummary?.totalBalance?.amount,f=y((E=>E.treasurySetupViewState.treasuryFundsDetails?.fetchStatus)),C=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",h=_(),g=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,j=M(h?.loggedInUserRoleMap),I=Z(h?.loggedInUserRoleMap),{areTenantIdsInSync:P}=Ke();p.useEffect((()=>{u==="Not-Started"&&!S&&P&&(x(!0),i(oe(!0)))}),[S,i,u,P]),p.useEffect((()=>{l.transactionsFetchState.fetchState==="Completed"&&l.transactions.length===0&&!n.pathname.includes("transfer")&&j&&o("./transfer")}),[l.transactionsFetchState.fetchState,l.transactions.length,n.pathname,j,o]);const w=()=>{o("..")},[le,ue]=p.useState(!1),J=E=>{ue(E)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=lt({mobileExploreReferrer:"Treasury"});We({isDataReady:u==="Completed"});const{useFeatureGate:z}=ie(),{isFeatureEnabled:me}=z(R.isDebitCardFeatureEnabled),{isFeatureEnabled:fe}=z(R.isAutoTransferRuleEnabled),{isFeatureEnabled:ye}=z(R.isTreasuryCommentingEnabled),ge=ut(c,{clearParams:u==="Completed"&&f?.fetchState==="Completed"}),Se=ve(s),he=De(me,s);if(Se===!0&&he!==!0)return e.jsx(dt,{});if(C){const E=f?.fetchState!=="Completed"||l.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[l.accountSummaryFetchState.fetchState==="Completed"&&f?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx($,{analytics:A,onLoad:()=>{}}):null,e.jsx(ot,{onClose:w,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:St.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(Ct,{onClick:Te=>Te.stopPropagation(),children:[t===!0?e.jsx(yt,{isFirstTransfer:l.transactions.length===0||T===0,isTransactionsLoaded:l.transactionsFetchState.fetchState!=="In-Progress"&&l.transactionsFetchState.fetchState!=="Not-Started"}):null,a===!0?e.jsx(mt,{}):null]})}),e.jsxs(gt,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:J}),e.jsx(ht,{treasuryDetailsView:l,isAutoTransferRuleEnabled:fe,navigate:o,currentTenant:s,location:n,companyId:c,analytics:A,isTreasuryCommentingEnabled:ye,handleDrawerToggle:J,initialOpenThreadRequest:ge,isLoading:E,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return g&&j?e.jsx(D,{to:"../setup"}):s.companyTreasuryInfo?.info&&!g&&I?e.jsx(D,{to:"../promo",state:n.state}):e.jsx(Xe,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const Tt=t=>`/${t}/treasury/edit-portfolio`,xt=t=>`/${t}/treasury/statements`,It=t=>`/${t}/treasury/tax-letter`,wt=t=>`/${t}/treasury/setup`,Ct=N(it)`
|
|
10
|
-
display: flex;
|
|
11
|
-
min-height: 100%;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
`,kt=N.div`
|
|
14
|
-
display: flex;
|
|
15
|
-
height: 100vh;
|
|
16
|
-
width: 100%;
|
|
17
|
-
flex: 1 1 auto;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
align-items: center;
|
|
20
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
21
|
-
`;function jt(){const t=F(),a=U(),n=H(),o=L(),i=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=p.useState(!1),s=y((u=>Le(u)));p.useEffect((()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Ue(!1)))}),[r,s.fetchState,a]);const d=b.getSignedInUser(),c=y((u=>v(u))),S={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c.tenantId??""},x=c.company?.companyInfo.companyLegalName??c.companyName;if(d==null)throw Error("Can't access statements page without signing in...");const l=s.fetchState!=="Completed";return e.jsx(kt,{windowSize:n,children:e.jsx(tt,{currentTenantCompanyName:x,statementListView:s,isLoading:l,onBackClick:()=>{const u=W(o.state?.pathnameStackToGoBack),T=u.poppedPathname??"..";t(T,{state:{pathnameStackToGoBack:u.newStack}})},authParams:S,downloadEndPoint:i})})}const At=N.div`
|
|
22
|
-
display: flex;
|
|
23
|
-
height: 100vh;
|
|
24
|
-
width: 100%;
|
|
25
|
-
flex: 1 1 auto;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
align-items: center;
|
|
28
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
29
|
-
`;function Et(){const t=F(),a=H(),n=L(),o=U(),i=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=p.useState(!1),s=y((u=>Be(u)));p.useEffect((()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Pe(!1)))}),[r,s.fetchState,o]);const d=b.getSignedInUser(),c=y((u=>v(u))),S={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c.tenantId??""},x=c.company?.companyInfo.companyLegalName??c.companyName;if(d==null)throw Error("Can't access tax letter page without signing in...");const l=s.fetchState!=="Completed";return e.jsx(At,{windowSize:a,children:e.jsx(at,{currentTenantCompanyName:x,taxLetterListView:s,isLoading:l,onBackClick:()=>{const u=W(n.state?.pathnameStackToGoBack),T=u.poppedPathname??"..";t(T,{state:{pathnameStackToGoBack:u.newStack}})},authParams:S,downloadEndPoint:i})})}const bt=O((function(t,a){const{companyId:n}=a,o=B(t,n);return{treasurySetupView:o,isSetupComplete:o.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk"}}),(function(t,a){const{navigate:n,companyId:o}=a;return{onSetupButtonClick:()=>{t(Re(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:i=>{n(i?"..":"../setup",{relative:"path"})}}}))(st),vt=()=>{const t=nt(),a=F(),n=L(),o=U(),{tenantEmailDomain:i}=V(),[r,m]=p.useState(!1),s=y((g=>v(g))),[d,c]=p.useState(!1),S=y((g=>g.treasurySetupViewState.treasuryFundsDetails?.fetchStatus));p.useEffect((()=>{d||S?.fetchState!=="Not-Started"||x==null||(c(!0),o(Y()))}),[S,o]);const x=b.getSignedInUserTenant(i)?.companyId??s.companyId,l=b.getSignedInUser(),u=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,T=g=>{m(g)};if(l==null)throw Error("Can't access treasury promo page without signing in...");const f=_(),C=M(f?.loggedInUserRoleMap),h=Z(f?.loggedInUserRoleMap);if(u&&C)return e.jsx(D,{to:"../../treasury/setup"});if(s.company?.companyTreasuryInfo&&(!u&&C||h)){if(n.state?.message==="activation"){const g=W(n.state?.pathnameStackToGoBack);a(n.pathname,{state:{...n.state,message:void 0,pathnameStackToGoBack:g.newStack}})}return S?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx($,{analytics:A,onLoad:g=>(j=>j.trackTreasuryPromoView("Treasury Promo Page"))(g)}),e.jsx(ce,{isAppContentDrawerOpen:r,handleDrawerToggle:T}),e.jsx(bt,{analytics:A,navigate:a,companyId:x,meetingUrl:t("treasury_promo"),onClickMenuIcon:()=>{T(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=N.div`
|
|
30
|
-
display: flex;
|
|
31
|
-
width: 100%;
|
|
32
|
-
height: 100%;
|
|
33
|
-
flex-direction: row;
|
|
34
|
-
justify-content: center;
|
|
35
|
-
align-items: center;
|
|
36
|
-
background-color: ${t=>t.theme.colors.grey5};
|
|
37
|
-
`;function aa(){const t=L(),a=y((g=>v(g))),{useFeatureGate:n}=ie(),o=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",i=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=Z(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Ne(a?.userRole),d=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Ve(r?.loggedInUserRoleMap),c=Oe(r?.loggedInUserRoleMap),S=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&Me(r?.loggedInUserRoleMap),x=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!s&&_e(r?.loggedInUserRoleMap),l=o&&!s&&M(r?.loggedInUserRoleMap),{isFeatureEnabled:u}=n(R.isChargeCardFeatureEnabled),{isFeatureEnabled:T}=n(R.isDebitCardFeatureEnabled),f=rt(a,u,T)&&!s&&$e(r?.loggedInUserRoleMap),C=ze(r?.loggedInUserRoleMap),h=Ge(r?.loggedInUserRoleMap);return e.jsxs(xe,{children:[h?null:e.jsx(k,{path:"setup",element:e.jsx(Q,{isBillPayAdminLevelAccess:d,isReimbursementAdminLevelAccess:S,isZeniAccountAdminLevelAccess:x,isChargeCardAdminLevelAccess:f,isTreasuryAdminLevelAccess:l,isUserHasOnlyCardAccess:C,isUserHasOnlyBillPayAccess:c,productType:"zeni_treasury",type:"setup"})}),h?null:e.jsx(k,{path:"verification",element:e.jsx(Q,{isBillPayAdminLevelAccess:d,isUserHasOnlyBillPayAccess:c,isReimbursementAdminLevelAccess:S,isZeniAccountAdminLevelAccess:x,isChargeCardAdminLevelAccess:f,isTreasuryAdminLevelAccess:l,isUserHasOnlyCardAccess:C,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(vt,{})}),e.jsx(k,{path:"statements",element:e.jsx(jt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(Et,{})}),o?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx(G,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),l?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx(G,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx(G,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(ct,{})})]}):i&&l?e.jsx(k,{path:"*",element:e.jsx(D,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(D,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{aa as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-BkTNzfNi.js";import{a as l}from"./sentry-CNLjKkQW.js";import{t as u,u as h,j as y,N as I}from"./core-DuNHGHBC.js";import{TK as w,ge as b,IR as j}from"./zeni-epic-state-IKQP0lNP.js";import{z as f,a5 as x,ad as S,ae as D}from"./index-CxkwDRG8.js";import{n as c}from"./mui-DaLeH41l.js";import"./recharts-CkuQpH_L.js";import"./analytics-DHBkdK00.js";import"./plaid-BVNoSR_u.js";import"./dnd-DKR3QBLX.js";import"./stripe-cKAAJElX.js";import"./lottie-DACJJNY9.js";import"./lexical-CcqvVKiN.js";import"./pdf-BjtwR-dW.js";import"./utils-BN2UhEgk.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="874d1604-504d-4ce6-8e1c-3ae6d9435982",e._sentryDebugIdIdentifier="sentry-dbid-874d1604-504d-4ce6-8e1c-3ae6d9435982")}catch{}})();const B=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=l.useState(!1),a=h(),i=y((m=>w(m))),r=f.getSignedInUser(),d=f.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return b(r.userId,r.zeniSessionId,d?.tenantId),l.useEffect((()=>{n||(p(!0),a(j(t,g,s)))}),[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(T,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=c.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100vh;
|
|
5
|
-
flex-direction: row;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
9
|
-
`,T=c(D.LargeRegular)`
|
|
10
|
-
display: flex;
|
|
11
|
-
color: ${S.important};
|
|
12
|
-
`;export{B as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-BkTNzfNi.js";import{a as u}from"./sentry-CNLjKkQW.js";import{h as x,u as $,g as j,i as v,j as p}from"./core-DuNHGHBC.js";import{Sw as s,Sv as B,_P as C,fB as E,_Q as P}from"./zeni-epic-state-IKQP0lNP.js";import{$ as T,ac as g,E as _,z,a5 as D,d2 as L,a2 as N}from"./index-CxkwDRG8.js";import{n as U}from"./mui-DaLeH41l.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="321bb31c-edf5-47ed-a612-cbf97cee41c0",e._sentryDebugIdIdentifier="sentry-dbid-321bb31c-edf5-47ed-a612-cbf97cee41c0")}catch{}})();const G=U.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;function F(){const e=x(),n=$(),d=T(),l=j();let{accountId:a}=v(),f=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,f=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[m,b]=u.useState(!1),h=_();u.useEffect((()=>{m||(b(!0),n(B(a??"",!1)))}),[m,n]);const o=p((t=>C(t,a??""))),y=()=>{const t=N(l.state?.pathnameStackToGoBack),k=t.poppedPathname??"..";e(k,{state:{pathnameStackToGoBack:t.newStack}})},c=z.getSignedInUser(),r=p((t=>E(t))),I={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:r.tenantId??""},w=P(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",S=r.company?.companyInfo.companyLegalName??r.companyName;if(c==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(D,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):i.jsx(G,{windowSize:d,children:i.jsx(L,{currentTenantCompanyName:S,statementListView:o,accountLast4:w,onBackClick:y,authParams:I,downloadEndPoint:f})})}export{F as Z};
|