@zeniai/web-app-ui 5.4.18-dev → 5.4.19-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-4Zeu95kU.js → AccountMappingScreen-BpJDQCQx.js} +2 -2
- package/dist/assets/ActualMatchingMatchDetailScreen-fK8c-oot.js +1 -0
- package/dist/assets/AddressRoutes-_bCuEkwx.js +1 -0
- package/dist/assets/AddressScreen-Dh4KOVQ1.js +9 -0
- package/dist/assets/AiCfoScreen-03lSUwaj.js +22 -0
- package/dist/assets/AppDrawer-DtBNEFvY.js +10 -0
- package/dist/assets/{BillPayApprovalRoutes-B4dh4WxY.js → BillPayApprovalRoutes-D1JvUYMQ.js} +1 -1
- package/dist/assets/{BillPayRoutes-DZx-x_-P.js → BillPayRoutes-DosvZj42.js} +18 -18
- package/dist/assets/BusinessVerificationPageScreen-CeIfGxLQ.js +9 -0
- package/dist/assets/CardsAiCfoScreen-C8_v-BYR.js +14 -0
- package/dist/assets/{ChargeCardRoutes-Db9V9An_.js → ChargeCardRoutes-BZz4pRiz.js} +10 -10
- package/dist/assets/{CompanyPassportScreen-Db20J8Yl.js → CompanyPassportScreen-BieP2EZa.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-C1MNasE2.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-DYKZjGKN.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-De4sHn4O.js → CustomerOnboardingRoutes-DyVqaxvR.js} +3 -3
- package/dist/assets/CustomersRoutes-CtL2o5-n.js +8 -0
- package/dist/assets/DashboardRoutes-7yhAEy7g.js +20 -0
- package/dist/assets/{DefaultTenantHome-BN__AQ5l.js → DefaultTenantHome-DHs0Czed.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-BIF8BW0a.js +18 -0
- package/dist/assets/{DrawerScreen-DUhkZI2Z.js → DrawerScreen-XY9r5sqx.js} +1 -1
- package/dist/assets/EntityDetailRoutes-CLCMxp18.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-DcjeaHHd.js → ExpenseAutomationRoutes-CA-VSGA_.js} +6 -6
- package/dist/assets/{FallBackRoute-orqRsHMl.js → FallBackRoute-BmlOw1z3.js} +2 -2
- package/dist/assets/FeaturePreviewScreen-C2u4cMYG.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-CdL4B6fj.js +1 -0
- package/dist/assets/InboxNotificationsProvider-DvvXiK-n.js +1 -0
- package/dist/assets/InvoicingRoutes-Ds8bd8V8.js +3 -0
- package/dist/assets/MagicLinkRoutes-BCx3YLpp.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-BJFFKbta.js +12 -0
- package/dist/assets/MobileAppDrawer-BLYS912H.js +1 -0
- package/dist/assets/NotFoundScreen-BDU6ccX1.js +1 -0
- package/dist/assets/NotificationRoutes-B3DfKahf.js +1 -0
- package/dist/assets/OAuthConsentScreen-DMS9CTOV.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-D4c4br1B.js +1 -0
- package/dist/assets/PaymentLinkScreen-BEA834bi.js +21 -0
- package/dist/assets/PeopleRoutes-By8BlbIz.js +22 -0
- package/dist/assets/PerformanceRoutes-CQ6Hxkqk.js +1 -0
- package/dist/assets/{Preview-Db0nRlxD.js → Preview-lAFQaJcB.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-BEn_CddB.js → QBOConnectionScreen-DyZaNX6V.js} +1 -1
- package/dist/assets/ReimbursementApprovalRoutes-CPfPh7_I.js +1 -0
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-DrgxKZH7.js +1 -0
- package/dist/assets/ReimbursementRoutes-Bq5czlC0.js +68 -0
- package/dist/assets/ReportsRoutes-DxNr6i5Y.js +1 -0
- package/dist/assets/RewardsRoutes-CO6TuNiV.js +1 -0
- package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-BxMaq7Gq.js +33 -0
- package/dist/assets/ScreenRoutes-LEc4L-Ek.js +2 -0
- package/dist/assets/{SettingsRoutes-CCWla9X1.js → SettingsRoutes-Cc8RIjZt.js} +6 -6
- package/dist/assets/{SetupPagesScreen-C5PRNruc.js → SetupPagesScreen-BgAn4bD3.js} +5 -5
- package/dist/assets/SignInScreen-Di05f1i8.js +1 -0
- package/dist/assets/SignOutScreen-CiQsSj2I.js +9 -0
- package/dist/assets/{TaskListScreen-C7smUYFP.js → TaskListScreen-CBFYc4EW.js} +2 -2
- package/dist/assets/TaskRoutes-w6Z4j7Vq.js +9 -0
- package/dist/assets/TransactionDetailRoutes-ggKexh3-.js +1 -0
- package/dist/assets/{TransactionDetailScreen-CHzsnTr9.js → TransactionDetailScreen-BBWVy8TW.js} +2 -2
- package/dist/assets/{TransactionListRoutes-ChJOrV96.js → TransactionListRoutes-B7kikvJW.js} +1 -1
- package/dist/assets/TreasuryRoutes-DnYXMIpO.js +37 -0
- package/dist/assets/{VendorsRoutes-CVu8jS5h.js → VendorsRoutes-BtVR0Vii.js} +18 -18
- package/dist/assets/WiseConfirmationScreen-8Hcaa3Fc.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-D3ONSR9y.js → ZeniAccountRoutes-VM-T0h6_.js} +10 -10
- package/dist/assets/ZeniAccountStatementScreen-CM9U5Zls.js +9 -0
- package/dist/assets/{accountMappingHelper-CHQgwqfy.js → accountMappingHelper-8C9JQylV.js} +1 -1
- package/dist/assets/{analytics-D051O7ML.js → analytics-u8j262Ga.js} +1 -1
- package/dist/assets/{analyticsHelper-DkNc3mKz.js → analyticsHelper-CKG9W7dC.js} +1 -1
- package/dist/assets/{core-BBlQ3ArL.js → core-BVdj_noT.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-YbpxzvKa.js → decodeURIComponentSafe-JMSvQveN.js} +1 -1
- package/dist/assets/{dnd-CU3yeazS.js → dnd-Ex3ltzzE.js} +1 -1
- package/dist/assets/{empty-BiAWzWBi.js → empty-C5tm1JkN.js} +1 -1
- package/dist/assets/{index-fVadamkP.js → empty-C97tUCQZ.js} +1 -1
- package/dist/assets/{emptyVideoElement-CRPwTqUS.js → emptyVideoElement-Hn3yI6W2.js} +1 -1
- package/dist/assets/epic-BPbLNJeP.js +2 -0
- package/dist/assets/expenseAutomationHelper-BtpowfoM.js +1 -0
- package/dist/assets/{getLocaleForTenant-DTPcYF0O.js → getLocaleForTenant-CI9ZVduS.js} +1 -1
- package/dist/assets/{index-MRZKoeCT.js → index-B1EE-QC-.js} +2 -2
- package/dist/assets/index-BtE2ozWs.js +1 -0
- package/dist/assets/{index-s4pcd-16.js → index-CCd99LPb.js} +1 -1
- package/dist/assets/{index--CQENyaz.js → index-Ch4hjMoy.js} +1 -1
- package/dist/assets/{index-ClwW47Zs.js → index-Dme9CBSK.js} +15750 -15711
- package/dist/assets/{empty-B3C-udVF.js → index-OsAw6lBi.js} +1 -1
- package/dist/assets/{index-jomr_c-N.js → index-TJhTBaFX.js} +1 -1
- package/dist/assets/{index-CaztP9tz.js → index-UCW7ypYi.js} +1 -1
- package/dist/assets/{lexical-DVH-xgq1.js → lexical-CVwGZsIc.js} +1 -1
- package/dist/assets/{liveblocks-CuUK5O_2.js → liveblocks-XOqCw7q2.js} +1 -1
- package/dist/assets/{lottie-Du4lbH8J.js → lottie-C5YZIzuj.js} +1 -1
- package/dist/assets/{mui--aGBnNu2.js → mui-BZ0jnpww.js} +1 -1
- package/dist/assets/{pathToGoBack-DOePc_e5.js → pathToGoBack-BYz7DD9r.js} +1 -1
- package/dist/assets/{pdf-lib-Cvsvldn7.js → pdf-lib-BIDHf6ZS.js} +1 -1
- package/dist/assets/{pdf-CrvsvvW3.js → pdf-q1-3GLH6.js} +3 -3
- package/dist/assets/{plaid-7P9b69CP.js → plaid-CCMRXiQR.js} +1 -1
- package/dist/assets/{pusher-DdvpIMG0.js → pusher-DF-wuBh7.js} +1 -1
- package/dist/assets/{react-CjVSd3S9.js → react-BzblgiCG.js} +1 -1
- package/dist/assets/{react-B8GJK4jq.js → react-CGkIeSIu.js} +1 -1
- package/dist/assets/{react-D-JjM7p6.js → react-Cjn3drUx.js} +1 -1
- package/dist/assets/{react-CUlf2ISA.js → react-Czniha8W.js} +1 -1
- package/dist/assets/{react-Bz6aBujY.js → react-D35bcyMl.js} +1 -1
- package/dist/assets/{react-DoYRVAKa.js → react-znTjPsiU.js} +1 -1
- package/dist/assets/{recharts-CkREU3LH.js → recharts-VHHravhf.js} +1 -1
- package/dist/assets/{reportTimeframe-ChAOzqo_.js → reportTimeframe-BTqRG1HM.js} +1 -1
- package/dist/assets/routePaths-TIOEKAr9.js +1 -0
- package/dist/assets/{sentry-D0lP5-8e.js → sentry-CNIAdl-1.js} +1 -1
- package/dist/assets/stripSplatSuffix-CLHAbjpi.js +1 -0
- package/dist/assets/{url-GwD82u5j.js → url-CyyPACTT.js} +1 -1
- package/dist/assets/{url-nN4BnP9N.js → url-uObfQ0XR.js} +1 -1
- package/dist/assets/useActualMatchingMatchDetail-ClGwke9Y.js +1 -0
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-usJW6KKQ.js → useAiCfoDashboardSuggestedQuestionsChips-CF91keX4.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-DO-bnRp-.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-DPfHk-vM.js → useChargeCardPusherEvents-DTd9bnXH.js} +1 -1
- package/dist/assets/{useDeviceId-pp3Grc-z.js → useDeviceId-CF-WgrL6.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-BJWnx3gQ.js +1 -0
- package/dist/assets/useEnsureVendorListLoaded-U686iOkV.js +1 -0
- package/dist/assets/{useInitialThreadRequest-DmfmyzKI.js → useInitialThreadRequest-DCdvOJx6.js} +1 -1
- package/dist/assets/useIsCustomersTabEnabled-DZ7jecHx.js +1 -0
- package/dist/assets/{useTaskManagerAccess-DrmpkeUw.js → useTaskManagerAccess-Z6bIfXqO.js} +1 -1
- package/dist/assets/{useTaskManagerPusherEvents-CHhZ2DRZ.js → useTaskManagerPusherEvents-Doj7t2BI.js} +1 -1
- package/dist/assets/{utils-Ctp9Zfhk.js → utils-BtSqr9lx.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-CKC1_4cy.js → withTransactionSidePanel-DybBA6JZ.js} +2 -2
- package/dist/assets/{zeni-epic-state-aUBx6G2Q.js → zeni-epic-state-BSu6fdxh.js} +7 -7
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/ActualMatchingMatchDetailScreen-B6pl-MVl.js +0 -1
- package/dist/assets/AddressRoutes-zjWkB0xf.js +0 -1
- package/dist/assets/AddressScreen-Czlolp2X.js +0 -9
- package/dist/assets/AiCfoScreen-BhfmD__h.js +0 -22
- package/dist/assets/AppDrawer-B7GEeTxi.js +0 -10
- package/dist/assets/BusinessVerificationPageScreen-je1np7-9.js +0 -9
- package/dist/assets/CardsAiCfoScreen-abedaxWu.js +0 -14
- package/dist/assets/ConnectionAuthScreen-BmJpUHtJ.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-Deo-LVYJ.js +0 -1
- package/dist/assets/DashboardRoutes-CCGs4e1_.js +0 -20
- package/dist/assets/DomesticWireDetailScreen-6W-Er5_q.js +0 -18
- package/dist/assets/EntityDetailRoutes-BrJAd36h.js +0 -1
- package/dist/assets/FeaturePreviewScreen-Dcu53_tf.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-ClZsPGpZ.js +0 -1
- package/dist/assets/InboxNotificationsProvider-DiTDJFwP.js +0 -1
- package/dist/assets/InvoicingRoutes-BTvzZ8JV.js +0 -3
- package/dist/assets/MagicLinkRoutes-V1DxaNiW.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-DnCx8Y6G.js +0 -12
- package/dist/assets/MobileAppDrawer-Bql3K6nh.js +0 -1
- package/dist/assets/NotFoundScreen-CTik05r2.js +0 -1
- package/dist/assets/NotificationRoutes-wSm6mA8N.js +0 -1
- package/dist/assets/OAuthConsentScreen-BELrcqAy.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-Dpao8SIb.js +0 -1
- package/dist/assets/PaymentLinkScreen-vbM_NtP3.js +0 -21
- package/dist/assets/PeopleRoutes-CJeBX2Ca.js +0 -22
- package/dist/assets/PerformanceRoutes-W4NxEUmH.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-CSZJghRB.js +0 -1
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-kqCAU4nf.js +0 -1
- package/dist/assets/ReimbursementRoutes-BUZKWvJ7.js +0 -68
- package/dist/assets/ReportsRoutes-BUZ4r7hx.js +0 -1
- package/dist/assets/RewardsRoutes-DuYZ4TXP.js +0 -1
- package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-DN2DZsFw.js +0 -33
- package/dist/assets/ScreenRoutes-CxP9HSCe.js +0 -2
- package/dist/assets/SignInScreen-BScZ138a.js +0 -1
- package/dist/assets/SignOutScreen-Bk-Y8Sbv.js +0 -9
- package/dist/assets/TaskRoutes-DPcu4NRR.js +0 -9
- package/dist/assets/TransactionDetailRoutes-yEwix446.js +0 -1
- package/dist/assets/TreasuryRoutes-C24SAGLB.js +0 -37
- package/dist/assets/WiseConfirmationScreen-Dt6hB5m-.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-CmfHt6Wr.js +0 -9
- package/dist/assets/epic-DwBfFPJQ.js +0 -2
- package/dist/assets/expenseAutomationHelper-SA0jUIyg.js +0 -1
- package/dist/assets/index-ae04Qn4V.js +0 -1
- package/dist/assets/routePaths-D0jOibXk.js +0 -1
- package/dist/assets/stripSplatSuffix-CFosfir7.js +0 -1
- package/dist/assets/useActualMatchingMatchDetail-nJ3hpXEY.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-CWWQxV2L.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-B6j7j1rG.js +0 -1
- package/dist/assets/useEnsureVendorListLoaded-COBYTL2U.js +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-CuUK5O_2.js";import{h as q,u as le,g as K,i as ee,j as v,N as Q,l as Y,q as tt,n as nt,o as y}from"./core-BBlQ3ArL.js";import{fI as X,WB as _e,bp as Ia,T8 as it,bn as va,bJ as de,WC as ka,HB as wa,I_ as Re,Ic as ot,bm as Ce,WD as lt,WE as st,c7 as rt,WF as ct,ma as xa,WG as Ba,WH as Ca,Js as Ue,HU as xe,WI as dt,Hp as ea,WJ as ut,Nk as pt,Ht as mt,Hz as Aa,WK as Se,WL as Ge,I$ as Me,HR as Da,WM as bt,WN as ht,J2 as Ne,WO as gt,J8 as St,WP as Ea,ID as aa,II as yt,WQ as ft,WR as ce,WS as Ta,WT as ja,WU as Pa,gZ as It,HZ as Ve,cx as Fa,WV as vt,gk as kt,WW as wt,WX as xt,eq as Ra,ep as Va,WY as Oe,WZ as Bt,W_ as Ct,VH as We,W$ as At,VJ as ie,VI as ze,X0 as Dt,X1 as Et,X2 as Tt,IK as ta,IH as jt,X3 as Pt,X4 as Ft,X5 as Rt,It as Vt,X6 as $t,X7 as Lt,cl as $a,eb as La,ml as _t,bO as Ut,bv as _a,bP as Ua,GF as Gt,X8 as Mt,N7 as Nt,Nd as Ot,CJ as Wt,J0 as zt,Jz as Ht,my as ge,X9 as Zt,Xa as Ga,n0 as Xt,ms as Ma,mN as Na,mM as na,bE as pe,bN as Jt,Xb as qt,Xc as ye,kY as Kt,Xd as ia,Xe as Yt,l0 as Qt,ll as en,JN as an,Xf as tn,mV as nn,JD as on,Xg as oa,JH as ln,JM as sn,JK as rn,JB as cn,Xh as Oa,HK as dn,Xi as un,Xj as pn,gJ as mn,gI as bn,gH as hn,mB as gn,mT as la,n2 as Sn,vc as yn,mK as fn,JF as In,l6 as vn,n7 as kn,Xk as wn,k_ as xn,v3 as Bn,Xl as Cn,Iz as An,bK as Dn,br as En,ha as Tn,ee as jn,ed as Pn,cw as Fn,cD as Rn}from"./zeni-epic-state-aUBx6G2Q.js";import{z as V,V as fe,al as He,p as oe,N as f,au as Ze,a8 as se,R as A,a9 as Ae,d as E,aH as Vn,a5 as Z,aj as Xe,q as D,a2 as Ie,aI as sa,aJ as ra,aK as $n,aL as Ln,ag as _n,aM as Un,ac as Wa,G as De,ah as Je,aN as Gn,af as za,aO as Mn,aC as Nn,U as Ha,w as On,aP as Wn,aQ as zn,aR as Hn,aS as Zn,aT as Xn,aU as Jn,aV as qn,aW as Kn,aX as Yn,h as Qn,aY as ei,aZ as ai,a_ as ti,az as ni,a$ as ii,i as oi}from"./index-ClwW47Zs.js";import{u as ue,n as _,S as li}from"./mui--aGBnNu2.js";import{A as ca}from"./AddressScreen-Czlolp2X.js";import{g as ne,a as Ee,i as Za,V as qe,b as Ke,c as si,v as ri,d as ci,A as me,D as be}from"./DomesticWireDetailScreen-6W-Er5_q.js";import{a as g}from"./sentry-D0lP5-8e.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-CWWQxV2L.js";import{u as Xa}from"./useInitialThreadRequest-DmfmyzKI.js";import{u as di}from"./BusinessVerificationPageScreen-je1np7-9.js";import Be from"./NotFoundScreen-CTik05r2.js";import{D as ui}from"./DrawerScreen-DUhkZI2Z.js";import{M as Ja}from"./MobileAppDrawer-Bql3K6nh.js";import{F as qa}from"./FeaturePreviewScreen-Dcu53_tf.js";import{S as Te}from"./SetupPagesScreen-C5PRNruc.js";import{B as pi}from"./BillPayApprovalRoutes-B4dh4WxY.js";import{F as mi}from"./FallBackRoute-orqRsHMl.js";import"./recharts-CkREU3LH.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./utils-Ctp9Zfhk.js";import"./routePaths-D0jOibXk.js";import"./InboxNotificationsProvider-DiTDJFwP.js";import"./useTaskManagerAccess-DrmpkeUw.js";import"./analyticsHelper-DkNc3mKz.js";import"./useEnsureVendorListLoaded-COBYTL2U.js";import"./ReimbursementApprovalRuleDetailScreen-kqCAU4nf.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="c71977b5-e079-4a33-acf0-0da9e15082ec",e._sentryDebugIdIdentifier="sentry-dbid-c71977b5-e079-4a33-acf0-0da9e15082ec")}catch{}})();const bi=Y((function(e,a){const l=_e(e,a.billId),n=V.getSignedInUser(),c=e.tenantState.currentTenantId,r={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:c??""},u=Z(a.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}=lt(l.billActivities,st(a.currentTenant),n);i=S,d=h}const p=rt(a.currentTenant?.userRole??[]),m=l.transactionDetails!=null&&ct(l.transactionDetails,p,n);return{billDetails:l,isAccountingClassesEnabled:xa(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${Xe}/transaction_attachment`,signedInUser:n,showBackButton:o,isAdmin:p,isRealTimeApprovalEnabled:a.isRealTimeApprovalEnabled,showApproveRejectBtns:i,showMarkAsPaidButtonToApprover:d,hasZeniAssistAccess:a.hasZeniAssistAccess,analytics:E,showMarkAsPaidButtonToCreator:m}}),(function(e,a){const{billId:l,currentTenant:n,location:c,navigate:r}=a,{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(Aa(l))},cancelAndDeleteBill:(o,s)=>{s===!0?E.trackBillPayCancelAndDeleteBill(l,o):E.trackBillPayCancelBill(l),e(mt(l,s))},onSaveRealTimeApprovals:o=>{e(pt(l,"bill_pay",o))},updateEditRealTimeApproverClicked:o=>{e(ut({isEdit:o,entityId:l,entityType:"bill_pay"}))},approveOrRejectBill:o=>{o.type==="approved"?e(ea(l,o.type,"")):e(ea(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=Z(a.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(dt({billId:a.billId}))},onRefundPaymentClick:()=>{e(xe(a.billId,"refund"))},saveBillDetails:(o,s,i)=>{o&&e(Ca({data:i,billId:l})),e(Ue(o?"paid":"pending_approval",o,s,l))},discardOutsideZeniPaymentData:()=>{e(Ba({billId:l}))}}}))(Vn);function hi(){const e=q(),a=le(),l=K(),{billId:n}=ee(),c=ue(),r=V.getSignedInUser(),u=fe(),o=v((U=>X(U))),s=v((U=>_e(U,n??""))),i=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Xa(o?.companyId,{clearParams:s.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:m}=Ye({mobileExploreReferrer:"Bill Details"});He({isDataReady:s.fetchState==="Completed"});const S=o?.userRole!=null&&Ia(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:W}=$(Ze.zeniAssistConfig),z=it(o),w=va(o.userRole),M=h&&de(u?.loggedInUserRoleMap),L=W.user_ids!=null&&r?.userId!=null&&W.user_ids.includes(r?.userId),{isFeatureEnabled:H}=k(f.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:J}=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&&a(ka(n))}),[n]),g.useEffect((()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(C(!0),a(wa(n??"",O,L,!1)))}),[b,s,n,a]),g.useEffect((()=>{I||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(j(!0),a(Re(!1,O,L,J,n)),s.billActivities[0]?.isRealTimeApprovalEnabled===!0&&a(ot()))}),[I,s,n,a,O,L,J]),r==null)throw Error("Can't access address page without signing in...");return s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1?t.jsx(Q,{to:`./edit${l.search}`}):s.deleteStatus.fetchState==="In-Progress"||s.cancelAndDeleteStatus.fetchState==="In-Progress"||s.cancelStatus.fetchState==="In-Progress"?t.jsx(se,{fetchState:s.deleteStatus.fetchState,style:{boxShadow:`0px 2px ${A.sp1} ${c.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[t.jsx(Ae,{analytics:E,onLoad:U=>(N=>{n!=null&&N.trackBillPayBillDetails(n,s.isRecurring)})(U)}),t.jsx(bi,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:O,location:l,navigate:e,isRealTimeApprovalEnabled:B,currentTenant:o,billId:n??"",isInternationalPaymentShaVsOurEnabled:H,hasZeniAssistAccess:L,isDetectInsufficientFundsEnabled:G,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const $e=De.getLocalizedStrings().spendManagement.billPay.billDetails,da=De.getLocalizedStrings().common,gi={containerWidth:new Wa(100,58)},ua=Y((function(e,a){const l=V.getSignedInUser(),n=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:n??""},r=a.showActionButtons,u=r&&a.file==null;return{uploadInvoiceEndPoint:`${za.communicationAgentMicroServiceBaseUrl}`,authParams:c,billId:a.billId,file:a.file,showAutofill:a.showAutofill,analytics:E,entityId:a.billId,showTitlebarIcon:r,showTitlebar:r&&a?.file!=null,uploadStatus:a.uploadStatus,shouldNotShowAttachment:u,style:{paddingTop:A.sp10,paddingRight:A.sp3,paddingBottom:"15px",paddingLeft:A.sp5,...a.showAutofill?{}:{backgroundColor:a.backgroundColor,paddingBottom:"128px"}}}}),(function(e,a){const l=V.getSignedInUser();return{onInvoiceUpload:n=>{n!=null&&(a.file!=null||a.billId!=null||a.isInitialEdit?(a.setPayload(n),a.setShowConfirmationPopup(!0)):e(Ne(n,a.isVendorRecommendationEnabled,a.billId)))},updateInvoiceUploadFetchState:n=>{e(St({fetchState:{fetchState:n,error:void 0},billId:a.billId}))},onSkipAutofill:n=>{E?.trackBillPaySkipAutofill(),e(Me(n))},onDeleteClick:()=>{e(gt({billId:a.billId})),E?.trackInvoiceActionClick(a.billStage??"","delete",l?.userEmail??"",null)}}}))(Un);function x({appContent:e}){const a=le(),l=q(),{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(Ze.zeniAssistConfig),I=C.user_ids!=null&&i?.userId!=null&&C.user_ids.includes(i?.userId),j=v((P=>X(P)));di();const[B,T]=g.useState(!1),[k,$]=g.useState(!1),[O,G]=g.useState(!1),[W,z]=g.useState(),w=v((P=>Ge(P,m,h,n)));let M=w.fetchState,L=w.file,H=w.showAutofill;const J=v((P=>_e(P,n??"")));u===!1&&(M=J.fetchState,L=J.transactionDetails?.attachments?.[0],H=!1);const U=w.billPayInfo!=null&&w.billPayInfo.stage.code==="pending_approval"?w.billPayInfo.billStatus.code:w.billStage;g.useEffect((()=>{n==null&&a(Me(!0))}),[n,a]),g.useEffect((()=>{M==="Not-Started"&&(u&&k?$(!1):!u&&B&&T(!1))}),[n]),g.useEffect((()=>{B||n==null||u||(T(!0),a(wa(n,S,I,!1)),a(Da(n)),k||($(!0),a(Re(!1,S,I,b,n)))),u&&!k&&($(!0),a(Re(!1,S,I,b,n)))}),[B,k,u,n,a,S,I,b]);const N={onOkClick:()=>{if(G(!1),!W)return;const P=L!=null?"replace":"upload";E?.trackInvoiceActionClick(U??"",P,i?.userEmail??"","yes"),a(ht({replaceBillData:!0,billId:n})),a(Ne(W,m,n))},onCancelClick:()=>{if(G(!1),!W)return;const P=L!=null?"replace":"upload";E?.trackInvoiceActionClick(U??"",P,i?.userEmail??"","no"),a(bt({file:W,billId:n}))}},ae=g.useCallback((()=>{const P=Z(c.state?.pathnameStackToGoBack),ve=P.poppedPathname??ne(j.tenantEmailDomain);a(Se({billId:n})),l(ve,{state:{pathnameStackToGoBack:P.newStack}})}),[c.state,j.tenantEmailDomain,n,a,l]);if(i==null)throw Error("Can't access address page without signing in...");if(M==="Error"||J.fetchState==="Error")return t.jsx(Be,{});if(M!="Completed")return n==null&&o!=="small"?t.jsx(sa,{fallback:ae,children:t.jsxs(je,{windowSize:o,children:[t.jsx(ma,{}),t.jsx(Pe,{}),t.jsx(ua,{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:U}),t.jsx(Fe,{windowSize:o,children:t.jsx(ra,{isNewBill:!0})})]})}):t.jsxs(je,{windowSize:o,children:[o==="small"||H?null:t.jsx(pa,{children:t.jsx(Ka,{onClick:ae,"data-testid":"nav-bar-back-click"})}),o!=="small"?t.jsx(Pe,{}):null,t.jsx($n,{}),t.jsx(Fe,{windowSize:o,children:t.jsx(ra,{isNewBill:n==null})})]});{const P=w.billPayInfo!=null&&w.billPayInfo.stage.code==="pending_approval"?w.billPayInfo.billStatus.code:w.billStage;return t.jsx(sa,{fallback:ae,children:t.jsxs(je,{windowSize:o,children:[H&&o!=="small"?t.jsx(ma,{}):null,O?t.jsx(Ln,{titleComponent:t.jsx(wi,{children:$e.overwriteTitle}),descriptionComponent:t.jsx(xi,{children:$e.overwriteDescription}),primaryButtonText:da.yes,secondaryButtonText:da.no,action:N,isEditPopup:!0}):null,o==="small"||H?null:t.jsx(pa,{children:t.jsx(Si,{})}),o!=="small"?t.jsx(Pe,{}):null,t.jsx(ua,{backgroundColor:s.colors.grey4,billId:n,file:L,showAutofill:H,uploadStatus:w.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:yi(u,J,w),setShowConfirmationPopup:G,setPayload:z,showActionButtons:fi(u,w),isInitialEdit:!!w.isInitialEdit,billStage:P}),t.jsx(Fe,{windowSize:o,children:e})]})})}}function Si(){const{triggerBack:e}=Gn();return t.jsx(Ka,{onClick:e,"data-testid":"nav-bar-back-click"})}function yi(e,a,l){let n,c;return e?(n=l.recurringConfig?.currentInstance,c=l.recurringConfig?.totalPaymentCycles):(n=a.transactionDetails?.recurringBillInstance,c=a.recurringBillConfigDetail?.totalPaymentCycles),a?.isRecurring===!0?t.jsxs(Ii,{children:[t.jsx(vi,{children:`${$e.recurringBill.recurringCycle}
|
|
2
|
-
${n}/${c}`}),t.jsx(ki,{})]}):void 0}function fi(e,a){const l=a.billActivities?.[0],n=a.billStage==="pending_approval"&&l?.areApprovalsSerialized===!0&&l?.currentPendingStepIndex===0;return e&&(a.billStage==="draft"||n)}const pa=
|
|
1
|
+
import{j as t}from"./liveblocks-XOqCw7q2.js";import{h as q,u as le,g as K,i as ee,j as v,N as Y,l as Q,q as tt,n as nt,o as y}from"./core-BVdj_noT.js";import{fJ as H,WM as Ue,bp as Ia,Tj as it,bn as va,bK as de,WN as ka,HL as wa,J8 as Re,Im as ot,bm as Ce,WO as lt,WP as st,c8 as rt,WQ as ct,mb as xa,WR as Ba,WS as Ca,JC as _e,I2 as xe,WT as dt,Hz as ea,WU as ut,Nu as pt,HD as mt,HJ as Aa,WV as Se,WW as Ge,J9 as Me,H$ as Da,WX as bt,WY as ht,Jc as Ne,WZ as gt,Ji as St,W_ as Ea,IN as aa,IS as yt,W$ as ft,X0 as ce,X1 as Ta,X2 as ja,X3 as Pa,g_ as It,I7 as Ve,cz as Fa,X4 as vt,gl as kt,X5 as wt,X6 as xt,er as Ra,eq as Va,X7 as Oe,X8 as Bt,X9 as Ct,VS as ze,Xa as At,VU as ie,VT as We,Xb as Dt,Xc as Et,Xd as Tt,IU as ta,IR as jt,Xe as Pt,Xf as Ft,Xg as Rt,ID as Vt,Xh as $t,Xi as Lt,cm as $a,ec as La,mm as Ut,bP as _t,bw as Ua,bQ as _a,GP as Gt,Xj as Mt,Nh as Nt,Nn as Ot,CT as zt,Ja as Wt,JJ as Xt,mz as ge,Xk as Zt,Xl as Ga,n1 as Ht,mt as Ma,mO as Na,mN as na,bF as pe,bO as Jt,Xm as qt,Xn as ye,kZ as Kt,Xo as ia,Xp as Qt,l1 as Yt,lm as en,JX as an,Xq as tn,mW as nn,JN as on,Xr as oa,JR as ln,JW as sn,JU as rn,JL as cn,Xs as Oa,HU as dn,Xt as un,Xu as pn,gK as mn,gJ as bn,gI as hn,mC as gn,mU as la,n3 as Sn,vm as yn,mL as fn,JP as In,l7 as vn,n8 as kn,Xv as wn,k$ as xn,vd as Bn,Xw as Cn,IJ as An,bL as Dn,bs as En,hb as Tn,ef as jn,ee as Pn,cy as Fn,cF as Rn}from"./zeni-epic-state-BSu6fdxh.js";import{z as V,V as fe,al as Xe,p as oe,_ as f,au as Ze,a8 as se,N as A,a9 as Ae,c as E,aH as Vn,a5 as Z,aj as He,s as D,a2 as Ie,aI as sa,aJ as ra,aK as $n,aL as Ln,ag as Un,aM as _n,ac as za,G as De,ah as Je,aN as Gn,af as Wa,aO as Mn,aC as Nn,R as Xa,w as On,aP as zn,aQ as Wn,aR as Xn,aS as Zn,aT as Hn,aU as Jn,aV as qn,aW as Kn,aX as Qn,j as Yn,aY as ei,aZ as ai,a_ as ti,az as ni,a$ as ii,i as oi}from"./index-Dme9CBSK.js";import{u as ue,n as U,S as li}from"./mui-BZ0jnpww.js";import{A as ca}from"./AddressScreen-Dh4KOVQ1.js";import{g as ne,a as Ee,i as Za,V as qe,b as Ke,c as si,v as ri,d as ci,A as me,D as be}from"./DomesticWireDetailScreen-BIF8BW0a.js";import{a as g}from"./sentry-CNIAdl-1.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-DO-bnRp-.js";import{u as Ha}from"./useInitialThreadRequest-DCdvOJx6.js";import{u as di}from"./BusinessVerificationPageScreen-CeIfGxLQ.js";import Be from"./NotFoundScreen-BDU6ccX1.js";import{D as ui}from"./DrawerScreen-XY9r5sqx.js";import{M as Ja}from"./MobileAppDrawer-BLYS912H.js";import{F as qa}from"./FeaturePreviewScreen-C2u4cMYG.js";import{S as Te}from"./SetupPagesScreen-BgAn4bD3.js";import{B as pi}from"./BillPayApprovalRoutes-D1JvUYMQ.js";import{F as mi}from"./FallBackRoute-BmlOw1z3.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";import"./routePaths-TIOEKAr9.js";import"./InboxNotificationsProvider-DvvXiK-n.js";import"./useTaskManagerAccess-Z6bIfXqO.js";import"./useIsCustomersTabEnabled-DZ7jecHx.js";import"./analyticsHelper-CKG9W7dC.js";import"./useEnsureVendorListLoaded-U686iOkV.js";import"./ReimbursementApprovalRuleDetailScreen-DrgxKZH7.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="972cecbc-6344-4871-ad44-c32ac020456d",e._sentryDebugIdIdentifier="sentry-dbid-972cecbc-6344-4871-ad44-c32ac020456d")}catch{}})();const bi=Q((function(e,a){const l=Ue(e,a.billId),n=V.getSignedInUser(),c=e.tenantState.currentTenantId,r={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:c??""},u=Z(a.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}=lt(l.billActivities,st(a.currentTenant),n);i=S,d=h}const p=rt(a.currentTenant?.userRole??[]),m=l.transactionDetails!=null&&ct(l.transactionDetails,p,n);return{billDetails:l,isAccountingClassesEnabled:xa(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${He}/transaction_attachment`,signedInUser:n,showBackButton:o,isAdmin:p,isRealTimeApprovalEnabled:a.isRealTimeApprovalEnabled,showApproveRejectBtns:i,showMarkAsPaidButtonToApprover:d,hasZeniAssistAccess:a.hasZeniAssistAccess,analytics:E,showMarkAsPaidButtonToCreator:m}}),(function(e,a){const{billId:l,currentTenant:n,location:c,navigate:r}=a,{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(Aa(l))},cancelAndDeleteBill:(o,s)=>{s===!0?E.trackBillPayCancelAndDeleteBill(l,o):E.trackBillPayCancelBill(l),e(mt(l,s))},onSaveRealTimeApprovals:o=>{e(pt(l,"bill_pay",o))},updateEditRealTimeApproverClicked:o=>{e(ut({isEdit:o,entityId:l,entityType:"bill_pay"}))},approveOrRejectBill:o=>{o.type==="approved"?e(ea(l,o.type,"")):e(ea(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=Z(a.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(dt({billId:a.billId}))},onRefundPaymentClick:()=>{e(xe(a.billId,"refund"))},saveBillDetails:(o,s,i)=>{o&&e(Ca({data:i,billId:l})),e(_e(o?"paid":"pending_approval",o,s,l))},discardOutsideZeniPaymentData:()=>{e(Ba({billId:l}))}}}))(Vn);function hi(){const e=q(),a=le(),l=K(),{billId:n}=ee(),c=ue(),r=V.getSignedInUser(),u=fe(),o=v((_=>H(_))),s=v((_=>Ue(_,n??""))),i=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Ha(o?.companyId,{clearParams:s.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:m}=Qe({mobileExploreReferrer:"Bill Details"});Xe({isDataReady:s.fetchState==="Completed"});const S=o?.userRole!=null&&Ia(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}=$(Ze.zeniAssistConfig),W=it(o),w=va(o.userRole),M=h&&de(u?.loggedInUserRoleMap),L=z.user_ids!=null&&r?.userId!=null&&z.user_ids.includes(r?.userId),{isFeatureEnabled:X}=k(f.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:J}=k(f.billPaySetupShowInternationalPaymentByWise);if(g.useEffect((()=>{O&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&W===!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,W,r]),g.useEffect((()=>{n!=null&&a(ka(n))}),[n]),g.useEffect((()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(C(!0),a(wa(n??"",O,L,!1)))}),[b,s,n,a]),g.useEffect((()=>{I||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(j(!0),a(Re(!1,O,L,J,n)),s.billActivities[0]?.isRealTimeApprovalEnabled===!0&&a(ot()))}),[I,s,n,a,O,L,J]),r==null)throw Error("Can't access address page without signing in...");return s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1?t.jsx(Y,{to:`./edit${l.search}`}):s.deleteStatus.fetchState==="In-Progress"||s.cancelAndDeleteStatus.fetchState==="In-Progress"||s.cancelStatus.fetchState==="In-Progress"?t.jsx(se,{fetchState:s.deleteStatus.fetchState,style:{boxShadow:`0px 2px ${A.sp1} ${c.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[t.jsx(Ae,{analytics:E,onLoad:_=>(N=>{n!=null&&N.trackBillPayBillDetails(n,s.isRecurring)})(_)}),t.jsx(bi,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:O,location:l,navigate:e,isRealTimeApprovalEnabled:B,currentTenant:o,billId:n??"",isInternationalPaymentShaVsOurEnabled:X,hasZeniAssistAccess:L,isDetectInsufficientFundsEnabled:G,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const $e=De.getLocalizedStrings().spendManagement.billPay.billDetails,da=De.getLocalizedStrings().common,gi={containerWidth:new za(100,58)},ua=Q((function(e,a){const l=V.getSignedInUser(),n=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:n??""},r=a.showActionButtons,u=r&&a.file==null;return{uploadInvoiceEndPoint:`${Wa.communicationAgentMicroServiceBaseUrl}`,authParams:c,billId:a.billId,file:a.file,showAutofill:a.showAutofill,analytics:E,entityId:a.billId,showTitlebarIcon:r,showTitlebar:r&&a?.file!=null,uploadStatus:a.uploadStatus,shouldNotShowAttachment:u,style:{paddingTop:A.sp10,paddingRight:A.sp3,paddingBottom:"15px",paddingLeft:A.sp5,...a.showAutofill?{}:{backgroundColor:a.backgroundColor,paddingBottom:"128px"}}}}),(function(e,a){const l=V.getSignedInUser();return{onInvoiceUpload:n=>{n!=null&&(a.file!=null||a.billId!=null||a.isInitialEdit?(a.setPayload(n),a.setShowConfirmationPopup(!0)):e(Ne(n,a.isVendorRecommendationEnabled,a.billId)))},updateInvoiceUploadFetchState:n=>{e(St({fetchState:{fetchState:n,error:void 0},billId:a.billId}))},onSkipAutofill:n=>{E?.trackBillPaySkipAutofill(),e(Me(n))},onDeleteClick:()=>{e(gt({billId:a.billId})),E?.trackInvoiceActionClick(a.billStage??"","delete",l?.userEmail??"",null)}}}))(_n);function x({appContent:e}){const a=le(),l=q(),{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(Ze.zeniAssistConfig),I=C.user_ids!=null&&i?.userId!=null&&C.user_ids.includes(i?.userId),j=v((P=>H(P)));di();const[B,T]=g.useState(!1),[k,$]=g.useState(!1),[O,G]=g.useState(!1),[z,W]=g.useState(),w=v((P=>Ge(P,m,h,n)));let M=w.fetchState,L=w.file,X=w.showAutofill;const J=v((P=>Ue(P,n??"")));u===!1&&(M=J.fetchState,L=J.transactionDetails?.attachments?.[0],X=!1);const _=w.billPayInfo!=null&&w.billPayInfo.stage.code==="pending_approval"?w.billPayInfo.billStatus.code:w.billStage;g.useEffect((()=>{n==null&&a(Me(!0))}),[n,a]),g.useEffect((()=>{M==="Not-Started"&&(u&&k?$(!1):!u&&B&&T(!1))}),[n]),g.useEffect((()=>{B||n==null||u||(T(!0),a(wa(n,S,I,!1)),a(Da(n)),k||($(!0),a(Re(!1,S,I,b,n)))),u&&!k&&($(!0),a(Re(!1,S,I,b,n)))}),[B,k,u,n,a,S,I,b]);const N={onOkClick:()=>{if(G(!1),!z)return;const P=L!=null?"replace":"upload";E?.trackInvoiceActionClick(_??"",P,i?.userEmail??"","yes"),a(ht({replaceBillData:!0,billId:n})),a(Ne(z,m,n))},onCancelClick:()=>{if(G(!1),!z)return;const P=L!=null?"replace":"upload";E?.trackInvoiceActionClick(_??"",P,i?.userEmail??"","no"),a(bt({file:z,billId:n}))}},ae=g.useCallback((()=>{const P=Z(c.state?.pathnameStackToGoBack),ve=P.poppedPathname??ne(j.tenantEmailDomain);a(Se({billId:n})),l(ve,{state:{pathnameStackToGoBack:P.newStack}})}),[c.state,j.tenantEmailDomain,n,a,l]);if(i==null)throw Error("Can't access address page without signing in...");if(M==="Error"||J.fetchState==="Error")return t.jsx(Be,{});if(M!="Completed")return n==null&&o!=="small"?t.jsx(sa,{fallback:ae,children:t.jsxs(je,{windowSize:o,children:[t.jsx(ma,{}),t.jsx(Pe,{}),t.jsx(ua,{backgroundColor:s.colors.grey4,billId:n,file:L,showAutofill:!0,uploadStatus:w.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:G,setPayload:W,showActionButtons:!1,isInitialEdit:!!w.isInitialEdit,billStage:_}),t.jsx(Fe,{windowSize:o,children:t.jsx(ra,{isNewBill:!0})})]})}):t.jsxs(je,{windowSize:o,children:[o==="small"||X?null:t.jsx(pa,{children:t.jsx(Ka,{onClick:ae,"data-testid":"nav-bar-back-click"})}),o!=="small"?t.jsx(Pe,{}):null,t.jsx($n,{}),t.jsx(Fe,{windowSize:o,children:t.jsx(ra,{isNewBill:n==null})})]});{const P=w.billPayInfo!=null&&w.billPayInfo.stage.code==="pending_approval"?w.billPayInfo.billStatus.code:w.billStage;return t.jsx(sa,{fallback:ae,children:t.jsxs(je,{windowSize:o,children:[X&&o!=="small"?t.jsx(ma,{}):null,O?t.jsx(Ln,{titleComponent:t.jsx(wi,{children:$e.overwriteTitle}),descriptionComponent:t.jsx(xi,{children:$e.overwriteDescription}),primaryButtonText:da.yes,secondaryButtonText:da.no,action:N,isEditPopup:!0}):null,o==="small"||X?null:t.jsx(pa,{children:t.jsx(Si,{})}),o!=="small"?t.jsx(Pe,{}):null,t.jsx(ua,{backgroundColor:s.colors.grey4,billId:n,file:L,showAutofill:X,uploadStatus:w.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:yi(u,J,w),setShowConfirmationPopup:G,setPayload:W,showActionButtons:fi(u,w),isInitialEdit:!!w.isInitialEdit,billStage:P}),t.jsx(Fe,{windowSize:o,children:e})]})})}}function Si(){const{triggerBack:e}=Gn();return t.jsx(Ka,{onClick:e,"data-testid":"nav-bar-back-click"})}function yi(e,a,l){let n,c;return e?(n=l.recurringConfig?.currentInstance,c=l.recurringConfig?.totalPaymentCycles):(n=a.transactionDetails?.recurringBillInstance,c=a.recurringBillConfigDetail?.totalPaymentCycles),a?.isRecurring===!0?t.jsxs(Ii,{children:[t.jsx(vi,{children:`${$e.recurringBill.recurringCycle}
|
|
2
|
+
${n}/${c}`}),t.jsx(ki,{})]}):void 0}function fi(e,a){const l=a.billActivities?.[0],n=a.billStage==="pending_approval"&&l?.areApprovalsSerialized===!0&&l?.currentPendingStepIndex===0;return e&&(a.billStage==="draft"||n)}const pa=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(Je.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
|
-
`,Ka=
|
|
20
|
+
`,Ka=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 t}from"./liveblocks-CuUK5O_2.js";import{h as q,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 t}from"./liveblocks-CuUK5O_2.js";import{h as q,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 t}from"./liveblocks-CuUK5O_2.js";import{h as q,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
|
-
`,ma=
|
|
54
|
+
`,ma=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(Je.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(Je.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=
|
|
80
|
+
`,Bi=Q((function(e,a){return{billsReviewView:Ea(e),analytics:a.analytics}}),(function(e,a){return{onCloseOverlay:()=>{a.navigate(`/${a.tenantEmailDomain}/bills`),e(ce())},onCloseReviewItem:l=>{e(ft(l))},onProceedForBulkActionClick:(l,n)=>{switch(l){case"send_for_approval":e(yt());break;case"approve":case"review":e(aa("approved",n??""));break;case"reject":e(aa("rejected",n??""))}}}}))(Mn);function Ci({tenantEmailDomain:e}){const a=q(),l=v((c=>c.billsBulkActionViewState.bulkSubmissionFetchState.fetchState)),{billsForReview:n}=v((c=>Ea(c)));return g.useEffect((()=>{l!=="Completed"&&n.length!==0||a(`/${e}/bills`)}),[l,n.length,e]),t.jsx(Bi,{navigate:a,analytics:E,tenantEmailDomain:e})}const te=Ct(),Qa="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 t}from"./liveblocks-CuUK5O_2.js";import{h as q,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=
|
|
88
|
+
`,Di=Q((function(e,a){const l=V.getSignedInUser(),n=Ce(l),c=Pa(e,te,a.isBulkActionEnabled,l?.userId);let r=c.allSubTabs;a.isUserHasOnlyBillpayAccess&&a.roleMap&&c.currentTab==="pending_approval"&&(a.roleMap.bill_pay_analyst?r=r.filter((b=>b==="all"||b==="overdue"||b==="rejected"||b==="deleted")):a.roleMap.bill_pay_approver&&(r=r.filter((b=>b==="all"||b==="awaiting_my_approval"||b==="overdue"||b==="rejected"||b==="deleted")))),a.isShowDeletedBillsEnabled===!1&&(r=r.filter((b=>b!=="deleted")));const u=e.entityAutoCompleteState.autoCompleteText.common,o=ze(e,"common"),s=e.tenantState.currentTenantId,i=H(e),d=i?.companyName??"",p={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""},m=e.billListState.downloadUIState.downloadState,S=c.fetchState,h=At(e);return{transactionList:a.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:te,spendManagementEndPoint:`${He}/spendManagement`,isShowDeletedBillsEnabled:a.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:a.isShowDeletedReimbursementEnabled},downloadState:m,isBulkActionAllowed:c.billListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:c.billListBulkActionInfo?.billsSelectedForBulkAction,allowedBulkActions:c.billListBulkActionInfo?.allowedBulkActions,isZeniUser:n,billPayApprovalRulesAffectedEntityIds:h.affectedEntityIds}}),(function(e,a){const{navigate:l,currentTenant:n,location:c,period:r}=a,{tenantEmailDomain:u}=n;return{updateTabToState:o=>{e(ce()),e(Ta(o))},onSubtabChange:o=>{e(ce()),e(ja(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}=a.currentTenant;E?.trackBillPayNewBill();const s=`/${o}/bill/new`,i=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i}})},onSearchTextChanged:o=>{e($t(o))},onReloadTransactions:()=>{e(Ve(r,!0,a.isShowDeletedBillsEnabled,a.isInternationalWireEnabled)),e(Vt(n.companyId,!0))},onNavigateToSettings:()=>{l("../bills/setup")},onBackClick:()=>{l("../",{relative:"path"})},onFiltersChange:o=>{e(Rt({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(Ft({uiState:{downloadState:o}}))},updateBulkActionList:o=>{e(Pt(o))},removeAllTransactionsFromBulkActionList:()=>{e(ce())},onProceedForBulkActionClick:(o,s)=>{switch(o){case"delete":case"cancel":e(jt(o,s??""));break;case"send_for_approval":e(ta("send_for_approval")),a.navigate("./bulk-review");break;case"approve":e(ta("approve")),a.navigate("./bulk-review");break;case"review":e(Tt()),a.navigate("./bulk-review")}},onBillPayApprovalRulesEventReceived:o=>{o.endsWith(Le)&&e(Et(!1))},onEventReceived:o=>{o===Qa&&e(Dt())},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:o=>{o.trim().length>=2?e(We({searchString:o,entityType:"vendor",searchOrigin:"common"})):o.trim().length===0&&e(ie("common"))},onCancelAutoComplete:()=>{e(ie("common"))}}}}))(On(zn));function Ei(){const e=q(),a=le(),l=K(),n=Ie(),c=l.state,r=fe(),[u,o]=g.useState(!1),[s,i]=g.useState(null),d=tt("/:tenantEmailDomain/bills/bulk-review")!=null;g.useEffect((()=>(c?.tab!=null&&c?.subTab!=null&&(a(Ta(c?.tab)),a(ja(c?.subTab))),()=>{a(ce())})),[]);const p=V.getSignedInUser(),m=v((F=>H(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=>Pa(F,te,B,p?.userId))),{isFeatureEnabled:O}=C(f.isDebitCardFeatureEnabled),G=$.fetchState,{isAiCfoAccessEnabled:z,onAskAiCfoClick:W}=Qe({mobileExploreReferrer:"Bills List"});Xe({isDataReady:G==="Completed"});const w=!!m.companyBillPayInfo?.info?.isBillPayTOSAccepted,M=!!m.companyBillPayInfo?.info?.isBillPayEnabled,L=v((F=>It(F.companyState,m.companyId))),X=L?.company.featuresActivationInfo.connectedAccountProvider;if(g.useEffect((()=>{!h&&M&&S&&(b(!0),a(Ve(te,!0,I,T)))}),[h,te,S,a]),p==null)throw Error("Can't access address page without signing in...");const J=(F,re)=>{a(Bt({uiState:{sortKey:F,sortOrder:re},period:te}))},_=Fa(r?.loggedInUserRoleMap),N=de(r?.loggedInUserRoleMap),ae=F=>{o(F)},{billsProcessed:P,billsProcessing:ve}=v((F=>vt(F)));g.useEffect((()=>{P===ve&&s!=null&&(a(kt({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:wt(s)}]})),a(xt()),setTimeout((()=>{a(Ve(te,!0,I,!0,T))}),3e3),i(null))}),[P,ve]);const Ya={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${Qa}`,`private-encrypted-${m.companyId}.${Le}`]:[],eventCallback:(F,re,Ye)=>{F.endsWith(Le)?Ye.onBillPayApprovalRulesEventReceived?.(F):re?.entity_type==="bill"&&(i(re.operation_type),Ye.onEventReceived(F))}},et=Ra(O,m),at=Va(m);return l.pathname.endsWith("/bills/")||l.pathname.endsWith("/bills")||l.pathname.endsWith("/bills/bulk-review")?et===!0||at===!0?t.jsx(qa,{}):M?t.jsxs(t.Fragment,{children:[G==="Completed"?t.jsx(Ae,{analytics:E,onLoad:F=>(re=>re.trackPageLoaded(Xa.Event.billPayHome))(F)}):null,t.jsxs(Ai,{windowSize:n,children:[t.jsx(Ja,{isAppContentDrawerOpen:u,handleDrawerToggle:ae}),t.jsx(ui,{isOpen:d,drawerLeftMargin:new za(0,0,300,600),onClose:()=>{e(`/${m.tenantEmailDomain}/bills`),a(ce())},children:t.jsx(ji,{onClick:F=>F.stopPropagation(),children:t.jsx(Ci,{tenantEmailDomain:m.tenantEmailDomain})})}),t.jsx(Di,{location:l,navigate:e,currentTenant:m,entity:"bill_pay",period:te,isAdmin:!1,uiState:$.uiState,onColumnSortConfigChanged:J,isUserHasOnlyBillpayAccess:_,isShowDeletedBillsEnabled:I,isShowDeletedReimbursementEnabled:j,isBulkActionEnabled:B,roleMap:r?.loggedInUserRoleMap,onClickMenuIcon:()=>{ae(!0)},isDownloadEnabled:$.isDownloadEnabled,connectedAccountProvider:X,bulkSubmissionLimit:$.billBulkSubmissionLimit,bulkSubmissionFetchState:$.billListBulkActionInfo.bulkSubmissionFetchState,isRecurringBillInBulkActionList:$.billListBulkActionInfo.isRecurringBillInBulkActionList,isInternationalWireEnabled:T,isDetectInsufficientFundsEnabled:k,isAiCfoAccessEnabled:z,onAskAiCfoClick:W,...Ya})]})]}):w===!0&&N===!0?t.jsx(Y,{to:"../setup"}):r!=null&&Oe(m,r.loggedInUserRoleMap)?t.jsx(Y,{to:"../promo"}):t.jsx(se,{fetchState:G}):t.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=Y((function(e,a){const l=V.getSignedInUser(),n=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:n??""},r=Z(a.location.state?.pathnameStackToGoBack);let u=!0;r.poppedPathname?.includes("bills")===!0&&(u=!1);const o=e.entityAutoCompleteState.autoCompleteText.common,s=We(e,"common");let i=`${l?.firstName} ${l?.lastName}`;const d=Ce(l);a.billId!=null&&a.billDetailsView!=null&&(i=`${a.billDetailsView.createdBy?.firstName??Fi} ${a.billDetailsView.createdBy?.lastName??""}`),d||!a.billDetailsView.createdBy?.email?.includes("zeni.ai")||(i="Zeni");const p=a.billDetailsView.editBillInitialDetails?.totalAmount?.amount,m=Ut(a.billDetailsView.paymentDetailsSection?.paymentType?.method),S=a.currentTenant.createTime,h=_a(),b=a.sameDayAchDisablementConfig.newTenantTenureLimitMonths,C=S.add(b,"month").isAfter(h),I=!!(a.billDetailsView.billStage==="draft"&&m&&p!=null&&p>0)&&!Ua(p,a.billDetailsView.approvalRules.allApprovalRules,l,a.billDetailsView.vendor?.id,a.billDetailsView.classId),j=X(e);return{billDetails:a.billDetailsView,isAccountingClassesEnabled:xa(e),billId:a.billId,createdBy:i,createTime:a.billDetailsView?.createTime,authParams:c,transactionAttachmentEndpoint:`${Xe}/transaction_attachment`,analytics:E,showBackButton:u,isAdmin:a.isBillPayAdmin,isSuperAdmin:a.isSuperAdmin,connectedAccountProvider:j.company?.featuresActivationInfo.connectedAccountProvider??"",customerSearchAutoCompleteData:{autoCompleteText:o,entityAutoCompleteView:s},showMarkAsPaidInfo:I,isZeniUser:d,isNewUser:C,sameDayAchDisablementConfig:a.sameDayAchDisablementConfig}}),(function(e,a){const{billId:l,companyId:n,currentTenant:c,location:r,navigate:u,billDetailsView:o}=a,{tenantEmailDomain:s}=c;return{editVendor:i=>{e(na(i));const d=ha(s,i,l),p=D(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})},chooseNewVendor:i=>{const d=i??a.billDetailsView.addBillAutoFields.tentativeVendorName;d!=null&&e(Ma(d,!1)),e(Na({localData:{vendorName:i??a.billDetailsView.addBillAutoFields.tentativeVendorName}})),e(na());const p=ha(s,void 0,l),m=D(r.state?.pathnameStackToGoBack,r.pathname);u(p,{state:{pathnameStackToGoBack:m}})},onInvoiceUpload:i=>{i!=null&&e(Ne(i,a.isVendorRecommendationEnabled))},updateShowAutofill:i=>{e(Me(i))},onSaveChangesToLocalStore:(i,d,p,m,S)=>{const h=_i(a.billDetailsView,{...i,paymentDetails:{...i?.paymentDetails,paymentDate:S}},p,d,a.isInternationalPaymentShaVsOurEnabled,m,a.vendor);e(Xt({billDetailLocalData:h,billId:l}))},saveBillDetails:()=>{e(Ue("draft",!1,!1,l)),e(ie("common"))},updateBillDetailSaveBillCode:()=>{e(Ga("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(Zt()),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=Za(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:()=>{a.navigate("../")},deleteBill:()=>{l!=null&&e(Aa(l))},onAttachmentClick:(i,d)=>{const p=Ee(s,i,d);window.open(`${p}`,"_blank")},onBackClick:()=>{const i=Z(a.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(Ht(i,d,l))},onWiseVerifyClick:()=>{let i="";i=Xn()?"https://sandbox.transferwise.tech":"https://wise.com";const d=`${i}/login`;window.open(d,"_blank")},onVendorSelected:i=>{e(zt(!0,i,l))},onInternationalWireVerifyClick:()=>{window.open(`/${s}/bills/international-wire`)},onFetchLinkTokenClick:(i,d)=>{e(Wt("bill_pay_detail",i,d))},onEstablishConnectionClick:i=>{e(Ot(i,n,"bill_pay_detail","bill_pay"))},onUpdatePaymentAccountStatus:(i,d,p)=>{e(Nt(i,d,"bill_pay","bill_pay_detail",p))},onEstablishConnectionSuccess:()=>{e(Gt("bill_pay","bill_pay_detail")),e(Mt({billId:l,withdrawFromAccountId:o.newAddedBillPaymentAccountId,withdrawFromList:o.withdrawFromList}))}}}))(zn);function ba(){const e=q(),a=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(Ze.sameDayAchDisablementConfig),j=Lt(I),B=V.getSignedInUser(),T=v((N=>X(N))),k=v((N=>Ge(N,p,S,n))),$=Xa(T?.companyId,{clearParams:k.fetchState==="Completed"}),{isAiCfoAccessEnabled:O,onAskAiCfoClick:G}=Ye({mobileExploreReferrer:"Bill Details"});He({isDataReady:k.fetchState==="Completed"});const W=T.companyId??V.getSignedInUserTenant(c)?.companyId,z=fe(),w=$a(z?.loggedInUserRoleMap),M=La(z?.loggedInUserRoleMap),L=de(z?.loggedInUserRoleMap),H=va(T.userRole);if(g.useEffect((()=>{n!=null&&l(ka(n))}),[n]),g.useEffect((()=>{n!=null&&l(Da(n))}),[n,l]),B==null)throw Error("Can't access address page without signing in...");const J=v((N=>_t(N.accountState,N.accountListState,"billPayAccountList"))),U={pathname:"../",search:a.search};return k.isDeleted===!0||k.billStage=="paid"||k.fetchState=="Not-Started"?t.jsx(Q,{to:U}):k.deleteStatus.fetchState==="In-Progress"||s?t.jsx(se,{fetchState:k.deleteStatus.fetchState}):t.jsxs(t.Fragment,{children:[t.jsx(Ae,{analytics:E,onLoad:N=>(ae=>{n!=null&&k.deleteStatus.fetchState!=="Completed"&&ae.trackBillPayEditBill(n,k.isRecurring)})(N)}),t.jsx(Ri,{initialOpenThreadRequest:$??void 0,location:a,navigate:e,currentTenant:T,billId:n,companyId:W,billDetailsView:k,isMagicLinkEnabled:o,isVendorRecommendationEnabled:p,isLocalCurrencyEnabled:d,uncategorizedAccounts:J,isInternationalPaymentShaVsOurEnabled:i,vendor:k.vendor,isShaDisabled:h,isOurDisabled:b,isRecurringBillsFeatureEnabled:m,hasZeniAccountsAdminAccess:w,isZeniAccountsUser:M,isBillPayAdmin:L,isSuperAdmin:H,isDetectInsufficientFundsEnabled:C,sameDayAchDisablementConfig:j,isAiCfoAccessEnabled:O,onAskAiCfoClick:G})]})}const ha=(e,a,l)=>{let n=`/${e}/bill/`;return l==null?n=a!=null?n.concat(`new/vendor/${encodeURIComponent(a)}/edit`):n.concat("new/vendor/create"):(n=n.concat(`${encodeURIComponent(l)}/edit/vendor/`),n=a!=null?n.concat(`${encodeURIComponent(a)}/edit`):n.concat("create")),n},Vi=(e,a)=>{let l=`/${e}/bill/`;return l=a===void 0?l.concat("new/review"):l.concat(`${a}/edit/review`),l},$i=(e,a,l)=>{let n=`/${e}/bill/`;return n=l!=null?n.concat(`${encodeURIComponent(l)}/edit/`):n.concat("new/"),n=n.concat(`vendor/${encodeURIComponent(a)}/edit/ach`),n},Li=(e,a,l)=>{let n=`/${e}/bill/`;return n=l!=null?n.concat(`${encodeURIComponent(l)}/edit/`):n.concat("new/"),n=n.concat(`vendor/${encodeURIComponent(a)}/edit/domestic`),n},R="paymentDetails",_i=(e,a,l,n,c,r,u)=>{const o={invoiceNumber:a.whatFor.invoiceNumber,memo:a.whatFor.memo,invoiceDate:a.whatFor.invoiceDate?pe(a.whatFor.invoiceDate.toString()):_a(),billDueDate:a.whatFor.billDueDate?pe(a.whatFor.billDueDate.toString()):void 0,currencyCode:a.whatFor.currency,recipientCurrencyCode:a.whatFor.recipientCurrency,isInvoiceDateAutoUpdated:a.whatFor.isInvoiceDateAutoUpdated},s={paymentDate:a[R]?.paymentDate?pe(a[R].paymentDate.toString()):void 0,paymentType:a[R]?.paymentType!=null?a[R]?.paymentType:void 0,paymentTo:r?.id,withdrawFrom:e.withdrawFromList.find((b=>b.id===a[R]?.withdrawFrom?.selectedOption)),internationalTransferFeeBearerPaymentMethod:a[R]?.paymentType?.method!=null&&a[R].paymentType.method.includes(Jt)&&u?.vendorCurrencyCode===he.currencyCode&&c?a[R]?.internationalTransferFeeBearerPaymentMethod:void 0,conversionRate:e.paymentDetailsSection?.conversionRate},i=r?.type==="Contact"?r?.email:void 0,d=!!i,p=a[R]?.recurringPaymentType?.selectedOption===Pi.recurringBill.paymentTypeOptions[1],m={isActive:e.recurringConfig?.isActive??!1,currentInstance:e.recurringConfig?.currentInstance,isApprovalRequired:a[R]?.recurringPaymentDetails?.requireApproval?.selectedOption==="all",frequency:qt(a[R]?.recurringPaymentDetails?.frequency?.selectedOption),endDate:a[R]?.recurringPaymentDetails?.endDateSelector?.date!=null?pe(a[R]?.recurringPaymentDetails?.endDateSelector.date.toString()):void 0,startDate:a[R]?.recurringPaymentDetails?.startDate?pe(a[R]?.recurringPaymentDetails?.startDate.toString()):void 0,endDateSelectorOptionType:a[R]?.recurringPaymentDetails?.endDateSelector?.type,totalPaymentCycles:a[R]?.recurringPaymentDetails?.endDateSelector?.recurringCount??0,updateRecurringBills:a[R]?.recurringPaymentDetails?.updateRecurringBills},S=Ui(e.accountList.accounts,e.classList.classes,e.lineDetailSection,a.lineItems,n,l),h=Object.keys(S).length>0?Hn(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,a,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=a.find((p=>p.classId===o.class.selectedOption)));const d=Zn(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=_.div`
|
|
92
|
+
`,{common:{currency:he},spendManagement:{billPay:{billDetails:Pi}},appName:Fi}=De.getLocalizedStrings(),Ri=Q((function(e,a){const l=V.getSignedInUser(),n=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:n??""},r=Z(a.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);a.billId!=null&&a.billDetailsView!=null&&(i=`${a.billDetailsView.createdBy?.firstName??Fi} ${a.billDetailsView.createdBy?.lastName??""}`),d||!a.billDetailsView.createdBy?.email?.includes("zeni.ai")||(i="Zeni");const p=a.billDetailsView.editBillInitialDetails?.totalAmount?.amount,m=_t(a.billDetailsView.paymentDetailsSection?.paymentType?.method),S=a.currentTenant.createTime,h=Ua(),b=a.sameDayAchDisablementConfig.newTenantTenureLimitMonths,C=S.add(b,"month").isAfter(h),I=!!(a.billDetailsView.billStage==="draft"&&m&&p!=null&&p>0)&&!_a(p,a.billDetailsView.approvalRules.allApprovalRules,l,a.billDetailsView.vendor?.id,a.billDetailsView.classId),j=H(e);return{billDetails:a.billDetailsView,isAccountingClassesEnabled:xa(e),billId:a.billId,createdBy:i,createTime:a.billDetailsView?.createTime,authParams:c,transactionAttachmentEndpoint:`${He}/transaction_attachment`,analytics:E,showBackButton:u,isAdmin:a.isBillPayAdmin,isSuperAdmin:a.isSuperAdmin,connectedAccountProvider:j.company?.featuresActivationInfo.connectedAccountProvider??"",customerSearchAutoCompleteData:{autoCompleteText:o,entityAutoCompleteView:s},showMarkAsPaidInfo:I,isZeniUser:d,isNewUser:C,sameDayAchDisablementConfig:a.sameDayAchDisablementConfig}}),(function(e,a){const{billId:l,companyId:n,currentTenant:c,location:r,navigate:u,billDetailsView:o}=a,{tenantEmailDomain:s}=c;return{editVendor:i=>{e(na(i));const d=ha(s,i,l),p=D(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})},chooseNewVendor:i=>{const d=i??a.billDetailsView.addBillAutoFields.tentativeVendorName;d!=null&&e(Ma(d,!1)),e(Na({localData:{vendorName:i??a.billDetailsView.addBillAutoFields.tentativeVendorName}})),e(na());const p=ha(s,void 0,l),m=D(r.state?.pathnameStackToGoBack,r.pathname);u(p,{state:{pathnameStackToGoBack:m}})},onInvoiceUpload:i=>{i!=null&&e(Ne(i,a.isVendorRecommendationEnabled))},updateShowAutofill:i=>{e(Me(i))},onSaveChangesToLocalStore:(i,d,p,m,S)=>{const h=Ui(a.billDetailsView,{...i,paymentDetails:{...i?.paymentDetails,paymentDate:S}},p,d,a.isInternationalPaymentShaVsOurEnabled,m,a.vendor);e(Ht({billDetailLocalData:h,billId:l}))},saveBillDetails:()=>{e(_e("draft",!1,!1,l)),e(ie("common"))},updateBillDetailSaveBillCode:()=>{e(Ga("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(Zt()),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=Za(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:()=>{a.navigate("../")},deleteBill:()=>{l!=null&&e(Aa(l))},onAttachmentClick:(i,d)=>{const p=Ee(s,i,d);window.open(`${p}`,"_blank")},onBackClick:()=>{const i=Z(a.location.state?.pathnameStackToGoBack),d=i.poppedPathname??ne(s);u(d,{state:{pathnameStackToGoBack:i.newStack}})},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,d)=>{i.trim().length>=2?e(We({searchString:i,entityType:d,searchOrigin:"common"})):i.trim().length===0&&e(ie("common"))},onCancelAutoComplete:()=>{e(ie("common"))}},addVendorContactEmail(i,d){e(Xt(i,d,l))},onWiseVerifyClick:()=>{let i="";i=Hn()?"https://sandbox.transferwise.tech":"https://wise.com";const d=`${i}/login`;window.open(d,"_blank")},onVendorSelected:i=>{e(Wt(!0,i,l))},onInternationalWireVerifyClick:()=>{window.open(`/${s}/bills/international-wire`)},onFetchLinkTokenClick:(i,d)=>{e(zt("bill_pay_detail",i,d))},onEstablishConnectionClick:i=>{e(Ot(i,n,"bill_pay_detail","bill_pay"))},onUpdatePaymentAccountStatus:(i,d,p)=>{e(Nt(i,d,"bill_pay","bill_pay_detail",p))},onEstablishConnectionSuccess:()=>{e(Gt("bill_pay","bill_pay_detail")),e(Mt({billId:l,withdrawFromAccountId:o.newAddedBillPaymentAccountId,withdrawFromList:o.withdrawFromList}))}}}))(Wn);function ba(){const e=q(),a=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(Ze.sameDayAchDisablementConfig),j=Lt(I),B=V.getSignedInUser(),T=v((N=>H(N))),k=v((N=>Ge(N,p,S,n))),$=Ha(T?.companyId,{clearParams:k.fetchState==="Completed"}),{isAiCfoAccessEnabled:O,onAskAiCfoClick:G}=Qe({mobileExploreReferrer:"Bill Details"});Xe({isDataReady:k.fetchState==="Completed"});const z=T.companyId??V.getSignedInUserTenant(c)?.companyId,W=fe(),w=$a(W?.loggedInUserRoleMap),M=La(W?.loggedInUserRoleMap),L=de(W?.loggedInUserRoleMap),X=va(T.userRole);if(g.useEffect((()=>{n!=null&&l(ka(n))}),[n]),g.useEffect((()=>{n!=null&&l(Da(n))}),[n,l]),B==null)throw Error("Can't access address page without signing in...");const J=v((N=>Ut(N.accountState,N.accountListState,"billPayAccountList"))),_={pathname:"../",search:a.search};return k.isDeleted===!0||k.billStage=="paid"||k.fetchState=="Not-Started"?t.jsx(Y,{to:_}):k.deleteStatus.fetchState==="In-Progress"||s?t.jsx(se,{fetchState:k.deleteStatus.fetchState}):t.jsxs(t.Fragment,{children:[t.jsx(Ae,{analytics:E,onLoad:N=>(ae=>{n!=null&&k.deleteStatus.fetchState!=="Completed"&&ae.trackBillPayEditBill(n,k.isRecurring)})(N)}),t.jsx(Ri,{initialOpenThreadRequest:$??void 0,location:a,navigate:e,currentTenant:T,billId:n,companyId:z,billDetailsView:k,isMagicLinkEnabled:o,isVendorRecommendationEnabled:p,isLocalCurrencyEnabled:d,uncategorizedAccounts:J,isInternationalPaymentShaVsOurEnabled:i,vendor:k.vendor,isShaDisabled:h,isOurDisabled:b,isRecurringBillsFeatureEnabled:m,hasZeniAccountsAdminAccess:w,isZeniAccountsUser:M,isBillPayAdmin:L,isSuperAdmin:X,isDetectInsufficientFundsEnabled:C,sameDayAchDisablementConfig:j,isAiCfoAccessEnabled:O,onAskAiCfoClick:G})]})}const ha=(e,a,l)=>{let n=`/${e}/bill/`;return l==null?n=a!=null?n.concat(`new/vendor/${encodeURIComponent(a)}/edit`):n.concat("new/vendor/create"):(n=n.concat(`${encodeURIComponent(l)}/edit/vendor/`),n=a!=null?n.concat(`${encodeURIComponent(a)}/edit`):n.concat("create")),n},Vi=(e,a)=>{let l=`/${e}/bill/`;return l=a===void 0?l.concat("new/review"):l.concat(`${a}/edit/review`),l},$i=(e,a,l)=>{let n=`/${e}/bill/`;return n=l!=null?n.concat(`${encodeURIComponent(l)}/edit/`):n.concat("new/"),n=n.concat(`vendor/${encodeURIComponent(a)}/edit/ach`),n},Li=(e,a,l)=>{let n=`/${e}/bill/`;return n=l!=null?n.concat(`${encodeURIComponent(l)}/edit/`):n.concat("new/"),n=n.concat(`vendor/${encodeURIComponent(a)}/edit/domestic`),n},R="paymentDetails",Ui=(e,a,l,n,c,r,u)=>{const o={invoiceNumber:a.whatFor.invoiceNumber,memo:a.whatFor.memo,invoiceDate:a.whatFor.invoiceDate?pe(a.whatFor.invoiceDate.toString()):Ua(),billDueDate:a.whatFor.billDueDate?pe(a.whatFor.billDueDate.toString()):void 0,currencyCode:a.whatFor.currency,recipientCurrencyCode:a.whatFor.recipientCurrency,isInvoiceDateAutoUpdated:a.whatFor.isInvoiceDateAutoUpdated},s={paymentDate:a[R]?.paymentDate?pe(a[R].paymentDate.toString()):void 0,paymentType:a[R]?.paymentType!=null?a[R]?.paymentType:void 0,paymentTo:r?.id,withdrawFrom:e.withdrawFromList.find((b=>b.id===a[R]?.withdrawFrom?.selectedOption)),internationalTransferFeeBearerPaymentMethod:a[R]?.paymentType?.method!=null&&a[R].paymentType.method.includes(Jt)&&u?.vendorCurrencyCode===he.currencyCode&&c?a[R]?.internationalTransferFeeBearerPaymentMethod:void 0,conversionRate:e.paymentDetailsSection?.conversionRate},i=r?.type==="Contact"?r?.email:void 0,d=!!i,p=a[R]?.recurringPaymentType?.selectedOption===Pi.recurringBill.paymentTypeOptions[1],m={isActive:e.recurringConfig?.isActive??!1,currentInstance:e.recurringConfig?.currentInstance,isApprovalRequired:a[R]?.recurringPaymentDetails?.requireApproval?.selectedOption==="all",frequency:qt(a[R]?.recurringPaymentDetails?.frequency?.selectedOption),endDate:a[R]?.recurringPaymentDetails?.endDateSelector?.date!=null?pe(a[R]?.recurringPaymentDetails?.endDateSelector.date.toString()):void 0,startDate:a[R]?.recurringPaymentDetails?.startDate?pe(a[R]?.recurringPaymentDetails?.startDate.toString()):void 0,endDateSelectorOptionType:a[R]?.recurringPaymentDetails?.endDateSelector?.type,totalPaymentCycles:a[R]?.recurringPaymentDetails?.endDateSelector?.recurringCount??0,updateRecurringBills:a[R]?.recurringPaymentDetails?.updateRecurringBills},S=_i(e.accountList.accounts,e.classList.classes,e.lineDetailSection,a.lineItems,n,l),h=Object.keys(S).length>0?Xn(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,a,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=a.find((p=>p.classId===o.class.selectedOption)));const d=Zn(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 t}from"./liveblocks-CuUK5O_2.js";import{h as q,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=
|
|
101
|
+
`,Mi=Q((function(e,a){const{vendorId:l,billId:n}=a,c=ye(e,l),r=Ge(e,a.isVendorRecommendationEnabled,a.isZeniAccountsFeatureEnabled,n);return{billId:n,isDisabled:c.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:c,file:r.file,bankAccountContext:a.bankAccountContext}}),(function(e,a){const{billId:l,navigate:n,location:c,vendorId:r,currentTenant:u}=a,{tenantEmailDomain:o}=u;return{onFetchBankNameBySwift:s=>{e(en(s))},onSaveHandler:()=>{e(Yt(a.bankAccountContext,r))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:i}=s;e(Qt({data:i}))},onCancel:()=>{(()=>{const s=Z(c.state?.pathnameStackToGoBack),i=s.poppedPathname??ga();n(i,{state:{pathnameStackToGoBack:s.newStack}})})(),e(ia())},onAddressClick:s=>{const i=Ke(o,s,l),d=D(c.state?.pathnameStackToGoBack,c.pathname);n(i,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{e(Kt({fetchState:"Not-Started"}));const s=Z(a.location.state?.pathnameStackToGoBack),i=s.poppedPathname??ga(0);a.navigate(i,{state:{pathnameStackToGoBack:s.newStack}}),e(ia())}}}))(Jn);function Ni(){const e=q(),a=K(),l=Ie(),{vendorId:n,billId:c}=ee(),{useFeatureGate:r}=oe(),u=ue(),o=V.getSignedInUser(),s=v((h=>H(h))),i=Z(a.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"?t.jsx(se,{fetchState:p.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:u.colors.grey5,boxShadow:`0px 2px ${A.sp1} ${u.colors.dropShadowNormal}`}}):t.jsxs(Gi,{windowSize:l,children:[t.jsx(qe,{vendorId:n,billId:c}),t.jsx(Mi,{location:a,navigate:e,billId:c,vendorId:n,currentTenant:s,bankAccountContext:d,isVendorRecommendationEnabled:m,isZeniAccountsFeatureEnabled:S})]})}const ga=(e=2)=>{let a="../";for(let l=0;l<e;l++)a=`${a}../`;return a},Oi=U.div`
|
|
102
102
|
display: flex;
|
|
103
103
|
height: 100vh;
|
|
104
104
|
width: 100%;
|
|
@@ -107,7 +107,7 @@ import{j as t}from"./liveblocks-CuUK5O_2.js";import{h as q,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,a){const{vendorId:l}=a,n=ye(e,l),c=l!=null?n.editVendorState?.vendorDetailLocalData?.vendorType:n.newVendorState?.vendorDetailLocalData?.vendorType,r=tn(e,c||"international_business",a.billId),u=n.editVendorState??n.newVendorState,o=a.billId!=null?e.editBillDetailViewState.editBillStateById[nn(a.billId)].billDetailLocalData.recipientTotalAmount?.amount:e.editBillDetailViewState.newBillState.billDetailLocalData.recipientTotalAmount?.amount;return{internationalWireView:r,vendorViewDetails:n,bankAccountContext:a.bankAccountContext,vendorType:c||"international_business",addressType:"vendor_address",addressToEdit:u?.vendorNewAddressStatus?.addressToCreate,mailingAddress:u?.vendorAddress,billAmount:o??0}}),(function(e,a){const{billId:l,navigate:n,location:c,vendorId:r,currentTenant:u}=a,{tenantEmailDomain:o}=u;return{onSaveHandler:()=>{e(cn(a.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=Z(c.state?.pathnameStackToGoBack),i=s.poppedPathname??Sa();n(i,{state:{pathnameStackToGoBack:s.newStack}})})(),e(oa())},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=Z(a.location.state?.pathnameStackToGoBack),i=s.poppedPathname??Sa(0);a.navigate(i,{state:{pathnameStackToGoBack:s.newStack}}),e(oa())}}}))(qn);function Wi(){const e=q(),a=K(),l=Ie(),{vendorId:n,billId:c}=ee(),r=le(),u=ue(),o=V.getSignedInUser(),s=v((B=>H(B))),i=Z(a.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(an(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"?t.jsx(se,{fetchState:j.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:u.colors.grey5,boxShadow:`0px 2px ${A.sp1} ${u.colors.dropShadowNormal}`}}):t.jsxs(Oi,{windowSize:l,children:[t.jsx(qe,{vendorId:n,billId:c}),t.jsx(zi,{location:a,navigate:e,billId:c,vendorId:n,currentTenant:s,bankAccountContext:I})]})}const Sa=(e=2)=>{let a="../";for(let l=0;l<e;l++)a=`${a}../`;return a},ya=U.div`
|
|
111
111
|
display: flex;
|
|
112
112
|
height: 100vh;
|
|
113
113
|
width: 100%;
|
|
@@ -116,4 +116,4 @@ import{j as t}from"./liveblocks-CuUK5O_2.js";import{h as q,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
|
-
`,Hi=Y((function(e,a){const l=V.getSignedInUser(),n=Oa(e,a.billId),c=un(e),r=Ce(l),u=n.totalAmount.amount,o=n.billPayInfo?.stage.code!=="scheduled"&&c.allApprovalRules.length>0&&!Ua(u,c.allApprovalRules,l,n.vendor?.id,n.classId);return{billDetails:n,billId:a.billId,billpayApprovalView:c,analytics:E,isApprovalRequiredForMarkAsPaid:o,isZeniUser:r}}),(function(e,a){const{location:l,billId:n,currentTenant:c,navigate:r}=a,{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(Ca({billId:n,data:s})),e(Ue(o?"paid":"pending_approval",o,!1,n))},discardOutsideZeniPaymentData:()=>{e(Ba({billId:n}))},updateBillDetailSaveBillCode:()=>{e(Ga("pending_approval"))},onClickEdit:()=>{a.navigate("../",{relative:"path"})},onAttachmentClick:(o,s)=>{const i=Ee(u,o,s);window.open(`${i}`,"_blank")},retryPayment:()=>{a.billId!=null&&e(xe(a.billId,"retry"))}}}))(Yn);function fa(){const e=q(),a=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=Z(l.state?.pathnameStackToGoBack),{poppedPathname:m}=p,{isFeatureEnabled:S}=c(f.isRecurringBillsFeatureEnabled),h=v((I=>X(I))),b=v((I=>Oa(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&&a(dn(I,j,B,T,k,n))}),[]),m==null)return t.jsx(Q,{to:`../${n}`});if(s==null)throw Error("Can't access address page without signing in...");return C==="In-Progress"?t.jsx(ya,{windowSize:o,children:t.jsx(Kn,{})}):t.jsx(ya,{windowSize:o,children:t.jsx(Hi,{location:l,navigate:e,currentTenant:h,billId:n,isLocalCurrencyEnabled:i,isVendorRecommendationEnabled:d,isInternationalPaymentShaVsOurEnabled:r,isRecurringBillsFeatureEnabled:S,isDetectInsufficientFundsEnabled:u})})}const Zi=Y((function(e,a){const{vendorId:l}=a,n=e.entityAutoCompleteState.autoCompleteText.common,c=We(e,"common"),r=l!=null?"edit":"create",u=X(e),o=V.getSignedInUser(),s=u.tenantId,i={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:s??""};return{vendorViewDetails:a.vendorViewDetails,screenType:r,filesEndPoint:`${za.fileMicroServiceBaseUrl}`,authParams:i,analytics:E,vendorSearchAutoCompleteData:{autoCompleteText:n,entityAutoCompleteView:c}}}),(function(e,a){const{billId:l,currentTenant:n,navigate:c,location:r,vendorId:u,themeState:o}=a,{tenantEmailDomain:s}=n;return{onSaveVendor:i=>{e(xn(u??void 0,a.billId)),i!=null&&e(Bn(i))},saveVendorDetailLocalData:i=>{e(Na({vendorId:u,localData:i}))},saveContactsInVendorDetailLocalData:i=>{e(wn({vendorId:u,contacts:i}))},resetVendorDetailLocalData:()=>{e(la(u))},updateSelectedVendorForCreate:i=>{e(kn(i))},navigateToBankDetailPage:(i,d)=>{let p;i==="wire"?p=d==="international"?Za(s,a.billId,u):ci(s,a.billId,u):p=ri(s,a.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(la(a.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=Z(a.location.state?.pathnameStackToGoBack),d=i.poppedPathname??si(n.tenantEmailDomain,a.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(Ma(i,!1))}}}))(ti),we=()=>{const e=q(),a=le(),l=Qn(),n=K(),{billId:c,vendorId:r}=ee(),u=v((b=>X(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&&(a(ge(!1,r)),d(!0))}),[i,h,r]),m.fetchState==="Not-Started"||m.fetchState==="In-Progress"?t.jsx(ei,{}):h==="Error"?t.jsx(ai,{onGoHome:()=>e("../",{replace:!0}),onReload:()=>window.location.reload()}):t.jsxs(t.Fragment,{children:[t.jsx(qe,{vendorId:r,billId:c}),t.jsx(Zi,{navigate:e,location:n,themeState:l,currentTenant:u,vendorId:r,billId:c,vendorViewDetails:m,isLocalCurrencyEnabled:s})]})},Xi=Y((function(e,a){const{companyId:l}=a;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,a){const{companyId:l,navigate:n}=a;return{onButtonClick:()=>{e(An(l))},onBackClick:()=>{n("../..",{relative:"path"})},onSetupBillPaySuccess:()=>{n("../bills/setup",{relative:"path"})}}}))(ii),Ji=()=>{const e=ni(),a=q(),l=K(),{tenantEmailDomain:n}=ee(),[c,r]=g.useState(!1),u=ue(),o=v((h=>X(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?t.jsx(Q,{to:"../../../bills"}):p===!0&&m===!0?t.jsx(Q,{to:"../../bills/setup"}):p===!1||d!=null&&Oe(o,d.loggedInUserRoleMap)?t.jsxs(t.Fragment,{children:[t.jsx(Ae,{analytics:E,onLoad:h=>(b=>b.trackPageLoaded(Ha.Event.billPayPromoPage))(h)}),t.jsx(Ja,{isAppContentDrawerOpen:c,handleDrawerToggle:S}),t.jsx(Xi,{companyId:s,navigate:a,location:l,meetingUrl:e("bill_pay_promo"),onClickMenuIcon:()=>{S(!0)}})]}):t.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:u.colors.grey5}})};function To(){const e=v((H=>X(H))),a=fe(),l=de(a?.loggedInUserRoleMap),n=ue(),{useFeatureGate:c}=oe(),{isFeatureEnabled:r}=c(f.isBillPayLocalCurrencyFeatureEnabled),u=r===!0?zi:Ni,{isFeatureEnabled:o}=c(f.isDebitCardFeatureEnabled),s=Ra(o,e),i=Va(e),d=K(),p=e?.userRole!=null&&Ia(e?.userRole),m=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!p)&&de(a?.loggedInUserRoleMap),S=Fa(a?.loggedInUserRoleMap),h=(e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!p)&&Dn(a?.loggedInUserRoleMap),b=!!e.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!p,C=b&&$a(a?.loggedInUserRoleMap),{isFeatureEnabled:I}=c(f.isChargeCardFeatureEnabled),j=oi(e,I,o)&&!p,B=j&&En(a?.loggedInUserRoleMap),T=Tn(a?.loggedInUserRoleMap),k=La(a?.loggedInUserRoleMap),$=jn(a?.loggedInUserRoleMap),O=b&&k,G=e.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!p&&$,W=Pn(a?.loggedInUserRoleMap),z=Fn(a?.loggedInUserRoleMap),w=Rn(a?.loggedInUserRoleMap),M=j&&W,{tenantEmailDomain:L}=ee();return t.jsxs(nt,{children:[d.pathname.includes("/bills")?t.jsxs(t.Fragment,{children:[t.jsx(y,{path:"setup",element:t.jsx(Te,{isBillPayAdminLevelAccess:m,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:h,isZeniAccountAdminLevelAccess:C,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:T,productType:"bill_pay",type:"setup"})}),t.jsx(y,{path:"verification",element:t.jsx(Te,{isBillPayAdminLevelAccess:m,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:h,isZeniAccountAdminLevelAccess:C,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:T,productType:"bill_pay",type:"verification"})}),t.jsx(y,{path:"promo",element:t.jsx(Ji,{})}),t.jsx(y,{path:"approval-rules/*",element:m?t.jsx(pi,{}):t.jsx(mi,{showZeniAccountRoute:O,isUserHasBillPayAccess:z,isUserHasReimbursementAccess:w,showTreasuryRoute:G,isTenantBankingOnly:s,showChargeCardRoute:M,tenantEmailDomain:L??""})}),t.jsx(y,{path:"international-wire",element:t.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&&t.jsx(y,{path:"*",element:t.jsx(Ei,{})}),(s===!0||i===!0)&&t.jsx(y,{path:"/*",element:t.jsx(qa,{})}),e.companyBillPayInfo?.info?.isBillPayTOSAccepted===!0&&l&&t.jsx(y,{path:"*",element:t.jsx(Q,{to:"../setup"})}),a!=null&&Oe(e,a.loggedInUserRoleMap)&&t.jsx(y,{path:"*",element:t.jsx(Q,{to:"../promo"})})]}):d.pathname.includes("/bill")?t.jsxs(t.Fragment,{children:[t.jsx(y,{path:"new",element:t.jsx(x,{appContent:t.jsx(ba,{})})}),t.jsx(y,{path:":billId",element:t.jsx(x,{appContent:t.jsx(hi,{})})}),t.jsx(y,{path:":billId/edit",element:t.jsx(x,{appContent:t.jsx(ba,{})})}),t.jsx(y,{path:"new/review",element:t.jsx(x,{appContent:t.jsx(fa,{})})}),t.jsx(y,{path:":billId/edit/review",element:t.jsx(x,{appContent:t.jsx(fa,{})})}),t.jsx(y,{path:"/:billId/:addressType",element:t.jsx(x,{appContent:t.jsx(ca,{isSubPage:!0})})}),t.jsx(y,{path:"/new/:addressType",element:t.jsx(x,{appContent:t.jsx(ca,{isSubPage:!0})})}),t.jsx(y,{path:"new/vendor/create",element:t.jsx(x,{appContent:t.jsx(we,{})})}),t.jsx(y,{path:"new/vendor/:vendorId/edit",element:t.jsx(x,{appContent:t.jsx(we,{})})}),t.jsx(y,{path:"new/vendor/:vendorId/edit/ach",element:t.jsx(x,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:"new/vendor/:vendorId/edit/domestic",element:t.jsx(x,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:"new/vendor/:vendorId/edit/international",element:t.jsx(x,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:"new/vendor/create/ach",element:t.jsx(x,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:"new/vendor/create/domestic",element:t.jsx(x,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:"new/vendor/create/international",element:t.jsx(x,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/ach",element:t.jsx(x,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/domestic",element:t.jsx(x,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/international",element:t.jsx(x,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:":billId/edit/vendor/create",element:t.jsx(x,{appContent:t.jsx(we,{})})}),t.jsx(y,{path:":billId/edit/vendor/:vendorId/edit",element:t.jsx(x,{appContent:t.jsx(we,{})})}),t.jsx(y,{path:":billId/edit/vendor/:vendorId/edit/ach",element:t.jsx(x,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:":billId/edit/vendor/:vendorId/edit/domestic",element:t.jsx(x,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:":billId/edit/vendor/:vendorId/edit/international",element:t.jsx(x,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/ach",element:t.jsx(x,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/domestic",element:t.jsx(x,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/international",element:t.jsx(x,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:"*",element:t.jsx(Be,{})})]}):t.jsx(y,{path:"*",element:t.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:n.colors.grey5,boxShadow:`0px 2px ${A.sp1} ${n.colors.dropShadowNormal}`}})}),t.jsx(y,{path:"*",element:t.jsx(Be,{})})]})}export{To as default};
|
|
119
|
+
`,Xi=Q((function(e,a){const l=V.getSignedInUser(),n=Oa(e,a.billId),c=un(e),r=Ce(l),u=n.totalAmount.amount,o=n.billPayInfo?.stage.code!=="scheduled"&&c.allApprovalRules.length>0&&!_a(u,c.allApprovalRules,l,n.vendor?.id,n.classId);return{billDetails:n,billId:a.billId,billpayApprovalView:c,analytics:E,isApprovalRequiredForMarkAsPaid:o,isZeniUser:r}}),(function(e,a){const{location:l,billId:n,currentTenant:c,navigate:r}=a,{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(Ca({billId:n,data:s})),e(_e(o?"paid":"pending_approval",o,!1,n))},discardOutsideZeniPaymentData:()=>{e(Ba({billId:n}))},updateBillDetailSaveBillCode:()=>{e(Ga("pending_approval"))},onClickEdit:()=>{a.navigate("../",{relative:"path"})},onAttachmentClick:(o,s)=>{const i=Ee(u,o,s);window.open(`${i}`,"_blank")},retryPayment:()=>{a.billId!=null&&e(xe(a.billId,"retry"))}}}))(Qn);function fa(){const e=q(),a=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=Z(l.state?.pathnameStackToGoBack),{poppedPathname:m}=p,{isFeatureEnabled:S}=c(f.isRecurringBillsFeatureEnabled),h=v((I=>H(I))),b=v((I=>Oa(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&&a(dn(I,j,B,T,k,n))}),[]),m==null)return t.jsx(Y,{to:`../${n}`});if(s==null)throw Error("Can't access address page without signing in...");return C==="In-Progress"?t.jsx(ya,{windowSize:o,children:t.jsx(Kn,{})}):t.jsx(ya,{windowSize:o,children:t.jsx(Xi,{location:l,navigate:e,currentTenant:h,billId:n,isLocalCurrencyEnabled:i,isVendorRecommendationEnabled:d,isInternationalPaymentShaVsOurEnabled:r,isRecurringBillsFeatureEnabled:S,isDetectInsufficientFundsEnabled:u})})}const Zi=Q((function(e,a){const{vendorId:l}=a,n=e.entityAutoCompleteState.autoCompleteText.common,c=ze(e,"common"),r=l!=null?"edit":"create",u=H(e),o=V.getSignedInUser(),s=u.tenantId,i={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:s??""};return{vendorViewDetails:a.vendorViewDetails,screenType:r,filesEndPoint:`${Wa.fileMicroServiceBaseUrl}`,authParams:i,analytics:E,vendorSearchAutoCompleteData:{autoCompleteText:n,entityAutoCompleteView:c}}}),(function(e,a){const{billId:l,currentTenant:n,navigate:c,location:r,vendorId:u,themeState:o}=a,{tenantEmailDomain:s}=n;return{onSaveVendor:i=>{e(xn(u??void 0,a.billId)),i!=null&&e(Bn(i))},saveVendorDetailLocalData:i=>{e(Na({vendorId:u,localData:i}))},saveContactsInVendorDetailLocalData:i=>{e(wn({vendorId:u,contacts:i}))},resetVendorDetailLocalData:()=>{e(la(u))},updateSelectedVendorForCreate:i=>{e(kn(i))},navigateToBankDetailPage:(i,d)=>{let p;i==="wire"?p=d==="international"?Za(s,a.billId,u):ci(s,a.billId,u):p=ri(s,a.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(la(a.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(We({searchString:i,entityType:d,searchOrigin:"common"})):i.trim().length===0&&e(ie("common"))},onCancelAutoComplete:()=>{e(ie("common"))}},onBackClick:()=>{e(ie("common"));const i=Z(a.location.state?.pathnameStackToGoBack),d=i.poppedPathname??si(n.tenantEmailDomain,a.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(Ma(i,!1))}}}))(ti),we=()=>{const e=q(),a=le(),l=Yn(),n=K(),{billId:c,vendorId:r}=ee(),u=v((b=>H(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&&(a(ge(!1,r)),d(!0))}),[i,h,r]),m.fetchState==="Not-Started"||m.fetchState==="In-Progress"?t.jsx(ei,{}):h==="Error"?t.jsx(ai,{onGoHome:()=>e("../",{replace:!0}),onReload:()=>window.location.reload()}):t.jsxs(t.Fragment,{children:[t.jsx(qe,{vendorId:r,billId:c}),t.jsx(Zi,{navigate:e,location:n,themeState:l,currentTenant:u,vendorId:r,billId:c,vendorViewDetails:m,isLocalCurrencyEnabled:s})]})},Hi=Q((function(e,a){const{companyId:l}=a;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,a){const{companyId:l,navigate:n}=a;return{onButtonClick:()=>{e(An(l))},onBackClick:()=>{n("../..",{relative:"path"})},onSetupBillPaySuccess:()=>{n("../bills/setup",{relative:"path"})}}}))(ii),Ji=()=>{const e=ni(),a=q(),l=K(),{tenantEmailDomain:n}=ee(),[c,r]=g.useState(!1),u=ue(),o=v((h=>H(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?t.jsx(Y,{to:"../../../bills"}):p===!0&&m===!0?t.jsx(Y,{to:"../../bills/setup"}):p===!1||d!=null&&Oe(o,d.loggedInUserRoleMap)?t.jsxs(t.Fragment,{children:[t.jsx(Ae,{analytics:E,onLoad:h=>(b=>b.trackPageLoaded(Xa.Event.billPayPromoPage))(h)}),t.jsx(Ja,{isAppContentDrawerOpen:c,handleDrawerToggle:S}),t.jsx(Hi,{companyId:s,navigate:a,location:l,meetingUrl:e("bill_pay_promo"),onClickMenuIcon:()=>{S(!0)}})]}):t.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:u.colors.grey5}})};function jo(){const e=v((X=>H(X))),a=fe(),l=de(a?.loggedInUserRoleMap),n=ue(),{useFeatureGate:c}=oe(),{isFeatureEnabled:r}=c(f.isBillPayLocalCurrencyFeatureEnabled),u=r===!0?Wi:Ni,{isFeatureEnabled:o}=c(f.isDebitCardFeatureEnabled),s=Ra(o,e),i=Va(e),d=K(),p=e?.userRole!=null&&Ia(e?.userRole),m=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!p)&&de(a?.loggedInUserRoleMap),S=Fa(a?.loggedInUserRoleMap),h=(e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!p)&&Dn(a?.loggedInUserRoleMap),b=!!e.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!p,C=b&&$a(a?.loggedInUserRoleMap),{isFeatureEnabled:I}=c(f.isChargeCardFeatureEnabled),j=oi(e,I,o)&&!p,B=j&&En(a?.loggedInUserRoleMap),T=Tn(a?.loggedInUserRoleMap),k=La(a?.loggedInUserRoleMap),$=jn(a?.loggedInUserRoleMap),O=b&&k,G=e.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!p&&$,z=Pn(a?.loggedInUserRoleMap),W=Fn(a?.loggedInUserRoleMap),w=Rn(a?.loggedInUserRoleMap),M=j&&z,{tenantEmailDomain:L}=ee();return t.jsxs(nt,{children:[d.pathname.includes("/bills")?t.jsxs(t.Fragment,{children:[t.jsx(y,{path:"setup",element:t.jsx(Te,{isBillPayAdminLevelAccess:m,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:h,isZeniAccountAdminLevelAccess:C,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:T,productType:"bill_pay",type:"setup"})}),t.jsx(y,{path:"verification",element:t.jsx(Te,{isBillPayAdminLevelAccess:m,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:h,isZeniAccountAdminLevelAccess:C,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:T,productType:"bill_pay",type:"verification"})}),t.jsx(y,{path:"promo",element:t.jsx(Ji,{})}),t.jsx(y,{path:"approval-rules/*",element:m?t.jsx(pi,{}):t.jsx(mi,{showZeniAccountRoute:O,isUserHasBillPayAccess:W,isUserHasReimbursementAccess:w,showTreasuryRoute:G,isTenantBankingOnly:s,showChargeCardRoute:M,tenantEmailDomain:L??""})}),t.jsx(y,{path:"international-wire",element:t.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&&t.jsx(y,{path:"*",element:t.jsx(Ei,{})}),(s===!0||i===!0)&&t.jsx(y,{path:"/*",element:t.jsx(qa,{})}),e.companyBillPayInfo?.info?.isBillPayTOSAccepted===!0&&l&&t.jsx(y,{path:"*",element:t.jsx(Y,{to:"../setup"})}),a!=null&&Oe(e,a.loggedInUserRoleMap)&&t.jsx(y,{path:"*",element:t.jsx(Y,{to:"../promo"})})]}):d.pathname.includes("/bill")?t.jsxs(t.Fragment,{children:[t.jsx(y,{path:"new",element:t.jsx(x,{appContent:t.jsx(ba,{})})}),t.jsx(y,{path:":billId",element:t.jsx(x,{appContent:t.jsx(hi,{})})}),t.jsx(y,{path:":billId/edit",element:t.jsx(x,{appContent:t.jsx(ba,{})})}),t.jsx(y,{path:"new/review",element:t.jsx(x,{appContent:t.jsx(fa,{})})}),t.jsx(y,{path:":billId/edit/review",element:t.jsx(x,{appContent:t.jsx(fa,{})})}),t.jsx(y,{path:"/:billId/:addressType",element:t.jsx(x,{appContent:t.jsx(ca,{isSubPage:!0})})}),t.jsx(y,{path:"/new/:addressType",element:t.jsx(x,{appContent:t.jsx(ca,{isSubPage:!0})})}),t.jsx(y,{path:"new/vendor/create",element:t.jsx(x,{appContent:t.jsx(we,{})})}),t.jsx(y,{path:"new/vendor/:vendorId/edit",element:t.jsx(x,{appContent:t.jsx(we,{})})}),t.jsx(y,{path:"new/vendor/:vendorId/edit/ach",element:t.jsx(x,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:"new/vendor/:vendorId/edit/domestic",element:t.jsx(x,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:"new/vendor/:vendorId/edit/international",element:t.jsx(x,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:"new/vendor/create/ach",element:t.jsx(x,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:"new/vendor/create/domestic",element:t.jsx(x,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:"new/vendor/create/international",element:t.jsx(x,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/ach",element:t.jsx(x,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/domestic",element:t.jsx(x,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/international",element:t.jsx(x,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:":billId/edit/vendor/create",element:t.jsx(x,{appContent:t.jsx(we,{})})}),t.jsx(y,{path:":billId/edit/vendor/:vendorId/edit",element:t.jsx(x,{appContent:t.jsx(we,{})})}),t.jsx(y,{path:":billId/edit/vendor/:vendorId/edit/ach",element:t.jsx(x,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:":billId/edit/vendor/:vendorId/edit/domestic",element:t.jsx(x,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:":billId/edit/vendor/:vendorId/edit/international",element:t.jsx(x,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/ach",element:t.jsx(x,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/domestic",element:t.jsx(x,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/international",element:t.jsx(x,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:"*",element:t.jsx(Be,{})})]}):t.jsx(y,{path:"*",element:t.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:n.colors.grey5,boxShadow:`0px 2px ${A.sp1} ${n.colors.dropShadowNormal}`}})}),t.jsx(y,{path:"*",element:t.jsx(Be,{})})]})}export{jo as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{a as O}from"./sentry-CNIAdl-1.js";import{u as $,j as h,h as se,g as oe,i as ie,N as re,l as ce}from"./core-BVdj_noT.js";import{fJ as P,Ip as ue,ID as de,LP as pe,OF as le,Pj as me,Q8 as fe,a12 as ye,Ci as Se,Tn as ge,a1f as Ie,a1g as he,a1h as be,a1i as Te,a1j as De,a1k as Ce,a1l as Oe,YP as ke,a1m as Ve,M$ as we,MT as Ae,a1n as Ne,MX as ve,mT as Fe,gK as _e,gJ as xe,gI as Ee,vm as Be,vd as Pe,va as ze,mL as Re,Cr as Le,Cp as z,bF as R,CD as L,cw as Me}from"./zeni-epic-state-BSu6fdxh.js";import{b0 as je,V as Ue,p as Ge,au as Ke,z as B,a9 as $e,c as M,B as x,R as E,d0 as qe,af as Je,s as j,bg as U}from"./index-Dme9CBSK.js";import{n as Ze}from"./mui-BZ0jnpww.js";import{j as w}from"./liveblocks-XOqCw7q2.js";import{d as G}from"./routePaths-TIOEKAr9.js";import{M as Qe}from"./MobileAppDrawer-BLYS912H.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]="2ed0365b-a246-403c-a64a-59d7906d0238",e._sentryDebugIdIdentifier="sentry-dbid-2ed0365b-a246-403c-a64a-59d7906d0238")}catch{}})();function it(){const e=$(),r=h((u=>P(u))),a=r?.tenantId,{isApprovalRulesV3Enabled:s,isLoading:p}=je(a),l=h((u=>u.billPaySetupApproverViewState.fetchState));O.useEffect((()=>{a==null||p||l==="Not-Started"&&e(ue(!0,!0,s))}),[a,p,s,l,e])}function K(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 We=Ze.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
|
+
`,Xe=ce((function(e,r){const{businessVerificationDetails:a}=r,s=P(e),p=B.getSignedInUser(),l=s.tenantId,u={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:l??""},b=Oe(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:`${Je.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:C,incDate:n,typeOfIncorporation:g,stateOfIncorporation:A,sourceOfFunds:N,companySubIndustry:v,countriesOfOperations:I,companySourceOfFunds:q,companySourceOfFundsDescription:J,transactionVolume:Z,transactionVolumeDescription:Q,purposeOfAccount:W,purposeOfAccountDescription:X,regulatedStatus:Y,regulatedStatusDescription:H,usNexus:ee,usNexusTypes:te}=t,F=k?.selectedOption,ae={companyId:a,companyDescription:o,companyIndustry:m.selectedOption,companyIndustryType:F==null||F===""?void 0:F,companyLegalName:V,taxIdOrEIN:y,website:f!=""&&f!=null?Me(f):void 0,phone:S,syncToken:c,fileIds:C,incDate:n!=null?R(n?.toString()):n,typeOfIncorporation:g?.selectedOption??"",stateOfIncorporation:A?.selectedOption??"",sourceOfFunds:N?.selectedOption??"",companySubIndustry:v?.selectedOption??"",countriesOfOperations:I?.selectedOptions.map((_=>_.length===2?_:U(_)))??[],companySourceOfFunds:q?.selectedOption??"",companySourceOfFundsDescription:J,transactionVolume:Z?.selectedOption??"",transactionVolumeDescription:Q,purposeOfAccount:W?.selectedOption??"",purposeOfAccountDescription:X,regulatedStatus:Y??"",regulatedStatusDescription:H,usNexus:ee,usNexusTypes:te?.selectedOptions??[]},ne={userId:T,firstName:i.firstName,lastName:i.lastName,email:d,syncToken:D};e(L({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:C,ownership:n,isSelectedForVerification:g,userVerificationStatus:A,treasuryUserVerificationStatus:N,fileIds:v}=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?U(S.selectedOption):void 0,phone:T,birthday:i!=null?R(i?.toString()):i,syncToken:D,titleAtCompany:C.selectedOption,ownershipInCompany:n,documentTypeSelectedForVerification:I,isSelectedForVerification:g,userVerificationStatus:A,treasuryUserVerificationStatus:N,fileIds:v,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}}));e(L({officers:o}))},onSaveDetailsClick:t=>{e(z(a,t,s))},onSendForVerificationClick:t=>{e(z(a,t,s,!0))},onAddressClick:t=>{const o=G(b,t),m=j(u.state?.pathnameStackToGoBack,u.pathname);l(o,{state:{pathnameStackToGoBack:m}})},onRegisteredAddressClick:t=>{const o=G(b,t),m=j(u.state?.pathnameStackToGoBack,u.pathname);l(o,{state:{pathnameStackToGoBack:m}})},onBackClick:()=>{e(Le({companyId:a})),l("../setup")},updateFilesEntity:t=>{e(Re({files:t}))},onDeleteFile:t=>{e(ze(t))},onDeleteFileList:t=>{e(Pe(t))},onEditFileName:(t,o)=>{e(Be(t,o.split(".")[0]))},onGetOtp:t=>{e(Ee(t,"SpendManagementSetup"))},onResendOtp:t=>{e(xe(t,"SpendManagementSetup"))},onVerifyOtp:(t,o)=>{e(_e(t,o,"SpendManagementSetup"))},saveNewAddressInLocalStore:(t,o)=>{e(Fe({addressType:t,addressToCreate:o}))},onIdentityDocumentUploadedForAutofill:t=>{if(a==null)return;const o=Ne(t.documentType);o!=null&&e(ve({target:"setup",companyId:a,officerType:t.officerType,fileId:t.fileId,documentType:o}))},onCompanyDocumentUploadedForAutofill:t=>{a!=null&&e(Ae({target:"setup",companyId:a,fileId:t.fileId,documentType:t.documentType}))},onResetKycKybClick:()=>{e(we())}}}))(qe),rt=({productType:e})=>{const r=se(),a=oe(),s=$(),[p,l]=O.useState(!1),[u,b]=O.useState(!1),{tenantEmailDomain:t}=ie(),o=Ue(),{useDynamicConfig:m}=Ge(),{configValue:k}=m(Ke.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=>P(n))),i=d.companyId??B.getSignedInUserTenant(t)?.companyId;O.useEffect((()=>{f==="Not-Started"&&s(Se()),S==="Not-Started"&&s(ge(!0))}),[f,S,s]),O.useEffect((()=>{p||y!=="Not-Started"||i==null||(l(!0),K(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(O.useEffect((()=>{D==="Completed"&&i!=null&&(K(s,e,i,!0),s(Ce()))}),[D,i,e,s]),B.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 C=n=>{b(n)};return c===!1?w.jsx(re,{to:"../promo"}):w.jsxs(We,{children:[w.jsx($e,{analytics:M,onLoad:n=>(g=>{switch(e){case"zeni_accounts":return g.trackPageLoaded(E.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return g.trackPageLoaded(E.Event.reimbursementBusinessVerification);default:return g.trackPageLoaded(E.Event.billPayBusinessVerification,x(a)?"Settings":void 0)}})(n)}),x(a)?w.jsx(Qe,{isAppContentDrawerOpen:u,handleDrawerToggle:C}):null,w.jsx(Xe,{businessVerificationDetails:T,navigate:r,location:a,companyId:i,analytics:M,currentTenant:d,productType:e,isSettings:x(a),roleMap:o?.loggedInUserRoleMap??{},onClickMenuIcon:()=>{C(!0)},maxInsuredAmount:V.maxInsuredAmount})]})};export{rt as B,K as d,it as u};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{j as S}from"./liveblocks-XOqCw7q2.js";import{a as r}from"./sentry-CNIAdl-1.js";import{u as he,h as Ce,g as fe,j as M,i as ge,l as Se}from"./core-BVdj_noT.js";import{ee as be,g as ye,ef as Pe,z as Ie,eh as we,ej as W,ek as Ee,aD as G,a9 as ke,c as F,el as H,ev as xe,G as Ae,R as Te,w as Oe,eo as Ue,ep as ve,aj as _e,es as Qe,et as je,aw as De,eu as Fe}from"./index-Dme9CBSK.js";import{gO as $e,fI as J,fJ as Le,gc as Ve,jx as Re,jt as qe,fK as N,gy as Be,gs as Me,gu as z,gA as He,gB as Ne,gC as ze,gD as We,gE as Ge}from"./zeni-epic-state-BSu6fdxh.js";import{D as Je,n as L,v as Ke,S as Ye}from"./mui-BZ0jnpww.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.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]="ac55cec6-9f99-4f00-aa81-c54290655787",t._sentryDebugIdIdentifier="sentry-dbid-ac55cec6-9f99-4f00-aa81-c54290655787")}catch{}})();const K="chat-response-generated",Y="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 c=J(t),l=s.isSubmitting,u=ve(t,{allUsers:s.allUsers,onCardPolicyVendorSearchTextChange:s.onCardPolicyVendorSearchTextChange});return{showSampleQuestions:s.sessionFromUrl==="new_chat"&&c.uiState.currentChatSessionId==null,aiCfoView:c,isSubmitting:l,isNewChatSession:s.sessionFromUrl==="new_chat",isFullView:!0,tableDownloadEndPoint:`${_e}/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:c,currentTenant:l,userId:u,navigate:o,currentChatSessionId:y,allSessionsWithOrderedQuestionAnswers:C,isAiCardCreationEnabled:x,isCardPolicyEnabled:A,cardPolicyPageContext:T}=s,f=l.tenantEmailDomain,d=c.state?.referrer,h=d===X?Z(f):$(f);return{onEventReceived:(a,n)=>{if(a===K&&typeof n.text=="string"&&typeof n.metadata=="object"){const e=n,m=Ne(e.type),P=e.metadata.chat_session_id??null,{currentChatSession:O,currentQuestionAnswer:b,currentQuestionAnswerSummary:p}=G(C,P);m!=="answer"?F.trackAICFOChatResponseGenerated(m,b?.question.questionText??"",e.text,P,Fe(p,O),e.metadata.message_id??null):F.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,P,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&&De(t,a,n,y,C,u,m,e,T)},updateCurrentInput:a=>{t(z(a))},onStopSubmit:()=>{},onUpdateScrollYOffset:a=>{t(He(a))},onSelectSampleQuestion:()=>{},onBackClick:()=>{o(-1)},onCloseClick:()=>{o(h,{state:{...c.state}}),t(z(""))},togglePageView:()=>{o(h,{state:W(c.state)}),s.setIsAiCfoOpen(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{o(-1)},onNewChatClick:()=>{y!=null&&t(Me()),o((function(a){return`/${a}/${Y}`})(f),{state:{...c.state}})},onToggleCotCollapsed:(a,n)=>{t(Be({questionAnswerId:a,isCollapsed:n}))},...je(t,{isAiCardCreationEnabled:x,isCardPolicyEnabled:A,currentChatSessionId:y,onAfterCardsCreationSubmit:()=>{s.setIsAiCfoOpen(!0),o($(f),{state:{...c.state}})},onAfterCardPolicySubmit:()=>{s.setIsAiCfoOpen(!0),o(`/${f}/cards/policy`,{state:{...c.state}})}})}}))(Oe(Ue)),{spendManagement:{chargeCard:{cardsAiCfoHero:ee,cardPolicyAiCfoHero:te}}}=Ae.getLocalizedStrings(),k=ee.pageTitle,Ze=te.pageTitle,et=ee.chatHeaderSubtitle,tt=te.chatHeaderSubtitle,yt=({isFileUploadEnabled:t})=>{const s=be(),{setIsAiCfoOpen:c}=ye(),l=he(),u=Ce(),o=fe(),[y,C]=r.useState(!1),{allUsers:x,isAiCardCreationEnabled:A,isCardPolicyEnabled:T,onCardPolicyVendorSearchTextChange:f}=Pe();r.useEffect((()=>{l($e())}),[l]);const d=M((i=>J(i))),h=Ie.getSignedInUser(),{session_id:a}=ge(),n=M((i=>Le(i))),e=d.uiState.currentChatSessionId,m=n.tenantEmailDomain,{handleUploadPromoClose:P,isUploadPromoVisible:O}=we({isFileUploadEnabled:t,tenantEmailDomain:m}),b=o.state,p=b?.aiCfoInitialQuestion??null,U=!!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,v]=r.useState(null),[ne,_]=r.useState(!1),Q=r.useRef(!1);r.useEffect((()=>{Q.current||p==null||p===""||(v(p),_(U),Q.current=!0)}),[p,U]);const ie=r.useCallback((()=>{v(null),_(!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,v(i),_(w),Q.current=!1}}),[g]);const{visitedSessions:V}=Ee(e),j=d.fetchState,D=d.uiState.chatSessionsNextPageToken.hasMore||!d.uiState.chatSessionsFirstPageFetched,R=e!=null?d.fetchChatSessionHistoryByChatSessionId?.[e]?.fetchState??"Not-Started":"Not-Started",q=e==null||(d.uiState.chatHistoryNextPageToken[e]?.hasMore??!0),B=d.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:le}=G(B,e),ce=le.length===0;r.useEffect((()=>{e!=null&&a!==e&&u((function(i,w){return`/${i}/${Y}/${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 de=r.useMemo((()=>({events:V.map((i=>`private-encrypted-chat-${i}.${K}`)),eventCallback:(i,w,pe)=>pe.onEventReceived(i,w)})),[V]);if(r.useEffect((()=>{j!=="In-Progress"&&D&&l(Re())}),[j,D,l]),r.useEffect((()=>{e!=null&&R!=="In-Progress"&&q&&h!=null&&j==="Completed"&&!D&&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&&d.responseStateByChatSessionId?.[e]?.answer?.fetchState==="In-Progress";return S.jsxs(at,{children:[S.jsx(ke,{analytics:F,onLoad:i=>i.trackPageLoaded(Te.Event.aiCFOPage)}),g?S.jsx(Xe,{answerExportEndPoint:s,...de,currentChatSessionId:e,allSessionsWithOrderedQuestionAnswers:B,allUsers:x,isAiCardCreationEnabled:A,isCardPolicyEnabled:T,openOnboardingPage:()=>C(!0),userId:h.userId,setIsAiCfoOpen:c,navigate:u,sessionFromUrl:ue,location:o,isSubmitting:me,isEmptyChatWithSession:ce,customPageTitle:k,chatHeader:ae,currentTenant:n,emailLinkQuestion:oe??void 0,autoSubmitEmailLinkQuestion:ne,onEmailLinkQuestionProcessed:ie,isFileUploadEnabled:t,isUploadPromoVisible:O,onUploadPromoClose:P,onCardPolicyVendorSearchTextChange:f,cardPolicyPageContext:se}):S.jsx(H,{isTOSAccepted:g,acceptMasterTOSState:d.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:U}),l(N(n.userRoleId)))}}),S.jsx(Je,{anchor:"right",open:y,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(H,{isTOSAccepted:g,acceptMasterTOSState:d.masterTOSAcceptanceState,customPageTitle:k,onCloseClick:()=>C(!1),onCompleteClick:()=>{g||n.userRoleId==null||l(N(n.userRoleId)),C(!1)}})})})]})},st=L(Ye)`
|
|
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(Ke)`
|
|
12
|
+
box-shadow: ${({theme:t})=>t.colors.elevation2};
|
|
13
|
+
color: ${({theme:t})=>t.colors.grey4};
|
|
14
|
+
`;export{yt as default};
|