@zeniai/web-app-ui 5.1.57-prod → 5.1.58-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-Jvk5ZIh7.js +1 -0
- package/dist/assets/AddressScreen-BrRyijJp.js +9 -0
- package/dist/assets/AiCfoScreen-CicMJAHj.js +22 -0
- package/dist/assets/BillPayApprovalRoutes-CDu2EgPZ.js +1 -0
- package/dist/assets/BillPayRoutes-qpaKIKLh.js +119 -0
- package/dist/assets/BusinessVerificationPageScreen-NuRsHlJi.js +9 -0
- package/dist/assets/ChargeCardRoutes-DGkxpdY7.js +71 -0
- package/dist/assets/CompanyPassportScreen-CG5-5eoy.js +1 -0
- package/dist/assets/ConnectionAuthScreen-Bn_8LVY-.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-Bgpl9puf.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-BWH4fb9z.js +23 -0
- package/dist/assets/DashboardRoutes-9HsT8T2z.js +20 -0
- package/dist/assets/DefaultTenantHome-CwgycKYc.js +1 -0
- package/dist/assets/DomesticWireDetailScreen-Dd35H5gU.js +18 -0
- package/dist/assets/DrawerScreen-C5n2KCQV.js +1 -0
- package/dist/assets/EntityDetailRoutes-DLIsh6TE.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-C0zzACQj.js +25 -0
- package/dist/assets/FeaturePreviewScreen-BeSvOfyq.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-QEO5L34X.js +1 -0
- package/dist/assets/MagicLinkRoutes-CWoYIOYU.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-D_t_Me45.js +12 -0
- package/dist/assets/MobileAppDrawer-BG5P4V6f.js +1 -0
- package/dist/assets/NotFoundScreen-DcBza--g.js +1 -0
- package/dist/assets/NotificationRoutes-CQ3pB1c-.js +1 -0
- package/dist/assets/OAuthConsentScreen-rh4Splr8.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-C321jz-9.js +1 -0
- package/dist/assets/PeopleRoutes-tz6kKz-A.js +22 -0
- package/dist/assets/PerformanceRoutes-CeebcaT1.js +1 -0
- package/dist/assets/Preview-Dw6WgJ9D.js +1 -0
- package/dist/assets/QBOConnectionScreen-DmBrRYj5.js +100 -0
- package/dist/assets/ReferralListScreen-Lnl80ls5.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-U1jW3SNW.js +1 -0
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-C7v9N8Xz.js +1 -0
- package/dist/assets/ReimbursementRoutes-CrSmjoHG.js +68 -0
- package/dist/assets/ReportsRoutes-CVQ3KrxC.js +1 -0
- package/dist/assets/RewardsRoutes-CuXw1sC8.js +1 -0
- package/dist/assets/ScreenRoutes-Bm5EazfY.js +2 -0
- package/dist/assets/SettingsRoutes-BdwvZMwv.js +57 -0
- package/dist/assets/SetupPagesScreen-DPjCUjqg.js +29 -0
- package/dist/assets/SignInScreen-C1EKfqaQ.js +1 -0
- package/dist/assets/SignOutScreen-DK40OwVP.js +9 -0
- package/dist/assets/TaskListScreen-d8fI83l2.js +9 -0
- package/dist/assets/TaskRoutes-jKlcwy0X.js +9 -0
- package/dist/assets/TransactionDetailRoutes-CCDdwe13.js +1 -0
- package/dist/assets/TransactionDetailScreen-DmE69GP7.js +5 -0
- package/dist/assets/TransactionListRoutes-BU6W03tb.js +1 -0
- package/dist/assets/TreasuryRoutes-Bm8WTWLC.js +37 -0
- package/dist/assets/VendorsRoutes-B1U9Gev2.js +112 -0
- package/dist/assets/WiseConfirmationScreen-BsEe1BHV.js +12 -0
- package/dist/assets/ZeniAccountRoutes-DjEDHzor.js +57 -0
- package/dist/assets/ZeniAccountStatementScreen-Cu_59prd.js +9 -0
- package/dist/assets/accountMappingHelper-JvNPAAYV.js +1 -0
- package/dist/assets/analytics-wiEk3GGD.js +68 -0
- package/dist/assets/analyticsHelper-CScMfb2z.js +1 -0
- package/dist/assets/core-DUPexJ3H.js +12 -0
- package/dist/assets/decodeURIComponentSafe-jbE9T9Sc.js +1 -0
- package/dist/assets/dnd-O-LDWVRl.js +6 -0
- package/dist/assets/empty-B5snx4g9.js +1 -0
- package/dist/assets/empty-DtHXOIj5.js +1 -0
- package/dist/assets/emptyVideoElement-6tVV7Q67.js +1 -0
- package/dist/assets/epic-DdqgmVvM.js +2 -0
- package/dist/assets/favicon-D56XvgAH.ico +0 -0
- package/dist/assets/getLocaleForTenant-BQer3J3i.js +1 -0
- package/dist/assets/index-B_Z_hpYg.js +75478 -0
- package/dist/assets/index-BhL3T4qt.js +1 -0
- package/dist/assets/index-C4rqoBpF.js +1 -0
- package/dist/assets/index-CFjZqjGQ.js +3385 -0
- package/dist/assets/index-D9U_bKAc.js +1 -0
- package/dist/assets/index-R3FzVapp.js +2 -0
- package/dist/assets/index-R6GjjTB3.css +1 -0
- package/dist/assets/index-fhWfMdvB.js +2 -0
- package/dist/assets/index-iv31G9Nr.js +1 -0
- package/dist/assets/lexical-D7D3BWIv.js +21 -0
- package/dist/assets/liveblocks-CpSeBLzv.js +54 -0
- package/dist/assets/logo192-CqcTe-t4.png +0 -0
- package/dist/assets/lottie-BpJoufaA.js +2 -0
- package/dist/assets/manifest-icT4lOF5.json +49 -0
- package/dist/assets/mui-BYcLUAn-.js +109 -0
- package/dist/assets/pathToGoBack-DOYIxcIl.js +1 -0
- package/dist/assets/pdf--1Oee4-D.js +13 -0
- package/dist/assets/pdf-lib-DIbgSioz.js +39 -0
- package/dist/assets/plaid-DSCHiplf.js +2 -0
- package/dist/assets/pusher-DWPsZ62H.js +1 -0
- package/dist/assets/react-B3g-qTY7.js +22 -0
- package/dist/assets/react-BQJ3WCCJ.js +34 -0
- package/dist/assets/react-BYOk0YaM.js +21 -0
- package/dist/assets/react-C2LzYoMn.js +19 -0
- package/dist/assets/react-CA9dc_Y6.js +17 -0
- package/dist/assets/react-CD_enKrG.js +19 -0
- package/dist/assets/recharts-Dp6Vlg5X.js +65 -0
- package/dist/assets/routePaths-DpeDFIQv.js +1 -0
- package/dist/assets/sentry-BxlhxHUi.js +500 -0
- package/dist/assets/stripe-DMRn4zHo.js +1 -0
- package/dist/assets/url-Cto2mSPb.js +1 -0
- package/dist/assets/url-DLyO75wK.js +6 -0
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-BK9arDN4.js +1 -0
- package/dist/assets/useAskAiCfoHostNavButtonProps-D8UKtiUm.js +1 -0
- package/dist/assets/useDeviceId-6JqjTKKJ.js +13 -0
- package/dist/assets/useInitialThreadRequest-hFu4tb2i.js +1 -0
- package/dist/assets/utils-BI-ymB94.js +36 -0
- package/dist/assets/web-vitals-D_vxw1oG.js +1 -0
- package/dist/assets/withTransactionSidePanel-DXm_Rajk.js +21 -0
- package/dist/assets/zeni-epic-state-DP595dtC.js +13 -0
- package/dist/index.html +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{j as w}from"./liveblocks-CpSeBLzv.js";import{a as r}from"./sentry-BxlhxHUi.js";import{u as N,k as Qe,j as h,t as Je,g as he,h as ge,i as Se,N as Ke,n as Xe}from"./core-DUPexJ3H.js";import{mT as me,eQ as Q,fN as Ze,m4 as ea,m2 as aa,bn as ta,cO as ye,bs as Te,qi as G,L9 as $,Ma as be,Mb as ae,Lz as Ee,jS as Ie,Mc as ve,LE as te,LF as ne,kH as Ce,I9 as oe,L3 as M,jM as De,jK as ke,jW as na,mG as oa,Md as sa,Me as ia,uo as Y,jR as Ae,Hu as xe,cT as ra,cU as ca,Mf as la,L2 as da,Mg as ua,uk as ma,Mh as pa,Mi as fa,Mj as ha,Mk as ga,Ml as Sa,jV as ya,Mm as Ta,Mn as ba,L4 as Ea,Mo as Ia,Mp as va,Mq as Ca,Ho as Da,He as ka,HD as Aa,jX as xa,Ia as pe,mL as wa}from"./zeni-epic-state-DP595dtC.js";import{s as H,U as F,z as we,aN as Fe,m as Fa,J as Ua,aO as Pa,A as _a,p as Z,k as La,aP as Va,q as ee,_ as Ba,aQ as za,c as Ue,aR as Oa,at as Ra,a2 as X}from"./index-B_Z_hpYg.js";import{n as Ma,S as Na,D as ja}from"./mui-BYcLUAn-.js";import{u as Ga}from"./useAskAiCfoHostNavButtonProps-D8UKtiUm.js";import{d as Pe}from"./decodeURIComponentSafe-jbE9T9Sc.js";import{h as _e,c as Le,g as $a,e as Ha}from"./routePaths-DpeDFIQv.js";import{t as qa}from"./utils-BI-ymB94.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]="6242621a-cb6a-4b7a-9342-e90dc8da1ea7",a._sentryDebugIdIdentifier="sentry-dbid-6242621a-cb6a-4b7a-9342-e90dc8da1ea7")}catch{}})();function Wa(a=!0){const e=N(),s=Qe(),{useFeatureGate:t}=H(),{isFeatureEnabled:n}=t(F.isCreateTransferEntryFromExpenseEnabled);r.useEffect(()=>{if(!a||n!==!0)return;const o=i=>{const l=s.getState().createTransferEntryState.transferAccountsByType[i].fetchState;return l!=="In-Progress"&&l!=="Completed"};o("transferEntryEligible")&&e(me({kind:"transferEntryEligible"})),o("creditCardOnlyEligible")&&e(me({kind:"creditCardOnlyEligible"}))},[a,n,e,s])}function Ya(a,e){const s=function(){const l=N(),[m,f]=r.useState(!1),[E,p]=r.useState(null),{useDynamicConfig:g}=H(),{configValue:U,isDynamicConfigLoading:T}=g("transaction_categorization_config"),u=!T&&U?.capitalization_enabled===!0,D=h(v=>Q(v)),I=D.companyId,A=h(v=>Ze(v.companyState,D.companyId)?.company.companyLocaleInfo?.currencySymbol??"$"),{capitalizableAccounts:b,globalThreshold:k,maxCeiling:P,onboardingShownForPrepaid:_,onboardingShownForFixedAsset:B}=h(v=>{const S=v.tenantState.currentTenantId,c=S!=null?v.tenantState.tenantsById[S]:void 0;return{capitalizableAccounts:c?.capitalizableAccounts??null,globalThreshold:c?.capitalizationThreshold??null,maxCeiling:c?.capitalizationThresholdMaxCeiling??null,onboardingShownForPrepaid:c?.capitalizationOnboardingShownForPrepaid===!0,onboardingShownForFixedAsset:c?.capitalizationOnboardingShownForFixedAsset===!0}},Je),j=r.useCallback(v=>{if(!u||b==null||k!=null&&k>0)return;const S=b.accounts??[],c=new Set(v);let V=!1,C=!1;for(const x of S)c.has(x.accountId)&&(x.classificationType==="prepaid"?V=!0:x.classificationType==="fixed_asset"&&(C=!0));V&&!_?(p("prepaid"),f(!0)):C&&!B&&(p("fixed_asset"),f(!0))},[u,b,k,_,B]),z=r.useCallback(v=>{E!=null&&(l(ea(I,v,P,E)),f(!1),p(null))},[l,I,E,P]),L=r.useCallback(()=>{E!=null&&(l(aa(I,E)),f(!1),p(null))},[l,I,E]);return{showPopup:m&&u,popupType:E,currencySymbol:A,checkAndShowPopup:j,handleSubmit:z,handleDismiss:L}}(),t=r.useRef(void 0),n=r.useRef([]),o=r.useRef(s.checkAndShowPopup);o.current=s.checkAndShowPopup;const i=r.useRef(e);return i.current=e,r.useEffect(()=>{a==="In-Progress"&&(n.current=i.current()),a==="Completed"&&t.current==="In-Progress"&&n.current.length>0&&(o.current(n.current),n.current=[]),t.current=a},[a]),s}const se=()=>{const a=we.getSignedInUser(),{useFeatureGate:e}=H(),{isFeatureEnabled:s}=e(F.isChainOfThoughtEnabled);return r.useMemo(()=>ta(a)&&s,[a,s])};function Ve(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 ft(a,e){const s=N(),{useFeatureGate:t,useDynamicConfig:n}=H(),o=h(y=>Q(y)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ye(o.userRole),m=o.userRole!=null&&Te(o.userRole),{isFeatureEnabled:f}=t(F.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:E}=t(F.isExpenseAutomationEnabled),{configValue:p}=n(Fe.enableUncategorizedExpenseCategory),g=p?.uncategorized_expense_category_enabled===!0,U=se(),T=r.useMemo(()=>({id:a,type:G(e)}),[a,e]),u=h(y=>$(y,T)),D=u?.transactionDetailUpdateStatus?.fetchState,I=u?.transactionDetailLocalData?.lineItemById,A=h(y=>{const W=$(y,T)?.transactionDetailLocalData.vendorUpdates?.id;return W==null?"Not-Started":y.transactionVendorViewState.editVendorStateById[W]?.saveStatus.fetchState??"Not-Started"}),b=r.useMemo(()=>u?.fetchState==="Completed"?Ve(u?.transaction):void 0,[u?.fetchState,u?.transaction]),k=h(y=>{if(b!=null)return be(y.customerIncomeState,y.vendorExpenseState,y.trendState,b,"month")}),P=h(y=>ae(y)),_=h(y=>{if(b!=null)return Ee(y.trendWithTransactionsState,b,"TransactionDetail")}),B=o.company?.companyInfo.firstMonthOfFY??1,j=h(y=>Ie(y.accountState,y.accountListState,"accountList")),[z,L]=r.useState(!1),[v,S]=r.useState(!1),[c,V]=r.useState(!1);r.useEffect(()=>{L(!1),S(!1),V(!1)},[a,e]);const C=r.useCallback(()=>{L(!1),S(!1)},[]),[x,O]=r.useState(!1),q=_?.selectedPeriod?.timePeriod;return r.useEffect(()=>{c||u==null||u.transaction==null||(s(ve({id:u.transaction.id,type:u.transaction.type})),V(!0)),b!=null&&(!i||l&&m===!1)&&(z?v||k==null||(S(!0),s(oe(b,"TransactionDetail",{timeframe:"month",timePeriod:q??k}))):(s(te()),s(ne()),L(!0),s(Ce(b))))},[s,c,u?.fetchState,u?.transaction,b,i,l,m,z,v,k,q]),r.useEffect(()=>{P.newVendorState?.vendorDetailLocalData?.vendorName!=null?O(!0):O(!1)},[P.newVendorState?.vendorDetailLocalData?.vendorName]),r.useEffect(()=>()=>{s(M("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:m,isVendorBulkUpdateOnTransactionEnabled:f,isExpenseAutomationEnabled:E,isUncategorizedExpenseCategoryEnabled:g,isChainOfThoughtEnabled:U,selectedTransaction:T,transactionDetail:u,rawDetailSaveStatus:D,rawDetailLineItemById:I,vendorSaveStatus:A,tranEntity:b,defaultTrendTransactionTimePeriod:k,vendorViewDetails:P,uiState:_,firstMonthOfFY:B,uncategorizedAccounts:j,resetTrendIsFetchedStates:C,isCreateVendorDrawerOpen:x,setIsCreateVendorDrawerOpen:O}}const Qa={overlayWidth:new _a(100,100,58)},Ja=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=Fa(),i=Ua(),l=N(),m=h(p=>ae(p)),f=()=>{t()},E={vendorDetailView:n??m,onSaveSuccess:()=>{l(ke()),l(na("Not-Started")),s()},onSaveVendor:e,onCancelClick:f,saveVendorDetailLocalData:p=>{l(De({vendorId:void 0,localData:p}))}};return w.jsx(ja,{anchor:"right",open:a,PaperProps:{style:{width:Qa.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:f,children:w.jsx(Ka,{onClick:p=>p.stopPropagation(),children:w.jsx(Pa,{...E})})})},Ka=Ma(Na)`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
`;function Xa(a,e){a(oa({transactionId:e.transactionId,creditAccountIntegrationId:e.creditAccountIntegrationId,debitAccountIntegrationId:e.debitAccountIntegrationId,memo:e.memo,transactionType:G(e.transactionType),sourceTransactionType:G(e.sourceTransactionType)}))}function Za({currentTransactionId:a,enabled:e=!0,buildPath:s,beforeNavigate:t,navigate:n,navigateState:o}){const i=h(m=>m.createTransferEntryState.lastTransferEntryReplacement),l=r.useRef(null);r.useEffect(()=>{if(!e||i==null||a==null||l.current===i)return;const{previousTransactionId:m,newTransactionId:f}=i;a.id===m.id&&a.type===m.type&&(l.current=i,t?.(),n(s(f),{replace:!0,state:o}))},[e,i,a,s,t,n,o])}const et=({closeDrawerHandler:a,overrideTransactionId:e,overrideTransactionType:s})=>{const t=he(),n=ge(),o=N(),i=se(),{transactionTypeEncoded:l,transactionId:m}=Se(),f=e??m,E=s??Pe(l??"");let p;_e(f,E)&&(p={id:f,type:G(E)});const g=p!=null?h(T=>$(T,p)):void 0,U=()=>{const T=Z(t.state?.pathnameStackToGoBack),u=T.poppedPathname??((D=2)=>{let I="../";for(let A=0;A<D;A++)I=`${I}../`;return I})(1);n(u,{state:{pathnameStackToGoBack:T.newStack}})};return{transactionId:p,onSaveVendor:()=>{o(Ae(p,void 0))},onSaveSuccess:()=>{if(g!=null&&g?.transaction&&g?.transactionDetailLocalData.vendorUpdates?.qboId!=null&&g?.transactionDetailLocalData.vendorUpdates?.id!=null){const T=g?.transactionDetailLocalData.vendorUpdates,u={id:g?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:g?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:T?.name,qboId:g?.transactionDetailLocalData.vendorUpdates?.qboId??""},D={transactionId:{id:g?.transaction?.id,type:g?.transaction?.type},transaction:g?.transaction,lineIds:g?.transaction?.lines?.map(I=>I.id)??[]};o(Y({entity:u,amount:g?.transaction?.amount.amount,transactionDetails:D,flowType:"detail",isFetchCOT:i}))}U()},onCancel:()=>{p!=null&&o(sa({transactionId:p})),o(ke()),o(ia()),a(!0),U()}}},at=Xe(function(a,e){const s=$(a,e.selectedTransaction);let t;s==null&&console.warn("Check if the you've selected the transaction before getting the details");const n=we.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=la(a,e.entity,"TransactionDetail"));const l=a.entityAutoCompleteState.autoCompleteText.common,m=da(a,"common"),f=Q(a);return{transactionDetail:s,transactionAttachmentEndpointToDownload:`${X}/transaction_attachment`,transactionAttachmentsEndpointToFetch:f.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${X}/transaction_attachments_accounting_provider`:`${X}/transaction_attachments`,attachmentUploadEndpoint:`${Ra.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:i,trendReport:t,analytics:Ue,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:l,entityAutoCompleteView:m},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(M("common")),e.onBackClick!=null)return void e.onBackClick();const t=Z(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Be(2);e.navigate(n,{state:{pathnameStackToGoBack:t.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(t,n)=>{e.transaction!=null&&a(wa({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:t,customerId:n}))},onTransactionClick:t=>{e.resetTrendIsFetchedStates(),a(te()),a(ne());const n=ee(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(Le(t,e.tenantEmailDomain),{state:{pathnameStackToGoBack:n}})},onTrendSelectedPeriodChange:t=>{if(t==null)e.defaultTrendTransactionTimePeriod!=null&&a(pe(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(oe(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:t.addTimePeriod})),a(pe(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:n}))}},onSaveUpdates:(t,n,o,i)=>{a(i===!0&&o!=null?Ae(t,o,!0,e.isExpenseAutomationEnabled,e.isUncategorizedExpenseCategoryEnabled):xa({transactionId:t,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:n,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled})),a(M("common"))},onUploadAttachmentAttachment:t=>{a(Aa(t))},onDeleteAttachment:t=>{e.transaction!=null&&a(ka(t,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(t,n)=>{a(Da({transactionId:t,transactionLocalData:n}))},onUpdateAllChecked:(t,n,o,i)=>{e.transaction!=null&&a(Ca(e.selectedTransaction,e.transaction,t,n,o,i))},onResetLineItemsCategoryClassInLocalData:(t,n,o,i,l,m)=>{a(va(t,n,o,i,l,m))},onChangeCategoryClassWhenUpdateAllIsChecked:(t,n)=>{e.transaction!=null&&a(Ia({id:e.transaction.id,type:e.transaction.type},e.transaction,t,n))},onSaveSuccess:()=>{const t=Z(e.location.state?.pathnameStackToGoBack);if(t.poppedPathname!=null){const n=qa(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=`${$a(e.tenantEmailDomain)}`;e.navigate(i)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const i=`${Ha(e.tenantEmailDomain)}`;e.navigate(i)}}},onPageRefresh:()=>{a(xe(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?a(Ea({searchString:t,entityType:n,searchOrigin:"common"})):t.trim().length===0&&a(M("common"))},onCancelAutoComplete:()=>{a(M("common"))}},onFetchRecommendationsForEntity:(t,n,o,i)=>{a(Y({entity:t,amount:n,transactionDetails:o,flowType:"detail",isFetchCOT:s}))},clearRecommendationForLineId:t=>{const{transactionId:n,transaction:o,lineId:i}=t;a(ba(n,o,i))},resetUpdateErrorState:()=>{const t={id:e.selectedTransaction.id,type:e.selectedTransaction.type};a(Ta(t))},onSaveVendorInLocalData:(t,n,o,i,l)=>{if(a(ya({transactionId:t,vendorUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(Y({entity:o,amount:i,transactionDetails:l,flowType:"detail",isFetchCOT:s})),a(De({vendorId:n.id?n.id:void 0,localData:{vendorName:n.name,vendorId:n.id?n.id:void 0}})),!n.id&&e.transaction!=null){const m=e.transaction,f=ee(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(m.type??"")}/${m.id}/vendor/create`,{state:{pathnameStackToGoBack:f}})}},onSaveCustomerInLocalData:(t,n,o,i,l)=>{a(Sa({transactionId:t,customerUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(Y({entity:o,amount:i,transactionDetails:l,flowType:"detail",isFetchCOT:s}))},onUpdateAllTranactionsWithCurrentVendorChecked:t=>{a(ga({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:t}))},onClickUpdateVendorToAllLineItems:(t,n,o)=>{a(ha(t,n,o))},onResetVendorToAllLineItems:(t,n,o)=>{a(fa(t,n,o))},saveLatestSelectedEntity:(t,n,o)=>{a(pa({transactionId:t,lineId:n,entity:o}))},updateVendorBulkRecommendationsFetchStatus:(t,n)=>{a(ma(t,n))},setIsVendorUpdateAllChecked:(t,n,o)=>{a(ua(t,n,o))},onCreateTransferEntry:e.isCreateTransferEntryFromExpenseEnabled===!0?t=>Xa(a,t):void 0}})(Oa);function ht(){const a=ge(),e=N(),s=he(),{useFeatureGate:t,useDynamicConfig:n}=H(),o=La(),i=h(d=>Q(d)),l=i.userRole.includes("charge_card_user")||i.userRole.includes("charge_card_admin"),m=i.userRole!=null&&ye(i.userRole),f=i.userRole!=null&&Te(i.userRole),{isFeatureEnabled:E}=t(F.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:p}=t(F.isExpenseAutomationEnabled),{configValue:g}=n(Fe.enableUncategorizedExpenseCategory),U=g?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:T,transactionTypeEncoded:u,transactionId:D}=Se(),[I,A]=r.useState(!1),b=Pe(u??""),k=_e(D,b),P=h(d=>d.transactionVendorViewState),_=se(),{isFeatureEnabled:B}=t(F.isTransactionCommentingEnabled),{isFeatureEnabled:j}=t(F.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:z}=t(F.isProjectsTransactionsEnabled),L=o?.currentTenant?.companyId,v=o?.currentTenant?.companyName,S=r.useMemo(()=>{if(k)return{id:D,type:G(b)}},[k,D,b]),c=S!=null?h(d=>$(d,S)):void 0,V=c?.transactionDetailLocalData.vendorUpdates?.id!=null?P.editVendorStateById[c?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",C=c?.fetchState==="Completed"?Ve(c?.transaction):void 0,x=h(d=>C!=null?be(d.customerIncomeState,d.vendorExpenseState,d.trendState,C,"month"):void 0),O=h(d=>ae(d)),q=h(d=>C!=null?Ee(d.trendWithTransactionsState,C,"TransactionDetail"):void 0),y=i.company?.companyInfo.firstMonthOfFY??1,W=h(d=>Ie(d.accountState,d.accountListState,"accountList")),[ze,ie]=r.useState(!1),[Oe,re]=r.useState(!1),[Re,ce]=r.useState(!1),Me=r.useCallback(d=>Le(d,T??"")+s.search,[T,s.search]),Ne=r.useCallback(()=>{ce(!1)},[]);Za({currentTransactionId:S,enabled:T!=null&&T!=="",buildPath:Me,beforeNavigate:Ne,navigate:a,navigateState:s.state});const le=()=>{ie(!1),re(!1)},de=Va();Wa();const J=r.useRef(c?.transaction);J.current=c?.transaction;const je=c?.transactionDetailUpdateStatus?.fetchState,R=Ya(je,()=>{const d=[];if(J.current!=null)for(const K of J.current.lines??[])"account"in K&&K.account?.accountId!=null&&d.push(K.account.accountId);return d});r.useEffect(()=>{S!=null&&c!=null&&c.fetchState==="Not-Started"&&(e(xe(S,!1)),le())},[e,S,c?.fetchState]),r.useEffect(()=>{if(S!=null&&c?.fetchState==="Error"){const d=ee(s.state?.pathnameStackToGoBack,s.pathname);a("page-not-found",{replace:!0,state:de?{pathnameStackToGoBack:d,message:"expenseAutomation",origin:"transaction_categorization"}:{pathnameStackToGoBack:d,message:"pageNotFound",origin:"transaction_detail"}})}},[S,c?.fetchState,a,s.state,s.pathname,de]),r.useEffect(()=>{Re||c==null||c.transaction==null||(e(ve({id:c.transaction.id,type:c.transaction.type})),ce(!0)),C==null&&c?.fetchState==="Completed"&&fe(c?.transaction),C!=null&&(!l||m&&f===!1)&&(ze?Oe||x==null||(re(!0),e(oe(C,"TransactionDetail",{timeframe:"month",timePeriod:q?.selectedPeriod?.timePeriod??x}))):(e(te()),e(ne()),fe(c?.transaction),ie(!0),e(Ce(C))))},[c?.fetchState,c?.transaction,x,l]),r.useEffect(()=>{O.newVendorState?.vendorDetailLocalData?.vendorName!=null?A(!0):A(!1)},[O.newVendorState?.vendorDetailLocalData?.vendorName]),r.useEffect(()=>()=>{e(M("common"))},[]);const Ge=[u,D].filter(d=>d!=null),{transactionId:ue,onSaveVendor:$e,onSaveSuccess:He,onCancel:qe}=et({closeDrawerHandler:d=>{A(!1),a(d?"../":"../..")}}),{isAiCfoAccessEnabled:We,onAskAiCfoClick:Ye}=Ga({mobileExploreReferrer:"Transaction Details"});return Ba({isDataReady:c?.fetchState==="Completed"}),k?w.jsxs(w.Fragment,{children:[ue!=null&&I&&w.jsx(Ja,{isOpen:I,transactionId:ue,onSaveVendor:$e,onSaveSuccess:He,onCancel:qe}),w.jsx(at,{hideDeleteAttachment:!0,firstMonthOfFY:y,isDisabled:c?.transaction?.type==="transfer"&&o?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:T,location:s,navigate:a,selectedTransaction:S,entity:C,isCOTEnabled:_,defaultTrendTransactionTimePeriod:x,resetTrendIsFetchedStates:le,transaction:c?.transaction,uncategorizedAccounts:W,vendorSaveStatus:V,isVendorBulkUpdateOnTransactionEnabled:E,isCreateTransferEntryFromExpenseEnabled:j,isExpenseAutomationEnabled:p,isUncategorizedExpenseCategoryEnabled:U,isAiCfoAccessEnabled:We,onAskAiCfoClick:Ye,isTransactionCommentingEnabled:B,isProjectsTransactionsEnabled:z,companyId:L,companyName:v}),R.showPopup&&R.popupType!=null&&w.jsx(za,{popupType:R.popupType,currencySymbol:R.currencySymbol,onSubmit:R.handleSubmit,onDismiss:R.handleDismiss})]}):w.jsx(Ke,{to:Be(Ge.length)})}const Be=(a=2)=>{let e="../";for(let s=0;s<a;s++)e=`${e}../`;return e},fe=a=>{if(a!=null){const{transactionCategory:e,transactionClass:s}=tt(a),t=nt(a);Ue.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))}},tt=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}},nt=a=>ra(a)===!0?a.customer?.name??"":ca(a)===!0?a.vendor?.name??"":a.memo!=null?a.memo:a.type;export{Ja as C,ht as T,Wa as a,Ya as b,et as c,at as d,Za as e,se as f,Xa as g,ft as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-CpSeBLzv.js";import{h as K,g as J,u as Q,i as Z,j as h,N as G,n as W,o as Pe,p as j}from"./core-DUPexJ3H.js";import{eQ as U,pZ as X,j4 as u,Px as ee,I0 as De,bo as le,Py as ve,jH as te,LB as ae,Pz as ue,PA as be,bE as Y,HY as ye,PB as Ee,PC as me,PD as je,H$ as Ae,PE as xe,PF as pe,PG as Me,PH as ge,PI as Le,PJ as Be,PK as fe,Jd as Ce}from"./zeni-epic-state-DP595dtC.js";import{D as de,s as ne,U as q,c as w,ce,q as H,p as oe,Y as Fe,T as Oe}from"./index-B_Z_hpYg.js";import"./mui-BYcLUAn-.js";import{a as g}from"./sentry-BxlhxHUi.js";import{w as se}from"./withTransactionSidePanel-DXm_Rajk.js";import{p as ie,c as re}from"./routePaths-DpeDFIQv.js";import{u as ze}from"./utils-BI-ymB94.js";import{d as v}from"./decodeURIComponentSafe-jbE9T9Sc.js";import{Z as we}from"./ZeniAccountStatementScreen-Cu_59prd.js";import"./recharts-Dp6Vlg5X.js";import"./analytics-wiEk3GGD.js";import"./plaid-DSCHiplf.js";import"./dnd-O-LDWVRl.js";import"./stripe-DMRn4zHo.js";import"./lottie-BpJoufaA.js";import"./lexical-D7D3BWIv.js";import"./pdf--1Oee4-D.js";import"./useAskAiCfoHostNavButtonProps-D8UKtiUm.js";import"./TransactionDetailScreen-DmE69GP7.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]="acfdbc7e-6b91-4122-9d6d-d101d5bd5dd0",a._sentryDebugIdIdentifier="sentry-dbid-acfdbc7e-6b91-4122-9d6d-d101d5bd5dd0")}catch{}})();const Ge=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],N=a=>ze(a),Re=W(function(a,e){const t=ve(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,N(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=de.getLocalizedStrings(),l=N(e.selectedAccount.tranListType),m=Ve(t,n,c,l,e.bookCloseDate);w.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:m},type:N(e.selectedAccount.tranListType)})),a(De(l,u(m),!1,l==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(u(m))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:N(e.selectedAccount.tranListType)}))}}})(ce),V=se(function({...a}){const e=K(),t=J(),n=Q(),c=t.pathname.split("/").find(r=>Ge.includes(r)),o=c??"uncategorized-expense",{tenantEmailDomain:l}=Z(),m=de.getLocalizedStrings(),{accountType:S,title:T,subTitle:D}=_e(o),y="month",I=h(r=>U(r)),p=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:A}=ne(),{isFeatureEnabled:k}=A(q.isProjectsTransactionsEnabled),x=h(r=>X(r))&&k,{dataAvailable:B,initialTimeframeTick:b}=$e(o,p,I.bookCloseDate),[C,E]=g.useState(!1),[F,O]=g.useState(void 0),f=g.useMemo(()=>{const r=u(b);return{tranListType:o,accountType:ee(S),title:T,subTitle:D,timeframe:y,period:r}},[o,y,S,B]);g.useEffect(()=>{if(!C&&f!=null){E(!0),w.trackTransactionList(void 0,void 0,void 0,f.title);const r=N(f.tranListType);n(De(r,f.period,!0,r==="missingReceipts"?m.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[C,f,n]);let M=f;return f!=null&&F!=null&&(M={...f,period:F}),c==null||M==null?s.jsx(G,{to:"../"}):s.jsx(Re,{firstMonthOfFY:p,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:B,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:I.bookCloseDate,onSelectedTimePeriodChange:r=>O(r),...a})}),_e=a=>{let e="",t="";const n=de.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},$e=(a,e,t)=>{const n=le();let c=le().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ie(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ve=(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},Ne=W(function(a,e){const t=Ee(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??he();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ye(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ce),qe=se(function({referrerType:a,...e}){const t=K(),n=J(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,classIdEncoded:S,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=Z(),p=v(l??""),A=v(m??""),k=v(S??""),x=v(I??""),B=h(d=>be(d.transactionListState,A,p,k)),[b,C]=g.useState(!1),[E,F]=g.useState(void 0),O=h(d=>U(d)),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(q.isProjectsTransactionsEnabled),R=h(d=>X(d))&&r;let i;const z=He(p,A,k,T,D,y,x);if(z){const d={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},_=Je(B?.dateRange,d);i={accountId:A,accountType:ee(p),classId:k,title:x,timeframe:T,period:_}}g.useEffect(()=>{b||i==null||(C(!0),w.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))},[b,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const $=[l,m,S,T,D,y,I].filter(d=>d!=null);return z&&L!=null?s.jsx(Ne,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:R,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(G,{to:he($.length)})}),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},He=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,Je=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Ue=W(function(a,e){const t=xe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Se();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(Ae(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}})(ce),Ke=se(function({referrerType:a,...e}){const t=K(),n=J(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,projectIdEncoded:S,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=Z(),p=v(l??""),A=v(m??""),k=v(S??""),x=v(I??""),B=h(d=>je(d.transactionListState,A,p,k)),[b,C]=g.useState(!1),[E,F]=g.useState(void 0),O=h(d=>U(d)),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(q.isProjectsTransactionsEnabled),R=h(d=>X(d))&&r;let i;const z=Qe(p,A,k,T,D,y,x);if(z){const d={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},_=Ze(B?.dateRange,d);i={accountId:A,accountType:ee(p),projectId:k,title:x,timeframe:T,period:_}}g.useEffect(()=>{b||i==null||(C(!0),w.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))},[b,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const $=[l,m,S,T,D,y,I].filter(d=>d!=null);return z&&L!=null?s.jsx(Ue,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:R,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(G,{to:Se($.length)})}),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Qe=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,Ze=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),We=W(function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Be(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ie();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=tt(e.tenantEmailDomain),n=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ce),Te=se(function({referrerType:a,...e}){const t=K(),n=J(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,timeframe:S,startDate:T,endDate:D,titleEncoded:y,excludeSubAccounts:I}=Z(),p=v(l??""),A=v(m??""),k=v(y??""),x=!(I!=null&&I==="exclude_subaccounts"),B=h(P=>Me(P.transactionListState,A,p)),[b,C]=g.useState(!1),[E,F]=g.useState(void 0),O=h(P=>U(P)),f=O.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=O.company?.companyInfo.firstMonthOfFY??1;let r;const R=Xe(p,A,S,T,D,k);if(R){const P={startDate:Y(T,"YYYY-MM-DD"),endDate:Y(D,"YYYY-MM-DD")},Ye=et(B?.dateRange,P);r={accountId:A,accountType:ee(p),title:k,timeframe:S,period:Ye}}let i=r;r!=null&&E!=null&&(i={...r,period:E});const{useFeatureGate:z}=ne(),{isFeatureEnabled:L}=z(q.isTransactionCommentingEnabled),{isFeatureEnabled:$}=z(q.isProjectsTransactionsEnabled),d=h(P=>X(P))&&$,{areTenantIdsInSync:_}=Fe();g.useEffect(()=>{!b&&r!=null&&_&&(C(!0),w.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))},[b,r,c,_]);const ke=[l,m,S,T,D,y].filter(P=>P!=null);return R&&i!=null?s.jsx(We,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:f,isTransactionCommentingEnabled:L,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:P=>F(P),...e}):s.jsx(G,{to:Ie(ke.length)})}),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Xe=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),tt=a=>`/${a}/transactions/${Ce}/statements`;function kt(){const a=J().state?.referrer,e=h(n=>n.expenseAutomationViewState.selectedPeriodByTenantId)[h(n=>U(n)).tenantId],t=Oe();return s.jsxs(Pe,{children:[s.jsx(j,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/zeni-clearing-account/statements",element:s.jsx(we,{})}),s.jsx(j,{path:"/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/uncategorized-income/*",element:s.jsx(V,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:t?s.jsx(G,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:t?s.jsx(G,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/missing-receipts/*",element:t?s.jsx(G,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(qe,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ke,{referrerType:a})})]})}export{kt as default};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import{j as e}from"./liveblocks-CpSeBLzv.js";import{h as L,g as P,u as B,i as M,j as f,N as U,n as V,o as we,p as k}from"./core-DUPexJ3H.js";import{cl as N,eQ as D,Oi as O,Em as ae,fi as q,E4 as ne,Ok as Te,Ep as Ie,Og as Ce,Oh as se,OA as ke,Cw as je,tb as be,Om as Ee,EI as Ae,Oj as re,cN as H,xr as oe,eZ as ve,e$ as De,Pu as Fe,Pv as Ue,E5 as Le,Pw as Pe,E6 as Be,Ef as Oe,bs as Re,bF as Me,cw as Ve,bG as Ne,ck as _e,fh as ze,bt as $e,JZ as Ge,cj as Ze}from"./zeni-epic-state-DP595dtC.js";import{k as _,aq as qe,z as E,x as z,c as j,c7 as He,c8 as Je,c9 as Z,J,m as Ke,Y as We,_ as Qe,s as ie,U as v,A as Ye,B as Xe,ca as et,at as K,q as tt,cb as at,p as W,cc as nt,j as Y,cd as st,a9 as rt}from"./index-B_Z_hpYg.js";import{D as ot,n as R,S as it}from"./mui-BYcLUAn-.js";import ct from"./NotFoundScreen-DcBza--g.js";import{S as X}from"./SetupPagesScreen-DPjCUjqg.js";import{a as d}from"./sentry-BxlhxHUi.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-D8UKtiUm.js";import{u as ut}from"./useInitialThreadRequest-hFu4tb2i.js";import{M as ce}from"./MobileAppDrawer-BG5P4V6f.js";import{F as dt}from"./FeaturePreviewScreen-BeSvOfyq.js";import{a as ee}from"./analyticsHelper-CScMfb2z.js";import"./recharts-Dp6Vlg5X.js";import"./analytics-wiEk3GGD.js";import"./plaid-DSCHiplf.js";import"./dnd-O-LDWVRl.js";import"./stripe-DMRn4zHo.js";import"./lottie-BpJoufaA.js";import"./lexical-D7D3BWIv.js";import"./pdf--1Oee4-D.js";import"./utils-BI-ymB94.js";import"./routePaths-DpeDFIQv.js";import"./BusinessVerificationPageScreen-NuRsHlJi.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]="7b9956d5-d229-48c8-8144-5e3d9f9b2c3e",t._sentryDebugIdIdentifier="sentry-dbid-7b9956d5-d229-48c8-8144-5e3d9f9b2c3e")}catch{}})();const pt=V(function(t,a){const{companyId:n}=a;return{treasurySetupView:O(t,n),analytics:j}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Ie(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Te(r))}}})(He);function mt(){const t=L(),a=P(),n=B(),{tenantEmailDomain:o}=M(),p=_(),r=f(C=>C.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=qe(r),s=N(p?.loggedInUserRoleMap),[l,i]=d.useState(!1),[g,I]=d.useState(!1),[u,c]=d.useState(!1),h=f(C=>D(C)),y=E.getSignedInUserTenant(o)?.companyId??h.companyId,w=E.getSignedInUser(),S=f(C=>O(C,y)),T=f(C=>C.treasurySetupViewState.fetchState),x=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(w==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{l||T!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))},[l,T,y,n]),d.useEffect(()=>{u||F!=="Not-Started"||y==null||(c(!0),n(q()))},[u,F,y,n]),d.useEffect(()=>{g||x!=="Not-Started"||y==null||(I(!0),n(ne()))},[g,x,y,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(U,{to:"../promo"});const A=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||T!=="Completed";return e.jsxs(e.Fragment,{children:[!A&&e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:A,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const ft=V(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:O(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{Z(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{Z(a.analytics,"confirm",r,m,"Transfer"),t(Ae())},onSaveChangesToLocalStore:s=>{t(Ee(s))},onFetchLinkTokenClick:s=>{t(be("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Je),yt=({isFirstTransfer:t})=>{const a=L(),{tenantEmailDomain:n}=M(),o=B(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[l,i]=d.useState(!1),[g,I]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),c=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),y=f(x=>D(x)),w=E.getSignedInUserTenant(n)?.companyId??y.companyId,S=f(x=>Ce(x)),T=f(x=>O(x,w));if(E.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||w==null||(s(!0),o(ae(w,!0,!1)))},[m,u,w,o]),d.useEffect(()=>{l||c!=="Not-Started"||w==null||(i(!0),o(q()))},[l,c,w,o]),d.useEffect(()=>{g||h!=="Not-Started"||w==null||(I(!0),o(ne()))},[g,h,w,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(ft,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:y,treasurySetupView:T,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{Z(j,"review",S.treasuryTransferMoneyLocalData,T.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=R.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
width: 100%;
|
|
5
|
+
flex: 1 1 auto;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: ${t=>t.theme.colors.grey4};
|
|
9
|
+
`,ht={overlayWidth:new Ye(100,100,48)},St=V(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:O(t,o),downloadEndPoint:`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:o,location:p,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:l=>{let i="page-not-found";l==="editPortfolio"?i=xt(s):l==="statements"?i=wt(s):l==="taxLetter"?i=Tt(s):l==="settings"&&(i=It(s));const g=tt(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:g}})},onColumnSortConfigChanged:(l,i)=>{t(Fe({uiState:{sortKey:l,sortOrder:i}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}})(et);function G({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=P(),o=L(),p=B(),r=J(),m=Ke(),s=f(b=>D(b)),{tenantEmailDomain:l}=M(),i=s.companyId??E.getSignedInUserTenant(l)?.companyId,[g,I]=d.useState(!1),u=f(b=>re(b)),c=u.fetchState,h=u.accountSummary?.totalBalance?.amount,y=f(b=>b.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),w=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),T=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=N(S?.loggedInUserRoleMap),F=H(S?.loggedInUserRoleMap),{areTenantIdsInSync:A}=We();d.useEffect(()=>{c==="Not-Started"&&!g&&A&&(I(!0),p(oe(!0)))},[g,p,c,A]),d.useEffect(()=>{u.transactionsFetchState.fetchState==="Completed"&&u.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[u.transactionsFetchState.fetchState,u.transactions.length]);const C=()=>{o("..")},[le,ue]=d.useState(!1),Q=b=>{ue(b)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=lt({mobileExploreReferrer:"Treasury"});Qe({isDataReady:c==="Completed"});const{useFeatureGate:$}=ie(),{isFeatureEnabled:me}=$(v.isDebitCardFeatureEnabled),{isFeatureEnabled:fe}=$(v.isAutoTransferRuleEnabled),{isFeatureEnabled:ye}=$(v.isTreasuryCommentingEnabled),ge=ut(i,{clearParams:c==="Completed"&&y?.fetchState==="Completed"}),he=ve(s),Se=De(me,s);if(he===!0&&Se!==!0)return e.jsx(dt,{});if(w){const b=y?.fetchState!=="Completed"||u.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[u.accountSummaryFetchState.fetchState==="Completed"&&y?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:j,onLoad:()=>{}}):null,e.jsx(ot,{onClose:C,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:ht.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(Ct,{onClick:xe=>xe.stopPropagation(),children:[t===!0?e.jsx(yt,{isFirstTransfer:u.transactions.length===0||h===0}):null,a===!0?e.jsx(mt,{}):null]})}),e.jsxs(gt,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:Q}),e.jsx(St,{treasuryDetailsView:u,isAutoTransferRuleEnabled:fe,navigate:o,currentTenant:s,location:n,companyId:i,analytics:j,isTreasuryCommentingEnabled:ye,handleDrawerToggle:Q,initialOpenThreadRequest:ge,isLoading:b,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return T&&x?e.jsx(U,{to:"../setup"}):s.companyTreasuryInfo?.info&&!T&&F?e.jsx(U,{to:"../promo",state:n.state}):e.jsx(Xe,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const xt=t=>`/${t}/treasury/edit-portfolio`,wt=t=>`/${t}/treasury/statements`,Tt=t=>`/${t}/treasury/tax-letter`,It=t=>`/${t}/treasury/setup`,Ct=R(it)`
|
|
10
|
+
display: flex;
|
|
11
|
+
min-height: 100%;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
`,kt=R.div`
|
|
14
|
+
display: flex;
|
|
15
|
+
height: 100vh;
|
|
16
|
+
width: 100%;
|
|
17
|
+
flex: 1 1 auto;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
align-items: center;
|
|
20
|
+
background-color: ${t=>t.theme.colors.grey4};
|
|
21
|
+
`;function jt(){const t=L(),a=B(),n=J(),o=P(),p=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(c=>Ue(c));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Le(!1)))},[r,s.fetchState,a]);const l=E.getSignedInUser(),i=f(c=>D(c)),g={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},I=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access statements page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(kt,{windowSize:n,children:e.jsx(at,{currentTenantCompanyName:I,statementListView:s,isLoading:u,onBackClick:()=>{const c=W(o.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const bt=R.div`
|
|
22
|
+
display: flex;
|
|
23
|
+
height: 100vh;
|
|
24
|
+
width: 100%;
|
|
25
|
+
flex: 1 1 auto;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
align-items: center;
|
|
28
|
+
background-color: ${t=>t.theme.colors.grey4};
|
|
29
|
+
`;function Et(){const t=L(),a=J(),n=P(),o=B(),p=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(c=>Pe(c));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Be(!1)))},[r,s.fetchState,o]);const l=E.getSignedInUser(),i=f(c=>D(c)),g={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},I=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access tax letter page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(bt,{windowSize:a,children:e.jsx(nt,{currentTenantCompanyName:I,taxLetterListView:s,isLoading:u,onBackClick:()=>{const c=W(n.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const At=V(function(t,a){const{companyId:n}=a,o=O(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(Oe(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(st),vt=()=>{const t=L(),a=P(),n=B(),{tenantEmailDomain:o}=M(),[p,r]=d.useState(!1),m=f(S=>D(S)),[s,l]=d.useState(!1),i=f(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);d.useEffect(()=>{s||i?.fetchState!=="Not-Started"||g==null||(l(!0),n(q()))},[i,n]);const g=E.getSignedInUserTenant(o)?.companyId??m.companyId,I=E.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,c=S=>{r(S)};if(I==null)throw Error("Can't access treasury promo page without signing in...");const h=_(),y=N(h?.loggedInUserRoleMap),w=H(h?.loggedInUserRoleMap);if(u&&y)return e.jsx(U,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&y||w)){if(a.state?.message==="activation"){const S=W(a.state?.pathnameStackToGoBack);t(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:S.newStack}})}return i?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(Y,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:S=>(T=>T.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:c}),e.jsx(At,{analytics:j,navigate:t,companyId:g,onClickMenuIcon:()=>{c(!0)}})]})}return e.jsx(te,{children:e.jsx(Y,{size:"ExtraLarge",start:!0})})},te=R.div`
|
|
30
|
+
display: flex;
|
|
31
|
+
width: 100%;
|
|
32
|
+
height: 100%;
|
|
33
|
+
flex-direction: row;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
align-items: center;
|
|
36
|
+
background-color: ${t=>t.theme.colors.grey5};
|
|
37
|
+
`;function ea(){const t=P(),a=f(A=>D(A)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(v.isTreasuryEnabled),p=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=H(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Re(a?.userRole),l=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Me(r?.loggedInUserRoleMap),i=Ve(r?.loggedInUserRoleMap),g=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&Ne(r?.loggedInUserRoleMap),{isFeatureEnabled:I}=n(v.isDepositAccountsFeatureEnabled),u=I&&!s&&_e(r?.loggedInUserRoleMap),c=a.company!=null&&ze(a.company),h=o&&c===!0&&!s&&N(r?.loggedInUserRoleMap),{isFeatureEnabled:y}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:w}=n(v.isDebitCardFeatureEnabled),S=rt(a,y,w)&&!s&&$e(r?.loggedInUserRoleMap),T=Ge(r?.loggedInUserRoleMap),x=Ze(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(we,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(X,{isBillPayAdminLevelAccess:l,isReimbursementAdminLevelAccess:g,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:T,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(X,{isBillPayAdminLevelAccess:l,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:g,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:T,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(vt,{})}),e.jsx(k,{path:"statements",element:e.jsx(jt,{})}),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})}),h?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx(G,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx(G,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(ct,{})})]}):p&&h?e.jsx(k,{path:"*",element:e.jsx(U,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(U,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{ea as default};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import{j as l}from"./liveblocks-CpSeBLzv.js";import{a as g}from"./sentry-BxlhxHUi.js";import{h as J,g as K,i as M,j as S,n as G,u as Y,o as at,p as B,N as $}from"./core-DUPexJ3H.js";import{eQ as V,K$ as Ee,L0 as Ue,fU as X,cr as Ie,cs as we,w0 as St,L1 as nt,w4 as Yt,J4 as ee,jH as te,v_ as Kt,vU as qt,L2 as Re,vM as Ht,vL as Qt,vF as Wt,vR as Zt,w5 as Xt,L3 as he,L4 as Ne,vN as ea,L5 as pe,f4 as ft,wk as gt,wd as vt,L6 as xt,oN as Tt,w8 as yt,w6 as Dt,L7 as Ct,wr as Et,wo as It,w9 as wt,wq as Je,Hu as bt,L8 as ta,L9 as aa,cu as na,La as sa,Lb as oa,Lc as me,Ld as ie,Le as be,J5 as Ge,wG as ye,J3 as De,wt as kt,w1 as $e,Lf as la,J6 as H,Lg as ze,vX as ia,Lh as ca,Li as da,Lj as Ye,Lk as Ke,Ll as qe,Lm as He,wA as ke,Ln as At,wh as Lt,Lo as ra,Lp as ua,Lq as ha,Lr as pa,Ls as ma,Lt as Sa,Lu as fa,Lv as ga,tn as va,to as xa,Ia as Le,Lw as Ta,Lx as ya,j4 as Fe,bo as Da,Ly as Ca,Lz as Ea,kF as Ia,kO as wa,I9 as je,bE as st,LA as Ft,HM as jt,LB as ba,LC as ka,LD as Aa,kQ as La,LE as ot,LF as lt,LG as it,LH as ct,LI as Fa,kM as ja,LJ as Pa,kP as _a,LK as Va,LL as Pt,Iw as _t,k3 as Ba,LM as Oa,LN as Pe,LO as Vt,Iu as Bt,yT as Ma,LP as Ua,LQ as Ra,kn as Ot,LR as Na,LS as Ja,II as Ga,r3 as $a,LT as Mt,LU as dt,IF as _e,LV as rt,LW as za,IK as Ya,LX as Ka,LY as qa,LZ as Ha,L_ as Qa,L$ as Wa,r6 as Za,M0 as Xa,J7 as en,M1 as tn,In as Ve,gQ as an,M2 as nn,M3 as sn,gO as on,M4 as ln,M5 as cn,yX as dn,M6 as rn,M7 as un,M8 as hn,M9 as pn,k7 as mn,bn as Sn,e$ as fn,eZ as gn}from"./zeni-epic-state-DP595dtC.js";import{z as U,aq as Be,B as Ut,x as W,c as L,a2 as Z,aw as vn,q as N,D as Ce,H as ce,ax as Qe,ay as xn,az as Tn,p as We,aA as yn,m as Dn,J as de,A as Ze,s as ae,U as z,aB as Cn,h as Xe,_ as Se,aC as En,aD as Rt,Y as In,aE as wn,k as bn,aF as kn,at as Nt,aG as An,o as Q,S as Ln,C as Jt,E as Fn,aH as jn,aI as Pn,e as et,aJ as _n,aK as Vn,n as Bn,aL as On,aM as Mn}from"./index-B_Z_hpYg.js";import{n as R,D as Un,S as Gt}from"./mui-BYcLUAn-.js";import{t as Rn,A as Nn}from"./AddressScreen-BrRyijJp.js";import le from"./NotFoundScreen-DcBza--g.js";import{F as Jn}from"./FeaturePreviewScreen-BeSvOfyq.js";import{c as q,v as tt,d as Gn}from"./routePaths-DpeDFIQv.js";import{p as $t}from"./pathToGoBack-DOYIxcIl.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-D8UKtiUm.js";import{M as ge}from"./MobileAppDrawer-BG5P4V6f.js";import{D as $n}from"./DrawerScreen-C5n2KCQV.js";import{g as zn,m as Yn}from"./accountMappingHelper-JvNPAAYV.js";import"./recharts-Dp6Vlg5X.js";import"./analytics-wiEk3GGD.js";import"./plaid-DSCHiplf.js";import"./dnd-O-LDWVRl.js";import"./stripe-DMRn4zHo.js";import"./lottie-BpJoufaA.js";import"./lexical-D7D3BWIv.js";import"./pdf--1Oee4-D.js";import"./utils-BI-ymB94.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]="565545f8-3cac-4ca5-aed4-0498afb91efa",e._sentryDebugIdIdentifier="sentry-dbid-565545f8-3cac-4ca5-aed4-0498afb91efa")}catch{}})();const Kn=Ce.getLocalizedStrings(),qn=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(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(Yt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=N(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(vn),Hn=({setShouldNavigateBack:e})=>{const a=J(),s=K(),{scheduleDetailId:t,tenantEmailDomain:n}=M(),{scheduleType:o}=M();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>V(f)),r=Ee(o)??"accrued_expenses",h=U.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Ue(f,r)),m=i.selectedJELinkRowIndex,d=S(f=>X(f,c.companyId)),u=Be(i.updateStatus.fetchState);g.useEffect(()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[u,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const p=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Ut,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(W,{analytics:L,onLoad:()=>{Qn(i,r,d)}}):null,l.jsx(qn,{signedInUser:h,attachmentEndPoint:`${Z}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:L,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},zt=e=>{const a=Kn.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}},Qn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some(m=>m.isRecommendedTransaction===!0),h=Ie(s.controllers),i=we(s.controllerUserIds);t!=null&&L.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...zt(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Wn=R.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
width: 100%;
|
|
5
|
+
flex: 1 0 auto;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
+
`,Zn=G(function(e){const a=V(e),s=e.entityAutoCompleteState.autoCompleteText.common,t=Re(e,"common");return{tenantName:a.companyName,vendorSearchAutoCompleteData:{autoCompleteText:s,entityAutoCompleteView:t}}},function(e,a){const{navigate:s,location:t}=a,n="accrued_expenses";return{onNavigateBack:()=>{s("../schedules/accrued_expenses")},onZeniLogoClick:()=>{a.themeState.toggle()},onSave:o=>{a.setShouldNavigateBack(!0),e(St(n,o))},onDelete:o=>{e(ea(n,o))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,c)=>{o.trim().length>=2?e(Ne({searchString:o,entityType:c,searchOrigin:"common"})):o.trim().length===0&&e(he("common"))},onCancelAutoComplete:()=>{e(he("common"))}},onEditAmount:(o,c)=>{e(Xt(n,o,c))},onJELinkClick:o=>{e(Zt({selectedJELinkRowIndex:o})),s("./edit_link")},onCancelAccrual:(o,c,r)=>{e(Wt(o,c,r))},onTransactionClick:o=>{const c=`${q(o,a.tenantEmailDomain)}`,r=N(t.state?.pathnameStackToGoBack,t.pathname);s(c,{state:{pathnameStackToGoBack:r}})},onViewPostedJE:o=>{const c=`${q(o,a.tenantEmailDomain)}`,r=N(t.state?.pathnameStackToGoBack,t.pathname);s(c,{state:{pathnameStackToGoBack:r}})},onViewRecordedJE:o=>{const c=`${q(o,a.tenantEmailDomain)}`,r=N(t.state?.pathnameStackToGoBack,t.pathname);s(c,{state:{pathnameStackToGoBack:r}})},onViewBillExpense:o=>{const c=`${q(o,a.tenantEmailDomain)}`,r=N(t.state?.pathnameStackToGoBack,t.pathname);s(c,{state:{pathnameStackToGoBack:r}})},onDetailPageChange:(o,c,r)=>{const{scheduleDetailsAccruedExpensesSection:h}=o,{amount:i,memo:m,months:d,scheduleAccruedExpenseCategory:u,scheduleClass:p,scheduleExpenseCategory:f,startDate:D,vendor:x}=h,I=p.selectedOption!=null?a.classList.find(w=>w.classId===p.selectedOption):void 0,C=f.selectedOption!=null?a.accountList.find(w=>w.qboId===f.selectedOption):void 0,E=u.selectedOption!=null?a.accruedAccountList.find(w=>w.qboId===u.selectedOption):void 0,k=d?.selectedOption;e(Ht({scheduleType:n,localData:c,selectedJeScheduleDetailId:a.scheduleDetailId})),r!==!1||a.scheduleDetailId!=null||C?.accountId==null||a.isAccountingClassesEnabled!==!1&&I?.classId==null||E==null||x.selectedOption==null||m==null||i==null&&i==0||D==null||k==null||e(Qt({scheduleType:n}))}}})(xn),Xn=({shouldNavigateBack:e,setShouldNavigateBack:a})=>{const s=J(),t=K(),n=Y(),o=ce(),{tenantEmailDomain:c}=M(),[r,h]=g.useState(!1);if(c==null)throw new Error("Can't access this page without a tenantEmailDomain");const{scheduleDetailId:i}=M();let m;i!=="new"&&(m=i);const d=es(i),u=S(y=>y.scheduleAccruedDetailState.selectedJEAccruedScheduleKey),p="accrued_expenses",f=S(y=>Ue(y,"accrued_expenses")),D=S(y=>ee(y)),x=S(y=>y.classListState.fetchState),I=S(y=>te(y)),C=D!=="Completed"||x!=="Completed";g.useEffect(()=>{r===!1&&C?(n(Kt(p,m)),h(!0)):C===!1&&r===!1&&i!=="new"&&(n(qt(p,i)),h(!0))},[r]);const E=S(y=>V(y)),k=S(y=>X(y,E.companyId)),w=f.fetchState,b=f.allAccountList,P=f.allClassList,F=f.allAccruedAccountList,_=f.scheduleAccruedDetailsLocalData;if(d!==!0||f.fetchState==="Error")return l.jsx(le,{});const A=w==="Completed"&&r===!0;return w!=="Completed"&&w!=="Not-Started"?l.jsx(Qe,{}):l.jsxs(Wn,{children:[A===!0?l.jsx(W,{analytics:L,onLoad:()=>{ts(f,p,k)}}):null,l.jsx(Zn,{setShouldNavigateBack:a,scheduleAccruedDetailsView:f,location:t,navigate:s,classList:P,accountList:b,shouldNavigateBack:e,accruedAccountList:F,scheduleLocalData:_,selectedJEScheduleKey:u,scheduleDetailId:m,selectedScheduledJournalEntries:f.selectedJEAccruedSchedule?.scheduledJournalEntry??[],themeState:o,tenantEmailDomain:c,analytics:L,controllerUserDetails:k,isAccountingClassesEnabled:I,status:f.selectedJEAccruedSchedule?.status.code})]})},es=e=>e!=null,ts=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=Ie(s.controllers),o=we(s.controllerUserIds);t!=null&&L.trackScheduleAccruedDetailsLoaded({scheduleType:a,scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},schedule:{...zt(t)},vendorName:t.vendor.name??null,controllerEmails:n,controllerUserIds:o})},as=R.div`
|
|
10
|
+
display: flex;
|
|
11
|
+
min-height: 100%;
|
|
12
|
+
width: 100%;
|
|
13
|
+
flex: 1 0 auto;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
align-items: center;
|
|
16
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
+
`,Oe=Ce.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat,ns=G(function(e){const a=V(e),s=pe(e,"fixed_assets");return{tenantName:a.companyName,scheduleDetailsView:s}},function(e,a){const{navigate:s,location:t,vendorSearchAutoCompleteData:n,selectedScheduledJournalEntries:o}=a,c="fixed_assets",r=t.state?.message==="expenseAutomation",h=o.flatMap(i=>i.error).filter(i=>!!i)??[];return{onNavigateBack:()=>{if(r===!0){const i=We(a.location.state?.pathnameStackToGoBack),m=i.poppedPathname??$t(2);a.navigate(m,{state:{pathnameStackToGoBack:i.newStack}})}else s("../schedules/fixed_assets")},onZeniLogoClick:()=>{a.themeState.toggle()},onSave:i=>{e(Je(c,i,h.length>0))},onDelete:i=>{e(wt(c,i))},onMarkAsComplete:()=>{a.selectedJEScheduleKey!=null&&e(It(c,a.selectedJEScheduleKey))},onEditAmount:(i,m)=>{e(Et(c,i,m))},onJELinkClick:i=>{e(Ct({selectedJELinkRowIndex:i})),s("./edit_link")},onTransactionClick:i=>{const m=`${q(i,a.tenantEmailDomain)}`,d=N(t.state?.pathnameStackToGoBack,t.pathname);s(m,{state:{pathnameStackToGoBack:d,message:"comingFromScheduleDetailsFixedAssets"}})},onViewLinkedJE:i=>{const m=`${q(i,a.tenantEmailDomain)}`,d=N(t.state?.pathnameStackToGoBack,t.pathname);s(m,{state:{pathnameStackToGoBack:d}})},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,m)=>{i.trim().length>=2?e(Ne({searchString:i,entityType:m,searchOrigin:"common"})):i.trim().length===0&&e(he("common"))},onCancelAutoComplete:()=>{e(he("common"))}},onDetailPageChange:(i,m)=>{const{scheduleDetailsFixedAssetsSection:d,scheduleDetailsListSection:u}=i,{scheduleClass:p,scheduleExpenseCategory:f,accumulatedDepreciationCategory:D,assetId:x,months:I,startDate:C,postingDate:E,vendor:k}=d,w=n.entityAutoCompleteView.vendor.length>0?n.entityAutoCompleteView.vendor.find(v=>v.id===k?.selectedOption):void 0,b={id:w?.zeniId??k?.selectedOption??"",name:w?.name??k?.defaultOptions.find(v=>v.value===k?.selectedOption)?.label??"",logo:w?.logo},P=p.selectedOption!=null?a.classList.find(v=>v.classId===p.selectedOption):void 0,F=f.selectedOption!=null?a.accountList.find(v=>v.qboId===f.selectedOption):void 0,_=D.selectedOption!=null?a.depAccountList.find(v=>v.qboId===D.selectedOption):void 0,A=I?.selectedOption,y=u.map((v,re)=>({...a.scheduleLocalData.jeScheduleDetails[re],amount:{...a.scheduleLocalData.jeScheduleDetails[re].amount,amount:v.amount}})),j=E.type==="day"?E.dayOfMonth?E.dayOfMonth:1:void 0,T=E.type==="lastDayOfMonth"||void 0;e(yt({scheduleType:c,localData:{selectedAccount:F?.accountId,selectedClass:P?.classId,selectedAccumulatedDepreciationCategory:_?.accountId,selectedDate:C,selectedMonths:A,assetId:x,jeScheduleDetails:y,lastDayOfMonth:T,selectedDayOfMonth:j,selectedVendor:b},selectedJeScheduleDetailId:a.scheduleDetailId})),m!==!1||_?.accountId==null||a.scheduleDetailId!=null&&a.status!=="draft"&&a.status!=="marked_as_completed"||F?.accountId==null||a.isAccountingClassesEnabled!==!1&&P?.classId==null||C==null||A==null||T!==!0&&j==null||e(Dt({scheduleType:c}))}}})(Tn),ss=()=>{const e=J(),a=K(),s=Y(),t=ce(),{tenantEmailDomain:n}=M(),[o,c]=g.useState(!1),{scheduleDetailId:r}=M(),h=a.state?.message==="expenseAutomation",i=os(r),m=S(T=>T.scheduleDetailState.selectedJEScheduleKey);g.useEffect(()=>{m!=null&&m.length!==0||r!=="new"||e("../schedules/fixed_assets")},[m,r]);const d="fixed_assets",u=S(T=>pe(T,d)),p=S(T=>T.entityAutoCompleteState.autoCompleteText.common),f=S(T=>Re(T,"common")),D=S(T=>ee(T)),x=S(T=>T.classListState.fetchState),I=S(T=>te(T)),C=S(T=>ft(T).selectedPeriod),E=D!=="Completed"||x!=="Completed";g.useEffect(()=>{o===!1&&E?(s(gt(d,y,!0)),c(!0)):E===!1&&o===!1&&(s(vt(d,r==="new"?void 0:r,!0)),c(!0))},[o]),g.useEffect(()=>{if(u.markAsCompleteStatus.fetchState==="Completed")if(s(xt()),h===!0){const{month:T,year:v}=C;e(`../../month_end_close_checks/review/je_schedules/${T}-${v}`)}else e("../schedules/fixed_assets")},[u.markAsCompleteStatus.fetchState]);const k=S(T=>V(T)),w=S(T=>X(T,k.companyId)),b=u.fetchState,P=u.allAccountList,F=u.allClassList,_=u.allDepreciationAccountList,A=u.scheduleDetailsLocalData.fixed_assets;let y;if(r!=="new"&&(y=r),i!==!0||u.fetchState==="Error")return l.jsx(le,{});const j=b==="Completed"&&o===!0;return b!=="Completed"?l.jsx(Qe,{}):l.jsxs(as,{children:[j===!0?l.jsx(W,{analytics:L,onLoad:()=>{is(u,d,w)}}):null,l.jsx(ns,{location:a,navigate:e,classList:F,vendorSearchEntityAutoCompleteView:f,vendorSearchAutoCompleteData:{autoCompleteText:p,entityAutoCompleteView:f},expenseAutomationSelectedPeriod:C,usedInExpenseAutomation:h,removeJeScheduleTransactionKey:(T,v)=>{s(Tt(T,v))},accountList:P,depAccountList:_,scheduleLocalData:A,selectedJEScheduleKey:m,scheduleDetailId:y,selectedScheduledJournalEntries:u.selectedJEScheduleTransaction?.scheduledJournalEntry??[],themeState:t,tenantEmailDomain:n,analytics:L,controllerUserDetails:w,isAccountingClassesEnabled:I,status:u.selectedJEScheduleTransaction?.status.code})]})},os=e=>e!=null,ls=e=>({transactionDate:e.date.format(Oe),transactionAmount:e.amount,scheduleCategory:e.account.accountName,scheduleClass:e.classBase?.className??null,description:e.memo}),is=(e,a,s)=>{const t=e.selectedJEScheduleTransaction?.baseTransaction,n=e.selectedJEScheduleTransaction,o=Ie(s.controllers),c=we(s.controllerUserIds);var r;t!=null&&n!=null&&L.trackScheduleDetailsLoaded({scheduleType:a,transaction:{...ls(t)},scheduleExpenseCategoryAndClass:{expenseCategory:n.jeDebit.account?.accountName??null,expenseClass:n.jeDebit.accountingClass?.className??null},scheduledTransaction:{...(r=n,{currentBalance:r.balanceAsOfToday??null,currentStatus:r.status.label,period:r.period??null,startMonth:r.startDate?.format(Oe)??null,endMonth:r.endDate?.format(Oe)??null})},vendorName:n.vendor.name??null,fixedAssetsDetails:{accumulatedDepreciationCategory:n.jeCredit.account?.accountName??null,assetId:n.otherAttributes.assetId??null},controllerEmails:o,controllerUserIds:c})},cs=R.div`
|
|
18
|
+
display: flex;
|
|
19
|
+
min-height: 100%;
|
|
20
|
+
width: 100%;
|
|
21
|
+
flex: 1 0 auto;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
align-items: center;
|
|
24
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
25
|
+
`,Me=Ce.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat,ds=G(function(e,a){const s=V(e),t=pe(e,a.scheduleTab);return{tenantName:s.companyName,scheduleDetailsView:t}},function(e,a){const{navigate:s,location:t,usedInExpenseAutomation:n,vendorSearchAutoCompleteData:o,selectedScheduledJournalEntries:c}=a,r=c.flatMap(h=>h.error).filter(h=>!!h)??[];return{onNavigateBack:()=>{if(n===!0){const h=We(a.location.state?.pathnameStackToGoBack),i=h.poppedPathname??$t(2);a.navigate(i,{state:{pathnameStackToGoBack:h.newStack}})}else s("../schedules/prepaid_expenses")},onZeniLogoClick:()=>{a.themeState.toggle()},onSave:h=>{e(Je(a.scheduleTab,h,r.length>0))},onDelete:h=>{e(wt(a.scheduleTab,h))},onMarkAsComplete:()=>{a.selectedJEScheduleKey!=null&&e(It(a.scheduleTab,a.selectedJEScheduleKey))},onEditAmount:(h,i)=>{e(Et(a.scheduleTab,h,i))},onJELinkClick:h=>{e(Ct({selectedJELinkRowIndex:h})),s("./edit_link")},onTransactionClick:h=>{const i=`${q(h,a.tenantEmailDomain)}`,m=N(t.state?.pathnameStackToGoBack,t.pathname);s(i,{state:{pathnameStackToGoBack:m,message:"comingFromScheduleDetails"}})},onViewLinkedJE:h=>{const i=`${q(h,a.tenantEmailDomain)}`,m=N(t.state?.pathnameStackToGoBack,t.pathname);s(i,{state:{pathnameStackToGoBack:m}})},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(h,i)=>{h.trim().length>=2?e(Ne({searchString:h,entityType:i,searchOrigin:"common"})):h.trim().length===0&&e(he("common"))},onCancelAutoComplete:()=>{e(he("common"))}},onDetailPageChange:(h,i)=>{const{scheduleDetailsSection:m,scheduleDetailsListSection:d}=h,{scheduleClass:u,scheduleExpenseCategory:p,months:f,startDate:D,postingDate:x,vendor:I}=m,C=o.entityAutoCompleteView.vendor.length>0?o.entityAutoCompleteView.vendor.find(y=>y.id===I?.selectedOption):void 0,E={id:C?.zeniId??I?.selectedOption??"",name:C?.name??I?.defaultOptions.find(y=>y.value===I?.selectedOption)?.label??"",logo:C?.logo},k=u.selectedOption!=null?a.classList.find(y=>y.classId===u.selectedOption):void 0,w=p.selectedOption!=null?a.accountList.find(y=>y.qboId===p.selectedOption):void 0,b=f?.selectedOption,P=d.map((y,j)=>({...a.scheduleLocalData.jeScheduleDetails[j],amount:{...a.scheduleLocalData.jeScheduleDetails[j].amount,amount:y.amount}})),F=x.type==="day"?x.dayOfMonth?x.dayOfMonth:1:void 0,_=x.type==="lastDayOfMonth"||void 0,A={selectedAccount:w?.accountId,selectedClass:k?.classId,selectedDate:D,selectedMonths:b,jeScheduleDetails:P,lastDayOfMonth:_,selectedVendor:E,selectedDayOfMonth:F};e(yt({scheduleType:a.scheduleTab,localData:A,selectedJeScheduleDetailId:a.scheduleDetailId})),i!==!1||a.scheduleDetailId!=null&&a.status!=="draft"&&a.status!=="marked_as_completed"||w?.accountId==null||a.isAccountingClassesEnabled!==!1&&k?.classId==null||D==null||b==null||_!==!0&&F==null||e(Dt({scheduleType:a.scheduleTab}))}}})(yn),rs=()=>{const e=J(),a=K(),s=Y(),t=ce(),{tenantEmailDomain:n}=M(),[o,c]=g.useState(!1),r=a.state?.message==="expenseAutomation",{scheduleType:h,scheduleDetailId:i}=M(),m=us(h,i),d=S(T=>T.scheduleDetailState.selectedJEScheduleKey);g.useEffect(()=>{d!=null&&d.length!==0||i!=="new"||e("../schedules/prepaid_expenses")},[d,i]);const u=Ee(h)??"prepaid_expenses",p=S(T=>pe(T,u)),f=S(T=>T.entityAutoCompleteState.autoCompleteText.common),D=S(T=>Re(T,"common")),x=S(T=>ee(T)),I=S(T=>T.classListState.fetchState),C=S(T=>te(T)),E=S(T=>ft(T).selectedPeriod),k=x!=="Completed"||I!=="Completed";g.useEffect(()=>{o===!1&&k?(s(gt(u,y,!0)),c(!0)):k===!1&&o===!1&&(s(vt(u,i==="new"?void 0:i,!0)),c(!0))},[o]),g.useEffect(()=>{if(p.markAsCompleteStatus.fetchState==="Completed")if(s(xt()),r===!0){const{month:T,year:v}=E;e(`../../month_end_close_checks/review/je_schedules/${T}-${v}`)}else e("../schedules/prepaid_expenses")},[p.markAsCompleteStatus.fetchState]);const w=S(T=>V(T)),b=S(T=>X(T,w.companyId)),P=p.fetchState,F=p.allAccountList,_=p.allClassList,A=p.scheduleDetailsLocalData;let y;if(i!=="new"&&(y=i),m!==!0||p.fetchState==="Error")return l.jsx(le,{});const j=P==="Completed"&&o===!0;return P!=="Completed"?l.jsx(Qe,{}):l.jsxs(cs,{children:[j===!0?l.jsx(W,{analytics:L,onLoad:()=>{ps(p,u,b)}}):null,l.jsx(ds,{location:a,vendorSearchEntityAutoCompleteView:D,vendorSearchAutoCompleteData:{autoCompleteText:f,entityAutoCompleteView:D},usedInExpenseAutomation:r,removeJeScheduleTransactionKey:(T,v)=>{s(Tt(T,v))},expenseAutomationSelectedPeriod:E,navigate:e,classList:_,accountList:F,scheduleLocalData:A[u],selectedJEScheduleKey:d,scheduleDetailId:y,selectedScheduledJournalEntries:p.selectedJEScheduleTransaction?.scheduledJournalEntry??[],themeState:t,tenantEmailDomain:n,scheduleTab:u,analytics:L,controllerUserDetails:b,isAccountingClassesEnabled:C,status:p.selectedJEScheduleTransaction?.status.code})]})},us=(e,a)=>Ee(e)!=null&&a!=null,hs=e=>({transactionDate:e.date.format(Me),transactionAmount:e.amount,scheduleCategory:e.account.accountName,scheduleClass:e.classBase?.className??null,description:e.memo}),ps=(e,a,s)=>{const t=e.selectedJEScheduleTransaction?.baseTransaction,n=e.selectedJEScheduleTransaction,o=Ie(s.controllers),c=we(s.controllerUserIds);var r;t!=null&&n!=null&&L.trackScheduleDetailsLoaded({scheduleType:a,transaction:{...hs(t)},scheduleExpenseCategoryAndClass:{expenseCategory:n.jeDebit.account?.accountName??null,expenseClass:n.jeDebit.accountingClass?.className??null},scheduledTransaction:{...(r=n,{currentBalance:r.balanceAsOfToday??null,currentStatus:r.status.label,period:r.period??null,startMonth:r.startDate?.format(Me)??null,endMonth:r.endDate?.format(Me)??null})},vendorName:n.vendor.name??null,controllerEmails:o,controllerUserIds:c})},ms={drawerLeftMargin:new Ze(0,0,100,200)},Ss=G(function(e,a){const{jeScheduledTransaction:s,selectedJERow:t,scheduleType:n,isVendorBulkUpdateOnTransactionEnabled:o}=a,{scheduleDetailsLocalData:c,updateStatus:r}=pe(e,a.scheduleType),h=V(e),i=c[n].jeScheduleDetails[t].jeLink,m=i.type==="recommended"?i.recommendedTransactionID:i.transactionDetailID,d=m!=null?aa(e,m):void 0,u=U.getSignedInUser(),p=e.tenantState.currentTenantId,f={userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:h.tenantId??p},D=h?.company?.companyInfo?.firstMonthOfFY??1;return{jeScheduledTransaction:s,transactionDetail:d,localData:c[n].jeScheduleDetails[t],saveStatus:r.fetchState,authParams:f,isVendorBulkUpdateOnTransactionEnabled:o,firstMonthOfFY:D,isDisabled:r.fetchState==="In-Progress"?"readonly":void 0,analytics:L,qboAppUrl:na(Xe.qboRedirectionUrl)}},function(e,a){const{selectedJERow:s,jeScheduleDetailId:t,navigate:n}=a;return{onUpdateLocalData:o=>{const c=o.linkJETransaction.qboURL;c!=null&&e(oa({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,jeLink:c}))},onFetchTransactionClick:o=>{e(bt(o))},onSaveClick:()=>{e(Je(a.scheduleType,t))},onBackClick:()=>{n("..",{relative:"path"})},onCancelClick:()=>{const o=a.jeScheduledTransaction.scheduledJournalEntry[s];e(sa({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,originalScheduledJE:o})),n("..",{relative:"path"})}}})(Cn),fs=()=>{const e=Dn(),a=J(),s=Y(),{scheduleDetailId:t}=M(),n=de(),o=ms.drawerLeftMargin.valuePx(n),{scheduleType:c}=M(),{useFeatureGate:r}=ae(),{isFeatureEnabled:h}=r(z.isVendorBulkUpdateOnTransactionEnabled),i=Ee(c)??"prepaid_expenses",[m,d]=g.useState(!1);if(U.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const u=S(C=>pe(C,i));g.useEffect(()=>{u.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]);const p=u.selectedJELinkRowIndex,f=p!=null?u.scheduleDetailsLocalData[i].jeScheduleDetails[p]?.jeLink:null,D=f?.type==="recommended"?f.recommendedTransactionID:f?.transactionDetailID;g.useEffect(()=>{D!=null&&s(bt(D))},[]),g.useEffect(()=>{f?.type==="recommended"&&m===!1&&p!=null&&(d(!0),s(ta({scheduleType:i,jeScheduleDetailId:t,rowId:p})))});const x=S(C=>V(C)),I=S(C=>X(C,x.companyId));return l.jsx(Un,{anchor:"right",open:!0,PaperProps:{style:{width:`calc(100% - ${o})`,boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:e.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>a("..",{relative:"path"}),children:l.jsx(gs,{onClick:C=>C.stopPropagation(),children:u.fetchState!=="Completed"||u.selectedJEScheduleTransaction==null||p==null?l.jsx(Ut,{fetchState:u.fetchState}):l.jsx(Ss,{scheduleType:i,jeScheduleDetailId:t,selectedJERow:p,jeScheduledTransaction:u.selectedJEScheduleTransaction,isCOTEnabled:!1,navigate:a,scheduleTab:i,controllerUserDetails:I,isVendorBulkUpdateOnTransactionEnabled:h})})})},gs=R(Gt)`
|
|
26
|
+
display: flex;
|
|
27
|
+
min-height: 100%;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
`,ve=e=>{switch(e){case"vendors_tab":return"../summary";case"filing_1099":return"../filing_1099";case"prepaid_expenses":return"../schedules/prepaid_expenses";case"fixed_assets":return"../schedules/fixed_assets";case"accrued_expenses":return"../schedules/accrued_expenses";default:return"../opex"}},xe=e=>{switch(e){case"prepaid_expenses":return"prepaid_expenses";case"fixed_assets":return"fixed_assets";case"accrued_expenses":return"accrued_expenses";case"operating_expenses_by_vendor":return"operating_expenses";default:return"vendors_list"}},Te=()=>{const e=K(),a=Y(),s=S(t=>me(t));return g.useEffect(()=>{const t=e.pathname.split("/").pop();if(t!=null){const n=(o=>{switch(o){case"prepaid_expenses":return"prepaid_expenses";case"fixed_assets":return"fixed_assets";case"accrued_expenses":return"accrued_expenses";case"opex":return"operating_expenses";case"filing_1099":return"filing_1099";default:return"vendors_list"}})(t);n!==s.currentTab&&a(ie(n))}},[e.pathname,s.currentTab,a]),s},ne="accrued_expenses",vs=G(function(e,a){const s=V(e),t=me(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,vendorTabView:t,isAccountingClassesEnabled:te(e)}},function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=ve(t);s(n),e(ie(xe(t)))},onSortOrderChanged:(t,n)=>{e(He({scheduleType:ne,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(qe({scheduleType:ne,subTab:t}))},onSearchTextChanged:t=>{e(Ke({scheduleType:ne,searchText:t}))},onReloadReport:()=>{e(kt(ne))},onScroll:t=>{e(Ye({scheduleType:ne,scrollYOffset:t}))},onClickNewButton:()=>{e(ca()),e(da()),L.trackScheduleAccruedDetailsNewRequested({scheduleType:"accrued_expenses"}),s("details/new")},onClickSchedule:t=>{e(ia({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeAccruedSchedules.find(o=>o.jeAccruedScheduleKey===t);s(`details/${n?.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(ze({scheduleType:ne,fetchState:t}))}}})(En),xs=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=g.useState(!1),[o,c]=g.useState(!1),r=J(),h=Y(),{useFeatureGate:i}=ae(),m=ce();Te();const{isFeatureEnabled:d,isFeatureGateLoading:u}=i(z.isOpexByVendorFeatureEnabled),p=U.getSignedInUser(),f=S(v=>V(v)),D={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:f.tenantId},x=g.useMemo(()=>({authParams:D,jeScheduleEndPoint:`${Z}/jeScheduleReports`,timezone:be(),companyName:f.companyName}),[]),[I,C]=g.useState(!1),E=S(v=>ee(v)),k=S(v=>Ge(v,"accrued_expenses")),w=e.includes("prepaid_expenses"),b=e.includes("fixed_assets"),P=e.includes("accrued_expenses");g.useEffect(()=>{(w||b||P)&&I===!1&&E!=="Completed"&&(h(ye()),C(!0))},[I]),g.useEffect(()=>{u===!1&&(h(De({shouldFetchAccruedExpenses:P,shouldFetchFixedAssets:!0,shouldFetchPrepaidExpenses:w,shouldFetchOpexByVendor:d,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))},[E,b,u,d]),g.useEffect(()=>{t===!1&&k==="Completed"&&h(kt("accrued_expenses",{selectedTimeframe:$e("accrued_expenses"),selectedCategoryId:"all"},!0))},[t,k]);const F=S(v=>la(v,ne)),{isAiCfoAccessEnabled:_,onAskAiCfoClick:A}=fe({mobileExploreReferrer:"Vendors — Accrued Expenses"});Se({isDataReady:F.fetchState==="Completed"});const y=S(v=>H(v).isReportGenerated);S(v=>H(v).fetchState)!=="Completed"||y!==!0||d!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),P||r("../opex");const j=S(v=>X(v,f.companyId)),T=v=>{c(v)};return l.jsxs(l.Fragment,{children:[l.jsx(ge,{isAppContentDrawerOpen:o,handleDrawerToggle:T}),l.jsx(vs,{navigate:r,previousTabPosition:a,setPreviousTabPosition:s,scheduleListReport:F,downloadParams:x,themeState:m,vendorTabsToShow:e,analytics:L,controllerUserDetails:j,isAiCfoAccessEnabled:_,onAskAiCfoClick:A,onClickMenuIcon:()=>T(!0)})]})},se="fixed_assets",Ts=G(function(e,a){const s=V(e),t=me(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,controllerUserDetails:a.controllerUserDetails,vendorTabView:t,isAccountingClassesEnabled:te(e)}},function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=ve(t);s(n),e(ie(xe(t)))},onSortOrderChanged:(t,n)=>{e(He({scheduleType:se,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(qe({scheduleType:se,subTab:t}))},onSearchTextChanged:t=>{e(Ke({scheduleType:se,searchText:t}))},onReloadReport:()=>{e(ke(se))},onScroll:t=>{e(Ye({scheduleType:se,scrollYOffset:t}))},onClickSchedule:t=>{e(Lt({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeScheduledTransactions.find(o=>o.jeScheduleTransactionKey===t);s(n?.jeScheduleId==null?"details/new":`details/${n.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(ze({scheduleType:se,fetchState:t}))}}})(Rt),ys=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=g.useState(!1),o=J(),c=Y();Te();const{useFeatureGate:r}=ae(),h=ce(),{isFeatureEnabled:i,isFeatureGateLoading:m}=r(z.isOpexByVendorFeatureEnabled),d=U.getSignedInUser(),u=S(v=>V(v)),p={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:u.tenantId},f=g.useMemo(()=>({authParams:p,jeScheduleEndPoint:`${Z}/jeScheduleReports`,timezone:be(),companyName:u.companyName}),[]),[D,x]=g.useState(!1),I=S(v=>ee(v)),C=S(v=>Ge(v,"fixed_assets")),E=e.includes("prepaid_expenses"),k=e.includes("fixed_assets"),w=e.includes("accrued_expenses");g.useEffect(()=>{(E||k||w)&&D===!1&&I!=="Completed"&&(c(ye()),x(!0))},[D]),g.useEffect(()=>{m===!1&&(c(De({shouldFetchAccruedExpenses:w,shouldFetchFixedAssets:!0,shouldFetchPrepaidExpenses:E,shouldFetchOpexByVendor:i,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))},[I,k,m,i]),g.useEffect(()=>{t===!1&&C==="Completed"&&c(ke("fixed_assets",{selectedTimeframe:$e("fixed_assets"),selectedCategoryId:"all"},!0))},[t,C]);const b=S(v=>At(v,se)),{isAiCfoAccessEnabled:P,onAskAiCfoClick:F}=fe({mobileExploreReferrer:"Vendors — Fixed Assets"});Se({isDataReady:b.fetchState==="Completed"});const _=S(v=>H(v).isReportGenerated);S(v=>H(v).fetchState)!=="Completed"||_!==!0||i!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),k||o("../opex");const A=S(v=>X(v,u.companyId)),[y,j]=g.useState(!1),T=v=>{j(v)};return l.jsxs(l.Fragment,{children:[l.jsx(ge,{isAppContentDrawerOpen:y,handleDrawerToggle:T}),l.jsx(Ts,{navigate:o,scheduleListReport:b,downloadParams:f,previousTabPosition:a,setPreviousTabPosition:s,themeState:h,vendorTabsToShow:e,analytics:L,controllerUserDetails:A,isAiCfoAccessEnabled:P,onAskAiCfoClick:F,onClickMenuIcon:()=>{T(!0)}})]})},Ds=R.div`
|
|
30
|
+
display: flex;
|
|
31
|
+
min-height: 100%;
|
|
32
|
+
width: 100%;
|
|
33
|
+
flex: 1 1 auto;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
align-items: center;
|
|
36
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
37
|
+
`,Cs=G(function(e,a){const s=U.getSignedInUser(),t=e.tenantState.currentTenantId,n=V(e),o=n?.companyName??"",c={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""},r=H(e),h=ra(e);return{report:r,uiState:h,isAccountingClassesEnabled:te(e),analytics:L,vendorTabsToShow:a.vendorTabsToShow,downloadParams:{downloadState:h.downloadState,currentTenantCompanyName:o,statementEndPoint:`${Z}/opexByVendor`,authParams:c,timezone:be()}}},function(e,a){const{navigate:s}=a;return{onFetchOpExByVendors:(t,n,o)=>{e(xa(t,n,o))},onVendorNameAndBalanceClicked:(t,n)=>{if(a.tenantEmailDomain!=null){const o=tt(t.id,t.qboId,a.tenantEmailDomain,n),c=N(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:c,referrer:"Operating Expenses By Vendor"}})}},onReloadReport:()=>{e(va(!0))},onBackClick:()=>{s("../../dashboard")},onTimeframeSelectionChanged:t=>{e(ga(t))},onAdditionalBalanceSelectionChanged:(t,n)=>{e(fa({isCompareModeOn:t,additionalBalances:n}))},onSortOrderChanged:(t,n,o)=>{e(Sa({sortkey:n,sortOrder:t,timeframe:o}))},onVendorTabSelectionChanged:t=>{const n=ve(t);s(n),e(ie(xe(t)))},onSortOrSearchStarted:t=>{e(ma(t))},onPageFetchStarted:()=>{e(pa(!0))},updateDownloadStateHandler:t=>{e(ha(t))},onClearSearch:t=>{e(ua({timeframe:t}))}}})(wn);function Es({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=J(),n=Y(),o=K(),{tenantEmailDomain:c}=M(),r=de(),h=U.getSignedInUser(),{useFeatureGate:i}=ae(),{isFeatureEnabled:m,isFeatureGateLoading:d}=i(z.isOpexByVendorFeatureEnabled),u=S(A=>H(A));if(h==null)throw Error("Can't access opex by vendor page without signing in...");Te();const[p,f]=g.useState(!1),D=S(A=>ee(A)),x=e.includes("prepaid_expenses"),I=e.includes("fixed_assets"),C=e.includes("accrued_expenses"),E=S(A=>me(A)),{isAiCfoAccessEnabled:k,onAskAiCfoClick:w}=fe({mobileExploreReferrer:"Vendors — Operating Expenses by Vendor"});Se({isDataReady:u.fetchState==="Completed"&&u.isReportGenerated===!0});const{areTenantIdsInSync:b}=In();g.useEffect(()=>{(x||I||C)&&p===!1&&D!=="Completed"&&b&&(n(ye()),f(!0))},[p,b]),g.useEffect(()=>{b&&n(De({shouldFetchAccruedExpenses:C,shouldFetchFixedAssets:I,shouldFetchPrepaidExpenses:x,shouldFetchOpexByVendor:m===!0&&d===!1,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1}))},[D,I,d,m,b]),u.fetchState!=="Completed"||u.isReportGenerated!==!0||m!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),(u.isReportGenerated===!1&&u.fetchState==="Completed"||m===!1&&d===!1)&&t("../summary");const[P,F]=g.useState(!1),_=A=>{F(A)};return l.jsxs(Ds,{windowSize:r,children:[u.fetchState==="Completed"?l.jsx(W,{analytics:L,onLoad:A=>{E.previousTab==null?A.trackVendorOperatingExpensesPageLoaded("Side Panel"):A.trackVendorOperatingExpenses(E.currentTab,E.previousTab??null)}}):null,l.jsx(ge,{isAppContentDrawerOpen:P,handleDrawerToggle:_}),l.jsx(Cs,{location:o,navigate:t,previousTabPosition:a,setPreviousTabPosition:s,tenantEmailDomain:c,vendorTabsToShow:e,isAiCfoAccessEnabled:k,onAskAiCfoClick:w,onClickMenuIcon:()=>{_(!0)}})]})}const oe="prepaid_expenses",Is=G(function(e,a){const s=V(e),t=me(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,controllerUserDetails:a.controllerUserDetails,vendorTabView:t,isAccountingClassesEnabled:te(e)}},function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=ve(t);s(n),e(ie(xe(t)))},onSortOrderChanged:(t,n)=>{e(He({scheduleType:oe,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(qe({scheduleType:oe,subTab:t}))},onSearchTextChanged:t=>{e(Ke({scheduleType:oe,searchText:t}))},onReloadReport:()=>{e(ke(oe))},onScroll:t=>{e(Ye({scheduleType:oe,scrollYOffset:t}))},onClickSchedule:t=>{e(Lt({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeScheduledTransactions.find(o=>o.jeScheduleTransactionKey===t);s(n?.jeScheduleId==null?"details/new":`details/${n.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(ze({scheduleType:oe,fetchState:t}))}}})(Rt),ws=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=g.useState(!1),o=J(),c=Y(),{useFeatureGate:r}=ae(),h=ce();Te();const i=U.getSignedInUser(),{isFeatureEnabled:m,isFeatureGateLoading:d}=r(z.isOpexByVendorFeatureEnabled),u=S(v=>V(v)),p=S(v=>Ge(v,"prepaid_expenses")),f={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:u.tenantId},D=g.useMemo(()=>({authParams:f,jeScheduleEndPoint:`${Z}/jeScheduleReports`,timezone:be(),companyName:u.companyName}),[]),[x,I]=g.useState(!1),C=S(v=>ee(v)),E=e.includes("prepaid_expenses"),k=e.includes("fixed_assets"),w=e.includes("accrued_expenses");g.useEffect(()=>{(E||k||w)&&x===!1&&C!=="Completed"&&(c(ye()),I(!0))},[x]),g.useEffect(()=>{t===!1&&p==="Completed"&&c(ke("prepaid_expenses",{selectedTimeframe:$e("prepaid_expenses"),selectedCategoryId:"all"},!0))},[t,p]),g.useEffect(()=>{d===!1&&(c(De({shouldFetchAccruedExpenses:w,shouldFetchFixedAssets:k,shouldFetchPrepaidExpenses:!0,shouldFetchOpexByVendor:m,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))},[C,k,d,m]);const b=S(v=>At(v,oe)),{isAiCfoAccessEnabled:P,onAskAiCfoClick:F}=fe({mobileExploreReferrer:"Vendors — Prepaid Expenses"});Se({isDataReady:b.fetchState==="Completed"});const _=S(v=>H(v).isReportGenerated);S(v=>H(v).fetchState)!=="Completed"||_!==!0||m!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),E||o("../opex");const A=S(v=>X(v,u.companyId)),[y,j]=g.useState(!1),T=v=>{j(v)};return l.jsxs(l.Fragment,{children:[l.jsx(ge,{isAppContentDrawerOpen:y,handleDrawerToggle:T}),l.jsx(Is,{navigate:o,previousTabPosition:a,setPreviousTabPosition:s,scheduleListReport:b,downloadParams:D,themeState:h,vendorTabsToShow:e,analytics:L,controllerUserDetails:A,isAiCfoAccessEnabled:P,onAskAiCfoClick:F,onClickMenuIcon:()=>{T(!0)}})]})},bs=R.div`
|
|
38
|
+
display: flex;
|
|
39
|
+
min-height: 100%;
|
|
40
|
+
width: 100%;
|
|
41
|
+
flex: 1 1 auto;
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
align-items: center;
|
|
44
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
45
|
+
`,ks=G(function(e,a){const{isFiling1099FeatureEnabled:s,vendorDetailView:t,selectedVendor:n,firstMonthOfFY:o,currentTenant:c,currentUserRoleMap:r}=a,h=U.getSignedInUser(),i={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:c.tenantId??""};return{firstMonthOfFY:o,isFiling1099FeatureEnabled:s,vendorDetailView:t,allTransactions:t?.allVendorTransactionsView,allTransactionsTabData:t?.allTransactionsTabData!=null?{timePeriod:ba(t?.allTransactionsTabData.timePeriod),numberOfQuartersFetched:t?.allTransactionsTabData.numberOfQuartersFetched}:void 0,vendorLogo:n?.logo,readOnlyMode:r?.bookkeeping_user===!0,filesEndPoint:Nt.fileMicroServiceBaseUrl,authParams:i,scrollToTrend:a.isTrendPeriodSelected}},function(e,a){const{navigate:s,vendorDetailView:t,vendorId:n,defaultTransactionTimePeriod:o,vendorEntity:c,tenantEmailDomain:r,location:h,firstMonthOfFY:i}=a,m=()=>{const d=We(h.state?.pathnameStackToGoBack),u=d.poppedPathname??((p=2)=>{let f=p;a.isTrendPeriodSelected===!0&&(f=5);let D="../";for(let x=0;x<f;x++)D=`${D}../`;return D})(1);s(u,{state:{pathnameStackToGoBack:d.newStack}})};return{onSaveVendor:()=>{t!=null&&((d,u)=>{const{vendorId:p,vendorName:f,existingCategory:D,existingClass:x,existingOwner:I,selectedCategory:C,selectedClass:E,selectedOwner:k,isRecommendedCategorySelected:w,isRecommendedClassSelected:b,categoryRecommendationTypeSelected:P,classRecommendationTypeSelected:F}=Va(d,u);p!=null&&L.trackVendorDetailsSave(p,f??"",D,x,I,C,E,k,w,b,P,F)})(t?.vendorViewDetails,t?.vendorViewDetails.ownerList),n!=null&&e(_a(n,void 0))},onVendorSpendTrendFilterTabClick:d=>{e(Pa(d))},saveVendorDetailLocalData:d=>{n!=null&&e(ja({vendorId:n,localData:d}))},saveContactsInVendorTabDetailLocalData:(d,u)=>{e(Fa({vendorId:d,localData:{contacts:u}}))},onCancelClick:()=>{var d;t?.vendorViewDetails.vendorView?.vendorBasic!=null&&(d=t.vendorViewDetails.vendorView.vendorBasic).id!=null&&L.trackVendorDetailsCancel(d.id??"",d.name,d.account?.accountName,d.class?.className,d.owner?.email),e(ot()),e(lt()),e(it()),e(ct()),m()},handleSpendTrendPercentChangeClick:()=>{var d;t?.vendorViewDetails.vendorView?.vendorBasic!=null&&(d=t.vendorViewDetails.vendorView?.vendorBasic,d.id!=null&&L.trackVendorDetailsSpendTrendHotlinkClicked(d.id??"",d.name,d.account?.accountName,d.class?.className,d.owner?.email))},onSaveSuccess:()=>{n!=null&&e(La("Not-Started",n)),e(ot()),e(lt()),e(it()),e(ct()),m()},onTrendSelectedPeriodChange:d=>{if(d==null)o!=null&&e(Le(c,"EntityDetail",{timeframe:"quarter",timePeriod:o}));else{const u=d.currentTimePeriod==null?d.addTimePeriod:{startDate:d.addTimePeriod.startDate,endDate:d.currentTimePeriod.endDate};e(je(c,"EntityDetail",{timeframe:d.timeframe,timePeriod:d.addTimePeriod},i)),e(Le(c,"EntityDetail",{timeframe:d.timeframe,timePeriod:u}))}},onVendorTabSelectionChanged:d=>{e(Aa(d))},onAddressClick:(d,u)=>{if(r==null)return;const p=Gn(r,d,u),f=N(h.state?.pathnameStackToGoBack,h.pathname);s(p,{state:{pathnameStackToGoBack:f}})},onVendorDetailUIChange:d=>{e(ka({collapsableStatus:d}))},onTransactionItemClick:d=>{const u=`${q(d,r)}`,p=N(h.state?.pathnameStackToGoBack,h.pathname);s(u,{state:{pathnameStackToGoBack:p}})},onLoadPreviousTransactionsClick:(d,u)=>{e(Ft({timePeriod:Fe(d),numberOfQuartersFetched:u})),e(jt(c,Fe(d),!0,!0))}}})(kn);function ut({referrerType:e,isFiling1099FeatureEnabled:a}){const s=Y(),t=K(),n=J(),o=bn(),[c,r]=g.useState(!1),[h,i]=g.useState(!1),[m,d]=g.useState(!1),u=M(),p=u.vendorId,f=u.qboId,{tenantEmailDomain:D,timeframe:x,startDate:I,endDate:C}=u,E={id:f??"",name:"",type:"vendor",zeniId:p??"",qboId:f??""};g.useEffect(()=>{x!=null&&I!=null&&C!=null?r(!0):(r(!1),m===!1&&(d(!0),s(Le(E,"EntityDetail"))))},[x,I,C]);const k=de(),w=S(O=>V(O)),b=S(O=>p!=null?Ta(O,p,E):void 0),P=S(O=>O.vendorState.vendorByID[p??""]),F=S(O=>V(O).company?.companyInfo.firstMonthOfFY??1),_=S(()=>ya(F,2)),A=Fe({startDate:_.startDate,endDate:Da()}),y=Ca(F),j=S(O=>Ea(O.trendWithTransactionsState,E,"EntityDetail")),[T,v]=g.useState(!1),re=c===!1&&m===!1?void 0:j?.selectedPeriod?.timePeriod??y;return g.useEffect(()=>(e==null&&b?.fetchState!=="Not-Started"||p==null||s(Ia(p,E)),()=>{e!=null&&p!=null&&s(wa(p))}),[p,t.state,s]),g.useEffect(()=>{b?.fetchState==="Completed"&&b?.vendorViewDetails.vendorView?.vendorBasic!=null&&((O,ue,Ae)=>{O.id!=null&&L.trackVendorDetails(O.id,O.name,Ae,O.account?.accountName,O.class?.className,O.owner?.email,ue.percentChange,ue.last30DaysSpend,ue.last90DaysSpend,ue.yearToDateSpend)})(b?.vendorViewDetails.vendorView?.vendorBasic,b?.vendorSpend,e),v(!1)},[b?.fetchState]),g.useEffect(()=>{if(b?.fetchState==="Completed"&&T===!1){re!=null&&c===!1&&(s(je(E,"EntityDetail",{timeframe:j?.selectedPeriod?.timeframe??"quarter",timePeriod:re},F)),v(!0));const O=Ce.getLocalizedStrings().dateFormat.analytics;if(c===!0&&x!=null&&I!=null&&C!=null){v(!0);const ue=x,Ae={startDate:st(I,O.YYYYDashMMDashDDFormat),endDate:st(C,O.YYYYDashMMDashDDFormat)};s(je(E,"EntityDetail",{timeframe:ue,timePeriod:Ae}))}}},[b?.fetchState,re,j?.selectedPeriod?.timeframe,c,F]),g.useEffect(()=>{b?.fetchState==="Completed"&&h===!1&&(s(Ft({timePeriod:A,numberOfQuartersFetched:3})),s(jt(E,b.allTransactionsTabData?.timePeriod??A,!1,!0)),i(!0))},[b?.fetchState,h]),p==null?l.jsx(le,{}):l.jsx(bs,{windowSize:k,children:l.jsx(ks,{location:t,navigate:n,isFiling1099FeatureEnabled:a,vendorDetailView:b,vendorId:p,currentTenant:w,selectedVendor:P,firstMonthOfFY:F,isTrendPeriodSelected:c,selectedPeriodTimePeriod:j?.selectedPeriod?.timePeriod,defaultTransactionTimePeriod:y,vendorEntity:E,currentUserRoleMap:o?.loggedInUserRoleMap,tenantEmailDomain:D})})}const As=Ce.getLocalizedStrings().spendManagement.billPay.vendorCreation.vendorDetails,Ls={containerWidth:new Ze(100,58)},Fs=R(Ln)`
|
|
46
|
+
width: ${Q.sp4};
|
|
47
|
+
height: ${Q.sp4};
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
color: ${e=>e.theme.colors.brandColorJade};
|
|
50
|
+
`,js=R.div`
|
|
51
|
+
display: flex;
|
|
52
|
+
height: 100vh;
|
|
53
|
+
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
54
|
+
width: 100%;
|
|
55
|
+
overflow-y: scroll;
|
|
56
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
57
|
+
`,Ps=R.div`
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
width: ${e=>`${Ls.containerWidth.value(e.windowSize)}%`};
|
|
61
|
+
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
62
|
+
`,_s=G(function(e,a){const s=U.getSignedInUser(),t=e.tenantState.currentTenantId,n={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""},o=e.vendorFiling1099UploadDetailsState,c=e.vendorFiling1099UploadDetailsState;let r={fetchState:"Not-Started",error:void 0};return a.vendorId!=null&&(r=e.vendorViewState.editVendorStateById[a.vendorId]?.fetchStatus),{uploadInvoiceEndPoint:`${Nt.documentAIMicroServiceBaseUrl}`,vendorFiling1099UploadDetailsState:o,vendorFiling1099UploadDetailsViewState:c,uploadStaus:c.w9FormUploadStatus,authParams:n,billId:a.billId,vendorId:a.vendorId,file:a.file,showAutofill:a.showAutofill,type:a.type,analytics:L,entityId:a.billId,fetchVendorFetchStatus:r,vendorLegalName:a.vendorLegalName}},function(e,a){const s=a.vendorId;return{onInvoiceUpload:t=>{if(function(n){return n!=null&&"w9_form"in n}(t)&&(e(Ua({w9FormFile:t.files[0]})),t.w9_form[0]!=null)){e(Ra({ocrData:t.w9_form[0],vendorId:s}));const n=(o=>({street:[o.street.join(" ")],city:o.city,state:o.state,postalCode:o.postal_code,countryCode:o.country_code??void 0,country:o.country??""}))(t.w9_form[0].address);e(Ot({addressType:"vendor_address",addressToCreate:n}))}},updateInvoiceUploadFetchState:t=>{e(Pe({fetchState:t,error:void 0}))},onSkipAutofill:t=>{e(Ma(t))},onVendorFiling1099UploadDetailsSave:t=>{e(Bt(t))},onDeleteClick:()=>{e(Pe({fetchState:"Not-Started",error:void 0})),e(Vt({vendorId:s,w9Documents:[]}))}}})(jn);function ht({appContent:e,showFullScreenSkeletonWhileLoading:a}){const s=Y(),t=J(),{vendorId:n}=M(),o=de(),c=ce(),r=U.getSignedInUser(),[h,i]=g.useState(!1),{useFeatureGate:m}=ae(),{isFeatureEnabled:d}=m(z.isVendorRecommendationFeatureEnabled),u=S(y=>V(y)).companyName,p=new AbortController,f=p.signal;let D,x,I,C,E;if(n==null)throw new Error("Vendor ID not found for Vendor Filing 1099 Details Screen");D=S(y=>Pt(y,n)),x=S(y=>y.vendorFiling1099UploadDetailsState.vendor1099DetailsSaveStatus),I=S(y=>y.vendorViewState.editVendorStateById[n]?.fetchStatus),E=S(y=>y.vendorFiling1099UploadDetailsState.vendor1099DetailsLocalData.w9Documents?.[0]),C=S(y=>y.vendorFiling1099UploadDetailsState);const k=I?.fetchState==="In-Progress"||C?.w9FormUploadStatus?.fetchState==="In-Progress",w=()=>{c.toggle()};g.useEffect(()=>()=>{p.abort(),s(_t(n))},[]),g.useEffect(()=>{h||n!=null&&(i(!0),s(Ba(!1,n,f)))},[n]);const b=Be(I?.fetchState),P=Be(x?.fetchState),F=D.vendor?.contactIds,_=F?.[F.length-1],A=S(y=>y.contactState.contactById[_]);if(g.useEffect(()=>{n!=null&&b==="In-Progress"&&I?.fetchState==="Completed"&&D?.vendor!=null&&(s(Oa(n,D.vendor,A)),D?.vendor.filing1099W9Files?.[0]!=null&&s(Pe({fetchState:"Completed",error:void 0})))},[n,D?.vendor]),g.useEffect(()=>{P==="In-Progress"&&x?.fetchState==="Completed"&&t("../../vendors/filing_1099")},[x?.fetchState]),a===!0&&I?.fetchState!=="Completed"&&I?.fetchState!=="Error")return l.jsx(Us,{children:l.jsx(An,{})});if(r==null)throw Error("Can't access VendorFiling1099UploadScreen without signing in...");return l.jsxs(js,{windowSize:o,children:[o!=="small"?l.jsxs(Bs,{children:[l.jsx(Fs,{onClick:w}),l.jsxs(Vs,{showContent:r.userEmailDomain==="zeni.ai",children:[l.jsx(Os,{showAutofill:!1}),l.jsx(Ms,{showAutofill:!1,children:u})]})]}):null,l.jsx(_s,{vendorId:n,file:E,showAutofill:!1,type:"w9",isVendorRecommendationEnabled:d,pdfTitle:E?As.w9FormTitle:void 0,showTitlebar:!0,showTitlebarIcon:!0,vendorLegalName:D?.vendor?.legalName,isLoading:k}),l.jsx(Ps,{windowSize:o,children:e})]})}const Vs=R.div`
|
|
63
|
+
display: ${e=>e.showContent?"flex":"none"};
|
|
64
|
+
align-items: center;
|
|
65
|
+
`,Bs=R.div`
|
|
66
|
+
margin-bottom: ${Q.sp3};
|
|
67
|
+
margin-top: ${Q.sp3};
|
|
68
|
+
margin-left: ${Q.sp8};
|
|
69
|
+
position: absolute;
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
`,Os=R.div`
|
|
73
|
+
width: 1px;
|
|
74
|
+
height: ${Q.sp3};
|
|
75
|
+
margin: ${Q.sp0} ${Q.sp3};
|
|
76
|
+
background-color: ${e=>e.showAutofill?Jt.neutralGrey1Light:e.theme.colors.hero};
|
|
77
|
+
`,Ms=R(Fn.StandardMedium)`
|
|
78
|
+
color: ${e=>e.showAutofill?Jt.neutralGrey5Light:e.theme.colors.primary};
|
|
79
|
+
`,Us=R.div`
|
|
80
|
+
width: 100%;
|
|
81
|
+
height: 100vh;
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
84
|
+
`,Rs=G(function(e){const a=Na(e);return{vendorDetailView:Ja(e),globalMerchantView:a}},function(e,a){const{navigate:s}=a;return{updateVendorDetailLocalData:t=>{e(Mt({vendorDetails:t}))},fetchRecommendation:t=>{e($a("tenant",t))},onSaveClick:()=>{e(Ga())},onBackClick:()=>{s("../review")}}})(Pn);function Ns(){const e=J();return l.jsx(Rs,{navigate:e})}const Js=R.div`
|
|
85
|
+
display: flex;
|
|
86
|
+
min-height: 100%;
|
|
87
|
+
width: 100%;
|
|
88
|
+
flex: 1 1 auto;
|
|
89
|
+
flex-direction: column;
|
|
90
|
+
align-items: center;
|
|
91
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
92
|
+
`,Gs=G(function(e,a){const{vendorFirstReviewDetails:s}=a,t=e.globalMerchantAutoCompleteState.autoCompleteText,n=U.getSignedInUser(),o=e.tenantState.currentTenantId,c={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""},r=V(e);return{vendorFirstReviewView:s,globalMerchantAutoCompleteData:{globalMerchantAutoCompleteView:s.globalMerchantAutoCompleteView,autoCompleteText:t},analytics:L,authParams:c,attachmentEndpoint:r.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${Z}/vendor_attachments_accounting_provider`:`${Z}/vendor_attachments`}},function(e,a){const{navigate:s}=a;return{onFetchVendorReviewView:(t,n,o)=>{e(_e(t,n,o))},onGlobalMerchantAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?e(Za({searchString:t,globalMerchantType:n??"vendor"})):t.trim().length===0&&e(rt())},onUpdateLocalData:(t,n,o,c)=>{if(n!=null){const r=$s(n);e(Wa({vendorId:t,currentSelection:r,selectedGlobalMerchantId:o,vendorRenamedText:c}))}},onResetVendorLocalData:t=>{e(Qa({vendorId:t}))},onVendorNameClick:(t,n)=>{if(a.tenantEmailDomain!=null){const o=tt(t,n,a.tenantEmailDomain),c=N(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:c}})}},onUpdatePageToken:t=>{e(Ha({pageToken:t}))},onUpdateSortUiState:(t,n)=>{e(qa({sortOrder:t,sortKey:n}))},onUpdateScrollYOffset:t=>{e(Ka({scrollYOffset:t}))},onClickSave:(t,n,o)=>{e(Ya(t,n,o))},onClickCancelPopup:()=>{e(za())},onClearGlobalMerchantAutoCompleteResults:()=>{e(rt())},onClickRedirectToQBO:()=>{window.open(`${Xe.qboRedirectionUrl}/vendors`,"_blank")},updateVendorDetailLocalData:t=>{e(Mt({vendorDetails:t})),s(`./vendor/${t.id}`)},onBackClick:()=>{s("../..")},onReloadList:()=>{e(_e(null))}}})(_n);function pt(){const e=J(),a=Y(),s=K(),{tenantEmailDomain:t}=M(),n=de(),o=U.getSignedInUser(),{vendorId:c}=M(),r=S(u=>dt(u)),[h,i]=g.useState(!1),m=S(u=>dt(u).fetchState);if(g.useEffect(()=>{m==="Not-Started"&&h===!1&&(a(_e(null)),i(!0))},[]),o==null)throw Error("Can't access first review page without signing in...");const d=u=>u.trackPageLoaded(et.Event.vendorTenantReviewListPage);return l.jsxs(l.Fragment,{children:[m==="Completed"?l.jsx(W,{analytics:L,onLoad:d}):null,l.jsx(W,{analytics:L,onLoad:d}),l.jsx($n,{isOpen:c!=null,drawerLeftMargin:new Ze(0,0,300,600),onClose:()=>{e("../review")},children:l.jsx(zs,{onClick:u=>u.stopPropagation(),children:l.jsx(Ns,{})})}),l.jsx(Js,{windowSize:n,children:l.jsx(Gs,{location:s,navigate:e,vendorFirstReviewDetails:r,tenantEmailDomain:t})})]})}const $s=e=>e.recommendedFirst===!0?"recommendedFirst":e.recommendedSecond===!0?"recommendedSecond":e.retain===!0?"retain":e.rename===!0?"rename":e.customMerchant===!0?"customMerchant":null,zs=R(Gt)`
|
|
93
|
+
display: flex;
|
|
94
|
+
min-height: 100%;
|
|
95
|
+
flex-direction: column;
|
|
96
|
+
`,Ys=G(function(e,a){const s=U.getSignedInUser(),t=e.tenantState.currentTenantId,n=e.vendorFiling1099UploadDetailsState,o={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""};let c={fetchState:"Not-Started",error:void 0};return a.vendorId!=null&&(c=e.vendorViewState.editVendorStateById[a.vendorId]?.fetchStatus),{analytics:L,vendorFiling1099UploadDetailsViewState:n,authParams:o,googleAPIKey:Xe.googleMapsAPIKey,vendorId:a.vendorId,fetchVendorFetchStatus:c,vendor:a.vendorFiling1099UploadDetails?.vendor}},function(e,a){const{currentTenant:s,navigate:t,location:n,vendorId:o,vendorFiling1099UploadDetails:c}=a,{tenantEmailDomain:r}=s;return{onVendorFiling1099UploadDetailsSave:h=>{e(Bt(h)),L.trackVendor1099DetailSave(c.vendor.legalName??"")},onSaveChangesToLocalStore:h=>{e(Vt(h))},onResetVendorFiling1099FormStatus:()=>{e(Xa())},onAddressEditHandler:h=>{const i=Rn((m=>({street:m.vendor1099FilingSectionId.street,suite:m.vendor1099FilingSectionId.suite,city:m.vendor1099FilingSectionId.city,state:m.vendor1099FilingSectionId.state,country:m.vendor1099FilingSectionId.country,countryCode:m.vendor1099FilingSectionId.countryCode,postalCode:m.vendor1099FilingSectionId.postalCode,secondaryInfo:m.vendor1099FilingSectionId.secondaryInfo}))(h));e(Ot({addressType:"vendor_address",addressToCreate:i}))},goBackToListPage:()=>{e(_t(o));const h=`/${r}/vendors/filing_1099/`,i=N(n.state?.pathnameStackToGoBack,n.pathname);t(h,{state:{pathnameStackToGoBack:i}})},onAddressClick:h=>{const i=function(d,u,p){let f=`/${d}/vendors/filing_1099/upload/${p}/edit`;return f=f.concat(`/new/${u}`),f}(r,h,o),m=N(n.state?.pathnameStackToGoBack,n.pathname);t(i,{state:{pathnameStackToGoBack:m}})},AddressFormPage:Bn}})(Vn);function Ks(){const e=J(),a=K(),{vendorId:s}=M(),t=S(r=>V(r));let n;if(s==null)throw new Error("Vendor ID not found for Vendor Filing 1099 Details Screen");n=S(r=>Pt(r,s));const{tenantEmailDomain:o}=t,c=t.companyId??U.getSignedInUserTenant(o)?.companyId;if(c==null)throw new Error("Company ID not found for Vendor Filing 1099 Details Screen");return l.jsx(Ys,{location:a,navigate:e,currentTenant:t,vendorId:s,vendorFiling1099UploadDetails:n,companyId:c})}const qs=R.div`
|
|
97
|
+
display: flex;
|
|
98
|
+
min-height: 100%;
|
|
99
|
+
width: 100%;
|
|
100
|
+
flex: 1 1 auto;
|
|
101
|
+
flex-direction: column;
|
|
102
|
+
align-items: center;
|
|
103
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
104
|
+
`,Hs=G(function(e,a){const{vendorsFiling1099ListDetails:s,accountMappingView:t,analytics:n}=a;return{analytics:n,vendorsFiling1099List:s.vendors,isVendor1099Populated:s.isVendor1099Populated,accountMappingView:t,fetchState:s.fetchState,uiState:s.uiState,lastRefreshSuccessTime:s.lastRefreshSuccessTime,vendorTabsToShow:a.vendorTabsToShow}},function(e,a){const{navigate:s,analytics:t}=a;return{onUpdateSortUiState:(n,o)=>{e(cn({sortOrder:n,sortKey:o}))},onUpdateSearchUiState:n=>{e(ln({searchString:n}))},onVendorRowClick:n=>{if(a.tenantEmailDomain!=null){const o=`/${a.tenantEmailDomain}/vendors/filing_1099/upload/${encodeURIComponent(n)}/edit`,c=N(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:c}})}},onReloadVendors:()=>{e(Ve(!0))},onBackClick:()=>{e(sn()),e(on())},onVendorTabSelectionChanged:n=>{const o=ve(n);s(o),e(ie(xe(n)))},onAccountMappingChange:n=>{const{filing1099:o}=n,{bankAccount:c,expenseCategory1099:r}=o,h=zn(a.accountMappingView.bankAccounts1099FilingAccountList,c.selectedOptions),i=Yn(a.accountMappingView.expenseAccounts1099FilingAccountList,r),m={selectedBankAccounts1099FilingAccountIds:h.map(d=>d.accountId),selectedExpenseAccounts1099FilingAccountIds:i};e(nn({data:m}))},onSaveClick:()=>{e(an()),t.track(et.Event.vendor1099TabSettingsSave)}}})(On);function mt({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=J(),n=Y(),o=K(),{tenantEmailDomain:c}=M(),r=de(),h=U.getSignedInUser(),[i,m]=g.useState(!1),[d,u]=g.useState(!1);if(h==null)throw Error("Can't access vendor filing 1099 page without signing in...");Te();const p=S(w=>en(w)),f=S(w=>tn(w)),{isAiCfoAccessEnabled:D,onAskAiCfoClick:x}=fe({mobileExploreReferrer:"Vendors — 1099"});Se({isDataReady:p.fetchState==="Completed"}),g.useEffect(()=>{d||(u(!0),n(Ve(!1)))},[d,u]),g.useEffect(()=>{f.saveState.fetchState==="Completed"&&n(Ve(!1))},[f.saveState.fetchState]);const I=w=>{m(w)},C=S(w=>V(w)),E={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:C.tenantId},k=g.useMemo(()=>({authParams:E,tenantName:C.companyName,filing1099ReportEndPoint:`${Z}/filing1099Reports`}),[]);return l.jsxs(l.Fragment,{children:[p.fetchState==="Completed"?l.jsx(l.Fragment,{children:l.jsx(W,{analytics:L,onLoad:()=>L.trackPageLoaded(et.Event.vendor1099ListPage)})}):null,l.jsxs(qs,{windowSize:r,children:[l.jsx(ge,{isAppContentDrawerOpen:i,handleDrawerToggle:I}),l.jsx(Hs,{location:o,navigate:t,previousTabPosition:a,setPreviousTabPosition:s,analytics:L,vendorsFiling1099ListDetails:p,vendorTypeList:p.vendorTypeList,accountMappingView:f,downloadParams:k,tenantEmailDomain:c,vendorTabsToShow:e,isAiCfoAccessEnabled:D,onAskAiCfoClick:x,onClickMenuIcon:()=>{I(!0)}})]})]})}const Qs=R.div`
|
|
105
|
+
display: flex;
|
|
106
|
+
min-height: 100%;
|
|
107
|
+
width: 100%;
|
|
108
|
+
flex: 1 1 auto;
|
|
109
|
+
flex-direction: column;
|
|
110
|
+
align-items: center;
|
|
111
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
112
|
+
`,Ws=G(function(e,a){const{vendorsListDetails:s}=a;return{vendorsList:s.vendors,totalVendorCount:s.totalVendorCount,fetchState:s.fetchState,uiState:s.uiState,searchText:s.searchString,lastRefreshSuccessTime:s.lastRefreshSuccessTime,vendorTabsToShow:a.vendorTabsToShow,isAccountingClassesEnabled:te(e),analytics:L}},function(e,a){const{navigate:s}=a;return{onFetchVendorsList:(t="",n,o)=>{e(mn({searchString:t,keepExistingListItems:n,view:"vendorsTab",pageToken:o}))},onUpdatePageToken:t=>{e(pn({pageToken:t}))},onUpdateSortUiState:(t,n)=>{e(hn({sortOrder:t,sortkey:n}))},onUpdateCurrentYTDSelection:t=>{e(un({ytdSpendSelection:t}))},onVendorRowClick:(t,n)=>{if(a.tenantEmailDomain!=null){const o=tt(t,n,a.tenantEmailDomain),c=N(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:c,referrer:"Vendor List"}})}},onReloadVendors:()=>{console.log("Reload vendors")},onUpdateScrollYOffset:t=>{e(rn({scrollYOffset:t}))},onBackClick:()=>{s("../..")},onVendorTabSelectionChanged:t=>{const n=ve(t);s(n),e(ie(xe(t)))}}})(Mn);function Zs({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=J(),n=Y(),o=K(),{tenantEmailDomain:c}=M(),r=de(),h=U.getSignedInUser(),{useFeatureGate:i}=ae(),{isFeatureEnabled:m,isFeatureGateLoading:d}=i(z.isOpexByVendorFeatureEnabled);Te();const u=e.includes("prepaid_expenses"),p=e.includes("fixed_assets"),f=e.includes("accrued_expenses"),D=S(j=>me(j));let x={};x=S(j=>dn(j,"vendorsTab"));const[I,C]=g.useState(!1),{isAiCfoAccessEnabled:E,onAskAiCfoClick:k}=fe({mobileExploreReferrer:"Vendors Summary"});Se({isDataReady:x.fetchState==="Completed"});const w=S(j=>ee(j)),b=S(j=>H(j).isReportGenerated);S(j=>H(j).fetchState)==="Completed"&&b&&m&&!e.includes("operating_expenses_by_vendor")&&e.splice(1,0,"operating_expenses_by_vendor");const[P,F]=g.useState(!1);if(g.useEffect(()=>{(u||p)&&P===!1&&w!=="Completed"&&(n(ye()),F(!0))},[P]),g.useEffect(()=>{n(De({shouldFetchAccruedExpenses:f,shouldFetchFixedAssets:p,shouldFetchPrepaidExpenses:u,shouldFetchOpexByVendor:m&&d===!1,shouldFetchVendorsList:!0,shouldFetchFiling1099Vendor:!1}))},[w,p,d,m]),g.useEffect(()=>{I||x.fetchState!=="Completed"||(C(!0),L.trackVendorList(D.currentTab,D.previousTab??null,x.totalVendorCount,x.uiState.sortKey,x.uiState.ytdSpendSelection))},[x.fetchState]),h==null)throw Error("Can't access address page without signing in...");const[_,A]=g.useState(!1),y=j=>{A(j)};return l.jsxs(Qs,{windowSize:r,children:[l.jsx(ge,{isAppContentDrawerOpen:_,handleDrawerToggle:y}),l.jsx(Ws,{location:o,navigate:t,vendorsListDetails:x,tenantEmailDomain:c,vendorTabsToShow:e,onClickMenuIcon:()=>{y(!0)},previousTabPosition:a,setPreviousTabPosition:s,isAiCfoAccessEnabled:E,onAskAiCfoClick:k})]})}function Eo(){const{useFeatureGate:e}=ae(),a=K().state?.referrer,[s,t]=g.useState(!1),[n,o]=g.useState(0),c=U.getSignedInUser(),r=Sn(c),{isFeatureEnabled:h}=e(z.isOpexByVendorFeatureEnabled),{isFeatureEnabled:i}=e(z.isVendorReviewFeatureEnabled),{isFeatureEnabled:m}=e(z.isScheduledJEPrepaidExpensesFeatureEnabled),{isFeatureEnabled:d}=e(z.isScheduledJEFixedAssetsFeatureEnabled),{isFeatureEnabled:u}=e(z.isScheduledJEAccruedExpensesFeatureEnabled),{isFeatureEnabled:p}=e(z.isFiling1099FeatureEnabled),f=S(k=>V(k)),D=f?.externalConnections?.accounting[0]?.connectionName,x=["vendors_tab"];D!=="netsuite"&&m===!0&&x.push("prepaid_expenses"),D!=="netsuite"&&d===!0&&x.push("fixed_assets"),D!=="netsuite"&&u===!0&&x.push("accrued_expenses"),D!=="netsuite"&&p&&r&&(x.push("filing_1099"),h&&x.splice(1,0,"operating_expenses_by_vendor"));const{isFeatureEnabled:I}=e(z.isDebitCardFeatureEnabled),C=fn(I,f),E=gn(f);return C===!0||E===!0?l.jsx(at,{children:l.jsx(B,{path:"/*",element:l.jsx(Jn,{})})}):l.jsxs(at,{children:[l.jsx(B,{path:"/opex",element:h===!0?l.jsx(Es,{previousTabPosition:n,setPreviousTabPosition:o,vendorTabsToShow:x}):l.jsx($,{to:"../summary"})}),l.jsx(B,{path:"/summary",element:l.jsx(Zs,{previousTabPosition:n,setPreviousTabPosition:o,vendorTabsToShow:x})}),l.jsx(B,{path:"schedules/fixed_assets/details/:scheduleDetailId",element:d===!0?l.jsx(ss,{}):l.jsx($,{to:"../../vendors/opex"})}),l.jsx(B,{path:"schedules/accrued_expenses/details/:scheduleDetailId",element:d===!0?l.jsx(Xn,{shouldNavigateBack:s,setShouldNavigateBack:t}):l.jsx($,{to:"../../vendors/opex"})}),l.jsx(B,{path:"schedules/:scheduleType/details/:scheduleDetailId",element:m===!0?l.jsx(rs,{}):l.jsx($,{to:"../../vendors/opex"})}),l.jsx(B,{path:"schedules/:scheduleType/details/:scheduleDetailId/edit_link",element:m===!0||d===!0?l.jsx(fs,{}):l.jsx($,{to:"../../vendors/opex"})}),l.jsx(B,{path:"schedules/accrued_expenses/details/:scheduleDetailId/edit_link",element:u===!0?l.jsx(Hn,{setShouldNavigateBack:t}):l.jsx($,{to:"../../vendors/opex"})}),l.jsx(B,{path:"schedules/prepaid_expenses",element:m===!0?l.jsx(ws,{previousTabPosition:n,setPreviousTabPosition:o,vendorTabsToShow:x}):l.jsx($,{to:"../opex"})}),l.jsx(B,{path:"schedules/fixed_assets",element:d===!0?l.jsx(ys,{previousTabPosition:n,setPreviousTabPosition:o,vendorTabsToShow:x}):l.jsx($,{to:"../opex"})}),l.jsx(B,{path:"schedules/accrued_expenses",element:u===!0?l.jsx(xs,{previousTabPosition:n,setPreviousTabPosition:o,vendorTabsToShow:x}):l.jsx($,{to:"../opex"})}),l.jsx(B,{path:"/filing_1099",element:p&&r?l.jsx(mt,{previousTabPosition:n,setPreviousTabPosition:o,vendorTabsToShow:x}):l.jsx($,{to:"../opex"})}),l.jsx(B,{path:"/filing_1099/:vendorId",element:p&&r?l.jsx(mt,{vendorTabsToShow:x,previousTabPosition:n,setPreviousTabPosition:o}):l.jsx($,{to:"../opex"})}),l.jsx(B,{path:"/filing_1099/upload/:vendorId/edit",element:p&&r?l.jsx(ht,{appContent:l.jsx(Ks,{}),showFullScreenSkeletonWhileLoading:!0}):l.jsx($,{to:"../opex"})}),l.jsx(B,{path:"/filing_1099/upload/:vendorId/edit/new/:addressType",element:p&&r?l.jsx(ht,{appContent:l.jsx(Nn,{isSubPage:!0,hideAddressBackButton:!0,hideAddressSubTitle:!0})}):l.jsx($,{to:"../opex"})}),l.jsx(B,{path:"/summary/:vendorId/:qboId",element:l.jsx(ut,{referrerType:a,isFiling1099FeatureEnabled:p&&r})}),l.jsx(B,{path:"/summary/:vendorId/:qboId/:timeframe/:startDate/:endDate",element:l.jsx(ut,{referrerType:a,isFiling1099FeatureEnabled:p&&r})}),l.jsx(B,{path:"/review",element:i===!0?l.jsx(pt,{}):l.jsx(le,{})}),l.jsx(B,{path:"/review/vendor/:vendorId",element:i?l.jsx(pt,{}):l.jsx(le,{})}),l.jsx(B,{path:"/",element:l.jsx($,{to:"summary"})}),l.jsx(B,{path:"*",element:l.jsx(le,{})})]})}export{Eo as default};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{j as o}from"./liveblocks-CpSeBLzv.js";import{a as l}from"./sentry-BxlhxHUi.js";import{s as u,u as h,j as y,N as b}from"./core-DUPexJ3H.js";import{Kg as I,eX as w,Ac as j}from"./zeni-epic-state-DP595dtC.js";import{z as f,B as x,C as S,E}from"./index-B_Z_hpYg.js";import{n as c}from"./mui-BYcLUAn-.js";import"./recharts-Dp6Vlg5X.js";import"./analytics-wiEk3GGD.js";import"./plaid-DSCHiplf.js";import"./dnd-O-LDWVRl.js";import"./stripe-DMRn4zHo.js";import"./lottie-BpJoufaA.js";import"./lexical-D7D3BWIv.js";import"./pdf--1Oee4-D.js";import"./utils-BI-ymB94.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]="28061b13-8dee-4017-b94d-069533c4e482",e._sentryDebugIdIdentifier="sentry-dbid-28061b13-8dee-4017-b94d-069533c4e482")}catch{}})();const X=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",g=e.get("profileId")??"",[n,p]=l.useState(!1),a=h(),s=y(m=>I(m)),r=f.getSignedInUser(),d=f.getSignedInUserTenantWithId(i);if(r==null||d==null)return o.jsx(b,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),l.useEffect(()=>{n||(p(!0),a(j(t,g,i)))},[n,a]),s.fetchState==="Error"?o.jsx(D,{children:o.jsx(_,{children:s.error?.message??""})}):(s.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},D=c.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100vh;
|
|
5
|
+
flex-direction: row;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: ${e=>e.theme.colors.grey5};
|
|
9
|
+
`,_=c(E.LargeRegular)`
|
|
10
|
+
display: flex;
|
|
11
|
+
color: ${S.important};
|
|
12
|
+
`;export{X as default};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import{j as n}from"./liveblocks-CpSeBLzv.js";import{h as ne,g as W,u as M,i as q,j as w,n as Y,N as X,o as Ve,p as k}from"./core-DUPexJ3H.js";import{eQ as U,Pa as Ce,Pb as $e,ck as ee,cl as Ze,fh as Ne,xp as ke,BC as He,xj as Tn,Pc as Fn,Pd as Bn,xm as On,xt as ge,xg as Ln,xd as Rn,NX as le,Pe as Un,F2 as _n,L2 as zn,F4 as Mn,ko as Fe,Pf as Vn,qK as Ge,qy as We,kf as qe,ki as Be,L3 as Oe,L4 as $n,Pg as Zn,kh as Nn,kE as Hn,k6 as Gn,iF as Wn,iE as qn,Ph as Yn,Pi as ye,EL as Jn,Pj as Kn,Pk as Qn,NQ as we,Pl as Le,Pm as Xn,Ff as ea,OA as na,Cw as Ye,tb as Je,Pn as aa,Fc as ta,Po as Ke,cL as Ae,Fj as Qe,fi as oa,eZ as Xe,e$ as De,Fh as sa,Cq as ra,F9 as ia,Pp as en,Pq as nn,EN as an,EX as Re,Pr as ca,On as la,Fk as da,bs as ua,bF as pa,cw as ma,bG as ha,bt as fa,JZ as ga}from"./zeni-epic-state-DP595dtC.js";import{k as ae,s as Z,z as S,U as O,m as _,B as de,bY as ya,a2 as Ie,J as V,A as J,p as tn,aq as xa,af as Ue,c as L,bZ as Ca,at as Se,b_ as ka,x as ue,b$ as wa,e as be,aN as G,c0 as Aa,Y as Da,_ as on,ac as Ia,c1 as _e,c2 as Sa,q as ce,c3 as ba,c4 as Pa,c5 as Ea,a9 as va,o as ja}from"./index-B_Z_hpYg.js";import{n as z,D as K,S as Q}from"./mui-BYcLUAn-.js";import ie from"./NotFoundScreen-DcBza--g.js";import{S as ze}from"./SetupPagesScreen-DPjCUjqg.js";import{F as sn}from"./FeaturePreviewScreen-BeSvOfyq.js";import{a as d}from"./sentry-BxlhxHUi.js";import{M as pe}from"./MobileAppDrawer-BG5P4V6f.js";import{A as Ta,D as Fa,V as Ba}from"./DomesticWireDetailScreen-Dd35H5gU.js";import{A as Oa}from"./AddressScreen-BrRyijJp.js";import{u as rn}from"./useAskAiCfoHostNavButtonProps-D8UKtiUm.js";import{Z as La}from"./ZeniAccountStatementScreen-Cu_59prd.js";import"./recharts-Dp6Vlg5X.js";import"./analytics-wiEk3GGD.js";import"./plaid-DSCHiplf.js";import"./dnd-O-LDWVRl.js";import"./stripe-DMRn4zHo.js";import"./lottie-BpJoufaA.js";import"./lexical-D7D3BWIv.js";import"./pdf--1Oee4-D.js";import"./utils-BI-ymB94.js";import"./analyticsHelper-CScMfb2z.js";import"./routePaths-DpeDFIQv.js";import"./BusinessVerificationPageScreen-NuRsHlJi.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]="60c7ea59-6f92-44a1-8984-63159afdae69",e._sentryDebugIdIdentifier="sentry-dbid-60c7ea59-6f92-44a1-8984-63159afdae69")}catch{}})();const Ra=z.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
width: 100%;
|
|
5
|
+
flex: 1 1 auto;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
+
`,Ua=Y(function(e){return{autoTransferRuleView:Ce(e),downloadAccountDetailEndPoint:`${Ie}/account_details`,transferLimit:5e5,depositAccountListView:He(e.depositAccountState,e.depositAccountListState)}},function(e,a){const{navigate:s,handleDrawerToggle:o}=a;return{onBackClick:()=>{s("..")},onClickMenuIcon:()=>{o(!0)},onFetchAutoTransferRules:t=>{e(ke(t))},onCreateRule:()=>{e(Rn())},onUpdateRule:t=>{e(ge(t))},onDeleteClick:t=>{e(Ln(t))},onPauseClick:t=>{e(ge(t,!0,!1))},onResumeClick:t=>{e(ge(t,!1,!0))},onActivityClick:(t,r)=>{e(On(t,r))},onUpdateRuleLocalData:t=>{e(Bn(t))},clearRuleLocalData:()=>{e(Fn())},onEditClick:t=>{s(`./${t}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{e(Tn())}}})(ya);function Me({isEditDrawerOpen:e}){const a=ne(),s=W(),o=M(),t=ae(),{ruleId:r,tenantEmailDomain:u}=q(),{useFeatureGate:l}=Z(),[p,h]=d.useState(!1),[x,i]=d.useState(!1),c=w(y=>U(y)),m=w(y=>Ce(y)),C=m?.fetchState??"Not-Started",b=w(y=>$e(y)),f=c?.companyId??S.getSignedInUserTenant(u)?.companyId,A=ee(t?.loggedInUserRoleMap)||Ze(t?.loggedInUserRoleMap),{isFeatureEnabled:D}=l(O.isTreasuryEnabled),g=c?.company!=null&&Ne(c.company),I=D&&g,F=S.getSignedInUser(),R=c.tenantId,j={userId:F?.userId??"",sessionId:F?.zeniSessionId??"",tenantId:R??""},E=c.companyName;d.useEffect(()=>{!x&&C==="Not-Started"&&f&&(i(!0),o(ke(!0)))},[x,C,f,o]);const P=y=>{h(y)},T=_(),v=!!s.state?.scrollToAddRule;return m?.fetchState!=="Completed"?n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:T.colors.grey5}}):n.jsxs(Ra,{children:[n.jsx(pe,{isAppContentDrawerOpen:p,handleDrawerToggle:P}),n.jsx(Ua,{navigate:a,location:s,currentTenant:c,companyName:E,handleDrawerToggle:P,isEditDrawerOpen:e,editingRuleId:r,authParams:j,includeTreasuryOption:I,hasAdminLevelAccess:A,zeniAccountsConfigDetail:b,scrollToAddRule:v})]})}const _a={overlayWidth:new J(100,100,58)},za=({vendorId:e,isDrawerOpen:a,closeDrawerHandler:s})=>{const o=M(),t=_(),r=V();if(S.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(K,{onClose:()=>{s(!0),o(le())},anchor:"right",open:a,PaperProps:{style:{width:_a.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Ma,{onClick:u=>u.stopPropagation(),children:n.jsx(Ta,{vendorIdParam:e,accountContext:"express-pay"})})})},Ma=z(Q)`
|
|
10
|
+
display: flex;
|
|
11
|
+
min-height: 100%;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
`,Va={overlayWidth:new J(100,100,58)},$a=({isDrawerOpen:e,closeDrawerHandler:a})=>{const s=M(),o=_(),t=V();if(S.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(K,{onClose:()=>{a(!0),s(le())},anchor:"right",open:e,PaperProps:{style:{width:Va.overlayWidth.valuePercentage(t),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Za,{onClick:r=>r.stopPropagation(),children:n.jsx(Oa,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Za=z(Q)`
|
|
14
|
+
display: flex;
|
|
15
|
+
min-height: 100%;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
`,Na={overlayWidth:new J(100,100,58)},Ha=({vendorId:e,isDrawerOpen:a,closeDrawerHandler:s})=>{const o=M(),t=_(),r=V();if(S.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(K,{onClose:()=>{s(!0),o(le())},anchor:"right",open:a,PaperProps:{style:{width:Na.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Ga,{onClick:u=>u.stopPropagation(),children:n.jsx(Fa,{vendorIdParam:e,accountContext:"express-pay"})})})},Ga=z(Q)`
|
|
18
|
+
display: flex;
|
|
19
|
+
min-height: 100%;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
`,Wa=z.div`
|
|
22
|
+
display: flex;
|
|
23
|
+
height: 100vh;
|
|
24
|
+
width: 100%;
|
|
25
|
+
flex: 1 1 auto;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
align-items: center;
|
|
28
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
29
|
+
`,qa=Y(function(e,a){const s=U(e),o=S.getSignedInUser(),t=s.tenantId,r={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:t??""},u=a.expressPayDetails,l=e.entityAutoCompleteState.autoCompleteText.common,p=zn(e,"common");return{expressPayDetails:u,fileProps:{authParams:r,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:l,entityAutoCompleteView:p},analytics:a.analytics}},function(e,a){const{navigate:s}=a;return{onSaveVendor:o=>{e(qn(o,void 0,void 0,!0))},saveVendorDetailLocalData:(o,t)=>{e(Be({vendorId:t,localData:o}))},saveExpressPayLocalData:o=>{e(Wn({localData:o}))},onVendorSelected:o=>{o!=null&&e(Gn(o,!1))},updateSelectedVendorForCreate:o=>{e(Hn(o))},initializeVendorAddress:()=>{e(Nn())},resetVendorSaveStatus:o=>{e(Zn({vendorId:o}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,t)=>{o.trim().length>=2?e($n({searchString:o,entityType:t,searchOrigin:"common"})):o.trim().length===0&&e(Oe("common"))},onCancelAutoComplete:()=>{e(Oe("common"))}},chooseNewVendor:o=>{e(Be({localData:{vendorName:o}}))},onClickAddAccount:o=>{o.method.toLowerCase().indexOf("ach")!==-1?s("./add-ach",{relative:"path"}):o.method.toLowerCase().indexOf("wire")!==-1&&o.method.toLowerCase().indexOf("domestic")!==-1&&s("./add-wire",{relative:"path"})},updateFilesEntity:o=>{e(qe({files:o}))},onDeleteFile:o=>{e(We(o))},onEditFileName:(o,t)=>{e(Ge(o,t.split(".")[0]))},onBackClick:o=>{o!=null&&e(Fe(o)),e(Fe()),e(Vn()),e(le()),s("../",{relative:"path"})},onSchedulePayment:()=>{e(Mn())}}})(Ca);function se({isAddACHDrawerOpen:e,isAddWireDrawerOpen:a,isAddAddressDrawerOpen:s}){const o=ne(),t=W(),r=M(),[u,l]=d.useState(!1),{tenantEmailDomain:p}=q(),h=ae(),x=w(y=>y.expressPayState.fetchState),i=w(y=>U(y)),c=w(y=>Un(y)),m=c.expressPayLocalData?.vendorId,C=i.companyId??S.getSignedInUserTenant(p)?.companyId,[b,f]=d.useState(!1),[A,D]=d.useState(!1),[g,I]=d.useState(!1),F=tn(t.state?.pathnameStackToGoBack),{poppedPathname:R}=F,j=R?.split("/"),E=j?.[j.length-1];d.useEffect(()=>{e===!0?f(!0):(f(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{a===!0?D(!0):(D(!1),document.body.style.overflow="auto")},[a]),d.useEffect(()=>{s===!0?I(!0):(I(!1),document.body.style.overflow="auto")},[s]),d.useEffect(()=>{x==="Not-Started"&&r(_n(!0,!0))},[x,r]);const P=xa(c.vendorViewDetails.bankAccountCreationState?.fetchState);if(d.useEffect(()=>{P==="In-Progress"&&c.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&v()},[P,c.vendorViewDetails.bankAccountCreationState?.fetchState]),S.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const T=y=>{l(y)},v=()=>{f(!1),D(!1),o("../",{relative:"path"})};return n.jsxs(Wa,{children:[Ue(t)?n.jsx(pe,{isAppContentDrawerOpen:u,handleDrawerToggle:T}):null,b===!0?n.jsx(za,{vendorId:m,closeDrawerHandler:v,isDrawerOpen:b}):null,A===!0?n.jsx(Ha,{vendorId:m,closeDrawerHandler:v,isDrawerOpen:A}):null,g===!0?n.jsx($a,{closeDrawerHandler:v,isDrawerOpen:g}):null,n.jsx(Ba,{vendorId:m,isExpressPayPage:!0}),n.jsx(qa,{navigate:o,location:t,companyId:C,accountId:E,analytics:L,currentTenant:i,vendorId:m,roleMap:h?.loggedInUserRoleMap,isSettings:Ue(t),expressPayDetails:c,onClickMenuIcon:()=>{T(!0)}})]})}const Ya={overlayWidth:new J(100,100,58)},Ja=({authParams:e,downloadAccountDetailEndPoint:a,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:o,closeDrawerHandler:t})=>{const r=_(),u=V(),l=w(i=>$e(i)),p=w(i=>U(i));if(S.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const h=()=>{t(!0)},x={depositAccount:o,onDismissClick:h,zeniAccountsConfigDetail:l,authParams:e,downloadAccountDetailEndPoint:a,currentTenant:p};return n.jsx(K,{anchor:"right",open:s,PaperProps:{style:{width:Ya.overlayWidth.valuePercentage(u),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>h(),children:n.jsx(Ka,{onClick:i=>i.stopPropagation(),children:n.jsx(ka,{...x})})})},Ka=z(Q)`
|
|
30
|
+
display: flex;
|
|
31
|
+
min-height: 100%;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
`,Qa={overlayWidth:new J(100,100,58)},cn=({isCheckDepositDrawerOpen:e,closeDrawerHandler:a})=>{const s=_(),o=V(),t=M(),r=w(i=>U(i)),u=S.getSignedInUser(),l=r.tenantId,p={userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:l??""};if(u==null)throw Error("Can't access check deposit page without signing in...");const h=w(i=>Yn(i)),x={analytics:L,checkDeposit:h,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:i=>{t(Kn(i))},updateFilesEntity:i=>{t(qe({files:i}))},onAnotherTransferClick:()=>{t(ye())},onDeleteFile:i=>{t(We(i))},onEditFileName:(i,c)=>{t(Ge(i,c.split(".")[0]))},onCheckDpositClick:()=>{t(Jn())},onDismissClick:()=>{a(!0),t(ye())}};return n.jsxs(n.Fragment,{children:[n.jsx(ue,{analytics:L,onLoad:i=>(c=>c.trackPageLoaded(be.Event.accountsDepositCheckFormViewed))(i)}),n.jsx(K,{anchor:"right",open:e,PaperProps:{style:{width:Qa.overlayWidth.valuePercentage(o),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(i,c)=>(c==="backdropClick"||c==="escapeKeyDown")&&(a(!0),void t(ye())),children:n.jsx(Xa,{onClick:i=>i.stopPropagation(),children:n.jsx(wa,{...x})})})]})},Xa=z(Q)`
|
|
34
|
+
display: flex;
|
|
35
|
+
min-height: 100%;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
`,et={overlayWidth:new J(100,100,58)},nt=Y(function(e,a){const s=a.currentTenant?.companyId;return{plaidConnectionDetails:na(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:He(e.depositAccountState,e.depositAccountListState)}},function(e,a){return{onReviewClick:()=>e(ta()),clearReviewTransferDetail:()=>e(aa()),onFetchLinkTokenClick:s=>{e(Je("external_account",s))},onEstablishConnectionClick:s=>{e(Ye(s,a.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(Aa),ln=({isTransferDrawerOpen:e,authParams:a,downloadAccountDetailEndPoint:s,closeDrawerHandler:o,zeniAccountsConfig:t})=>{const r=w(g=>Qn(g)),u=w(g=>U(g)),l=_(),p=V(),h=M(),{accountId:x}=q(),[i,c]=d.useState("achTransfer"),[m,C]=d.useState(!1);if(S.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:b}=Z(),{configValue:f}=b(G.zeniAccountsConfig),A=we(f),D=()=>{o(!0),h(Le())};return d.useEffect(()=>{r.reviewTransferDetail.fetchState==="Completed"&&C(!0)},[C,r.reviewTransferDetail.fetchState]),n.jsxs(n.Fragment,{children:[n.jsx(ue,{analytics:L,onLoad:g=>(I=>I.trackPageLoaded(be.Event.zeniAccountsTransferFormViewed))(g)}),n.jsx(K,{onClose:()=>{(i==="achTransfer"&&m===!1||i==="achTransfer"&&m&&r.fetchState==="Completed")&&D()},anchor:"right",open:e,PaperProps:{style:{width:et.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:l.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(at,{onClick:g=>g.stopPropagation(),children:n.jsx(nt,{analytics:L,transferDetails:r,authParams:a,downloadAccountDetailEndPoint:s,onTransferClick:()=>{L.trackTransferBetweenAccountsFormClicked("Transfer",r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",r.transferDetailLocalData.transferFrom?.label,r.transferDetailLocalData.transferTo?.label,r.transferDetailLocalData.amount.amount,r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,r.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,r.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&r.transferDetailLocalData.transferTo?.accType==="depositAccount"&&t.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&r.transferDetailLocalData.amount.amount>t.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),h(ea(x))},onDismissClick:D,onSaveChangesToLocalStore:g=>{h(Xn(g))},onAnotherTransferClick:()=>{C(!1),h(Le())},currentTenant:u,zeniAccountsConfigDetail:t,currentDrawerContent:i,setCurrentDrawerContent:c,showReviewContent:m,setShowReviewContent:C,onBackClick:()=>{},maxInsuredAmount:A.maxInsuredAmount})})})]})},at=z(Q)`
|
|
38
|
+
display: flex;
|
|
39
|
+
min-height: 100%;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
`,tt=z.div`
|
|
42
|
+
display: flex;
|
|
43
|
+
min-height: 100%;
|
|
44
|
+
width: 100%;
|
|
45
|
+
flex: 1 1 auto;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
align-items: center;
|
|
48
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
49
|
+
`,ot=Y(function(e,a){return{zeniAccountListView:Ke(e),isExpressPayEnabled:a.isExpressPayEnabled,analytics:a.analytics}},function(e,a){const{navigate:s,currentTenant:o,location:t,companyId:r,handleDrawerToggle:u,analytics:l,isBillPayEnabled:p,isDebitCardFeatureEnabled:h}=a,{tenantEmailDomain:x}=o;return{onZeniAccountClick:(i,c)=>{l.trackAccountsListPageClicked("Accounts Row Item Click",c,"active");const m=st(x,i),C=ce(t.state?.pathnameStackToGoBack,t.pathname);s(m,{state:{pathnameStackToGoBack:C}})},onSettingsClick:()=>{l.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(Qe(!1))},handleMoveMoneyOptionSelection:(i,c)=>{let m="page-not-found";i==="sendMoney"&&(m=mn(x)),i==="payBill"?m=dn(o,p,h):i==="transfer"?(m=un(x),c!=null&&e(en(c))):i==="checkDeposit"&&(m=pn(x));const C=ce(t.state?.pathnameStackToGoBack,t.pathname);s(m,{state:{pathnameStackToGoBack:C}})},unlinkPaymentAccount:(i,c)=>{l.trackAccountsListPageClicked("Unlink Account",c),e(ia(i))},onFetchLinkTokenClick:(i,c)=>{e(Je("external_account",i,c))},onUpdatePaymentAccountStatus:(i,c,m)=>{e(ra(i,c,"zeni_accounts","external_account",m))},onEstablishConnectionClick:i=>{e(Ye(i,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:i=>{e(sa(i))},onClickMenuIcon:()=>{u(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:i=>{i?s("./auto-transfer",{state:{...t.state,scrollToAddRule:!0}}):s("./auto-transfer")}}})(Sa);function xe({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:a}){const s=W(),o=ne(),t=M(),r=V(),{tenantEmailDomain:u}=q(),{useDynamicConfig:l,useFeatureGate:p}=Z(),h=_(),{configValue:x}=l(G.zeniAccountsConfig),{isFeatureEnabled:i}=p(O.isTreasuryEnabled),{isFeatureEnabled:c}=p(O.isDebitCardFeatureEnabled),{isFeatureEnabled:m}=p(O.isAutoTransferRuleEnabled),{isFeatureEnabled:C}=p(O.isCheckingCommentingEnabled),b=we(x),f=w(B=>U(B)),A=f.companyId??S.getSignedInUserTenant(u)?.companyId,{configValue:D}=l(G.expressPayConfig),g=D.is_enable_all_tenants===!0||D.tenant_ids!=null&&D.tenant_ids.includes(f.tenantId),[I,F]=d.useState(!1),[R,j]=d.useState(!1),[E,P]=d.useState(!1),[T,v]=d.useState(!1),y=w(B=>Ke(B)),$=y.fetchState,te=w(B=>Ce(B)),oe=te?.fetchState??"Not-Started",me=!!f.companyZeniAccountInfo?.info?.isZeniAccountEnabled,N=ae(),H=!!f.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,hn=!!f.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,fn=ee(N?.loggedInUserRoleMap),gn=Ae(N?.loggedInUserRoleMap),yn=!!f.companyBillPayInfo?.info?.isBillPayEnabled,Pe=S.getSignedInUser(),xn={userId:Pe?.userId??"",sessionId:Pe?.zeniSessionId??"",tenantId:f.tenantId??""},Cn=`${Ie}/account_details`,{areTenantIdsInSync:Ee}=Da();d.useEffect(()=>{!I&&Ee&&(F(!0),t(Qe(!1)))},[I,t,$,Ee]),d.useEffect(()=>{!R&&oe==="Not-Started"&&A&&(j(!0),t(ke(!0)))},[R,oe,A,t]),d.useEffect(()=>{e!=null&&e===!0?P(!0):(P(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{v(a!=null&&a===!0)},[a]);const ve=()=>{P(!1),o("..")},[kn,wn]=d.useState(!1),je=B=>{wn(B)},{isAiCfoAccessEnabled:An,onAskAiCfoClick:Dn}=rn({mobileExploreReferrer:"Checking Accounts"});on({isDataReady:$==="Completed"});const In=f.company!=null&&Ne(f.company),he=(i&&In)===!0&&!hn,[Sn,bn]=d.useState(!1),fe=w(B=>B.treasurySetupViewState.treasuryFundsDetails),Pn=fe.fundsDetails,En=Ia(Pn);d.useEffect(()=>{he!==!0||Sn||fe?.fetchStatus.fetchState!=="Not-Started"||(bn(!0),t(oa()))},[fe.fetchStatus,t]);const vn=Xe(f),jn=De(c,f);return vn===!0&&jn!==!0?n.jsx(sn,{}):me?n.jsxs(n.Fragment,{children:[y.fetchState==="Completed"&&E===!1&&T===!1?n.jsx(ue,{analytics:L,onLoad:B=>(Te=>{Te.trackAccountsListPageViewed(y.depositAccountsSelectorView.depositAccounts.length,y.externalAccountsSelectorView.paymentAccounts.length,_e(y.summary?.totalBalance.available.amount??0),_e(y.summary?.totalInterest.available.amount??0),y.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),he&&Te.trackTreasuryPromoView("Checking Promo Banner")})(B)}):null,E===!0?n.jsx(ln,{closeDrawerHandler:ve,isTransferDrawerOpen:E,zeniAccountsConfig:y.zeniAccountsConfig,authParams:xn,downloadAccountDetailEndPoint:Cn}):null,T===!0?n.jsx(cn,{closeDrawerHandler:ve,isCheckDepositDrawerOpen:T}):null,n.jsxs(tt,{windowSize:r,children:[n.jsx(pe,{isAppContentDrawerOpen:kn,handleDrawerToggle:je}),n.jsx(ot,{zeniBankListView:y,navigate:o,currentTenant:f,location:s,companyId:A,analytics:L,maxInsuredAmount:b.maxInsuredAmount,isExpressPayEnabled:g,isBillPayEnabled:yn,isCheckingCommentingEnabled:C,isDebitCardFeatureEnabled:c,isAutoTransferRuleEnabled:m,handleDrawerToggle:je,showTreasuryPromo:he,treasuryYieldPercentage:En,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:An,onAskAiCfoClick:Dn})]})]}):H&&fn?n.jsx(X,{to:"../setup"}):f.companyZeniAccountInfo?.info&&!H&&gn?n.jsx(X,{to:"../promo",state:s.state}):n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}})}const dn=(e,a,s)=>{const o=De(s,e),{tenantEmailDomain:t}=e;return o===!0||a===!1?`/${t}/bills`:`/${t}/bill/new`},st=(e,a)=>`/${e}/checking/${a}`,un=(e,a)=>a==null?`/${e}/checking/transfer`:`/${e}/checking/${a}/transfer`,pn=(e,a)=>a==null?`/${e}/checking/check-deposit`:`/${e}/checking/${a}/check-deposit`,mn=e=>`/${e}/checking/express-pay`,rt=z.div`
|
|
50
|
+
display: flex;
|
|
51
|
+
width: 100%;
|
|
52
|
+
flex: 1 1 auto;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
align-items: center;
|
|
55
|
+
min-height: 100vh;
|
|
56
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
57
|
+
`,it=Y(function(e,a){const{currentTenant:s}=a,o=nn(e,a.accountId),t=S.getSignedInUser(),r=e.tenantState.currentTenantId,u={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:r??""},l=o.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:u,downloadEndPoint:`${Se.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${l}`,zeniAccountDetail:o,isExpressPayEnabled:a.isExpressPayEnabled,fetchState:o.fetchState}},function(e,a){const{navigate:s,currentTenant:o,location:t,accountId:r}=a,{tenantEmailDomain:u}=o;return{handleMoveMoneyOptionSelection:(l,p)=>{let h="page-not-found";l==="sendMoney"?h=mn(u):l==="payBill"?h=dn(o,a.isBillPayEnabled,a.isDebitCardFeatureEnabled):l==="transfer"?(h=un(u,r),p!=null&&e(en(p))):l==="checkDeposit"?(h=pn(u,r),p!=null&&e(ca(p))):l==="accountStatement"&&(h=lt(u,r));const x=ce(t.state?.pathnameStackToGoBack,t.pathname);s(h,{state:{pathnameStackToGoBack:x}})},onAccountDetailClick:()=>{const l=ct(u,r),p=ce(t.state?.pathnameStackToGoBack,t.pathname);s(l,{state:{pathnameStackToGoBack:p}})},onEditNameClick:l=>{e(Re(r,"editName",l))},onReloadZeniAccountDetailPage:()=>{e(an(r,!1))},onCloseAccountClick:()=>{e(Re(r,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})}}})(ba);function re({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:a,isAccountInfoDrawerOpen:s}){const o=W(),t=ne(),r=M(),u=V(),{tenantEmailDomain:l,accountId:p}=q(),{useDynamicConfig:h}=Z(),{useFeatureGate:x}=Z(),{isFeatureEnabled:i}=x(O.isDebitCardFeatureEnabled),{isFeatureEnabled:c}=x(O.isCheckingCommentingEnabled),m=w(H=>U(H)),{configValue:C}=h(G.expressPayConfig),b=C.is_enable_all_tenants===!0||C.tenant_ids!=null&&C.tenant_ids.includes(m.tenantId),f=!!m.companyBillPayInfo?.info?.isBillPayEnabled,A=S.getSignedInUser(),D=m.companyId??S.getSignedInUserTenant(l)?.companyId,g={userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:m.tenantId??""},I=`${Ie}/account_details`,[F,R]=d.useState(!1),[j,E]=d.useState(!1),[P,T]=d.useState(!1),[v,y]=d.useState(!1),$=w(H=>nn(H,p??"")),te=$.fetchState,{isAiCfoAccessEnabled:oe,onAskAiCfoClick:me}=rn({mobileExploreReferrer:"Checking Account Detail"});on({isDataReady:te==="Completed"}),d.useEffect(()=>{F||(r(an(p??"",!1)),R(!0))},[F,r,te]),d.useEffect(()=>{y(s!=null&&s===!0)},[s]),d.useEffect(()=>{e!=null&&e===!0?E(!0):(E(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{T(a!=null&&a===!0)},[a]);const N=()=>{y(!1),t("..")};return n.jsxs(n.Fragment,{children:[v===!0&&$.accountDetail!=null?n.jsx(Ja,{authParams:g,downloadAccountDetailEndPoint:I,closeDrawerHandler:N,isAccountInfoDrawerOpen:v,zeniBankAccountDetail:$.accountDetail}):null,j===!0?n.jsx(ln,{closeDrawerHandler:N,isTransferDrawerOpen:j,zeniAccountsConfig:$.zeniAccountsConfig,authParams:g,downloadAccountDetailEndPoint:I}):null,P===!0?n.jsx(cn,{closeDrawerHandler:N,isCheckDepositDrawerOpen:P}):null,n.jsx(rt,{windowSize:u,children:n.jsx(it,{navigate:t,currentTenant:m,location:o,companyId:D,isDebitCardFeatureEnabled:i,accountId:p??"",isBillPayEnabled:f,isCheckingCommentingEnabled:c,isExpressPayEnabled:b,isAiCfoAccessEnabled:oe,onAskAiCfoClick:me})})]})}const ct=(e,a)=>`/${e}/checking/${a}/account-info`,lt=(e,a)=>`/${e}/checking/${a}/statements`,dt=Y(function(e,a){const{companyId:s}=a;return{zeniAccountSetupView:la(e,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(e,a){const{navigate:s,companyId:o}=a;return{onSetupButtonClick:()=>{L.trackAccountsPromoPageClicked("Setup Accounts"),e(da(o))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}})(Ea),ut=()=>{const e=ne(),a=W(),{tenantEmailDomain:s}=q(),{useDynamicConfig:o}=Z(),t=_(),[r,u]=d.useState(!1),[l,p]=d.useState(!1),h=w(g=>U(g)),{configValue:x}=o(G.zeniAccountsConfig),i=we(x);d.useEffect(()=>{l===!1&&a.state?.message==="activation"&&p(!0)},[a.state]);const c=S.getSignedInUserTenant(s)?.companyId??h.companyId,m=S.getSignedInUser(),C=!!h.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,b=g=>{u(g)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const f=ae(),A=ee(f?.loggedInUserRoleMap),D=Ae(f?.loggedInUserRoleMap);if(C&&A)return n.jsx(X,{to:"../../checking/setup"});if(h.company?.companyZeniAccountInfo&&(!C&&A||D)){if(a.state?.message==="activation"){const g=tn(a.state?.pathnameStackToGoBack);e(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:g.newStack}})}return n.jsxs(n.Fragment,{children:[n.jsx(Pa,{showConfetti:l}),n.jsx(ue,{analytics:L,onLoad:g=>(I=>I.trackPageLoaded(be.Event.accountsPromoPageViewed))(g)}),n.jsx(pe,{isAppContentDrawerOpen:r,handleDrawerToggle:b}),n.jsx(dt,{analytics:L,navigate:e,companyId:c,onClickMenuIcon:()=>{b(!0)},maxAnnualPercentageYield:i.maxAnnualPercentageYield,maxInsuredAmount:i.maxInsuredAmount,exampleBankBalance:3e6})]})}return n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:t.colors.grey5}})};function zt(){const e=W(),a=w(v=>U(v)),s=_(),{useFeatureGate:o,useDynamicConfig:t}=Z(),r=ae(),u=ee(r?.loggedInUserRoleMap),l=Ae(r?.loggedInUserRoleMap),p=!!a.company?.companyZeniAccountInfo.isZeniAccountEnabled,h=!!a.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:x}=o(O.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=o(O.isDebitCardFeatureEnabled),c=Xe(a),m=De(i,a),C=a?.userRole!=null&&ua(a?.userRole),b=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C)&&pa(r?.loggedInUserRoleMap),f=ma(r?.loggedInUserRoleMap),A=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C)&&ha(r?.loggedInUserRoleMap),{isFeatureEnabled:D}=o(O.isDepositAccountsFeatureEnabled),g=D&&!C,{configValue:I}=t(G.expressPayConfig),F=I.is_enable_all_tenants===!0||I.tenant_ids!=null&&I.tenant_ids.includes(a.tenantId),{isFeatureEnabled:R}=o(O.isAutoTransferRuleEnabled),j=va(a,x,i)&&!C&&fa(r?.loggedInUserRoleMap),E=ga(r?.loggedInUserRoleMap),P=g&&ee(r?.loggedInUserRoleMap),T=P||Ze(r?.loggedInUserRoleMap);return n.jsxs(Ve,{children:[n.jsx(k,{path:"setup",element:n.jsx(ze,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:f,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:P,isChargeCardAdminLevelAccess:j,isUserHasOnlyCardAccess:E,productType:"zeni_accounts",type:"setup"})}),n.jsx(k,{path:"verification",element:n.jsx(ze,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:f,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:P,isChargeCardAdminLevelAccess:j,isUserHasOnlyCardAccess:E,productType:"zeni_accounts",type:"verification"})}),R?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"auto-transfer",element:n.jsx(Me,{})}),T?n.jsx(k,{path:"auto-transfer/:ruleId/edit",element:n.jsx(Me,{isEditDrawerOpen:!0})}):null]}):n.jsx(k,{path:"auto-transfer",element:n.jsx(ie,{})}),F&&u?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"express-pay",element:n.jsx(se,{})}),n.jsx(k,{path:"express-pay/add-ach",element:n.jsx(se,{isAddACHDrawerOpen:!0})}),n.jsx(k,{path:"express-pay/add-wire/add-address",element:n.jsx(se,{isAddAddressDrawerOpen:!0})}),n.jsx(k,{path:"express-pay/add-wire",element:n.jsx(se,{isAddWireDrawerOpen:!0})})]}):n.jsx(k,{path:"express-pay",element:n.jsx(ie,{})}),n.jsx(k,{path:"promo",element:n.jsx(ut,{})}),c&&!m?n.jsx(k,{path:"/*",element:n.jsx(sn,{})}):p?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"/",element:n.jsx(xe,{})}),n.jsx(k,{path:"transfer",element:n.jsx(xe,{isTransferDrawerOpen:!0})}),n.jsx(k,{path:"check-deposit",element:n.jsx(xe,{isCheckDepositDrawerOpen:!0})}),n.jsx(k,{path:":accountId/*",element:n.jsx(pt,{})}),n.jsx(k,{path:"*",element:n.jsx(ie,{})})]}):h&&u?n.jsx(k,{path:"*",element:n.jsx(X,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&l?n.jsx(k,{path:"*",element:n.jsx(X,{to:"../promo",state:e.state})}):n.jsx(k,{path:"*",element:n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${ja.sp1} ${s.colors.dropShadowNormal}`}})})]})}function pt(){return n.jsxs(Ve,{children:[n.jsx(k,{path:"/",element:n.jsx(re,{})}),n.jsx(k,{path:"account-info",element:n.jsx(re,{isAccountInfoDrawerOpen:!0})}),n.jsx(k,{path:"transfer",element:n.jsx(re,{isTransferDrawerOpen:!0})}),n.jsx(k,{path:"check-deposit",element:n.jsx(re,{isCheckDepositDrawerOpen:!0})}),n.jsx(k,{path:"statements",element:n.jsx(La,{})}),n.jsx(k,{path:"*",element:n.jsx(ie,{})})]})}export{zt as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{j as i}from"./liveblocks-CpSeBLzv.js";import{a as f}from"./sentry-BxlhxHUi.js";import{h as x,u as B,g as P,i as $,j as p}from"./core-DUPexJ3H.js";import{Jd as s,Jc as j,Ps as v,eQ as C,Pt as T}from"./zeni-epic-state-DP595dtC.js";import{J as z,at as g,m as D,z as E,B as L,c6 as N,p as U}from"./index-B_Z_hpYg.js";import{n as _}from"./mui-BYcLUAn-.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]="3969c5d8-4024-45bd-ae4e-c8dfe4760280",e._sentryDebugIdIdentifier="sentry-dbid-3969c5d8-4024-45bd-ae4e-c8dfe4760280")}catch{}})();const J=_.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=z(),l=P();let{accountId:a}=$(),m=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,m=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[u,h]=f.useState(!1),y=D();f.useEffect(()=>{u||(h(!0),n(j(a??"",!1)))},[u,n]);const o=p(t=>v(t,a??"")),I=()=>{const t=U(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},c=E.getSignedInUser(),r=p(t=>C(t)),b={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:r.tenantId??""},w=T(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=r.company?.companyInfo.companyLegalName??r.companyName;if(c==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(L,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}}):i.jsx(J,{windowSize:d,children:i.jsx(N,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:I,authParams:b,downloadEndPoint:m})})}export{q as Z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./sentry-BxlhxHUi.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};
|