@zeniai/web-app-ui 5.3.73-qa → 5.3.74-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/{AccountMappingScreen-BE1tvCY-.js → AccountMappingScreen-bgBnbWdy.js} +2 -2
- package/dist/assets/{ActualMatchingMatchDetailScreen-JIrVAnYO.js → ActualMatchingMatchDetailScreen-CafaM5XY.js} +1 -1
- package/dist/assets/AddressRoutes-B0qCwALn.js +1 -0
- package/dist/assets/AddressScreen-DeduQWQ4.js +9 -0
- package/dist/assets/AiCfoScreen-B7J9RT9C.js +22 -0
- package/dist/assets/{AppDrawer-BtvyICbv.js → AppDrawer-BW6P-wV8.js} +2 -2
- package/dist/assets/{BillPayApprovalRoutes-BeNlUYtP.js → BillPayApprovalRoutes-D2bN_nnZ.js} +1 -1
- package/dist/assets/{BillPayRoutes-NNo26FTU.js → BillPayRoutes-CgW1erGg.js} +18 -18
- package/dist/assets/BusinessVerificationPageScreen-DcKUi-lt.js +9 -0
- package/dist/assets/CardsAiCfoScreen-C1dyyMbI.js +14 -0
- package/dist/assets/{ChargeCardRoutes-Czud_dft.js → ChargeCardRoutes-BWzbRtxf.js} +6 -6
- package/dist/assets/{CompanyPassportScreen-CUrmIaoV.js → CompanyPassportScreen-xleu1jTV.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-B5EFa-_C.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-BrgGs5TS.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-nYzTX44l.js → CustomerOnboardingRoutes-B7MWRMYz.js} +3 -3
- package/dist/assets/{DashboardRoutes-DhAARK1y.js → DashboardRoutes-h3cnLeE8.js} +3 -3
- package/dist/assets/{DefaultTenantHome-BnU9SlLP.js → DefaultTenantHome-B6pMA7H4.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-CXWbzXGO.js → DomesticWireDetailScreen-zZKn41az.js} +4 -4
- package/dist/assets/{DrawerScreen-KU4gAeGs.js → DrawerScreen-DMtHjlqA.js} +1 -1
- package/dist/assets/EntityDetailRoutes-D_ufO2eZ.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-CLNre9XZ.js → ExpenseAutomationRoutes-jgAFt30Z.js} +3 -3
- package/dist/assets/FeaturePreviewScreen-zypoS_dA.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-DbtL26-p.js +1 -0
- package/dist/assets/{InboxNotificationsProvider-DNSMQBKV.js → InboxNotificationsProvider-CrlYLYr4.js} +1 -1
- package/dist/assets/InvoicingRoutes-Cy4ZHmk0.js +2 -0
- package/dist/assets/{MagicLinkRoutes-DPv2J5Oz.js → MagicLinkRoutes-DzAI89ll.js} +8 -8
- package/dist/assets/MagicLinkSignInScreen-BgTist7Q.js +12 -0
- package/dist/assets/MobileAppDrawer-DqkcDASf.js +1 -0
- package/dist/assets/NotFoundScreen-CNN7HdXS.js +1 -0
- package/dist/assets/NotificationRoutes-C2jjWnl-.js +1 -0
- package/dist/assets/OAuthConsentScreen-BPAw8v-M.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-CBKGWsoX.js +1 -0
- package/dist/assets/{PaymentLinkScreen-eihuemvD.js → PaymentLinkScreen-B6TgBvUT.js} +1 -1
- package/dist/assets/PeopleRoutes-DypFbuli.js +22 -0
- package/dist/assets/PerformanceRoutes-C2kXP11r.js +1 -0
- package/dist/assets/{Preview-Csnu6hhv.js → Preview-B36YgZlJ.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-D1I_iW5h.js → QBOConnectionScreen--H698GzB.js} +1 -1
- package/dist/assets/ReimbursementApprovalRoutes-D4ojMFTf.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BIyPBmgD.js → ReimbursementApprovalRuleDetailScreen-DegiBelw.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-LP6xm98z.js → ReimbursementRoutes-Yr2nE-d0.js} +7 -7
- package/dist/assets/{ReportsRoutes-DITYNMuX.js → ReportsRoutes-DjFQNpll.js} +1 -1
- package/dist/assets/RewardsRoutes-Dtxx5k0B.js +1 -0
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-BcgBt7ic.js → ScheduleDetailsPrepaidExpensesScreen-BRIu0n7K.js} +5 -5
- package/dist/assets/ScreenRoutes-kKJ3YpZH.js +2 -0
- package/dist/assets/{SettingsRoutes-Da6bbYYR.js → SettingsRoutes-BZmYgJtK.js} +6 -6
- package/dist/assets/SetupPagesScreen-lPaGXTgS.js +29 -0
- package/dist/assets/SignInScreen-DTadPYrT.js +1 -0
- package/dist/assets/SignOutScreen-BHkTJ-yD.js +9 -0
- package/dist/assets/TaskListScreen-D3GsptEL.js +9 -0
- package/dist/assets/TaskRoutes-fGbGk9KK.js +9 -0
- package/dist/assets/TransactionDetailRoutes-ViQ3OgVr.js +1 -0
- package/dist/assets/{TransactionDetailScreen-bF7tC5BL.js → TransactionDetailScreen-Be7gHGgU.js} +2 -2
- package/dist/assets/TransactionListRoutes-CDGe1Ogo.js +1 -0
- package/dist/assets/{TreasuryRoutes-ZY5ec2rr.js → TreasuryRoutes-Dbi6qnAw.js} +6 -6
- package/dist/assets/{VendorsRoutes-g-bxxUNg.js → VendorsRoutes-DIJ1qy90.js} +13 -13
- package/dist/assets/WiseConfirmationScreen-CVfxBgou.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-p4oJntrm.js → ZeniAccountRoutes-RSARM6Ba.js} +11 -11
- package/dist/assets/{ZeniAccountStatementScreen-BLhbe-0Z.js → ZeniAccountStatementScreen-BfUClG3a.js} +2 -2
- package/dist/assets/{accountMappingHelper-B03ntuMF.js → accountMappingHelper-CBNvvMfn.js} +1 -1
- package/dist/assets/{analytics-BFbgqgMT.js → analytics-DYPKn651.js} +1 -1
- package/dist/assets/{analyticsHelper-CR4O3yZF.js → analyticsHelper-BvcLZ--H.js} +1 -1
- package/dist/assets/{core-BTxe1IJ4.js → core-CJWbgnFM.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-CLAUpL82.js → decodeURIComponentSafe-BCm_uqSw.js} +1 -1
- package/dist/assets/{dnd-CH048ZLo.js → dnd-hHoSpesG.js} +1 -1
- package/dist/assets/{empty-CAFZs_Ce.js → empty-CGblm06Y.js} +1 -1
- package/dist/assets/{empty-BlDbR96Q.js → empty-DUMrvwO9.js} +1 -1
- package/dist/assets/{emptyVideoElement-C3V_Mh-h.js → emptyVideoElement-D2KJ78rZ.js} +1 -1
- package/dist/assets/epic-n7HybIEr.js +2 -0
- package/dist/assets/expenseAutomationHelper-Bra4tyPR.js +1 -0
- package/dist/assets/{getLocaleForTenant-AQFwGK3G.js → getLocaleForTenant-DDk9eOPJ.js} +1 -1
- package/dist/assets/{index-5MqCU60P.js → index-BWgG5UXp.js} +2 -2
- package/dist/assets/{index-9ZQLuzDm.js → index-BfkcPaMK.js} +1 -1
- package/dist/assets/{index-lUU_agnk.js → index-C8z0vmNu.js} +1 -1
- package/dist/assets/{index-Bk3SeEYR.js → index-CdkOnd47.js} +1 -1
- package/dist/assets/{index-BBiUi3gN.js → index-ColbwDzi.js} +1 -1
- package/dist/assets/{index-D-UPM8nK.js → index-D9-rtXik.js} +1 -1
- package/dist/assets/{index-t_YINWfi.js → index-DvSod3qd.js} +16657 -16580
- package/dist/assets/{index-JPLpjCnh.js → index-EziXfial.js} +1 -1
- package/dist/assets/{lexical-tyxOdseK.js → lexical-CAwA0n9Q.js} +1 -1
- package/dist/assets/{liveblocks-BOLtmXrt.js → liveblocks-Du6nrW5U.js} +1 -1
- package/dist/assets/{lottie-DLo-RGW2.js → lottie-BBf_aMXD.js} +1 -1
- package/dist/assets/{mui-CoXsq-BK.js → mui-dbvYX-CF.js} +1 -1
- package/dist/assets/{pathToGoBack-Bch85fkl.js → pathToGoBack-CI7vJZ39.js} +1 -1
- package/dist/assets/{pdf-DVvA7lFh.js → pdf-C7M7XqWN.js} +3 -3
- package/dist/assets/{pdf-lib-CTa71n8-.js → pdf-lib-ArqLJwp-.js} +1 -1
- package/dist/assets/{plaid-aFRwvwGe.js → plaid-BrZReSCz.js} +1 -1
- package/dist/assets/{pusher-kon0XfSK.js → pusher-B8VDNFKS.js} +1 -1
- package/dist/assets/{react-BukI8JJo.js → react-B8eW8M54.js} +1 -1
- package/dist/assets/{react-CnAe8nlJ.js → react-C7HcxS4Y.js} +1 -1
- package/dist/assets/{react-CuayOuaV.js → react-CmsG3ktk.js} +1 -1
- package/dist/assets/{react-CgA-IPTs.js → react-DCRvz-4Y.js} +1 -1
- package/dist/assets/{react-Bugty8Ja.js → react-Rk6uPjYN.js} +1 -1
- package/dist/assets/{react-BlW33xsQ.js → react-rIttatCG.js} +1 -1
- package/dist/assets/{recharts-4iB4lKv8.js → recharts-qq-VgjqX.js} +1 -1
- package/dist/assets/{routePaths-ByVgDZC2.js → routePaths-5zdijNTw.js} +1 -1
- package/dist/assets/{sentry-CXDuPEuw.js → sentry-DlU3V0QD.js} +1 -1
- package/dist/assets/{stripSplatSuffix-Ph0joKsY.js → stripSplatSuffix-D3txeaXa.js} +1 -1
- package/dist/assets/{url-gwgPp82g.js → url-BjQv6zlz.js} +1 -1
- package/dist/assets/{url-b7gVrWYV.js → url-U6gN5rx7.js} +1 -1
- package/dist/assets/useActualMatchingMatchDetail-DYWJx87C.js +1 -0
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BAsCzUuV.js → useAiCfoDashboardSuggestedQuestionsChips-CQIzuErz.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-DDS1YL8l.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-Babpz4Cl.js → useChargeCardPusherEvents-BEZEnt6s.js} +1 -1
- package/dist/assets/{useDeviceId-Bb0qVsLr.js → useDeviceId-CDXz5n2o.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-DYtoHOCU.js +1 -0
- package/dist/assets/{useInitialThreadRequest-AuBsHZ1k.js → useInitialThreadRequest-CWExIS9V.js} +1 -1
- package/dist/assets/useTaskManagerAccess-OslA3wOO.js +1 -0
- package/dist/assets/{useTaskManagerPusherEvents-Ct21DG4i.js → useTaskManagerPusherEvents-D9C1zIb_.js} +1 -1
- package/dist/assets/{utils-Dq3SJj6J.js → utils-C-x5CNgO.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-DxjwZ9FM.js → withTransactionSidePanel-bpiv3Wfp.js} +4 -4
- package/dist/assets/{zeni-epic-state-EEoBiaeS.js → zeni-epic-state-DUCBgtEU.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +4 -46
- package/dist/assets/AddressRoutes-D9zk0sYw.js +0 -1
- package/dist/assets/AddressScreen-DX07-zau.js +0 -9
- package/dist/assets/AiCfoScreen-tIUREuwh.js +0 -22
- package/dist/assets/BusinessVerificationPageScreen-DUnn3sZ3.js +0 -9
- package/dist/assets/CardsAiCfoScreen-DgW1pdhN.js +0 -14
- package/dist/assets/ConnectionAuthScreen-DBBWNSFG.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-BkD1xkwc.js +0 -1
- package/dist/assets/EntityDetailRoutes-D_N1d5ZQ.js +0 -1
- package/dist/assets/FeaturePreviewScreen-CSQdoVFf.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-CdA2Kn-0.js +0 -1
- package/dist/assets/InvoicingRoutes-BHf-XoEl.js +0 -2
- package/dist/assets/MagicLinkSignInScreen-DSrgS8kC.js +0 -12
- package/dist/assets/MobileAppDrawer-5FBCjy6b.js +0 -1
- package/dist/assets/NotFoundScreen-CT9mXoPL.js +0 -1
- package/dist/assets/NotificationRoutes-qO4Y_dYL.js +0 -1
- package/dist/assets/OAuthConsentScreen-SaWEQNl9.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-By9t5qFG.js +0 -1
- package/dist/assets/PeopleRoutes-Dqp41TZY.js +0 -22
- package/dist/assets/PerformanceRoutes-C-s_fkZE.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-D09rn5qB.js +0 -1
- package/dist/assets/RewardsRoutes-B40r6YTa.js +0 -1
- package/dist/assets/ScreenRoutes-D1Kn71pi.js +0 -2
- package/dist/assets/SetupPagesScreen-BEg9WOWC.js +0 -29
- package/dist/assets/SignInScreen-CGyR8HV0.js +0 -1
- package/dist/assets/SignOutScreen-rgwnFp37.js +0 -9
- package/dist/assets/TaskListScreen-BSIpi4t5.js +0 -9
- package/dist/assets/TaskRoutes-C4ENdbyX.js +0 -9
- package/dist/assets/TransactionDetailRoutes-CpfJculb.js +0 -1
- package/dist/assets/TransactionListRoutes-C_ZQyWLJ.js +0 -1
- package/dist/assets/WiseConfirmationScreen-Hu2tm7rB.js +0 -12
- package/dist/assets/epic-Cs9GTJNL.js +0 -2
- package/dist/assets/expenseAutomationHelper-DayJ0nIv.js +0 -1
- package/dist/assets/useActualMatchingMatchDetail-wQ6Oyy0y.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-CGeN7NSS.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-EO4XFjwp.js +0 -1
- package/dist/assets/useTaskManagerAccess-21llCh7a.js +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-BOLtmXrt.js";import{h as J,u as le,g as K,i as ee,j as v,N as X,l as Q,q as aa,n as na,o as y}from"./core-BTxe1IJ4.js";import{fI as W,Yp as Ge,bq as It,Sp as ia,bo as vt,bK as de,Yq as kt,H5 as wt,Iu as Re,HI as oa,bn as Ce,Yr as la,Ys as sa,c9 as ra,Yt as ca,m2 as xt,Yu as Bt,Yv as Ct,IY as Ue,Ho as xe,Yw as da,GV as et,Yx as ua,MN as pa,GZ as ma,H3 as At,Yy as Se,Yz as _e,Iv as Me,Hl as Dt,YA as ba,YB as ha,Iy as Ne,YC as ga,IE as Sa,YD as Et,I7 as tt,Ic as ya,YE as fa,YF as ce,YG as Tt,YH as jt,YI as Pt,gY as Ia,Ht as Ve,cH as Ft,YJ as va,gk as ka,YK as wa,YL as xa,e0 as Rt,d$ as Vt,YM as Oe,YN as Ba,YO as Ca,WZ as Ye,YP as Aa,W_ as ie,W$ as ze,YQ as Da,YR as Ea,YS as Ta,Ie as at,Ib as ja,YT as Pa,YU as Fa,YV as Ra,HZ as Va,YW as $a,YX as La,cv as $t,db as Lt,md as Ga,bP as Ua,br as Gt,bQ as Ut,G9 as _a,YY as Ma,MA as Na,MG as Oa,Cj as Ya,Iw as za,J3 as Za,mq as ge,YZ as Ha,Y_ as _t,mU as Wa,mk as Mt,mF as Nt,mE as nt,bF as pe,bO as qa,Y$ as Ja,Z0 as ye,kQ as Ka,Z1 as it,Z2 as Qa,kU as Xa,ld as en,Jh as tn,Z3 as an,mN as nn,J7 as on,Z4 as ot,Jb as ln,Jg as sn,Je as rn,J5 as cn,Z5 as Ot,He as dn,Z6 as un,Z7 as pn,gJ as mn,gI as bn,gH as hn,mt as gn,mL as lt,mW as Sn,v1 as yn,mC as fn,J9 as In,k_ as vn,m$ as kn,Z8 as wn,kS as xn,uU as Bn,Z9 as Cn,I3 as An,bL as Dn,bu as En,Uo as Tn,de as jn,dd as Pn,cG as Fn,cN as Rn}from"./zeni-epic-state-EEoBiaeS.js";import{E as ue,z as V,O as fe,as as Ze,_ as oe,f,bi as He,a7 as se,M as A,a8 as Ae,k as E,bv as Vn,a4 as H,av as We,p as D,a1 as Ie,bw as st,bx as rt,by as $n,az as Ln,af as Gn,aS as Un,ab as Yt,G as De,ag as qe,bz as _n,ae as zt,bA as Mn,aq as Nn,S as Zt,w as On,bB as Yn,bC as zn,bD as Zn,bE as Hn,bF as Wn,bG as qn,bH as Jn,bI as Kn,bJ as Qn,c as Xn,bK as ei,bs as ti,bL as ai,ai as ni,bM as ii,h as oi}from"./index-t_YINWfi.js";import{n as G,S as li}from"./mui-CoXsq-BK.js";import{A as ct}from"./AddressScreen-DX07-zau.js";import{g as ne,a as Ee,i as Ht,V as Je,b as Ke,c as si,v as ri,d as ci,A as me,D as be}from"./DomesticWireDetailScreen-CXWbzXGO.js";import{a as g}from"./sentry-CXDuPEuw.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-CGeN7NSS.js";import{u as Wt}from"./useInitialThreadRequest-AuBsHZ1k.js";import{u as di}from"./BusinessVerificationPageScreen-DUnn3sZ3.js";import Be from"./NotFoundScreen-CT9mXoPL.js";import{D as ui}from"./DrawerScreen-KU4gAeGs.js";import{M as qt}from"./MobileAppDrawer-5FBCjy6b.js";import{F as Jt}from"./FeaturePreviewScreen-CSQdoVFf.js";import{S as Te}from"./SetupPagesScreen-BEg9WOWC.js";import{B as pi}from"./BillPayApprovalRoutes-BeNlUYtP.js";import{F as mi}from"./ScreenRoutes-D1Kn71pi.js";import"./recharts-4iB4lKv8.js";import"./analytics-BFbgqgMT.js";import"./plaid-aFRwvwGe.js";import"./dnd-CH048ZLo.js";import"./stripe-cKAAJElX.js";import"./lottie-DLo-RGW2.js";import"./lexical-tyxOdseK.js";import"./pdf-DVvA7lFh.js";import"./utils-Dq3SJj6J.js";import"./routePaths-ByVgDZC2.js";import"./InboxNotificationsProvider-DNSMQBKV.js";import"./useTaskManagerAccess-21llCh7a.js";import"./analyticsHelper-CR4O3yZF.js";import"./ReimbursementApprovalRuleDetailScreen-BIyPBmgD.js";import"./getLocaleForTenant-AQFwGK3G.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]="68da730e-83d1-4e7d-90d2-c79a7dd1f712",e._sentryDebugIdIdentifier="sentry-dbid-68da730e-83d1-4e7d-90d2-c79a7dd1f712")}catch{}})();const bi=Q((function(e,t){const l=Ge(e,t.billId),n=V.getSignedInUser(),c=e.tenantState.currentTenantId,r={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:c??""},u=H(t.location.state?.pathnameStackToGoBack);let o=!0;u.poppedPathname?.includes("bills")===!0&&(o=!1);let s=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`;Ce(n)||!l.createdBy?.email?.includes("zeni.ai")||(s="Zeni");let i=!1,d=!1;if(l?.billActivities.length>0){const{isApprovalorRejectBtnVisible:S,isMarkAsPaidBtnVisible:h}=la(l.billActivities,sa(t.currentTenant),n);i=S,d=h}const p=ra(t.currentTenant?.userRole??[]),m=l.transactionDetails!=null&&ca(l.transactionDetails,p,n);return{billDetails:l,isAccountingClassesEnabled:xt(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${We}/transaction_attachment`,signedInUser:n,showBackButton:o,isAdmin:p,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,showApproveRejectBtns:i,showMarkAsPaidButtonToApprover:d,hasZeniAssistAccess:t.hasZeniAssistAccess,analytics:E,showMarkAsPaidButtonToCreator:m}}),(function(e,t){const{billId:l,currentTenant:n,location:c,navigate:r}=t,{tenantEmailDomain:u}=n;return{redirectToBillsScreen:()=>{const o=ne(u),s=D(c.state?.pathnameStackToGoBack,c.pathname);r(o,{state:{pathnameStackToGoBack:s}})},redirectToEditableBillScreen:()=>{const o=D(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}})},discardBillDetailsFromLocalStore:()=>{e(Se({}))},deleteBill:o=>{E.trackBillPayDeleteBill(l,o),e(At(l))},cancelAndDeleteBill:(o,s)=>{s===!0?E.trackBillPayCancelAndDeleteBill(l,o):E.trackBillPayCancelBill(l),e(ma(l,s))},onSaveRealTimeApprovals:o=>{e(pa(l,"bill_pay",o))},updateEditRealTimeApproverClicked:o=>{e(ua({isEdit:o,entityId:l,entityType:"bill_pay"}))},approveOrRejectBill:o=>{o.type==="approved"?e(et(l,o.type,"")):e(et(l,o.type,o.description??""))},retryOrRefundBill:o=>{o.type==="retry"?e(xe(l,"retry")):e(xe(l,"refund"))},onAddNewRule:()=>{r("../../bills/approval-rules")},onAttachmentClick:(o,s)=>{const i=Ee(u,o,s),d=D(c.state?.pathnameStackToGoBack,c.pathname);r(i,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{const o=H(t.location.state?.pathnameStackToGoBack),s=o.poppedPathname??ne(u);r(s,{state:{pathnameStackToGoBack:o.newStack}})},onRetryPaymentClick:()=>{const o=D(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}}),e(da({billId:t.billId}))},onRefundPaymentClick:()=>{e(xe(t.billId,"refund"))},saveBillDetails:(o,s,i)=>{o&&e(Ct({data:i,billId:l})),e(Ue(o?"paid":"pending_approval",o,s,l))},discardOutsideZeniPaymentData:()=>{e(Bt({billId:l}))}}}))(Vn);function hi(){const e=J(),t=le(),l=K(),{billId:n}=ee(),c=ue(),r=V.getSignedInUser(),u=fe(),o=v((U=>W(U))),s=v((U=>Ge(U,n??""))),i=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Wt(o?.companyId,{clearParams:s.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:m}=Qe({mobileExploreReferrer:"Bill Details"});Ze({isDataReady:s.fetchState==="Completed"});const S=o?.userRole!=null&&It(o?.userRole),h=o?.company==null||o.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!S,[b,C]=g.useState(!1),[I,j]=g.useState(!1),[B,T]=g.useState(!1),{useFeatureGate:k,useDynamicConfig:$}=oe(),{isFeatureEnabled:O}=k(f.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:_}=k(f.isBillPayDetectInsufficientFundsEnabled),{configValue:Y}=$(He.zeniAssistConfig),z=ia(o),w=vt(o.userRole),M=h&&de(u?.loggedInUserRoleMap),L=Y.user_ids!=null&&r?.userId!=null&&Y.user_ids.includes(r?.userId),{isFeatureEnabled:Z}=k(f.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:q}=k(f.billPaySetupShowInternationalPaymentByWise);if(g.useEffect((()=>{O&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&z===!1?T(!1):T(s.billActivities[0]?.isRealTimeApprovalEnabled&&(w||M||s.allApprovers.find((U=>U.user.userId===r?.userId))!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))}),[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,w,M,o.isZeni,z,r]),g.useEffect((()=>{n!=null&&t(kt(n))}),[n]),g.useEffect((()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(C(!0),t(wt(n??"",O,L,!1)))}),[b,s,n,t]),g.useEffect((()=>{I||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(j(!0),t(Re(!1,O,L,q,n)),s.billActivities[0]?.isRealTimeApprovalEnabled===!0&&t(oa()))}),[I,s,n,t,O,L,q]),r==null)throw Error("Can't access address page without signing in...");return s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1?a.jsx(X,{to:`./edit${l.search}`}):s.deleteStatus.fetchState==="In-Progress"||s.cancelAndDeleteStatus.fetchState==="In-Progress"||s.cancelStatus.fetchState==="In-Progress"?a.jsx(se,{fetchState:s.deleteStatus.fetchState,style:{boxShadow:`0px 2px ${A.sp1} ${c.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[a.jsx(Ae,{analytics:E,onLoad:U=>(N=>{n!=null&&N.trackBillPayBillDetails(n,s.isRecurring)})(U)}),a.jsx(bi,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:O,location:l,navigate:e,isRealTimeApprovalEnabled:B,currentTenant:o,billId:n??"",isInternationalPaymentShaVsOurEnabled:Z,hasZeniAssistAccess:L,isDetectInsufficientFundsEnabled:_,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const $e=De.getLocalizedStrings().spendManagement.billPay.billDetails,dt=De.getLocalizedStrings().common,gi={containerWidth:new Yt(100,58)},ut=Q((function(e,t){const l=V.getSignedInUser(),n=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:n??""},r=t.showActionButtons,u=r&&t.file==null;return{uploadInvoiceEndPoint:`${zt.communicationAgentMicroServiceBaseUrl}`,authParams:c,billId:t.billId,file:t.file,showAutofill:t.showAutofill,analytics:E,entityId:t.billId,showTitlebarIcon:r,showTitlebar:r&&t?.file!=null,uploadStatus:t.uploadStatus,shouldNotShowAttachment:u,style:{paddingTop:A.sp10,paddingRight:A.sp3,paddingBottom:"15px",paddingLeft:A.sp5,...t.showAutofill?{}:{backgroundColor:t.backgroundColor,paddingBottom:"128px"}}}}),(function(e,t){const l=V.getSignedInUser();return{onInvoiceUpload:n=>{n!=null&&(t.file!=null||t.billId!=null||t.isInitialEdit?(t.setPayload(n),t.setShowConfirmationPopup(!0)):e(Ne(n,t.isVendorRecommendationEnabled,t.billId)))},updateInvoiceUploadFetchState:n=>{e(Sa({fetchState:{fetchState:n,error:void 0},billId:t.billId}))},onSkipAutofill:n=>{E?.trackBillPaySkipAutofill(),e(Me(n))},onDeleteClick:()=>{e(ga({billId:t.billId})),E?.trackInvoiceActionClick(t.billStage??"","delete",l?.userEmail??"",null)}}}))(Un);function x({appContent:e}){const t=le(),l=J(),{billId:n}=ee(),c=K(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=Ie(),s=ue(),i=V.getSignedInUser(),{useFeatureGate:d,useDynamicConfig:p}=oe(),{isFeatureEnabled:m}=d(f.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:S}=d(f.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:h}=d(f.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(f.billPaySetupShowInternationalPaymentByWise),{configValue:C}=p(He.zeniAssistConfig),I=C.user_ids!=null&&i?.userId!=null&&C.user_ids.includes(i?.userId),j=v((P=>W(P)));di();const[B,T]=g.useState(!1),[k,$]=g.useState(!1),[O,_]=g.useState(!1),[Y,z]=g.useState(),w=v((P=>_e(P,m,h,n)));let M=w.fetchState,L=w.file,Z=w.showAutofill;const q=v((P=>Ge(P,n??"")));u===!1&&(M=q.fetchState,L=q.transactionDetails?.attachments?.[0],Z=!1);const U=w.billPayInfo!=null&&w.billPayInfo.stage.code==="pending_approval"?w.billPayInfo.billStatus.code:w.billStage;g.useEffect((()=>{n==null&&t(Me(!0))}),[n,t]),g.useEffect((()=>{M==="Not-Started"&&(u&&k?$(!1):!u&&B&&T(!1))}),[n]),g.useEffect((()=>{B||n==null||u||(T(!0),t(wt(n,S,I,!1)),t(Dt(n)),k||($(!0),t(Re(!1,S,I,b,n)))),u&&!k&&($(!0),t(Re(!1,S,I,b,n)))}),[B,k,u,n,t,S,I,b]);const N={onOkClick:()=>{if(_(!1),!Y)return;const P=L!=null?"replace":"upload";E?.trackInvoiceActionClick(U??"",P,i?.userEmail??"","yes"),t(ha({replaceBillData:!0,billId:n})),t(Ne(Y,m,n))},onCancelClick:()=>{if(_(!1),!Y)return;const P=L!=null?"replace":"upload";E?.trackInvoiceActionClick(U??"",P,i?.userEmail??"","no"),t(ba({file:Y,billId:n}))}},te=g.useCallback((()=>{const P=H(c.state?.pathnameStackToGoBack),ve=P.poppedPathname??ne(j.tenantEmailDomain);t(Se({billId:n})),l(ve,{state:{pathnameStackToGoBack:P.newStack}})}),[c.state,j.tenantEmailDomain,n,t,l]);if(i==null)throw Error("Can't access address page without signing in...");if(M==="Error"||q.fetchState==="Error")return a.jsx(Be,{});if(M!="Completed")return n==null&&o!=="small"?a.jsx(st,{fallback:te,children:a.jsxs(je,{windowSize:o,children:[a.jsx(mt,{}),a.jsx(Pe,{}),a.jsx(ut,{backgroundColor:s.colors.grey4,billId:n,file:L,showAutofill:!0,uploadStatus:w.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:_,setPayload:z,showActionButtons:!1,isInitialEdit:!!w.isInitialEdit,billStage:U}),a.jsx(Fe,{windowSize:o,children:a.jsx(rt,{isNewBill:!0})})]})}):a.jsxs(je,{windowSize:o,children:[o==="small"||Z?null:a.jsx(pt,{children:a.jsx(Kt,{onClick:te,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Pe,{}):null,a.jsx($n,{}),a.jsx(Fe,{windowSize:o,children:a.jsx(rt,{isNewBill:n==null})})]});{const P=w.billPayInfo!=null&&w.billPayInfo.stage.code==="pending_approval"?w.billPayInfo.billStatus.code:w.billStage;return a.jsx(st,{fallback:te,children:a.jsxs(je,{windowSize:o,children:[Z&&o!=="small"?a.jsx(mt,{}):null,O?a.jsx(Ln,{titleComponent:a.jsx(wi,{children:$e.overwriteTitle}),descriptionComponent:a.jsx(xi,{children:$e.overwriteDescription}),primaryButtonText:dt.yes,secondaryButtonText:dt.no,action:N,isEditPopup:!0}):null,o==="small"||Z?null:a.jsx(pt,{children:a.jsx(Si,{})}),o!=="small"?a.jsx(Pe,{}):null,a.jsx(ut,{backgroundColor:s.colors.grey4,billId:n,file:L,showAutofill:Z,uploadStatus:w.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:yi(u,q,w),setShowConfirmationPopup:_,setPayload:z,showActionButtons:fi(u,w),isInitialEdit:!!w.isInitialEdit,billStage:P}),a.jsx(Fe,{windowSize:o,children:e})]})})}}function Si(){const{triggerBack:e}=_n();return a.jsx(Kt,{onClick:e,"data-testid":"nav-bar-back-click"})}function yi(e,t,l){let n,c;return e?(n=l.recurringConfig?.currentInstance,c=l.recurringConfig?.totalPaymentCycles):(n=t.transactionDetails?.recurringBillInstance,c=t.recurringBillConfigDetail?.totalPaymentCycles),t?.isRecurring===!0?a.jsxs(Ii,{children:[a.jsx(vi,{children:`${$e.recurringBill.recurringCycle}
|
|
2
|
-
${n}/${c}`}),a.jsx(ki,{})]}):void 0}function fi(e,t){const l=t.billActivities?.[0],n=t.billStage==="pending_approval"&&l?.areApprovalsSerialized===!0&&l?.currentPendingStepIndex===0;return e&&(t.billStage==="draft"||n)}const pt=
|
|
1
|
+
import{j as a}from"./liveblocks-Du6nrW5U.js";import{h as J,u as le,g as K,i as ee,j as v,N as X,l as Q,q as aa,n as na,o as y}from"./core-CJWbgnFM.js";import{fI as W,Yt as Ue,bq as It,St as ia,bo as vt,bK as de,Yu as kt,H6 as wt,Iv as Re,HJ as oa,bn as Ce,Yv as la,Yw as sa,c9 as ra,Yx as ca,m2 as xt,Yy as Bt,Yz as Ct,IZ as _e,Hp as xe,YA as da,GW as et,YB as ua,MR as pa,G_ as ma,H4 as At,YC as Se,YD as Ge,Iw as Me,Hm as Dt,YE as ba,YF as ha,Iz as Ne,YG as ga,IF as Sa,YH as Et,I8 as tt,Id as ya,YI as fa,YJ as ce,YK as Tt,YL as jt,YM as Pt,gY as Ia,Hu as Ve,cH as Ft,YN as va,gk as ka,YO as wa,YP as xa,e0 as Rt,d$ as Vt,YQ as Oe,YR as Ba,YS as Ca,X1 as ze,YT as Aa,X2 as ie,X3 as Ze,YU as Da,YV as Ea,YW as Ta,If as at,Ic as ja,YX as Pa,YY as Fa,YZ as Ra,H_ as Va,Y_ as $a,Y$ as La,cv as $t,db as Lt,md as Ua,bP as _a,br as Ut,bQ as _t,Ga,Z0 as Ma,ME as Na,MK as Oa,Ck as za,Ix as Za,J4 as Ya,mq as ge,Z1 as Ha,Z2 as Gt,mU as Wa,mk as Mt,mF as Nt,mE as nt,bF as pe,bO as qa,Z3 as Ja,Z4 as ye,kQ as Ka,Z5 as it,Z6 as Qa,kU as Xa,ld as en,Ji as tn,Z7 as an,mN as nn,J8 as on,Z8 as ot,Jc as ln,Jh as sn,Jf as rn,J6 as cn,Z9 as Ot,Hf as dn,Za as un,Zb as pn,gJ as mn,gI as bn,gH as hn,mt as gn,mL as lt,mW as Sn,v1 as yn,mC as fn,Ja as In,k_ as vn,m$ as kn,Zc as wn,kS as xn,uU as Bn,Zd as Cn,I4 as An,bL as Dn,bu as En,Us as Tn,de as jn,dd as Pn,cG as Fn,cN as Rn}from"./zeni-epic-state-DUCBgtEU.js";import{E as ue,z as V,Q as fe,as as Ye,W as oe,y as f,bi as He,a7 as se,M as A,a8 as Ae,k as E,bv as Vn,a4 as H,av as We,p as D,a1 as Ie,bw as st,bx as rt,by as $n,az as Ln,af as Un,aS as _n,ab as zt,G as De,ag as qe,bz as Gn,ae as Zt,bA as Mn,aq as Nn,U as Yt,w as On,bB as zn,bC as Zn,bD as Yn,bE as Hn,bF as Wn,bG as qn,bH as Jn,bI as Kn,bJ as Qn,D as Xn,bK as ei,bs as ti,bL as ai,ai as ni,bM as ii,g as oi}from"./index-DvSod3qd.js";import{n as U,S as li}from"./mui-dbvYX-CF.js";import{A as ct}from"./AddressScreen-DeduQWQ4.js";import{g as ne,a as Ee,i as Ht,V as Je,b as Ke,c as si,v as ri,d as ci,A as me,D as be}from"./DomesticWireDetailScreen-zZKn41az.js";import{a as g}from"./sentry-DlU3V0QD.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-DDS1YL8l.js";import{u as Wt}from"./useInitialThreadRequest-CWExIS9V.js";import{u as di}from"./BusinessVerificationPageScreen-DcKUi-lt.js";import Be from"./NotFoundScreen-CNN7HdXS.js";import{D as ui}from"./DrawerScreen-DMtHjlqA.js";import{M as qt}from"./MobileAppDrawer-DqkcDASf.js";import{F as Jt}from"./FeaturePreviewScreen-zypoS_dA.js";import{S as Te}from"./SetupPagesScreen-lPaGXTgS.js";import{B as pi}from"./BillPayApprovalRoutes-D2bN_nnZ.js";import{F as mi}from"./ScreenRoutes-kKJ3YpZH.js";import"./recharts-qq-VgjqX.js";import"./analytics-DYPKn651.js";import"./plaid-BrZReSCz.js";import"./dnd-hHoSpesG.js";import"./stripe-cKAAJElX.js";import"./lottie-BBf_aMXD.js";import"./lexical-CAwA0n9Q.js";import"./pdf-C7M7XqWN.js";import"./utils-C-x5CNgO.js";import"./routePaths-5zdijNTw.js";import"./InboxNotificationsProvider-CrlYLYr4.js";import"./useTaskManagerAccess-OslA3wOO.js";import"./analyticsHelper-BvcLZ--H.js";import"./ReimbursementApprovalRuleDetailScreen-DegiBelw.js";import"./getLocaleForTenant-DDk9eOPJ.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]="a7b795d7-5dd0-4ea3-93b6-7eb2827c2c4a",e._sentryDebugIdIdentifier="sentry-dbid-a7b795d7-5dd0-4ea3-93b6-7eb2827c2c4a")}catch{}})();const bi=Q((function(e,t){const l=Ue(e,t.billId),n=V.getSignedInUser(),c=e.tenantState.currentTenantId,r={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:c??""},u=H(t.location.state?.pathnameStackToGoBack);let o=!0;u.poppedPathname?.includes("bills")===!0&&(o=!1);let s=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`;Ce(n)||!l.createdBy?.email?.includes("zeni.ai")||(s="Zeni");let i=!1,d=!1;if(l?.billActivities.length>0){const{isApprovalorRejectBtnVisible:S,isMarkAsPaidBtnVisible:h}=la(l.billActivities,sa(t.currentTenant),n);i=S,d=h}const p=ra(t.currentTenant?.userRole??[]),m=l.transactionDetails!=null&&ca(l.transactionDetails,p,n);return{billDetails:l,isAccountingClassesEnabled:xt(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${We}/transaction_attachment`,signedInUser:n,showBackButton:o,isAdmin:p,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,showApproveRejectBtns:i,showMarkAsPaidButtonToApprover:d,hasZeniAssistAccess:t.hasZeniAssistAccess,analytics:E,showMarkAsPaidButtonToCreator:m}}),(function(e,t){const{billId:l,currentTenant:n,location:c,navigate:r}=t,{tenantEmailDomain:u}=n;return{redirectToBillsScreen:()=>{const o=ne(u),s=D(c.state?.pathnameStackToGoBack,c.pathname);r(o,{state:{pathnameStackToGoBack:s}})},redirectToEditableBillScreen:()=>{const o=D(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}})},discardBillDetailsFromLocalStore:()=>{e(Se({}))},deleteBill:o=>{E.trackBillPayDeleteBill(l,o),e(At(l))},cancelAndDeleteBill:(o,s)=>{s===!0?E.trackBillPayCancelAndDeleteBill(l,o):E.trackBillPayCancelBill(l),e(ma(l,s))},onSaveRealTimeApprovals:o=>{e(pa(l,"bill_pay",o))},updateEditRealTimeApproverClicked:o=>{e(ua({isEdit:o,entityId:l,entityType:"bill_pay"}))},approveOrRejectBill:o=>{o.type==="approved"?e(et(l,o.type,"")):e(et(l,o.type,o.description??""))},retryOrRefundBill:o=>{o.type==="retry"?e(xe(l,"retry")):e(xe(l,"refund"))},onAddNewRule:()=>{r("../../bills/approval-rules")},onAttachmentClick:(o,s)=>{const i=Ee(u,o,s),d=D(c.state?.pathnameStackToGoBack,c.pathname);r(i,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{const o=H(t.location.state?.pathnameStackToGoBack),s=o.poppedPathname??ne(u);r(s,{state:{pathnameStackToGoBack:o.newStack}})},onRetryPaymentClick:()=>{const o=D(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}}),e(da({billId:t.billId}))},onRefundPaymentClick:()=>{e(xe(t.billId,"refund"))},saveBillDetails:(o,s,i)=>{o&&e(Ct({data:i,billId:l})),e(_e(o?"paid":"pending_approval",o,s,l))},discardOutsideZeniPaymentData:()=>{e(Bt({billId:l}))}}}))(Vn);function hi(){const e=J(),t=le(),l=K(),{billId:n}=ee(),c=ue(),r=V.getSignedInUser(),u=fe(),o=v((_=>W(_))),s=v((_=>Ue(_,n??""))),i=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Wt(o?.companyId,{clearParams:s.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:m}=Qe({mobileExploreReferrer:"Bill Details"});Ye({isDataReady:s.fetchState==="Completed"});const S=o?.userRole!=null&&It(o?.userRole),h=o?.company==null||o.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!S,[b,C]=g.useState(!1),[I,j]=g.useState(!1),[B,T]=g.useState(!1),{useFeatureGate:k,useDynamicConfig:$}=oe(),{isFeatureEnabled:O}=k(f.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:G}=k(f.isBillPayDetectInsufficientFundsEnabled),{configValue:z}=$(He.zeniAssistConfig),Z=ia(o),w=vt(o.userRole),M=h&&de(u?.loggedInUserRoleMap),L=z.user_ids!=null&&r?.userId!=null&&z.user_ids.includes(r?.userId),{isFeatureEnabled:Y}=k(f.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:q}=k(f.billPaySetupShowInternationalPaymentByWise);if(g.useEffect((()=>{O&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&Z===!1?T(!1):T(s.billActivities[0]?.isRealTimeApprovalEnabled&&(w||M||s.allApprovers.find((_=>_.user.userId===r?.userId))!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))}),[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,w,M,o.isZeni,Z,r]),g.useEffect((()=>{n!=null&&t(kt(n))}),[n]),g.useEffect((()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(C(!0),t(wt(n??"",O,L,!1)))}),[b,s,n,t]),g.useEffect((()=>{I||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(j(!0),t(Re(!1,O,L,q,n)),s.billActivities[0]?.isRealTimeApprovalEnabled===!0&&t(oa()))}),[I,s,n,t,O,L,q]),r==null)throw Error("Can't access address page without signing in...");return s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1?a.jsx(X,{to:`./edit${l.search}`}):s.deleteStatus.fetchState==="In-Progress"||s.cancelAndDeleteStatus.fetchState==="In-Progress"||s.cancelStatus.fetchState==="In-Progress"?a.jsx(se,{fetchState:s.deleteStatus.fetchState,style:{boxShadow:`0px 2px ${A.sp1} ${c.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[a.jsx(Ae,{analytics:E,onLoad:_=>(N=>{n!=null&&N.trackBillPayBillDetails(n,s.isRecurring)})(_)}),a.jsx(bi,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:O,location:l,navigate:e,isRealTimeApprovalEnabled:B,currentTenant:o,billId:n??"",isInternationalPaymentShaVsOurEnabled:Y,hasZeniAssistAccess:L,isDetectInsufficientFundsEnabled:G,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const $e=De.getLocalizedStrings().spendManagement.billPay.billDetails,dt=De.getLocalizedStrings().common,gi={containerWidth:new zt(100,58)},ut=Q((function(e,t){const l=V.getSignedInUser(),n=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:n??""},r=t.showActionButtons,u=r&&t.file==null;return{uploadInvoiceEndPoint:`${Zt.communicationAgentMicroServiceBaseUrl}`,authParams:c,billId:t.billId,file:t.file,showAutofill:t.showAutofill,analytics:E,entityId:t.billId,showTitlebarIcon:r,showTitlebar:r&&t?.file!=null,uploadStatus:t.uploadStatus,shouldNotShowAttachment:u,style:{paddingTop:A.sp10,paddingRight:A.sp3,paddingBottom:"15px",paddingLeft:A.sp5,...t.showAutofill?{}:{backgroundColor:t.backgroundColor,paddingBottom:"128px"}}}}),(function(e,t){const l=V.getSignedInUser();return{onInvoiceUpload:n=>{n!=null&&(t.file!=null||t.billId!=null||t.isInitialEdit?(t.setPayload(n),t.setShowConfirmationPopup(!0)):e(Ne(n,t.isVendorRecommendationEnabled,t.billId)))},updateInvoiceUploadFetchState:n=>{e(Sa({fetchState:{fetchState:n,error:void 0},billId:t.billId}))},onSkipAutofill:n=>{E?.trackBillPaySkipAutofill(),e(Me(n))},onDeleteClick:()=>{e(ga({billId:t.billId})),E?.trackInvoiceActionClick(t.billStage??"","delete",l?.userEmail??"",null)}}}))(_n);function x({appContent:e}){const t=le(),l=J(),{billId:n}=ee(),c=K(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=Ie(),s=ue(),i=V.getSignedInUser(),{useFeatureGate:d,useDynamicConfig:p}=oe(),{isFeatureEnabled:m}=d(f.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:S}=d(f.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:h}=d(f.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(f.billPaySetupShowInternationalPaymentByWise),{configValue:C}=p(He.zeniAssistConfig),I=C.user_ids!=null&&i?.userId!=null&&C.user_ids.includes(i?.userId),j=v((P=>W(P)));di();const[B,T]=g.useState(!1),[k,$]=g.useState(!1),[O,G]=g.useState(!1),[z,Z]=g.useState(),w=v((P=>Ge(P,m,h,n)));let M=w.fetchState,L=w.file,Y=w.showAutofill;const q=v((P=>Ue(P,n??"")));u===!1&&(M=q.fetchState,L=q.transactionDetails?.attachments?.[0],Y=!1);const _=w.billPayInfo!=null&&w.billPayInfo.stage.code==="pending_approval"?w.billPayInfo.billStatus.code:w.billStage;g.useEffect((()=>{n==null&&t(Me(!0))}),[n,t]),g.useEffect((()=>{M==="Not-Started"&&(u&&k?$(!1):!u&&B&&T(!1))}),[n]),g.useEffect((()=>{B||n==null||u||(T(!0),t(wt(n,S,I,!1)),t(Dt(n)),k||($(!0),t(Re(!1,S,I,b,n)))),u&&!k&&($(!0),t(Re(!1,S,I,b,n)))}),[B,k,u,n,t,S,I,b]);const N={onOkClick:()=>{if(G(!1),!z)return;const P=L!=null?"replace":"upload";E?.trackInvoiceActionClick(_??"",P,i?.userEmail??"","yes"),t(ha({replaceBillData:!0,billId:n})),t(Ne(z,m,n))},onCancelClick:()=>{if(G(!1),!z)return;const P=L!=null?"replace":"upload";E?.trackInvoiceActionClick(_??"",P,i?.userEmail??"","no"),t(ba({file:z,billId:n}))}},te=g.useCallback((()=>{const P=H(c.state?.pathnameStackToGoBack),ve=P.poppedPathname??ne(j.tenantEmailDomain);t(Se({billId:n})),l(ve,{state:{pathnameStackToGoBack:P.newStack}})}),[c.state,j.tenantEmailDomain,n,t,l]);if(i==null)throw Error("Can't access address page without signing in...");if(M==="Error"||q.fetchState==="Error")return a.jsx(Be,{});if(M!="Completed")return n==null&&o!=="small"?a.jsx(st,{fallback:te,children:a.jsxs(je,{windowSize:o,children:[a.jsx(mt,{}),a.jsx(Pe,{}),a.jsx(ut,{backgroundColor:s.colors.grey4,billId:n,file:L,showAutofill:!0,uploadStatus:w.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:G,setPayload:Z,showActionButtons:!1,isInitialEdit:!!w.isInitialEdit,billStage:_}),a.jsx(Fe,{windowSize:o,children:a.jsx(rt,{isNewBill:!0})})]})}):a.jsxs(je,{windowSize:o,children:[o==="small"||Y?null:a.jsx(pt,{children:a.jsx(Kt,{onClick:te,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Pe,{}):null,a.jsx($n,{}),a.jsx(Fe,{windowSize:o,children:a.jsx(rt,{isNewBill:n==null})})]});{const P=w.billPayInfo!=null&&w.billPayInfo.stage.code==="pending_approval"?w.billPayInfo.billStatus.code:w.billStage;return a.jsx(st,{fallback:te,children:a.jsxs(je,{windowSize:o,children:[Y&&o!=="small"?a.jsx(mt,{}):null,O?a.jsx(Ln,{titleComponent:a.jsx(wi,{children:$e.overwriteTitle}),descriptionComponent:a.jsx(xi,{children:$e.overwriteDescription}),primaryButtonText:dt.yes,secondaryButtonText:dt.no,action:N,isEditPopup:!0}):null,o==="small"||Y?null:a.jsx(pt,{children:a.jsx(Si,{})}),o!=="small"?a.jsx(Pe,{}):null,a.jsx(ut,{backgroundColor:s.colors.grey4,billId:n,file:L,showAutofill:Y,uploadStatus:w.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:yi(u,q,w),setShowConfirmationPopup:G,setPayload:Z,showActionButtons:fi(u,w),isInitialEdit:!!w.isInitialEdit,billStage:P}),a.jsx(Fe,{windowSize:o,children:e})]})})}}function Si(){const{triggerBack:e}=Gn();return a.jsx(Kt,{onClick:e,"data-testid":"nav-bar-back-click"})}function yi(e,t,l){let n,c;return e?(n=l.recurringConfig?.currentInstance,c=l.recurringConfig?.totalPaymentCycles):(n=t.transactionDetails?.recurringBillInstance,c=t.recurringBillConfigDetail?.totalPaymentCycles),t?.isRecurring===!0?a.jsxs(Ii,{children:[a.jsx(vi,{children:`${$e.recurringBill.recurringCycle}
|
|
2
|
+
${n}/${c}`}),a.jsx(ki,{})]}):void 0}function fi(e,t){const l=t.billActivities?.[0],n=t.billStage==="pending_approval"&&l?.areApprovalsSerialized===!0&&l?.currentPendingStepIndex===0;return e&&(t.billStage==="draft"||n)}const pt=U.div`
|
|
3
3
|
margin-bottom: 20px;
|
|
4
4
|
margin-top: 20px;
|
|
5
5
|
margin-left: ${A.sp5};
|
|
6
6
|
position: absolute;
|
|
7
7
|
display: flex;
|
|
8
8
|
align-items: center;
|
|
9
|
-
`,Ii=
|
|
9
|
+
`,Ii=U.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
justify-content: center;
|
|
12
12
|
align-items: center;
|
|
13
13
|
padding-top: 9px;
|
|
14
14
|
gap: ${A.sp2};
|
|
15
15
|
margin-bottom: -${A.sp2};
|
|
16
|
-
`,vi=
|
|
16
|
+
`,vi=U(qe.StandardMedium)``,ki=U((e=>g.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M3.35001 15L3.35001 10.125C3.35001 6.81129 6.0363 4.125 9.35001 4.125H16.475M16.475 4.125L13.85 1.5M16.475 4.125L13.85 6.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M20.6 9V13.875C20.6 17.1887 17.9137 19.875 14.6 19.875H7.47501M7.47501 19.875L10.1 22.5M7.47501 19.875L10.1 17.25",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))))`
|
|
17
17
|
color: ${e=>e.theme.colors.hero};
|
|
18
18
|
height: ${A.sp3};
|
|
19
19
|
width: ${A.sp3};
|
|
20
|
-
`,Kt=
|
|
20
|
+
`,Kt=U((e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M10 13L5 8L10 3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))))`
|
|
21
21
|
width: ${A.sp3};
|
|
22
22
|
height: ${A.sp3};
|
|
23
23
|
cursor: pointer;
|
|
@@ -25,7 +25,7 @@ import{j as a}from"./liveblocks-BOLtmXrt.js";import{h as J,u as le,g as K,i as e
|
|
|
25
25
|
&:hover {
|
|
26
26
|
color: ${e=>e.theme.colors.primary};
|
|
27
27
|
}
|
|
28
|
-
`,je=
|
|
28
|
+
`,je=U.div`
|
|
29
29
|
display: flex;
|
|
30
30
|
height: 100vh;
|
|
31
31
|
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
@@ -43,7 +43,7 @@ import{j as a}from"./liveblocks-BOLtmXrt.js";import{h as J,u as le,g as K,i as e
|
|
|
43
43
|
z-index: 3;
|
|
44
44
|
display: ${e=>e.windowSize==="small"?"none":"block"};
|
|
45
45
|
}
|
|
46
|
-
`,Pe=
|
|
46
|
+
`,Pe=U.div`
|
|
47
47
|
position: absolute;
|
|
48
48
|
top: 56px;
|
|
49
49
|
left: 0;
|
|
@@ -51,33 +51,33 @@ import{j as a}from"./liveblocks-BOLtmXrt.js";import{h as J,u as le,g as K,i as e
|
|
|
51
51
|
height: 1px;
|
|
52
52
|
background-color: ${e=>e.theme.colors.grey2};
|
|
53
53
|
z-index: 3;
|
|
54
|
-
`,mt=
|
|
54
|
+
`,mt=U.div`
|
|
55
55
|
position: fixed;
|
|
56
56
|
top: 0;
|
|
57
57
|
left: 0;
|
|
58
58
|
right: 0;
|
|
59
59
|
bottom: 0;
|
|
60
|
-
background-color: ${
|
|
60
|
+
background-color: ${Un.overlayBackgroundBlack};
|
|
61
61
|
z-index: 5;
|
|
62
|
-
`,Fe=
|
|
62
|
+
`,Fe=U.div`
|
|
63
63
|
display: flex;
|
|
64
64
|
flex-direction: column;
|
|
65
65
|
width: ${e=>`${gi.containerWidth.value(e.windowSize)}%`};
|
|
66
66
|
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
67
|
-
`,wi=
|
|
67
|
+
`,wi=U(qe.H6Regular)`
|
|
68
68
|
margin-top: ${A.sp7};
|
|
69
69
|
padding-left: ${A.sp8};
|
|
70
70
|
padding-right: ${A.sp8};
|
|
71
71
|
color: ${e=>e.theme.colors.primary};
|
|
72
72
|
word-break: break-word;
|
|
73
|
-
`,xi=
|
|
73
|
+
`,xi=U(qe.LargeRegularSp)`
|
|
74
74
|
color: ${e=>e.theme.colors.hero};
|
|
75
75
|
padding-left: ${A.sp8};
|
|
76
76
|
padding-right: ${A.sp8};
|
|
77
77
|
margin-bottom: 30px;
|
|
78
78
|
margin-top: ${A.sp4};
|
|
79
79
|
white-space: pre-line;
|
|
80
|
-
`,Bi=Q((function(e,t){return{billsReviewView:Et(e),analytics:t.analytics}}),(function(e,t){return{onCloseOverlay:()=>{t.navigate(`/${t.tenantEmailDomain}/bills`),e(ce())},onCloseReviewItem:l=>{e(fa(l))},onProceedForBulkActionClick:(l,n)=>{switch(l){case"send_for_approval":e(ya());break;case"approve":case"review":e(tt("approved",n??""));break;case"reject":e(tt("rejected",n??""))}}}}))(Mn);function Ci({tenantEmailDomain:e}){const t=J(),l=v((c=>c.billsBulkActionViewState.bulkSubmissionFetchState.fetchState)),{billsForReview:n}=v((c=>Et(c)));return g.useEffect((()=>{l!=="Completed"&&n.length!==0||t(`/${e}/bills`)}),[l,n.length,e]),a.jsx(Bi,{navigate:t,analytics:E,tenantEmailDomain:e})}const ae=Ca(),Qt="bulk-operation-update",Le="bill-approval-rule-update",{common:ke}=De.getLocalizedStrings(),Ai=
|
|
80
|
+
`,Bi=Q((function(e,t){return{billsReviewView:Et(e),analytics:t.analytics}}),(function(e,t){return{onCloseOverlay:()=>{t.navigate(`/${t.tenantEmailDomain}/bills`),e(ce())},onCloseReviewItem:l=>{e(fa(l))},onProceedForBulkActionClick:(l,n)=>{switch(l){case"send_for_approval":e(ya());break;case"approve":case"review":e(tt("approved",n??""));break;case"reject":e(tt("rejected",n??""))}}}}))(Mn);function Ci({tenantEmailDomain:e}){const t=J(),l=v((c=>c.billsBulkActionViewState.bulkSubmissionFetchState.fetchState)),{billsForReview:n}=v((c=>Et(c)));return g.useEffect((()=>{l!=="Completed"&&n.length!==0||t(`/${e}/bills`)}),[l,n.length,e]),a.jsx(Bi,{navigate:t,analytics:E,tenantEmailDomain:e})}const ae=Ca(),Qt="bulk-operation-update",Le="bill-approval-rule-update",{common:ke}=De.getLocalizedStrings(),Ai=U.div`
|
|
81
81
|
display: flex;
|
|
82
82
|
min-height: 100%;
|
|
83
83
|
width: 100%;
|
|
@@ -85,11 +85,11 @@ import{j as a}from"./liveblocks-BOLtmXrt.js";import{h as J,u as le,g as K,i as e
|
|
|
85
85
|
flex-direction: column;
|
|
86
86
|
align-items: center;
|
|
87
87
|
background-color: ${e=>e.theme.colors.grey4};
|
|
88
|
-
`,Di=Q((function(e,t){const l=V.getSignedInUser(),n=Ce(l),c=Pt(e,ae,t.isBulkActionEnabled,l?.userId);let r=c.allSubTabs;t.isUserHasOnlyBillpayAccess&&t.roleMap&&c.currentTab==="pending_approval"&&(t.roleMap.bill_pay_analyst?r=r.filter((b=>b==="all"||b==="overdue"||b==="rejected"||b==="deleted")):t.roleMap.bill_pay_approver&&(r=r.filter((b=>b==="all"||b==="awaiting_my_approval"||b==="overdue"||b==="rejected"||b==="deleted")))),t.isShowDeletedBillsEnabled===!1&&(r=r.filter((b=>b!=="deleted")));const u=e.entityAutoCompleteState.autoCompleteText.common,o=
|
|
88
|
+
`,Di=Q((function(e,t){const l=V.getSignedInUser(),n=Ce(l),c=Pt(e,ae,t.isBulkActionEnabled,l?.userId);let r=c.allSubTabs;t.isUserHasOnlyBillpayAccess&&t.roleMap&&c.currentTab==="pending_approval"&&(t.roleMap.bill_pay_analyst?r=r.filter((b=>b==="all"||b==="overdue"||b==="rejected"||b==="deleted")):t.roleMap.bill_pay_approver&&(r=r.filter((b=>b==="all"||b==="awaiting_my_approval"||b==="overdue"||b==="rejected"||b==="deleted")))),t.isShowDeletedBillsEnabled===!1&&(r=r.filter((b=>b!=="deleted")));const u=e.entityAutoCompleteState.autoCompleteText.common,o=ze(e,"common"),s=e.tenantState.currentTenantId,i=W(e),d=i?.companyName??"",p={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""},m=e.billListState.downloadUIState.downloadState,S=c.fetchState,h=Aa(e);return{transactionList:t.isShowDeletedBillsEnabled?c.transactions:c.transactions.filter((b=>b.isDeleted===!1)),currentTab:c.currentTab,currentSubTab:c.currentSubTab,approvalCount:c.approvalCount,allSubTabs:r,fetchState:S,analytics:E,botEmail:c.billPayBotEmail,searchText:c.searchText,filters:c.filters,vendorSearchAutoCompleteData:{autoCompleteText:u,entityAutoCompleteView:o},downloadParams:{authParams:p,companyName:d,timePeriod:ae,spendManagementEndPoint:`${We}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:m,isBulkActionAllowed:c.billListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:c.billListBulkActionInfo?.billsSelectedForBulkAction,allowedBulkActions:c.billListBulkActionInfo?.allowedBulkActions,isZeniUser:n,billPayApprovalRulesAffectedEntityIds:h.affectedEntityIds}}),(function(e,t){const{navigate:l,currentTenant:n,location:c,period:r}=t,{tenantEmailDomain:u}=n;return{updateTabToState:o=>{e(ce()),e(Tt(o))},onSubtabChange:o=>{e(ce()),e(jt(o))},onTransactionClick:(o,s)=>{const i=Ee(u,o,s),d=D(c.state?.pathnameStackToGoBack,c.pathname);l(i,{state:{pathnameStackToGoBack:d}})},onClickSetupIcon:()=>{const o=Ti(u),s=D(c.state?.pathnameStackToGoBack,c.pathname);l(o,{state:{pathnameStackToGoBack:s}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;E?.trackBillPayNewBill();const s=`/${o}/bill/new`,i=D(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(s,{state:{pathnameStackToGoBack:i}})},onSearchTextChanged:o=>{e($a(o))},onReloadTransactions:()=>{e(Ve(r,!0,t.isShowDeletedBillsEnabled,t.isInternationalWireEnabled)),e(Va(n.companyId,!0))},onNavigateToSettings:()=>{l("../bills/setup")},onBackClick:()=>{l("../",{relative:"path"})},onFiltersChange:o=>{e(Ra({filters:o})),o.categories.every((s=>s.field!=null&&s.values?.length!==0))&&E.trackSpendManagmentFilterChange("bill_pay",o.categories.map((s=>`${s.field}-${JSON.stringify(s.values)}`)))},updateDownloadStateHandler:o=>{o==="In-Progress"&&E.trackSpendManagementDownloadClick("bill_pay"),e(Fa({uiState:{downloadState:o}}))},updateBulkActionList:o=>{e(Pa(o))},removeAllTransactionsFromBulkActionList:()=>{e(ce())},onProceedForBulkActionClick:(o,s)=>{switch(o){case"delete":case"cancel":e(ja(o,s??""));break;case"send_for_approval":e(at("send_for_approval")),t.navigate("./bulk-review");break;case"approve":e(at("approve")),t.navigate("./bulk-review");break;case"review":e(Ta()),t.navigate("./bulk-review")}},onBillPayApprovalRulesEventReceived:o=>{o.endsWith(Le)&&e(Ea(!1))},onEventReceived:o=>{o===Qt&&e(Da())},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:o=>{o.trim().length>=2?e(Ze({searchString:o,entityType:"vendor",searchOrigin:"common"})):o.trim().length===0&&e(ie("common"))},onCancelAutoComplete:()=>{e(ie("common"))}}}}))(On(zn));function Ei(){const e=J(),t=le(),l=K(),n=Ie(),c=l.state,r=fe(),[u,o]=g.useState(!1),[s,i]=g.useState(null),d=aa("/:tenantEmailDomain/bills/bulk-review")!=null;g.useEffect((()=>(c?.tab!=null&&c?.subTab!=null&&(t(Tt(c?.tab)),t(jt(c?.subTab))),()=>{t(ce())})),[]);const p=V.getSignedInUser(),m=v((F=>W(F))),{areTenantIdsInSync:S}=Nn(),[h,b]=g.useState(!1),{useFeatureGate:C}=oe(),{isFeatureEnabled:I}=C(f.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:j}=C(f.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:B}=C(f.isBillPayBulkActionEnabled),{isFeatureEnabled:T}=C(f.billPaySetupShowInternationalPaymentByWise),{isFeatureEnabled:k}=C(f.isBillPayDetectInsufficientFundsEnabled),$=v((F=>Pt(F,ae,B,p?.userId))),{isFeatureEnabled:O}=C(f.isDebitCardFeatureEnabled),G=$.fetchState,{isAiCfoAccessEnabled:z,onAskAiCfoClick:Z}=Qe({mobileExploreReferrer:"Bills List"});Ye({isDataReady:G==="Completed"});const w=!!m.companyBillPayInfo?.info?.isBillPayTOSAccepted,M=!!m.companyBillPayInfo?.info?.isBillPayEnabled,L=v((F=>Ia(F.companyState,m.companyId))),Y=L?.company.featuresActivationInfo.connectedAccountProvider;if(g.useEffect((()=>{!h&&M&&S&&(b(!0),t(Ve(ae,!0,I,T)))}),[h,ae,S,t]),p==null)throw Error("Can't access address page without signing in...");const q=(F,re)=>{t(Ba({uiState:{sortKey:F,sortOrder:re},period:ae}))},_=Ft(r?.loggedInUserRoleMap),N=de(r?.loggedInUserRoleMap),te=F=>{o(F)},{billsProcessed:P,billsProcessing:ve}=v((F=>va(F)));g.useEffect((()=>{P===ve&&s!=null&&(t(ka({messageSection:"bill_pay_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_bill_",variableValue:P>1?ke.headers.bills:ke.texts.bill2},{variableName:"_has_",variableValue:P>1?ke.texts.have:ke.texts.has},{variableName:"_action_",variableValue:wa(s)}]})),t(xa()),setTimeout((()=>{t(Ve(ae,!0,I,!0,T))}),3e3),i(null))}),[P,ve]);const Xt={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${Qt}`,`private-encrypted-${m.companyId}.${Le}`]:[],eventCallback:(F,re,Xe)=>{F.endsWith(Le)?Xe.onBillPayApprovalRulesEventReceived?.(F):re?.entity_type==="bill"&&(i(re.operation_type),Xe.onEventReceived(F))}},ea=Rt(O,m),ta=Vt(m);return l.pathname.endsWith("/bills/")||l.pathname.endsWith("/bills")||l.pathname.endsWith("/bills/bulk-review")?ea===!0||ta===!0?a.jsx(Jt,{}):M?a.jsxs(a.Fragment,{children:[G==="Completed"?a.jsx(Ae,{analytics:E,onLoad:F=>(re=>re.trackPageLoaded(Yt.Event.billPayHome))(F)}):null,a.jsxs(Ai,{windowSize:n,children:[a.jsx(qt,{isAppContentDrawerOpen:u,handleDrawerToggle:te}),a.jsx(ui,{isOpen:d,drawerLeftMargin:new zt(0,0,300,600),onClose:()=>{e(`/${m.tenantEmailDomain}/bills`),t(ce())},children:a.jsx(ji,{onClick:F=>F.stopPropagation(),children:a.jsx(Ci,{tenantEmailDomain:m.tenantEmailDomain})})}),a.jsx(Di,{location:l,navigate:e,currentTenant:m,entity:"bill_pay",period:ae,isAdmin:!1,uiState:$.uiState,onColumnSortConfigChanged:q,isUserHasOnlyBillpayAccess:_,isShowDeletedBillsEnabled:I,isShowDeletedReimbursementEnabled:j,isBulkActionEnabled:B,roleMap:r?.loggedInUserRoleMap,onClickMenuIcon:()=>{te(!0)},isDownloadEnabled:$.isDownloadEnabled,connectedAccountProvider:Y,bulkSubmissionLimit:$.billBulkSubmissionLimit,bulkSubmissionFetchState:$.billListBulkActionInfo.bulkSubmissionFetchState,isRecurringBillInBulkActionList:$.billListBulkActionInfo.isRecurringBillInBulkActionList,isInternationalWireEnabled:T,isDetectInsufficientFundsEnabled:k,isAiCfoAccessEnabled:z,onAskAiCfoClick:Z,...Xt})]})]}):w===!0&&N===!0?a.jsx(X,{to:"../setup"}):r!=null&&Oe(m,r.loggedInUserRoleMap)?a.jsx(X,{to:"../promo"}):a.jsx(se,{fetchState:G}):a.jsx(Be,{})}const Ti=e=>`/${e}/bills/setup`,ji=U(li)`
|
|
89
89
|
display: flex;
|
|
90
90
|
min-height: 100%;
|
|
91
91
|
flex-direction: column;
|
|
92
|
-
`,{common:{currency:he},spendManagement:{billPay:{billDetails:Pi}},appName:Fi}=De.getLocalizedStrings(),Ri=Q((function(e,t){const l=V.getSignedInUser(),n=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:n??""},r=H(t.location.state?.pathnameStackToGoBack);let u=!0;r.poppedPathname?.includes("bills")===!0&&(u=!1);const o=e.entityAutoCompleteState.autoCompleteText.common,s=Ye(e,"common");let i=`${l?.firstName} ${l?.lastName}`;const d=Ce(l);t.billId!=null&&t.billDetailsView!=null&&(i=`${t.billDetailsView.createdBy?.firstName??Fi} ${t.billDetailsView.createdBy?.lastName??""}`),d||!t.billDetailsView.createdBy?.email?.includes("zeni.ai")||(i="Zeni");const p=t.billDetailsView.editBillInitialDetails?.totalAmount?.amount,m=Ua(t.billDetailsView.paymentDetailsSection?.paymentType?.method),S=t.currentTenant.createTime,h=Gt(),b=t.sameDayAchDisablementConfig.newTenantTenureLimitMonths,C=S.add(b,"month").isAfter(h),I=!!(t.billDetailsView.billStage==="draft"&&m&&p!=null&&p>0)&&!Ut(p,t.billDetailsView.approvalRules.allApprovalRules,l,t.billDetailsView.vendor?.id,t.billDetailsView.classId),j=W(e);return{billDetails:t.billDetailsView,isAccountingClassesEnabled:xt(e),billId:t.billId,createdBy:i,createTime:t.billDetailsView?.createTime,authParams:c,transactionAttachmentEndpoint:`${We}/transaction_attachment`,analytics:E,showBackButton:u,isAdmin:t.isBillPayAdmin,isSuperAdmin:t.isSuperAdmin,connectedAccountProvider:j.company?.featuresActivationInfo.connectedAccountProvider??"",customerSearchAutoCompleteData:{autoCompleteText:o,entityAutoCompleteView:s},showMarkAsPaidInfo:I,isZeniUser:d,isNewUser:C,sameDayAchDisablementConfig:t.sameDayAchDisablementConfig}}),(function(e,t){const{billId:l,companyId:n,currentTenant:c,location:r,navigate:u,billDetailsView:o}=t,{tenantEmailDomain:s}=c;return{editVendor:i=>{e(nt(i));const d=ht(s,i,l),p=D(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})},chooseNewVendor:i=>{const d=i??t.billDetailsView.addBillAutoFields.tentativeVendorName;d!=null&&e(Mt(d,!1)),e(Nt({localData:{vendorName:i??t.billDetailsView.addBillAutoFields.tentativeVendorName}})),e(nt());const p=ht(s,void 0,l),m=D(r.state?.pathnameStackToGoBack,r.pathname);u(p,{state:{pathnameStackToGoBack:m}})},onInvoiceUpload:i=>{i!=null&&e(Ne(i,t.isVendorRecommendationEnabled))},updateShowAutofill:i=>{e(Me(i))},onSaveChangesToLocalStore:(i,d,p,m,S)=>{const h=Gi(t.billDetailsView,{...i,paymentDetails:{...i?.paymentDetails,paymentDate:S}},p,d,t.isInternationalPaymentShaVsOurEnabled,m,t.vendor);e(Wa({billDetailLocalData:h,billId:l}))},saveBillDetails:()=>{e(Ue("draft",!1,!1,l)),e(ie("common"))},updateBillDetailSaveBillCode:()=>{e(_t("draft"))},reviewBillDetails:()=>{const i=Vi(s,l),d=D(r.state?.pathnameStackToGoBack,r.pathname);u(i,{state:{pathnameStackToGoBack:d,message:"coming_from_edit_page"}})},discardBillDetailsFromLocalStore:({billId:i})=>{e(Se({billId:i}))},clearBillPayReviewLocalState:()=>e(Ha()),onClickDismiss:()=>{const i=ne(s),d=D(r.state?.pathnameStackToGoBack,r.pathname);u(i,{state:{pathnameStackToGoBack:d}})},onClickDiscard:()=>{const i=ne(s),d=D(r.state?.pathnameStackToGoBack,r.pathname);u(i,{state:{pathnameStackToGoBack:d}})},setBillDetailPageMode:i=>{if(i==="edit_bill"){let d=window.location.pathname;d=d.concat("/edit");const p=D(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})}},redirectToACHScreen:i=>{e(ge(!1,i));const d=$i(s,i,l),p=D(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})},redirectToWireScreen:i=>{e(ge(!1,i));const d=Li(s,i,l),p=D(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})},redirectToInternationalScreen:i=>{e(ge(!1,i));const d=Ht(s,l,i),p=D(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})},redirectToBillsScreen:()=>{const i=ne(s),d=D(r.state?.pathnameStackToGoBack,r.pathname);e(Se({})),u(i,{state:{pathnameStackToGoBack:d}})},redirectToBillDetailPage:()=>{t.navigate("../")},deleteBill:()=>{l!=null&&e(At(l))},onAttachmentClick:(i,d)=>{const p=Ee(s,i,d);window.open(`${p}`,"_blank")},onBackClick:()=>{const i=H(t.location.state?.pathnameStackToGoBack),d=i.poppedPathname??ne(s);u(d,{state:{pathnameStackToGoBack:i.newStack}})},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,d)=>{i.trim().length>=2?e(ze({searchString:i,entityType:d,searchOrigin:"common"})):i.trim().length===0&&e(ie("common"))},onCancelAutoComplete:()=>{e(ie("common"))}},addVendorContactEmail(i,d){e(Za(i,d,l))},onWiseVerifyClick:()=>{let i="";i=Wn()?"https://sandbox.transferwise.tech":"https://wise.com";const d=`${i}/login`;window.open(d,"_blank")},onVendorSelected:i=>{e(za(!0,i,l))},onInternationalWireVerifyClick:()=>{window.open(`/${s}/bills/international-wire`)},onFetchLinkTokenClick:(i,d)=>{e(Ya("bill_pay_detail",i,d))},onEstablishConnectionClick:i=>{e(Oa(i,n,"bill_pay_detail","bill_pay"))},onUpdatePaymentAccountStatus:(i,d,p)=>{e(Na(i,d,"bill_pay","bill_pay_detail",p))},onEstablishConnectionSuccess:()=>{e(_a("bill_pay","bill_pay_detail")),e(Ma({billId:l,withdrawFromAccountId:o.newAddedBillPaymentAccountId,withdrawFromList:o.withdrawFromList}))}}}))(zn);function bt(){const e=J(),t=K(),l=le(),{billId:n,tenantEmailDomain:c}=ee(),{useFeatureGate:r,useDynamicConfig:u}=oe(),{isFeatureEnabled:o,isFeatureGateLoading:s}=r(f.isVendorMagicLinkFeatureEnabled),{isFeatureEnabled:i}=r(f.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:d}=r(f.isBillPayLocalCurrencyFeatureEnabled),{isFeatureEnabled:p}=r(f.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:m}=r(f.isRecurringBillsFeatureEnabled),{isFeatureEnabled:S}=r(f.isDepositAccountsFeatureEnabled),{isFeatureEnabled:h}=r(f.isShaDisabled),{isFeatureEnabled:b}=r(f.isOurDisabled),{isFeatureEnabled:C}=r(f.isBillPayDetectInsufficientFundsEnabled),{configValue:I}=u(He.sameDayAchDisablementConfig),j=La(I),B=V.getSignedInUser(),T=v((N=>W(N))),k=v((N=>_e(N,p,S,n))),$=Wt(T?.companyId,{clearParams:k.fetchState==="Completed"}),{isAiCfoAccessEnabled:O,onAskAiCfoClick:_}=Qe({mobileExploreReferrer:"Bill Details"});Ze({isDataReady:k.fetchState==="Completed"});const Y=T.companyId??V.getSignedInUserTenant(c)?.companyId,z=fe(),w=$t(z?.loggedInUserRoleMap),M=Lt(z?.loggedInUserRoleMap),L=de(z?.loggedInUserRoleMap),Z=vt(T.userRole);if(g.useEffect((()=>{n!=null&&l(kt(n))}),[n]),g.useEffect((()=>{n!=null&&l(Dt(n))}),[n,l]),B==null)throw Error("Can't access address page without signing in...");const q=v((N=>Ga(N.accountState,N.accountListState,"billPayAccountList"))),U={pathname:"../",search:t.search};return k.isDeleted===!0||k.billStage=="paid"||k.fetchState=="Not-Started"?a.jsx(X,{to:U}):k.deleteStatus.fetchState==="In-Progress"||s?a.jsx(se,{fetchState:k.deleteStatus.fetchState}):a.jsxs(a.Fragment,{children:[a.jsx(Ae,{analytics:E,onLoad:N=>(te=>{n!=null&&k.deleteStatus.fetchState!=="Completed"&&te.trackBillPayEditBill(n,k.isRecurring)})(N)}),a.jsx(Ri,{initialOpenThreadRequest:$??void 0,location:t,navigate:e,currentTenant:T,billId:n,companyId:Y,billDetailsView:k,isMagicLinkEnabled:o,isVendorRecommendationEnabled:p,isLocalCurrencyEnabled:d,uncategorizedAccounts:q,isInternationalPaymentShaVsOurEnabled:i,vendor:k.vendor,isShaDisabled:h,isOurDisabled:b,isRecurringBillsFeatureEnabled:m,hasZeniAccountsAdminAccess:w,isZeniAccountsUser:M,isBillPayAdmin:L,isSuperAdmin:Z,isDetectInsufficientFundsEnabled:C,sameDayAchDisablementConfig:j,isAiCfoAccessEnabled:O,onAskAiCfoClick:_})]})}const ht=(e,t,l)=>{let n=`/${e}/bill/`;return l==null?n=t!=null?n.concat(`new/vendor/${encodeURIComponent(t)}/edit`):n.concat("new/vendor/create"):(n=n.concat(`${encodeURIComponent(l)}/edit/vendor/`),n=t!=null?n.concat(`${encodeURIComponent(t)}/edit`):n.concat("create")),n},Vi=(e,t)=>{let l=`/${e}/bill/`;return l=t===void 0?l.concat("new/review"):l.concat(`${t}/edit/review`),l},$i=(e,t,l)=>{let n=`/${e}/bill/`;return n=l!=null?n.concat(`${encodeURIComponent(l)}/edit/`):n.concat("new/"),n=n.concat(`vendor/${encodeURIComponent(t)}/edit/ach`),n},Li=(e,t,l)=>{let n=`/${e}/bill/`;return n=l!=null?n.concat(`${encodeURIComponent(l)}/edit/`):n.concat("new/"),n=n.concat(`vendor/${encodeURIComponent(t)}/edit/domestic`),n},R="paymentDetails",Gi=(e,t,l,n,c,r,u)=>{const o={invoiceNumber:t.whatFor.invoiceNumber,memo:t.whatFor.memo,invoiceDate:t.whatFor.invoiceDate?pe(t.whatFor.invoiceDate.toString()):Gt(),billDueDate:t.whatFor.billDueDate?pe(t.whatFor.billDueDate.toString()):void 0,currencyCode:t.whatFor.currency,recipientCurrencyCode:t.whatFor.recipientCurrency,isInvoiceDateAutoUpdated:t.whatFor.isInvoiceDateAutoUpdated},s={paymentDate:t[R]?.paymentDate?pe(t[R].paymentDate.toString()):void 0,paymentType:t[R]?.paymentType!=null?t[R]?.paymentType:void 0,paymentTo:r?.id,withdrawFrom:e.withdrawFromList.find((b=>b.id===t[R]?.withdrawFrom?.selectedOption)),internationalTransferFeeBearerPaymentMethod:t[R]?.paymentType?.method!=null&&t[R].paymentType.method.includes(qa)&&u?.vendorCurrencyCode===he.currencyCode&&c?t[R]?.internationalTransferFeeBearerPaymentMethod:void 0,conversionRate:e.paymentDetailsSection?.conversionRate},i=r?.type==="Contact"?r?.email:void 0,d=!!i,p=t[R]?.recurringPaymentType?.selectedOption===Pi.recurringBill.paymentTypeOptions[1],m={isActive:e.recurringConfig?.isActive??!1,currentInstance:e.recurringConfig?.currentInstance,isApprovalRequired:t[R]?.recurringPaymentDetails?.requireApproval?.selectedOption==="all",frequency:Ja(t[R]?.recurringPaymentDetails?.frequency?.selectedOption),endDate:t[R]?.recurringPaymentDetails?.endDateSelector?.date!=null?pe(t[R]?.recurringPaymentDetails?.endDateSelector.date.toString()):void 0,startDate:t[R]?.recurringPaymentDetails?.startDate?pe(t[R]?.recurringPaymentDetails?.startDate.toString()):void 0,endDateSelectorOptionType:t[R]?.recurringPaymentDetails?.endDateSelector?.type,totalPaymentCycles:t[R]?.recurringPaymentDetails?.endDateSelector?.recurringCount??0,updateRecurringBills:t[R]?.recurringPaymentDetails?.updateRecurringBills},S=Ui(e.accountList.accounts,e.classList.classes,e.lineDetailSection,t.lineItems,n,l),h=Object.keys(S).length>0?Zn(S):e.editBillInitialDetails?.recipientTotalAmount;return{showVendorGptRecommendationText:e.showVendorGptRecommendationText,vendor:u,whatForSection:o,paymentDetailsSection:s,isCancelled:e.isCancelled,totalAmount:h,recipientTotalAmount:h,file:e.file,updatesByLineId:S,toAccountVendorEmail:i,isCollectToAccountInfoFromVendorContact:d,isRecurring:p,recurringConfig:m}},Ui=(e,t,l,n,c,r)=>{const u={};return n.forEach((o=>{let s,i;o.account.selectedOption!=null&&(s=e.find((p=>p.qboId===o.account.selectedOption||p.accountId===o.account.selectedOption))),o.class?.selectedOption!=null&&(i=t.find((p=>p.classId===o.class.selectedOption)));const d=Hn(l[o.lineId],o,c,r);u[o.lineId]={...l[o.lineId],...o,platformLineDetailType:l[o.lineId]?.platformLineDetailType??"account_based_expense_line_detail",amount:{amount:o.amount??0,currencyCode:o.currency?.currencyCode??he.currencyCode,currencySymbol:o.currency?.currencySymbol??he.currencySymbol},recipientAmount:{amount:o.recipientAmount??0,currencyCode:o.recipientCurrency?.currencyCode??he.currencyCode,currencySymbol:o.recipientCurrency?.currencySymbol??he.currencySymbol},id:o.lineId,lineDescription:o.lineDescription??"",account:s,class:i,billable:o.billable?.selectedOption??"not_billable",customer:{id:d?.id??"",name:d?.name??"",qboId:d?.qboId,logo:d?.logo},type:"journal_entry_transaction_line",isCategoryMiscategorized:!1,isClassMiscategorized:!1}})),u},_i=G.div`
|
|
92
|
+
`,{common:{currency:he},spendManagement:{billPay:{billDetails:Pi}},appName:Fi}=De.getLocalizedStrings(),Ri=Q((function(e,t){const l=V.getSignedInUser(),n=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:n??""},r=H(t.location.state?.pathnameStackToGoBack);let u=!0;r.poppedPathname?.includes("bills")===!0&&(u=!1);const o=e.entityAutoCompleteState.autoCompleteText.common,s=ze(e,"common");let i=`${l?.firstName} ${l?.lastName}`;const d=Ce(l);t.billId!=null&&t.billDetailsView!=null&&(i=`${t.billDetailsView.createdBy?.firstName??Fi} ${t.billDetailsView.createdBy?.lastName??""}`),d||!t.billDetailsView.createdBy?.email?.includes("zeni.ai")||(i="Zeni");const p=t.billDetailsView.editBillInitialDetails?.totalAmount?.amount,m=_a(t.billDetailsView.paymentDetailsSection?.paymentType?.method),S=t.currentTenant.createTime,h=Ut(),b=t.sameDayAchDisablementConfig.newTenantTenureLimitMonths,C=S.add(b,"month").isAfter(h),I=!!(t.billDetailsView.billStage==="draft"&&m&&p!=null&&p>0)&&!_t(p,t.billDetailsView.approvalRules.allApprovalRules,l,t.billDetailsView.vendor?.id,t.billDetailsView.classId),j=W(e);return{billDetails:t.billDetailsView,isAccountingClassesEnabled:xt(e),billId:t.billId,createdBy:i,createTime:t.billDetailsView?.createTime,authParams:c,transactionAttachmentEndpoint:`${We}/transaction_attachment`,analytics:E,showBackButton:u,isAdmin:t.isBillPayAdmin,isSuperAdmin:t.isSuperAdmin,connectedAccountProvider:j.company?.featuresActivationInfo.connectedAccountProvider??"",customerSearchAutoCompleteData:{autoCompleteText:o,entityAutoCompleteView:s},showMarkAsPaidInfo:I,isZeniUser:d,isNewUser:C,sameDayAchDisablementConfig:t.sameDayAchDisablementConfig}}),(function(e,t){const{billId:l,companyId:n,currentTenant:c,location:r,navigate:u,billDetailsView:o}=t,{tenantEmailDomain:s}=c;return{editVendor:i=>{e(nt(i));const d=ht(s,i,l),p=D(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})},chooseNewVendor:i=>{const d=i??t.billDetailsView.addBillAutoFields.tentativeVendorName;d!=null&&e(Mt(d,!1)),e(Nt({localData:{vendorName:i??t.billDetailsView.addBillAutoFields.tentativeVendorName}})),e(nt());const p=ht(s,void 0,l),m=D(r.state?.pathnameStackToGoBack,r.pathname);u(p,{state:{pathnameStackToGoBack:m}})},onInvoiceUpload:i=>{i!=null&&e(Ne(i,t.isVendorRecommendationEnabled))},updateShowAutofill:i=>{e(Me(i))},onSaveChangesToLocalStore:(i,d,p,m,S)=>{const h=Ui(t.billDetailsView,{...i,paymentDetails:{...i?.paymentDetails,paymentDate:S}},p,d,t.isInternationalPaymentShaVsOurEnabled,m,t.vendor);e(Wa({billDetailLocalData:h,billId:l}))},saveBillDetails:()=>{e(_e("draft",!1,!1,l)),e(ie("common"))},updateBillDetailSaveBillCode:()=>{e(Gt("draft"))},reviewBillDetails:()=>{const i=Vi(s,l),d=D(r.state?.pathnameStackToGoBack,r.pathname);u(i,{state:{pathnameStackToGoBack:d,message:"coming_from_edit_page"}})},discardBillDetailsFromLocalStore:({billId:i})=>{e(Se({billId:i}))},clearBillPayReviewLocalState:()=>e(Ha()),onClickDismiss:()=>{const i=ne(s),d=D(r.state?.pathnameStackToGoBack,r.pathname);u(i,{state:{pathnameStackToGoBack:d}})},onClickDiscard:()=>{const i=ne(s),d=D(r.state?.pathnameStackToGoBack,r.pathname);u(i,{state:{pathnameStackToGoBack:d}})},setBillDetailPageMode:i=>{if(i==="edit_bill"){let d=window.location.pathname;d=d.concat("/edit");const p=D(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})}},redirectToACHScreen:i=>{e(ge(!1,i));const d=$i(s,i,l),p=D(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})},redirectToWireScreen:i=>{e(ge(!1,i));const d=Li(s,i,l),p=D(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})},redirectToInternationalScreen:i=>{e(ge(!1,i));const d=Ht(s,l,i),p=D(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})},redirectToBillsScreen:()=>{const i=ne(s),d=D(r.state?.pathnameStackToGoBack,r.pathname);e(Se({})),u(i,{state:{pathnameStackToGoBack:d}})},redirectToBillDetailPage:()=>{t.navigate("../")},deleteBill:()=>{l!=null&&e(At(l))},onAttachmentClick:(i,d)=>{const p=Ee(s,i,d);window.open(`${p}`,"_blank")},onBackClick:()=>{const i=H(t.location.state?.pathnameStackToGoBack),d=i.poppedPathname??ne(s);u(d,{state:{pathnameStackToGoBack:i.newStack}})},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,d)=>{i.trim().length>=2?e(Ze({searchString:i,entityType:d,searchOrigin:"common"})):i.trim().length===0&&e(ie("common"))},onCancelAutoComplete:()=>{e(ie("common"))}},addVendorContactEmail(i,d){e(Ya(i,d,l))},onWiseVerifyClick:()=>{let i="";i=Wn()?"https://sandbox.transferwise.tech":"https://wise.com";const d=`${i}/login`;window.open(d,"_blank")},onVendorSelected:i=>{e(Za(!0,i,l))},onInternationalWireVerifyClick:()=>{window.open(`/${s}/bills/international-wire`)},onFetchLinkTokenClick:(i,d)=>{e(za("bill_pay_detail",i,d))},onEstablishConnectionClick:i=>{e(Oa(i,n,"bill_pay_detail","bill_pay"))},onUpdatePaymentAccountStatus:(i,d,p)=>{e(Na(i,d,"bill_pay","bill_pay_detail",p))},onEstablishConnectionSuccess:()=>{e(Ga("bill_pay","bill_pay_detail")),e(Ma({billId:l,withdrawFromAccountId:o.newAddedBillPaymentAccountId,withdrawFromList:o.withdrawFromList}))}}}))(Zn);function bt(){const e=J(),t=K(),l=le(),{billId:n,tenantEmailDomain:c}=ee(),{useFeatureGate:r,useDynamicConfig:u}=oe(),{isFeatureEnabled:o,isFeatureGateLoading:s}=r(f.isVendorMagicLinkFeatureEnabled),{isFeatureEnabled:i}=r(f.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:d}=r(f.isBillPayLocalCurrencyFeatureEnabled),{isFeatureEnabled:p}=r(f.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:m}=r(f.isRecurringBillsFeatureEnabled),{isFeatureEnabled:S}=r(f.isDepositAccountsFeatureEnabled),{isFeatureEnabled:h}=r(f.isShaDisabled),{isFeatureEnabled:b}=r(f.isOurDisabled),{isFeatureEnabled:C}=r(f.isBillPayDetectInsufficientFundsEnabled),{configValue:I}=u(He.sameDayAchDisablementConfig),j=La(I),B=V.getSignedInUser(),T=v((N=>W(N))),k=v((N=>Ge(N,p,S,n))),$=Wt(T?.companyId,{clearParams:k.fetchState==="Completed"}),{isAiCfoAccessEnabled:O,onAskAiCfoClick:G}=Qe({mobileExploreReferrer:"Bill Details"});Ye({isDataReady:k.fetchState==="Completed"});const z=T.companyId??V.getSignedInUserTenant(c)?.companyId,Z=fe(),w=$t(Z?.loggedInUserRoleMap),M=Lt(Z?.loggedInUserRoleMap),L=de(Z?.loggedInUserRoleMap),Y=vt(T.userRole);if(g.useEffect((()=>{n!=null&&l(kt(n))}),[n]),g.useEffect((()=>{n!=null&&l(Dt(n))}),[n,l]),B==null)throw Error("Can't access address page without signing in...");const q=v((N=>Ua(N.accountState,N.accountListState,"billPayAccountList"))),_={pathname:"../",search:t.search};return k.isDeleted===!0||k.billStage=="paid"||k.fetchState=="Not-Started"?a.jsx(X,{to:_}):k.deleteStatus.fetchState==="In-Progress"||s?a.jsx(se,{fetchState:k.deleteStatus.fetchState}):a.jsxs(a.Fragment,{children:[a.jsx(Ae,{analytics:E,onLoad:N=>(te=>{n!=null&&k.deleteStatus.fetchState!=="Completed"&&te.trackBillPayEditBill(n,k.isRecurring)})(N)}),a.jsx(Ri,{initialOpenThreadRequest:$??void 0,location:t,navigate:e,currentTenant:T,billId:n,companyId:z,billDetailsView:k,isMagicLinkEnabled:o,isVendorRecommendationEnabled:p,isLocalCurrencyEnabled:d,uncategorizedAccounts:q,isInternationalPaymentShaVsOurEnabled:i,vendor:k.vendor,isShaDisabled:h,isOurDisabled:b,isRecurringBillsFeatureEnabled:m,hasZeniAccountsAdminAccess:w,isZeniAccountsUser:M,isBillPayAdmin:L,isSuperAdmin:Y,isDetectInsufficientFundsEnabled:C,sameDayAchDisablementConfig:j,isAiCfoAccessEnabled:O,onAskAiCfoClick:G})]})}const ht=(e,t,l)=>{let n=`/${e}/bill/`;return l==null?n=t!=null?n.concat(`new/vendor/${encodeURIComponent(t)}/edit`):n.concat("new/vendor/create"):(n=n.concat(`${encodeURIComponent(l)}/edit/vendor/`),n=t!=null?n.concat(`${encodeURIComponent(t)}/edit`):n.concat("create")),n},Vi=(e,t)=>{let l=`/${e}/bill/`;return l=t===void 0?l.concat("new/review"):l.concat(`${t}/edit/review`),l},$i=(e,t,l)=>{let n=`/${e}/bill/`;return n=l!=null?n.concat(`${encodeURIComponent(l)}/edit/`):n.concat("new/"),n=n.concat(`vendor/${encodeURIComponent(t)}/edit/ach`),n},Li=(e,t,l)=>{let n=`/${e}/bill/`;return n=l!=null?n.concat(`${encodeURIComponent(l)}/edit/`):n.concat("new/"),n=n.concat(`vendor/${encodeURIComponent(t)}/edit/domestic`),n},R="paymentDetails",Ui=(e,t,l,n,c,r,u)=>{const o={invoiceNumber:t.whatFor.invoiceNumber,memo:t.whatFor.memo,invoiceDate:t.whatFor.invoiceDate?pe(t.whatFor.invoiceDate.toString()):Ut(),billDueDate:t.whatFor.billDueDate?pe(t.whatFor.billDueDate.toString()):void 0,currencyCode:t.whatFor.currency,recipientCurrencyCode:t.whatFor.recipientCurrency,isInvoiceDateAutoUpdated:t.whatFor.isInvoiceDateAutoUpdated},s={paymentDate:t[R]?.paymentDate?pe(t[R].paymentDate.toString()):void 0,paymentType:t[R]?.paymentType!=null?t[R]?.paymentType:void 0,paymentTo:r?.id,withdrawFrom:e.withdrawFromList.find((b=>b.id===t[R]?.withdrawFrom?.selectedOption)),internationalTransferFeeBearerPaymentMethod:t[R]?.paymentType?.method!=null&&t[R].paymentType.method.includes(qa)&&u?.vendorCurrencyCode===he.currencyCode&&c?t[R]?.internationalTransferFeeBearerPaymentMethod:void 0,conversionRate:e.paymentDetailsSection?.conversionRate},i=r?.type==="Contact"?r?.email:void 0,d=!!i,p=t[R]?.recurringPaymentType?.selectedOption===Pi.recurringBill.paymentTypeOptions[1],m={isActive:e.recurringConfig?.isActive??!1,currentInstance:e.recurringConfig?.currentInstance,isApprovalRequired:t[R]?.recurringPaymentDetails?.requireApproval?.selectedOption==="all",frequency:Ja(t[R]?.recurringPaymentDetails?.frequency?.selectedOption),endDate:t[R]?.recurringPaymentDetails?.endDateSelector?.date!=null?pe(t[R]?.recurringPaymentDetails?.endDateSelector.date.toString()):void 0,startDate:t[R]?.recurringPaymentDetails?.startDate?pe(t[R]?.recurringPaymentDetails?.startDate.toString()):void 0,endDateSelectorOptionType:t[R]?.recurringPaymentDetails?.endDateSelector?.type,totalPaymentCycles:t[R]?.recurringPaymentDetails?.endDateSelector?.recurringCount??0,updateRecurringBills:t[R]?.recurringPaymentDetails?.updateRecurringBills},S=_i(e.accountList.accounts,e.classList.classes,e.lineDetailSection,t.lineItems,n,l),h=Object.keys(S).length>0?Yn(S):e.editBillInitialDetails?.recipientTotalAmount;return{showVendorGptRecommendationText:e.showVendorGptRecommendationText,vendor:u,whatForSection:o,paymentDetailsSection:s,isCancelled:e.isCancelled,totalAmount:h,recipientTotalAmount:h,file:e.file,updatesByLineId:S,toAccountVendorEmail:i,isCollectToAccountInfoFromVendorContact:d,isRecurring:p,recurringConfig:m}},_i=(e,t,l,n,c,r)=>{const u={};return n.forEach((o=>{let s,i;o.account.selectedOption!=null&&(s=e.find((p=>p.qboId===o.account.selectedOption||p.accountId===o.account.selectedOption))),o.class?.selectedOption!=null&&(i=t.find((p=>p.classId===o.class.selectedOption)));const d=Hn(l[o.lineId],o,c,r);u[o.lineId]={...l[o.lineId],...o,platformLineDetailType:l[o.lineId]?.platformLineDetailType??"account_based_expense_line_detail",amount:{amount:o.amount??0,currencyCode:o.currency?.currencyCode??he.currencyCode,currencySymbol:o.currency?.currencySymbol??he.currencySymbol},recipientAmount:{amount:o.recipientAmount??0,currencyCode:o.recipientCurrency?.currencyCode??he.currencyCode,currencySymbol:o.recipientCurrency?.currencySymbol??he.currencySymbol},id:o.lineId,lineDescription:o.lineDescription??"",account:s,class:i,billable:o.billable?.selectedOption??"not_billable",customer:{id:d?.id??"",name:d?.name??"",qboId:d?.qboId,logo:d?.logo},type:"journal_entry_transaction_line",isCategoryMiscategorized:!1,isClassMiscategorized:!1}})),u},Gi=U.div`
|
|
93
93
|
display: flex;
|
|
94
94
|
height: 100vh;
|
|
95
95
|
width: 100%;
|
|
@@ -98,7 +98,7 @@ import{j as a}from"./liveblocks-BOLtmXrt.js";import{h as J,u as le,g as K,i as e
|
|
|
98
98
|
align-items: center;
|
|
99
99
|
background-color: ${e=>e.theme.colors.grey4};
|
|
100
100
|
box-shadow: ${e=>`0px 2px ${A.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
101
|
-
`,Mi=Q((function(e,t){const{vendorId:l,billId:n}=t,c=ye(e,l),r=
|
|
101
|
+
`,Mi=Q((function(e,t){const{vendorId:l,billId:n}=t,c=ye(e,l),r=Ge(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,n);return{billId:n,isDisabled:c.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:c,file:r.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{billId:l,navigate:n,location:c,vendorId:r,currentTenant:u}=t,{tenantEmailDomain:o}=u;return{onFetchBankNameBySwift:s=>{e(en(s))},onSaveHandler:()=>{e(Xa(t.bankAccountContext,r))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:i}=s;e(Qa({data:i}))},onCancel:()=>{(()=>{const s=H(c.state?.pathnameStackToGoBack),i=s.poppedPathname??gt();n(i,{state:{pathnameStackToGoBack:s.newStack}})})(),e(it())},onAddressClick:s=>{const i=Ke(o,s,l),d=D(c.state?.pathnameStackToGoBack,c.pathname);n(i,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{e(Ka({fetchState:"Not-Started"}));const s=H(t.location.state?.pathnameStackToGoBack),i=s.poppedPathname??gt(0);t.navigate(i,{state:{pathnameStackToGoBack:s.newStack}}),e(it())}}}))(qn);function Ni(){const e=J(),t=K(),l=Ie(),{vendorId:n,billId:c}=ee(),{useFeatureGate:r}=oe(),u=ue(),o=V.getSignedInUser(),s=v((h=>W(h))),i=H(t.state?.pathnameStackToGoBack),d=i.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail",p=v((h=>ye(h,n))),{isFeatureEnabled:m}=r(f.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:S}=r(f.isDepositAccountsFeatureEnabled);if(o==null)throw Error("Can't access address page without signing in...");return d==="billDetail"&&p.editVendorState?.saveStatus.fetchState==="In-Progress"?a.jsx(se,{fetchState:p.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:u.colors.grey5,boxShadow:`0px 2px ${A.sp1} ${u.colors.dropShadowNormal}`}}):a.jsxs(Gi,{windowSize:l,children:[a.jsx(Je,{vendorId:n,billId:c}),a.jsx(Mi,{location:t,navigate:e,billId:c,vendorId:n,currentTenant:s,bankAccountContext:d,isVendorRecommendationEnabled:m,isZeniAccountsFeatureEnabled:S})]})}const gt=(e=2)=>{let t="../";for(let l=0;l<e;l++)t=`${t}../`;return t},Oi=U.div`
|
|
102
102
|
display: flex;
|
|
103
103
|
height: 100vh;
|
|
104
104
|
width: 100%;
|
|
@@ -107,7 +107,7 @@ import{j as a}from"./liveblocks-BOLtmXrt.js";import{h as J,u as le,g as K,i as e
|
|
|
107
107
|
align-items: center;
|
|
108
108
|
background-color: ${e=>e.theme.colors.grey4};
|
|
109
109
|
box-shadow: ${e=>`0px 2px ${A.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
110
|
-
`,
|
|
110
|
+
`,zi=Q((function(e,t){const{vendorId:l}=t,n=ye(e,l),c=l!=null?n.editVendorState?.vendorDetailLocalData?.vendorType:n.newVendorState?.vendorDetailLocalData?.vendorType,r=an(e,c||"international_business",t.billId),u=n.editVendorState??n.newVendorState,o=t.billId!=null?e.editBillDetailViewState.editBillStateById[nn(t.billId)].billDetailLocalData.recipientTotalAmount?.amount:e.editBillDetailViewState.newBillState.billDetailLocalData.recipientTotalAmount?.amount;return{internationalWireView:r,vendorViewDetails:n,bankAccountContext:t.bankAccountContext,vendorType:c||"international_business",addressType:"vendor_address",addressToEdit:u?.vendorNewAddressStatus?.addressToCreate,mailingAddress:u?.vendorAddress,billAmount:o??0}}),(function(e,t){const{billId:l,navigate:n,location:c,vendorId:r,currentTenant:u}=t,{tenantEmailDomain:o}=u;return{onSaveHandler:()=>{e(cn(t.bankAccountContext,r))},onAccountDetailsUpdated:(s,i,d,p)=>{e(sn(s)),p&&e(rn(i,d))},onCurrencyUpdated:(s,i,d)=>{e(ln(s,i,d,!1))},onCancel:()=>{(()=>{const s=H(c.state?.pathnameStackToGoBack),i=s.poppedPathname??St();n(i,{state:{pathnameStackToGoBack:s.newStack}})})(),e(ot())},onAddressClick:s=>{const i=Ke(o,s,l),d=D(c.state?.pathnameStackToGoBack,c.pathname);n(i,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{e(on({fetchState:"Not-Started"}));const s=H(t.location.state?.pathnameStackToGoBack),i=s.poppedPathname??St(0);t.navigate(i,{state:{pathnameStackToGoBack:s.newStack}}),e(ot())}}}))(Jn);function Zi(){const e=J(),t=K(),l=Ie(),{vendorId:n,billId:c}=ee(),r=le(),u=ue(),o=V.getSignedInUser(),s=v((B=>W(B))),i=H(t.state?.pathnameStackToGoBack),[d,p]=g.useState(!1),m=v((B=>B.vendorViewState.newVendorState.fetchStatus.fetchState)),S=v((B=>n!=null?B.vendorViewState.editVendorStateById[n]?.fetchStatus.fetchState??"Not-Started":"Not-Started")),h=n!==void 0?S:m;g.useEffect((()=>{d===!1&&h==="Not-Started"&&n!=null&&(r(ge(!1,n)),p(!0))}),[d,h,n]);const[b,C]=g.useState(!1);g.useEffect((()=>{b||h==="In-Progress"||(C(!0),r(tn(c,n)))}),[b,h,r]);const I=i.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail",j=v((B=>ye(B,n)));if(o==null)throw Error("Can't access international wire page without signing in...");return I==="billDetail"&&j.editVendorState?.saveStatus.fetchState==="In-Progress"?a.jsx(se,{fetchState:j.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:u.colors.grey5,boxShadow:`0px 2px ${A.sp1} ${u.colors.dropShadowNormal}`}}):a.jsxs(Oi,{windowSize:l,children:[a.jsx(Je,{vendorId:n,billId:c}),a.jsx(zi,{location:t,navigate:e,billId:c,vendorId:n,currentTenant:s,bankAccountContext:I})]})}const St=(e=2)=>{let t="../";for(let l=0;l<e;l++)t=`${t}../`;return t},yt=U.div`
|
|
111
111
|
display: flex;
|
|
112
112
|
height: 100vh;
|
|
113
113
|
width: 100%;
|
|
@@ -116,4 +116,4 @@ import{j as a}from"./liveblocks-BOLtmXrt.js";import{h as J,u as le,g as K,i as e
|
|
|
116
116
|
align-items: center;
|
|
117
117
|
background-color: ${e=>e.theme.colors.grey4};
|
|
118
118
|
box-shadow: ${e=>`0px 2px ${A.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
119
|
-
`,Zi=Q((function(e,t){const l=V.getSignedInUser(),n=Ot(e,t.billId),c=un(e),r=Ce(l),u=n.totalAmount.amount,o=n.billPayInfo?.stage.code!=="scheduled"&&c.allApprovalRules.length>0&&!Ut(u,c.allApprovalRules,l,n.vendor?.id,n.classId);return{billDetails:n,billId:t.billId,billpayApprovalView:c,analytics:E,isApprovalRequiredForMarkAsPaid:o,isZeniUser:r}}),(function(e,t){const{location:l,billId:n,currentTenant:c,navigate:r}=t,{tenantEmailDomain:u}=c;return{redirectToBillsScreen:()=>{const o=ne(c.tenantEmailDomain),s=D(l.state?.pathnameStackToGoBack,l.pathname);r(o,{state:{pathnameStackToGoBack:s}})},discardBillDetailsFromLocalStore:()=>{e(Se({}))},saveBillDetails:(o,s)=>{o&&e(Ct({billId:n,data:s})),e(Ue(o?"paid":"pending_approval",o,!1,n))},discardOutsideZeniPaymentData:()=>{e(Bt({billId:n}))},updateBillDetailSaveBillCode:()=>{e(_t("pending_approval"))},onClickEdit:()=>{t.navigate("../",{relative:"path"})},onAttachmentClick:(o,s)=>{const i=Ee(u,o,s);window.open(`${i}`,"_blank")},retryPayment:()=>{t.billId!=null&&e(xe(t.billId,"retry"))}}}))(Qn);function ft(){const e=J(),t=le(),l=K(),{billId:n}=ee(),{useFeatureGate:c}=oe(),{isFeatureEnabled:r}=c(f.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:u}=c(f.isBillPayDetectInsufficientFundsEnabled),o=Ie(),s=V.getSignedInUser(),{isFeatureEnabled:i}=c(f.isBillPayLocalCurrencyFeatureEnabled),{isFeatureEnabled:d}=c(f.isVendorRecommendationFeatureEnabled),p=H(l.state?.pathnameStackToGoBack),{poppedPathname:m}=p,{isFeatureEnabled:S}=c(f.isRecurringBillsFeatureEnabled),h=v((I=>W(I))),b=v((I=>Ot(I,n))),C=b.fetchState??"Not-Started";if(g.useEffect((()=>(window.onbeforeunload=function(){return e(l,{state:{message:""}}),!0},()=>{window.onbeforeunload=null})),[e]),g.useEffect((()=>{l.state?.message!=="coming_from_edit_page"&&e(`../${n}`)}),[]),g.useEffect((()=>{const I=b.vendor?.name,j=b.vendor?.id,B=b.totalAmount.amount,T=b.recipientTotalAmount.amount,k=b.invoiceNumber;I&&j&&t(dn(I,j,B,T,k,n))}),[]),m==null)return a.jsx(X,{to:`../${n}`});if(s==null)throw Error("Can't access address page without signing in...");return C==="In-Progress"?a.jsx(yt,{windowSize:o,children:a.jsx(Kn,{})}):a.jsx(yt,{windowSize:o,children:a.jsx(Zi,{location:l,navigate:e,currentTenant:h,billId:n,isLocalCurrencyEnabled:i,isVendorRecommendationEnabled:d,isInternationalPaymentShaVsOurEnabled:r,isRecurringBillsFeatureEnabled:S,isDetectInsufficientFundsEnabled:u})})}const Hi=Q((function(e,t){const{vendorId:l}=t,n=e.entityAutoCompleteState.autoCompleteText.common,c=Ye(e,"common"),r=l!=null?"edit":"create",u=W(e),o=V.getSignedInUser(),s=u.tenantId,i={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:s??""};return{vendorViewDetails:t.vendorViewDetails,screenType:r,filesEndPoint:`${zt.fileMicroServiceBaseUrl}`,authParams:i,analytics:E,vendorSearchAutoCompleteData:{autoCompleteText:n,entityAutoCompleteView:c}}}),(function(e,t){const{billId:l,currentTenant:n,navigate:c,location:r,vendorId:u,themeState:o}=t,{tenantEmailDomain:s}=n;return{onSaveVendor:i=>{e(xn(u??void 0,t.billId)),i!=null&&e(Bn(i))},saveVendorDetailLocalData:i=>{e(Nt({vendorId:u,localData:i}))},saveContactsInVendorDetailLocalData:i=>{e(wn({vendorId:u,contacts:i}))},resetVendorDetailLocalData:()=>{e(lt(u))},updateSelectedVendorForCreate:i=>{e(kn(i))},navigateToBankDetailPage:(i,d)=>{let p;i==="wire"?p=d==="international"?Ht(s,t.billId,u):ci(s,t.billId,u):p=ri(s,t.billId,u);const m=D(r.state?.pathnameStackToGoBack,r.pathname);c(p,{state:{pathnameStackToGoBack:m}})},onRemoveBankAccount:(i,d)=>{e(d===!0?In(i,"vendor",u):vn(i,"vendor",u))},navigateToMailingAddressPage:i=>{const d=Ke(s,i,l),p=D(r.state?.pathnameStackToGoBack,r.pathname);c(d,{state:{pathnameStackToGoBack:p}})},updateFilesEntity:i=>{e(fn({files:i}))},onEditFileName:(i,d)=>{e(yn(i,d.split(".")[0]))},handleZeniLogoClick:()=>{o.toggle()},updateSaveFetchState:()=>{u==null&&e(lt(t.vendorViewDetails.newVendorState?.vendorBasic?.id)),e(Sn("Not-Started",u))},onVendorSelected:i=>{i!=null&&e(gn(i,!0))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,d)=>{i.trim().length>=2?e(ze({searchString:i,entityType:d,searchOrigin:"common"})):i.trim().length===0&&e(ie("common"))},onCancelAutoComplete:()=>{e(ie("common"))}},onBackClick:()=>{e(ie("common"));const i=H(t.location.state?.pathnameStackToGoBack),d=i.poppedPathname??si(n.tenantEmailDomain,t.billId);c(d,{state:{pathnameStackToGoBack:i.newStack}})},onGetOtp:i=>{e(hn(i,"BillPayVendor"))},onResendOtp:i=>{e(bn(i,"BillPayVendor"))},onVerifyOtp:(i,d)=>{e(mn(i,d,"BillPayVendor"))},onVerifyOtpSuccess:(i,d,p)=>{e(pn(i,d,p))},onFetchAndUpdateVendorRecommendations:i=>{e(Mt(i,!1))}}}))(ai),we=()=>{const e=J(),t=le(),l=Xn(),n=K(),{billId:c,vendorId:r}=ee(),u=v((b=>W(b))),{useFeatureGate:o}=oe(),{isFeatureEnabled:s}=o(f.isBillPayLocalCurrencyFeatureEnabled),[i,d]=g.useState(!1),p=v((b=>b.vendorViewState.newVendorState.fetchStatus.fetchState)),m=v((b=>ye(b,r))),S=v((b=>r!==void 0?b.vendorViewState.editVendorStateById[r]?.fetchStatus??"Not-Started":"Not-Started")),h=r!==void 0?S:p;return g.useEffect((()=>{i===!1&&h==="Not-Started"&&r!=null&&(t(ge(!1,r)),d(!0))}),[i,h,r]),m.fetchState==="Not-Started"||m.fetchState==="In-Progress"?a.jsx(ei,{}):h==="Error"?a.jsx(ti,{onGoHome:()=>e("../",{replace:!0}),onReload:()=>window.location.reload()}):a.jsxs(a.Fragment,{children:[a.jsx(Je,{vendorId:r,billId:c}),a.jsx(Hi,{navigate:e,location:n,themeState:l,currentTenant:u,vendorId:r,billId:c,vendorViewDetails:m,isLocalCurrencyEnabled:s})]})},Wi=Q((function(e,t){const{companyId:l}=t;return{billPaySetupView:Cn(e,l),analytics:E,videoUrl:"https://player.vimeo.com/video/787873426?h=9d9389b1dc&badge=0&autopause=0&player_id=0&app_id=58479"}}),(function(e,t){const{companyId:l,navigate:n}=t;return{onButtonClick:()=>{e(An(l))},onBackClick:()=>{n("../..",{relative:"path"})},onSetupBillPaySuccess:()=>{n("../bills/setup",{relative:"path"})}}}))(ii),qi=()=>{const e=ni(),t=J(),l=K(),{tenantEmailDomain:n}=ee(),[c,r]=g.useState(!1),u=ue(),o=v((h=>W(h))),s=o.companyId??V.getSignedInUserTenant(n)?.companyId,i=V.getSignedInUser(),d=fe(),p=!!o.companyBillPayInfo?.info?.isBillPayTOSAccepted,m=de(d?.loggedInUserRoleMap),S=h=>{r(h)};if(i==null)throw Error("Can't access bill pay promo page without signing in...");return o.companyBillPayInfo?.info?.isBillPayEnabled===!0?a.jsx(X,{to:"../../../bills"}):p===!0&&m===!0?a.jsx(X,{to:"../../bills/setup"}):p===!1||d!=null&&Oe(o,d.loggedInUserRoleMap)?a.jsxs(a.Fragment,{children:[a.jsx(Ae,{analytics:E,onLoad:h=>(b=>b.trackPageLoaded(Zt.Event.billPayPromoPage))(h)}),a.jsx(qt,{isAppContentDrawerOpen:c,handleDrawerToggle:S}),a.jsx(Wi,{companyId:s,navigate:t,location:l,meetingUrl:e("bill_pay_promo"),onClickMenuIcon:()=>{S(!0)}})]}):a.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:u.colors.grey5}})};function To(){const e=v((Z=>W(Z))),t=fe(),l=de(t?.loggedInUserRoleMap),n=ue(),{useFeatureGate:c}=oe(),{isFeatureEnabled:r}=c(f.isBillPayLocalCurrencyFeatureEnabled),u=r===!0?zi:Ni,{isFeatureEnabled:o}=c(f.isDebitCardFeatureEnabled),s=Rt(o,e),i=Vt(e),d=K(),p=e?.userRole!=null&&It(e?.userRole),m=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!p)&&de(t?.loggedInUserRoleMap),S=Ft(t?.loggedInUserRoleMap),h=(e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!p)&&Dn(t?.loggedInUserRoleMap),b=!!e.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!p,C=b&&$t(t?.loggedInUserRoleMap),{isFeatureEnabled:I}=c(f.isChargeCardFeatureEnabled),j=oi(e,I,o)&&!p,B=j&&En(t?.loggedInUserRoleMap),T=Tn(t?.loggedInUserRoleMap),k=Lt(t?.loggedInUserRoleMap),$=jn(t?.loggedInUserRoleMap),O=b&&k,_=e.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!p&&$,Y=Pn(t?.loggedInUserRoleMap),z=Fn(t?.loggedInUserRoleMap),w=Rn(t?.loggedInUserRoleMap),M=j&&Y,{tenantEmailDomain:L}=ee();return a.jsxs(na,{children:[d.pathname.includes("/bills")?a.jsxs(a.Fragment,{children:[a.jsx(y,{path:"setup",element:a.jsx(Te,{isBillPayAdminLevelAccess:m,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:h,isZeniAccountAdminLevelAccess:C,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:T,productType:"bill_pay",type:"setup"})}),a.jsx(y,{path:"verification",element:a.jsx(Te,{isBillPayAdminLevelAccess:m,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:h,isZeniAccountAdminLevelAccess:C,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:T,productType:"bill_pay",type:"verification"})}),a.jsx(y,{path:"promo",element:a.jsx(qi,{})}),a.jsx(y,{path:"approval-rules/*",element:m?a.jsx(pi,{}):a.jsx(mi,{showZeniAccountRoute:O,isUserHasBillPayAccess:z,isUserHasReimbursementAccess:w,showTreasuryRoute:_,isTenantBankingOnly:s,showChargeCardRoute:M,tenantEmailDomain:L??""})}),a.jsx(y,{path:"international-wire",element:a.jsx(Te,{isBillPayAdminLevelAccess:m,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:h,isZeniAccountAdminLevelAccess:C,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:T,productType:"bill_pay",type:"international-wire"})}),e.companyBillPayInfo?.info?.isBillPayEnabled===!0&&a.jsx(y,{path:"*",element:a.jsx(Ei,{})}),(s===!0||i===!0)&&a.jsx(y,{path:"/*",element:a.jsx(Jt,{})}),e.companyBillPayInfo?.info?.isBillPayTOSAccepted===!0&&l&&a.jsx(y,{path:"*",element:a.jsx(X,{to:"../setup"})}),t!=null&&Oe(e,t.loggedInUserRoleMap)&&a.jsx(y,{path:"*",element:a.jsx(X,{to:"../promo"})})]}):d.pathname.includes("/bill")?a.jsxs(a.Fragment,{children:[a.jsx(y,{path:"new",element:a.jsx(x,{appContent:a.jsx(bt,{})})}),a.jsx(y,{path:":billId",element:a.jsx(x,{appContent:a.jsx(hi,{})})}),a.jsx(y,{path:":billId/edit",element:a.jsx(x,{appContent:a.jsx(bt,{})})}),a.jsx(y,{path:"new/review",element:a.jsx(x,{appContent:a.jsx(ft,{})})}),a.jsx(y,{path:":billId/edit/review",element:a.jsx(x,{appContent:a.jsx(ft,{})})}),a.jsx(y,{path:"/:billId/:addressType",element:a.jsx(x,{appContent:a.jsx(ct,{isSubPage:!0})})}),a.jsx(y,{path:"/new/:addressType",element:a.jsx(x,{appContent:a.jsx(ct,{isSubPage:!0})})}),a.jsx(y,{path:"new/vendor/create",element:a.jsx(x,{appContent:a.jsx(we,{})})}),a.jsx(y,{path:"new/vendor/:vendorId/edit",element:a.jsx(x,{appContent:a.jsx(we,{})})}),a.jsx(y,{path:"new/vendor/:vendorId/edit/ach",element:a.jsx(x,{appContent:a.jsx(me,{})})}),a.jsx(y,{path:"new/vendor/:vendorId/edit/domestic",element:a.jsx(x,{appContent:a.jsx(be,{})})}),a.jsx(y,{path:"new/vendor/:vendorId/edit/international",element:a.jsx(x,{appContent:a.jsx(u,{})})}),a.jsx(y,{path:"new/vendor/create/ach",element:a.jsx(x,{appContent:a.jsx(me,{})})}),a.jsx(y,{path:"new/vendor/create/domestic",element:a.jsx(x,{appContent:a.jsx(be,{})})}),a.jsx(y,{path:"new/vendor/create/international",element:a.jsx(x,{appContent:a.jsx(u,{})})}),a.jsx(y,{path:":billId/edit/vendor/create/ach",element:a.jsx(x,{appContent:a.jsx(me,{})})}),a.jsx(y,{path:":billId/edit/vendor/create/domestic",element:a.jsx(x,{appContent:a.jsx(be,{})})}),a.jsx(y,{path:":billId/edit/vendor/create/international",element:a.jsx(x,{appContent:a.jsx(u,{})})}),a.jsx(y,{path:":billId/edit/vendor/create",element:a.jsx(x,{appContent:a.jsx(we,{})})}),a.jsx(y,{path:":billId/edit/vendor/:vendorId/edit",element:a.jsx(x,{appContent:a.jsx(we,{})})}),a.jsx(y,{path:":billId/edit/vendor/:vendorId/edit/ach",element:a.jsx(x,{appContent:a.jsx(me,{})})}),a.jsx(y,{path:":billId/edit/vendor/:vendorId/edit/domestic",element:a.jsx(x,{appContent:a.jsx(be,{})})}),a.jsx(y,{path:":billId/edit/vendor/:vendorId/edit/international",element:a.jsx(x,{appContent:a.jsx(u,{})})}),a.jsx(y,{path:":billId/edit/vendor/create/ach",element:a.jsx(x,{appContent:a.jsx(me,{})})}),a.jsx(y,{path:":billId/edit/vendor/create/domestic",element:a.jsx(x,{appContent:a.jsx(be,{})})}),a.jsx(y,{path:":billId/edit/vendor/create/international",element:a.jsx(x,{appContent:a.jsx(u,{})})}),a.jsx(y,{path:"*",element:a.jsx(Be,{})})]}):a.jsx(y,{path:"*",element:a.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:n.colors.grey5,boxShadow:`0px 2px ${A.sp1} ${n.colors.dropShadowNormal}`}})}),a.jsx(y,{path:"*",element:a.jsx(Be,{})})]})}export{To as default};
|
|
119
|
+
`,Yi=Q((function(e,t){const l=V.getSignedInUser(),n=Ot(e,t.billId),c=un(e),r=Ce(l),u=n.totalAmount.amount,o=n.billPayInfo?.stage.code!=="scheduled"&&c.allApprovalRules.length>0&&!_t(u,c.allApprovalRules,l,n.vendor?.id,n.classId);return{billDetails:n,billId:t.billId,billpayApprovalView:c,analytics:E,isApprovalRequiredForMarkAsPaid:o,isZeniUser:r}}),(function(e,t){const{location:l,billId:n,currentTenant:c,navigate:r}=t,{tenantEmailDomain:u}=c;return{redirectToBillsScreen:()=>{const o=ne(c.tenantEmailDomain),s=D(l.state?.pathnameStackToGoBack,l.pathname);r(o,{state:{pathnameStackToGoBack:s}})},discardBillDetailsFromLocalStore:()=>{e(Se({}))},saveBillDetails:(o,s)=>{o&&e(Ct({billId:n,data:s})),e(_e(o?"paid":"pending_approval",o,!1,n))},discardOutsideZeniPaymentData:()=>{e(Bt({billId:n}))},updateBillDetailSaveBillCode:()=>{e(Gt("pending_approval"))},onClickEdit:()=>{t.navigate("../",{relative:"path"})},onAttachmentClick:(o,s)=>{const i=Ee(u,o,s);window.open(`${i}`,"_blank")},retryPayment:()=>{t.billId!=null&&e(xe(t.billId,"retry"))}}}))(Qn);function ft(){const e=J(),t=le(),l=K(),{billId:n}=ee(),{useFeatureGate:c}=oe(),{isFeatureEnabled:r}=c(f.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:u}=c(f.isBillPayDetectInsufficientFundsEnabled),o=Ie(),s=V.getSignedInUser(),{isFeatureEnabled:i}=c(f.isBillPayLocalCurrencyFeatureEnabled),{isFeatureEnabled:d}=c(f.isVendorRecommendationFeatureEnabled),p=H(l.state?.pathnameStackToGoBack),{poppedPathname:m}=p,{isFeatureEnabled:S}=c(f.isRecurringBillsFeatureEnabled),h=v((I=>W(I))),b=v((I=>Ot(I,n))),C=b.fetchState??"Not-Started";if(g.useEffect((()=>(window.onbeforeunload=function(){return e(l,{state:{message:""}}),!0},()=>{window.onbeforeunload=null})),[e]),g.useEffect((()=>{l.state?.message!=="coming_from_edit_page"&&e(`../${n}`)}),[]),g.useEffect((()=>{const I=b.vendor?.name,j=b.vendor?.id,B=b.totalAmount.amount,T=b.recipientTotalAmount.amount,k=b.invoiceNumber;I&&j&&t(dn(I,j,B,T,k,n))}),[]),m==null)return a.jsx(X,{to:`../${n}`});if(s==null)throw Error("Can't access address page without signing in...");return C==="In-Progress"?a.jsx(yt,{windowSize:o,children:a.jsx(Kn,{})}):a.jsx(yt,{windowSize:o,children:a.jsx(Yi,{location:l,navigate:e,currentTenant:h,billId:n,isLocalCurrencyEnabled:i,isVendorRecommendationEnabled:d,isInternationalPaymentShaVsOurEnabled:r,isRecurringBillsFeatureEnabled:S,isDetectInsufficientFundsEnabled:u})})}const Hi=Q((function(e,t){const{vendorId:l}=t,n=e.entityAutoCompleteState.autoCompleteText.common,c=ze(e,"common"),r=l!=null?"edit":"create",u=W(e),o=V.getSignedInUser(),s=u.tenantId,i={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:s??""};return{vendorViewDetails:t.vendorViewDetails,screenType:r,filesEndPoint:`${Zt.fileMicroServiceBaseUrl}`,authParams:i,analytics:E,vendorSearchAutoCompleteData:{autoCompleteText:n,entityAutoCompleteView:c}}}),(function(e,t){const{billId:l,currentTenant:n,navigate:c,location:r,vendorId:u,themeState:o}=t,{tenantEmailDomain:s}=n;return{onSaveVendor:i=>{e(xn(u??void 0,t.billId)),i!=null&&e(Bn(i))},saveVendorDetailLocalData:i=>{e(Nt({vendorId:u,localData:i}))},saveContactsInVendorDetailLocalData:i=>{e(wn({vendorId:u,contacts:i}))},resetVendorDetailLocalData:()=>{e(lt(u))},updateSelectedVendorForCreate:i=>{e(kn(i))},navigateToBankDetailPage:(i,d)=>{let p;i==="wire"?p=d==="international"?Ht(s,t.billId,u):ci(s,t.billId,u):p=ri(s,t.billId,u);const m=D(r.state?.pathnameStackToGoBack,r.pathname);c(p,{state:{pathnameStackToGoBack:m}})},onRemoveBankAccount:(i,d)=>{e(d===!0?In(i,"vendor",u):vn(i,"vendor",u))},navigateToMailingAddressPage:i=>{const d=Ke(s,i,l),p=D(r.state?.pathnameStackToGoBack,r.pathname);c(d,{state:{pathnameStackToGoBack:p}})},updateFilesEntity:i=>{e(fn({files:i}))},onEditFileName:(i,d)=>{e(yn(i,d.split(".")[0]))},handleZeniLogoClick:()=>{o.toggle()},updateSaveFetchState:()=>{u==null&&e(lt(t.vendorViewDetails.newVendorState?.vendorBasic?.id)),e(Sn("Not-Started",u))},onVendorSelected:i=>{i!=null&&e(gn(i,!0))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,d)=>{i.trim().length>=2?e(Ze({searchString:i,entityType:d,searchOrigin:"common"})):i.trim().length===0&&e(ie("common"))},onCancelAutoComplete:()=>{e(ie("common"))}},onBackClick:()=>{e(ie("common"));const i=H(t.location.state?.pathnameStackToGoBack),d=i.poppedPathname??si(n.tenantEmailDomain,t.billId);c(d,{state:{pathnameStackToGoBack:i.newStack}})},onGetOtp:i=>{e(hn(i,"BillPayVendor"))},onResendOtp:i=>{e(bn(i,"BillPayVendor"))},onVerifyOtp:(i,d)=>{e(mn(i,d,"BillPayVendor"))},onVerifyOtpSuccess:(i,d,p)=>{e(pn(i,d,p))},onFetchAndUpdateVendorRecommendations:i=>{e(Mt(i,!1))}}}))(ai),we=()=>{const e=J(),t=le(),l=Xn(),n=K(),{billId:c,vendorId:r}=ee(),u=v((b=>W(b))),{useFeatureGate:o}=oe(),{isFeatureEnabled:s}=o(f.isBillPayLocalCurrencyFeatureEnabled),[i,d]=g.useState(!1),p=v((b=>b.vendorViewState.newVendorState.fetchStatus.fetchState)),m=v((b=>ye(b,r))),S=v((b=>r!==void 0?b.vendorViewState.editVendorStateById[r]?.fetchStatus??"Not-Started":"Not-Started")),h=r!==void 0?S:p;return g.useEffect((()=>{i===!1&&h==="Not-Started"&&r!=null&&(t(ge(!1,r)),d(!0))}),[i,h,r]),m.fetchState==="Not-Started"||m.fetchState==="In-Progress"?a.jsx(ei,{}):h==="Error"?a.jsx(ti,{onGoHome:()=>e("../",{replace:!0}),onReload:()=>window.location.reload()}):a.jsxs(a.Fragment,{children:[a.jsx(Je,{vendorId:r,billId:c}),a.jsx(Hi,{navigate:e,location:n,themeState:l,currentTenant:u,vendorId:r,billId:c,vendorViewDetails:m,isLocalCurrencyEnabled:s})]})},Wi=Q((function(e,t){const{companyId:l}=t;return{billPaySetupView:Cn(e,l),analytics:E,videoUrl:"https://player.vimeo.com/video/787873426?h=9d9389b1dc&badge=0&autopause=0&player_id=0&app_id=58479"}}),(function(e,t){const{companyId:l,navigate:n}=t;return{onButtonClick:()=>{e(An(l))},onBackClick:()=>{n("../..",{relative:"path"})},onSetupBillPaySuccess:()=>{n("../bills/setup",{relative:"path"})}}}))(ii),qi=()=>{const e=ni(),t=J(),l=K(),{tenantEmailDomain:n}=ee(),[c,r]=g.useState(!1),u=ue(),o=v((h=>W(h))),s=o.companyId??V.getSignedInUserTenant(n)?.companyId,i=V.getSignedInUser(),d=fe(),p=!!o.companyBillPayInfo?.info?.isBillPayTOSAccepted,m=de(d?.loggedInUserRoleMap),S=h=>{r(h)};if(i==null)throw Error("Can't access bill pay promo page without signing in...");return o.companyBillPayInfo?.info?.isBillPayEnabled===!0?a.jsx(X,{to:"../../../bills"}):p===!0&&m===!0?a.jsx(X,{to:"../../bills/setup"}):p===!1||d!=null&&Oe(o,d.loggedInUserRoleMap)?a.jsxs(a.Fragment,{children:[a.jsx(Ae,{analytics:E,onLoad:h=>(b=>b.trackPageLoaded(Yt.Event.billPayPromoPage))(h)}),a.jsx(qt,{isAppContentDrawerOpen:c,handleDrawerToggle:S}),a.jsx(Wi,{companyId:s,navigate:t,location:l,meetingUrl:e("bill_pay_promo"),onClickMenuIcon:()=>{S(!0)}})]}):a.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:u.colors.grey5}})};function To(){const e=v((Y=>W(Y))),t=fe(),l=de(t?.loggedInUserRoleMap),n=ue(),{useFeatureGate:c}=oe(),{isFeatureEnabled:r}=c(f.isBillPayLocalCurrencyFeatureEnabled),u=r===!0?Zi:Ni,{isFeatureEnabled:o}=c(f.isDebitCardFeatureEnabled),s=Rt(o,e),i=Vt(e),d=K(),p=e?.userRole!=null&&It(e?.userRole),m=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!p)&&de(t?.loggedInUserRoleMap),S=Ft(t?.loggedInUserRoleMap),h=(e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!p)&&Dn(t?.loggedInUserRoleMap),b=!!e.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!p,C=b&&$t(t?.loggedInUserRoleMap),{isFeatureEnabled:I}=c(f.isChargeCardFeatureEnabled),j=oi(e,I,o)&&!p,B=j&&En(t?.loggedInUserRoleMap),T=Tn(t?.loggedInUserRoleMap),k=Lt(t?.loggedInUserRoleMap),$=jn(t?.loggedInUserRoleMap),O=b&&k,G=e.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!p&&$,z=Pn(t?.loggedInUserRoleMap),Z=Fn(t?.loggedInUserRoleMap),w=Rn(t?.loggedInUserRoleMap),M=j&&z,{tenantEmailDomain:L}=ee();return a.jsxs(na,{children:[d.pathname.includes("/bills")?a.jsxs(a.Fragment,{children:[a.jsx(y,{path:"setup",element:a.jsx(Te,{isBillPayAdminLevelAccess:m,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:h,isZeniAccountAdminLevelAccess:C,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:T,productType:"bill_pay",type:"setup"})}),a.jsx(y,{path:"verification",element:a.jsx(Te,{isBillPayAdminLevelAccess:m,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:h,isZeniAccountAdminLevelAccess:C,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:T,productType:"bill_pay",type:"verification"})}),a.jsx(y,{path:"promo",element:a.jsx(qi,{})}),a.jsx(y,{path:"approval-rules/*",element:m?a.jsx(pi,{}):a.jsx(mi,{showZeniAccountRoute:O,isUserHasBillPayAccess:Z,isUserHasReimbursementAccess:w,showTreasuryRoute:G,isTenantBankingOnly:s,showChargeCardRoute:M,tenantEmailDomain:L??""})}),a.jsx(y,{path:"international-wire",element:a.jsx(Te,{isBillPayAdminLevelAccess:m,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:h,isZeniAccountAdminLevelAccess:C,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:T,productType:"bill_pay",type:"international-wire"})}),e.companyBillPayInfo?.info?.isBillPayEnabled===!0&&a.jsx(y,{path:"*",element:a.jsx(Ei,{})}),(s===!0||i===!0)&&a.jsx(y,{path:"/*",element:a.jsx(Jt,{})}),e.companyBillPayInfo?.info?.isBillPayTOSAccepted===!0&&l&&a.jsx(y,{path:"*",element:a.jsx(X,{to:"../setup"})}),t!=null&&Oe(e,t.loggedInUserRoleMap)&&a.jsx(y,{path:"*",element:a.jsx(X,{to:"../promo"})})]}):d.pathname.includes("/bill")?a.jsxs(a.Fragment,{children:[a.jsx(y,{path:"new",element:a.jsx(x,{appContent:a.jsx(bt,{})})}),a.jsx(y,{path:":billId",element:a.jsx(x,{appContent:a.jsx(hi,{})})}),a.jsx(y,{path:":billId/edit",element:a.jsx(x,{appContent:a.jsx(bt,{})})}),a.jsx(y,{path:"new/review",element:a.jsx(x,{appContent:a.jsx(ft,{})})}),a.jsx(y,{path:":billId/edit/review",element:a.jsx(x,{appContent:a.jsx(ft,{})})}),a.jsx(y,{path:"/:billId/:addressType",element:a.jsx(x,{appContent:a.jsx(ct,{isSubPage:!0})})}),a.jsx(y,{path:"/new/:addressType",element:a.jsx(x,{appContent:a.jsx(ct,{isSubPage:!0})})}),a.jsx(y,{path:"new/vendor/create",element:a.jsx(x,{appContent:a.jsx(we,{})})}),a.jsx(y,{path:"new/vendor/:vendorId/edit",element:a.jsx(x,{appContent:a.jsx(we,{})})}),a.jsx(y,{path:"new/vendor/:vendorId/edit/ach",element:a.jsx(x,{appContent:a.jsx(me,{})})}),a.jsx(y,{path:"new/vendor/:vendorId/edit/domestic",element:a.jsx(x,{appContent:a.jsx(be,{})})}),a.jsx(y,{path:"new/vendor/:vendorId/edit/international",element:a.jsx(x,{appContent:a.jsx(u,{})})}),a.jsx(y,{path:"new/vendor/create/ach",element:a.jsx(x,{appContent:a.jsx(me,{})})}),a.jsx(y,{path:"new/vendor/create/domestic",element:a.jsx(x,{appContent:a.jsx(be,{})})}),a.jsx(y,{path:"new/vendor/create/international",element:a.jsx(x,{appContent:a.jsx(u,{})})}),a.jsx(y,{path:":billId/edit/vendor/create/ach",element:a.jsx(x,{appContent:a.jsx(me,{})})}),a.jsx(y,{path:":billId/edit/vendor/create/domestic",element:a.jsx(x,{appContent:a.jsx(be,{})})}),a.jsx(y,{path:":billId/edit/vendor/create/international",element:a.jsx(x,{appContent:a.jsx(u,{})})}),a.jsx(y,{path:":billId/edit/vendor/create",element:a.jsx(x,{appContent:a.jsx(we,{})})}),a.jsx(y,{path:":billId/edit/vendor/:vendorId/edit",element:a.jsx(x,{appContent:a.jsx(we,{})})}),a.jsx(y,{path:":billId/edit/vendor/:vendorId/edit/ach",element:a.jsx(x,{appContent:a.jsx(me,{})})}),a.jsx(y,{path:":billId/edit/vendor/:vendorId/edit/domestic",element:a.jsx(x,{appContent:a.jsx(be,{})})}),a.jsx(y,{path:":billId/edit/vendor/:vendorId/edit/international",element:a.jsx(x,{appContent:a.jsx(u,{})})}),a.jsx(y,{path:":billId/edit/vendor/create/ach",element:a.jsx(x,{appContent:a.jsx(me,{})})}),a.jsx(y,{path:":billId/edit/vendor/create/domestic",element:a.jsx(x,{appContent:a.jsx(be,{})})}),a.jsx(y,{path:":billId/edit/vendor/create/international",element:a.jsx(x,{appContent:a.jsx(u,{})})}),a.jsx(y,{path:"*",element:a.jsx(Be,{})})]}):a.jsx(y,{path:"*",element:a.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:n.colors.grey5,boxShadow:`0px 2px ${A.sp1} ${n.colors.dropShadowNormal}`}})}),a.jsx(y,{path:"*",element:a.jsx(Be,{})})]})}export{To as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{a as C}from"./sentry-DlU3V0QD.js";import{u as q,j as h,h as se,g as oe,i as ie,N as re,l as ce}from"./core-CJWbgnFM.js";import{fI as z,HM as ue,H_ as de,La as pe,O0 as le,OG as me,Pv as fe,Zl as ye,BL as Se,Sw as ge,Zm as Ie,Zn as he,Zo as be,Zp as Te,Zq as De,Zr as Oe,VA as Ce,Yr as ke,VP as Ve,Mm as Ae,Me as we,VQ as Ne,Mi as Fe,mK as ve,gJ as _e,gI as xe,gH as Be,v1 as Ee,uU as ze,uR as Pe,mC as Re,BU as Ue,BS as P,bF as R,C4 as U,cF as Me}from"./zeni-epic-state-DUCBgtEU.js";import{bT as Le,Q as Ze,W as je,bi as Ge,z as E,a8 as qe,k as M,q as x,U as B,bV as Ke,ae as He,p as L,aG as Z}from"./index-DvSod3qd.js";import{n as Qe}from"./mui-dbvYX-CF.js";import{j as A}from"./liveblocks-Du6nrW5U.js";import{d as j}from"./routePaths-5zdijNTw.js";import{M as We}from"./MobileAppDrawer-DqkcDASf.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="8e9fd830-f78d-484f-b344-e743163e9a63",e._sentryDebugIdIdentifier="sentry-dbid-8e9fd830-f78d-484f-b344-e743163e9a63")}catch{}})();function it(){const e=q(),r=h((u=>z(u))),a=r?.tenantId,{isApprovalRulesV3Enabled:s,isLoading:p}=Le(a),l=h((u=>u.billPaySetupApproverViewState.fetchState));C.useEffect((()=>{a==null||p||l==="Not-Started"&&e(ue(!0,!0,s))}),[a,p,s,l,e])}function G(e,r,a,s=!1){switch(r){case"zeni_accounts":e(fe(a,!0,s));break;case"zeni_treasury":e(me(a,!0,s));break;case"reimbursement":e(le(a,!0,s));break;case"charge_cards":e(pe(a,!0,s));break;default:e(de(a,!0,s))}}const $e=Qe.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
|
+
`,Je=ce((function(e,r){const{businessVerificationDetails:a}=r,s=z(e),p=E.getSignedInUser(),l=s.tenantId,u={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:l??""},b=Ce(r.roleMap)&&a.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",t=ke(e.companyConfigState),o=Ve(e.userRoleConfigState);return{businessVerificationDetails:a,verficationDetailsFetchState:a.fetchState,isRefreshingViewInBackground:a.isRefreshingViewInBackground,allNationalityCountries:a.allNationalityCountries,filesEndPoint:`${He.fileMicroServiceBaseUrl}`,authParams:u,isDisabled:b,allIndustries:t.companyIndustries??[],companyTitles:o.companyTitles}}),(function(e,r){const{companyId:a,productType:s,currentTenant:p,navigate:l,location:u}=r,{tenantEmailDomain:b}=p;return{onCompanyDetailsChanged:t=>{const{companyDescription:o,companyIndustry:m,companyIndustryType:k,companyLegalName:V,companyTaxId:y,companyWebsite:f,companyPhone:S,primaryContactEmail:d,primaryContactName:i,primaryContactUserId:T,primaryContactSyncToken:D,syncToken:c,fileIds:O,incDate:n,typeOfIncorporation:g,stateOfIncorporation:w,sourceOfFunds:N,companySubIndustry:F,countriesOfOperations:I,companySourceOfFunds:K,companySourceOfFundsDescription:H,transactionVolume:Q,transactionVolumeDescription:W,purposeOfAccount:$,purposeOfAccountDescription:J,regulatedStatus:Y,regulatedStatusDescription:X,usNexus:ee,usNexusTypes:te}=t,v=k?.selectedOption,ae={companyId:a,companyDescription:o,companyIndustry:m.selectedOption,companyIndustryType:v==null||v===""?void 0:v,companyLegalName:V,taxIdOrEIN:y,website:f!=""&&f!=null?Me(f):void 0,phone:S,syncToken:c,fileIds:O,incDate:n!=null?R(n?.toString()):n,typeOfIncorporation:g?.selectedOption??"",stateOfIncorporation:w?.selectedOption??"",sourceOfFunds:N?.selectedOption??"",companySubIndustry:F?.selectedOption??"",countriesOfOperations:I?.selectedOptions.map((_=>_.length===2?_:Z(_)))??[],companySourceOfFunds:K?.selectedOption??"",companySourceOfFundsDescription:H,transactionVolume:Q?.selectedOption??"",transactionVolumeDescription:W,purposeOfAccount:$?.selectedOption??"",purposeOfAccountDescription:J,regulatedStatus:Y??"",regulatedStatusDescription:X,usNexus:ee,usNexusTypes:te?.selectedOptions??[]},ne={userId:T,firstName:i.firstName,lastName:i.lastName,email:d,syncToken:D};e(U({companyDetails:ae,primaryContactDetails:ne}))},onCompanyOfficerUpdated:t=>{const o=t.map((m=>{const{officerType:k,userId:V,name:y,email:f,nationalityCountryCode:S,ssn:d,dob:i,phone:T,syncToken:D,selectDocument:c,role:O,ownership:n,isSelectedForVerification:g,userVerificationStatus:w,treasuryUserVerificationStatus:N,fileIds:F}=m;let I;return c.selectDocumentType==="driverLicense"?I="driving_license":c.selectDocumentType==="passport"?I="passport":c.selectDocumentType==="stateId"?I="id_document":c.selectDocumentType==="ssnCard"&&(I="social_security_card"),{officerType:k,userId:V,firstName:y.firstName,lastName:y.lastName,email:f,ssn:d,nationalityCountryCode:S?.selectedOption!=null?Z(S.selectedOption):void 0,phone:T,birthday:i!=null?R(i?.toString()):i,syncToken:D,titleAtCompany:O.selectedOption,ownershipInCompany:n,documentTypeSelectedForVerification:I,isSelectedForVerification:g,userVerificationStatus:w,treasuryUserVerificationStatus:N,fileIds:F,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}}));e(U({officers:o}))},onSaveDetailsClick:t=>{e(P(a,t,s))},onSendForVerificationClick:t=>{e(P(a,t,s,!0))},onAddressClick:t=>{const o=j(b,t),m=L(u.state?.pathnameStackToGoBack,u.pathname);l(o,{state:{pathnameStackToGoBack:m}})},onRegisteredAddressClick:t=>{const o=j(b,t),m=L(u.state?.pathnameStackToGoBack,u.pathname);l(o,{state:{pathnameStackToGoBack:m}})},onBackClick:()=>{e(Ue({companyId:a})),l("../setup")},updateFilesEntity:t=>{e(Re({files:t}))},onDeleteFile:t=>{e(Pe(t))},onDeleteFileList:t=>{e(ze(t))},onEditFileName:(t,o)=>{e(Ee(t,o.split(".")[0]))},onGetOtp:t=>{e(Be(t,"SpendManagementSetup"))},onResendOtp:t=>{e(xe(t,"SpendManagementSetup"))},onVerifyOtp:(t,o)=>{e(_e(t,o,"SpendManagementSetup"))},saveNewAddressInLocalStore:(t,o)=>{e(ve({addressType:t,addressToCreate:o}))},onIdentityDocumentUploadedForAutofill:t=>{if(a==null)return;const o=Ne(t.documentType);o!=null&&e(Fe({target:"setup",companyId:a,officerType:t.officerType,fileId:t.fileId,documentType:o}))},onCompanyDocumentUploadedForAutofill:t=>{a!=null&&e(we({target:"setup",companyId:a,fileId:t.fileId,documentType:t.documentType}))},onResetKycKybClick:()=>{e(Ae())}}}))(Ke),rt=({productType:e})=>{const r=se(),a=oe(),s=q(),[p,l]=C.useState(!1),[u,b]=C.useState(!1),{tenantEmailDomain:t}=ie(),o=Ze(),{useDynamicConfig:m}=je(),{configValue:k}=m(Ge.zeniAccountsConfig),V=ye(k),y=h((n=>{switch(e){case"zeni_accounts":return n.zeniAccountSetupViewState.fetchState;case"reimbursement":return n.remiSetupViewState.fetchState;case"charge_cards":return n.chargeCardSetupViewState.fetchState;case"zeni_treasury":return n.treasurySetupViewState.fetchState;default:return n.billPaySetupViewState.fetchState}})),f=h((n=>n.companyConfigState.fetchState)),S=h((n=>n.userRoleConfigState.fetchState)),d=h((n=>z(n))),i=d.companyId??E.getSignedInUserTenant(t)?.companyId;C.useEffect((()=>{f==="Not-Started"&&s(Se()),S==="Not-Started"&&s(ge(!0))}),[f,S,s]),C.useEffect((()=>{p||y!=="Not-Started"||i==null||(l(!0),G(s,e,i))}),[p,y,i,s]);const T=h((n=>{switch(e){case"zeni_accounts":return De(n,i);case"zeni_treasury":return Te(n,i);case"charge_cards":return be(n,i);case"reimbursement":return he(n,i);default:return Ie(n,i)}})),D=T.kycKybResetStatus.fetchState;if(C.useEffect((()=>{D==="Completed"&&i!=null&&(G(s,e,i,!0),s(Oe()))}),[D,i,e,s]),E.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let c;switch(e){case"zeni_accounts":c=d.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":c=d.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":c=d.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||d.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":c=d.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:c=d.companyBillPayInfo?.info?.isBillPayTOSAccepted}const O=n=>{b(n)};return c===!1?A.jsx(re,{to:"../promo"}):A.jsxs($e,{children:[A.jsx(qe,{analytics:M,onLoad:n=>(g=>{switch(e){case"zeni_accounts":return g.trackPageLoaded(B.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return g.trackPageLoaded(B.Event.reimbursementBusinessVerification);default:return g.trackPageLoaded(B.Event.billPayBusinessVerification,x(a)?"Settings":void 0)}})(n)}),x(a)?A.jsx(We,{isAppContentDrawerOpen:u,handleDrawerToggle:O}):null,A.jsx(Je,{businessVerificationDetails:T,navigate:r,location:a,companyId:i,analytics:M,currentTenant:d,productType:e,isSettings:x(a),roleMap:o?.loggedInUserRoleMap??{},onClickMenuIcon:()=>{O(!0)},maxInsuredAmount:V.maxInsuredAmount})]})};export{rt as B,G as d,it as u};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{j as S}from"./liveblocks-Du6nrW5U.js";import{a as r}from"./sentry-DlU3V0QD.js";import{u as he,h as Ce,g as fe,j as H,i as ge,l as Se}from"./core-CJWbgnFM.js";import{e6 as be,a as Pe,e7 as ye,z as Ie,e9 as we,eb as W,ec as Ee,bo as G,a8 as ke,k as j,ed as M,en as xe,G as Ae,U as Te,w as Ue,eg as Oe,eh as _e,av as ve,ek as Qe,el as De,bk as Fe,em as je}from"./index-DvSod3qd.js";import{gN as $e,fH as J,fI as Le,gb as Ve,jo as Re,jk as qe,fJ as N,gx as Be,gr as He,gt as z,gz as Me,gA as Ne,gB as ze,gC as We,gD as Ge}from"./zeni-epic-state-DUCBgtEU.js";import{D as Je,n as L,P as Ye,S as Ke}from"./mui-dbvYX-CF.js";import"./recharts-qq-VgjqX.js";import"./analytics-DYPKn651.js";import"./plaid-BrZReSCz.js";import"./dnd-hHoSpesG.js";import"./stripe-cKAAJElX.js";import"./lottie-BBf_aMXD.js";import"./lexical-CAwA0n9Q.js";import"./pdf-C7M7XqWN.js";import"./utils-C-x5CNgO.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="4c210313-73c1-4cd0-aad3-b644d4c6b189",t._sentryDebugIdIdentifier="sentry-dbid-4c210313-73c1-4cd0-aad3-b644d4c6b189")}catch{}})();const Y="chat-response-generated",K="cards/ask",X="card_policy_hero";function $(t){return`/${t}/cards`}function Z(t){return`/${t}/cards/policy`}const Xe=Se((function(t,s){const d=J(t),l=s.isSubmitting,u=_e(t,{allUsers:s.allUsers,onCardPolicyVendorSearchTextChange:s.onCardPolicyVendorSearchTextChange});return{showSampleQuestions:s.sessionFromUrl==="new_chat"&&d.uiState.currentChatSessionId==null,aiCfoView:d,isSubmitting:l,isNewChatSession:s.sessionFromUrl==="new_chat",isFullView:!0,tableDownloadEndPoint:`${ve}/tableDownload`,exportDownloadEndPoint:Qe(),emailLinkQuestion:s.emailLinkQuestion,autoSubmitEmailLinkQuestion:s.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:s.onEmailLinkQuestionProcessed,isFileUploadEnabled:s.isFileUploadEnabled,isUploadPromoVisible:s.isUploadPromoVisible,onUploadPromoClose:s.onUploadPromoClose,...u}}),(function(t,s){const{location:d,currentTenant:l,userId:u,navigate:o,currentChatSessionId:P,allSessionsWithOrderedQuestionAnswers:C,isAiCardCreationEnabled:x,isCardPolicyEnabled:A,cardPolicyPageContext:T}=s,f=l.tenantEmailDomain,c=d.state?.referrer,h=c===X?Z(f):$(f);return{onEventReceived:(a,n)=>{if(a===Y&&typeof n.text=="string"&&typeof n.metadata=="object"){const e=n,m=Ne(e.type),y=e.metadata.chat_session_id??null,{currentChatSession:U,currentQuestionAnswer:b,currentQuestionAnswerSummary:p}=G(C,y);m!=="answer"?j.trackAICFOChatResponseGenerated(m,b?.question.questionText??"",e.text,y,je(p,U),e.metadata.message_id??null):j.trackAICFOChatAnswerGenerated(e.text,b?.question.questionText??"",(e.follow_up_questions?.length??0)>0,!!e.assumptions,!!e.insights,e.visualization!=null,ze(e.visualization?.type??"")??null,y,e.summarized_title,e.metadata.message_id??null),t(We({chatSessionId:e.metadata.chat_session_id,responseType:m,fetchState:{fetchState:"Completed",error:void 0}})),t(Ge({chatSessionId:e.metadata.chat_session_id,answerPayload:e,userId:u}))}},onSubmit:(a,n,e,m)=>{a&&Fe(t,a,n,P,C,u,m,e,T)},updateCurrentInput:a=>{t(z(a))},onStopSubmit:()=>{},onUpdateScrollYOffset:a=>{t(Me(a))},onSelectSampleQuestion:()=>{},onBackClick:()=>{o(-1)},onCloseClick:()=>{o(h,{state:{...d.state}}),t(z(""))},togglePageView:()=>{o(h,{state:W(d.state)}),s.setIsAiCfoOpen(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{o(-1)},onNewChatClick:()=>{P!=null&&t(He()),o((function(a){return`/${a}/${K}`})(f),{state:{...d.state}})},onToggleCotCollapsed:(a,n)=>{t(Be({questionAnswerId:a,isCollapsed:n}))},...De(t,{isAiCardCreationEnabled:x,isCardPolicyEnabled:A,currentChatSessionId:P,onAfterCardsCreationSubmit:()=>{s.setIsAiCfoOpen(!0),o($(f),{state:{...d.state}})},onAfterCardPolicySubmit:()=>{s.setIsAiCfoOpen(!0),o(`/${f}/cards/policy`,{state:{...d.state}})}})}}))(Ue(Oe)),{spendManagement:{chargeCard:{cardsAiCfoHero:ee,cardPolicyAiCfoHero:te}}}=Ae.getLocalizedStrings(),k=ee.pageTitle,Ze=te.pageTitle,et=ee.chatHeaderSubtitle,tt=te.chatHeaderSubtitle,Pt=({isFileUploadEnabled:t})=>{const s=be(),{setIsAiCfoOpen:d}=Pe(),l=he(),u=Ce(),o=fe(),[P,C]=r.useState(!1),{allUsers:x,isAiCardCreationEnabled:A,isCardPolicyEnabled:T,onCardPolicyVendorSearchTextChange:f}=ye();r.useEffect((()=>{l($e())}),[l]);const c=H((i=>J(i))),h=Ie.getSignedInUser(),{session_id:a}=ge(),n=H((i=>Le(i))),e=c.uiState.currentChatSessionId,m=n.tenantEmailDomain,{handleUploadPromoClose:y,isUploadPromoVisible:U}=we({isFileUploadEnabled:t,tenantEmailDomain:m}),b=o.state,p=b?.aiCfoInitialQuestion??null,O=!!b?.aiCfoShouldSubmit,I=b?.referrer===X,se=I?"card_policy":void 0,ae=r.useMemo((()=>({title:I?Ze:k,subtitle:I?tt:et})),[I]),[oe,_]=r.useState(null),[ne,v]=r.useState(!1),Q=r.useRef(!1);r.useEffect((()=>{Q.current||p==null||p===""||(_(p),v(O),Q.current=!0)}),[p,O]);const ie=r.useCallback((()=>{_(null),v(!1),u(o.pathname,{replace:!0,state:W(o.state)})}),[o.pathname,o.state,u]),re=n.masterTOSInfo,g=re?.isMasterTOSAccepted??!1,E=r.useRef(null);r.useEffect((()=>{if(g&&E.current!=null){const{question:i,shouldSubmit:w}=E.current;E.current=null,_(i),v(w),Q.current=!1}}),[g]);const{visitedSessions:V}=Ee(e),D=c.fetchState,F=c.uiState.chatSessionsNextPageToken.hasMore||!c.uiState.chatSessionsFirstPageFetched,R=e!=null?c.fetchChatSessionHistoryByChatSessionId?.[e]?.fetchState??"Not-Started":"Not-Started",q=e==null||(c.uiState.chatHistoryNextPageToken[e]?.hasMore??!0),B=c.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:le}=G(B,e),de=le.length===0;r.useEffect((()=>{e!=null&&a!==e&&u((function(i,w){return`/${i}/${K}/${w}`})(m,e),{state:{...o.state},replace:!0})}),[e,a,m,u,o.state]),r.useEffect((()=>{a!=null&&e==null&&a!=="new_chat"&&l(Ve({sessionId:a,agentId:"controller"}))}),[]);const ce=r.useMemo((()=>({events:V.map((i=>`private-encrypted-chat-${i}.${Y}`)),eventCallback:(i,w,pe)=>pe.onEventReceived(i,w)})),[V]);if(r.useEffect((()=>{D!=="In-Progress"&&F&&l(Re())}),[D,F,l]),r.useEffect((()=>{e!=null&&R!=="In-Progress"&&q&&h!=null&&D==="Completed"&&!F&&l(qe(e,h.userId))}),[R,q,e,h,l]),h==null)throw Error("Can't access Cards AI CFO page without signing in...");const ue=a??"new_chat",me=e!=null&&c.responseStateByChatSessionId?.[e]?.answer?.fetchState==="In-Progress";return S.jsxs(at,{children:[S.jsx(ke,{analytics:j,onLoad:i=>i.trackPageLoaded(Te.Event.aiCFOPage)}),g?S.jsx(Xe,{answerExportEndPoint:s,...ce,currentChatSessionId:e,allSessionsWithOrderedQuestionAnswers:B,allUsers:x,isAiCardCreationEnabled:A,isCardPolicyEnabled:T,openOnboardingPage:()=>C(!0),userId:h.userId,setIsAiCfoOpen:d,navigate:u,sessionFromUrl:ue,location:o,isSubmitting:me,isEmptyChatWithSession:de,customPageTitle:k,chatHeader:ae,currentTenant:n,emailLinkQuestion:oe??void 0,autoSubmitEmailLinkQuestion:ne,onEmailLinkQuestionProcessed:ie,isFileUploadEnabled:t,isUploadPromoVisible:U,onUploadPromoClose:y,onCardPolicyVendorSearchTextChange:f,cardPolicyPageContext:se}):S.jsx(M,{isTOSAccepted:g,acceptMasterTOSState:c.masterTOSAcceptanceState,customPageTitle:k,onCloseClick:()=>{u(I?Z(m):$(m),{state:{...o.state}})},onCompleteClick:()=>{g||n.userRoleId==null||(p!=null&&p!==""&&(E.current={question:p,shouldSubmit:O}),l(N(n.userRoleId)))}}),S.jsx(Je,{anchor:"right",open:P,transitionDuration:250,PaperProps:{component:ot,style:{width:`${xe}vw`}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>C(!1),children:S.jsx(st,{onClick:i=>i.stopPropagation(),children:S.jsx(M,{isTOSAccepted:g,acceptMasterTOSState:c.masterTOSAcceptanceState,customPageTitle:k,onCloseClick:()=>C(!1),onCompleteClick:()=>{g||n.userRoleId==null||l(N(n.userRoleId)),C(!1)}})})})]})},st=L(Ke)`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
`,at=L.div`
|
|
6
|
+
flex: 1 1 auto;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
min-height: 0;
|
|
10
|
+
width: 100%;
|
|
11
|
+
`,ot=L(Ye)`
|
|
12
|
+
box-shadow: ${({theme:t})=>t.colors.elevation2};
|
|
13
|
+
color: ${({theme:t})=>t.colors.grey4};
|
|
14
|
+
`;export{Pt as default};
|