@zeniai/web-app-ui 5.0.98-qa → 5.0.99-qa
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-cXow29D-.js +1 -0
- package/dist/assets/{AddressScreen-CWbRsmbp.js → AddressScreen-B_5E3MmM.js} +2 -2
- package/dist/assets/{AiCfoScreen-ByJaMYdf.js → AiCfoScreen-piPA6RFX.js} +5 -5
- package/dist/assets/{BillPayApprovalRoutes-B3i4J9uo.js → BillPayApprovalRoutes-diXVz4nM.js} +1 -1
- package/dist/assets/{BillPayRoutes-6NMIykXi.js → BillPayRoutes-BoyMv8RB.js} +9 -9
- package/dist/assets/{BusinessVerificationPageScreen-CKWDQbki.js → BusinessVerificationPageScreen-BVcSTjFx.js} +2 -2
- package/dist/assets/ChargeCardRoutes-DPqsyA37.js +71 -0
- package/dist/assets/{CompanyPassportScreen-gi1zQDQy.js → CompanyPassportScreen-CHpXpJn6.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-tshMxKRH.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-87drfziv.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-3ZdetMQC.js → CustomerOnboardingRoutes-BxAfG8_3.js} +4 -4
- package/dist/assets/{DashboardRoutes-B4iMdus4.js → DashboardRoutes-BGTJN2Hc.js} +4 -4
- package/dist/assets/{DefaultTenantHome-CmtmKMal.js → DefaultTenantHome-UMJXG41u.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-i5P7thz2.js → DomesticWireDetailScreen-Dnmn2DLO.js} +3 -3
- package/dist/assets/DrawerScreen-BjlccLEt.js +1 -0
- package/dist/assets/EntityDetailRoutes-CWwGc_Bt.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-TQM73kS9.js → ExpenseAutomationRoutes-V3pQ54ba.js} +3 -3
- package/dist/assets/{FeaturePreviewScreen-C1MJa7gv.js → FeaturePreviewScreen-CENCPCVN.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-B7ampOQu.js → HubSpotOAuthCallbackScreen-BiBYkGaM.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-NEjpbABr.js → MagicLinkRoutes-B4aCWmBq.js} +9 -9
- package/dist/assets/MagicLinkSignInScreen-LjEIpxnr.js +12 -0
- package/dist/assets/{MobileAppDrawer-n526oWrk.js → MobileAppDrawer-eEi9_FXN.js} +1 -1
- package/dist/assets/NotFoundScreen-DMqI-4f-.js +1 -0
- package/dist/assets/{NotificationRoutes-VqdMKuyJ.js → NotificationRoutes-BM8KwKeB.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-BB710FHj.js → OAuthConsentScreen-BPjvOt6Y.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-ZxQLGrNQ.js → PandLWithForecastRoutes-b1ayGBjn.js} +1 -1
- package/dist/assets/PeopleRoutes-D1MYRvV3.js +22 -0
- package/dist/assets/PerformanceRoutes-C4ZHgjOU.js +1 -0
- package/dist/assets/{Preview-D0x6u8Nz.js → Preview-CnRRxuBY.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-DvvmYU71.js → QBOConnectionScreen-hggnN49Z.js} +1 -1
- package/dist/assets/ReferralListScreen-C95kfC0i.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-BxZSJ2YX.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DqylTjul.js → ReimbursementApprovalRuleDetailScreen-QJgEZUII.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-Ck-7Lo_C.js → ReimbursementRoutes-iqf5jjbn.js} +4 -4
- package/dist/assets/{ReportsRoutes-Cmht3lbb.js → ReportsRoutes-6i8X1ifi.js} +1 -1
- package/dist/assets/RewardsRoutes-DIFQ4eNe.js +1 -0
- package/dist/assets/{ScreenRoutes-CA8fUnaP.js → ScreenRoutes-CImZTqLK.js} +2 -2
- package/dist/assets/{SettingsRoutes-Dni4ADoP.js → SettingsRoutes-DiImRVlM.js} +8 -8
- package/dist/assets/{SetupPagesScreen-_IKYoHXM.js → SetupPagesScreen-uBSRBD3f.js} +5 -5
- package/dist/assets/{SignInScreen-RaghIVhM.js → SignInScreen-WrVGlb_5.js} +1 -1
- package/dist/assets/SignOutScreen-D6xLc_Ad.js +9 -0
- package/dist/assets/{TaskListScreen-D8kgWT4b.js → TaskListScreen-BV8rjW4r.js} +2 -2
- package/dist/assets/{TaskRoutes-Cz1ZyHoB.js → TaskRoutes-BJvDn6R0.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-63tKIp6E.js → TransactionDetailRoutes-DHG610mN.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-DioDP0gW.js → TransactionDetailScreen-DwW_XiLL.js} +2 -2
- package/dist/assets/{TransactionListRoutes-Dtm4HNMN.js → TransactionListRoutes-Cgm0DlO0.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BhRZ97cm.js → TreasuryRoutes-BOB1Hsx4.js} +6 -6
- package/dist/assets/{VendorsRoutes-ODAB2xhO.js → VendorsRoutes-Qrz3O9YE.js} +1 -1
- package/dist/assets/WiseConfirmationScreen-BOj-cvtu.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-RdAjME8K.js → ZeniAccountRoutes--J0O-zAf.js} +11 -11
- package/dist/assets/ZeniAccountStatementScreen-BKZPFNf1.js +9 -0
- package/dist/assets/{accountMappingHelper-pKhoHYRw.js → accountMappingHelper-BlOCWlFe.js} +1 -1
- package/dist/assets/{analytics-D310XSjQ.js → analytics-BwB4OxqF.js} +1 -1
- package/dist/assets/{analyticsHelper-CnXSrEd_.js → analyticsHelper-CwLhXR8O.js} +1 -1
- package/dist/assets/{core-Fwwp8hop.js → core-C0jlpEOv.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DaWuthXc.js → decodeURIComponentSafe-DxEB-kYT.js} +1 -1
- package/dist/assets/{dnd-B_nt-Uf4.js → dnd-BQyDclsp.js} +1 -1
- package/dist/assets/{empty-CLLWe6m6.js → empty-CuwrcYLl.js} +1 -1
- package/dist/assets/{empty-BOxndxwD.js → empty-rQJasWmn.js} +1 -1
- package/dist/assets/{emptyVideoElement-Dqc7f16l.js → emptyVideoElement-19-80Uux.js} +1 -1
- package/dist/assets/{epic-rmzsjdl7.js → epic-DbgmAKxp.js} +1 -1
- package/dist/assets/getLocaleForTenant-DtXpovnb.js +1 -0
- package/dist/assets/{index-B-WtQiD1.js → index-0-yV8w8w.js} +2 -2
- package/dist/assets/{index-CfQpPMgv.js → index-C3r_VLlw.js} +1 -1
- package/dist/assets/{index-D6xVpTbl.js → index-CMkYtCT8.js} +1 -1
- package/dist/assets/{index-B6b9dX2I.js → index-DVo4Z0nu.js} +1 -1
- package/dist/assets/{index-DkSJ4_OZ.js → index-DebUSch4.js} +1 -1
- package/dist/assets/{index-py9Wsjt2.js → index-Dv5w3h7p.js} +1 -1
- package/dist/assets/{index-CG4cMKGN.js → index-h6OO0yPc.js} +1 -1
- package/dist/assets/{index-Sm9Ycasn.js → index-rYzTwTWr.js} +13124 -13094
- package/dist/assets/{lexical-D4DqnnDh.js → lexical-Dyz9C9bA.js} +1 -1
- package/dist/assets/{liveblocks-D1TxH59e.js → liveblocks-MDXlbwyz.js} +1 -1
- package/dist/assets/{lottie-BGeomX3N.js → lottie-BppXIe9P.js} +1 -1
- package/dist/assets/{mui-Dar_oGjJ.js → mui-BhC7MwUp.js} +1 -1
- package/dist/assets/{pathToGoBack-CFMq10u8.js → pathToGoBack-DxHHYpbP.js} +1 -1
- package/dist/assets/{pdf-BftxTBXg.js → pdf-C0iGSR-p.js} +4 -4
- package/dist/assets/{pdf-lib-oQPUkPP1.js → pdf-lib-CipnbJ-V.js} +1 -1
- package/dist/assets/{plaid-BGhwh8RZ.js → plaid-Cen9BFHL.js} +1 -1
- package/dist/assets/{pusher-B0sMSaHR.js → pusher-v3d_Hsmx.js} +1 -1
- package/dist/assets/{react-qOh0QNtz.js → react-B8JQ_FaW.js} +1 -1
- package/dist/assets/{react-BG3-H3hY.js → react-De5emeEF.js} +1 -1
- package/dist/assets/{react-BaMiVVMt.js → react-DrbwoyUO.js} +1 -1
- package/dist/assets/{react-sGqG8JxF.js → react-Gq9PWwg1.js} +1 -1
- package/dist/assets/{react-C_Slx_Fd.js → react-W49A4zcQ.js} +1 -1
- package/dist/assets/{react-DrseuhQt.js → react-vhOkHd2J.js} +1 -1
- package/dist/assets/{recharts-DuOI9Nsb.js → recharts-doG6MzQe.js} +1 -1
- package/dist/assets/{routePaths-Pqm-PNC8.js → routePaths-DyDRwNtO.js} +1 -1
- package/dist/assets/{sentry-5pTQe3BK.js → sentry-P6IGH2JA.js} +1 -1
- package/dist/assets/{url-CfkU6Gnm.js → url-BcxaTbQe.js} +1 -1
- package/dist/assets/{url-DFizNyrO.js → url-DnJY0BY-.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CUpKl9RP.js → useAiCfoDashboardSuggestedQuestionsChips-D0HxzDgV.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BSH7JN4M.js +1 -0
- package/dist/assets/{useDeviceId-9VsPbMb7.js → useDeviceId-BqqN1f4l.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-ELLLToSA.js → useInitialThreadRequest-DnjrXC7Q.js} +1 -1
- package/dist/assets/{utils-3_hFkWEq.js → utils-2XzATZuY.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-Dk7__fUW.js → withTransactionSidePanel-DtKkPyJR.js} +3 -3
- package/dist/assets/{zeni-epic-state-i1VxNGkd.js → zeni-epic-state-CZVxf74e.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/AddressRoutes-CZnINFd1.js +0 -1
- package/dist/assets/ChargeCardRoutes-CuET-m0-.js +0 -71
- package/dist/assets/ConnectionAuthScreen-De-vuICZ.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-Cm9qzjcw.js +0 -1
- package/dist/assets/DrawerScreen-8pLwC76h.js +0 -1
- package/dist/assets/EntityDetailRoutes-Dr3SOu7N.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-CosgA8eP.js +0 -12
- package/dist/assets/NotFoundScreen-Brpo5hIh.js +0 -1
- package/dist/assets/PeopleRoutes-CAPFlXeC.js +0 -22
- package/dist/assets/PerformanceRoutes-DRea1YUE.js +0 -1
- package/dist/assets/ReferralListScreen-D8LbwXaw.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-DRpummvD.js +0 -1
- package/dist/assets/RewardsRoutes-PWORm-gP.js +0 -1
- package/dist/assets/SignOutScreen-CNkJNt7x.js +0 -9
- package/dist/assets/WiseConfirmationScreen-BXqYXseQ.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-Dh6yAFkp.js +0 -9
- package/dist/assets/getLocaleForTenant-B-vHrKHL.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-B40bGqEV.js +0 -1
package/dist/assets/{TransactionDetailScreen-DioDP0gW.js → TransactionDetailScreen-DwW_XiLL.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{j as k}from"./liveblocks-
|
|
1
|
+
import{j as k}from"./liveblocks-MDXlbwyz.js";import{a as d}from"./sentry-P6IGH2JA.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-C0jlpEOv.js";import{bn as $e,eP as K,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 We,tR as N,jN as ve,GR as Ee,cU as qe,cV as Ke,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-CZVxf74e.js";import{z as De,$ as ee,T as L,aN as be,h as ga,J as Sa,aO as Ta,y as ya,p as W,k as va,aP as Ea,n as q,U as Da,c as Ce,aQ as ba,at as Ca,a2 as M}from"./index-rYzTwTWr.js";import{n as Ia,S as ka,D as La}from"./mui-BhC7MwUp.js";import{u as Ua}from"./useAskAiCfoHostNavButtonProps-BSH7JN4M.js";import{d as Ie}from"./decodeURIComponentSafe-DxEB-kYT.js";import{h as ke,g as Aa,e as xa,c as _a}from"./routePaths-DyDRwNtO.js";import{t as Va}from"./utils-2XzATZuY.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]="764be015-aa86-4729-a2fb-27a638148ce5",a._sentryDebugIdIdentifier="sentry-dbid-764be015-aa86-4729-a2fb-27a638148ce5")}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=>K(u)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ue(o.userRole),g=o.userRole!=null&&me(o.userRole),{isFeatureEnabled:T}=t(L.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:C}=t(L.isExpenseAutomationEnabled),{configValue:h}=n(be.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,U=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")}),A=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(()=>{A.newVendorState?.vendorDetailLocalData?.vendorName!=null?I(!0):I(!1)},[A.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(x("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:T,isExpenseAutomationEnabled:C,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:U,selectedTransaction:y,transactionDetail:m,vendorSaveStatus:b,tranEntity:p,defaultTrendTransactionTimePeriod:v,vendorViewDetails:A,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(x("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(_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=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=`${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=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??""),_=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=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)&&(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=>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,U=()=>{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))}U()},onCancel:()=>{h!=null&&o(Me({transactionId:h})),o(ye()),o(We()),a(!0),U()}}},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(x("common")),e.onBackClick!=null)return void e.onBackClick();const t=W(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ue(2);e.navigate(n,{state:{pathnameStackToGoBack:t.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(t,n)=>{e.transaction!=null&&a(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(_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=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=`${Aa(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=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),U=f?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:y,transactionTypeEncoded:m,transactionId:b}=de(),[p,v]=d.useState(!1),A=Ie(m??""),_=ke(b,A),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(A)});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,Ae=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=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)&&(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}=Ua({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:Ae,vendorSaveStatus:H,isVendorBulkUpdateOnTransactionEnabled:C,isExpenseAutomationEnabled:h,isUncategorizedExpenseCategoryEnabled:U,isAiCfoAccessEnabled:Re,onAskAiCfoClick:Ne,isTransactionCommentingEnabled:F,isProjectsTransactionsEnabled:V,companyId:O,companyName:P})]}):k.jsx(Ge,{to:Ue(we.length)})}const Ue=(a=2)=>{let e="../";for(let s=0;s<a;s++)e=`${e}../`;return e},ce=a=>{if(a!=null){const{transactionCategory:e,transactionClass:s}=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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-D1TxH59e.js";import{h as K,g as q,u as Q,i as W,j as h,N as G,n as X,o as Pe,p as j}from"./core-Fwwp8hop.js";import{eP as J,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-i1VxNGkd.js";import{O as de,$ as Z,I as _,c as w,cd as ce,m as H,p as oe,U as Oe,z as ze}from"./index-Sm9Ycasn.js";import"./mui-Dar_oGjJ.js";import{a as S}from"./sentry-5pTQe3BK.js";import{w as se}from"./withTransactionSidePanel-Dk7__fUW.js";import{p as ie,c as re}from"./routePaths-Pqm-PNC8.js";import{u as we}from"./utils-3_hFkWEq.js";import{d as b}from"./decodeURIComponentSafe-DaWuthXc.js";import{Z as Ge}from"./ZeniAccountStatementScreen-Dh6yAFkp.js";import"./recharts-DuOI9Nsb.js";import"./analytics-D310XSjQ.js";import"./plaid-BGhwh8RZ.js";import"./dnd-B_nt-Uf4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BGeomX3N.js";import"./lexical-D4DqnnDh.js";import"./pdf-BftxTBXg.js";import"./useAskAiCfoHostNavButtonProps-B40bGqEV.js";import"./TransactionDetailScreen-DioDP0gW.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]="060294f9-3827-4ed0-9db6-3fb4607d6837",a._sentryDebugIdIdentifier="sentry-dbid-060294f9-3827-4ed0-9db6-3fb4607d6837")}catch{}})();const _e=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],U=a=>we(a),Re=X(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,U(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=U(e.selectedAccount.tranListType),u=Ne(t,n,c,l,e.bookCloseDate);w.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:u},type:U(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:U(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}=$e(o),A="month",I=h(r=>J(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),w.trackTransactionList(void 0,void 0,void 0,T.title);const r=U(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(G,{to:"../"}):s.jsx(Re,{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})}),$e=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},Ue=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)}`),w.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=>J(d)),T=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=Z(),{isFeatureEnabled:r}=M(_.isProjectsTransactionsEnabled),R=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")},$=Je(F?.dateRange,d);i={accountId:g,accountType:te(f),classId:k,title:x,timeframe:D,period:$}}S.useEffect(()=>{v||i==null||(C(!0),w.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(Ue,{firstMonthOfFY:T,tenantEmailDomain:o,location:n,navigate:t,showProjectField:R,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>B(d),...e}):s.jsx(G,{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,Je=(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)}`),w.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=>J(d)),T=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=Z(),{isFeatureEnabled:r}=M(_.isProjectsTransactionsEnabled),R=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")},$=We(F?.dateRange,d);i={accountId:g,accountType:te(f),projectId:k,title:x,timeframe:D,period:$}}S.useEffect(()=>{v||i==null||(C(!0),w.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:R,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>B(d),...e}):s.jsx(G,{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)}`),w.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=>J(P)),T=O.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=O.company?.companyInfo.firstMonthOfFY??1;let r;const R=et(f,g,m,D,y,k);if(R){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:$}=Oe();S.useEffect(()=>{!v&&r!=null&&$&&(C(!0),w.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))},[v,r,c,$]);const ke=[l,u,m,D,y,A].filter(P=>P!=null);return R&&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(G,{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=>J(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(Ge,{})}),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(G,{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(G,{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(G,{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-MDXlbwyz.js";import{h as K,g as q,u as Q,i as W,j as h,N as G,n as X,o as Pe,p as j}from"./core-C0jlpEOv.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-CZVxf74e.js";import{D as de,$ as Z,T as _,c as w,cd as ce,n as H,p as oe,N as Oe,z as ze}from"./index-rYzTwTWr.js";import"./mui-BhC7MwUp.js";import{a as S}from"./sentry-P6IGH2JA.js";import{w as se}from"./withTransactionSidePanel-DtKkPyJR.js";import{p as ie,c as re}from"./routePaths-DyDRwNtO.js";import{u as we}from"./utils-2XzATZuY.js";import{d as b}from"./decodeURIComponentSafe-DxEB-kYT.js";import{Z as Ge}from"./ZeniAccountStatementScreen-BKZPFNf1.js";import"./recharts-doG6MzQe.js";import"./analytics-BwB4OxqF.js";import"./plaid-Cen9BFHL.js";import"./dnd-BQyDclsp.js";import"./stripe-DMRn4zHo.js";import"./lottie-BppXIe9P.js";import"./lexical-Dyz9C9bA.js";import"./pdf-C0iGSR-p.js";import"./useAskAiCfoHostNavButtonProps-BSH7JN4M.js";import"./TransactionDetailScreen-DwW_XiLL.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]="c32caa0b-b1ef-4205-8c7f-f05623a30217",a._sentryDebugIdIdentifier="sentry-dbid-c32caa0b-b1ef-4205-8c7f-f05623a30217")}catch{}})();const _e=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],J=a=>we(a),Re=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);w.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}=$e(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),w.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(G,{to:"../"}):s.jsx(Re,{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})}),$e=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)}`),w.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),R=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")},$=Ue(F?.dateRange,d);i={accountId:g,accountType:te(f),classId:k,title:x,timeframe:D,period:$}}S.useEffect(()=>{v||i==null||(C(!0),w.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:R,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>B(d),...e}):s.jsx(G,{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)}`),w.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),R=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")},$=We(F?.dateRange,d);i={accountId:g,accountType:te(f),projectId:k,title:x,timeframe:D,period:$}}S.useEffect(()=>{v||i==null||(C(!0),w.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:R,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>B(d),...e}):s.jsx(G,{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)}`),w.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 R=et(f,g,m,D,y,k);if(R){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:$}=Oe();S.useEffect(()=>{!v&&r!=null&&$&&(C(!0),w.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))},[v,r,c,$]);const ke=[l,u,m,D,y,A].filter(P=>P!=null);return R&&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(G,{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(Ge,{})}),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(G,{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(G,{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(G,{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,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-
|
|
1
|
+
import{j as e}from"./liveblocks-MDXlbwyz.js";import{h as L,g as B,u as P,i as O,j as f,N as U,n as M,o as Te,p as k}from"./core-C0jlpEOv.js";import{cm as V,eP as D,NJ as R,DP as ae,fh as H,Dx as ne,NL as we,DS as Ie,NH as Ce,NI as se,N_ as ke,BZ as je,sM as be,NN as Ae,E1 as Ee,NK as re,cO as Z,wU as oe,eY as ve,e_ as De,OV as Fe,OW as Ue,Dy as Le,OX as Be,Dz as Pe,DI as Re,bt as Ne,bF as Oe,cx as Me,bG as Ve,cl as _e,fg as ze,bs as $e,Jn as Ge,ck as qe}from"./zeni-epic-state-CZVxf74e.js";import{k as _,aq as He,z as A,v as z,c as j,c6 as Ze,c7 as Je,c8 as q,J,h as Ke,N as We,U as Xe,$ as ie,T as v,y as Ye,s as Qe,c9 as et,at as K,n as tt,ca as at,p as W,cb as nt,B as Y,cc as st,a9 as rt}from"./index-rYzTwTWr.js";import{D as ot,n as N,S as it}from"./mui-BhC7MwUp.js";import ct from"./NotFoundScreen-DMqI-4f-.js";import{S as Q}from"./SetupPagesScreen-uBSRBD3f.js";import{a as d}from"./sentry-P6IGH2JA.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-BSH7JN4M.js";import{u as ut}from"./useInitialThreadRequest-DnjrXC7Q.js";import{M as ce}from"./MobileAppDrawer-eEi9_FXN.js";import{F as dt}from"./FeaturePreviewScreen-CENCPCVN.js";import{a as ee}from"./analyticsHelper-CwLhXR8O.js";import"./recharts-doG6MzQe.js";import"./analytics-BwB4OxqF.js";import"./plaid-Cen9BFHL.js";import"./dnd-BQyDclsp.js";import"./stripe-DMRn4zHo.js";import"./lottie-BppXIe9P.js";import"./lexical-Dyz9C9bA.js";import"./pdf-C0iGSR-p.js";import"./utils-2XzATZuY.js";import"./routePaths-DyDRwNtO.js";import"./BusinessVerificationPageScreen-BVcSTjFx.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]="f8439304-3b1e-4299-a9a1-4a47341895d6",t._sentryDebugIdIdentifier="sentry-dbid-f8439304-3b1e-4299-a9a1-4a47341895d6")}catch{}})();const pt=M(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(t,n),analytics:j}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Ie(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}})(Ze);function mt(){const t=L(),a=B(),n=P(),{tenantEmailDomain:o}=O(),p=_(),r=f(C=>C.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=He(r),s=V(p?.loggedInUserRoleMap),[l,i]=d.useState(!1),[g,I]=d.useState(!1),[u,c]=d.useState(!1),h=f(C=>D(C)),y=A.getSignedInUserTenant(o)?.companyId??h.companyId,T=A.getSignedInUser(),S=f(C=>R(C,y)),w=f(C=>C.treasurySetupViewState.fetchState),x=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(T==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{l||w!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))},[l,w,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||(I(!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(U,{to:"../promo"});const E=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||w!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const ft=M(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{q(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{q(a.analytics,"confirm",r,m,"Transfer"),t(Ee())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(be("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Je),yt=({isFirstTransfer:t})=>{const a=L(),{tenantEmailDomain:n}=O(),o=P(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[l,i]=d.useState(!1),[g,I]=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)),T=A.getSignedInUserTenant(n)?.companyId??y.companyId,S=f(x=>Ce(x)),w=f(x=>R(x,T));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||T==null||(s(!0),o(ae(T,!0,!1)))},[m,u,T,o]),d.useEffect(()=>{l||c!=="Not-Started"||T==null||(i(!0),o(H()))},[l,c,T,o]),d.useEffect(()=>{g||h!=="Not-Started"||T==null||(I(!0),o(ne()))},[g,h,T,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(ft,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:y,treasurySetupView:w,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{q(j,"review",S.treasuryTransferMoneyLocalData,w.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=N.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,11 +6,11 @@ import{j as e}from"./liveblocks-D1TxH59e.js";import{h as L,g as B,u as P,i as N,
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${t=>t.theme.colors.grey4};
|
|
9
|
-
`,ht={overlayWidth:new
|
|
9
|
+
`,ht={overlayWidth:new Ye(100,100,48)},St=M(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:R(t,o),downloadEndPoint:`${K.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=Tt(s):l==="taxLetter"?i=wt(s):l==="settings"&&(i=It(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 G({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=B(),o=L(),p=P(),r=J(),m=Ke(),s=f(b=>D(b)),{tenantEmailDomain:l}=O(),i=s.companyId??A.getSignedInUserTenant(l)?.companyId,[g,I]=d.useState(!1),u=f(b=>re(b)),c=u.fetchState,h=u.accountSummary?.totalBalance?.amount,y=f(b=>b.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),T=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),w=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=V(S?.loggedInUserRoleMap),F=Z(S?.loggedInUserRoleMap),{areTenantIdsInSync:E}=We();d.useEffect(()=>{c==="Not-Started"&&!g&&E&&(I(!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),X=b=>{ue(b)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=lt({mobileExploreReferrer:"Treasury"});Xe({isDataReady:c==="Completed"});const{useFeatureGate:$}=ie(),{isFeatureEnabled:me}=$(v.isDebitCardFeatureEnabled),{isFeatureEnabled:fe}=$(v.isAutoTransferRuleEnabled),{isFeatureEnabled:ye}=$(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(T){const b=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:j,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:X}),e.jsx(St,{treasuryDetailsView:u,isAutoTransferRuleEnabled:fe,navigate:o,currentTenant:s,location:n,companyId:i,analytics:j,isTreasuryCommentingEnabled:ye,handleDrawerToggle:X,initialOpenThreadRequest:ge,isLoading:b,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return w&&x?e.jsx(U,{to:"../setup"}):s.companyTreasuryInfo?.info&&!w&&F?e.jsx(U,{to:"../promo",state:n.state}):e.jsx(Qe,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const xt=t=>`/${t}/treasury/edit-portfolio`,Tt=t=>`/${t}/treasury/statements`,wt=t=>`/${t}/treasury/tax-letter`,It=t=>`/${t}/treasury/setup`,Ct=N(it)`
|
|
10
10
|
display: flex;
|
|
11
11
|
min-height: 100%;
|
|
12
12
|
flex-direction: column;
|
|
13
|
-
`,kt=
|
|
13
|
+
`,kt=N.div`
|
|
14
14
|
display: flex;
|
|
15
15
|
height: 100vh;
|
|
16
16
|
width: 100%;
|
|
@@ -18,7 +18,7 @@ import{j as e}from"./liveblocks-D1TxH59e.js";import{h as L,g as B,u as P,i as N,
|
|
|
18
18
|
flex-direction: column;
|
|
19
19
|
align-items: center;
|
|
20
20
|
background-color: ${t=>t.theme.colors.grey4};
|
|
21
|
-
`;function
|
|
21
|
+
`;function jt(){const t=L(),a=P(),n=J(),o=B(),p=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(c=>Ue(c));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Le(!1)))},[r,s.fetchState,a]);const l=A.getSignedInUser(),i=f(c=>D(c)),g={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},I=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:I,statementListView:s,isLoading:u,onBackClick:()=>{const c=W(o.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const bt=N.div`
|
|
22
22
|
display: flex;
|
|
23
23
|
height: 100vh;
|
|
24
24
|
width: 100%;
|
|
@@ -26,7 +26,7 @@ import{j as e}from"./liveblocks-D1TxH59e.js";import{h as L,g as B,u as P,i as N,
|
|
|
26
26
|
flex-direction: column;
|
|
27
27
|
align-items: center;
|
|
28
28
|
background-color: ${t=>t.theme.colors.grey4};
|
|
29
|
-
`;function At(){const t=L(),a=J(),n=B(),o=P(),p=`${K.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??""},
|
|
29
|
+
`;function At(){const t=L(),a=J(),n=B(),o=P(),p=`${K.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??""},I=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(bt,{windowSize:a,children:e.jsx(nt,{currentTenantCompanyName:I,taxLetterListView:s,isLoading:u,onBackClick:()=>{const c=W(n.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const Et=M(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=L(),a=B(),n=P(),{tenantEmailDomain:o}=O(),[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,I=A.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,c=S=>{r(S)};if(I==null)throw Error("Can't access treasury promo page without signing in...");const h=_(),y=V(h?.loggedInUserRoleMap),T=Z(h?.loggedInUserRoleMap);if(u&&y)return e.jsx(U,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&y||T)){if(a.state?.message==="activation"){const S=W(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(Y,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:S=>(w=>w.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:c}),e.jsx(Et,{analytics:j,navigate:t,companyId:g,onClickMenuIcon:()=>{c(!0)}})]})}return e.jsx(te,{children:e.jsx(Y,{size:"ExtraLarge",start:!0})})},te=N.div`
|
|
30
30
|
display: flex;
|
|
31
31
|
width: 100%;
|
|
32
32
|
height: 100%;
|
|
@@ -34,4 +34,4 @@ import{j as e}from"./liveblocks-D1TxH59e.js";import{h as L,g as B,u as P,i as N,
|
|
|
34
34
|
justify-content: center;
|
|
35
35
|
align-items: center;
|
|
36
36
|
background-color: ${t=>t.theme.colors.grey5};
|
|
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=Z(r?.loggedInUserRoleMap),s=a?.userRole!=null&&
|
|
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=Z(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Ne(a?.userRole),l=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Oe(r?.loggedInUserRoleMap),i=Me(r?.loggedInUserRoleMap),g=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&Ve(r?.loggedInUserRoleMap),{isFeatureEnabled:I}=n(v.isDepositAccountsFeatureEnabled),u=I&&!s&&_e(r?.loggedInUserRoleMap),c=a.company!=null&&ze(a.company),h=o&&c===!0&&!s&&V(r?.loggedInUserRoleMap),{isFeatureEnabled:y}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:T}=n(v.isDebitCardFeatureEnabled),S=rt(a,y,T)&&!s&&$e(r?.loggedInUserRoleMap),w=Ge(r?.loggedInUserRoleMap),x=qe(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(Te,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(Q,{isBillPayAdminLevelAccess:l,isReimbursementAdminLevelAccess:g,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:w,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:w,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(vt,{})}),e.jsx(k,{path:"statements",element:e.jsx(jt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(At,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx(G,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),h?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx(G,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx(G,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(ct,{})})]}):p&&h?e.jsx(k,{path:"*",element:e.jsx(U,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(U,{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-MDXlbwyz.js";import{a as g}from"./sentry-P6IGH2JA.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-C0jlpEOv.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-CZVxf74e.js";import{z as R,aq as Be,s as Rt,v as Q,c as j,a2 as Z,aw as vn,n as M,D as Ce,V as ce,ax as We,ay as xn,az as Tn,p as Qe,aA as yn,h as Dn,J as de,y as Ze,$ as ae,T as $,aB as Cn,f as Xe,U as Se,aC as En,aD as Nt,N as In,aE as bn,k as kn,aF as wn,at as Mt,aG as An,o as W,S as jn,A as Jt,C as Fn,aH as Ln,aI as Pn,e as et,aJ as _n,aK as Vn,j as Bn,aL as On,aM as Un}from"./index-rYzTwTWr.js";import{n as N,D as Rn,S as Kt}from"./mui-BhC7MwUp.js";import{t as Nn,A as Mn}from"./AddressScreen-B_5E3MmM.js";import le from"./NotFoundScreen-DMqI-4f-.js";import{F as Jn}from"./FeaturePreviewScreen-CENCPCVN.js";import{c as q,v as tt,d as Kn}from"./routePaths-DyDRwNtO.js";import{p as Gt}from"./pathToGoBack-DxHHYpbP.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-BSH7JN4M.js";import{M as ge}from"./MobileAppDrawer-eEi9_FXN.js";import{D as Gn}from"./DrawerScreen-BjlccLEt.js";import{g as $n,m as zn}from"./accountMappingHelper-BlOCWlFe.js";import"./recharts-doG6MzQe.js";import"./analytics-BwB4OxqF.js";import"./plaid-Cen9BFHL.js";import"./dnd-BQyDclsp.js";import"./stripe-DMRn4zHo.js";import"./lottie-BppXIe9P.js";import"./lexical-Dyz9C9bA.js";import"./pdf-C0iGSR-p.js";import"./utils-2XzATZuY.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]="d5a24c2e-68b2-4a35-be8c-46e3c8034fe2",e._sentryDebugIdIdentifier="sentry-dbid-d5a24c2e-68b2-4a35-be8c-46e3c8034fe2")}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-MDXlbwyz.js";import{a as d}from"./sentry-P6IGH2JA.js";import{s as u,u as h,j as y,N as I}from"./core-C0jlpEOv.js";import{JG as b,eW as w,zF as j}from"./zeni-epic-state-CZVxf74e.js";import{z as l,s as x,A as S,C as D}from"./index-rYzTwTWr.js";import{n as p}from"./mui-BhC7MwUp.js";import"./recharts-doG6MzQe.js";import"./analytics-BwB4OxqF.js";import"./plaid-Cen9BFHL.js";import"./dnd-BQyDclsp.js";import"./stripe-DMRn4zHo.js";import"./lottie-BppXIe9P.js";import"./lexical-Dyz9C9bA.js";import"./pdf-C0iGSR-p.js";import"./utils-2XzATZuY.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]="1968ca78-9664-4dd7-a7ff-08af789bff27",e._sentryDebugIdIdentifier="sentry-dbid-1968ca78-9664-4dd7-a7ff-08af789bff27")}catch{}})();const R=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",c=e.get("profileId")??"",[n,g]=d.useState(!1),a=h(),i=y(m=>b(m)),r=l.getSignedInUser(),f=l.getSignedInUserTenantWithId(s);if(r==null||f==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,f?.tenantId),d.useEffect(()=>{n||(g(!0),a(j(t,c,s)))},[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=p.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
|
+
`,_=p(D.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-MDXlbwyz.js";import{h as Y,g as J,u as _,i as G,j as w,n as K,N as ne,o as Ve,p as k}from"./core-C0jlpEOv.js";import{eP as z,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 _n,Ks as zn,Ep as Mn,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 Jn,OI as ye,E4 as Kn,OJ as qn,OK as Qn,Nf as we,OL as Re,OM as Xn,EA as et,N_ as nt,BZ as Je,sM as Ke,ON as tt,Ex as at,OO as qe,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-CZVxf74e.js";import{k as ae,$,z as D,T as O,h as M,s as de,bW as Ct,a2 as Ie,J as V,y as q,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,N as St,U as on,ac as bt,b$ as _e,c0 as Et,n as ee,c1 as vt,c2 as Pt,c3 as jt,c4 as Tt,a9 as Ot,o as Bt}from"./index-rYzTwTWr.js";import{n as L,D as Q,S as X}from"./mui-BhC7MwUp.js";import ce from"./NotFoundScreen-DMqI-4f-.js";import{S as ze}from"./SetupPagesScreen-uBSRBD3f.js";import{F as sn}from"./FeaturePreviewScreen-CENCPCVN.js";import{a as u}from"./sentry-P6IGH2JA.js";import{M as pe}from"./MobileAppDrawer-eEi9_FXN.js";import{A as Ft,D as Rt,V as Lt}from"./DomesticWireDetailScreen-Dnmn2DLO.js";import{A as Ut}from"./AddressScreen-B_5E3MmM.js";import{u as rn}from"./useAskAiCfoHostNavButtonProps-BSH7JN4M.js";import{Z as _t}from"./ZeniAccountStatementScreen-BKZPFNf1.js";import"./recharts-doG6MzQe.js";import"./analytics-BwB4OxqF.js";import"./plaid-Cen9BFHL.js";import"./dnd-BQyDclsp.js";import"./stripe-DMRn4zHo.js";import"./lottie-BppXIe9P.js";import"./lexical-Dyz9C9bA.js";import"./pdf-C0iGSR-p.js";import"./utils-2XzATZuY.js";import"./analyticsHelper-CwLhXR8O.js";import"./routePaths-DyDRwNtO.js";import"./BusinessVerificationPageScreen-BVcSTjFx.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]="f35b8722-680c-4539-ac0c-78c7630f8122",e._sentryDebugIdIdentifier="sentry-dbid-f35b8722-680c-4539-ac0c-78c7630f8122")}catch{}})();const zt=L.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,19 +6,19 @@ import{j as n}from"./liveblocks-D1TxH59e.js";import{h as Y,g as q,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
|
-
`,Mt=
|
|
9
|
+
`,Mt=K(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 Me({isEditDrawerOpen:e}){const t=Y(),s=J(),o=_(),a=ae(),{ruleId:r,tenantEmailDomain:d}=G(),{useFeatureGate:c}=$(),[p,m]=u.useState(!1),[x,i]=u.useState(!1),l=w(y=>z(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=M(),P=!!s.state?.scrollToAddRule;return h?.fetchState!=="Completed"?n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:T.colors.grey5}}):n.jsxs(zt,{children:[n.jsx(pe,{isAppContentDrawerOpen:p,handleDrawerToggle:E}),n.jsx(Mt,{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 q(100,100,58)},$t=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=_(),a=M(),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
|
|
13
|
+
`,Gt={overlayWidth:new q(100,100,58)},Zt=({isDrawerOpen:e,closeDrawerHandler:t})=>{const s=_(),o=M(),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
|
|
17
|
+
`,Wt={overlayWidth:new q(100,100,58)},Yt=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=_(),a=M(),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(Jt,{onClick:d=>d.stopPropagation(),children:n.jsx(Rt,{vendorIdParam:e,accountContext:"express-pay"})})})},Jt=L(X)`
|
|
18
18
|
display: flex;
|
|
19
19
|
min-height: 100%;
|
|
20
20
|
flex-direction: column;
|
|
21
|
-
`,
|
|
21
|
+
`,Kt=L.div`
|
|
22
22
|
display: flex;
|
|
23
23
|
height: 100vh;
|
|
24
24
|
width: 100%;
|
|
@@ -26,15 +26,15 @@ import{j as n}from"./liveblocks-D1TxH59e.js";import{h as Y,g as q,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
|
-
`,
|
|
29
|
+
`,qt=K(function(e,t){const s=z(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=zn(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(Mn())}}})(wt);function re({isAddACHDrawerOpen:e,isAddWireDrawerOpen:t,isAddAddressDrawerOpen:s}){const o=Y(),a=J(),r=_(),[d,c]=u.useState(!1),{tenantEmailDomain:p}=G(),m=ae(),x=w(y=>y.expressPayState.fetchState),i=w(y=>z(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(_n(!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(Kt,{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(qt,{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 q(100,100,58)},Xt=({authParams:e,downloadAccountDetailEndPoint:t,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:o,closeDrawerHandler:a})=>{const r=M(),d=V(),c=w(i=>$e(i)),p=w(i=>z(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
|
|
33
|
+
`,na={overlayWidth:new q(100,100,58)},cn=({isCheckDepositDrawerOpen:e,closeDrawerHandler:t})=>{const s=M(),o=V(),a=_(),r=w(i=>z(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=>Jn(i)),x={analytics:R,checkDeposit:m,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:i=>{a(qn(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(Kn())},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
|
|
37
|
+
`,aa={overlayWidth:new q(100,100,58)},oa=K(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(Ke("external_account",s))},onEstablishConnectionClick:s=>{e(Je(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=>z(f)),c=M(),p=V(),m=_(),{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-D1TxH59e.js";import{h as Y,g as q,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=
|
|
49
|
+
`,ia=K(function(e,t){return{zeniAccountListView:qe(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(Ke("external_account",i,l))},onUpdatePaymentAccountStatus:(i,l,h)=>{e(rt(i,l,"zeni_accounts","external_account",h))},onEstablishConnectionClick:i=>{e(Je(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=J(),o=Y(),a=_(),r=V(),{tenantEmailDomain:d}=G(),{useDynamicConfig:c,useFeatureGate:p}=$(),m=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=>z(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=>qe(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,_e(y.summary?.totalBalance.available.amount??0),_e(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-D1TxH59e.js";import{h as Y,g as q,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=
|
|
57
|
+
`,da=K(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=J(),a=Y(),r=_(),d=V(),{tenantEmailDomain:c,accountId:p}=G(),{useDynamicConfig:m}=$(),{useFeatureGate:x}=$(),{isFeatureEnabled:i}=x(O.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=x(O.isCheckingCommentingEnabled),h=w(H=>z(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-D1TxH59e.js";import{h as Y,g as q,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=_(),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=
|
|
66
|
+
`;function ga(){const e=Y(),t=_(),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=K(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=J(),{tenantEmailDomain:s}=G(),{useDynamicConfig:o}=$(),a=M(),[r,d]=u.useState(!1),[c,p]=u.useState(!1),m=w(f=>z(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=J(),t=w(P=>z(P)),s=M(),{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(ze,{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(ze,{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(Me,{})}),T?n.jsx(k,{path:"auto-transfer/:ruleId/edit",element:n.jsx(Me,{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(_t,{})}),n.jsx(k,{path:"*",element:n.jsx(ce,{})})]})}export{Za as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{j as c}from"./liveblocks-MDXlbwyz.js";import{a as f}from"./sentry-P6IGH2JA.js";import{h as x,u as j,g as C,i as T,j as p}from"./core-C0jlpEOv.js";import{ID as s,IC as $,OT as v,eP as B,OU as D}from"./zeni-epic-state-CZVxf74e.js";import{J as P,at as g,h as z,z as E,s as L,c5 as U,p as N}from"./index-rYzTwTWr.js";import{n as _}from"./mui-BhC7MwUp.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]="b9686f58-d617-4aae-a182-9841d73e0a6a",e._sentryDebugIdIdentifier="sentry-dbid-b9686f58-d617-4aae-a182-9841d73e0a6a")}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=C();let{accountId:a}=T(),m=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,m=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[u,y]=f.useState(!1),h=z();f.useEffect(()=>{u||(y(!0),n($(a??"",!1)))},[u,n]);const o=p(t=>v(t,a??"")),I=()=>{const t=N(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},r=E.getSignedInUser(),i=p(t=>B(t)),b={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:i.tenantId??""},w=D(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=i.company?.companyInfo.companyLegalName??i.companyName;if(r==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?c.jsx(L,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):c.jsx(G,{windowSize:d,children:c.jsx(U,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:I,authParams:b,downloadEndPoint:m})})}export{q as Z};
|