@zeniai/web-app-ui 5.0.25-qa → 5.0.26-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-Ddo5yFaY.js +1 -0
- package/dist/assets/AddressScreen-DbfnfF3g.js +9 -0
- package/dist/assets/{AiCfoScreen-c3WmsM7S.js → AiCfoScreen-B013GFMS.js} +1 -1
- package/dist/assets/BillPayApprovalRoutes-CZRSyPvo.js +1 -0
- package/dist/assets/{BillPayRoutes-DBqyHQ7X.js → BillPayRoutes-CH2s-gzl.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-DlerSwqe.js → BusinessVerificationPageScreen-BoEZFvFS.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-DWhHYo21.js → ChargeCardRoutes-B7hoiWSV.js} +8 -8
- package/dist/assets/CompanyPassportScreen-CRMqtZFn.js +1 -0
- package/dist/assets/ConnectionAuthScreen-C04-2mC6.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-BmXLWm23.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-DkC_d2sZ.js → CustomerOnboardingRoutes-Cj9bwQg1.js} +6 -6
- package/dist/assets/DashboardRoutes-kuz7A0GW.js +20 -0
- package/dist/assets/{DefaultTenantHome-CjzSnp03.js → DefaultTenantHome-CrJOB5X8.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-LY2LbfiX.js → DomesticWireDetailScreen-B8McV8L1.js} +3 -3
- package/dist/assets/DrawerScreen-C7f_NiZk.js +1 -0
- package/dist/assets/{EntityDetailRoutes-lzOy1ccj.js → EntityDetailRoutes-CZrU40Jr.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-D_77OTBs.js → ExpenseAutomationRoutes-C7mCSmyZ.js} +3 -3
- package/dist/assets/FeaturePreviewScreen-CiNRRJaO.js +1 -0
- package/dist/assets/{MagicLinkRoutes-Nmy2VUN5.js → MagicLinkRoutes-CNG9KHKe.js} +2 -2
- package/dist/assets/MagicLinkSignInScreen-CdrB-rz9.js +12 -0
- package/dist/assets/MobileAppDrawer-DnUJz0tA.js +1 -0
- package/dist/assets/NotFoundScreen-DcJllQdb.js +1 -0
- package/dist/assets/{NotificationRoutes-z8dQlPoa.js → NotificationRoutes-Cv58FgVH.js} +1 -1
- package/dist/assets/PandLWithForecastRoutes-CxMrp76j.js +1 -0
- package/dist/assets/{PeopleRoutes-CllKrbwi.js → PeopleRoutes-72XyljMO.js} +5 -5
- package/dist/assets/PerformanceRoutes-BN3XbJ8Y.js +1 -0
- package/dist/assets/{Preview-DMyRJ2f0.js → Preview-BAKw3AAf.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-B_jPbhuP.js → QBOConnectionScreen-Cw9-vrgq.js} +1 -1
- package/dist/assets/{ReferralListScreen-DIWnUNDR.js → ReferralListScreen-C3zvIkrr.js} +2 -2
- package/dist/assets/{ReimbursementApprovalRoutes-D-DKJaF1.js → ReimbursementApprovalRoutes-CMV2BtkL.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BGFNyRVm.js → ReimbursementApprovalRuleDetailScreen-CVP5Uq5I.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-jGUb1Fcu.js → ReimbursementRoutes-BaDf69Ue.js} +4 -4
- package/dist/assets/{ReportsRoutes-MfNsO04v.js → ReportsRoutes-Cg41Op_9.js} +1 -1
- package/dist/assets/RewardsRoutes-Dd6j2rAO.js +1 -0
- package/dist/assets/ScreenRoutes-DldUU7sr.js +2 -0
- package/dist/assets/{SettingsRoutes-CYwSFGK7.js → SettingsRoutes-Dn3k1EVr.js} +4 -4
- package/dist/assets/{SetupPagesScreen-Cilkcy82.js → SetupPagesScreen-DrJKLQxS.js} +1 -1
- package/dist/assets/SignInScreen-DfKF7OT4.js +1 -0
- package/dist/assets/SignOutScreen-CAOckvN-.js +9 -0
- package/dist/assets/TaskListScreen-B9vL8Oxs.js +9 -0
- package/dist/assets/TaskRoutes-D7u9YC7x.js +9 -0
- package/dist/assets/TransactionDetailRoutes-BdR87vgc.js +1 -0
- package/dist/assets/{TransactionDetailScreen---9iPrdg.js → TransactionDetailScreen-DaK6ceRt.js} +2 -2
- package/dist/assets/{TransactionListRoutes-DmewD5lB.js → TransactionListRoutes-CIOjaSOe.js} +1 -1
- package/dist/assets/{TreasuryRoutes-DPo2M-9-.js → TreasuryRoutes-uVfHsmut.js} +6 -6
- package/dist/assets/{VendorsRoutes-B2HVwxpf.js → VendorsRoutes-B7j00M1u.js} +1 -1
- package/dist/assets/WiseConfirmationScreen--5fe8Ha5.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-N6UjlYyq.js → ZeniAccountRoutes-RroFxPLH.js} +10 -10
- package/dist/assets/ZeniAccountStatementScreen-CeIEeVha.js +9 -0
- package/dist/assets/{accountMappingHelper-CEjaDvi1.js → accountMappingHelper-DdMTXagH.js} +1 -1
- package/dist/assets/{analytics-B3Q4UmLh.js → analytics-BsMspvaD.js} +1 -1
- package/dist/assets/{analyticsHelper-B4uZydFl.js → analyticsHelper-CQJg2P3F.js} +1 -1
- package/dist/assets/{core-CBFn_Yo_.js → core-PVb_PTOa.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-CqMC__af.js → decodeURIComponentSafe-mU8LeJGH.js} +1 -1
- package/dist/assets/{dnd-1A4kYEBz.js → dnd-DhtyOCgF.js} +1 -1
- package/dist/assets/{empty-C0ZlcUMX.js → empty-HlfDqjBl.js} +1 -1
- package/dist/assets/{empty-CuHDeEGA.js → empty-wep5Q-1y.js} +1 -1
- package/dist/assets/{emptyVideoElement-L6eqPJfK.js → emptyVideoElement-DpJB9lfW.js} +1 -1
- package/dist/assets/{epic-BNVHfQUa.js → epic-CMMVrD8V.js} +1 -1
- package/dist/assets/getLocaleForTenant-BlHoz8HV.js +1 -0
- package/dist/assets/{index-CpBFmiLM.js → index-BCcxTJng.js} +1 -1
- package/dist/assets/{index-CAO2_lCc.js → index-BWo_N8M7.js} +1 -1
- package/dist/assets/{index-DFEZoheE.js → index-CsPK-ZcF.js} +2 -2
- package/dist/assets/{index-ChMtRDkl.js → index-D5j-ijm9.js} +14700 -14610
- package/dist/assets/{index-BKmj_VFp.js → index-Dn-dGYDp.js} +1 -1
- package/dist/assets/{index-CDftMuwg.js → index-DnBq3nCg.js} +1 -1
- package/dist/assets/{index-D5HjsaAE.js → index-yb_kldBQ.js} +1 -1
- package/dist/assets/{lexical-Blenvqjv.js → lexical-CVfRQHxx.js} +1 -1
- package/dist/assets/{liveblocks-ypyKWtbM.js → liveblocks-DiLJJ0-W.js} +1 -1
- package/dist/assets/{lottie-xwOlCP2t.js → lottie-DGoffhx5.js} +1 -1
- package/dist/assets/{mui-D35VurIR.js → mui-Bs_Wx3U8.js} +1 -1
- package/dist/assets/{pathToGoBack-DEbgHxxX.js → pathToGoBack-BrzgfZOY.js} +1 -1
- package/dist/assets/{pdf-B5d6xxqf.js → pdf-Cq31LyOe.js} +4 -4
- package/dist/assets/{pdf-lib-CUHgD73m.js → pdf-lib-CKEHYQuo.js} +1 -1
- package/dist/assets/{plaid-O0aD-5ib.js → plaid-CT0unNLB.js} +1 -1
- package/dist/assets/{pusher-C48G4Qny.js → pusher-BDivubpF.js} +1 -1
- package/dist/assets/{react-DBFLdS1u.js → react-AIza423u.js} +1 -1
- package/dist/assets/{react-BHZphYxv.js → react-B22DUlFC.js} +1 -1
- package/dist/assets/{react-DDnuJ4gm.js → react-CQHBdAiW.js} +1 -1
- package/dist/assets/{react-BaFEg--9.js → react-D12Thgxw.js} +1 -1
- package/dist/assets/{react-DlX6KwOM.js → react-D3IfLVtg.js} +1 -1
- package/dist/assets/{react-DOxDWALt.js → react-x856Ci_R.js} +1 -1
- package/dist/assets/{recharts-CSEhqlTE.js → recharts-CreyyBLx.js} +1 -1
- package/dist/assets/{routePaths-nlWWZ4ZI.js → routePaths-Cu41oBox.js} +1 -1
- package/dist/assets/{sentry-ylIvhyeZ.js → sentry-CRXtNjzG.js} +1 -1
- package/dist/assets/{url-D6aOj1HL.js → url-DraJKqO-.js} +1 -1
- package/dist/assets/{url-BUH-dUKP.js → url-arGh5ZAs.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-ZQtgg5zD.js +1 -0
- package/dist/assets/{useDeviceId-BJs7B5gi.js → useDeviceId-B5nwTsrh.js} +1 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-wbg5b6I3.js +1 -0
- package/dist/assets/{useInitialThreadRequest-BFAN9HG0.js → useInitialThreadRequest-BJAnehMw.js} +1 -1
- package/dist/assets/{utils-0qzBiEB0.js → utils-CfmtJLRd.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-Bon_8p_2.js → withTransactionSidePanel-LH23g840.js} +2 -2
- package/dist/assets/{zeni-epic-state-DQMIbKEE.js → zeni-epic-state-4sJL0-hG.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/AddressRoutes-edSf0Hzf.js +0 -1
- package/dist/assets/AddressScreen-DXP1i7x7.js +0 -9
- package/dist/assets/BillPayApprovalRoutes-DHaXtrYO.js +0 -1
- package/dist/assets/CompanyPassportScreen-CuARsPx2.js +0 -1
- package/dist/assets/ConnectionAuthScreen-D7jj-mBL.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-DXLFxrq4.js +0 -1
- package/dist/assets/DashboardRoutes-e4wGQnEi.js +0 -20
- package/dist/assets/DrawerScreen-CdRI1pWE.js +0 -1
- package/dist/assets/FeaturePreviewScreen-pIQ4X1aP.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-BVyspHCV.js +0 -12
- package/dist/assets/MobileAppDrawer-D23D-DVK.js +0 -1
- package/dist/assets/NotFoundScreen-BU5ZWYfy.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-CA3r2X18.js +0 -1
- package/dist/assets/PerformanceRoutes-jV3YHfcW.js +0 -1
- package/dist/assets/RewardsRoutes-91uVLC96.js +0 -1
- package/dist/assets/ScreenRoutes-CqLlqtvw.js +0 -2
- package/dist/assets/SignInScreen-DUy4fwRG.js +0 -1
- package/dist/assets/SignOutScreen-DvIN_1Oz.js +0 -9
- package/dist/assets/TaskListScreen-DyrjcDli.js +0 -9
- package/dist/assets/TaskRoutes-BW1P-Ij8.js +0 -9
- package/dist/assets/TransactionDetailRoutes-BmJCEPNE.js +0 -1
- package/dist/assets/WiseConfirmationScreen-Dv2If-yw.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-BhyQMG6S.js +0 -9
- package/dist/assets/getLocaleForTenant-CpmXipgh.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-IrvXJbyC.js +0 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-kulIc847.js +0 -1
package/dist/assets/{TransactionDetailScreen---9iPrdg.js → TransactionDetailScreen-DaK6ceRt.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{j as I}from"./liveblocks-
|
|
1
|
+
import{j as I}from"./liveblocks-DiLJJ0-W.js";import{a as d}from"./sentry-CRXtNjzG.js";import{h as K,g as S,u as re,j as le,l as de,N as Ke,k as je}from"./core-PVb_PTOa.js";import{bm as Me,eM as W,cM as ue,bu as me,pf as H,Jn as B,Ko as pe,Kp as Y,JN as he,jx as fe,Kq as ge,JS as Q,JT as X,km as Se,Gv as Z,Jh as _,jr as Te,jp as ye,jB as $e,Kr as Je,Ks as qe,t4 as G,jw as ve,FS as Ce,cS as We,cT as He,Kt as Ye,Jg as Qe,Ku as Xe,t8 as Ze,Kv as ea,Kw as aa,Kx as ta,Ky as na,Kz as oa,jA as sa,KA as ia,KB as ca,Ji as ra,KC as la,KD as da,KE as ua,FM as ma,FA as pa,G2 as ha,jC as fa,Gw as ie,FJ as ga}from"./zeni-epic-state-4sJL0-hG.js";import{z as Ee,n as ee,l as V,aI as De,h as Sa,K as Ta,aJ as ya,C as va,p as J,j as Ca,aK as Ea,r as q,I as Da,d as be,aL as ba,ao as Ia,O as $}from"./index-D5j-ijm9.js";import{n as ka,S as Aa,D as Ua}from"./mui-Bs_Wx3U8.js";import{u as xa}from"./useAskAiCfoHostNavButtonProps-ZQtgg5zD.js";import{c as _a}from"./useFetchSuggestedQuestionsWhenReady-wbg5b6I3.js";import{d as Ie}from"./decodeURIComponentSafe-mU8LeJGH.js";import{h as ke,g as Va,d as wa,b as Fa}from"./routePaths-Cu41oBox.js";import{t as Ba}from"./utils-CfmtJLRd.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]="2aacb774-4b7e-4ca3-b8f7-b678c0b1f171",a._sentryDebugIdIdentifier="sentry-dbid-2aacb774-4b7e-4ca3-b8f7-b678c0b1f171")}catch{}})();const ae=()=>{const a=Ee.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(V.isChainOfThoughtEnabled);return d.useMemo(()=>Me(a)&&s,[a,s])};function Ae(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 Za(a,e){const s=K(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>W(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(V.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:b}=t(V.isExpenseAutomationEnabled),{configValue:h}=n(De.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,k=ae(),y=d.useMemo(()=>({id:a,type:H(e)}),[a,e]),m=S(u=>B(u,y)),D=S(u=>{const N=B(u,y)?.transactionDetailLocalData.vendorUpdates?.id;return N==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[N]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Ae(m?.transaction):void 0,[m?.fetchState,m?.transaction]),C=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),A=S(u=>Y(u)),w=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),j=o.company?.companyInfo.firstMonthOfFY??1,M=S(u=>fe(u.accountState,u.accountListState,"accountList")),[P,F]=d.useState(!1),[L,v]=d.useState(!1),[c,O]=d.useState(!1);d.useEffect(()=>{F(!1),v(!1),O(!1)},[a,e]);const E=d.useCallback(()=>{F(!1),v(!1)},[]),[U,x]=d.useState(!1),z=w?.selectedPeriod?.timePeriod;return d.useEffect(()=>{c||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),O(!0)),p!=null&&(!i||l&&g===!1)&&(P?L||C==null||(v(!0),s(Z(p,"TransactionDetail",{timeframe:"month",timePeriod:z??C}))):(s(Q()),s(X()),F(!0),s(Se(p))))},[s,c,m?.fetchState,m?.transaction,p,i,l,g,P,L,C,z]),d.useEffect(()=>{A.newVendorState?.vendorDetailLocalData?.vendorName!=null?x(!0):x(!1)},[A.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(_("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:T,isExpenseAutomationEnabled:b,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:k,selectedTransaction:y,transactionDetail:m,vendorSaveStatus:D,tranEntity:p,defaultTrendTransactionTimePeriod:C,vendorViewDetails:A,uiState:w,firstMonthOfFY:j,uncategorizedAccounts:M,resetTrendIsFetchedStates:E,isCreateVendorDrawerOpen:U,setIsCreateVendorDrawerOpen:x}}const Pa={overlayWidth:new va(100,100,58)},La=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=Sa(),i=Ta(),l=K(),g=S(h=>Y(h)),T=()=>{t()},b={vendorDetailView:n??g,onSaveSuccess:()=>{l(ye()),l($e("Not-Started")),s()},onSaveVendor:e,onCancelClick:T,saveVendorDetailLocalData:h=>{l(Te({vendorId:void 0,localData:h}))}};return I.jsx(Ua,{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:I.jsx(Oa,{onClick:h=>h.stopPropagation(),children:I.jsx(ya,{...b})})})},Oa=ka(Aa)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
5
|
-
`,za=({closeDrawerHandler:a,overrideTransactionId:e,overrideTransactionType:s})=>{const t=re(),n=le(),o=K(),i=ae(),{transactionTypeEncoded:l,transactionId:g}=de(),T=e??g,b=s??Ie(l??"");let h;ke(T,b)&&(h={id:T,type:H(b)});const f=h!=null?S(y=>B(y,h)):void 0,k=()=>{const y=J(t.state?.pathnameStackToGoBack),m=y.poppedPathname??((D=2)=>{let p="../";for(let E=0;E<D;E++)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??""},D={transactionId:{id:f?.transaction?.id,type:f?.transaction?.type},transaction:f?.transaction,lineIds:f?.transaction?.lines?.map(p=>p.id)??[]};o(G(m,f?.transaction?.amount.amount,D,!1,!1,i))}k()},onCancel:()=>{h!=null&&o(Je({transactionId:h})),o(ye()),o(qe()),a(!0),k()}}},Na=je(function(a,e){const s=B(a,e.selectedTransaction);let t;s==null&&console.warn("Check if the you've selected the transaction before getting the details");const n=Ce.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=W(a);return{transactionDetail:s,transactionAttachmentEndpointToDownload:`${$}/transaction_attachment`,transactionAttachmentsEndpointToFetch:T.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${$}/transaction_attachments_accounting_provider`:`${$}/transaction_attachments`,attachmentUploadEndpoint:`${Ia.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:i,trendReport:t,analytics:be,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:l,entityAutoCompleteView:g},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails")}},function(a,e){const{isCOTEnabled:s}=e;return{onBackClick:()=>{if(a(_("common")),e.onBackClick!=null)return void e.onBackClick();const t=J(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(ga({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:t,customerId:n}))},onTransactionClick:t=>{e.resetTrendIsFetchedStates(),a(Q()),a(X());const n=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(wa(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(Z(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):fa({transactionId:t,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:n,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled})),a(_("common"))},onUploadAttachmentAttachment:t=>{a(ha(t))},onDeleteAttachment:t=>{e.transaction!=null&&a(pa(t,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(t,n)=>{a(ma({transactionId:t,transactionLocalData:n}))},onUpdateAllChecked:(t,n,o,i)=>{e.transaction!=null&&a(ua(e.selectedTransaction,e.transaction,t,n,o,i))},onResetLineItemsCategoryClassInLocalData:(t,n,o,i,l,g)=>{a(da(t,n,o,i,l,g))},onChangeCategoryClassWhenUpdateAllIsChecked:(t,n)=>{e.transaction!=null&&a(la({id:e.transaction.id,type:e.transaction.type},e.transaction,t,n))},onSaveSuccess:()=>{const t=J(e.location.state?.pathnameStackToGoBack);if(t.poppedPathname!=null){const n=Ba(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=`${Va(e.tenantEmailDomain)}`;e.navigate(i)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const i=`${Fa(e.tenantEmailDomain)}`;e.navigate(i)}}},onPageRefresh:()=>{a(Ee(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?a(ra({searchString:t,entityType:n,searchOrigin:"common"})):t.trim().length===0&&a(_("common"))},onCancelAutoComplete:()=>{a(_("common"))}},onFetchRecommendationsForEntity:(t,n,o,i)=>{a(G(t,n,o,i,!1,s))},clearRecommendationForLineId:t=>{const{transactionId:n,transaction:o,lineId:i}=t;a(ca(n,o,i))},resetUpdateErrorState:()=>{const t={id:e.selectedTransaction.id,type:e.selectedTransaction.type};a(ia(t))},onSaveVendorInLocalData:(t,n,o,i,l)=>{if(a(sa({transactionId:t,vendorUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(G(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(oa({transactionId:t,customerUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(G(o,i,l,!1,!1,s))},onUpdateAllTranactionsWithCurrentVendorChecked:t=>{a(na({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:t}))},onClickUpdateVendorToAllLineItems:(t,n,o)=>{a(ta(t,n,o))},onResetVendorToAllLineItems:(t,n,o)=>{a(aa(t,n,o))},saveLatestSelectedEntity:(t,n,o)=>{a(ea({transactionId:t,lineId:n,entity:o}))},updateVendorBulkRecommendationsFetchStatus:(t,n)=>{a(Ze(t,n))},setIsVendorUpdateAllChecked:(t,n,o)=>{a(Xe(t,n,o))}}})(ba);function et(){const a=le(),e=K(),s=re(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=Ea(),i=S(r=>W(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:b}=t(V.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:h}=t(V.isExpenseAutomationEnabled),{configValue:f}=n(De.enableUncategorizedExpenseCategory),k=f?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:y,transactionTypeEncoded:m,transactionId:D}=de(),[p,E]=d.useState(!1),A=Ie(m??""),F=ke(D,A),j=S(r=>r.transactionVendorViewState),M=ae(),{isFeatureEnabled:P}=t(V.isTransactionCommentingEnabled),w=o?.currentTenant?.companyId,L=o?.currentTenant?.companyName;let v;F&&(v={id:D,type:H(A)});const c=v!=null?S(r=>B(r,v)):void 0,O=c?.transactionDetailLocalData.vendorUpdates?.id!=null?j.editVendorStateById[c?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",C=c?.fetchState==="Completed"?Ae(c?.transaction):void 0,U=S(r=>C!=null?pe(r.customerIncomeState,r.vendorExpenseState,r.trendState,C,"month"):void 0),x=S(r=>Y(r)),z=S(r=>C!=null?he(r.trendWithTransactionsState,C,"TransactionDetail"):void 0),u=i.company?.companyInfo.firstMonthOfFY??1,N=S(r=>fe(r.accountState,r.accountListState,"accountList")),[xe,te]=d.useState(!1),[_e,ne]=d.useState(!1),[Ve,Fe]=d.useState(!1),oe=()=>{te(!1),ne(!1)},we=Ca();d.useEffect(()=>{if(v!=null&&c!=null&&c.fetchState==="Not-Started")e(Ee(v)),oe();else if(v!=null&&c!=null&&c.fetchState==="Error"){const r=q(s.state?.pathnameStackToGoBack,s.pathname),R={pathnameStackToGoBack:r,message:"pageNotFound",origin:"transaction_detail"};we&&(R.message="expenseAutomation",R.origin="transaction_categorization",R.pathnameStackToGoBack=r),a("page-not-found",{replace:!0,state:R})}},[v]),d.useEffect(()=>{Ve||c==null||c.transaction==null||(e(ge({id:c.transaction.id,type:c.transaction.type})),Fe(!0)),C==null&&c?.fetchState==="Completed"&&ce(c?.transaction),C!=null&&(!l||g&&T===!1)&&(xe?_e||U==null||(ne(!0),e(Z(C,"TransactionDetail",{timeframe:"month",timePeriod:z?.selectedPeriod?.timePeriod??U}))):(e(Q()),e(X()),ce(c?.transaction),te(!0),e(Se(C))))},[c?.fetchState,c?.transaction,U,l]),d.useEffect(()=>{x.newVendorState?.vendorDetailLocalData?.vendorName!=null?E(!0):E(!1)},[x.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{e(_("common"))},[]);const Be=[m,D].filter(r=>r!=null),{transactionId:se,onSaveVendor:Pe,onSaveSuccess:Le,onCancel:Oe}=za({closeDrawerHandler:r=>{E(!1),a(r?"../":"../..")}}),{isAiCfoOpen:ze,setIsAiCfoOpen:Ne}=Da(),{isAiCfoAccessEnabled:Re,onAskAiCfoClick:Ge}=xa({isAiCfoOpen:ze,setIsAiCfoOpen:Ne,mobileExploreReferrer:"Transaction Details"});return _a({isDataReady:c?.fetchState==="Completed"}),F?I.jsxs(I.Fragment,{children:[se!=null&&p&&I.jsx(La,{isOpen:p,transactionId:se,onSaveVendor:Pe,onSaveSuccess:Le,onCancel:Oe}),I.jsx(Na,{hideDeleteAttachment:!0,firstMonthOfFY:u,isDisabled:c?.transaction?.type==="transfer"&&o?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:y,location:s,navigate:a,selectedTransaction:v,entity:C,isCOTEnabled:M,defaultTrendTransactionTimePeriod:U,resetTrendIsFetchedStates:oe,transaction:c?.transaction,uncategorizedAccounts:N,vendorSaveStatus:O,isVendorBulkUpdateOnTransactionEnabled:b,isExpenseAutomationEnabled:h,isUncategorizedExpenseCategoryEnabled:k,isAiCfoAccessEnabled:Re,onAskAiCfoClick:Ge,isTransactionCommentingEnabled:P,companyId:w,companyName:L})]}):I.jsx(Ke,{to:Ue(Be.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}=Ra(a),t=Ga(a);be.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))}},Ra=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}},Ga=a=>We(a)===!0?a.customer?.name??"":He(a)===!0?a.vendor?.name??"":a.memo!=null?a.memo:a.type;export{La as C,et as T,za as a,Na as b,ae as c,Za as u};
|
|
5
|
+
`,za=({closeDrawerHandler:a,overrideTransactionId:e,overrideTransactionType:s})=>{const t=re(),n=le(),o=K(),i=ae(),{transactionTypeEncoded:l,transactionId:g}=de(),T=e??g,b=s??Ie(l??"");let h;ke(T,b)&&(h={id:T,type:H(b)});const f=h!=null?S(y=>B(y,h)):void 0,k=()=>{const y=J(t.state?.pathnameStackToGoBack),m=y.poppedPathname??((D=2)=>{let p="../";for(let C=0;C<D;C++)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??""},D={transactionId:{id:f?.transaction?.id,type:f?.transaction?.type},transaction:f?.transaction,lineIds:f?.transaction?.lines?.map(p=>p.id)??[]};o(G(m,f?.transaction?.amount.amount,D,!1,!1,i))}k()},onCancel:()=>{h!=null&&o(Je({transactionId:h})),o(ye()),o(qe()),a(!0),k()}}},Na=je(function(a,e){const s=B(a,e.selectedTransaction);let t;s==null&&console.warn("Check if the you've selected the transaction before getting the details");const n=Ee.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=W(a);return{transactionDetail:s,transactionAttachmentEndpointToDownload:`${$}/transaction_attachment`,transactionAttachmentsEndpointToFetch:T.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${$}/transaction_attachments_accounting_provider`:`${$}/transaction_attachments`,attachmentUploadEndpoint:`${Ia.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:i,trendReport:t,analytics:be,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:l,entityAutoCompleteView:g},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails")}},function(a,e){const{isCOTEnabled:s}=e;return{onBackClick:()=>{if(a(_("common")),e.onBackClick!=null)return void e.onBackClick();const t=J(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(ga({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:t,customerId:n}))},onTransactionClick:t=>{e.resetTrendIsFetchedStates(),a(Q()),a(X());const n=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(Fa(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(Z(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):fa({transactionId:t,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:n,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled})),a(_("common"))},onUploadAttachmentAttachment:t=>{a(ha(t))},onDeleteAttachment:t=>{e.transaction!=null&&a(pa(t,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(t,n)=>{a(ma({transactionId:t,transactionLocalData:n}))},onUpdateAllChecked:(t,n,o,i)=>{e.transaction!=null&&a(ua(e.selectedTransaction,e.transaction,t,n,o,i))},onResetLineItemsCategoryClassInLocalData:(t,n,o,i,l,g)=>{a(da(t,n,o,i,l,g))},onChangeCategoryClassWhenUpdateAllIsChecked:(t,n)=>{e.transaction!=null&&a(la({id:e.transaction.id,type:e.transaction.type},e.transaction,t,n))},onSaveSuccess:()=>{const t=J(e.location.state?.pathnameStackToGoBack);if(t.poppedPathname!=null){const n=Ba(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=`${Va(e.tenantEmailDomain)}`;e.navigate(i)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const i=`${wa(e.tenantEmailDomain)}`;e.navigate(i)}}},onPageRefresh:()=>{a(Ce(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?a(ra({searchString:t,entityType:n,searchOrigin:"common"})):t.trim().length===0&&a(_("common"))},onCancelAutoComplete:()=>{a(_("common"))}},onFetchRecommendationsForEntity:(t,n,o,i)=>{a(G(t,n,o,i,!1,s))},clearRecommendationForLineId:t=>{const{transactionId:n,transaction:o,lineId:i}=t;a(ca(n,o,i))},resetUpdateErrorState:()=>{const t={id:e.selectedTransaction.id,type:e.selectedTransaction.type};a(ia(t))},onSaveVendorInLocalData:(t,n,o,i,l)=>{if(a(sa({transactionId:t,vendorUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(G(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(oa({transactionId:t,customerUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(G(o,i,l,!1,!1,s))},onUpdateAllTranactionsWithCurrentVendorChecked:t=>{a(na({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:t}))},onClickUpdateVendorToAllLineItems:(t,n,o)=>{a(ta(t,n,o))},onResetVendorToAllLineItems:(t,n,o)=>{a(aa(t,n,o))},saveLatestSelectedEntity:(t,n,o)=>{a(ea({transactionId:t,lineId:n,entity:o}))},updateVendorBulkRecommendationsFetchStatus:(t,n)=>{a(Ze(t,n))},setIsVendorUpdateAllChecked:(t,n,o)=>{a(Xe(t,n,o))}}})(ba);function et(){const a=le(),e=K(),s=re(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=Ca(),i=S(r=>W(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:b}=t(V.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:h}=t(V.isExpenseAutomationEnabled),{configValue:f}=n(De.enableUncategorizedExpenseCategory),k=f?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:y,transactionTypeEncoded:m,transactionId:D}=de(),[p,C]=d.useState(!1),A=Ie(m??""),w=ke(D,A),j=S(r=>r.transactionVendorViewState),M=ae(),{isFeatureEnabled:P}=t(V.isTransactionCommentingEnabled),F=o?.currentTenant?.companyId,L=o?.currentTenant?.companyName;let v;w&&(v={id:D,type:H(A)});const c=v!=null?S(r=>B(r,v)):void 0,O=c?.transactionDetailLocalData.vendorUpdates?.id!=null?j.editVendorStateById[c?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",E=c?.fetchState==="Completed"?Ae(c?.transaction):void 0,U=S(r=>E!=null?pe(r.customerIncomeState,r.vendorExpenseState,r.trendState,E,"month"):void 0),x=S(r=>Y(r)),z=S(r=>E!=null?he(r.trendWithTransactionsState,E,"TransactionDetail"):void 0),u=i.company?.companyInfo.firstMonthOfFY??1,N=S(r=>fe(r.accountState,r.accountListState,"accountList")),[xe,te]=d.useState(!1),[_e,ne]=d.useState(!1),[Ve,we]=d.useState(!1),oe=()=>{te(!1),ne(!1)},Fe=Ea();d.useEffect(()=>{if(v!=null&&c!=null&&c.fetchState==="Not-Started")e(Ce(v)),oe();else if(v!=null&&c!=null&&c.fetchState==="Error"){const r=q(s.state?.pathnameStackToGoBack,s.pathname),R={pathnameStackToGoBack:r,message:"pageNotFound",origin:"transaction_detail"};Fe&&(R.message="expenseAutomation",R.origin="transaction_categorization",R.pathnameStackToGoBack=r),a("page-not-found",{replace:!0,state:R})}},[v]),d.useEffect(()=>{Ve||c==null||c.transaction==null||(e(ge({id:c.transaction.id,type:c.transaction.type})),we(!0)),E==null&&c?.fetchState==="Completed"&&ce(c?.transaction),E!=null&&(!l||g&&T===!1)&&(xe?_e||U==null||(ne(!0),e(Z(E,"TransactionDetail",{timeframe:"month",timePeriod:z?.selectedPeriod?.timePeriod??U}))):(e(Q()),e(X()),ce(c?.transaction),te(!0),e(Se(E))))},[c?.fetchState,c?.transaction,U,l]),d.useEffect(()=>{x.newVendorState?.vendorDetailLocalData?.vendorName!=null?C(!0):C(!1)},[x.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{e(_("common"))},[]);const Be=[m,D].filter(r=>r!=null),{transactionId:se,onSaveVendor:Pe,onSaveSuccess:Le,onCancel:Oe}=za({closeDrawerHandler:r=>{C(!1),a(r?"../":"../..")}}),{isAiCfoOpen:ze,setIsAiCfoOpen:Ne}=Da(),{isAiCfoAccessEnabled:Re,onAskAiCfoClick:Ge}=xa({isAiCfoOpen:ze,setIsAiCfoOpen:Ne,mobileExploreReferrer:"Transaction Details"});return _a({isDataReady:c?.fetchState==="Completed"}),w?I.jsxs(I.Fragment,{children:[se!=null&&p&&I.jsx(La,{isOpen:p,transactionId:se,onSaveVendor:Pe,onSaveSuccess:Le,onCancel:Oe}),I.jsx(Na,{hideDeleteAttachment:!0,firstMonthOfFY:u,isDisabled:c?.transaction?.type==="transfer"&&o?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:y,location:s,navigate:a,selectedTransaction:v,entity:E,isCOTEnabled:M,defaultTrendTransactionTimePeriod:U,resetTrendIsFetchedStates:oe,transaction:c?.transaction,uncategorizedAccounts:N,vendorSaveStatus:O,isVendorBulkUpdateOnTransactionEnabled:b,isExpenseAutomationEnabled:h,isUncategorizedExpenseCategoryEnabled:k,isAiCfoAccessEnabled:Re,onAskAiCfoClick:Ge,isTransactionCommentingEnabled:P,companyId:F,companyName:L})]}):I.jsx(Ke,{to:Ue(Be.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}=Ra(a),t=Ga(a);be.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))}},Ra=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}},Ga=a=>We(a)===!0?a.customer?.name??"":He(a)===!0?a.vendor?.name??"":a.memo!=null?a.memo:a.type;export{La as C,et as T,za as a,Na as b,ae as c,Za as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-ypyKWtbM.js";import{j as U,u as w,h as q,l as H,g as L,N as z,k as Q,n as Ae,o as v}from"./core-CBFn_Yo_.js";import{eM as R,iL as T,NL as Z,Gm as ue,bp as ie,NM as he,jm as K,JP as W,NN as se,NO as Se,bB as x,Gj as me,NP as ke,NQ as re,NR as Ie,NS as pe,NT as be,NU as ve,NV as de,Hz as Ye,bm as xe}from"./zeni-epic-state-DQMIbKEE.js";import{O as X,c as B,c5 as ee,m as _,p as te,r as fe,d as J,G as Pe,z as Ee}from"./index-ChMtRDkl.js";import"./mui-D35VurIR.js";import{a as A}from"./sentry-ylIvhyeZ.js";import{w as ae}from"./withTransactionSidePanel-Bon_8p_2.js";import{p as ne,b as ce}from"./routePaths-nlWWZ4ZI.js";import{u as Le}from"./utils-0qzBiEB0.js";import{d as E}from"./decodeURIComponentSafe-CqMC__af.js";import{Z as je}from"./ZeniAccountStatementScreen-BhyQMG6S.js";import"./recharts-CSEhqlTE.js";import"./analytics-B3Q4UmLh.js";import"./plaid-O0aD-5ib.js";import"./dnd-1A4kYEBz.js";import"./stripe-DMRn4zHo.js";import"./lottie-xwOlCP2t.js";import"./lexical-Blenvqjv.js";import"./pdf-B5d6xxqf.js";import"./useAskAiCfoHostNavButtonProps-IrvXJbyC.js";import"./useFetchSuggestedQuestionsWhenReady-kulIc847.js";import"./TransactionDetailScreen---9iPrdg.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]="98816b84-43dd-4838-99c2-ad9aa1f78e8c",a._sentryDebugIdIdentifier="sentry-dbid-98816b84-43dd-4838-99c2-ad9aa1f78e8c")}catch{}})();const G=a=>Le(a),Me=Q(function(a,e){const t=he(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,G(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=X.getLocalizedStrings(),r=G(e.selectedAccount.tranListType),s=Be(t,n,c,r,e.bookCloseDate);B.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(se({uiState:{dateRange:s},type:G(e.selectedAccount.tranListType)})),a(ue(r,T(s),!1,r==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(T(s))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(se({uiState:{scrollYOffset:t},type:G(e.selectedAccount.tranListType)}))}}})(ee),F=ae(function({...a}){const e=U(),t=w(),n=q(),c=t.pathname.substring(t.pathname.lastIndexOf("/")+1),{tenantEmailDomain:o}=H(),r=X.getLocalizedStrings(),{accountType:s,title:u,subTitle:h}=Ce(c),D="month",g=L(p=>R(p)),Y=g.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:y,initialTimeframeTick:S}=ze(c,Y,g.bookCloseDate),[k,j]=A.useState(!1),[M,P]=A.useState(void 0),m=A.useMemo(()=>{const p=T(S);return{tranListType:c,accountType:Z(s),title:u,subTitle:h,timeframe:D,period:p}},[c,D,s,y]);A.useEffect(()=>{if(!k&&m!=null){j(!0),B.trackTransactionList(void 0,void 0,void 0,m.title);const p=G(m.tranListType);n(ue(p,m.period,!0,p==="missingReceipts"?r.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[k,m,n]);let I=m;return m!=null&&M!=null&&(I={...m,period:M}),I==null?i.jsx(z,{to:"../"}):i.jsx(Me,{firstMonthOfFY:Y,tenantEmailDomain:o,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:y,navigate:e,selectedAccount:I,referrerType:c,bookCloseDate:g.bookCloseDate,onSelectedTimePeriodChange:p=>P(p),...a})}),Ce=a=>{let e="",t="",n="";const c=X.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=c.uncategorizedTransactionList.income.title,n=c.uncategorizedTransactionList.income.subTitle;break;case"uncategorized-expense":e="expenses",t=c.uncategorizedTransactionList.expense.title,n=c.uncategorizedTransactionList.expense.subTitle;break;case"miscategorized-expense":e="expenses",t=c.miscategorizedTransactionList.expense.title,n=c.miscategorizedTransactionList.expense.subTitle;break;case"miscategorized-income":e="income",t=c.miscategorizedTransactionList.income.title,n=c.miscategorizedTransactionList.income.subTitle;break;case"missing-receipts":t=c.uncategorizedTransactionList.missingReceipt.title,n=c.uncategorizedTransactionList.missingReceipt.subTitle}return{accountType:e,title:t,subTitle:n}},ze=(a,e,t)=>{const n=ie();let c=ie().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:ne(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Be=(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},Oe=Q(function(a,e){const t=ke(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:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Te();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)}`),B.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(me(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ee),Fe=ae(function({referrerType:a,...e}){const t=U(),n=w(),c=q(),{tenantEmailDomain:o,accountTypeEncoded:r,accountIdEncoded:s,classIdEncoded:u,timeframe:h,startDate:D,endDate:g,titleEncoded:Y}=H(),y=E(r??""),S=E(s??""),k=E(u??""),j=E(Y??""),M=L(f=>Se(f.transactionListState,S,y,k)),[P,m]=A.useState(!1),[I,p]=A.useState(void 0),N=L(f=>R(f)),$=N.company?.companyInfo.firstMonthOfFY??1;let d;const l=Ge(y,S,k,h,D,g,j);if(l){const f={startDate:x(D,"YYYY-MM-DD"),endDate:x(g,"YYYY-MM-DD")},V=Ne(M?.dateRange,f);d={accountId:S,accountType:Z(y),classId:k,title:j,timeframe:h,period:V}}A.useEffect(()=>{P||d==null||(m(!0),B.trackTransactionList(d.accountId,void 0,a,d.title),c(me(d.accountId,d.accountType,d.classId,d.period)))},[P,d,c]);let C=d;d!=null&&I!=null&&(C={...d,period:I});const O=[r,s,u,h,D,g,Y].filter(f=>f!=null);return l&&C!=null?i.jsx(Oe,{firstMonthOfFY:$,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:C,referrerType:a,onSelectedTimePeriodChange:f=>p(f),...e}):i.jsx(z,{to:Te(O.length)})}),Te=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ge=(a,e,t,n,c,o,r)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&x(c,"YYYY-MM-DD").isValid()&&x(o,"YYYY-MM-DD").isValid()&&r!=null,Ne=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),_e=Q(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ve(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??De();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)}`),B.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=$e(e.tenantEmailDomain),n=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ee),le=ae(function({referrerType:a,...e}){const t=U(),n=w(),c=q(),{tenantEmailDomain:o,accountTypeEncoded:r,accountIdEncoded:s,timeframe:u,startDate:h,endDate:D,titleEncoded:g,excludeSubAccounts:Y}=H(),y=E(r??""),S=E(s??""),k=E(g??""),j=!(Y!=null&&Y==="exclude_subaccounts"),M=L(b=>Ie(b.transactionListState,S,y)),[P,m]=A.useState(!1),[I,p]=A.useState(void 0),N=L(b=>R(b)),$=N.company?.featuresActivationInfo.connectedAccountProvider==="unit",d=N.company?.companyInfo.firstMonthOfFY??1;let l;const C=we(y,S,u,h,D,k);if(C){const b={startDate:x(h,"YYYY-MM-DD"),endDate:x(D,"YYYY-MM-DD")},ye=Re(M?.dateRange,b);l={accountId:S,accountType:Z(y),title:k,timeframe:u,period:ye}}let O=l;l!=null&&I!=null&&(O={...l,period:I});const{useFeatureGate:f}=fe(),{isFeatureEnabled:V}=f(J.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Pe();A.useEffect(()=>{!P&&l!=null&&oe&&(m(!0),B.trackTransactionList(l.accountId,void 0,a,l.title),c(pe(l.accountId,l.accountType,l.period,void 0,!1,j)))},[P,l,c,oe]);const ge=[r,s,u,h,D,g].filter(b=>b!=null);return C&&O!=null?i.jsx(_e,{firstMonthOfFY:d,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:$,isTransactionCommentingEnabled:V,selectedAccount:O,referrerType:a,onSelectedTimePeriodChange:b=>p(b),...e}):i.jsx(z,{to:De(ge.length)})}),De=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},we=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&x(n,"YYYY-MM-DD").isValid()&&x(c,"YYYY-MM-DD").isValid()&&o!=null,Re=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),$e=a=>`/${a}/transactions/${Ye}/statements`;function mt(){const a=w().state?.referrer,e=Ee.getSignedInUser(),t=xe(e),{useFeatureGate:n}=fe(),{isFeatureEnabled:c}=n(J.isExpenseAutomationEnabled),o=L(u=>u.expenseAutomationViewState.selectedPeriodByTenantId)[L(u=>R(u)).tenantId],{isFeatureEnabled:r}=n(J.isExpenseAutomationEnabledV2),s=r||c&&t;return i.jsxs(Ae,{children:[i.jsx(v,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:i.jsx(le,{referrerType:a})}),i.jsx(v,{path:"/zeni-clearing-account/statements",element:i.jsx(je,{})}),i.jsx(v,{path:"/*",element:i.jsx(le,{referrerType:a})}),i.jsx(v,{path:"/uncategorized-income/*",element:i.jsx(F,{})}),i.jsx(v,{path:"/uncategorized-expense/*",element:s?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/miscategorized-income/*",element:i.jsx(F,{})}),i.jsx(v,{path:"/miscategorized-expense/*",element:s?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/missing-receipts/*",element:s?i.jsx(z,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:i.jsx(Fe,{referrerType:a})})]})}export{mt as default};
|
|
1
|
+
import{j as i}from"./liveblocks-DiLJJ0-W.js";import{j as U,u as w,h as q,l as H,g as L,N as z,k as Q,n as Ae,o as v}from"./core-PVb_PTOa.js";import{eM as R,iL as T,NL as Z,Gm as ue,bp as ie,NM as he,jm as K,JP as W,NN as se,NO as Se,bB as x,Gj as me,NP as ke,NQ as re,NR as Ie,NS as pe,NT as be,NU as ve,NV as de,Hz as Ye,bm as xe}from"./zeni-epic-state-4sJL0-hG.js";import{D as X,d as B,c5 as ee,r as _,p as te,n as fe,l as J,J as Pe,z as Ee}from"./index-D5j-ijm9.js";import"./mui-Bs_Wx3U8.js";import{a as A}from"./sentry-CRXtNjzG.js";import{w as ae}from"./withTransactionSidePanel-LH23g840.js";import{p as ne,b as ce}from"./routePaths-Cu41oBox.js";import{u as Le}from"./utils-CfmtJLRd.js";import{d as E}from"./decodeURIComponentSafe-mU8LeJGH.js";import{Z as je}from"./ZeniAccountStatementScreen-CeIEeVha.js";import"./recharts-CreyyBLx.js";import"./analytics-BsMspvaD.js";import"./plaid-CT0unNLB.js";import"./dnd-DhtyOCgF.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGoffhx5.js";import"./lexical-CVfRQHxx.js";import"./pdf-Cq31LyOe.js";import"./useAskAiCfoHostNavButtonProps-ZQtgg5zD.js";import"./useFetchSuggestedQuestionsWhenReady-wbg5b6I3.js";import"./TransactionDetailScreen-DaK6ceRt.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]="2abc27e1-f163-4129-8a01-8852d731fb40",a._sentryDebugIdIdentifier="sentry-dbid-2abc27e1-f163-4129-8a01-8852d731fb40")}catch{}})();const G=a=>Le(a),Me=Q(function(a,e){const t=he(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,G(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=X.getLocalizedStrings(),r=G(e.selectedAccount.tranListType),s=Be(t,n,c,r,e.bookCloseDate);B.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(se({uiState:{dateRange:s},type:G(e.selectedAccount.tranListType)})),a(ue(r,T(s),!1,r==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(T(s))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(se({uiState:{scrollYOffset:t},type:G(e.selectedAccount.tranListType)}))}}})(ee),F=ae(function({...a}){const e=U(),t=w(),n=q(),c=t.pathname.substring(t.pathname.lastIndexOf("/")+1),{tenantEmailDomain:o}=H(),r=X.getLocalizedStrings(),{accountType:s,title:u,subTitle:h}=Ce(c),D="month",g=L(p=>R(p)),Y=g.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:y,initialTimeframeTick:S}=ze(c,Y,g.bookCloseDate),[k,j]=A.useState(!1),[M,P]=A.useState(void 0),m=A.useMemo(()=>{const p=T(S);return{tranListType:c,accountType:Z(s),title:u,subTitle:h,timeframe:D,period:p}},[c,D,s,y]);A.useEffect(()=>{if(!k&&m!=null){j(!0),B.trackTransactionList(void 0,void 0,void 0,m.title);const p=G(m.tranListType);n(ue(p,m.period,!0,p==="missingReceipts"?r.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[k,m,n]);let I=m;return m!=null&&M!=null&&(I={...m,period:M}),I==null?i.jsx(z,{to:"../"}):i.jsx(Me,{firstMonthOfFY:Y,tenantEmailDomain:o,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:y,navigate:e,selectedAccount:I,referrerType:c,bookCloseDate:g.bookCloseDate,onSelectedTimePeriodChange:p=>P(p),...a})}),Ce=a=>{let e="",t="",n="";const c=X.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=c.uncategorizedTransactionList.income.title,n=c.uncategorizedTransactionList.income.subTitle;break;case"uncategorized-expense":e="expenses",t=c.uncategorizedTransactionList.expense.title,n=c.uncategorizedTransactionList.expense.subTitle;break;case"miscategorized-expense":e="expenses",t=c.miscategorizedTransactionList.expense.title,n=c.miscategorizedTransactionList.expense.subTitle;break;case"miscategorized-income":e="income",t=c.miscategorizedTransactionList.income.title,n=c.miscategorizedTransactionList.income.subTitle;break;case"missing-receipts":t=c.uncategorizedTransactionList.missingReceipt.title,n=c.uncategorizedTransactionList.missingReceipt.subTitle}return{accountType:e,title:t,subTitle:n}},ze=(a,e,t)=>{const n=ie();let c=ie().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:ne(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Be=(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},Oe=Q(function(a,e){const t=ke(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:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Te();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)}`),B.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(me(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ee),Fe=ae(function({referrerType:a,...e}){const t=U(),n=w(),c=q(),{tenantEmailDomain:o,accountTypeEncoded:r,accountIdEncoded:s,classIdEncoded:u,timeframe:h,startDate:D,endDate:g,titleEncoded:Y}=H(),y=E(r??""),S=E(s??""),k=E(u??""),j=E(Y??""),M=L(f=>Se(f.transactionListState,S,y,k)),[P,m]=A.useState(!1),[I,p]=A.useState(void 0),N=L(f=>R(f)),$=N.company?.companyInfo.firstMonthOfFY??1;let d;const l=Ge(y,S,k,h,D,g,j);if(l){const f={startDate:x(D,"YYYY-MM-DD"),endDate:x(g,"YYYY-MM-DD")},V=Ne(M?.dateRange,f);d={accountId:S,accountType:Z(y),classId:k,title:j,timeframe:h,period:V}}A.useEffect(()=>{P||d==null||(m(!0),B.trackTransactionList(d.accountId,void 0,a,d.title),c(me(d.accountId,d.accountType,d.classId,d.period)))},[P,d,c]);let C=d;d!=null&&I!=null&&(C={...d,period:I});const O=[r,s,u,h,D,g,Y].filter(f=>f!=null);return l&&C!=null?i.jsx(Oe,{firstMonthOfFY:$,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:C,referrerType:a,onSelectedTimePeriodChange:f=>p(f),...e}):i.jsx(z,{to:Te(O.length)})}),Te=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ge=(a,e,t,n,c,o,r)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&x(c,"YYYY-MM-DD").isValid()&&x(o,"YYYY-MM-DD").isValid()&&r!=null,Ne=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),_e=Q(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ve(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??De();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)}`),B.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=$e(e.tenantEmailDomain),n=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ee),le=ae(function({referrerType:a,...e}){const t=U(),n=w(),c=q(),{tenantEmailDomain:o,accountTypeEncoded:r,accountIdEncoded:s,timeframe:u,startDate:h,endDate:D,titleEncoded:g,excludeSubAccounts:Y}=H(),y=E(r??""),S=E(s??""),k=E(g??""),j=!(Y!=null&&Y==="exclude_subaccounts"),M=L(b=>Ie(b.transactionListState,S,y)),[P,m]=A.useState(!1),[I,p]=A.useState(void 0),N=L(b=>R(b)),$=N.company?.featuresActivationInfo.connectedAccountProvider==="unit",d=N.company?.companyInfo.firstMonthOfFY??1;let l;const C=we(y,S,u,h,D,k);if(C){const b={startDate:x(h,"YYYY-MM-DD"),endDate:x(D,"YYYY-MM-DD")},ye=Re(M?.dateRange,b);l={accountId:S,accountType:Z(y),title:k,timeframe:u,period:ye}}let O=l;l!=null&&I!=null&&(O={...l,period:I});const{useFeatureGate:f}=fe(),{isFeatureEnabled:V}=f(J.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Pe();A.useEffect(()=>{!P&&l!=null&&oe&&(m(!0),B.trackTransactionList(l.accountId,void 0,a,l.title),c(pe(l.accountId,l.accountType,l.period,void 0,!1,j)))},[P,l,c,oe]);const ge=[r,s,u,h,D,g].filter(b=>b!=null);return C&&O!=null?i.jsx(_e,{firstMonthOfFY:d,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:$,isTransactionCommentingEnabled:V,selectedAccount:O,referrerType:a,onSelectedTimePeriodChange:b=>p(b),...e}):i.jsx(z,{to:De(ge.length)})}),De=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},we=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&x(n,"YYYY-MM-DD").isValid()&&x(c,"YYYY-MM-DD").isValid()&&o!=null,Re=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),$e=a=>`/${a}/transactions/${Ye}/statements`;function mt(){const a=w().state?.referrer,e=Ee.getSignedInUser(),t=xe(e),{useFeatureGate:n}=fe(),{isFeatureEnabled:c}=n(J.isExpenseAutomationEnabled),o=L(u=>u.expenseAutomationViewState.selectedPeriodByTenantId)[L(u=>R(u)).tenantId],{isFeatureEnabled:r}=n(J.isExpenseAutomationEnabledV2),s=r||c&&t;return i.jsxs(Ae,{children:[i.jsx(v,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:i.jsx(le,{referrerType:a})}),i.jsx(v,{path:"/zeni-clearing-account/statements",element:i.jsx(je,{})}),i.jsx(v,{path:"/*",element:i.jsx(le,{referrerType:a})}),i.jsx(v,{path:"/uncategorized-income/*",element:i.jsx(F,{})}),i.jsx(v,{path:"/uncategorized-expense/*",element:s?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/miscategorized-income/*",element:i.jsx(F,{})}),i.jsx(v,{path:"/miscategorized-expense/*",element:s?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/missing-receipts/*",element:s?i.jsx(z,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:i.jsx(Fe,{referrerType:a})})]})}export{mt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-
|
|
1
|
+
import{j as e}from"./liveblocks-DiLJJ0-W.js";import{j as B,u as M,h as U,l as O,g as f,N as L,k as N,n as Ie,o as k}from"./core-PVb_PTOa.js";import{ci as V,eM as D,Mx as P,D2 as ae,fb as W,CM as ne,Mz as we,D5 as Te,Mv as ke,Mw as se,MN as je,Bc as Ae,s1 as be,MB as Ee,Dg as ve,My as re,cL as Z,w7 as oe,eQ as De,eS as Fe,NI as Le,NJ as Be,CN as Me,NK as Ue,CO as Pe,CX as Re,bu as Oe,bC as Ne,ct as Ve,bD as _e,cN as ze,fa as $e,br as Ge,If as He,ch as We}from"./zeni-epic-state-4sJL0-hG.js";import{j as _,al as Ze,z as b,y as z,d as j,b_ as Ke,b$ as qe,c0 as H,K,h as Je,J as Qe,I as Xe,n as ie,l as v,C as Ye,B as et,c1 as tt,ao as q,r as at,c2 as nt,p as J,c3 as st,v as X,c4 as rt,a4 as ot}from"./index-D5j-ijm9.js";import{D as it,n as R,S as ct}from"./mui-Bs_Wx3U8.js";import lt from"./NotFoundScreen-DcJllQdb.js";import{S as Y}from"./SetupPagesScreen-DrJKLQxS.js";import{a as d}from"./sentry-CRXtNjzG.js";import{u as ut}from"./useAskAiCfoHostNavButtonProps-ZQtgg5zD.js";import{c as dt}from"./useFetchSuggestedQuestionsWhenReady-wbg5b6I3.js";import{M as ce}from"./MobileAppDrawer-DnUJz0tA.js";import{F as pt}from"./FeaturePreviewScreen-CiNRRJaO.js";import{a as ee}from"./analyticsHelper-CQJg2P3F.js";import"./recharts-CreyyBLx.js";import"./analytics-BsMspvaD.js";import"./plaid-CT0unNLB.js";import"./dnd-DhtyOCgF.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGoffhx5.js";import"./lexical-CVfRQHxx.js";import"./pdf-Cq31LyOe.js";import"./utils-CfmtJLRd.js";import"./routePaths-Cu41oBox.js";import"./BusinessVerificationPageScreen-BoEZFvFS.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]="86f6392f-5d92-40a0-91f4-7085d2c874a2",t._sentryDebugIdIdentifier="sentry-dbid-86f6392f-5d92-40a0-91f4-7085d2c874a2")}catch{}})();const mt=N(function(t,a){const{companyId:n}=a;return{treasurySetupView:P(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(Te(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}})(Ke);function ft(){const t=B(),a=M(),n=U(),{tenantEmailDomain:o}=O(),p=_(),r=f(T=>T.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=Ze(r),s=V(p?.loggedInUserRoleMap),[c,i]=d.useState(!1),[y,w]=d.useState(!1),[u,l]=d.useState(!1),g=f(T=>D(T)),h=b.getSignedInUserTenant(o)?.companyId??g.companyId,C=b.getSignedInUser(),S=f(T=>P(T,h)),I=f(T=>T.treasurySetupViewState.fetchState),x=f(T=>T.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(T=>T.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{c||I!=="Not-Started"||h==null||(i(!0),n(ae(h,!0,!1)))},[c,I,h,n]),d.useEffect(()=>{u||F!=="Not-Started"||h==null||(l(!0),n(W()))},[u,F,h,n]),d.useEffect(()=>{y||x!=="Not-Started"||h==null||(w(!0),n(ne()))},[y,x,h,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(L,{to:"../promo"});const E=g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||I!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(mt,{navigate:t,location:a,companyId:h,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const yt=N(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:je(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:P(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{H(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{H(a.analytics,"confirm",r,m,"Transfer"),t(ve())},onSaveChangesToLocalStore:s=>{t(Ee(s))},onFetchLinkTokenClick:s=>{t(be("treasury_setup",s))},onEstablishConnectionClick:s=>{t(Ae(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(qe),gt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=O(),o=U(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[c,i]=d.useState(!1),[y,w]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),l=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),g=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),h=f(x=>D(x)),C=b.getSignedInUserTenant(n)?.companyId??h.companyId,S=f(x=>ke(x)),I=f(x=>P(x,C));if(b.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||C==null||(s(!0),o(ae(C,!0,!1)))},[m,u,C,o]),d.useEffect(()=>{c||l!=="Not-Started"||C==null||(i(!0),o(W()))},[c,l,C,o]),d.useEffect(()=>{y||g!=="Not-Started"||C==null||(w(!0),o(ne()))},[y,g,C,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(yt,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:h,treasurySetupView:I,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{H(j,"review",S.treasuryTransferMoneyLocalData,I.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},ht=R.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,11 +6,11 @@ import{j as e}from"./liveblocks-ypyKWtbM.js";import{j as B,u as M,h as U,l as O,
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${t=>t.theme.colors.grey4};
|
|
9
|
-
`,St={overlayWidth:new Ye(100,100,48)},xt=N(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:P(t,o),downloadEndPoint:`${
|
|
9
|
+
`,St={overlayWidth:new Ye(100,100,48)},xt=N(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:P(t,o),downloadEndPoint:`${q.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:c=>{let i="page-not-found";c==="editPortfolio"?i=Ct(s):c==="statements"?i=It(s):c==="taxLetter"?i=wt(s):c==="settings"&&(i=Tt(s));const y=at(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:y}})},onColumnSortConfigChanged:(c,i)=>{t(Le({uiState:{sortKey:c,sortOrder:i}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}})(tt);function G({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=M(),o=B(),p=U(),r=K(),m=Je(),s=f(A=>D(A)),{tenantEmailDomain:c}=O(),i=s.companyId??b.getSignedInUserTenant(c)?.companyId,[y,w]=d.useState(!1),u=f(A=>re(A)),l=u.fetchState,g=u.accountSummary?.totalBalance?.amount,h=f(A=>A.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),C=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),I=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=V(S?.loggedInUserRoleMap),F=Z(S?.loggedInUserRoleMap),{areTenantIdsInSync:E}=Qe();d.useEffect(()=>{l==="Not-Started"&&!y&&E&&(w(!0),p(oe(!0)))},[y,p,l,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 T=()=>{o("..")},[le,ue]=d.useState(!1),Q=A=>{ue(A)},{isAiCfoOpen:de,setIsAiCfoOpen:pe}=Xe(),{isAiCfoAccessEnabled:me,onAskAiCfoClick:fe}=ut({isAiCfoOpen:de,setIsAiCfoOpen:pe,mobileExploreReferrer:"Treasury"});dt({isDataReady:l==="Completed"});const{useFeatureGate:$}=ie(),{isFeatureEnabled:ye}=$(v.isDebitCardFeatureEnabled),{isFeatureEnabled:ge}=$(v.isAutoTransferRuleEnabled),{isFeatureEnabled:he}=$(v.isTreasuryCommentingEnabled),Se=De(s),xe=Fe(ye,s);if(Se===!0&&xe!==!0)return e.jsx(pt,{});if(C){const A=h?.fetchState!=="Completed"||u.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[u.accountSummaryFetchState.fetchState==="Completed"&&h?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:j,onLoad:()=>{}}):null,e.jsx(it,{onClose:T,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:St.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(kt,{onClick:Ce=>Ce.stopPropagation(),children:[t===!0?e.jsx(gt,{isFirstTransfer:u.transactions.length===0||g===0}):null,a===!0?e.jsx(ft,{}):null]})}),e.jsxs(ht,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:Q}),e.jsx(xt,{treasuryDetailsView:u,isAutoTransferRuleEnabled:ge,navigate:o,currentTenant:s,location:n,companyId:i,analytics:j,isTreasuryCommentingEnabled:he,handleDrawerToggle:Q,isLoading:A,isAiCfoAccessEnabled:me,onAskAiCfoClick:fe})]})]})}return I&&x?e.jsx(L,{to:"../setup"}):s.companyTreasuryInfo?.info&&!I&&F?e.jsx(L,{to:"../promo",state:n.state}):e.jsx(et,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const Ct=t=>`/${t}/treasury/edit-portfolio`,It=t=>`/${t}/treasury/statements`,wt=t=>`/${t}/treasury/tax-letter`,Tt=t=>`/${t}/treasury/setup`,kt=R(ct)`
|
|
10
10
|
display: flex;
|
|
11
11
|
min-height: 100%;
|
|
12
12
|
flex-direction: column;
|
|
13
|
-
`,
|
|
13
|
+
`,jt=R.div`
|
|
14
14
|
display: flex;
|
|
15
15
|
height: 100vh;
|
|
16
16
|
width: 100%;
|
|
@@ -18,7 +18,7 @@ import{j as e}from"./liveblocks-ypyKWtbM.js";import{j as B,u as M,h as U,l as O,
|
|
|
18
18
|
flex-direction: column;
|
|
19
19
|
align-items: center;
|
|
20
20
|
background-color: ${t=>t.theme.colors.grey4};
|
|
21
|
-
`;function
|
|
21
|
+
`;function At(){const t=B(),a=U(),n=K(),o=M(),p=`${q.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Be(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Me(!1)))},[r,s.fetchState,a]);const c=b.getSignedInUser(),i=f(l=>D(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},w=i.company?.companyInfo.companyLegalName??i.companyName;if(c==null)throw Error("Can't access statements page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(jt,{windowSize:n,children:e.jsx(nt,{currentTenantCompanyName:w,statementListView:s,isLoading:u,onBackClick:()=>{const l=J(o.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const bt=R.div`
|
|
22
22
|
display: flex;
|
|
23
23
|
height: 100vh;
|
|
24
24
|
width: 100%;
|
|
@@ -26,7 +26,7 @@ import{j as e}from"./liveblocks-ypyKWtbM.js";import{j as B,u as M,h as U,l as O,
|
|
|
26
26
|
flex-direction: column;
|
|
27
27
|
align-items: center;
|
|
28
28
|
background-color: ${t=>t.theme.colors.grey4};
|
|
29
|
-
`;function Et(){const t=B(),a=K(),n=M(),o=U(),p=`${
|
|
29
|
+
`;function Et(){const t=B(),a=K(),n=M(),o=U(),p=`${q.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Ue(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Pe(!1)))},[r,s.fetchState,o]);const c=b.getSignedInUser(),i=f(l=>D(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},w=i.company?.companyInfo.companyLegalName??i.companyName;if(c==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(st,{currentTenantCompanyName:w,taxLetterListView:s,isLoading:u,onBackClick:()=>{const l=J(n.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const vt=N(function(t,a){const{companyId:n}=a,o=P(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"})}}})(rt),Dt=()=>{const t=B(),a=M(),n=U(),{tenantEmailDomain:o}=O(),[p,r]=d.useState(!1),m=f(S=>D(S)),[s,c]=d.useState(!1),i=f(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);d.useEffect(()=>{s||i?.fetchState!=="Not-Started"||y==null||(c(!0),n(W()))},[i,n]);const y=b.getSignedInUserTenant(o)?.companyId??m.companyId,w=b.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,l=S=>{r(S)};if(w==null)throw Error("Can't access treasury promo page without signing in...");const g=_(),h=V(g?.loggedInUserRoleMap),C=Z(g?.loggedInUserRoleMap);if(u&&h)return e.jsx(L,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&h||C)){if(a.state?.message==="activation"){const S=J(a.state?.pathnameStackToGoBack);t(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:S.newStack}})}return i?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:S=>(I=>I.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:l}),e.jsx(vt,{analytics:j,navigate:t,companyId:y,onClickMenuIcon:()=>{l(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=R.div`
|
|
30
30
|
display: flex;
|
|
31
31
|
width: 100%;
|
|
32
32
|
height: 100%;
|
|
@@ -34,4 +34,4 @@ import{j as e}from"./liveblocks-ypyKWtbM.js";import{j as B,u as M,h as U,l as O,
|
|
|
34
34
|
justify-content: center;
|
|
35
35
|
align-items: center;
|
|
36
36
|
background-color: ${t=>t.theme.colors.grey5};
|
|
37
|
-
`;function ta(){const t=M(),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&&Oe(a?.userRole),c=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Ne(r?.loggedInUserRoleMap),i=Ve(r?.loggedInUserRoleMap),y=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&_e(r?.loggedInUserRoleMap),{isFeatureEnabled:w}=n(v.isDepositAccountsFeatureEnabled),u=w&&!s&&ze(r?.loggedInUserRoleMap),l=a.company!=null&&$e(a.company),g=o&&l===!0&&!s&&V(r?.loggedInUserRoleMap),{isFeatureEnabled:h}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:C}=n(v.isDebitCardFeatureEnabled),S=ot(a,h,C)&&!s&&Ge(r?.loggedInUserRoleMap),I=He(r?.loggedInUserRoleMap),x=We(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(Ie,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:I,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:I,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(Dt,{})}),e.jsx(k,{path:"statements",element:e.jsx(
|
|
37
|
+
`;function ta(){const t=M(),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&&Oe(a?.userRole),c=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Ne(r?.loggedInUserRoleMap),i=Ve(r?.loggedInUserRoleMap),y=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&_e(r?.loggedInUserRoleMap),{isFeatureEnabled:w}=n(v.isDepositAccountsFeatureEnabled),u=w&&!s&&ze(r?.loggedInUserRoleMap),l=a.company!=null&&$e(a.company),g=o&&l===!0&&!s&&V(r?.loggedInUserRoleMap),{isFeatureEnabled:h}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:C}=n(v.isDebitCardFeatureEnabled),S=ot(a,h,C)&&!s&&Ge(r?.loggedInUserRoleMap),I=He(r?.loggedInUserRoleMap),x=We(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(Ie,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:I,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:I,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(Dt,{})}),e.jsx(k,{path:"statements",element:e.jsx(At,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(Et,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx(G,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),g?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(lt,{})})]}):p&&g?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{ta as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-
|
|
1
|
+
import{j as l}from"./liveblocks-DiLJJ0-W.js";import{a as g}from"./sentry-CRXtNjzG.js";import{j as M,u as q,l as J,g as S,k as G,h as Y,n as nt,o as B,N as K}from"./core-PVb_PTOa.js";import{eM as O,Jd as Ee,Je as Ue,fK as ee,co as be,cp as ke,uI as ft,Jf as st,uM as Yt,Hq as te,jm as ae,uG as qt,uA as Ht,Jg as Ne,us as Qt,ur as Wt,ul as Zt,ux as Xt,uN as ea,Jh as pe,Ji as Me,ut as ta,Jj as he,eX as gt,v0 as vt,uV as xt,Jk as Tt,nO as Ct,uQ as yt,uO as Dt,Jl as It,v7 as Et,v4 as bt,uR as kt,v6 as Ge,FS as wt,Jm as aa,Jn as na,cr as sa,Jo as oa,Jp as la,Jq as me,Jr as ce,Js as we,Hr as $e,vm as ye,Hp as De,v9 as At,uJ as Ke,Jt as ia,Hs as Q,Ju as ze,uD as ca,Jv as da,Jw as ra,Jx as Ye,Jy as qe,Jz as He,JA as Qe,vg as Ae,JB as jt,uZ as Ft,JC as ua,JD as pa,JE as ha,JF as ma,JG as Sa,JH as fa,JI as ga,JJ as va,sd as xa,se as Ta,Gw as Fe,JK as Ca,JL as ya,iL as Pe,bp as Da,JM as Ia,JN as Ea,kk as ba,kt as ka,Gv as _e,bB as ot,JO as Pt,Gb as _t,JP as wa,JQ as Aa,JR as ja,kv as Fa,JS as lt,JT as it,JU as ct,JV as dt,JW as Pa,kr as _a,JX as Va,ku as La,JY as Oa,JZ as Vt,GS as Lt,jK as Ba,J_ as Ja,J$ as Ve,K0 as Ot,GQ as Bt,xz as Ra,K1 as Ua,K2 as Na,k2 as Jt,K3 as Ma,K4 as Ga,H2 as $a,pV as Ka,K5 as Rt,K6 as rt,G$ as Le,K7 as ut,K8 as za,H4 as Ya,K9 as qa,Ka as Ha,Kb as Qa,Kc as Wa,Kd as Za,pY as Xa,Ke as en,Ht as tn,Kf as an,GJ as Oe,gt as nn,Kg as sn,Kh as on,gr as ln,Ki as cn,Kj as dn,xD as rn,Kk as un,Kl as pn,Km as hn,Kn as mn,jO as Sn,bm as fn,eS as gn,eQ as vn}from"./zeni-epic-state-4sJL0-hG.js";import{z as R,al as Be,B as Ut,y as Z,d as P,O as X,ar as xn,r as N,D as Ie,x as de,as as We,at as Tn,au as Cn,p as Ze,av as yn,h as Dn,K as re,C as Xe,n as ne,l as z,aw as In,k as et,I as Se,ax as En,ay as Nt,J as bn,az as kn,j as wn,aA as An,ao as Mt,aB as jn,o as W,S as Fn,F as Gt,W as Pn,aC as _n,aD as Vn,g as tt,aE as Ln,aF as On,m as Bn,aG as Jn,aH as Rn}from"./index-D5j-ijm9.js";import{n as U,D as Un,S as $t}from"./mui-Bs_Wx3U8.js";import{t as Nn,A as Mn}from"./AddressScreen-DbfnfF3g.js";import ie from"./NotFoundScreen-DcJllQdb.js";import{F as Gn}from"./FeaturePreviewScreen-CiNRRJaO.js";import{b as H,v as at,c as $n}from"./routePaths-Cu41oBox.js";import{p as Kt}from"./pathToGoBack-BrzgfZOY.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-ZQtgg5zD.js";import{c as ge}from"./useFetchSuggestedQuestionsWhenReady-wbg5b6I3.js";import{M as ve}from"./MobileAppDrawer-DnUJz0tA.js";import{D as Kn}from"./DrawerScreen-C7f_NiZk.js";import{g as zn,m as Yn}from"./accountMappingHelper-DdMTXagH.js";import"./recharts-CreyyBLx.js";import"./analytics-BsMspvaD.js";import"./plaid-CT0unNLB.js";import"./dnd-DhtyOCgF.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGoffhx5.js";import"./lexical-CVfRQHxx.js";import"./pdf-Cq31LyOe.js";import"./utils-CfmtJLRd.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]="daaebf6f-0aaa-47d0-9514-3ac4d3790c3f",e._sentryDebugIdIdentifier="sentry-dbid-daaebf6f-0aaa-47d0-9514-3ac4d3790c3f")}catch{}})();const qn=Ie.getLocalizedStrings(),Hn=G(function(e,a){const s=Ue(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(st({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(st({selectedTransaction:void 0})),e(Yt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${H(n,a.tenantEmailDomain)}`,c=N(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(ft(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(xn),Qn=({setShouldNavigateBack:e})=>{const a=M(),s=q(),{scheduleDetailId:t,tenantEmailDomain:n}=J(),{scheduleType:o}=J();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>O(f)),d=Ee(o)??"accrued_expenses",u=R.getSignedInUser();if(u==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=>Ue(f,d)),m=i.selectedJELinkRowIndex,r=S(f=>ee(f,c.companyId)),p=Be(i.updateStatus.fetchState);g.useEffect(()=>{p==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[p,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 h=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Ut,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[h===!0?l.jsx(Z,{analytics:P,onLoad:()=>{Wn(i,d,r)}}):null,l.jsx(Hn,{signedInUser:u,attachmentEndPoint:`${X}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:d,navigate:a,analytics:P,controllerUserDetails:r,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},zt=e=>{const a=qn.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,d=c.some(m=>m.isRecommendedTransaction===!0),u=be(s.controllers),i=ke(s.controllerUserIds);t!=null&&P.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...zt(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:d,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:u,controllerUserIds:i})},Zn=U.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-DiLJJ0-W.js";import{a as f}from"./sentry-CRXtNjzG.js";import{q as u,h,g as y,N as I}from"./core-PVb_PTOa.js";import{Iz as w,eN as b,yU as x}from"./zeni-epic-state-4sJL0-hG.js";import{z as l,B as j,F as S,W as D}from"./index-D5j-ijm9.js";import{n as g}from"./mui-Bs_Wx3U8.js";import"./recharts-CreyyBLx.js";import"./analytics-BsMspvaD.js";import"./plaid-CT0unNLB.js";import"./dnd-DhtyOCgF.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGoffhx5.js";import"./lexical-CVfRQHxx.js";import"./pdf-Cq31LyOe.js";import"./utils-CfmtJLRd.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]="e4f33014-799f-4f9d-940e-9aae53060925",e._sentryDebugIdIdentifier="sentry-dbid-e4f33014-799f-4f9d-940e-9aae53060925")}catch{}})();const A=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[n,m]=f.useState(!1),a=h(),i=y(c=>w(c)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return b(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(m(!0),a(x(t,p,s)))},[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},E=g.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
|
+
`,_=g(D.LargeRegular)`
|
|
10
|
+
display: flex;
|
|
11
|
+
color: ${S.important};
|
|
12
|
+
`;export{A as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-
|
|
1
|
+
import{j as n}from"./liveblocks-DiLJJ0-W.js";import{j as G,u as W,h as N,l as Z,g as A,k as Y,N as ne,n as $e,o as C}from"./core-PVb_PTOa.js";import{eM as V,Nn as ke,No as Ze,cN as te,ci as He,fa as Ge,w5 as we,Ai as We,v$ as Fn,Np as Rn,Nq as Un,w2 as Ln,w9 as Ce,vY as Mn,vV as zn,Ma as pe,Nr as Nn,DC as Vn,Jg as _n,DE as $n,k3 as Fe,Ns as Zn,pA as Ye,po as Je,jW as Ke,jZ as Re,Jh as Ue,Ji as Hn,Nt as Gn,jY as Wn,kj as Yn,jN as Jn,ij as Kn,ii as Qn,Nu as qn,Nv as xe,Dj as Xn,Nw as et,Nx as nt,M3 as De,Ny as Le,Nz as tt,DP as at,MN as ot,Bc as Qe,s1 as qe,NA as st,DM as it,NB as Xe,cJ as Ie,DT as en,fb as rt,eQ as nn,eS as Se,DR as ct,B6 as lt,DJ as dt,NC as tn,ND as an,Dl as on,Dv as Me,NE as ut,Dp as pt,NF as mt,MC as ht,DU as gt,bu as ft,bC as yt,ct as Ct,bD as xt,br as At,If as kt}from"./zeni-epic-state-4sJL0-hG.js";import{j as ae,n as $,z as w,l as O,h as L,B as oe,bO as wt,O as be,K as _,C as J,p as sn,al as Dt,aa as ze,d as U,bP as It,ao as je,bQ as St,y as me,bR as bt,g as ve,aI as H,bS as jt,J as vt,I as rn,a7 as Et,bT as Ne,bU as Pt,r as ee,bV as Tt,bW as Bt,bX as Ot,bY as Ft,a4 as Rt,o as Ut}from"./index-D5j-ijm9.js";import{n as M,D as K,S as Q}from"./mui-Bs_Wx3U8.js";import ue from"./NotFoundScreen-DcJllQdb.js";import{S as Ve}from"./SetupPagesScreen-DrJKLQxS.js";import{F as cn}from"./FeaturePreviewScreen-CiNRRJaO.js";import{a as d}from"./sentry-CRXtNjzG.js";import{M as he}from"./MobileAppDrawer-DnUJz0tA.js";import{A as Lt,D as Mt,V as zt}from"./DomesticWireDetailScreen-B8McV8L1.js";import{A as Nt}from"./AddressScreen-DbfnfF3g.js";import{u as ln}from"./useAskAiCfoHostNavButtonProps-ZQtgg5zD.js";import{c as dn}from"./useFetchSuggestedQuestionsWhenReady-wbg5b6I3.js";import{Z as Vt}from"./ZeniAccountStatementScreen-CeIEeVha.js";import"./recharts-CreyyBLx.js";import"./analytics-BsMspvaD.js";import"./plaid-CT0unNLB.js";import"./dnd-DhtyOCgF.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGoffhx5.js";import"./lexical-CVfRQHxx.js";import"./pdf-Cq31LyOe.js";import"./utils-CfmtJLRd.js";import"./analyticsHelper-CQJg2P3F.js";import"./routePaths-Cu41oBox.js";import"./BusinessVerificationPageScreen-BoEZFvFS.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]="21a04188-7345-43df-a0e6-a675353966e3",e._sentryDebugIdIdentifier="sentry-dbid-21a04188-7345-43df-a0e6-a675353966e3")}catch{}})();const _t=M.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,15 +6,15 @@ import{j as n}from"./liveblocks-ypyKWtbM.js";import{j as H,u as W,h as N,l as Z,
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,$t=Y(function(e){return{autoTransferRuleView:
|
|
9
|
+
`,$t=Y(function(e){return{autoTransferRuleView:ke(e),downloadAccountDetailEndPoint:`${be}/account_details`,transferLimit:5e5,depositAccountListView:We(e.depositAccountState,e.depositAccountListState)}},function(e,t){const{navigate:s,handleDrawerToggle:o}=t;return{onBackClick:()=>{s("..")},onClickMenuIcon:()=>{o(!0)},onFetchAutoTransferRules:a=>{e(we(a))},onCreateRule:()=>{e(zn())},onUpdateRule:a=>{e(Ce(a))},onDeleteClick:a=>{e(Mn(a))},onPauseClick:a=>{e(Ce(a,!0,!1))},onResumeClick:a=>{e(Ce(a,!1,!0))},onActivityClick:(a,i)=>{e(Ln(a,i))},onUpdateRuleLocalData:a=>{e(Un(a))},clearRuleLocalData:()=>{e(Rn())},onEditClick:a=>{s(`./${a}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{e(Fn())}}})(wt);function _e({isEditDrawerOpen:e}){const t=G(),s=W(),o=N(),a=ae(),{ruleId:i,tenantEmailDomain:l}=Z(),{useFeatureGate:c}=$(),[u,h]=d.useState(!1),[x,r]=d.useState(!1),p=A(S=>V(S)),m=A(S=>ke(S)),g=m?.fetchState??"Not-Started",j=A(S=>Ze(S)),y=p?.companyId??w.getSignedInUserTenant(l)?.companyId,k=te(a?.loggedInUserRoleMap)||He(a?.loggedInUserRoleMap),{isFeatureEnabled:I}=c(O.isTreasuryEnabled),f=p?.company!=null&&Ge(p.company),D=I&&f,T=w.getSignedInUser(),z=p.tenantId,F={userId:T?.userId??"",sessionId:T?.zeniSessionId??"",tenantId:z??""};d.useEffect(()=>{!x&&g==="Not-Started"&&y&&(r(!0),o(we(!0)))},[x,g,y,o]);const v=S=>{h(S)},P=L(),B=!!s.state?.scrollToAddRule;return m?.fetchState!=="Completed"?n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:P.colors.grey5}}):n.jsxs(_t,{children:[n.jsx(he,{isAppContentDrawerOpen:u,handleDrawerToggle:v}),n.jsx($t,{navigate:t,location:s,currentTenant:p,handleDrawerToggle:v,isEditDrawerOpen:e,editingRuleId:i,authParams:F,includeTreasuryOption:D,hasAdminLevelAccess:k,zeniAccountsConfigDetail:j,scrollToAddRule:B})]})}const Zt={overlayWidth:new J(100,100,58)},Ht=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=N(),a=L(),i=_();if(w.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(K,{onClose:()=>{s(!0),o(pe())},anchor:"right",open:t,PaperProps:{style:{width:Zt.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Gt,{onClick:l=>l.stopPropagation(),children:n.jsx(Lt,{vendorIdParam:e,accountContext:"express-pay"})})})},Gt=M(Q)`
|
|
10
10
|
display: flex;
|
|
11
11
|
min-height: 100%;
|
|
12
12
|
flex-direction: column;
|
|
13
|
-
`,Wt={overlayWidth:new J(100,100,58)},Yt=({isDrawerOpen:e,closeDrawerHandler:t})=>{const s=N(),o=L(),a=_();if(
|
|
13
|
+
`,Wt={overlayWidth:new J(100,100,58)},Yt=({isDrawerOpen:e,closeDrawerHandler:t})=>{const s=N(),o=L(),a=_();if(w.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(K,{onClose:()=>{t(!0),s(pe())},anchor:"right",open:e,PaperProps:{style:{width:Wt.overlayWidth.valuePercentage(a),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Jt,{onClick:i=>i.stopPropagation(),children:n.jsx(Nt,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Jt=M(Q)`
|
|
14
14
|
display: flex;
|
|
15
15
|
min-height: 100%;
|
|
16
16
|
flex-direction: column;
|
|
17
|
-
`,Kt={overlayWidth:new J(100,100,58)},Qt=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=N(),a=L(),i=_();if(
|
|
17
|
+
`,Kt={overlayWidth:new J(100,100,58)},Qt=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=N(),a=L(),i=_();if(w.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(K,{onClose:()=>{s(!0),o(pe())},anchor:"right",open:t,PaperProps:{style:{width:Kt.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(qt,{onClick:l=>l.stopPropagation(),children:n.jsx(Mt,{vendorIdParam:e,accountContext:"express-pay"})})})},qt=M(Q)`
|
|
18
18
|
display: flex;
|
|
19
19
|
min-height: 100%;
|
|
20
20
|
flex-direction: column;
|
|
@@ -26,15 +26,15 @@ import{j as n}from"./liveblocks-ypyKWtbM.js";import{j as H,u as W,h as N,l as Z,
|
|
|
26
26
|
flex-direction: column;
|
|
27
27
|
align-items: center;
|
|
28
28
|
background-color: ${e=>e.theme.colors.grey4};
|
|
29
|
-
`,ea=Y(function(e,t){const s=V(e),o=
|
|
29
|
+
`,ea=Y(function(e,t){const s=V(e),o=w.getSignedInUser(),a=s.tenantId,i={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:a??""},l=t.expressPayDetails,c=e.entityAutoCompleteState.autoCompleteText.common,u=_n(e,"common");return{expressPayDetails:l,fileProps:{authParams:i,filesEndPoint:`${je.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:u},analytics:t.analytics}},function(e,t){const{navigate:s}=t;return{onSaveVendor:o=>{e(Qn(o,void 0,void 0,!0))},saveVendorDetailLocalData:(o,a)=>{e(Re({vendorId:a,localData:o}))},saveExpressPayLocalData:o=>{e(Kn({localData:o}))},onVendorSelected:o=>{o!=null&&e(Jn(o,!1))},updateSelectedVendorForCreate:o=>{e(Yn(o))},initializeVendorAddress:()=>{e(Wn())},resetVendorSaveStatus:o=>{e(Gn({vendorId:o}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,a)=>{o.trim().length>=2?e(Hn({searchString:o,entityType:a,searchOrigin:"common"})):o.trim().length===0&&e(Ue("common"))},onCancelAutoComplete:()=>{e(Ue("common"))}},chooseNewVendor:o=>{e(Re({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(Ke({files:o}))},onDeleteFile:o=>{e(Je(o))},onEditFileName:(o,a)=>{e(Ye(o,a.split(".")[0]))},onBackClick:o=>{o!=null&&e(Fe(o)),e(Fe()),e(Zn()),e(pe()),s("../",{relative:"path"})},onSchedulePayment:()=>{e($n())}}})(It);function le({isAddACHDrawerOpen:e,isAddWireDrawerOpen:t,isAddAddressDrawerOpen:s}){const o=G(),a=W(),i=N(),[l,c]=d.useState(!1),{tenantEmailDomain:u}=Z(),h=ae(),x=L(),r=A(E=>E.expressPayState.fetchState),p=A(E=>V(E)),m=A(E=>Nn(E)),g=m.expressPayLocalData?.vendorId,j=p.companyId??w.getSignedInUserTenant(u)?.companyId,[y,k]=d.useState(!1),[I,f]=d.useState(!1),[D,T]=d.useState(!1),z=sn(a.state?.pathnameStackToGoBack),{poppedPathname:F}=z,v=F?.split("/"),P=v?.[v.length-1];d.useEffect(()=>{e===!0?k(!0):(k(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{t===!0?f(!0):(f(!1),document.body.style.overflow="auto")},[t]),d.useEffect(()=>{s===!0?T(!0):(T(!1),document.body.style.overflow="auto")},[s]),d.useEffect(()=>{r==="Not-Started"&&i(Vn(!0,!0))},[r,i]);const B=Dt(m.vendorViewDetails.bankAccountCreationState?.fetchState);if(d.useEffect(()=>{B==="In-Progress"&&m.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&b()},[B,m.vendorViewDetails.bankAccountCreationState?.fetchState]),w.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const S=E=>{c(E)},b=()=>{k(!1),f(!1),o("../",{relative:"path"})};return m.fetchState==="Completed"?n.jsxs(Xt,{children:[ze(a)?n.jsx(he,{isAppContentDrawerOpen:l,handleDrawerToggle:S}):null,y===!0?n.jsx(Ht,{vendorId:g,closeDrawerHandler:b,isDrawerOpen:y}):null,I===!0?n.jsx(Qt,{vendorId:g,closeDrawerHandler:b,isDrawerOpen:I}):null,D===!0?n.jsx(Yt,{closeDrawerHandler:b,isDrawerOpen:D}):null,n.jsx(zt,{vendorId:g,isExpressPayPage:!0}),n.jsx(ea,{navigate:o,location:a,companyId:j,accountId:P,analytics:U,currentTenant:p,vendorId:g,roleMap:h?.loggedInUserRoleMap,isSettings:ze(a),expressPayDetails:m,onClickMenuIcon:()=>{S(!0)}})]}):n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:x.colors.grey5}})}const na={overlayWidth:new J(100,100,58)},ta=({authParams:e,downloadAccountDetailEndPoint:t,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:o,closeDrawerHandler:a})=>{const i=L(),l=_(),c=A(r=>Ze(r)),u=A(r=>V(r));if(w.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const h=()=>{a(!0)},x={depositAccount:o,onDismissClick:h,zeniAccountsConfigDetail:c,authParams:e,downloadAccountDetailEndPoint:t,currentTenant:u};return n.jsx(K,{anchor:"right",open:s,PaperProps:{style:{width:na.overlayWidth.valuePercentage(l),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>h(),children:n.jsx(aa,{onClick:r=>r.stopPropagation(),children:n.jsx(St,{...x})})})},aa=M(Q)`
|
|
30
30
|
display: flex;
|
|
31
31
|
min-height: 100%;
|
|
32
32
|
flex-direction: column;
|
|
33
|
-
`,oa={overlayWidth:new J(100,100,58)},un=({isCheckDepositDrawerOpen:e,closeDrawerHandler:t})=>{const s=L(),o=_(),a=N(),i=A(r=>V(r)),l=
|
|
33
|
+
`,oa={overlayWidth:new J(100,100,58)},un=({isCheckDepositDrawerOpen:e,closeDrawerHandler:t})=>{const s=L(),o=_(),a=N(),i=A(r=>V(r)),l=w.getSignedInUser(),c=i.tenantId,u={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:c??""};if(l==null)throw Error("Can't access check deposit page without signing in...");const h=A(r=>qn(r)),x={analytics:U,checkDeposit:h,filesEndPoint:`${je.fileMicroServiceBaseUrl}`,authParams:u,onSaveChangesToLocalStore:r=>{a(et(r))},updateFilesEntity:r=>{a(Ke({files:r}))},onAnotherTransferClick:()=>{a(xe())},onDeleteFile:r=>{a(Je(r))},onEditFileName:(r,p)=>{a(Ye(r,p.split(".")[0]))},onCheckDpositClick:()=>{a(Xn())},onDismissClick:()=>{t(!0),a(xe())}};return n.jsxs(n.Fragment,{children:[n.jsx(me,{analytics:U,onLoad:r=>(p=>p.trackPageLoaded(ve.Event.accountsDepositCheckFormViewed))(r)}),n.jsx(K,{anchor:"right",open:e,PaperProps:{style:{width:oa.overlayWidth.valuePercentage(o),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(r,p)=>(p==="backdropClick"||p==="escapeKeyDown")&&(t(!0),void a(xe())),children:n.jsx(sa,{onClick:r=>r.stopPropagation(),children:n.jsx(bt,{...x})})})]})},sa=M(Q)`
|
|
34
34
|
display: flex;
|
|
35
35
|
min-height: 100%;
|
|
36
36
|
flex-direction: column;
|
|
37
|
-
`,ia={overlayWidth:new J(100,100,58)},ra=Y(function(e,t){const s=t.currentTenant?.companyId;return{plaidConnectionDetails:ot(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:We(e.depositAccountState,e.depositAccountListState)}},function(e,t){return{onReviewClick:()=>e(it()),clearReviewTransferDetail:()=>e(st()),onFetchLinkTokenClick:s=>{e(qe("external_account",s))},onEstablishConnectionClick:s=>{e(Qe(s,t.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(
|
|
37
|
+
`,ia={overlayWidth:new J(100,100,58)},ra=Y(function(e,t){const s=t.currentTenant?.companyId;return{plaidConnectionDetails:ot(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:We(e.depositAccountState,e.depositAccountListState)}},function(e,t){return{onReviewClick:()=>e(it()),clearReviewTransferDetail:()=>e(st()),onFetchLinkTokenClick:s=>{e(qe("external_account",s))},onEstablishConnectionClick:s=>{e(Qe(s,t.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(jt),pn=({isTransferDrawerOpen:e,authParams:t,downloadAccountDetailEndPoint:s,closeDrawerHandler:o,zeniAccountsConfig:a})=>{const i=A(f=>nt(f)),l=A(f=>V(f)),c=L(),u=_(),h=N(),{accountId:x}=Z(),[r,p]=d.useState("achTransfer"),[m,g]=d.useState(!1);if(w.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:j}=$(),{configValue:y}=j(H.zeniAccountsConfig),k=De(y),I=()=>{o(!0),h(Le())};return d.useEffect(()=>{i.reviewTransferDetail.fetchState==="Completed"&&g(!0)},[g,i.reviewTransferDetail.fetchState]),n.jsxs(n.Fragment,{children:[n.jsx(me,{analytics:U,onLoad:f=>(D=>D.trackPageLoaded(ve.Event.zeniAccountsTransferFormViewed))(f)}),n.jsx(K,{onClose:()=>{(r==="achTransfer"&&m===!1||r==="achTransfer"&&m&&i.fetchState==="Completed")&&I()},anchor:"right",open:e,PaperProps:{style:{width:ia.overlayWidth.valuePercentage(u),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(ca,{onClick:f=>f.stopPropagation(),children:n.jsx(ra,{analytics:U,transferDetails:i,authParams:t,downloadAccountDetailEndPoint:s,onTransferClick:()=>{U.trackTransferBetweenAccountsFormClicked("Transfer",i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",i.transferDetailLocalData.transferFrom?.label,i.transferDetailLocalData.transferTo?.label,i.transferDetailLocalData.amount.amount,i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,i.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,i.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&i.transferDetailLocalData.transferTo?.accType==="depositAccount"&&a.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&i.transferDetailLocalData.amount.amount>a.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),h(at(x))},onDismissClick:I,onSaveChangesToLocalStore:f=>{h(tt(f))},onAnotherTransferClick:()=>{g(!1),h(Le())},currentTenant:l,zeniAccountsConfigDetail:a,currentDrawerContent:r,setCurrentDrawerContent:p,showReviewContent:m,setShowReviewContent:g,onBackClick:()=>{},maxInsuredAmount:k.maxInsuredAmount})})})]})},ca=M(Q)`
|
|
38
38
|
display: flex;
|
|
39
39
|
min-height: 100%;
|
|
40
40
|
flex-direction: column;
|
|
@@ -46,7 +46,7 @@ import{j as n}from"./liveblocks-ypyKWtbM.js";import{j as H,u as W,h as N,l as Z,
|
|
|
46
46
|
flex-direction: column;
|
|
47
47
|
align-items: center;
|
|
48
48
|
background-color: ${e=>e.theme.colors.grey4};
|
|
49
|
-
`,da=Y(function(e,t){return{zeniAccountListView:Xe(e),isExpressPayEnabled:t.isExpressPayEnabled,analytics:t.analytics}},function(e,t){const{navigate:s,currentTenant:o,location:a,companyId:i,handleDrawerToggle:l,analytics:c,isBillPayEnabled:u,isDebitCardFeatureEnabled:h}=t,{tenantEmailDomain:x}=o;return{onZeniAccountClick:(r,p)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",p,"active");const m=ua(x,r),g=ee(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:g}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(en(!1))},handleMoveMoneyOptionSelection:(r,p)=>{let m="page-not-found";r==="sendMoney"&&(m=fn(x)),r==="payBill"?m=mn(o,u,h):r==="transfer"?(m=hn(x),p!=null&&e(tn(p))):r==="checkDeposit"&&(m=gn(x));const g=ee(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:g}})},unlinkPaymentAccount:(r,p)=>{c.trackAccountsListPageClicked("Unlink Account",p),e(dt(r))},onFetchLinkTokenClick:(r,p)=>{e(qe("external_account",r,p))},onUpdatePaymentAccountStatus:(r,p,m)=>{e(lt(r,p,"zeni_accounts","external_account",m))},onEstablishConnectionClick:r=>{e(Qe(r,i,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:r=>{e(ct(r))},onClickMenuIcon:()=>{l(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:r=>{r?s("./auto-transfer",{state:{...a.state,scrollToAddRule:!0}}):s("./auto-transfer")}}})(Pt);function Ae({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t}){const s=W(),o=
|
|
49
|
+
`,da=Y(function(e,t){return{zeniAccountListView:Xe(e),isExpressPayEnabled:t.isExpressPayEnabled,analytics:t.analytics}},function(e,t){const{navigate:s,currentTenant:o,location:a,companyId:i,handleDrawerToggle:l,analytics:c,isBillPayEnabled:u,isDebitCardFeatureEnabled:h}=t,{tenantEmailDomain:x}=o;return{onZeniAccountClick:(r,p)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",p,"active");const m=ua(x,r),g=ee(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:g}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(en(!1))},handleMoveMoneyOptionSelection:(r,p)=>{let m="page-not-found";r==="sendMoney"&&(m=fn(x)),r==="payBill"?m=mn(o,u,h):r==="transfer"?(m=hn(x),p!=null&&e(tn(p))):r==="checkDeposit"&&(m=gn(x));const g=ee(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:g}})},unlinkPaymentAccount:(r,p)=>{c.trackAccountsListPageClicked("Unlink Account",p),e(dt(r))},onFetchLinkTokenClick:(r,p)=>{e(qe("external_account",r,p))},onUpdatePaymentAccountStatus:(r,p,m)=>{e(lt(r,p,"zeni_accounts","external_account",m))},onEstablishConnectionClick:r=>{e(Qe(r,i,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:r=>{e(ct(r))},onClickMenuIcon:()=>{l(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:r=>{r?s("./auto-transfer",{state:{...a.state,scrollToAddRule:!0}}):s("./auto-transfer")}}})(Pt);function Ae({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t}){const s=W(),o=G(),a=N(),i=_(),{tenantEmailDomain:l}=Z(),{useDynamicConfig:c,useFeatureGate:u}=$(),h=L(),{configValue:x}=c(H.zeniAccountsConfig),{isFeatureEnabled:r}=u(O.isTreasuryEnabled),{isFeatureEnabled:p}=u(O.isDebitCardFeatureEnabled),{isFeatureEnabled:m}=u(O.isAutoTransferRuleEnabled),{isFeatureEnabled:g}=u(O.isCheckingCommentingEnabled),j=De(x),y=A(R=>V(R)),k=y.companyId??w.getSignedInUserTenant(l)?.companyId,{configValue:I}=c(H.expressPayConfig),f=I.is_enable_all_tenants===!0||I.tenant_ids!=null&&I.tenant_ids.includes(y.tenantId),[D,T]=d.useState(!1),[z,F]=d.useState(!1),[v,P]=d.useState(!1),[B,S]=d.useState(!1),b=A(R=>Xe(R)),E=b.fetchState,se=A(R=>ke(R)),ie=se?.fetchState??"Not-Started",ge=!!y.companyZeniAccountInfo?.info?.isZeniAccountEnabled,re=ae(),ce=!!y.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,q=!!y.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,X=te(re?.loggedInUserRoleMap),yn=Ie(re?.loggedInUserRoleMap),Cn=!!y.companyBillPayInfo?.info?.isBillPayEnabled,Ee=w.getSignedInUser(),xn={userId:Ee?.userId??"",sessionId:Ee?.zeniSessionId??"",tenantId:y.tenantId??""},An=`${be}/account_details`,{areTenantIdsInSync:Pe}=vt();d.useEffect(()=>{!D&&Pe&&(T(!0),a(en(!1)))},[D,a,E,Pe]),d.useEffect(()=>{!z&&ie==="Not-Started"&&k&&(F(!0),a(we(!0)))},[z,ie,k,a]),d.useEffect(()=>{e!=null&&e===!0?P(!0):(P(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{S(t!=null&&t===!0)},[t]);const Te=()=>{P(!1),o("..")},[kn,wn]=d.useState(!1),Be=R=>{wn(R)},{isAiCfoOpen:Dn,setIsAiCfoOpen:In}=rn(),{isAiCfoAccessEnabled:Sn,onAskAiCfoClick:bn}=ln({isAiCfoOpen:Dn,setIsAiCfoOpen:In,mobileExploreReferrer:"Checking Accounts"});dn({isDataReady:E==="Completed"});const jn=y.company!=null&&Ge(y.company),fe=(r&&jn)===!0&&!q,[vn,En]=d.useState(!1),ye=A(R=>R.treasurySetupViewState.treasuryFundsDetails),Pn=ye.fundsDetails,Tn=Et(Pn);d.useEffect(()=>{fe!==!0||vn||ye?.fetchStatus.fetchState!=="Not-Started"||(En(!0),a(rt()))},[ye.fetchStatus,a]);const Bn=nn(y),On=Se(p,y);return Bn===!0&&On!==!0?n.jsx(cn,{}):ge?n.jsxs(n.Fragment,{children:[b.fetchState==="Completed"&&v===!1&&B===!1?n.jsx(me,{analytics:U,onLoad:R=>(Oe=>{Oe.trackAccountsListPageViewed(b.depositAccountsSelectorView.depositAccounts.length,b.externalAccountsSelectorView.paymentAccounts.length,Ne(b.summary?.totalBalance.available.amount??0),Ne(b.summary?.totalInterest.available.amount??0),b.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),fe&&Oe.trackTreasuryPromoView("Checking Promo Banner")})(R)}):null,v===!0?n.jsx(pn,{closeDrawerHandler:Te,isTransferDrawerOpen:v,zeniAccountsConfig:b.zeniAccountsConfig,authParams:xn,downloadAccountDetailEndPoint:An}):null,B===!0?n.jsx(un,{closeDrawerHandler:Te,isCheckDepositDrawerOpen:B}):null,n.jsxs(la,{windowSize:i,children:[n.jsx(he,{isAppContentDrawerOpen:kn,handleDrawerToggle:Be}),n.jsx(da,{zeniBankListView:b,navigate:o,currentTenant:y,location:s,companyId:k,analytics:U,maxInsuredAmount:j.maxInsuredAmount,isExpressPayEnabled:f,isBillPayEnabled:Cn,isCheckingCommentingEnabled:g,isDebitCardFeatureEnabled:p,isAutoTransferRuleEnabled:m,handleDrawerToggle:Be,showTreasuryPromo:fe,treasuryYieldPercentage:Tn,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:Sn,onAskAiCfoClick:bn})]})]}):ce&&X?n.jsx(ne,{to:"../setup"}):y.companyZeniAccountInfo?.info&&!ce&&yn?n.jsx(ne,{to:"../promo",state:s.state}):n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}})}const mn=(e,t,s)=>{const o=Se(s,e),{tenantEmailDomain:a}=e;return o===!0||t===!1?`/${a}/bills`:`/${a}/bill/new`},ua=(e,t)=>`/${e}/checking/${t}`,hn=(e,t)=>t==null?`/${e}/checking/transfer`:`/${e}/checking/${t}/transfer`,gn=(e,t)=>t==null?`/${e}/checking/check-deposit`:`/${e}/checking/${t}/check-deposit`,fn=e=>`/${e}/checking/express-pay`,pa=M.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-ypyKWtbM.js";import{j as H,u as W,h as N,l as Z,
|
|
|
54
54
|
align-items: center;
|
|
55
55
|
min-height: 100vh;
|
|
56
56
|
background-color: ${e=>e.theme.colors.grey4};
|
|
57
|
-
`,ma=Y(function(e,t){const{currentTenant:s}=t,o=an(e,t.accountId),a=
|
|
57
|
+
`,ma=Y(function(e,t){const{currentTenant:s}=t,o=an(e,t.accountId),a=w.getSignedInUser(),i=e.tenantState.currentTenantId,l={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:i??""},c=o.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:l,downloadEndPoint:`${je.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:i}=t,{tenantEmailDomain:l}=o;return{handleMoveMoneyOptionSelection:(c,u)=>{let h="page-not-found";c==="sendMoney"?h=fn(l):c==="payBill"?h=mn(o,t.isBillPayEnabled,t.isDebitCardFeatureEnabled):c==="transfer"?(h=hn(l,i),u!=null&&e(tn(u))):c==="checkDeposit"?(h=gn(l,i),u!=null&&e(ut(u))):c==="accountStatement"&&(h=fa(l,i));const x=ee(a.state?.pathnameStackToGoBack,a.pathname);s(h,{state:{pathnameStackToGoBack:x}})},onViewAllTransactionClick:()=>{const c=ga(l,i),u=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:u}})},onAccountDetailClick:()=>{const c=ha(l,i),u=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:u}})},onEditNameClick:c=>{e(Me(i,"editName",c))},onReloadZeniAccountDetailPage:()=>{e(on(i,!1))},onCloseAccountClick:()=>{e(Me(i,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})}}})(Tt);function de({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t,isAccountInfoDrawerOpen:s}){const o=W(),a=G(),i=N(),l=_(),{tenantEmailDomain:c,accountId:u}=Z(),{useDynamicConfig:h}=$(),{useFeatureGate:x}=$(),{isFeatureEnabled:r}=x(O.isDebitCardFeatureEnabled),{isFeatureEnabled:p}=x(O.isCheckingCommentingEnabled),m=A(X=>V(X)),{configValue:g}=h(H.expressPayConfig),j=g.is_enable_all_tenants===!0||g.tenant_ids!=null&&g.tenant_ids.includes(m.tenantId),y=!!m.companyBillPayInfo?.info?.isBillPayEnabled,k=w.getSignedInUser(),I=m.companyId??w.getSignedInUserTenant(c)?.companyId,f={userId:k?.userId??"",sessionId:k?.zeniSessionId??"",tenantId:m.tenantId??""},D=`${be}/account_details`,[T,z]=d.useState(!1),[F,v]=d.useState(!1),[P,B]=d.useState(!1),[S,b]=d.useState(!1),E=A(X=>an(X,u??"")),se=E.fetchState,{isAiCfoOpen:ie,setIsAiCfoOpen:ge}=rn(),{isAiCfoAccessEnabled:re,onAskAiCfoClick:ce}=ln({isAiCfoOpen:ie,setIsAiCfoOpen:ge,mobileExploreReferrer:"Checking Account Detail"});dn({isDataReady:se==="Completed"}),d.useEffect(()=>{T||(i(on(u??"",!1)),z(!0))},[T,i,se]),d.useEffect(()=>{b(s!=null&&s===!0)},[s]),d.useEffect(()=>{e!=null&&e===!0?v(!0):(v(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{B(t!=null&&t===!0)},[t]);const q=()=>{b(!1),a("..")};return n.jsxs(n.Fragment,{children:[S===!0&&E.accountDetail!=null?n.jsx(ta,{authParams:f,downloadAccountDetailEndPoint:D,closeDrawerHandler:q,isAccountInfoDrawerOpen:S,zeniBankAccountDetail:E.accountDetail}):null,F===!0?n.jsx(pn,{closeDrawerHandler:q,isTransferDrawerOpen:F,zeniAccountsConfig:E.zeniAccountsConfig,authParams:f,downloadAccountDetailEndPoint:D}):null,P===!0?n.jsx(un,{closeDrawerHandler:q,isCheckDepositDrawerOpen:P}):null,n.jsx(pa,{windowSize:l,children:n.jsx(ma,{navigate:a,currentTenant:m,location:o,companyId:I,isDebitCardFeatureEnabled:r,accountId:u??"",isBillPayEnabled:y,isCheckingCommentingEnabled:p,isExpressPayEnabled:j,isAiCfoAccessEnabled:re,onAskAiCfoClick:ce})})]})}const ha=(e,t)=>`/${e}/checking/${t}/account-info`,ga=(e,t)=>`/${e}/checking/${t}/transactions`,fa=(e,t)=>`/${e}/checking/${t}/statements`,ya=M.div`
|
|
58
58
|
display: flex;
|
|
59
59
|
height: 100vh;
|
|
60
60
|
width: 100%;
|
|
@@ -63,4 +63,4 @@ import{j as n}from"./liveblocks-ypyKWtbM.js";import{j as H,u as W,h as N,l as Z,
|
|
|
63
63
|
overflow: auto;
|
|
64
64
|
align-items: center;
|
|
65
65
|
background-color: ${e=>e.theme.colors.grey4};
|
|
66
|
-
`;function Ca(){const e=
|
|
66
|
+
`;function Ca(){const e=G(),t=N(),s=_(),{accountId:o}=Z(),{useFeatureGate:a}=$(),{isFeatureEnabled:i}=a(O.isCheckingCommentingEnabled),[l,c]=d.useState(!1);d.useEffect(()=>{l||(c(!0),t(pt(o??"",!1)))},[l,t]);const u=A(h=>mt(h,o??""));if(w.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(ya,{windowSize:s,children:n.jsx(Bt,{transactionListView:u,depositAccountId:o??"",isCheckingCommentingEnabled:i,onBackClick:()=>{e("../")}})})}const xa=Y(function(e,t){const{companyId:s}=t;return{zeniAccountSetupView:ht(e,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(e,t){const{navigate:s,companyId:o}=t;return{onSetupButtonClick:()=>{U.trackAccountsPromoPageClicked("Setup Accounts"),e(gt(o))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}})(Ft),Aa=()=>{const e=G(),t=W(),{tenantEmailDomain:s}=Z(),{useDynamicConfig:o}=$(),a=L(),[i,l]=d.useState(!1),[c,u]=d.useState(!1),h=A(f=>V(f)),{configValue:x}=o(H.zeniAccountsConfig),r=De(x);d.useEffect(()=>{c===!1&&t.state?.message==="activation"&&u(!0)},[t.state]);const p=w.getSignedInUserTenant(s)?.companyId??h.companyId,m=w.getSignedInUser(),g=!!h.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,j=f=>{l(f)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const y=ae(),k=te(y?.loggedInUserRoleMap),I=Ie(y?.loggedInUserRoleMap);if(g&&k)return n.jsx(ne,{to:"../../checking/setup"});if(h.company?.companyZeniAccountInfo&&(!g&&k||I)){if(t.state?.message==="activation"){const f=sn(t.state?.pathnameStackToGoBack);e(t.pathname,{state:{...t.state,message:void 0,pathnameStackToGoBack:f.newStack}})}return n.jsxs(n.Fragment,{children:[n.jsx(Ot,{showConfetti:c}),n.jsx(me,{analytics:U,onLoad:f=>(D=>D.trackPageLoaded(ve.Event.accountsPromoPageViewed))(f)}),n.jsx(he,{isAppContentDrawerOpen:i,handleDrawerToggle:j}),n.jsx(xa,{analytics:U,navigate:e,companyId:p,onClickMenuIcon:()=>{j(!0)},maxAnnualPercentageYield:r.maxAnnualPercentageYield,maxInsuredAmount:r.maxInsuredAmount,exampleBankBalance:3e6})]})}return n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}})};function Ja(){const e=W(),t=A(S=>V(S)),s=L(),{useFeatureGate:o,useDynamicConfig:a}=$(),i=ae(),l=te(i?.loggedInUserRoleMap),c=Ie(i?.loggedInUserRoleMap),u=!!t.company?.companyZeniAccountInfo.isZeniAccountEnabled,h=!!t.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:x}=o(O.isChargeCardFeatureEnabled),{isFeatureEnabled:r}=o(O.isDebitCardFeatureEnabled),p=nn(t),m=Se(r,t),g=t?.userRole!=null&&ft(t?.userRole),j=(t?.company==null||t.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!g)&&yt(i?.loggedInUserRoleMap),y=Ct(i?.loggedInUserRoleMap),k=(t?.company==null||t.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!g)&&xt(i?.loggedInUserRoleMap),{isFeatureEnabled:I}=o(O.isDepositAccountsFeatureEnabled),f=I&&!g,{configValue:D}=a(H.expressPayConfig),T=D.is_enable_all_tenants===!0||D.tenant_ids!=null&&D.tenant_ids.includes(t.tenantId),{isFeatureEnabled:z}=o(O.isAutoTransferRuleEnabled),F=Rt(t,x,r)&&!g&&At(i?.loggedInUserRoleMap),v=kt(i?.loggedInUserRoleMap),P=f&&te(i?.loggedInUserRoleMap),B=P||He(i?.loggedInUserRoleMap);return n.jsxs($e,{children:[n.jsx(C,{path:"setup",element:n.jsx(Ve,{isBillPayAdminLevelAccess:j,isUserHasOnlyBillPayAccess:y,isReimbursementAdminLevelAccess:k,isZeniAccountAdminLevelAccess:P,isChargeCardAdminLevelAccess:F,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"setup"})}),n.jsx(C,{path:"verification",element:n.jsx(Ve,{isBillPayAdminLevelAccess:j,isUserHasOnlyBillPayAccess:y,isReimbursementAdminLevelAccess:k,isZeniAccountAdminLevelAccess:P,isChargeCardAdminLevelAccess:F,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"verification"})}),z?n.jsxs(n.Fragment,{children:[n.jsx(C,{path:"auto-transfer",element:n.jsx(_e,{})}),B?n.jsx(C,{path:"auto-transfer/:ruleId/edit",element:n.jsx(_e,{isEditDrawerOpen:!0})}):null]}):n.jsx(C,{path:"auto-transfer",element:n.jsx(ue,{})}),T&&l?n.jsxs(n.Fragment,{children:[n.jsx(C,{path:"express-pay",element:n.jsx(le,{})}),n.jsx(C,{path:"express-pay/add-ach",element:n.jsx(le,{isAddACHDrawerOpen:!0})}),n.jsx(C,{path:"express-pay/add-wire/add-address",element:n.jsx(le,{isAddAddressDrawerOpen:!0})}),n.jsx(C,{path:"express-pay/add-wire",element:n.jsx(le,{isAddWireDrawerOpen:!0})})]}):n.jsx(C,{path:"express-pay",element:n.jsx(ue,{})}),n.jsx(C,{path:"promo",element:n.jsx(Aa,{})}),p&&!m?n.jsx(C,{path:"/*",element:n.jsx(cn,{})}):u?n.jsxs(n.Fragment,{children:[n.jsx(C,{path:"/",element:n.jsx(Ae,{})}),n.jsx(C,{path:"transfer",element:n.jsx(Ae,{isTransferDrawerOpen:!0})}),n.jsx(C,{path:"check-deposit",element:n.jsx(Ae,{isCheckDepositDrawerOpen:!0})}),n.jsx(C,{path:":accountId/*",element:n.jsx(ka,{})}),n.jsx(C,{path:"*",element:n.jsx(ue,{})})]}):h&&l?n.jsx(C,{path:"*",element:n.jsx(ne,{to:"../setup"})}):t.company?.companyZeniAccountInfo&&c?n.jsx(C,{path:"*",element:n.jsx(ne,{to:"../promo",state:e.state})}):n.jsx(C,{path:"*",element:n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${Ut.sp1} ${s.colors.dropShadowNormal}`}})})]})}function ka(){return n.jsxs($e,{children:[n.jsx(C,{path:"/",element:n.jsx(de,{})}),n.jsx(C,{path:"account-info",element:n.jsx(de,{isAccountInfoDrawerOpen:!0})}),n.jsx(C,{path:"transfer",element:n.jsx(de,{isTransferDrawerOpen:!0})}),n.jsx(C,{path:"check-deposit",element:n.jsx(de,{isCheckDepositDrawerOpen:!0})}),n.jsx(C,{path:"transactions",element:n.jsx(Ca,{})}),n.jsx(C,{path:"statements",element:n.jsx(Vt,{})}),n.jsx(C,{path:"*",element:n.jsx(ue,{})})]})}export{Ja as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{j as i}from"./liveblocks-DiLJJ0-W.js";import{a as u}from"./sentry-CRXtNjzG.js";import{j as x,h as B,u as $,l as j,g as p}from"./core-PVb_PTOa.js";import{Hz as s,Hy as v,NG as z,eM as C,NH as N}from"./zeni-epic-state-4sJL0-hG.js";import{K as D,ao as g,h as E,z as L,B as P,bZ as T,p as G}from"./index-D5j-ijm9.js";import{n as H}from"./mui-Bs_Wx3U8.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]="eb696d28-c8bb-4763-accf-afbf14fa97c3",e._sentryDebugIdIdentifier="sentry-dbid-eb696d28-c8bb-4763-accf-afbf14fa97c3")}catch{}})();const _=H.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=B(),d=D(),f=$();let{accountId:a}=j(),l=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&f.pathname.includes(`${s}/statements`)&&(a=s,l=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[m,b]=u.useState(!1),y=E();u.useEffect(()=>{m||(b(!0),n(v(a??"",!1)))},[m,n]);const o=p(t=>z(t,a??"")),h=()=>{const t=G(f.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},c=L.getSignedInUser(),r=p(t=>C(t)),I={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:r.tenantId??""},w=N(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=r.company?.companyInfo.companyLegalName??r.companyName;if(c==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(P,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}}):i.jsx(_,{windowSize:d,children:i.jsx(T,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:h,authParams:I,downloadEndPoint:l})})}export{q as Z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./sentry-
|
|
1
|
+
import"./sentry-CRXtNjzG.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]="aeade864-8999-4b65-a5fe-284d93c9cae4",e._sentryDebugIdIdentifier="sentry-dbid-aeade864-8999-4b65-a5fe-284d93c9cae4")}catch{}})();function d(e,t){if(t!=null)return e.find(n=>n.qboId===t)}function i(e,t){return e.filter(n=>n.qboId!=null&&t.includes(n.qboId))}function a(e,t){return t.map(n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""}))}export{d as a,i as g,a as m};
|