@zeniai/web-app-ui 5.0.95-dev → 5.0.96-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-DrJ0R4zA.js +1 -0
- package/dist/assets/{AddressScreen-C1kNIoFW.js → AddressScreen-Bg11cvW7.js} +2 -2
- package/dist/assets/{AiCfoScreen-DiEWR7_7.js → AiCfoScreen-ttXGMdMj.js} +5 -5
- package/dist/assets/{BillPayApprovalRoutes-BFuKAoJn.js → BillPayApprovalRoutes-DSmsDGfo.js} +1 -1
- package/dist/assets/{BillPayRoutes-yYgD8ElZ.js → BillPayRoutes-DJZxWW5J.js} +34 -34
- package/dist/assets/{BusinessVerificationPageScreen-LVeN_2_9.js → BusinessVerificationPageScreen-Bgww5Eni.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-Dqh0dx38.js → ChargeCardRoutes-DBBIBX3p.js} +8 -8
- package/dist/assets/{CompanyPassportScreen-CoCoQTkp.js → CompanyPassportScreen-BY6KqDn5.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-BBpw2AR4.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-BwmSNWEA.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-BeOSK0bV.js → CustomerOnboardingRoutes-CBskXxxc.js} +1 -1
- package/dist/assets/{DashboardRoutes-DeXVvCqq.js → DashboardRoutes-B7wfzxUf.js} +4 -4
- package/dist/assets/{DefaultTenantHome-DZiebdrx.js → DefaultTenantHome--GVn7qHn.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-CdWlbEyV.js +18 -0
- package/dist/assets/DrawerScreen-Cme8vixt.js +1 -0
- package/dist/assets/EntityDetailRoutes-mC151u-W.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-hIKcsGeT.js → ExpenseAutomationRoutes-BI8ssrmn.js} +4 -4
- package/dist/assets/FeaturePreviewScreen-CKIBiLol.js +1 -0
- package/dist/assets/{HubSpotOAuthCallbackScreen-C_sETmGk.js → HubSpotOAuthCallbackScreen-BooPYq0F.js} +1 -1
- package/dist/assets/MagicLinkRoutes-6F4w3fCs.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-CBTOwBE4.js +12 -0
- package/dist/assets/{MobileAppDrawer-CgbJlL9u.js → MobileAppDrawer-6SipHCGH.js} +1 -1
- package/dist/assets/NotFoundScreen-BbD7D-7R.js +1 -0
- package/dist/assets/{NotificationRoutes-HNy89jXR.js → NotificationRoutes-CZA_Ly2E.js} +1 -1
- package/dist/assets/OAuthConsentScreen-BQ6c6hkL.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-CFV6-GFH.js +1 -0
- package/dist/assets/{PeopleRoutes-B7-ewz69.js → PeopleRoutes-CQZMU4bx.js} +5 -5
- package/dist/assets/PerformanceRoutes-D4TOcMhX.js +1 -0
- package/dist/assets/{Preview-DVbW5PS-.js → Preview-De8DjXIQ.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-BRbkYHuP.js → QBOConnectionScreen-C6YL0sDk.js} +1 -1
- package/dist/assets/ReferralListScreen-pub9zNod.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-CtZYMXXf.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CO_HtFbP.js → ReimbursementApprovalRuleDetailScreen-Cyjo3GHG.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-pmb5ZMBe.js → ReimbursementRoutes-MFX8Bud0.js} +4 -4
- package/dist/assets/{ReportsRoutes-C9h_dCJo.js → ReportsRoutes-CFENeNIe.js} +1 -1
- package/dist/assets/RewardsRoutes-C9SyzdEY.js +1 -0
- package/dist/assets/{ScreenRoutes-DB3q5PNA.js → ScreenRoutes-BeA1lKqC.js} +2 -2
- package/dist/assets/{SettingsRoutes-DEx1uOuX.js → SettingsRoutes-CeD2DwUh.js} +7 -7
- package/dist/assets/{SetupPagesScreen-DM0dhGt1.js → SetupPagesScreen-A0QZWQlp.js} +5 -5
- package/dist/assets/SignInScreen-BLRkAV-s.js +1 -0
- package/dist/assets/SignOutScreen-BmLBsLVz.js +9 -0
- package/dist/assets/{TaskListScreen-CQTVeDwe.js → TaskListScreen-oD_ucU4f.js} +2 -2
- package/dist/assets/{TaskRoutes-DzCuQY-E.js → TaskRoutes-DE3EZJLP.js} +2 -2
- package/dist/assets/{TransactionDetailRoutes-BjnNsU6t.js → TransactionDetailRoutes-DUjSaKyf.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-BSarw1vq.js → TransactionDetailScreen-B3uLE8LG.js} +2 -2
- package/dist/assets/{TransactionListRoutes-CXfUmvjI.js → TransactionListRoutes-BlbqsdwG.js} +1 -1
- package/dist/assets/{TreasuryRoutes-CDE_tE4t.js → TreasuryRoutes-BzlbCHr7.js} +6 -6
- package/dist/assets/{VendorsRoutes-Cz9uX3LH.js → VendorsRoutes-CW522oMp.js} +1 -1
- package/dist/assets/WiseConfirmationScreen-D-jXv9gV.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-DIt49_h_.js → ZeniAccountRoutes-CSBwxnuu.js} +10 -10
- package/dist/assets/ZeniAccountStatementScreen-Dmd7_0nF.js +9 -0
- package/dist/assets/{accountMappingHelper-DdryjbCH.js → accountMappingHelper-CoDQ683a.js} +1 -1
- package/dist/assets/{analytics-B35UERag.js → analytics-CztvM7Zo.js} +1 -1
- package/dist/assets/{analyticsHelper-D8sAsSDg.js → analyticsHelper-DidHWGct.js} +1 -1
- package/dist/assets/{core-B20PugrR.js → core-CAUatE6D.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-HZX6LUOb.js → decodeURIComponentSafe-M2sJXq9C.js} +1 -1
- package/dist/assets/{dnd-CTNaOehy.js → dnd-DoUvAW-O.js} +1 -1
- package/dist/assets/{empty-DbjE3Pml.js → empty-BtvkP3hw.js} +1 -1
- package/dist/assets/{empty-DqPV1QMu.js → empty-D8yvrubO.js} +1 -1
- package/dist/assets/{emptyVideoElement-D5A8Alvf.js → emptyVideoElement-Bd8ec_3G.js} +1 -1
- package/dist/assets/{epic-C05Fn23e.js → epic-CGb2Dbds.js} +1 -1
- package/dist/assets/getLocaleForTenant-DjpfkvqM.js +1 -0
- package/dist/assets/{index-DODLcfP6.js → index--Cei8VXn.js} +1 -1
- package/dist/assets/{index-DwJt1swd.js → index-7hhSQ-_M.js} +1 -1
- package/dist/assets/{index-qbNk-Sh2.js → index-BBI_6CLT.js} +1 -1
- package/dist/assets/{index-BJUGjRvu.js → index-BRSfwvH4.js} +1 -1
- package/dist/assets/{index-DDN5QRfh.js → index-DklNZPEZ.js} +2 -2
- package/dist/assets/{index-Dh7l3Ca4.js → index-eEJDMus_.js} +1 -1
- package/dist/assets/{index-D8hCAHx9.js → index-ssCDruz8.js} +7428 -7430
- package/dist/assets/{index-Dx-tgz0s.js → index-uJrW53Lh.js} +1 -1
- package/dist/assets/{lexical-BDpP_OMn.js → lexical-B4m6CLZ0.js} +1 -1
- package/dist/assets/{liveblocks-BSDLCmF2.js → liveblocks-Do-nuGO9.js} +1 -1
- package/dist/assets/{lottie-DG71PfmK.js → lottie-DhqFkmtq.js} +1 -1
- package/dist/assets/{mui-BBkBdMVO.js → mui-Ee2kkUYC.js} +1 -1
- package/dist/assets/{pathToGoBack-BJj5tqvK.js → pathToGoBack-m6LhD1oT.js} +1 -1
- package/dist/assets/{pdf-Cp8DoYAG.js → pdf-DGClrODY.js} +4 -4
- package/dist/assets/{pdf-lib-BqwRJQ00.js → pdf-lib-QKmlG01y.js} +1 -1
- package/dist/assets/{plaid-DHvUog4a.js → plaid-BfqKUq3C.js} +1 -1
- package/dist/assets/{pusher-DsZLo3j0.js → pusher-D-t7eVeO.js} +1 -1
- package/dist/assets/{react-DpONCvOo.js → react-BJcwMgz5.js} +1 -1
- package/dist/assets/{react-BUTkVbbW.js → react-C1ZZYDEp.js} +1 -1
- package/dist/assets/{react-D4RyndA4.js → react-D7LvJpSs.js} +1 -1
- package/dist/assets/{react-zGcoIiO8.js → react-DNnZi339.js} +1 -1
- package/dist/assets/{react-Uu6ZW5p-.js → react-DWvyJqE6.js} +1 -1
- package/dist/assets/{react-BPL_4xi4.js → react-mujJLjaM.js} +1 -1
- package/dist/assets/{recharts-BzjcN9SN.js → recharts-DfwJcvGU.js} +1 -1
- package/dist/assets/{routePaths-XreQojZr.js → routePaths-C0HYOQUJ.js} +1 -1
- package/dist/assets/{sentry-67DqaLi1.js → sentry-CpVyi-77.js} +1 -1
- package/dist/assets/{url-DgheZiFv.js → url-Dj6kXEk9.js} +1 -1
- package/dist/assets/{url-D5ovKX_j.js → url-Dp0KhTaX.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CvDMoudE.js → useAiCfoDashboardSuggestedQuestionsChips-BymSQq_a.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BiHuzfAQ.js +1 -0
- package/dist/assets/{useDeviceId-CZrGGxHD.js → useDeviceId-BXZMNB1t.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-BHiBt2ra.js → useInitialThreadRequest-DnRRNYgw.js} +1 -1
- package/dist/assets/{utils-C7uJ9upL.js → utils-Bgxe0MRZ.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-C7OFQuvJ.js → withTransactionSidePanel-DKaQybw-.js} +3 -3
- package/dist/assets/{zeni-epic-state-B3AwsZqW.js → zeni-epic-state-Cb-J9Nxh.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/AddressRoutes-0Eyzeqmo.js +0 -1
- package/dist/assets/ConnectionAuthScreen-B7BFXXXS.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-D5Bh3dbO.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-BU_VenPR.js +0 -18
- package/dist/assets/DrawerScreen-BbhUunYL.js +0 -1
- package/dist/assets/EntityDetailRoutes-DdiBSVG3.js +0 -1
- package/dist/assets/FeaturePreviewScreen-C1-h6LMu.js +0 -1
- package/dist/assets/MagicLinkRoutes-DZdU0REk.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-BDghb4vk.js +0 -12
- package/dist/assets/NotFoundScreen-DjvK1NbN.js +0 -1
- package/dist/assets/OAuthConsentScreen-BRyPWMqe.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-CBP1v8tZ.js +0 -1
- package/dist/assets/PerformanceRoutes-COR3BTZa.js +0 -1
- package/dist/assets/ReferralListScreen-C5_wj8jW.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-DNyMDR4t.js +0 -1
- package/dist/assets/RewardsRoutes-COWJicvP.js +0 -1
- package/dist/assets/SignInScreen-BIF8y6r_.js +0 -1
- package/dist/assets/SignOutScreen-D0ouX99i.js +0 -9
- package/dist/assets/WiseConfirmationScreen-B9n09x9Y.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-Dafm8AUT.js +0 -9
- package/dist/assets/getLocaleForTenant-ht-6GSU5.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-CDnIxewv.js +0 -1
package/dist/assets/{TransactionDetailScreen-BSarw1vq.js → TransactionDetailScreen-B3uLE8LG.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{j as k}from"./liveblocks-
|
|
1
|
+
import{j as k}from"./liveblocks-Do-nuGO9.js";import{a as d}from"./sentry-CpVyi-77.js";import{u as G,j as S,g as re,h as le,i as de,N as Ge,n as je}from"./core-CAUatE6D.js";import{bn as $e,eP as q,cP as ue,bt as me,pT as Y,Kz as w,LA as pe,LB as Q,KZ as he,jO as fe,LC as ge,L2 as J,L3 as Z,kD as Se,Hz as X,Kt as x,jI as Te,jG as ye,jS as He,LD as Me,LE as Ke,tR as N,jN as ve,GR as Ee,cU as We,cV as qe,LF as Ye,Ks as Qe,LG as Je,tV as Ze,LH as Xe,LI as ea,LJ as aa,LK as ta,LL as na,jR as oa,LM as sa,LN as ia,Ku as ca,LO as ra,LP as la,LQ as da,GL as ua,Gz as ma,H1 as pa,jT as ha,HA as ie,GI as fa}from"./zeni-epic-state-Cb-J9Nxh.js";import{z as De,w as ee,I as L,aN as be,h as ga,K as Sa,aO as Ta,r as ya,p as K,k as va,aP as Ea,m as W,Y as Da,c as Ce,aQ as ba,at as Ca,a2 as M}from"./index-ssCDruz8.js";import{n as Ia,S as ka,D as La}from"./mui-Ee2kkUYC.js";import{u as Aa}from"./useAskAiCfoHostNavButtonProps-BiHuzfAQ.js";import{d as Ie}from"./decodeURIComponentSafe-M2sJXq9C.js";import{h as ke,g as Ua,e as xa,c as _a}from"./routePaths-C0HYOQUJ.js";import{t as Va}from"./utils-Bgxe0MRZ.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]="432b1fe6-a88f-495e-91c4-fc7b9832bf05",a._sentryDebugIdIdentifier="sentry-dbid-432b1fe6-a88f-495e-91c4-fc7b9832bf05")}catch{}})();const ae=()=>{const a=De.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(L.isChainOfThoughtEnabled);return d.useMemo(()=>$e(a)&&s,[a,s])};function Le(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Qa(a,e){const s=G(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>q(u)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ue(o.userRole),g=o.userRole!=null&&me(o.userRole),{isFeatureEnabled:T}=t(L.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:C}=t(L.isExpenseAutomationEnabled),{configValue:h}=n(be.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,A=ae(),y=d.useMemo(()=>({id:a,type:Y(e)}),[a,e]),m=S(u=>w(u,y)),b=S(u=>{const z=w(u,y)?.transactionDetailLocalData.vendorUpdates?.id;return z==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[z]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Le(m?.transaction):void 0,[m?.fetchState,m?.transaction]),v=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),U=S(u=>Q(u)),_=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),j=o.company?.companyInfo.firstMonthOfFY??1,$=S(u=>fe(u.accountState,u.accountListState,"accountList")),[F,V]=d.useState(!1),[O,P]=d.useState(!1),[E,c]=d.useState(!1);d.useEffect(()=>{V(!1),P(!1),c(!1)},[a,e]);const H=d.useCallback(()=>{V(!1),P(!1)},[]),[D,I]=d.useState(!1),B=_?.selectedPeriod?.timePeriod;return d.useEffect(()=>{E||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),c(!0)),p!=null&&(!i||l&&g===!1)&&(F?O||v==null||(P(!0),s(X(p,"TransactionDetail",{timeframe:"month",timePeriod:B??v}))):(s(J()),s(Z()),V(!0),s(Se(p))))},[s,E,m?.fetchState,m?.transaction,p,i,l,g,F,O,v,B]),d.useEffect(()=>{U.newVendorState?.vendorDetailLocalData?.vendorName!=null?I(!0):I(!1)},[U.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(x("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:T,isExpenseAutomationEnabled:C,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:A,selectedTransaction:y,transactionDetail:m,vendorSaveStatus:b,tranEntity:p,defaultTrendTransactionTimePeriod:v,vendorViewDetails:U,uiState:_,firstMonthOfFY:j,uncategorizedAccounts:$,resetTrendIsFetchedStates:H,isCreateVendorDrawerOpen:D,setIsCreateVendorDrawerOpen:I}}const Pa={overlayWidth:new ya(100,100,58)},Ba=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=ga(),i=Sa(),l=G(),g=S(h=>Q(h)),T=()=>{t()},C={vendorDetailView:n??g,onSaveSuccess:()=>{l(ye()),l(He("Not-Started")),s()},onSaveVendor:e,onCancelClick:T,saveVendorDetailLocalData:h=>{l(Te({vendorId:void 0,localData:h}))}};return k.jsx(La,{anchor:"right",open:a,PaperProps:{style:{width:Pa.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:T,children:k.jsx(wa,{onClick:h=>h.stopPropagation(),children:k.jsx(Ta,{...C})})})},wa=Ia(ka)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
5
|
-
`,Fa=({closeDrawerHandler:a,overrideTransactionId:e,overrideTransactionType:s})=>{const t=re(),n=le(),o=G(),i=ae(),{transactionTypeEncoded:l,transactionId:g}=de(),T=e??g,C=s??Ie(l??"");let h;ke(T,C)&&(h={id:T,type:Y(C)});const f=h!=null?S(y=>w(y,h)):void 0,A=()=>{const y=W(t.state?.pathnameStackToGoBack),m=y.poppedPathname??((b=2)=>{let p="../";for(let v=0;v<b;v++)p=`${p}../`;return p})(1);n(m,{state:{pathnameStackToGoBack:y.newStack}})};return{transactionId:h,onSaveVendor:()=>{o(ve(h,void 0))},onSaveSuccess:()=>{if(f!=null&&f?.transaction&&f?.transactionDetailLocalData.vendorUpdates?.qboId!=null&&f?.transactionDetailLocalData.vendorUpdates?.id!=null){const y=f?.transactionDetailLocalData.vendorUpdates,m={id:f?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:f?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:y?.name,qboId:f?.transactionDetailLocalData.vendorUpdates?.qboId??""},b={transactionId:{id:f?.transaction?.id,type:f?.transaction?.type},transaction:f?.transaction,lineIds:f?.transaction?.lines?.map(p=>p.id)??[]};o(N(m,f?.transaction?.amount.amount,b,!1,!1,i))}A()},onCancel:()=>{h!=null&&o(Me({transactionId:h})),o(ye()),o(We()),a(!0),A()}}},Oa=je(function(a,e){const s=w(a,e.selectedTransaction);let t;s==null&&console.warn("Check if the you've selected the transaction before getting the details");const n=De.getSignedInUser(),o=a.tenantState.currentTenantId,i={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""};s!=null&&s.fetchState==="Completed"&&s.transaction!=null&&e.entity!=null&&(t=Ye(a,e.entity,"TransactionDetail"));const l=a.entityAutoCompleteState.autoCompleteText.common,g=Qe(a,"common"),T=K(a);return{transactionDetail:s,transactionAttachmentEndpointToDownload:`${M}/transaction_attachment`,transactionAttachmentsEndpointToFetch:T.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${M}/transaction_attachments_accounting_provider`:`${M}/transaction_attachments`,attachmentUploadEndpoint:`${Ca.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:i,trendReport:t,analytics:Ce,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:l,entityAutoCompleteView:g},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails")}},function(a,e){const{isCOTEnabled:s}=e;return{onBackClick:()=>{if(a(_("common")),e.onBackClick!=null)return void e.onBackClick();const t=W(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ae(2);e.navigate(n,{state:{pathnameStackToGoBack:t.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(t,n)=>{e.transaction!=null&&a(fa({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:t,customerId:n}))},onTransactionClick:t=>{e.resetTrendIsFetchedStates(),a(J()),a(Z());const n=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(xa(t,e.tenantEmailDomain),{state:{pathnameStackToGoBack:n}})},onTrendSelectedPeriodChange:t=>{if(t==null)e.defaultTrendTransactionTimePeriod!=null&&a(ie(e.entity,"TransactionDetail",{timeframe:"month",timePeriod:e.defaultTrendTransactionTimePeriod}));else{const n=t.currentTimePeriod==null?t.addTimePeriod:{startDate:t.addTimePeriod.startDate,endDate:t.currentTimePeriod.endDate};a(X(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:t.addTimePeriod})),a(ie(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:n}))}},onSaveUpdates:(t,n,o,i)=>{a(i===!0&&o!=null?ve(t,o,!0,e.isExpenseAutomationEnabled,e.isUncategorizedExpenseCategoryEnabled):ha({transactionId:t,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:n,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled})),a(_("common"))},onUploadAttachmentAttachment:t=>{a(pa(t))},onDeleteAttachment:t=>{e.transaction!=null&&a(ma(t,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(t,n)=>{a(ua({transactionId:t,transactionLocalData:n}))},onUpdateAllChecked:(t,n,o,i)=>{e.transaction!=null&&a(da(e.selectedTransaction,e.transaction,t,n,o,i))},onResetLineItemsCategoryClassInLocalData:(t,n,o,i,l,g)=>{a(la(t,n,o,i,l,g))},onChangeCategoryClassWhenUpdateAllIsChecked:(t,n)=>{e.transaction!=null&&a(ra({id:e.transaction.id,type:e.transaction.type},e.transaction,t,n))},onSaveSuccess:()=>{const t=W(e.location.state?.pathnameStackToGoBack);if(t.poppedPathname!=null){const n=Va(t.poppedPathname,"/").split("/"),o=n[n.length-1];if(["uncategorized-income","uncategorized-expense","missing-receipts"].includes(o)&&e.navigate(t.poppedPathname,{state:{pathnameStackToGoBack:t.newStack}}),e.location.state?.message==="comingFromScheduleDetails"){const i=`${Ua(e.tenantEmailDomain)}`;e.navigate(i)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const i=`${_a(e.tenantEmailDomain)}`;e.navigate(i)}}},onPageRefresh:()=>{a(Ee(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?a(ca({searchString:t,entityType:n,searchOrigin:"common"})):t.trim().length===0&&a(_("common"))},onCancelAutoComplete:()=>{a(_("common"))}},onFetchRecommendationsForEntity:(t,n,o,i)=>{a(N(t,n,o,i,!1,s))},clearRecommendationForLineId:t=>{const{transactionId:n,transaction:o,lineId:i}=t;a(ia(n,o,i))},resetUpdateErrorState:()=>{const t={id:e.selectedTransaction.id,type:e.selectedTransaction.type};a(sa(t))},onSaveVendorInLocalData:(t,n,o,i,l)=>{if(a(oa({transactionId:t,vendorUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(N(o,i,l,!1,!1,s)),a(Te({vendorId:n.id?n.id:void 0,localData:{vendorName:n.name,vendorId:n.id?n.id:void 0}})),!n.id&&e.transaction!=null){const g=e.transaction,T=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(g.type??"")}/${g.id}/vendor/create`,{state:{pathnameStackToGoBack:T}})}},onSaveCustomerInLocalData:(t,n,o,i,l)=>{a(na({transactionId:t,customerUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(N(o,i,l,!1,!1,s))},onUpdateAllTranactionsWithCurrentVendorChecked:t=>{a(ta({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:t}))},onClickUpdateVendorToAllLineItems:(t,n,o)=>{a(aa(t,n,o))},onResetVendorToAllLineItems:(t,n,o)=>{a(ea(t,n,o))},saveLatestSelectedEntity:(t,n,o)=>{a(Xe({transactionId:t,lineId:n,entity:o}))},updateVendorBulkRecommendationsFetchStatus:(t,n)=>{a(Ze(t,n))},setIsVendorUpdateAllChecked:(t,n,o)=>{a(Je(t,n,o))}}})(ba);function Ja(){const a=le(),e=G(),s=re(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=va(),i=S(r=>K(r)),l=i.userRole.includes("charge_card_user")||i.userRole.includes("charge_card_admin"),g=i.userRole!=null&&ue(i.userRole),T=i.userRole!=null&&me(i.userRole),{isFeatureEnabled:C}=t(L.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:h}=t(L.isExpenseAutomationEnabled),{configValue:f}=n(be.enableUncategorizedExpenseCategory),A=f?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:y,transactionTypeEncoded:m,transactionId:b}=de(),[p,v]=d.useState(!1),U=Ie(m??""),x=ke(b,U),j=S(r=>r.transactionVendorViewState),$=ae(),{isFeatureEnabled:F}=t(L.isTransactionCommentingEnabled),{isFeatureEnabled:V}=t(L.isProjectsTransactionsEnabled),O=o?.currentTenant?.companyId,P=o?.currentTenant?.companyName;let E;x&&(E={id:b,type:Y(U)});const c=E!=null?S(r=>w(r,E)):void 0,H=c?.transactionDetailLocalData.vendorUpdates?.id!=null?j.editVendorStateById[c?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",D=c?.fetchState==="Completed"?Le(c?.transaction):void 0,I=S(r=>D!=null?pe(r.customerIncomeState,r.vendorExpenseState,r.trendState,D,"month"):void 0),B=S(r=>Q(r)),u=S(r=>D!=null?he(r.trendWithTransactionsState,D,"TransactionDetail"):void 0),z=i.company?.companyInfo.firstMonthOfFY??1,Ue=S(r=>fe(r.accountState,r.accountListState,"accountList")),[_e,te]=d.useState(!1),[xe,ne]=d.useState(!1),[Ve,Pe]=d.useState(!1),oe=()=>{te(!1),ne(!1)},Be=Ea();d.useEffect(()=>{if(E!=null&&c!=null&&c.fetchState==="Not-Started")e(Ee(E)),oe();else if(E!=null&&c!=null&&c.fetchState==="Error"){const r=q(s.state?.pathnameStackToGoBack,s.pathname),R={pathnameStackToGoBack:r,message:"pageNotFound",origin:"transaction_detail"};Be&&(R.message="expenseAutomation",R.origin="transaction_categorization",R.pathnameStackToGoBack=r),a("page-not-found",{replace:!0,state:R})}},[E]),d.useEffect(()=>{Ve||c==null||c.transaction==null||(e(ge({id:c.transaction.id,type:c.transaction.type})),Pe(!0)),D==null&&c?.fetchState==="Completed"&&ce(c?.transaction),D!=null&&(!l||g&&T===!1)&&(_e?xe||I==null||(ne(!0),e(X(D,"TransactionDetail",{timeframe:"month",timePeriod:u?.selectedPeriod?.timePeriod??I}))):(e(J()),e(Z()),ce(c?.transaction),te(!0),e(Se(D))))},[c?.fetchState,c?.transaction,I,l]),d.useEffect(()=>{B.newVendorState?.vendorDetailLocalData?.vendorName!=null?v(!0):v(!1)},[B.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{e(_("common"))},[]);const we=[m,b].filter(r=>r!=null),{transactionId:se,onSaveVendor:Fe,onSaveSuccess:Oe,onCancel:ze}=Fa({closeDrawerHandler:r=>{v(!1),a(r?"../":"../..")}}),{isAiCfoAccessEnabled:Re,onAskAiCfoClick:Ne}=Aa({mobileExploreReferrer:"Transaction Details"});return Da({isDataReady:c?.fetchState==="Completed"}),x?k.jsxs(k.Fragment,{children:[se!=null&&p&&k.jsx(Ba,{isOpen:p,transactionId:se,onSaveVendor:Fe,onSaveSuccess:Oe,onCancel:ze}),k.jsx(Oa,{hideDeleteAttachment:!0,firstMonthOfFY:z,isDisabled:c?.transaction?.type==="transfer"&&o?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:y,location:s,navigate:a,selectedTransaction:E,entity:D,isCOTEnabled:$,defaultTrendTransactionTimePeriod:I,resetTrendIsFetchedStates:oe,transaction:c?.transaction,uncategorizedAccounts:Ue,vendorSaveStatus:H,isVendorBulkUpdateOnTransactionEnabled:C,isExpenseAutomationEnabled:h,isUncategorizedExpenseCategoryEnabled:A,isAiCfoAccessEnabled:Re,onAskAiCfoClick:Ne,isTransactionCommentingEnabled:F,isProjectsTransactionsEnabled:V,companyId:O,companyName:P})]}):k.jsx(Ge,{to:Ae(we.length)})}const Ae=(a=2)=>{let e="../";for(let s=0;s<a;s++)e=`${e}../`;return e},ce=a=>{if(a!=null){const{transactionCategory:e,transactionClass:s}=za(a),t=Ra(a);Ce.trackTransactionDetails(a.account?.accountId,a.account?.accountName,a.id,t,e.length>0?e:void 0,s.length>0?s:void 0,a.type,a.amount,a.memo,a.lines?.length??0,a.attachments?.map(n=>n.fileName))}},za=a=>{const e=[],s=[];return a.lines?.forEach(t=>{switch(t.type){case"transaction_with_account_and_class_line":case"transaction_with_product_or_service_line":case"journal_entry_transaction_line":case"linked_transaction_line":{const n=t;n!=null&&n.account!=null&&n.account.accountName?.length>0&&e.push(n.account.accountName),n.class!=null&&n.class.className?.length>0&&s.push(n.class.className);break}}}),{transactionCategory:e,transactionClass:s}},Ra=a=>qe(a)===!0?a.customer?.name??"":Ke(a)===!0?a.vendor?.name??"":a.memo!=null?a.memo:a.type;export{Ba as C,Ja as T,Fa as a,Oa as b,ae as c,Qa as u};
|
|
5
|
+
`,Fa=({closeDrawerHandler:a,overrideTransactionId:e,overrideTransactionType:s})=>{const t=re(),n=le(),o=G(),i=ae(),{transactionTypeEncoded:l,transactionId:g}=de(),T=e??g,C=s??Ie(l??"");let h;ke(T,C)&&(h={id:T,type:Y(C)});const f=h!=null?S(y=>w(y,h)):void 0,A=()=>{const y=K(t.state?.pathnameStackToGoBack),m=y.poppedPathname??((b=2)=>{let p="../";for(let v=0;v<b;v++)p=`${p}../`;return p})(1);n(m,{state:{pathnameStackToGoBack:y.newStack}})};return{transactionId:h,onSaveVendor:()=>{o(ve(h,void 0))},onSaveSuccess:()=>{if(f!=null&&f?.transaction&&f?.transactionDetailLocalData.vendorUpdates?.qboId!=null&&f?.transactionDetailLocalData.vendorUpdates?.id!=null){const y=f?.transactionDetailLocalData.vendorUpdates,m={id:f?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:f?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:y?.name,qboId:f?.transactionDetailLocalData.vendorUpdates?.qboId??""},b={transactionId:{id:f?.transaction?.id,type:f?.transaction?.type},transaction:f?.transaction,lineIds:f?.transaction?.lines?.map(p=>p.id)??[]};o(N(m,f?.transaction?.amount.amount,b,!1,!1,i))}A()},onCancel:()=>{h!=null&&o(Me({transactionId:h})),o(ye()),o(Ke()),a(!0),A()}}},Oa=je(function(a,e){const s=w(a,e.selectedTransaction);let t;s==null&&console.warn("Check if the you've selected the transaction before getting the details");const n=De.getSignedInUser(),o=a.tenantState.currentTenantId,i={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""};s!=null&&s.fetchState==="Completed"&&s.transaction!=null&&e.entity!=null&&(t=Ye(a,e.entity,"TransactionDetail"));const l=a.entityAutoCompleteState.autoCompleteText.common,g=Qe(a,"common"),T=q(a);return{transactionDetail:s,transactionAttachmentEndpointToDownload:`${M}/transaction_attachment`,transactionAttachmentsEndpointToFetch:T.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${M}/transaction_attachments_accounting_provider`:`${M}/transaction_attachments`,attachmentUploadEndpoint:`${Ca.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:i,trendReport:t,analytics:Ce,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:l,entityAutoCompleteView:g},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails")}},function(a,e){const{isCOTEnabled:s}=e;return{onBackClick:()=>{if(a(x("common")),e.onBackClick!=null)return void e.onBackClick();const t=K(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ae(2);e.navigate(n,{state:{pathnameStackToGoBack:t.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(t,n)=>{e.transaction!=null&&a(fa({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:t,customerId:n}))},onTransactionClick:t=>{e.resetTrendIsFetchedStates(),a(J()),a(Z());const n=W(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(_a(t,e.tenantEmailDomain),{state:{pathnameStackToGoBack:n}})},onTrendSelectedPeriodChange:t=>{if(t==null)e.defaultTrendTransactionTimePeriod!=null&&a(ie(e.entity,"TransactionDetail",{timeframe:"month",timePeriod:e.defaultTrendTransactionTimePeriod}));else{const n=t.currentTimePeriod==null?t.addTimePeriod:{startDate:t.addTimePeriod.startDate,endDate:t.currentTimePeriod.endDate};a(X(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:t.addTimePeriod})),a(ie(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:n}))}},onSaveUpdates:(t,n,o,i)=>{a(i===!0&&o!=null?ve(t,o,!0,e.isExpenseAutomationEnabled,e.isUncategorizedExpenseCategoryEnabled):ha({transactionId:t,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:n,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled})),a(x("common"))},onUploadAttachmentAttachment:t=>{a(pa(t))},onDeleteAttachment:t=>{e.transaction!=null&&a(ma(t,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(t,n)=>{a(ua({transactionId:t,transactionLocalData:n}))},onUpdateAllChecked:(t,n,o,i)=>{e.transaction!=null&&a(da(e.selectedTransaction,e.transaction,t,n,o,i))},onResetLineItemsCategoryClassInLocalData:(t,n,o,i,l,g)=>{a(la(t,n,o,i,l,g))},onChangeCategoryClassWhenUpdateAllIsChecked:(t,n)=>{e.transaction!=null&&a(ra({id:e.transaction.id,type:e.transaction.type},e.transaction,t,n))},onSaveSuccess:()=>{const t=K(e.location.state?.pathnameStackToGoBack);if(t.poppedPathname!=null){const n=Va(t.poppedPathname,"/").split("/"),o=n[n.length-1];if(["uncategorized-income","uncategorized-expense","missing-receipts"].includes(o)&&e.navigate(t.poppedPathname,{state:{pathnameStackToGoBack:t.newStack}}),e.location.state?.message==="comingFromScheduleDetails"){const i=`${Ua(e.tenantEmailDomain)}`;e.navigate(i)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const i=`${xa(e.tenantEmailDomain)}`;e.navigate(i)}}},onPageRefresh:()=>{a(Ee(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?a(ca({searchString:t,entityType:n,searchOrigin:"common"})):t.trim().length===0&&a(x("common"))},onCancelAutoComplete:()=>{a(x("common"))}},onFetchRecommendationsForEntity:(t,n,o,i)=>{a(N(t,n,o,i,!1,s))},clearRecommendationForLineId:t=>{const{transactionId:n,transaction:o,lineId:i}=t;a(ia(n,o,i))},resetUpdateErrorState:()=>{const t={id:e.selectedTransaction.id,type:e.selectedTransaction.type};a(sa(t))},onSaveVendorInLocalData:(t,n,o,i,l)=>{if(a(oa({transactionId:t,vendorUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(N(o,i,l,!1,!1,s)),a(Te({vendorId:n.id?n.id:void 0,localData:{vendorName:n.name,vendorId:n.id?n.id:void 0}})),!n.id&&e.transaction!=null){const g=e.transaction,T=W(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(g.type??"")}/${g.id}/vendor/create`,{state:{pathnameStackToGoBack:T}})}},onSaveCustomerInLocalData:(t,n,o,i,l)=>{a(na({transactionId:t,customerUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(N(o,i,l,!1,!1,s))},onUpdateAllTranactionsWithCurrentVendorChecked:t=>{a(ta({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:t}))},onClickUpdateVendorToAllLineItems:(t,n,o)=>{a(aa(t,n,o))},onResetVendorToAllLineItems:(t,n,o)=>{a(ea(t,n,o))},saveLatestSelectedEntity:(t,n,o)=>{a(Xe({transactionId:t,lineId:n,entity:o}))},updateVendorBulkRecommendationsFetchStatus:(t,n)=>{a(Ze(t,n))},setIsVendorUpdateAllChecked:(t,n,o)=>{a(Je(t,n,o))}}})(ba);function Ja(){const a=le(),e=G(),s=re(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=va(),i=S(r=>q(r)),l=i.userRole.includes("charge_card_user")||i.userRole.includes("charge_card_admin"),g=i.userRole!=null&&ue(i.userRole),T=i.userRole!=null&&me(i.userRole),{isFeatureEnabled:C}=t(L.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:h}=t(L.isExpenseAutomationEnabled),{configValue:f}=n(be.enableUncategorizedExpenseCategory),A=f?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:y,transactionTypeEncoded:m,transactionId:b}=de(),[p,v]=d.useState(!1),U=Ie(m??""),_=ke(b,U),j=S(r=>r.transactionVendorViewState),$=ae(),{isFeatureEnabled:F}=t(L.isTransactionCommentingEnabled),{isFeatureEnabled:V}=t(L.isProjectsTransactionsEnabled),O=o?.currentTenant?.companyId,P=o?.currentTenant?.companyName;let E;_&&(E={id:b,type:Y(U)});const c=E!=null?S(r=>w(r,E)):void 0,H=c?.transactionDetailLocalData.vendorUpdates?.id!=null?j.editVendorStateById[c?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",D=c?.fetchState==="Completed"?Le(c?.transaction):void 0,I=S(r=>D!=null?pe(r.customerIncomeState,r.vendorExpenseState,r.trendState,D,"month"):void 0),B=S(r=>Q(r)),u=S(r=>D!=null?he(r.trendWithTransactionsState,D,"TransactionDetail"):void 0),z=i.company?.companyInfo.firstMonthOfFY??1,Ue=S(r=>fe(r.accountState,r.accountListState,"accountList")),[xe,te]=d.useState(!1),[_e,ne]=d.useState(!1),[Ve,Pe]=d.useState(!1),oe=()=>{te(!1),ne(!1)},Be=Ea();d.useEffect(()=>{if(E!=null&&c!=null&&c.fetchState==="Not-Started")e(Ee(E)),oe();else if(E!=null&&c!=null&&c.fetchState==="Error"){const r=W(s.state?.pathnameStackToGoBack,s.pathname),R={pathnameStackToGoBack:r,message:"pageNotFound",origin:"transaction_detail"};Be&&(R.message="expenseAutomation",R.origin="transaction_categorization",R.pathnameStackToGoBack=r),a("page-not-found",{replace:!0,state:R})}},[E]),d.useEffect(()=>{Ve||c==null||c.transaction==null||(e(ge({id:c.transaction.id,type:c.transaction.type})),Pe(!0)),D==null&&c?.fetchState==="Completed"&&ce(c?.transaction),D!=null&&(!l||g&&T===!1)&&(xe?_e||I==null||(ne(!0),e(X(D,"TransactionDetail",{timeframe:"month",timePeriod:u?.selectedPeriod?.timePeriod??I}))):(e(J()),e(Z()),ce(c?.transaction),te(!0),e(Se(D))))},[c?.fetchState,c?.transaction,I,l]),d.useEffect(()=>{B.newVendorState?.vendorDetailLocalData?.vendorName!=null?v(!0):v(!1)},[B.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{e(x("common"))},[]);const we=[m,b].filter(r=>r!=null),{transactionId:se,onSaveVendor:Fe,onSaveSuccess:Oe,onCancel:ze}=Fa({closeDrawerHandler:r=>{v(!1),a(r?"../":"../..")}}),{isAiCfoAccessEnabled:Re,onAskAiCfoClick:Ne}=Aa({mobileExploreReferrer:"Transaction Details"});return Da({isDataReady:c?.fetchState==="Completed"}),_?k.jsxs(k.Fragment,{children:[se!=null&&p&&k.jsx(Ba,{isOpen:p,transactionId:se,onSaveVendor:Fe,onSaveSuccess:Oe,onCancel:ze}),k.jsx(Oa,{hideDeleteAttachment:!0,firstMonthOfFY:z,isDisabled:c?.transaction?.type==="transfer"&&o?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:y,location:s,navigate:a,selectedTransaction:E,entity:D,isCOTEnabled:$,defaultTrendTransactionTimePeriod:I,resetTrendIsFetchedStates:oe,transaction:c?.transaction,uncategorizedAccounts:Ue,vendorSaveStatus:H,isVendorBulkUpdateOnTransactionEnabled:C,isExpenseAutomationEnabled:h,isUncategorizedExpenseCategoryEnabled:A,isAiCfoAccessEnabled:Re,onAskAiCfoClick:Ne,isTransactionCommentingEnabled:F,isProjectsTransactionsEnabled:V,companyId:O,companyName:P})]}):k.jsx(Ge,{to:Ae(we.length)})}const Ae=(a=2)=>{let e="../";for(let s=0;s<a;s++)e=`${e}../`;return e},ce=a=>{if(a!=null){const{transactionCategory:e,transactionClass:s}=za(a),t=Ra(a);Ce.trackTransactionDetails(a.account?.accountId,a.account?.accountName,a.id,t,e.length>0?e:void 0,s.length>0?s:void 0,a.type,a.amount,a.memo,a.lines?.length??0,a.attachments?.map(n=>n.fileName))}},za=a=>{const e=[],s=[];return a.lines?.forEach(t=>{switch(t.type){case"transaction_with_account_and_class_line":case"transaction_with_product_or_service_line":case"journal_entry_transaction_line":case"linked_transaction_line":{const n=t;n!=null&&n.account!=null&&n.account.accountName?.length>0&&e.push(n.account.accountName),n.class!=null&&n.class.className?.length>0&&s.push(n.class.className);break}}}),{transactionCategory:e,transactionClass:s}},Ra=a=>We(a)===!0?a.customer?.name??"":qe(a)===!0?a.vendor?.name??"":a.memo!=null?a.memo:a.type;export{Ba as C,Ja as T,Fa as a,Oa as b,ae as c,Qa as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BSDLCmF2.js";import{h as K,g as q,u as Q,i as W,j as h,N as w,n as X,o as Pe,p as j}from"./core-B20PugrR.js";import{eP as U,py as ee,j0 as p,OY as te,Hq as De,bq as le,OZ as be,jD as ae,K$ as ne,O_ as ue,O$ as ve,bE as Y,Hm as ye,P0 as Ee,P1 as me,P2 as je,Hn as Ae,P3 as xe,P4 as pe,P5 as Me,P6 as ge,P7 as Le,P8 as Fe,P9 as fe,ID as Ce,bn as Be}from"./zeni-epic-state-B3AwsZqW.js";import{O as de,w as Z,I as _,d as G,cd as ce,s as H,r as oe,Y as Oe,z as ze}from"./index-D8hCAHx9.js";import"./mui-BBkBdMVO.js";import{a as S}from"./sentry-67DqaLi1.js";import{w as se}from"./withTransactionSidePanel-C7OFQuvJ.js";import{p as ie,c as re}from"./routePaths-XreQojZr.js";import{u as Ge}from"./utils-C7uJ9upL.js";import{d as b}from"./decodeURIComponentSafe-HZX6LUOb.js";import{Z as we}from"./ZeniAccountStatementScreen-Dafm8AUT.js";import"./recharts-BzjcN9SN.js";import"./analytics-B35UERag.js";import"./plaid-DHvUog4a.js";import"./dnd-CTNaOehy.js";import"./stripe-DMRn4zHo.js";import"./lottie-DG71PfmK.js";import"./lexical-BDpP_OMn.js";import"./pdf-Cp8DoYAG.js";import"./useAskAiCfoHostNavButtonProps-CDnIxewv.js";import"./TransactionDetailScreen-BSarw1vq.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]="d6fa37c8-4f8d-4787-ad25-d8b0c43ed0cd",a._sentryDebugIdIdentifier="sentry-dbid-d6fa37c8-4f8d-4787-ad25-d8b0c43ed0cd")}catch{}})();const _e=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],J=a=>Ge(a),$e=X(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=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=de.getLocalizedStrings(),l=J(e.selectedAccount.tranListType),u=Ne(t,n,c,l,e.bookCloseDate);G.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:u},type:J(e.selectedAccount.tranListType)})),a(De(l,p(u),!1,l==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(p(u))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:J(e.selectedAccount.tranListType)}))}}})(ce),N=se(function({...a}){const e=K(),t=q(),n=Q(),c=t.pathname.split("/").find(r=>_e.includes(r)),o=c??"uncategorized-expense",{tenantEmailDomain:l}=W(),u=de.getLocalizedStrings(),{accountType:m,title:D,subTitle:y}=Re(o),A="month",I=h(r=>U(r)),f=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:g}=Z(),{isFeatureEnabled:k}=g(_.isProjectsTransactionsEnabled),x=h(r=>ee(r))&&k,{dataAvailable:F,initialTimeframeTick:v}=Ve(o,f,I.bookCloseDate),[C,E]=S.useState(!1),[B,O]=S.useState(void 0),T=S.useMemo(()=>{const r=p(v);return{tranListType:o,accountType:te(m),title:D,subTitle:y,timeframe:A,period:r}},[o,A,m,F]);S.useEffect(()=>{if(!C&&T!=null){E(!0),G.trackTransactionList(void 0,void 0,void 0,T.title);const r=J(T.tranListType);n(De(r,T.period,!0,r==="missingReceipts"?u.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[C,T,n]);let M=T;return T!=null&&B!=null&&(M={...T,period:B}),c==null||M==null?s.jsx(w,{to:"../"}):s.jsx($e,{firstMonthOfFY:f,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:F,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:I.bookCloseDate,onSelectedTimePeriodChange:r=>O(r),...a})}),Re=a=>{let e="",t="";const n=de.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},Ve=(a,e,t)=>{const n=le();let c=le().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:ie(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ne=(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},Je=X(function(a,e){const t=Ee(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:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Se();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)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ye(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=re(t,e.tenantEmailDomain),c=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ce),He=se(function({referrerType:a,...e}){const t=K(),n=q(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,classIdEncoded:m,timeframe:D,startDate:y,endDate:A,titleEncoded:I}=W(),f=b(l??""),g=b(u??""),k=b(m??""),x=b(I??""),F=h(d=>ve(d.transactionListState,g,f,k)),[v,C]=S.useState(!1),[E,B]=S.useState(void 0),O=h(d=>U(d)),T=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=Z(),{isFeatureEnabled:r}=M(_.isProjectsTransactionsEnabled),$=h(d=>ee(d))&&r;let i;const z=qe(f,g,k,D,y,A,x);if(z){const d={startDate:Y(y,"YYYY-MM-DD"),endDate:Y(A,"YYYY-MM-DD")},R=Ue(F?.dateRange,d);i={accountId:g,accountType:te(f),classId:k,title:x,timeframe:D,period:R}}S.useEffect(()=>{v||i==null||(C(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))},[v,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const V=[l,u,m,D,y,A,I].filter(d=>d!=null);return z&&L!=null?s.jsx(Je,{firstMonthOfFY:T,tenantEmailDomain:o,location:n,navigate:t,showProjectField:$,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>B(d),...e}):s.jsx(w,{to:Se(V.length)})}),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},qe=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,Ue=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),Ze=X(function(a,e){const t=xe(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:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??he();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)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(Ae(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=re(t,e.tenantEmailDomain),c=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}})(ce),Ke=se(function({referrerType:a,...e}){const t=K(),n=q(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,projectIdEncoded:m,timeframe:D,startDate:y,endDate:A,titleEncoded:I}=W(),f=b(l??""),g=b(u??""),k=b(m??""),x=b(I??""),F=h(d=>je(d.transactionListState,g,f,k)),[v,C]=S.useState(!1),[E,B]=S.useState(void 0),O=h(d=>U(d)),T=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=Z(),{isFeatureEnabled:r}=M(_.isProjectsTransactionsEnabled),$=h(d=>ee(d))&&r;let i;const z=Qe(f,g,k,D,y,A,x);if(z){const d={startDate:Y(y,"YYYY-MM-DD"),endDate:Y(A,"YYYY-MM-DD")},R=We(F?.dateRange,d);i={accountId:g,accountType:te(f),projectId:k,title:x,timeframe:D,period:R}}S.useEffect(()=>{v||i==null||(C(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))},[v,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const V=[l,u,m,D,y,A,I].filter(d=>d!=null);return z&&L!=null?s.jsx(Ze,{firstMonthOfFY:T,tenantEmailDomain:o,location:n,navigate:t,showProjectField:$,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>B(d),...e}):s.jsx(w,{to:he(V.length)})}),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Qe=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,We=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),Xe=X(function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Fe(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ie();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)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(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=re(t,e.tenantEmailDomain),c=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=at(e.tenantEmailDomain),n=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ce),Te=se(function({referrerType:a,...e}){const t=K(),n=q(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,timeframe:m,startDate:D,endDate:y,titleEncoded:A,excludeSubAccounts:I}=W(),f=b(l??""),g=b(u??""),k=b(A??""),x=!(I!=null&&I==="exclude_subaccounts"),F=h(P=>Me(P.transactionListState,g,f)),[v,C]=S.useState(!1),[E,B]=S.useState(void 0),O=h(P=>U(P)),T=O.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=O.company?.companyInfo.firstMonthOfFY??1;let r;const $=et(f,g,m,D,y,k);if($){const P={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},Ye=tt(F?.dateRange,P);r={accountId:g,accountType:te(f),title:k,timeframe:m,period:Ye}}let i=r;r!=null&&E!=null&&(i={...r,period:E});const{useFeatureGate:z}=Z(),{isFeatureEnabled:L}=z(_.isTransactionCommentingEnabled),{isFeatureEnabled:V}=z(_.isProjectsTransactionsEnabled),d=h(P=>ee(P))&&V,{areTenantIdsInSync:R}=Oe();S.useEffect(()=>{!v&&r!=null&&R&&(C(!0),G.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))},[v,r,c,R]);const ke=[l,u,m,D,y,A].filter(P=>P!=null);return $&&i!=null?s.jsx(Xe,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:T,isTransactionCommentingEnabled:L,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:P=>B(P),...e}):s.jsx(w,{to:Ie(ke.length)})}),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},et=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,tt=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),at=a=>`/${a}/transactions/${Ce}/statements`;function Yt(){const a=q().state?.referrer,e=ze.getSignedInUser(),t=Be(e),{useFeatureGate:n}=Z(),{isFeatureEnabled:c}=n(_.isExpenseAutomationEnabled),o=h(m=>m.expenseAutomationViewState.selectedPeriodByTenantId)[h(m=>U(m)).tenantId],{isFeatureEnabled:l}=n(_.isExpenseAutomationEnabledV2),u=l||c&&t;return s.jsxs(Pe,{children:[s.jsx(j,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/zeni-clearing-account/statements",element:s.jsx(we,{})}),s.jsx(j,{path:"/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/uncategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:u?s.jsx(w,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:u?s.jsx(w,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/missing-receipts/*",element:u?s.jsx(w,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(He,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ke,{referrerType:a})})]})}export{Yt as default};
|
|
1
|
+
import{j as s}from"./liveblocks-Do-nuGO9.js";import{h as W,g as q,u as K,i as Q,j as h,N as w,n as X,o as Pe,p as j}from"./core-CAUatE6D.js";import{eP as U,py as ee,j0 as p,OY as te,Hq as De,bq as le,OZ as be,jD as ae,K$ as ne,O_ as ue,O$ as ve,bE as Y,Hm as ye,P0 as Ee,P1 as me,P2 as je,Hn as Ae,P3 as xe,P4 as pe,P5 as Me,P6 as ge,P7 as Le,P8 as Fe,P9 as fe,ID as Ce,bn as Be}from"./zeni-epic-state-Cb-J9Nxh.js";import{D as de,w as Z,I as _,c as G,cd as ce,m as H,p as oe,W as Oe,z as ze}from"./index-ssCDruz8.js";import"./mui-Ee2kkUYC.js";import{a as S}from"./sentry-CpVyi-77.js";import{w as se}from"./withTransactionSidePanel-DKaQybw-.js";import{p as ie,c as re}from"./routePaths-C0HYOQUJ.js";import{u as Ge}from"./utils-Bgxe0MRZ.js";import{d as b}from"./decodeURIComponentSafe-M2sJXq9C.js";import{Z as we}from"./ZeniAccountStatementScreen-Dmd7_0nF.js";import"./recharts-DfwJcvGU.js";import"./analytics-CztvM7Zo.js";import"./plaid-BfqKUq3C.js";import"./dnd-DoUvAW-O.js";import"./stripe-DMRn4zHo.js";import"./lottie-DhqFkmtq.js";import"./lexical-B4m6CLZ0.js";import"./pdf-DGClrODY.js";import"./useAskAiCfoHostNavButtonProps-BiHuzfAQ.js";import"./TransactionDetailScreen-B3uLE8LG.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]="811471e4-f07c-4d49-b210-7790419f5b3f",a._sentryDebugIdIdentifier="sentry-dbid-811471e4-f07c-4d49-b210-7790419f5b3f")}catch{}})();const _e=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],J=a=>Ge(a),$e=X(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=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=de.getLocalizedStrings(),l=J(e.selectedAccount.tranListType),u=Ne(t,n,c,l,e.bookCloseDate);G.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:u},type:J(e.selectedAccount.tranListType)})),a(De(l,p(u),!1,l==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(p(u))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:J(e.selectedAccount.tranListType)}))}}})(ce),N=se(function({...a}){const e=W(),t=q(),n=K(),c=t.pathname.split("/").find(r=>_e.includes(r)),o=c??"uncategorized-expense",{tenantEmailDomain:l}=Q(),u=de.getLocalizedStrings(),{accountType:m,title:D,subTitle:y}=Re(o),A="month",I=h(r=>U(r)),f=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:g}=Z(),{isFeatureEnabled:k}=g(_.isProjectsTransactionsEnabled),x=h(r=>ee(r))&&k,{dataAvailable:F,initialTimeframeTick:v}=Ve(o,f,I.bookCloseDate),[C,E]=S.useState(!1),[B,O]=S.useState(void 0),T=S.useMemo(()=>{const r=p(v);return{tranListType:o,accountType:te(m),title:D,subTitle:y,timeframe:A,period:r}},[o,A,m,F]);S.useEffect(()=>{if(!C&&T!=null){E(!0),G.trackTransactionList(void 0,void 0,void 0,T.title);const r=J(T.tranListType);n(De(r,T.period,!0,r==="missingReceipts"?u.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[C,T,n]);let M=T;return T!=null&&B!=null&&(M={...T,period:B}),c==null||M==null?s.jsx(w,{to:"../"}):s.jsx($e,{firstMonthOfFY:f,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:F,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:I.bookCloseDate,onSelectedTimePeriodChange:r=>O(r),...a})}),Re=a=>{let e="",t="";const n=de.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},Ve=(a,e,t)=>{const n=le();let c=le().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:ie(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ne=(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},Je=X(function(a,e){const t=Ee(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:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Se();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)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ye(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=re(t,e.tenantEmailDomain),c=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ce),He=se(function({referrerType:a,...e}){const t=W(),n=q(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,classIdEncoded:m,timeframe:D,startDate:y,endDate:A,titleEncoded:I}=Q(),f=b(l??""),g=b(u??""),k=b(m??""),x=b(I??""),F=h(d=>ve(d.transactionListState,g,f,k)),[v,C]=S.useState(!1),[E,B]=S.useState(void 0),O=h(d=>U(d)),T=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=Z(),{isFeatureEnabled:r}=M(_.isProjectsTransactionsEnabled),$=h(d=>ee(d))&&r;let i;const z=qe(f,g,k,D,y,A,x);if(z){const d={startDate:Y(y,"YYYY-MM-DD"),endDate:Y(A,"YYYY-MM-DD")},R=Ue(F?.dateRange,d);i={accountId:g,accountType:te(f),classId:k,title:x,timeframe:D,period:R}}S.useEffect(()=>{v||i==null||(C(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))},[v,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const V=[l,u,m,D,y,A,I].filter(d=>d!=null);return z&&L!=null?s.jsx(Je,{firstMonthOfFY:T,tenantEmailDomain:o,location:n,navigate:t,showProjectField:$,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>B(d),...e}):s.jsx(w,{to:Se(V.length)})}),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},qe=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,Ue=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),Ze=X(function(a,e){const t=xe(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:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??he();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)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(Ae(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=re(t,e.tenantEmailDomain),c=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}})(ce),We=se(function({referrerType:a,...e}){const t=W(),n=q(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,projectIdEncoded:m,timeframe:D,startDate:y,endDate:A,titleEncoded:I}=Q(),f=b(l??""),g=b(u??""),k=b(m??""),x=b(I??""),F=h(d=>je(d.transactionListState,g,f,k)),[v,C]=S.useState(!1),[E,B]=S.useState(void 0),O=h(d=>U(d)),T=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=Z(),{isFeatureEnabled:r}=M(_.isProjectsTransactionsEnabled),$=h(d=>ee(d))&&r;let i;const z=Ke(f,g,k,D,y,A,x);if(z){const d={startDate:Y(y,"YYYY-MM-DD"),endDate:Y(A,"YYYY-MM-DD")},R=Qe(F?.dateRange,d);i={accountId:g,accountType:te(f),projectId:k,title:x,timeframe:D,period:R}}S.useEffect(()=>{v||i==null||(C(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))},[v,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const V=[l,u,m,D,y,A,I].filter(d=>d!=null);return z&&L!=null?s.jsx(Ze,{firstMonthOfFY:T,tenantEmailDomain:o,location:n,navigate:t,showProjectField:$,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>B(d),...e}):s.jsx(w,{to:he(V.length)})}),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ke=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,Qe=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),Xe=X(function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Fe(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ie();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)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(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=re(t,e.tenantEmailDomain),c=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=at(e.tenantEmailDomain),n=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ce),Te=se(function({referrerType:a,...e}){const t=W(),n=q(),c=K(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,timeframe:m,startDate:D,endDate:y,titleEncoded:A,excludeSubAccounts:I}=Q(),f=b(l??""),g=b(u??""),k=b(A??""),x=!(I!=null&&I==="exclude_subaccounts"),F=h(P=>Me(P.transactionListState,g,f)),[v,C]=S.useState(!1),[E,B]=S.useState(void 0),O=h(P=>U(P)),T=O.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=O.company?.companyInfo.firstMonthOfFY??1;let r;const $=et(f,g,m,D,y,k);if($){const P={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},Ye=tt(F?.dateRange,P);r={accountId:g,accountType:te(f),title:k,timeframe:m,period:Ye}}let i=r;r!=null&&E!=null&&(i={...r,period:E});const{useFeatureGate:z}=Z(),{isFeatureEnabled:L}=z(_.isTransactionCommentingEnabled),{isFeatureEnabled:V}=z(_.isProjectsTransactionsEnabled),d=h(P=>ee(P))&&V,{areTenantIdsInSync:R}=Oe();S.useEffect(()=>{!v&&r!=null&&R&&(C(!0),G.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))},[v,r,c,R]);const ke=[l,u,m,D,y,A].filter(P=>P!=null);return $&&i!=null?s.jsx(Xe,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:T,isTransactionCommentingEnabled:L,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:P=>B(P),...e}):s.jsx(w,{to:Ie(ke.length)})}),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},et=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,tt=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),at=a=>`/${a}/transactions/${Ce}/statements`;function Yt(){const a=q().state?.referrer,e=ze.getSignedInUser(),t=Be(e),{useFeatureGate:n}=Z(),{isFeatureEnabled:c}=n(_.isExpenseAutomationEnabled),o=h(m=>m.expenseAutomationViewState.selectedPeriodByTenantId)[h(m=>U(m)).tenantId],{isFeatureEnabled:l}=n(_.isExpenseAutomationEnabledV2),u=l||c&&t;return s.jsxs(Pe,{children:[s.jsx(j,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/zeni-clearing-account/statements",element:s.jsx(we,{})}),s.jsx(j,{path:"/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/uncategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:u?s.jsx(w,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:u?s.jsx(w,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/missing-receipts/*",element:u?s.jsx(w,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(He,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(We,{referrerType:a})})]})}export{Yt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-
|
|
1
|
+
import{j as e}from"./liveblocks-Do-nuGO9.js";import{h as U,g as B,u as P,i as N,j as f,N as L,n as V,o as Ie,p as k}from"./core-CAUatE6D.js";import{cm as M,eP as D,NJ as R,DP as ae,fh as H,Dx as ne,NL as Te,DS as we,NH as Ce,NI as se,N_ as ke,BZ as be,sM as je,NN as Ae,E1 as Ee,NK as re,cO as W,wU as oe,eY as ve,e_ as De,OV as Fe,OW as Le,Dy as Ue,OX as Be,Dz as Pe,DI as Re,bt as Oe,bF as Ne,cx as Ve,bG as Me,cl as _e,fg as ze,bs as Ge,Jn as $e,ck as qe}from"./zeni-epic-state-Cb-J9Nxh.js";import{k as _,aq as He,z as A,V as z,c as b,c6 as We,c7 as Ke,c8 as q,K,h as Ze,W as Je,Y as Ye,w as ie,I as v,r as Xe,B as Qe,c9 as et,at as Z,m as tt,ca as at,p as J,cb as nt,T as X,cc as st,a9 as rt}from"./index-ssCDruz8.js";import{D as ot,n as O,S as it}from"./mui-Ee2kkUYC.js";import ct from"./NotFoundScreen-BbD7D-7R.js";import{S as Q}from"./SetupPagesScreen-A0QZWQlp.js";import{a as d}from"./sentry-CpVyi-77.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-BiHuzfAQ.js";import{u as ut}from"./useInitialThreadRequest-DnRRNYgw.js";import{M as ce}from"./MobileAppDrawer-6SipHCGH.js";import{F as dt}from"./FeaturePreviewScreen-CKIBiLol.js";import{a as ee}from"./analyticsHelper-DidHWGct.js";import"./recharts-DfwJcvGU.js";import"./analytics-CztvM7Zo.js";import"./plaid-BfqKUq3C.js";import"./dnd-DoUvAW-O.js";import"./stripe-DMRn4zHo.js";import"./lottie-DhqFkmtq.js";import"./lexical-B4m6CLZ0.js";import"./pdf-DGClrODY.js";import"./utils-Bgxe0MRZ.js";import"./routePaths-C0HYOQUJ.js";import"./BusinessVerificationPageScreen-Bgww5Eni.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]="afc3bcc8-56f0-44bb-8d46-ec554da075a5",t._sentryDebugIdIdentifier="sentry-dbid-afc3bcc8-56f0-44bb-8d46-ec554da075a5")}catch{}})();const pt=V(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(t,n),analytics:b}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(we(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Te(r))}}})(We);function mt(){const t=U(),a=B(),n=P(),{tenantEmailDomain:o}=N(),p=_(),r=f(C=>C.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=He(r),s=M(p?.loggedInUserRoleMap),[l,i]=d.useState(!1),[g,w]=d.useState(!1),[u,c]=d.useState(!1),h=f(C=>D(C)),y=A.getSignedInUserTenant(o)?.companyId??h.companyId,I=A.getSignedInUser(),S=f(C=>R(C,y)),T=f(C=>C.treasurySetupViewState.fetchState),x=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(I==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{l||T!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))},[l,T,y,n]),d.useEffect(()=>{u||F!=="Not-Started"||y==null||(c(!0),n(H()))},[u,F,y,n]),d.useEffect(()=>{g||x!=="Not-Started"||y==null||(w(!0),n(ne()))},[g,x,y,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(L,{to:"../promo"});const E=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||T!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:b})]})}const ft=V(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{q(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{q(a.analytics,"confirm",r,m,"Transfer"),t(Ee())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(je("treasury_setup",s))},onEstablishConnectionClick:s=>{t(be(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Ke),yt=({isFirstTransfer:t})=>{const a=U(),{tenantEmailDomain:n}=N(),o=P(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[l,i]=d.useState(!1),[g,w]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),c=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),y=f(x=>D(x)),I=A.getSignedInUserTenant(n)?.companyId??y.companyId,S=f(x=>Ce(x)),T=f(x=>R(x,I));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||I==null||(s(!0),o(ae(I,!0,!1)))},[m,u,I,o]),d.useEffect(()=>{l||c!=="Not-Started"||I==null||(i(!0),o(H()))},[l,c,I,o]),d.useEffect(()=>{g||h!=="Not-Started"||I==null||(w(!0),o(ne()))},[g,h,I,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(ft,{analytics:b,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:y,treasurySetupView:T,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{q(b,"review",S.treasuryTransferMoneyLocalData,T.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=O.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,11 +6,11 @@ import{j as e}from"./liveblocks-BSDLCmF2.js";import{h as U,g as P,u as B,i as O,
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${t=>t.theme.colors.grey4};
|
|
9
|
-
`,ht={overlayWidth:new Xe(100,100,48)},St=
|
|
9
|
+
`,ht={overlayWidth:new Xe(100,100,48)},St=V(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:R(t,o),downloadEndPoint:`${Z.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:o,location:p,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:l=>{let i="page-not-found";l==="editPortfolio"?i=xt(s):l==="statements"?i=It(s):l==="taxLetter"?i=Tt(s):l==="settings"&&(i=wt(s));const g=tt(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:g}})},onColumnSortConfigChanged:(l,i)=>{t(Fe({uiState:{sortKey:l,sortOrder:i}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}})(et);function $({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=B(),o=U(),p=P(),r=K(),m=Ze(),s=f(j=>D(j)),{tenantEmailDomain:l}=N(),i=s.companyId??A.getSignedInUserTenant(l)?.companyId,[g,w]=d.useState(!1),u=f(j=>re(j)),c=u.fetchState,h=u.accountSummary?.totalBalance?.amount,y=f(j=>j.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),I=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),T=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=M(S?.loggedInUserRoleMap),F=W(S?.loggedInUserRoleMap),{areTenantIdsInSync:E}=Je();d.useEffect(()=>{c==="Not-Started"&&!g&&E&&(w(!0),p(oe(!0)))},[g,p,c,E]),d.useEffect(()=>{u.transactionsFetchState.fetchState==="Completed"&&u.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[u.transactionsFetchState.fetchState,u.transactions.length]);const C=()=>{o("..")},[le,ue]=d.useState(!1),Y=j=>{ue(j)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=lt({mobileExploreReferrer:"Treasury"});Ye({isDataReady:c==="Completed"});const{useFeatureGate:G}=ie(),{isFeatureEnabled:me}=G(v.isDebitCardFeatureEnabled),{isFeatureEnabled:fe}=G(v.isAutoTransferRuleEnabled),{isFeatureEnabled:ye}=G(v.isTreasuryCommentingEnabled),ge=ut(i,{clearParams:c==="Completed"&&y?.fetchState==="Completed"}),he=ve(s),Se=De(me,s);if(he===!0&&Se!==!0)return e.jsx(dt,{});if(I){const j=y?.fetchState!=="Completed"||u.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[u.accountSummaryFetchState.fetchState==="Completed"&&y?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:b,onLoad:()=>{}}):null,e.jsx(ot,{onClose:C,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:ht.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(Ct,{onClick:xe=>xe.stopPropagation(),children:[t===!0?e.jsx(yt,{isFirstTransfer:u.transactions.length===0||h===0}):null,a===!0?e.jsx(mt,{}):null]})}),e.jsxs(gt,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:Y}),e.jsx(St,{treasuryDetailsView:u,isAutoTransferRuleEnabled:fe,navigate:o,currentTenant:s,location:n,companyId:i,analytics:b,isTreasuryCommentingEnabled:ye,handleDrawerToggle:Y,initialOpenThreadRequest:ge,isLoading:j,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return T&&x?e.jsx(L,{to:"../setup"}):s.companyTreasuryInfo?.info&&!T&&F?e.jsx(L,{to:"../promo",state:n.state}):e.jsx(Qe,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const xt=t=>`/${t}/treasury/edit-portfolio`,It=t=>`/${t}/treasury/statements`,Tt=t=>`/${t}/treasury/tax-letter`,wt=t=>`/${t}/treasury/setup`,Ct=O(it)`
|
|
10
10
|
display: flex;
|
|
11
11
|
min-height: 100%;
|
|
12
12
|
flex-direction: column;
|
|
13
|
-
`,kt=
|
|
13
|
+
`,kt=O.div`
|
|
14
14
|
display: flex;
|
|
15
15
|
height: 100vh;
|
|
16
16
|
width: 100%;
|
|
@@ -18,7 +18,7 @@ import{j as e}from"./liveblocks-BSDLCmF2.js";import{h as U,g as P,u as B,i as O,
|
|
|
18
18
|
flex-direction: column;
|
|
19
19
|
align-items: center;
|
|
20
20
|
background-color: ${t=>t.theme.colors.grey4};
|
|
21
|
-
`;function
|
|
21
|
+
`;function bt(){const t=U(),a=P(),n=K(),o=B(),p=`${Z.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(c=>Le(c));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Ue(!1)))},[r,s.fetchState,a]);const l=A.getSignedInUser(),i=f(c=>D(c)),g={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},w=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access statements page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(kt,{windowSize:n,children:e.jsx(at,{currentTenantCompanyName:w,statementListView:s,isLoading:u,onBackClick:()=>{const c=J(o.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const jt=O.div`
|
|
22
22
|
display: flex;
|
|
23
23
|
height: 100vh;
|
|
24
24
|
width: 100%;
|
|
@@ -26,7 +26,7 @@ import{j as e}from"./liveblocks-BSDLCmF2.js";import{h as U,g as P,u as B,i as O,
|
|
|
26
26
|
flex-direction: column;
|
|
27
27
|
align-items: center;
|
|
28
28
|
background-color: ${t=>t.theme.colors.grey4};
|
|
29
|
-
`;function At(){const t=U(),a=K(),n=
|
|
29
|
+
`;function At(){const t=U(),a=K(),n=B(),o=P(),p=`${Z.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(c=>Be(c));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Pe(!1)))},[r,s.fetchState,o]);const l=A.getSignedInUser(),i=f(c=>D(c)),g={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},w=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access tax letter page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(jt,{windowSize:a,children:e.jsx(nt,{currentTenantCompanyName:w,taxLetterListView:s,isLoading:u,onBackClick:()=>{const c=J(n.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const Et=V(function(t,a){const{companyId:n}=a,o=R(t,n);return{treasurySetupView:o,isSetupComplete:o.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk",meetingUrl:"https://meetings.hubspot.com/yoshi-araki/treasury-product-schedule-demo-link?embed=true"}},function(t,a){const{navigate:n,companyId:o}=a;return{onSetupButtonClick:()=>{t(Re(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(st),vt=()=>{const t=U(),a=B(),n=P(),{tenantEmailDomain:o}=N(),[p,r]=d.useState(!1),m=f(S=>D(S)),[s,l]=d.useState(!1),i=f(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);d.useEffect(()=>{s||i?.fetchState!=="Not-Started"||g==null||(l(!0),n(H()))},[i,n]);const g=A.getSignedInUserTenant(o)?.companyId??m.companyId,w=A.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,c=S=>{r(S)};if(w==null)throw Error("Can't access treasury promo page without signing in...");const h=_(),y=M(h?.loggedInUserRoleMap),I=W(h?.loggedInUserRoleMap);if(u&&y)return e.jsx(L,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&y||I)){if(a.state?.message==="activation"){const S=J(a.state?.pathnameStackToGoBack);t(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:S.newStack}})}return i?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:S=>(T=>T.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:c}),e.jsx(Et,{analytics:b,navigate:t,companyId:g,onClickMenuIcon:()=>{c(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=O.div`
|
|
30
30
|
display: flex;
|
|
31
31
|
width: 100%;
|
|
32
32
|
height: 100%;
|
|
@@ -34,4 +34,4 @@ import{j as e}from"./liveblocks-BSDLCmF2.js";import{h as U,g as P,u as B,i as O,
|
|
|
34
34
|
justify-content: center;
|
|
35
35
|
align-items: center;
|
|
36
36
|
background-color: ${t=>t.theme.colors.grey5};
|
|
37
|
-
`;function ea(){const t=
|
|
37
|
+
`;function ea(){const t=B(),a=f(E=>D(E)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(v.isTreasuryEnabled),p=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=W(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Oe(a?.userRole),l=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Ne(r?.loggedInUserRoleMap),i=Ve(r?.loggedInUserRoleMap),g=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&Me(r?.loggedInUserRoleMap),{isFeatureEnabled:w}=n(v.isDepositAccountsFeatureEnabled),u=w&&!s&&_e(r?.loggedInUserRoleMap),c=a.company!=null&&ze(a.company),h=o&&c===!0&&!s&&M(r?.loggedInUserRoleMap),{isFeatureEnabled:y}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:I}=n(v.isDebitCardFeatureEnabled),S=rt(a,y,I)&&!s&&Ge(r?.loggedInUserRoleMap),T=$e(r?.loggedInUserRoleMap),x=qe(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(Ie,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(Q,{isBillPayAdminLevelAccess:l,isReimbursementAdminLevelAccess:g,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:T,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(Q,{isBillPayAdminLevelAccess:l,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:g,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:T,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(vt,{})}),e.jsx(k,{path:"statements",element:e.jsx(bt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(At,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx($,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),h?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx($,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx($,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(ct,{})})]}):p&&h?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{ea as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-
|
|
1
|
+
import{j as l}from"./liveblocks-Do-nuGO9.js";import{a as g}from"./sentry-CpVyi-77.js";import{h as J,g as Y,i as U,j as S,n as K,u as z,o as at,p as B,N as G}from"./core-CAUatE6D.js";import{eP as V,Kp as Ee,Kq as Re,fT as X,cs as Ie,ct as be,vt as St,Kr as nt,vx as zt,Iu as ee,jD as te,vr as Yt,vl as qt,Ks as Ne,vd as Ht,vc as Wt,v6 as Qt,vi as Zt,vy as Xt,Kt as he,Ku as Me,ve as ea,Kv as pe,f3 as ft,vN as gt,vG as vt,Kw as xt,op as Tt,vB as yt,vz as Dt,Kx as Ct,vU as Et,vR as It,vC as bt,vT as Je,GR as kt,Ky as ta,Kz as aa,cv as na,KA as sa,KB as oa,KC as me,KD as ie,KE as ke,Iv as Ke,w7 as ye,It as De,vW as wt,vu as Ge,KF as la,Iw as H,KG as $e,vo as ia,KH as ca,KI as da,KJ as ze,KK as Ye,KL as qe,KM as He,w1 as we,KN as At,vK as jt,KO as ra,KP as ua,KQ as ha,KR as pa,KS as ma,KT as Sa,KU as fa,KV as ga,sY as va,sZ as xa,HA as je,KW as Ta,KX as ya,j0 as Fe,bq as Da,KY as Ca,KZ as Ea,kB as Ia,kK as ba,Hz as Le,bE as st,K_ as Ft,He as Lt,K$ as ka,L0 as wa,L1 as Aa,kM as ja,L2 as ot,L3 as lt,L4 as it,L5 as ct,L6 as Fa,kI as La,L7 as Pa,kL as _a,L8 as Va,L9 as Pt,HW as _t,j$ as Ba,La as Oa,Lb as Pe,Lc as Vt,HU as Bt,yk as Ua,Ld as Ra,Le as Na,kj as Ot,Lf as Ma,Lg as Ja,I6 as Ka,qx as Ga,Lh as Ut,Li as dt,I3 as _e,Lj as rt,Lk as $a,I8 as za,Ll as Ya,Lm as qa,Ln as Ha,Lo as Wa,Lp as Qa,qA as Za,Lq as Xa,Ix as en,Lr as tn,HN as Ve,gM as an,Ls as nn,Lt as sn,gK as on,Lu as ln,Lv as cn,yo as dn,Lw as rn,Lx as un,Ly as hn,Lz as pn,k3 as mn,bn as Sn,e_ as fn,eY as gn}from"./zeni-epic-state-Cb-J9Nxh.js";import{z as R,aq as Be,B as Rt,V as Q,c as j,a2 as Z,aw as vn,m as M,D as Ce,F as ce,ax as We,ay as xn,az as Tn,p as Qe,aA as yn,h as Dn,K as de,r as Ze,w as ae,I as $,aB as Cn,i as Xe,Y as Se,aC as En,aD as Nt,W as In,aE as bn,k as kn,aF as wn,at as Mt,aG as An,o as W,S as jn,v as Jt,x as Fn,aH as Ln,aI as Pn,e as et,aJ as _n,aK as Vn,Q as Bn,aL as On,aM as Un}from"./index-ssCDruz8.js";import{n as N,D as Rn,S as Kt}from"./mui-Ee2kkUYC.js";import{t as Nn,A as Mn}from"./AddressScreen-Bg11cvW7.js";import le from"./NotFoundScreen-BbD7D-7R.js";import{F as Jn}from"./FeaturePreviewScreen-CKIBiLol.js";import{c as q,v as tt,d as Kn}from"./routePaths-C0HYOQUJ.js";import{p as Gt}from"./pathToGoBack-m6LhD1oT.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-BiHuzfAQ.js";import{M as ge}from"./MobileAppDrawer-6SipHCGH.js";import{D as Gn}from"./DrawerScreen-Cme8vixt.js";import{g as $n,m as zn}from"./accountMappingHelper-CoDQ683a.js";import"./recharts-DfwJcvGU.js";import"./analytics-CztvM7Zo.js";import"./plaid-BfqKUq3C.js";import"./dnd-DoUvAW-O.js";import"./stripe-DMRn4zHo.js";import"./lottie-DhqFkmtq.js";import"./lexical-B4m6CLZ0.js";import"./pdf-DGClrODY.js";import"./utils-Bgxe0MRZ.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]="21cb6c72-b55e-41a4-9abe-301c46f81b1f",e._sentryDebugIdIdentifier="sentry-dbid-21cb6c72-b55e-41a4-9abe-301c46f81b1f")}catch{}})();const Yn=Ce.getLocalizedStrings(),qn=K(function(e,a){const s=Re(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(zt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=M(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(vn),Hn=({setShouldNavigateBack:e})=>{const a=J(),s=Y(),{scheduleDetailId:t,tenantEmailDomain:n}=U(),{scheduleType:o}=U();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>V(f)),r=Ee(o)??"accrued_expenses",h=R.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Re(f,r)),m=i.selectedJELinkRowIndex,d=S(f=>X(f,c.companyId)),u=Be(i.updateStatus.fetchState);g.useEffect(()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[u,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const p=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Rt,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(Q,{analytics:j,onLoad:()=>{Wn(i,r,d)}}):null,l.jsx(qn,{signedInUser:h,attachmentEndPoint:`${Z}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:j,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},$t=e=>{const a=Yn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Wn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some(m=>m.isRecommendedTransaction===!0),h=Ie(s.controllers),i=be(s.controllerUserIds);t!=null&&j.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...$t(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Qn=N.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{j as o}from"./liveblocks-Do-nuGO9.js";import{a as f}from"./sentry-CpVyi-77.js";import{s as u,u as h,j as y,N as I}from"./core-CAUatE6D.js";import{JG as b,eW as w,zF as x}from"./zeni-epic-state-Cb-J9Nxh.js";import{z as l,B as j,v as S,x as v}from"./index-ssCDruz8.js";import{n as c}from"./mui-Ee2kkUYC.js";import"./recharts-DfwJcvGU.js";import"./analytics-CztvM7Zo.js";import"./plaid-BfqKUq3C.js";import"./dnd-DoUvAW-O.js";import"./stripe-DMRn4zHo.js";import"./lottie-DhqFkmtq.js";import"./lexical-B4m6CLZ0.js";import"./pdf-DGClrODY.js";import"./utils-Bgxe0MRZ.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]="a86558e8-387f-4a3f-bd12-1c3c83e3ec75",e._sentryDebugIdIdentifier="sentry-dbid-a86558e8-387f-4a3f-bd12-1c3c83e3ec75")}catch{}})();const R=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",p=e.get("profileId")??"",[n,g]=f.useState(!1),a=h(),s=y(m=>b(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(i);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(g(!0),a(x(t,p,i)))},[n,a]),s.fetchState==="Error"?o.jsx(D,{children:o.jsx(E,{children:s.error?.message??""})}):(s.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},D=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
|
+
`,E=c(v.LargeRegular)`
|
|
10
|
+
display: flex;
|
|
11
|
+
color: ${S.important};
|
|
12
|
+
`;export{R as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-
|
|
1
|
+
import{j as n}from"./liveblocks-Do-nuGO9.js";import{h as Y,g as K,u as z,i as G,j as w,n as q,N as ne,o as Ve,p as k}from"./core-CAUatE6D.js";import{eP as M,OA as Ce,OB as $e,cl as te,cm as Ne,fg as Ge,wS as ke,B3 as Ze,wM as Tn,OC as On,OD as Bn,wP as Fn,wW as fe,wJ as Rn,wG as Ln,Nm as le,OE as Un,En as zn,Ks as Mn,Ep as _n,kk as Oe,OF as Vn,qc as He,q0 as We,kb as Ye,ke as Be,Kt as Fe,Ku as $n,OG as Nn,kd as Gn,kA as Zn,k2 as Hn,iB as Wn,iA as Yn,OH as Kn,OI as ye,E4 as qn,OJ as Jn,OK as Qn,Nf as we,OL as Re,OM as Xn,EA as et,N_ as nt,BZ as Ke,sM as qe,ON as tt,Ex as at,OO as Je,cM as Ae,EE as Qe,fh as ot,eY as Xe,e_ as De,EC as st,BT as rt,Eu as it,OP as en,OQ as nn,E6 as tn,Eg as Le,OR as ct,Ea as lt,OS as dt,NO as ut,EF as pt,bt as mt,bF as ht,cx as gt,bG as ft,bs as yt,Jn as xt}from"./zeni-epic-state-Cb-J9Nxh.js";import{k as ae,w as $,z as D,I as O,h as _,B as de,bW as Ct,a2 as Ie,K as V,r as J,p as an,aq as kt,af as Ue,c as R,bX as wt,at as Se,bY as At,V as ue,bZ as Dt,e as be,aN as W,b_ as It,W as St,Y as on,ac as bt,b$ as ze,c0 as Et,m as ee,c1 as vt,c2 as Pt,c3 as jt,c4 as Tt,a9 as Ot,o as Bt}from"./index-ssCDruz8.js";import{n as L,D as Q,S as X}from"./mui-Ee2kkUYC.js";import ce from"./NotFoundScreen-BbD7D-7R.js";import{S as Me}from"./SetupPagesScreen-A0QZWQlp.js";import{F as sn}from"./FeaturePreviewScreen-CKIBiLol.js";import{a as u}from"./sentry-CpVyi-77.js";import{M as pe}from"./MobileAppDrawer-6SipHCGH.js";import{A as Ft,D as Rt,V as Lt}from"./DomesticWireDetailScreen-CdWlbEyV.js";import{A as Ut}from"./AddressScreen-Bg11cvW7.js";import{u as rn}from"./useAskAiCfoHostNavButtonProps-BiHuzfAQ.js";import{Z as zt}from"./ZeniAccountStatementScreen-Dmd7_0nF.js";import"./recharts-DfwJcvGU.js";import"./analytics-CztvM7Zo.js";import"./plaid-BfqKUq3C.js";import"./dnd-DoUvAW-O.js";import"./stripe-DMRn4zHo.js";import"./lottie-DhqFkmtq.js";import"./lexical-B4m6CLZ0.js";import"./pdf-DGClrODY.js";import"./utils-Bgxe0MRZ.js";import"./analyticsHelper-DidHWGct.js";import"./routePaths-C0HYOQUJ.js";import"./BusinessVerificationPageScreen-Bgww5Eni.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]="8dc8a098-6165-4b00-9f69-913f785225cc",e._sentryDebugIdIdentifier="sentry-dbid-8dc8a098-6165-4b00-9f69-913f785225cc")}catch{}})();const Mt=L.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,15 +6,15 @@ import{j as n}from"./liveblocks-BSDLCmF2.js";import{h as Y,g as K,u as _,i as G,
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,
|
|
9
|
+
`,_t=q(function(e){return{autoTransferRuleView:Ce(e),downloadAccountDetailEndPoint:`${Ie}/account_details`,transferLimit:5e5,depositAccountListView:Ze(e.depositAccountState,e.depositAccountListState)}},function(e,t){const{navigate:s,handleDrawerToggle:o}=t;return{onBackClick:()=>{s("..")},onClickMenuIcon:()=>{o(!0)},onFetchAutoTransferRules:a=>{e(ke(a))},onCreateRule:()=>{e(Ln())},onUpdateRule:a=>{e(fe(a))},onDeleteClick:a=>{e(Rn(a))},onPauseClick:a=>{e(fe(a,!0,!1))},onResumeClick:a=>{e(fe(a,!1,!0))},onActivityClick:(a,r)=>{e(Fn(a,r))},onUpdateRuleLocalData:a=>{e(Bn(a))},clearRuleLocalData:()=>{e(On())},onEditClick:a=>{s(`./${a}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{e(Tn())}}})(Ct);function _e({isEditDrawerOpen:e}){const t=Y(),s=K(),o=z(),a=ae(),{ruleId:r,tenantEmailDomain:d}=G(),{useFeatureGate:c}=$(),[p,m]=u.useState(!1),[x,i]=u.useState(!1),l=w(y=>M(y)),h=w(y=>Ce(y)),C=h?.fetchState??"Not-Started",b=w(y=>$e(y)),g=l?.companyId??D.getSignedInUserTenant(d)?.companyId,A=te(a?.loggedInUserRoleMap)||Ne(a?.loggedInUserRoleMap),{isFeatureEnabled:I}=c(O.isTreasuryEnabled),f=l?.company!=null&&Ge(l.company),S=I&&f,B=D.getSignedInUser(),U=l.tenantId,j={userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:U??""},v=l.companyName;u.useEffect(()=>{!x&&C==="Not-Started"&&g&&(i(!0),o(ke(!0)))},[x,C,g,o]);const E=y=>{m(y)},T=_(),P=!!s.state?.scrollToAddRule;return h?.fetchState!=="Completed"?n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:T.colors.grey5}}):n.jsxs(Mt,{children:[n.jsx(pe,{isAppContentDrawerOpen:p,handleDrawerToggle:E}),n.jsx(_t,{navigate:t,location:s,currentTenant:l,companyName:v,handleDrawerToggle:E,isEditDrawerOpen:e,editingRuleId:r,authParams:j,includeTreasuryOption:S,hasAdminLevelAccess:A,zeniAccountsConfigDetail:b,scrollToAddRule:P})]})}const Vt={overlayWidth:new J(100,100,58)},$t=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=z(),a=_(),r=V();if(D.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(Q,{onClose:()=>{s(!0),o(le())},anchor:"right",open:t,PaperProps:{style:{width:Vt.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Nt,{onClick:d=>d.stopPropagation(),children:n.jsx(Ft,{vendorIdParam:e,accountContext:"express-pay"})})})},Nt=L(X)`
|
|
10
10
|
display: flex;
|
|
11
11
|
min-height: 100%;
|
|
12
12
|
flex-direction: column;
|
|
13
|
-
`,Gt={overlayWidth:new J(100,100,58)},Zt=({isDrawerOpen:e,closeDrawerHandler:t})=>{const s=
|
|
13
|
+
`,Gt={overlayWidth:new J(100,100,58)},Zt=({isDrawerOpen:e,closeDrawerHandler:t})=>{const s=z(),o=_(),a=V();if(D.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(Q,{onClose:()=>{t(!0),s(le())},anchor:"right",open:e,PaperProps:{style:{width:Gt.overlayWidth.valuePercentage(a),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Ht,{onClick:r=>r.stopPropagation(),children:n.jsx(Ut,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Ht=L(X)`
|
|
14
14
|
display: flex;
|
|
15
15
|
min-height: 100%;
|
|
16
16
|
flex-direction: column;
|
|
17
|
-
`,Wt={overlayWidth:new J(100,100,58)},Yt=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=
|
|
17
|
+
`,Wt={overlayWidth:new J(100,100,58)},Yt=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=z(),a=_(),r=V();if(D.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(Q,{onClose:()=>{s(!0),o(le())},anchor:"right",open:t,PaperProps:{style:{width:Wt.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Kt,{onClick:d=>d.stopPropagation(),children:n.jsx(Rt,{vendorIdParam:e,accountContext:"express-pay"})})})},Kt=L(X)`
|
|
18
18
|
display: flex;
|
|
19
19
|
min-height: 100%;
|
|
20
20
|
flex-direction: column;
|
|
@@ -26,15 +26,15 @@ import{j as n}from"./liveblocks-BSDLCmF2.js";import{h as Y,g as K,u as _,i as G,
|
|
|
26
26
|
flex-direction: column;
|
|
27
27
|
align-items: center;
|
|
28
28
|
background-color: ${e=>e.theme.colors.grey4};
|
|
29
|
-
`,Jt=q(function(e,t){const s=
|
|
29
|
+
`,Jt=q(function(e,t){const s=M(e),o=D.getSignedInUser(),a=s.tenantId,r={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:a??""},d=t.expressPayDetails,c=e.entityAutoCompleteState.autoCompleteText.common,p=Mn(e,"common");return{expressPayDetails:d,fileProps:{authParams:r,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:p},analytics:t.analytics}},function(e,t){const{navigate:s}=t;return{onSaveVendor:o=>{e(Yn(o,void 0,void 0,!0))},saveVendorDetailLocalData:(o,a)=>{e(Be({vendorId:a,localData:o}))},saveExpressPayLocalData:o=>{e(Wn({localData:o}))},onVendorSelected:o=>{o!=null&&e(Hn(o,!1))},updateSelectedVendorForCreate:o=>{e(Zn(o))},initializeVendorAddress:()=>{e(Gn())},resetVendorSaveStatus:o=>{e(Nn({vendorId:o}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,a)=>{o.trim().length>=2?e($n({searchString:o,entityType:a,searchOrigin:"common"})):o.trim().length===0&&e(Fe("common"))},onCancelAutoComplete:()=>{e(Fe("common"))}},chooseNewVendor:o=>{e(Be({localData:{vendorName:o}}))},onClickAddAccount:o=>{o.method.toLowerCase().indexOf("ach")!==-1?s("./add-ach",{relative:"path"}):o.method.toLowerCase().indexOf("wire")!==-1&&o.method.toLowerCase().indexOf("domestic")!==-1&&s("./add-wire",{relative:"path"})},updateFilesEntity:o=>{e(Ye({files:o}))},onDeleteFile:o=>{e(We(o))},onEditFileName:(o,a)=>{e(He(o,a.split(".")[0]))},onBackClick:o=>{o!=null&&e(Oe(o)),e(Oe()),e(Vn()),e(le()),s("../",{relative:"path"})},onSchedulePayment:()=>{e(_n())}}})(wt);function re({isAddACHDrawerOpen:e,isAddWireDrawerOpen:t,isAddAddressDrawerOpen:s}){const o=Y(),a=K(),r=z(),[d,c]=u.useState(!1),{tenantEmailDomain:p}=G(),m=ae(),x=w(y=>y.expressPayState.fetchState),i=w(y=>M(y)),l=w(y=>Un(y)),h=l.expressPayLocalData?.vendorId,C=i.companyId??D.getSignedInUserTenant(p)?.companyId,[b,g]=u.useState(!1),[A,I]=u.useState(!1),[f,S]=u.useState(!1),B=an(a.state?.pathnameStackToGoBack),{poppedPathname:U}=B,j=U?.split("/"),v=j?.[j.length-1];u.useEffect(()=>{e===!0?g(!0):(g(!1),document.body.style.overflow="auto")},[e]),u.useEffect(()=>{t===!0?I(!0):(I(!1),document.body.style.overflow="auto")},[t]),u.useEffect(()=>{s===!0?S(!0):(S(!1),document.body.style.overflow="auto")},[s]),u.useEffect(()=>{x==="Not-Started"&&r(zn(!0,!0))},[x,r]);const E=kt(l.vendorViewDetails.bankAccountCreationState?.fetchState);if(u.useEffect(()=>{E==="In-Progress"&&l.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&P()},[E,l.vendorViewDetails.bankAccountCreationState?.fetchState]),D.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const T=y=>{c(y)},P=()=>{g(!1),I(!1),o("../",{relative:"path"})};return n.jsxs(qt,{children:[Ue(a)?n.jsx(pe,{isAppContentDrawerOpen:d,handleDrawerToggle:T}):null,b===!0?n.jsx($t,{vendorId:h,closeDrawerHandler:P,isDrawerOpen:b}):null,A===!0?n.jsx(Yt,{vendorId:h,closeDrawerHandler:P,isDrawerOpen:A}):null,f===!0?n.jsx(Zt,{closeDrawerHandler:P,isDrawerOpen:f}):null,n.jsx(Lt,{vendorId:h,isExpressPayPage:!0}),n.jsx(Jt,{navigate:o,location:a,companyId:C,accountId:v,analytics:R,currentTenant:i,vendorId:h,roleMap:m?.loggedInUserRoleMap,isSettings:Ue(a),expressPayDetails:l,onClickMenuIcon:()=>{T(!0)}})]})}const Qt={overlayWidth:new J(100,100,58)},Xt=({authParams:e,downloadAccountDetailEndPoint:t,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:o,closeDrawerHandler:a})=>{const r=_(),d=V(),c=w(i=>$e(i)),p=w(i=>M(i));if(D.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const m=()=>{a(!0)},x={depositAccount:o,onDismissClick:m,zeniAccountsConfigDetail:c,authParams:e,downloadAccountDetailEndPoint:t,currentTenant:p};return n.jsx(Q,{anchor:"right",open:s,PaperProps:{style:{width:Qt.overlayWidth.valuePercentage(d),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>m(),children:n.jsx(ea,{onClick:i=>i.stopPropagation(),children:n.jsx(At,{...x})})})},ea=L(X)`
|
|
30
30
|
display: flex;
|
|
31
31
|
min-height: 100%;
|
|
32
32
|
flex-direction: column;
|
|
33
|
-
`,na={overlayWidth:new J(100,100,58)},cn=({isCheckDepositDrawerOpen:e,closeDrawerHandler:t})=>{const s=
|
|
33
|
+
`,na={overlayWidth:new J(100,100,58)},cn=({isCheckDepositDrawerOpen:e,closeDrawerHandler:t})=>{const s=_(),o=V(),a=z(),r=w(i=>M(i)),d=D.getSignedInUser(),c=r.tenantId,p={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c??""};if(d==null)throw Error("Can't access check deposit page without signing in...");const m=w(i=>Kn(i)),x={analytics:R,checkDeposit:m,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:i=>{a(Jn(i))},updateFilesEntity:i=>{a(Ye({files:i}))},onAnotherTransferClick:()=>{a(ye())},onDeleteFile:i=>{a(We(i))},onEditFileName:(i,l)=>{a(He(i,l.split(".")[0]))},onCheckDpositClick:()=>{a(qn())},onDismissClick:()=>{t(!0),a(ye())}};return n.jsxs(n.Fragment,{children:[n.jsx(ue,{analytics:R,onLoad:i=>(l=>l.trackPageLoaded(be.Event.accountsDepositCheckFormViewed))(i)}),n.jsx(Q,{anchor:"right",open:e,PaperProps:{style:{width:na.overlayWidth.valuePercentage(o),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(i,l)=>(l==="backdropClick"||l==="escapeKeyDown")&&(t(!0),void a(ye())),children:n.jsx(ta,{onClick:i=>i.stopPropagation(),children:n.jsx(Dt,{...x})})})]})},ta=L(X)`
|
|
34
34
|
display: flex;
|
|
35
35
|
min-height: 100%;
|
|
36
36
|
flex-direction: column;
|
|
37
|
-
`,aa={overlayWidth:new J(100,100,58)},oa=q(function(e,t){const s=t.currentTenant?.companyId;return{plaidConnectionDetails:nt(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Ze(e.depositAccountState,e.depositAccountListState)}},function(e,t){return{onReviewClick:()=>e(at()),clearReviewTransferDetail:()=>e(tt()),onFetchLinkTokenClick:s=>{e(qe("external_account",s))},onEstablishConnectionClick:s=>{e(Ke(s,t.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(It),ln=({isTransferDrawerOpen:e,authParams:t,downloadAccountDetailEndPoint:s,closeDrawerHandler:o,zeniAccountsConfig:a})=>{const r=w(f=>Qn(f)),d=w(f=>
|
|
37
|
+
`,aa={overlayWidth:new J(100,100,58)},oa=q(function(e,t){const s=t.currentTenant?.companyId;return{plaidConnectionDetails:nt(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Ze(e.depositAccountState,e.depositAccountListState)}},function(e,t){return{onReviewClick:()=>e(at()),clearReviewTransferDetail:()=>e(tt()),onFetchLinkTokenClick:s=>{e(qe("external_account",s))},onEstablishConnectionClick:s=>{e(Ke(s,t.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(It),ln=({isTransferDrawerOpen:e,authParams:t,downloadAccountDetailEndPoint:s,closeDrawerHandler:o,zeniAccountsConfig:a})=>{const r=w(f=>Qn(f)),d=w(f=>M(f)),c=_(),p=V(),m=z(),{accountId:x}=G(),[i,l]=u.useState("achTransfer"),[h,C]=u.useState(!1);if(D.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:b}=$(),{configValue:g}=b(W.zeniAccountsConfig),A=we(g),I=()=>{o(!0),m(Re())};return u.useEffect(()=>{r.reviewTransferDetail.fetchState==="Completed"&&C(!0)},[C,r.reviewTransferDetail.fetchState]),n.jsxs(n.Fragment,{children:[n.jsx(ue,{analytics:R,onLoad:f=>(S=>S.trackPageLoaded(be.Event.zeniAccountsTransferFormViewed))(f)}),n.jsx(Q,{onClose:()=>{(i==="achTransfer"&&h===!1||i==="achTransfer"&&h&&r.fetchState==="Completed")&&I()},anchor:"right",open:e,PaperProps:{style:{width:aa.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(sa,{onClick:f=>f.stopPropagation(),children:n.jsx(oa,{analytics:R,transferDetails:r,authParams:t,downloadAccountDetailEndPoint:s,onTransferClick:()=>{R.trackTransferBetweenAccountsFormClicked("Transfer",r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",r.transferDetailLocalData.transferFrom?.label,r.transferDetailLocalData.transferTo?.label,r.transferDetailLocalData.amount.amount,r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,r.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,r.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&r.transferDetailLocalData.transferTo?.accType==="depositAccount"&&a.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&r.transferDetailLocalData.amount.amount>a.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),m(et(x))},onDismissClick:I,onSaveChangesToLocalStore:f=>{m(Xn(f))},onAnotherTransferClick:()=>{C(!1),m(Re())},currentTenant:d,zeniAccountsConfigDetail:a,currentDrawerContent:i,setCurrentDrawerContent:l,showReviewContent:h,setShowReviewContent:C,onBackClick:()=>{},maxInsuredAmount:A.maxInsuredAmount})})})]})},sa=L(X)`
|
|
38
38
|
display: flex;
|
|
39
39
|
min-height: 100%;
|
|
40
40
|
flex-direction: column;
|
|
@@ -46,7 +46,7 @@ import{j as n}from"./liveblocks-BSDLCmF2.js";import{h as Y,g as K,u as _,i as G,
|
|
|
46
46
|
flex-direction: column;
|
|
47
47
|
align-items: center;
|
|
48
48
|
background-color: ${e=>e.theme.colors.grey4};
|
|
49
|
-
`,ia=q(function(e,t){return{zeniAccountListView:Je(e),isExpressPayEnabled:t.isExpressPayEnabled,analytics:t.analytics}},function(e,t){const{navigate:s,currentTenant:o,location:a,companyId:r,handleDrawerToggle:d,analytics:c,isBillPayEnabled:p,isDebitCardFeatureEnabled:m}=t,{tenantEmailDomain:x}=o;return{onZeniAccountClick:(i,l)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",l,"active");const h=ca(x,i),C=ee(a.state?.pathnameStackToGoBack,a.pathname);s(h,{state:{pathnameStackToGoBack:C}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(Qe(!1))},handleMoveMoneyOptionSelection:(i,l)=>{let h="page-not-found";i==="sendMoney"&&(h=mn(x)),i==="payBill"?h=dn(o,p,m):i==="transfer"?(h=un(x),l!=null&&e(en(l))):i==="checkDeposit"&&(h=pn(x));const C=ee(a.state?.pathnameStackToGoBack,a.pathname);s(h,{state:{pathnameStackToGoBack:C}})},unlinkPaymentAccount:(i,l)=>{c.trackAccountsListPageClicked("Unlink Account",l),e(it(i))},onFetchLinkTokenClick:(i,l)=>{e(qe("external_account",i,l))},onUpdatePaymentAccountStatus:(i,l,h)=>{e(rt(i,l,"zeni_accounts","external_account",h))},onEstablishConnectionClick:i=>{e(Ke(i,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:i=>{e(st(i))},onClickMenuIcon:()=>{d(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:i=>{i?s("./auto-transfer",{state:{...a.state,scrollToAddRule:!0}}):s("./auto-transfer")}}})(Et);function xe({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t}){const s=K(),o=Y(),a=
|
|
49
|
+
`,ia=q(function(e,t){return{zeniAccountListView:Je(e),isExpressPayEnabled:t.isExpressPayEnabled,analytics:t.analytics}},function(e,t){const{navigate:s,currentTenant:o,location:a,companyId:r,handleDrawerToggle:d,analytics:c,isBillPayEnabled:p,isDebitCardFeatureEnabled:m}=t,{tenantEmailDomain:x}=o;return{onZeniAccountClick:(i,l)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",l,"active");const h=ca(x,i),C=ee(a.state?.pathnameStackToGoBack,a.pathname);s(h,{state:{pathnameStackToGoBack:C}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(Qe(!1))},handleMoveMoneyOptionSelection:(i,l)=>{let h="page-not-found";i==="sendMoney"&&(h=mn(x)),i==="payBill"?h=dn(o,p,m):i==="transfer"?(h=un(x),l!=null&&e(en(l))):i==="checkDeposit"&&(h=pn(x));const C=ee(a.state?.pathnameStackToGoBack,a.pathname);s(h,{state:{pathnameStackToGoBack:C}})},unlinkPaymentAccount:(i,l)=>{c.trackAccountsListPageClicked("Unlink Account",l),e(it(i))},onFetchLinkTokenClick:(i,l)=>{e(qe("external_account",i,l))},onUpdatePaymentAccountStatus:(i,l,h)=>{e(rt(i,l,"zeni_accounts","external_account",h))},onEstablishConnectionClick:i=>{e(Ke(i,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:i=>{e(st(i))},onClickMenuIcon:()=>{d(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:i=>{i?s("./auto-transfer",{state:{...a.state,scrollToAddRule:!0}}):s("./auto-transfer")}}})(Et);function xe({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t}){const s=K(),o=Y(),a=z(),r=V(),{tenantEmailDomain:d}=G(),{useDynamicConfig:c,useFeatureGate:p}=$(),m=_(),{configValue:x}=c(W.zeniAccountsConfig),{isFeatureEnabled:i}=p(O.isTreasuryEnabled),{isFeatureEnabled:l}=p(O.isDebitCardFeatureEnabled),{isFeatureEnabled:h}=p(O.isAutoTransferRuleEnabled),{isFeatureEnabled:C}=p(O.isCheckingCommentingEnabled),b=we(x),g=w(F=>M(F)),A=g.companyId??D.getSignedInUserTenant(d)?.companyId,{configValue:I}=c(W.expressPayConfig),f=I.is_enable_all_tenants===!0||I.tenant_ids!=null&&I.tenant_ids.includes(g.tenantId),[S,B]=u.useState(!1),[U,j]=u.useState(!1),[v,E]=u.useState(!1),[T,P]=u.useState(!1),y=w(F=>Je(F)),N=y.fetchState,oe=w(F=>Ce(F)),se=oe?.fetchState??"Not-Started",me=!!g.companyZeniAccountInfo?.info?.isZeniAccountEnabled,Z=ae(),H=!!g.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,hn=!!g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,gn=te(Z?.loggedInUserRoleMap),fn=Ae(Z?.loggedInUserRoleMap),yn=!!g.companyBillPayInfo?.info?.isBillPayEnabled,Ee=D.getSignedInUser(),xn={userId:Ee?.userId??"",sessionId:Ee?.zeniSessionId??"",tenantId:g.tenantId??""},Cn=`${Ie}/account_details`,{areTenantIdsInSync:ve}=St();u.useEffect(()=>{!S&&ve&&(B(!0),a(Qe(!1)))},[S,a,N,ve]),u.useEffect(()=>{!U&&se==="Not-Started"&&A&&(j(!0),a(ke(!0)))},[U,se,A,a]),u.useEffect(()=>{e!=null&&e===!0?E(!0):(E(!1),document.body.style.overflow="auto")},[e]),u.useEffect(()=>{P(t!=null&&t===!0)},[t]);const Pe=()=>{E(!1),o("..")},[kn,wn]=u.useState(!1),je=F=>{wn(F)},{isAiCfoAccessEnabled:An,onAskAiCfoClick:Dn}=rn({mobileExploreReferrer:"Checking Accounts"});on({isDataReady:N==="Completed"});const In=g.company!=null&&Ge(g.company),he=(i&&In)===!0&&!hn,[Sn,bn]=u.useState(!1),ge=w(F=>F.treasurySetupViewState.treasuryFundsDetails),En=ge.fundsDetails,vn=bt(En);u.useEffect(()=>{he!==!0||Sn||ge?.fetchStatus.fetchState!=="Not-Started"||(bn(!0),a(ot()))},[ge.fetchStatus,a]);const Pn=Xe(g),jn=De(l,g);return Pn===!0&&jn!==!0?n.jsx(sn,{}):me?n.jsxs(n.Fragment,{children:[y.fetchState==="Completed"&&v===!1&&T===!1?n.jsx(ue,{analytics:R,onLoad:F=>(Te=>{Te.trackAccountsListPageViewed(y.depositAccountsSelectorView.depositAccounts.length,y.externalAccountsSelectorView.paymentAccounts.length,ze(y.summary?.totalBalance.available.amount??0),ze(y.summary?.totalInterest.available.amount??0),y.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),he&&Te.trackTreasuryPromoView("Checking Promo Banner")})(F)}):null,v===!0?n.jsx(ln,{closeDrawerHandler:Pe,isTransferDrawerOpen:v,zeniAccountsConfig:y.zeniAccountsConfig,authParams:xn,downloadAccountDetailEndPoint:Cn}):null,T===!0?n.jsx(cn,{closeDrawerHandler:Pe,isCheckDepositDrawerOpen:T}):null,n.jsxs(ra,{windowSize:r,children:[n.jsx(pe,{isAppContentDrawerOpen:kn,handleDrawerToggle:je}),n.jsx(ia,{zeniBankListView:y,navigate:o,currentTenant:g,location:s,companyId:A,analytics:R,maxInsuredAmount:b.maxInsuredAmount,isExpressPayEnabled:f,isBillPayEnabled:yn,isCheckingCommentingEnabled:C,isDebitCardFeatureEnabled:l,isAutoTransferRuleEnabled:h,handleDrawerToggle:je,showTreasuryPromo:he,treasuryYieldPercentage:vn,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:An,onAskAiCfoClick:Dn})]})]}):H&&gn?n.jsx(ne,{to:"../setup"}):g.companyZeniAccountInfo?.info&&!H&&fn?n.jsx(ne,{to:"../promo",state:s.state}):n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const dn=(e,t,s)=>{const o=De(s,e),{tenantEmailDomain:a}=e;return o===!0||t===!1?`/${a}/bills`:`/${a}/bill/new`},ca=(e,t)=>`/${e}/checking/${t}`,un=(e,t)=>t==null?`/${e}/checking/transfer`:`/${e}/checking/${t}/transfer`,pn=(e,t)=>t==null?`/${e}/checking/check-deposit`:`/${e}/checking/${t}/check-deposit`,mn=e=>`/${e}/checking/express-pay`,la=L.div`
|
|
50
50
|
display: flex;
|
|
51
51
|
width: 100%;
|
|
52
52
|
flex: 1 1 auto;
|
|
@@ -54,7 +54,7 @@ import{j as n}from"./liveblocks-BSDLCmF2.js";import{h as Y,g as K,u as _,i as G,
|
|
|
54
54
|
align-items: center;
|
|
55
55
|
min-height: 100vh;
|
|
56
56
|
background-color: ${e=>e.theme.colors.grey4};
|
|
57
|
-
`,da=q(function(e,t){const{currentTenant:s}=t,o=nn(e,t.accountId),a=D.getSignedInUser(),r=e.tenantState.currentTenantId,d={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:r??""},c=o.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:d,downloadEndPoint:`${Se.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:o,isExpressPayEnabled:t.isExpressPayEnabled,fetchState:o.fetchState}},function(e,t){const{navigate:s,currentTenant:o,location:a,accountId:r}=t,{tenantEmailDomain:d}=o;return{handleMoveMoneyOptionSelection:(c,p)=>{let m="page-not-found";c==="sendMoney"?m=mn(d):c==="payBill"?m=dn(o,t.isBillPayEnabled,t.isDebitCardFeatureEnabled):c==="transfer"?(m=un(d,r),p!=null&&e(en(p))):c==="checkDeposit"?(m=pn(d,r),p!=null&&e(ct(p))):c==="accountStatement"&&(m=ma(d,r));const x=ee(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:x}})},onViewAllTransactionClick:()=>{const c=pa(d,r),p=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:p}})},onAccountDetailClick:()=>{const c=ua(d,r),p=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:p}})},onEditNameClick:c=>{e(Le(r,"editName",c))},onReloadZeniAccountDetailPage:()=>{e(tn(r,!1))},onCloseAccountClick:()=>{e(Le(r,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})}}})(vt);function ie({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t,isAccountInfoDrawerOpen:s}){const o=K(),a=Y(),r=
|
|
57
|
+
`,da=q(function(e,t){const{currentTenant:s}=t,o=nn(e,t.accountId),a=D.getSignedInUser(),r=e.tenantState.currentTenantId,d={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:r??""},c=o.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:d,downloadEndPoint:`${Se.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:o,isExpressPayEnabled:t.isExpressPayEnabled,fetchState:o.fetchState}},function(e,t){const{navigate:s,currentTenant:o,location:a,accountId:r}=t,{tenantEmailDomain:d}=o;return{handleMoveMoneyOptionSelection:(c,p)=>{let m="page-not-found";c==="sendMoney"?m=mn(d):c==="payBill"?m=dn(o,t.isBillPayEnabled,t.isDebitCardFeatureEnabled):c==="transfer"?(m=un(d,r),p!=null&&e(en(p))):c==="checkDeposit"?(m=pn(d,r),p!=null&&e(ct(p))):c==="accountStatement"&&(m=ma(d,r));const x=ee(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:x}})},onViewAllTransactionClick:()=>{const c=pa(d,r),p=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:p}})},onAccountDetailClick:()=>{const c=ua(d,r),p=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:p}})},onEditNameClick:c=>{e(Le(r,"editName",c))},onReloadZeniAccountDetailPage:()=>{e(tn(r,!1))},onCloseAccountClick:()=>{e(Le(r,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})}}})(vt);function ie({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t,isAccountInfoDrawerOpen:s}){const o=K(),a=Y(),r=z(),d=V(),{tenantEmailDomain:c,accountId:p}=G(),{useDynamicConfig:m}=$(),{useFeatureGate:x}=$(),{isFeatureEnabled:i}=x(O.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=x(O.isCheckingCommentingEnabled),h=w(H=>M(H)),{configValue:C}=m(W.expressPayConfig),b=C.is_enable_all_tenants===!0||C.tenant_ids!=null&&C.tenant_ids.includes(h.tenantId),g=!!h.companyBillPayInfo?.info?.isBillPayEnabled,A=D.getSignedInUser(),I=h.companyId??D.getSignedInUserTenant(c)?.companyId,f={userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:h.tenantId??""},S=`${Ie}/account_details`,[B,U]=u.useState(!1),[j,v]=u.useState(!1),[E,T]=u.useState(!1),[P,y]=u.useState(!1),N=w(H=>nn(H,p??"")),oe=N.fetchState,{isAiCfoAccessEnabled:se,onAskAiCfoClick:me}=rn({mobileExploreReferrer:"Checking Account Detail"});on({isDataReady:oe==="Completed"}),u.useEffect(()=>{B||(r(tn(p??"",!1)),U(!0))},[B,r,oe]),u.useEffect(()=>{y(s!=null&&s===!0)},[s]),u.useEffect(()=>{e!=null&&e===!0?v(!0):(v(!1),document.body.style.overflow="auto")},[e]),u.useEffect(()=>{T(t!=null&&t===!0)},[t]);const Z=()=>{y(!1),a("..")};return n.jsxs(n.Fragment,{children:[P===!0&&N.accountDetail!=null?n.jsx(Xt,{authParams:f,downloadAccountDetailEndPoint:S,closeDrawerHandler:Z,isAccountInfoDrawerOpen:P,zeniBankAccountDetail:N.accountDetail}):null,j===!0?n.jsx(ln,{closeDrawerHandler:Z,isTransferDrawerOpen:j,zeniAccountsConfig:N.zeniAccountsConfig,authParams:f,downloadAccountDetailEndPoint:S}):null,E===!0?n.jsx(cn,{closeDrawerHandler:Z,isCheckDepositDrawerOpen:E}):null,n.jsx(la,{windowSize:d,children:n.jsx(da,{navigate:a,currentTenant:h,location:o,companyId:I,isDebitCardFeatureEnabled:i,accountId:p??"",isBillPayEnabled:g,isCheckingCommentingEnabled:l,isExpressPayEnabled:b,isAiCfoAccessEnabled:se,onAskAiCfoClick:me})})]})}const ua=(e,t)=>`/${e}/checking/${t}/account-info`,pa=(e,t)=>`/${e}/checking/${t}/transactions`,ma=(e,t)=>`/${e}/checking/${t}/statements`,ha=L.div`
|
|
58
58
|
display: flex;
|
|
59
59
|
height: 100vh;
|
|
60
60
|
width: 100%;
|
|
@@ -63,4 +63,4 @@ import{j as n}from"./liveblocks-BSDLCmF2.js";import{h as Y,g as K,u as _,i as G,
|
|
|
63
63
|
overflow: auto;
|
|
64
64
|
align-items: center;
|
|
65
65
|
background-color: ${e=>e.theme.colors.grey4};
|
|
66
|
-
`;function ga(){const e=Y(),t=
|
|
66
|
+
`;function ga(){const e=Y(),t=z(),s=V(),{accountId:o}=G(),{useFeatureGate:a}=$(),{isFeatureEnabled:r}=a(O.isCheckingCommentingEnabled),[d,c]=u.useState(!1);u.useEffect(()=>{d||(c(!0),t(lt(o??"",!1)))},[d,t]);const p=w(m=>dt(m,o??""));if(D.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(ha,{windowSize:s,children:n.jsx(Pt,{transactionListView:p,depositAccountId:o??"",isCheckingCommentingEnabled:r,onBackClick:()=>{e("../")}})})}const fa=q(function(e,t){const{companyId:s}=t;return{zeniAccountSetupView:ut(e,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(e,t){const{navigate:s,companyId:o}=t;return{onSetupButtonClick:()=>{R.trackAccountsPromoPageClicked("Setup Accounts"),e(pt(o))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}})(Tt),ya=()=>{const e=Y(),t=K(),{tenantEmailDomain:s}=G(),{useDynamicConfig:o}=$(),a=_(),[r,d]=u.useState(!1),[c,p]=u.useState(!1),m=w(f=>M(f)),{configValue:x}=o(W.zeniAccountsConfig),i=we(x);u.useEffect(()=>{c===!1&&t.state?.message==="activation"&&p(!0)},[t.state]);const l=D.getSignedInUserTenant(s)?.companyId??m.companyId,h=D.getSignedInUser(),C=!!m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,b=f=>{d(f)};if(h==null)throw Error("Can't access Zeni account promo page without signing in...");const g=ae(),A=te(g?.loggedInUserRoleMap),I=Ae(g?.loggedInUserRoleMap);if(C&&A)return n.jsx(ne,{to:"../../checking/setup"});if(m.company?.companyZeniAccountInfo&&(!C&&A||I)){if(t.state?.message==="activation"){const f=an(t.state?.pathnameStackToGoBack);e(t.pathname,{state:{...t.state,message:void 0,pathnameStackToGoBack:f.newStack}})}return n.jsxs(n.Fragment,{children:[n.jsx(jt,{showConfetti:c}),n.jsx(ue,{analytics:R,onLoad:f=>(S=>S.trackPageLoaded(be.Event.accountsPromoPageViewed))(f)}),n.jsx(pe,{isAppContentDrawerOpen:r,handleDrawerToggle:b}),n.jsx(fa,{analytics:R,navigate:e,companyId:l,onClickMenuIcon:()=>{b(!0)},maxAnnualPercentageYield:i.maxAnnualPercentageYield,maxInsuredAmount:i.maxInsuredAmount,exampleBankBalance:3e6})]})}return n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}})};function Za(){const e=K(),t=w(P=>M(P)),s=_(),{useFeatureGate:o,useDynamicConfig:a}=$(),r=ae(),d=te(r?.loggedInUserRoleMap),c=Ae(r?.loggedInUserRoleMap),p=!!t.company?.companyZeniAccountInfo.isZeniAccountEnabled,m=!!t.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:x}=o(O.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=o(O.isDebitCardFeatureEnabled),l=Xe(t),h=De(i,t),C=t?.userRole!=null&&mt(t?.userRole),b=(t?.company==null||t.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C)&&ht(r?.loggedInUserRoleMap),g=gt(r?.loggedInUserRoleMap),A=(t?.company==null||t.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C)&&ft(r?.loggedInUserRoleMap),{isFeatureEnabled:I}=o(O.isDepositAccountsFeatureEnabled),f=I&&!C,{configValue:S}=a(W.expressPayConfig),B=S.is_enable_all_tenants===!0||S.tenant_ids!=null&&S.tenant_ids.includes(t.tenantId),{isFeatureEnabled:U}=o(O.isAutoTransferRuleEnabled),j=Ot(t,x,i)&&!C&&yt(r?.loggedInUserRoleMap),v=xt(r?.loggedInUserRoleMap),E=f&&te(r?.loggedInUserRoleMap),T=E||Ne(r?.loggedInUserRoleMap);return n.jsxs(Ve,{children:[n.jsx(k,{path:"setup",element:n.jsx(Me,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:g,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:E,isChargeCardAdminLevelAccess:j,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"setup"})}),n.jsx(k,{path:"verification",element:n.jsx(Me,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:g,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:E,isChargeCardAdminLevelAccess:j,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"verification"})}),U?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"auto-transfer",element:n.jsx(_e,{})}),T?n.jsx(k,{path:"auto-transfer/:ruleId/edit",element:n.jsx(_e,{isEditDrawerOpen:!0})}):null]}):n.jsx(k,{path:"auto-transfer",element:n.jsx(ce,{})}),B&&d?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"express-pay",element:n.jsx(re,{})}),n.jsx(k,{path:"express-pay/add-ach",element:n.jsx(re,{isAddACHDrawerOpen:!0})}),n.jsx(k,{path:"express-pay/add-wire/add-address",element:n.jsx(re,{isAddAddressDrawerOpen:!0})}),n.jsx(k,{path:"express-pay/add-wire",element:n.jsx(re,{isAddWireDrawerOpen:!0})})]}):n.jsx(k,{path:"express-pay",element:n.jsx(ce,{})}),n.jsx(k,{path:"promo",element:n.jsx(ya,{})}),l&&!h?n.jsx(k,{path:"/*",element:n.jsx(sn,{})}):p?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"/",element:n.jsx(xe,{})}),n.jsx(k,{path:"transfer",element:n.jsx(xe,{isTransferDrawerOpen:!0})}),n.jsx(k,{path:"check-deposit",element:n.jsx(xe,{isCheckDepositDrawerOpen:!0})}),n.jsx(k,{path:":accountId/*",element:n.jsx(xa,{})}),n.jsx(k,{path:"*",element:n.jsx(ce,{})})]}):m&&d?n.jsx(k,{path:"*",element:n.jsx(ne,{to:"../setup"})}):t.company?.companyZeniAccountInfo&&c?n.jsx(k,{path:"*",element:n.jsx(ne,{to:"../promo",state:e.state})}):n.jsx(k,{path:"*",element:n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${Bt.sp1} ${s.colors.dropShadowNormal}`}})})]})}function xa(){return n.jsxs(Ve,{children:[n.jsx(k,{path:"/",element:n.jsx(ie,{})}),n.jsx(k,{path:"account-info",element:n.jsx(ie,{isAccountInfoDrawerOpen:!0})}),n.jsx(k,{path:"transfer",element:n.jsx(ie,{isTransferDrawerOpen:!0})}),n.jsx(k,{path:"check-deposit",element:n.jsx(ie,{isCheckDepositDrawerOpen:!0})}),n.jsx(k,{path:"transactions",element:n.jsx(ga,{})}),n.jsx(k,{path:"statements",element:n.jsx(zt,{})}),n.jsx(k,{path:"*",element:n.jsx(ce,{})})]})}export{Za as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{j as i}from"./liveblocks-Do-nuGO9.js";import{a as u}from"./sentry-CpVyi-77.js";import{h as x,u as j,g as B,i as C,j as p}from"./core-CAUatE6D.js";import{ID as s,IC as T,OT as $,eP as v,OU as D}from"./zeni-epic-state-Cb-J9Nxh.js";import{K as P,at as g,h as z,z as E,B as L,c5 as U,p as N}from"./index-ssCDruz8.js";import{n as _}from"./mui-Ee2kkUYC.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]="eb1217ff-5799-4cb6-868a-f17eaa5abc52",e._sentryDebugIdIdentifier="sentry-dbid-eb1217ff-5799-4cb6-868a-f17eaa5abc52")}catch{}})();const G=_.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 q(){const e=x(),n=j(),d=P(),l=B();let{accountId:a}=C(),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,y]=u.useState(!1),b=z();u.useEffect(()=>{m||(y(!0),n(T(a??"",!1)))},[m,n]);const o=p(t=>$(t,a??"")),h=()=>{const t=N(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},c=E.getSignedInUser(),r=p(t=>v(t)),I={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:r.tenantId??""},w=D(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=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(L,{fetchState:"In-Progress",style:{backgroundColor:b.colors.grey5}}):i.jsx(G,{windowSize:d,children:i.jsx(U,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:h,authParams:I,downloadEndPoint:f})})}export{q as Z};
|