@zeniai/web-app-ui 5.3.89-qa → 5.3.90-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-C32R4V-t.js → AccountMappingScreen-BS2TEEML.js} +2 -2
- package/dist/assets/{ActualMatchingMatchDetailScreen-BfDBt1b3.js → ActualMatchingMatchDetailScreen-BG0f_9dm.js} +1 -1
- package/dist/assets/AddressRoutes-DXLSGq6p.js +1 -0
- package/dist/assets/AddressScreen-CFFjqn9x.js +9 -0
- package/dist/assets/AiCfoScreen-Bb7BlHVl.js +22 -0
- package/dist/assets/{AppDrawer-D8SXDHW7.js → AppDrawer-CUWwfrcw.js} +2 -2
- package/dist/assets/{BillPayApprovalRoutes-zr29vPro.js → BillPayApprovalRoutes-BnsNw_Wt.js} +1 -1
- package/dist/assets/{BillPayRoutes-2ylDEsNc.js → BillPayRoutes-D-m3lGSH.js} +18 -18
- package/dist/assets/BusinessVerificationPageScreen-DGcNuKpp.js +9 -0
- package/dist/assets/{CardsAiCfoScreen-qrw2ncr4.js → CardsAiCfoScreen-CdMzvkcF.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-s0ULni-Q.js → ChargeCardRoutes-CEdKIYwO.js} +7 -7
- package/dist/assets/{CompanyPassportScreen-BKeu-T6z.js → CompanyPassportScreen-ouG3XJ0B.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-CzZXAv1W.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-CwkUm4jt.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-PXrLKfWK.js → CustomerOnboardingRoutes-DKFmMkvz.js} +3 -3
- package/dist/assets/{DashboardRoutes-C2xiGr8h.js → DashboardRoutes-FwFiyAun.js} +3 -3
- package/dist/assets/{DefaultTenantHome-Ce1ikxeJ.js → DefaultTenantHome-DpFF7UFt.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-D5Ig-9_3.js → DomesticWireDetailScreen-mG0aAckn.js} +3 -3
- package/dist/assets/{DrawerScreen-CKrtwYow.js → DrawerScreen-CESLwM_E.js} +1 -1
- package/dist/assets/EntityDetailRoutes-CPbgn6WL.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-zF7khL9s.js → ExpenseAutomationRoutes-7eBLUF1p.js} +7 -7
- package/dist/assets/FeaturePreviewScreen-DNtB8Ogu.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-BzaBWYUg.js +1 -0
- package/dist/assets/{InboxNotificationsProvider-CmAbaz3a.js → InboxNotificationsProvider-BDvEEMzw.js} +1 -1
- package/dist/assets/{InvoicingRoutes-B2u_Ezts.js → InvoicingRoutes-QrdL6jni.js} +2 -2
- package/dist/assets/{MagicLinkRoutes-B0Iu7C-o.js → MagicLinkRoutes-fajlaDEP.js} +22 -22
- package/dist/assets/MagicLinkSignInScreen-DeVFtM-w.js +12 -0
- package/dist/assets/MobileAppDrawer-B8sARono.js +1 -0
- package/dist/assets/NotFoundScreen-XYwSCqRV.js +1 -0
- package/dist/assets/NotificationRoutes-BCLjcBx9.js +1 -0
- package/dist/assets/{OAuthConsentScreen-DraMDQV_.js → OAuthConsentScreen-eOi9FOn6.js} +1 -1
- package/dist/assets/PandLWithForecastRoutes-C0xsoIO3.js +1 -0
- package/dist/assets/{PaymentLinkScreen-cJvP2x_9.js → PaymentLinkScreen-DrbI3lMH.js} +5 -5
- package/dist/assets/PeopleRoutes-mXGFHp3Z.js +22 -0
- package/dist/assets/PerformanceRoutes-DATOhE_v.js +1 -0
- package/dist/assets/{Preview-6s066EpN.js → Preview-B9tcJoWQ.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-BbV3RbkD.js → QBOConnectionScreen-RFxms0Wa.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-CpfuBtAn.js → ReimbursementApprovalRoutes-C5fSRq-h.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-sB7-VE3y.js → ReimbursementApprovalRuleDetailScreen-BRSlUWFS.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-BfSW4Zwf.js → ReimbursementRoutes-5zTCjNMx.js} +5 -5
- package/dist/assets/{ReportsRoutes-9ICfaTdi.js → ReportsRoutes-Bm7SmFOd.js} +1 -1
- package/dist/assets/RewardsRoutes-BftpYdCc.js +1 -0
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-DaK3iJgC.js → ScheduleDetailsPrepaidExpensesScreen-Cs3QDcYO.js} +5 -5
- package/dist/assets/ScreenRoutes-Bgg7yoYV.js +2 -0
- package/dist/assets/{SettingsRoutes-0GsgXhPW.js → SettingsRoutes-BIatjdKn.js} +6 -6
- package/dist/assets/{SetupPagesScreen-DSYveOUd.js → SetupPagesScreen-5LQJzH9k.js} +5 -5
- package/dist/assets/SignInScreen-MYaF1oeQ.js +1 -0
- package/dist/assets/SignOutScreen-BQC-vnXw.js +9 -0
- package/dist/assets/{TaskListScreen-DZ8NcLOm.js → TaskListScreen-DDtS1dW-.js} +2 -2
- package/dist/assets/TaskRoutes-DFZky3LW.js +9 -0
- package/dist/assets/TransactionDetailRoutes-BtOvElEM.js +1 -0
- package/dist/assets/{TransactionDetailScreen-BQOv8pbA.js → TransactionDetailScreen-D-8He79E.js} +2 -2
- package/dist/assets/{TransactionListRoutes-CouRIsr3.js → TransactionListRoutes-CA94kxFD.js} +1 -1
- package/dist/assets/{TreasuryRoutes-B8Za6S7z.js → TreasuryRoutes-CBqnYiwq.js} +5 -5
- package/dist/assets/{VendorsRoutes-X2W_ONNJ.js → VendorsRoutes-XMGo57cf.js} +10 -10
- package/dist/assets/WiseConfirmationScreen-DL3t64Kq.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-DX3-i7lA.js → ZeniAccountRoutes-J5QpQxjm.js} +10 -10
- package/dist/assets/ZeniAccountStatementScreen-AZVgMM5C.js +9 -0
- package/dist/assets/{accountMappingHelper-D7kdjZSp.js → accountMappingHelper-Dz3WGDfz.js} +1 -1
- package/dist/assets/{analytics-CHOlTFyu.js → analytics-C3JIdGJp.js} +1 -1
- package/dist/assets/{analyticsHelper-CDgUnuv6.js → analyticsHelper-isaFMiiy.js} +1 -1
- package/dist/assets/{core-DO2aQ9sC.js → core-CjSjXYyY.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-BGunfdyb.js → decodeURIComponentSafe-CL2ts4bS.js} +1 -1
- package/dist/assets/{dnd-C6oCteDZ.js → dnd-DQdg3jZV.js} +1 -1
- package/dist/assets/{empty-BnXjgXTG.js → empty-CHbZ6EKy.js} +1 -1
- package/dist/assets/{empty-BEdZehso.js → empty-CbjHBZe9.js} +1 -1
- package/dist/assets/{emptyVideoElement-DyfqG-Dl.js → emptyVideoElement-DldZjfRN.js} +1 -1
- package/dist/assets/epic-wF-1Nkht.js +2 -0
- package/dist/assets/expenseAutomationHelper-CBURllgC.js +1 -0
- package/dist/assets/{getLocaleForTenant-9I3ntams.js → getLocaleForTenant-CUMk734N.js} +1 -1
- package/dist/assets/{index-BX493DEc.js → index-B-AxVrtB.js} +1 -1
- package/dist/assets/{index-CJp0mZVW.js → index-B95Ul72p.js} +1 -1
- package/dist/assets/{index-D8IL39lv.js → index-BOFTe1v-.js} +1 -1
- package/dist/assets/{index-CqLY6f8A.js → index-BkzgLf7w.js} +1 -1
- package/dist/assets/{index-BpSPKksw.js → index-ByMk-VWt.js} +2 -2
- package/dist/assets/{index-CHVvaLYS.js → index-DT61Dzwo.js} +1 -1
- package/dist/assets/{index-BIf8ZdZy.js → index-DrKuh0N3.js} +1 -1
- package/dist/assets/{index-CrLif5Ra.js → index-zhznqeY3.js} +14294 -14320
- package/dist/assets/{lexical-Dahvp5A4.js → lexical-DFfYCN7b.js} +1 -1
- package/dist/assets/{liveblocks-DCIY2V5W.js → liveblocks-fvHZHCch.js} +1 -1
- package/dist/assets/{lottie-BsiUbd07.js → lottie-Cmgc5pKa.js} +1 -1
- package/dist/assets/{mui-Beesmy34.js → mui-Cv0Yu4Hx.js} +1 -1
- package/dist/assets/{pathToGoBack-BF0QeMYg.js → pathToGoBack-DWp6jk4n.js} +1 -1
- package/dist/assets/{pdf-Bi1FWCM7.js → pdf-C21rIcNJ.js} +4 -4
- package/dist/assets/{pdf-lib-D-883htS.js → pdf-lib-CeyW0y7u.js} +1 -1
- package/dist/assets/{plaid-IFb-JOAW.js → plaid-B_ZF6XEj.js} +1 -1
- package/dist/assets/{pusher-CZ2f9qiw.js → pusher-YCZIG_Zw.js} +1 -1
- package/dist/assets/{react-BGT56QSM.js → react-BkYlXOI6.js} +1 -1
- package/dist/assets/{react-U8FVY9XX.js → react-CgBiLhFT.js} +1 -1
- package/dist/assets/{react-C009U_vG.js → react-Cmh_nuuS.js} +1 -1
- package/dist/assets/{react-B37EnoMa.js → react-D_MOfVxA.js} +1 -1
- package/dist/assets/{react-BBLrRlBQ.js → react-J2JzrsDb.js} +1 -1
- package/dist/assets/{react-B7Ae5uDO.js → react-LTvMDmLf.js} +1 -1
- package/dist/assets/{recharts-BFgvJAkx.js → recharts-iN3Tsoxx.js} +1 -1
- package/dist/assets/{routePaths-C6wUCH0u.js → routePaths-o_RQZUW0.js} +1 -1
- package/dist/assets/{sentry--FQm-CEz.js → sentry-5M-_hQEn.js} +1 -1
- package/dist/assets/{stripSplatSuffix-BjVyO64h.js → stripSplatSuffix-ntc_sS44.js} +1 -1
- package/dist/assets/{url-CYqslED7.js → url-BvDoSxgp.js} +1 -1
- package/dist/assets/{url-aH6bFotI.js → url-CBVoutGU.js} +1 -1
- package/dist/assets/useActualMatchingMatchDetail-0ydHXgNC.js +1 -0
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CNI9rS4x.js → useAiCfoDashboardSuggestedQuestionsChips-gs_gUo4b.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-ClUKa-x1.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-DKJC-IyC.js → useChargeCardPusherEvents-B_qQWepJ.js} +1 -1
- package/dist/assets/{useDeviceId-04DUxcYB.js → useDeviceId-DcODeIz7.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-DETKjPI-.js +1 -0
- package/dist/assets/{useInitialThreadRequest-BkLxr48P.js → useInitialThreadRequest-DvEY1Wx_.js} +1 -1
- package/dist/assets/{useTaskManagerAccess-BuXkSjxQ.js → useTaskManagerAccess-AyRfKL8F.js} +1 -1
- package/dist/assets/{useTaskManagerPusherEvents-ZKSALyII.js → useTaskManagerPusherEvents-nRX-pAls.js} +1 -1
- package/dist/assets/{utils-9X_P6qcc.js → utils-CSmUhNCi.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-BUmyul7m.js → withTransactionSidePanel-Cimx250C.js} +3 -3
- package/dist/assets/{zeni-epic-state-Cc-xO4DM.js → zeni-epic-state-DbSzv5hl.js} +5 -5
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-BbSeFhst.js +0 -1
- package/dist/assets/AddressScreen-Dd1i_Yj_.js +0 -9
- package/dist/assets/AiCfoScreen-XYJ57z43.js +0 -22
- package/dist/assets/BusinessVerificationPageScreen-DsSi6_Nq.js +0 -9
- package/dist/assets/ConnectionAuthScreen-cZftaA6r.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-DxeH12hm.js +0 -1
- package/dist/assets/EntityDetailRoutes-PxoQHQJr.js +0 -1
- package/dist/assets/FeaturePreviewScreen-C9zEjf5r.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-j43aqaSC.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-B26pRkoP.js +0 -12
- package/dist/assets/MobileAppDrawer-CNBabrsi.js +0 -1
- package/dist/assets/NotFoundScreen-B4NyMy_S.js +0 -1
- package/dist/assets/NotificationRoutes-DBAGS4Eu.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-ITnV7ceC.js +0 -1
- package/dist/assets/PeopleRoutes-BTqFtHBk.js +0 -22
- package/dist/assets/PerformanceRoutes-DjnMWXrx.js +0 -1
- package/dist/assets/RewardsRoutes-Cm_qlxdV.js +0 -1
- package/dist/assets/ScreenRoutes-CRpMT6hK.js +0 -2
- package/dist/assets/SignInScreen-B1h6fDcZ.js +0 -1
- package/dist/assets/SignOutScreen-DpVEH4Us.js +0 -9
- package/dist/assets/TaskRoutes-C6Z-Z4PQ.js +0 -9
- package/dist/assets/TransactionDetailRoutes-D2oScn3-.js +0 -1
- package/dist/assets/WiseConfirmationScreen-yMppxtyO.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-CTP8GFd3.js +0 -9
- package/dist/assets/epic-Cg7zjUcf.js +0 -2
- package/dist/assets/expenseAutomationHelper-Box0P8C-.js +0 -1
- package/dist/assets/useActualMatchingMatchDetail-QFeJZw_O.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BJW8bIRv.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-BQ1YSf32.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-fvHZHCch.js";import{i as S,l as g,h as C,g as y,u as ee,t as ae,j as L,N as te,n as ne,o as p}from"./core-CjSjXYyY.js";import{UV as k,UW as j,UX as T,JS as D,JE as U,UY as A,UZ as oe,U_ as ie,JI as se,gl as $,JP as le,JM as de}from"./zeni-epic-state-DbSzv5hl.js";import{$ as x,E as d,a0 as re,j as v,U as M,a1 as ce,a2 as me,a3 as pe,p as G,W as ue,A as he,a4 as ge,Z as xe,f as be,a5 as fe,a6 as we,Y as Se,a7 as ye,a8 as ke,a9 as je,aa as ve}from"./index-zhznqeY3.js";import{n as m,u as $e}from"./mui-Cv0Yu4Hx.js";import b from"./NotFoundScreen-XYwSCqRV.js";import{a as I}from"./sentry-5M-_hQEn.js";import"./recharts-iN3Tsoxx.js";import"./analytics-C3JIdGJp.js";import"./plaid-B_ZF6XEj.js";import"./dnd-DQdg3jZV.js";import"./stripe-cKAAJElX.js";import"./lottie-Cmgc5pKa.js";import"./lexical-DFfYCN7b.js";import"./pdf-C21rIcNJ.js";import"./utils-CSmUhNCi.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b33b25d5-eb54-487d-89b6-52b3d705a8d0",e._sentryDebugIdIdentifier="sentry-dbid-b33b25d5-eb54-487d-89b6-52b3d705a8d0")}catch{}})();const Ie=m.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,8 +6,8 @@ import{j as a}from"./liveblocks-DCIY2V5W.js";import{i as S,l as g,h as C,g as y,
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
box-shadow: ${e=>`0px 2px ${
|
|
10
|
-
`,Ce=g((function(e){const t=k(e),n=
|
|
9
|
+
box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
10
|
+
`,Ce=g((function(e){const t=k(e),n=j(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}}),(function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:i=>{e(U(i))},onSaveHandler:i=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(D(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(T({data:l}))}}}))(re);function F(){const e=x(),{vendorId:t,billId:n}=S();return t==null||n==null?a.jsx(b,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(Ce,{vendorId:t,billId:n})})})}const De=m.div`
|
|
11
11
|
display: flex;
|
|
12
12
|
height: 100vh;
|
|
13
13
|
width: 100%;
|
|
@@ -15,8 +15,8 @@ import{j as a}from"./liveblocks-DCIY2V5W.js";import{i as S,l as g,h as C,g as y,
|
|
|
15
15
|
flex-direction: column;
|
|
16
16
|
align-items: center;
|
|
17
17
|
background-color: ${e=>e.theme.colors.grey4};
|
|
18
|
-
box-shadow: ${e=>`0px 2px ${
|
|
19
|
-
`,Ae=g((function(e,t){const{isSubPage:n}=t;return{addressToEdit:A(e),googleAPIKey:
|
|
18
|
+
box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
19
|
+
`,Ae=g((function(e,t){const{isSubPage:n}=t;return{addressToEdit:A(e),googleAPIKey:M.googleMapsAPIKey,isSubPage:n}}),(function(e,t){const{navigate:n,location:o}=t,i=()=>{const l=me(o.state?.pathnameStackToGoBack),s=l.poppedPathname??Pe();n(s,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const s=ze(l);e(oe({addressToCreate:s})),i()},onCancel:()=>{i()}}}))(ce);function Be({isSubPage:e}){const t=C(),n=y(),o=x();return a.jsx(a.Fragment,{children:a.jsx(De,{windowSize:o,children:a.jsx(Ae,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:M.googleMapsAPIKey})})})}const Pe=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},ze=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Ee=m.div`
|
|
20
20
|
display: flex;
|
|
21
21
|
height: 100%;
|
|
22
22
|
width: 100%;
|
|
@@ -24,8 +24,8 @@ import{j as a}from"./liveblocks-DCIY2V5W.js";import{i as S,l as g,h as C,g as y,
|
|
|
24
24
|
flex-direction: column;
|
|
25
25
|
align-items: center;
|
|
26
26
|
background-color: ${e=>e.theme.colors.grey4};
|
|
27
|
-
box-shadow: ${e=>`0px 2px ${
|
|
28
|
-
`,Ne=g((function(e){const t=k(e),n=
|
|
27
|
+
box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
28
|
+
`,Ne=g((function(e){const t=k(e),n=j(e),o=A(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}}),(function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankName:s=>{e(U(s))},onSaveHandler:s=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(D(s,"us-domestic",i,l))},onWireDetailsUpdated:s=>{const{bankAccountSection:r}=s;e(T({data:r}))},onAddressClick:()=>{const s=o.pathname.replace("us-domestic","address"),r=G(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:r}})}}}))(pe);function Le(){const e=C(),t=y(),n=x(),{vendorId:o,billId:i}=S();return o==null||i==null?a.jsx(b,{}):a.jsx(a.Fragment,{children:a.jsx(Ee,{windowSize:n,children:a.jsx(Ne,{location:t,navigate:e,vendorId:o,billId:i})})})}const Fe=m.div`
|
|
29
29
|
display: flex;
|
|
30
30
|
height: 100%;
|
|
31
31
|
width: 100%;
|
|
@@ -33,40 +33,40 @@ import{j as a}from"./liveblocks-DCIY2V5W.js";import{i as S,l as g,h as C,g as y,
|
|
|
33
33
|
flex-direction: column;
|
|
34
34
|
align-items: center;
|
|
35
35
|
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
-
box-shadow: ${e=>`0px 2px ${
|
|
37
|
-
`,Te=g((function(e){const t=k(e),n=
|
|
38
|
-
width: ${
|
|
39
|
-
height: ${
|
|
40
|
-
margin-bottom: ${
|
|
41
|
-
margin-top: ${
|
|
42
|
-
margin-left: ${
|
|
36
|
+
box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
37
|
+
`,Te=g((function(e){const t=k(e),n=j(e),o=A(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}}),(function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankNameBySwift:s=>{e(se(s))},onSaveHandler:s=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(D(s,"international",i,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:r}=s;e(ie({data:r}))},onAddressClick:()=>{const s=o.pathname.replace("international","address"),r=G(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:r}})}}}))(ge);function Ue(){const e=C(),t=y(),n=x(),{vendorId:o,billId:i}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:s}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?a.jsx(b,{}):a.jsx(Fe,{windowSize:n,children:a.jsx(Te,{location:t,navigate:e,vendorId:o,billId:i,isLocalCurrencyEnabled:s})})}const Me={containerWidth:new je(100,58)},Ge=m(ye)`
|
|
38
|
+
width: ${d.sp4};
|
|
39
|
+
height: ${d.sp4};
|
|
40
|
+
margin-bottom: ${d.sp3};
|
|
41
|
+
margin-top: ${d.sp3};
|
|
42
|
+
margin-left: ${d.sp8};
|
|
43
43
|
cursor: pointer;
|
|
44
44
|
position: absolute;
|
|
45
45
|
color: ${e=>e.theme.colors.brandColorJade};
|
|
46
|
-
`,
|
|
46
|
+
`,Je=m.div`
|
|
47
47
|
display: flex;
|
|
48
48
|
height: 100vh;
|
|
49
49
|
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
50
50
|
width: 100vw;
|
|
51
51
|
overflow-y: scroll;
|
|
52
52
|
background-color: ${e=>e.theme.colors.grey4};
|
|
53
|
-
`,
|
|
53
|
+
`,Ve=m.div`
|
|
54
54
|
display: flex;
|
|
55
55
|
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
56
56
|
flex-direction: column;
|
|
57
|
-
width: ${e=>`${
|
|
57
|
+
width: ${e=>`${Me.containerWidth.value(e.windowSize)}%`};
|
|
58
58
|
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
59
|
-
box-shadow: ${e=>`0px 2px ${
|
|
60
|
-
padding-top: ${e=>e.windowSize!=="small"?
|
|
61
|
-
`,
|
|
59
|
+
box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
60
|
+
padding-top: ${e=>e.windowSize!=="small"?d.sp2:"0px"};
|
|
61
|
+
`,We=m.div`
|
|
62
62
|
display: flex;
|
|
63
63
|
flex-direction: column;
|
|
64
64
|
align-items: center;
|
|
65
65
|
justify-content: center;
|
|
66
|
-
padding: ${e=>e.windowSize==="small"?
|
|
66
|
+
padding: ${e=>e.windowSize==="small"?d.sp3:`62px ${d.sp6} ${d.sp9} ${d.sp8}`};
|
|
67
67
|
height: ${e=>e.windowSize==="small"?"490px":"auto"};
|
|
68
68
|
overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
|
|
69
69
|
width: ${e=>e.windowSize=="small"?"auto":"42%"};
|
|
70
70
|
background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
|
|
71
71
|
margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
|
|
72
|
-
`,
|
|
72
|
+
`,_e=g((function(e,t){return{file:t.file,type:t.type}}))(ke);function h({appContent:e}){const t=ee(),n=y(),{tenantEmailDomain:o,vendorId:i,billId:l}=S(),[s]=ae(),r=s.get("token"),J=n.pathname.includes("address"),f=x(),V=xe(),B=$e(),w=be(),W=()=>{V.toggle()},_=L((u=>k(u))),H=L((u=>j(u))),{authParams:K,fetchState:c,billAttachment:O,billFetchState:P,companyName:X,currencySymbol:Y,amount:Z}=_,{tenantId:z,userId:E,sessionId:N}=K,{fetchState:q,internationalBankAccountCreateStatus:Q}=H;return I.useEffect((()=>{$()}),[]),I.useEffect((()=>{w&&c==="Not-Started"&&i!=null&&o!=null&&r!=null&&t(le(i,o,r))}),[w,c,i,o,r,t]),I.useEffect((()=>{w&&c==="Completed"&&($(E,N,z),l!=null&&t(de(l)))}),[c,w,E,N,z,l,t]),c==="Error"?a.jsx(b,{}):q==="Completed"||Q.fetchState==="Completed"?($(),a.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?a.jsx(fe,{fetchState:c,style:{height:"100vh",backgroundColor:B.colors.grey5,boxShadow:`0px 2px ${d.sp1} ${B.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[c==="Completed"&&P==="Completed"&&a.jsx(we,{analytics:v,onLoad:u=>(R=>R.trackBillPayMagicLinkPageLoad(o??"",i??"",X,l??"",He(n.pathname),Y,Z))(u)}),a.jsxs(Je,{windowSize:f,children:[f!=="small"?a.jsx(Ge,{onClick:W}):null,a.jsx(We,{windowSize:f,isAddressPage:J,children:P==="In-Progress"?a.jsx(Se,{size:"ExtraLarge",start:!0}):a.jsx(_e,{file:O,type:"bill"})}),a.jsx(Ve,{windowSize:f,children:e})]})]})}const He=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Ke(){return a.jsx(ve,{})}function ra(){return a.jsxs(ne,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(Ke,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(Be,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Le,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Ue,{})})}),a.jsx(p,{path:"*",element:a.jsx(b,{})})]})}export{ra as default};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{j as u}from"./liveblocks-fvHZHCch.js";import{a as g}from"./sentry-5M-_hQEn.js";import{u as O,g as _,h as w,t as M,j as l,N as U}from"./core-CjSjXYyY.js";import{z as r,G as N,K as P,j as V,N as A,X as R,Y,Q as G}from"./index-zhznqeY3.js";import{fI as K,Uo as Q,UR as W,UI as X,gl as $,gn as q,UN as B,gY as H,dk as J,US as Z,UT as ee}from"./zeni-epic-state-DbSzv5hl.js";import{u as te,n as ne}from"./mui-Cv0Yu4Hx.js";import{u as se}from"./useDeviceId-DcODeIz7.js";import{f as ae}from"./analyticsHelper-isaFMiiy.js";import{t as ie}from"./getLocaleForTenant-CUMk734N.js";import"./recharts-iN3Tsoxx.js";import"./analytics-C3JIdGJp.js";import"./plaid-B_ZF6XEj.js";import"./dnd-DQdg3jZV.js";import"./stripe-cKAAJElX.js";import"./lottie-Cmgc5pKa.js";import"./lexical-DFfYCN7b.js";import"./pdf-C21rIcNJ.js";import"./utils-CSmUhNCi.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="1ad9991a-7786-454e-94e4-52b0c49b9bff",t._sentryDebugIdIdentifier="sentry-dbid-1ad9991a-7786-454e-94e4-52b0c49b9bff")}catch{}})();const T=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function Te(){const t=O(),a=_(),m=w(),[k]=M(),n=k.get("token"),p=k.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:C,magicLinkEmail:c,verifyDeviceFetchState:x,resendVerifyDeviceOTPFetchState:z}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),y=l((e=>e.tenantState.activeTenantFetchState.fetchState)),I=l((e=>e.tenantState.signInState)),h=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),s=l((e=>e.tenantState.loggedInUser)),o=l((e=>K(e))),b=l((e=>Q(e))),D=r.getSignedInUser(),v=te().mode;g.useEffect((()=>{s?.zeniSessionId==null&&n!=null&&T(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(W(n,i,f)))}),[n,p,t,i,f,s?.zeniSessionId]),g.useEffect((()=>{I!=="In-Progress"||S!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(X(b.tenantsInOrder),s.zeniSessionId),$(s.userId,s.zeniSessionId,o.tenantId),t(q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(B("Completed")),N.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),H().then((()=>{const e=G();e!=null&&P(e)})),setTimeout((()=>{V.trackLogin(A.Event.loginSuccess,"email",J(o.productSettings))}),2e3))}),[I,S,y,s,o,b,v,a.state,t]);const E=g.useCallback((()=>{m("/signin/auth")}),[m]),j=g.useCallback((()=>{i!=null&&d!=null&&c!=null&&t(Z(i,c,d))}),[i,d,t,c]),F=g.useCallback((e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(ee(e,i,c,d))}),[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(R,{phoneNumber:C,verifyOtpFetchState:x.fetchState,resendVerifyDeviceOTPFetchState:z,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:E});if(I==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||D!=null){const e=a.state?.origin??"/";return u.jsx(U,{to:e,state:{...a.state,origin:""}})}if(!T(n,p)||f==null||h==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(U,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(Y,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
right: 0;
|
|
6
|
+
bottom: 0;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
z-index: 9999;
|
|
11
|
+
background-color: ${t=>t.theme.colors.background};
|
|
12
|
+
`;export{Te as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as B}from"./liveblocks-fvHZHCch.js";import{a as f}from"./sentry-5M-_hQEn.js";import{u as te,j as t,i as $e,g as Ge,h as Ue,q as _}from"./core-CjSjXYyY.js";import{fI as ne,Up as Me,Uq as se,gc as xe,fH as Ne,Uz as Re,Us as Pe,Ut as Ve,q3 as je,gp as Le,Uw as b,UB as Oe,UC as Q,gq as Ze,UD as qe,Ev as ze,h5 as He,cW as We,UE as Ye,gb as Je,gr as Ke}from"./zeni-epic-state-DbSzv5hl.js";import{w as Qe,i as Xe,Z as ea,W as aa,c as ta,f as na,u as sa,A as c,g as oa,e as ia,z as ra,d as da,k as ca,M as la,o as ua,l as fa,n as X,L as ma,C as ha,D as ba,p as S,j as ee,s as pa,R as ae,x as ga,y as Sa}from"./index-zhznqeY3.js";import{D as Ea}from"./mui-Cv0Yu4Hx.js";import{u as ka}from"./InboxNotificationsProvider-BDvEEMzw.js";import{u as Ca}from"./useTaskManagerAccess-AyRfKL8F.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new l.Error().stack;i&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[i]="699bef94-d091-4857-a368-b14fa1a45ba1",l._sentryDebugIdIdentifier="sentry-dbid-699bef94-d091-4857-a368-b14fa1a45ba1")}catch{}})();const Ta=Qe((({isAppContentDrawerOpen:l,handleDrawerToggle:i})=>{const{tenantEmailDomain:s}=$e(),a=Ge(),E=ea(),n=Ue(),F=xe(),r=te(),{useFeatureGate:d}=aa(),p=ta(),{isTaskManagerAccessEnabled:k}=Ca(p),o=t((e=>ne(e))),oe=o.masterTOSInfo?.isMasterTOSAccepted??!1,$=t((e=>Ne(e))),{status:ie}=t(Re),G=$.uiState.currentChatSessionId,C=na(),{setLoading:re}=sa(),[w,U]=f.useState(void 0),A=_("/:tenantEmailDomain/dashboard")!==null,M=_("/:tenantEmailDomain/reports")!==null,m=_("/:tenantEmailDomain/onboarding/*")!==null,de=!!o.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ce}=d(c.isChargeCardFeatureEnabled),{isFeatureEnabled:x}=d(c.isDebitCardFeatureEnabled),le=oa(o,ce,x),{isFeatureEnabled:ue}=d(c.isSettingsFeatureEnabled),N=t((e=>Pe(e))),{isFeatureEnabled:T}=d(c.isReferralFeatureEnabled),v=t((e=>Ve(e)));f.useEffect((()=>{C&&T&&!m&&v.fetchState==="Not-Started"&&r(je(!0))}),[C,T,v.fetchState,m]);const D=t((e=>e.tenantState)),fe=t((e=>D.fetchState==="Completed"?Le(e):[])),g=t((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:me}=d(c.isApAgingFeatureEnabled),{isFeatureEnabled:he}=d(c.isArAgingFeatureEnabled),R=ia(),{isFeatureEnabled:be}=d(c.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:pe}=d(c.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:ge}=d(c.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Se}=d(c.isDashboardSidebarNewYearAnimationEnabled),Ee=o.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",ke=t((e=>b(e).totalUnreadCount)),Ce=t((e=>b(e).reducedFetchCountState)),P=t((e=>b(e).notificationDetailsByTab.tasks.uiState.unreadCount)),V=t((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),j=t((e=>b(e).notificationDetailsByTab.tasks.fetchCountState)),I=t((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:L,isLoading:O,isFetchingMore:Z,hasFetchedAll:q,fetchMore:Te}=ka();f.useEffect((()=>{const e=setTimeout((()=>Te?.()),0);return()=>clearTimeout(e)})),f.useEffect((()=>{if(O===!1&&Z===!1&&q===!0)if(o?.companyId!=null&&L!=null){const e=`dashboard_${o.companyId}`;U(L.filter((u=>u.roomId===e&&u.readAt==null)).length)}else U(0)}),[O,Z,q]),f.useEffect((()=>{C&&k&&!m&&j.fetchState==="Not-Started"&&F.tenantId!=null&&r(Oe("task_manager","dashboard"))}),[C,k,m,j.fetchState,F.tenantId,r]),f.useEffect((()=>{m||I.fetchState!=="Not-Started"||r(Q({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[m,I.fetchState,r]),f.useEffect((()=>{w!=null&&I.fetchState==="In-Progress"&&(r(Q({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),r(se({unreadCount:w},"comments")))}),[w,I.fetchState]);const Ie={fetchStatus:Ce,count:ke},z=s!=null?ra.getSignedInUserTenant(s):null,H=t((e=>z?.tenantId!=null?Ze(e,z.tenantId):void 0)),h=[];me===!1&&h.push("accounts_payable_aging"),he===!1&&h.push("accounts_receivable_aging"),h.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&h.push("rewards_card"),R===!1&&h.push("expense_automation_card");const W=t((e=>qe(e,h).fetchState)),Y=t((e=>ze(e).fetchState)),ye=A&&(W==="Completed"||W==="Error")||M&&(Y==="Completed"||Y==="Error")||!A&&!M?void 0:"disabled",we=f.useMemo((()=>He(o.userRole)),[o.userRole]),Ae=We(we),ve=o?.rewardsLastViewedTime==null,De=p?.userEmail!=null&&N.fetchState==="Completed"&&Ye(N.notificationSettings,p.userEmail,x,o,k),J=da(),_e=J&&ca(a);return B.jsx(Ea,{container:window.document.body,variant:"temporary",open:l,onClose:()=>i(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:B.jsx(la,{signedInUser:p,currentTenantId:D.currentTenantId??"",tenants:D.fetchState==="Completed"?fe:H!=null?[H]:[],currentTenant:o,isTenantDropdownDisabled:ye,isSettings:X(a),isInvoicing:fa(a)&&ie==="completed",isSettingsFeatureEnabled:ue,isVendorsTabVisible:Ae,isZeniAccountEnabled:de,isChargeCardEnabled:le,isTreasuryEnabled:Ee,isNotificationsTabVisible:De,notificationCountDetails:Ie,isExpenseAutomationEnabledForUser:R,selectedMenu:ua(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:ve,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:J,onNotificationIconClick:()=>{i(!1);let e=P===0&&V>0?"notifications/comments":"notifications/tasks";X(a)&&(e=P===0&&V>0?"../../notifications/comments":"../../notifications/tasks");const u=S(a.state?.pathnameStackToGoBack,a.pathname);n(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{i(!1);const e=S(a.state?.pathnameStackToGoBack,a.pathname);n("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(i(!1),s==null)return;if(e.type==="invoicing")return void n(`../${s}/invoicing/overview`,{state:{pathnameStackToGoBack:S(a.state?.pathnameStackToGoBack,a.pathname),referrer:"Sidebar"}});if(e.type==="ai_cfo"){if(ee.trackAICFOChatScreenStateChanged("viewed","left_menu",G??null,null),!oe)return void pa({location:a,navigate:n,mergeState:{referrer:"Sidebar"}});const y=S(a.state?.pathnameStackToGoBack,a.pathname);return void n(`/${s}/ai-cfo/explore`,{state:{pathnameStackToGoBack:y,referrer:"Sidebar"}})}const u=S(a.state?.pathnameStackToGoBack,a.pathname),K=e.type,Be=ae(K)&&K!=="command_center";if(ae(e.type)&&g[o.tenantId]!=null&&ee.trackMonthEndCloseClicked(g[o.tenantId].month,g[o.tenantId].year,"Sidebar"),Be&&g[o.tenantId]!=null){const y=g[o.tenantId];return void n(`/${s}/month_end_close_checks/review/${e.type}/${y.month}-${y.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const Fe=ga(e.type);Sa(e.type)?(G!=null&&r(Ke()),n(`/${s}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):n(`/${s}/${Fe}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{i(!1),n(`/${s}/settings/my_profile`)},handleReferralsClick:()=>{i(!1),n(`/${s}/rewards`)},handleBackClick:()=>{n(`/${s}/dashboard`)},handleTenantSelect:e=>{re(ma.TENANT_SWITCHING),i(!1),ha({dispatch:r,navigate:n,pathToNavigate:ba(e.tenantEmailDomain,a),selectedTenant:e,signedInUser:p})},onZeniLogoClick:()=>{E.toggle()},isAiCfo:_e,aiCfoView:$,isOnDashboard:A,updateCurrentChatSessionId:e=>{r(Je({sessionId:e,agentId:"controller"})),n(`/${s}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:be,isTaskManagerAccessEnabled:k,thanksGivingAnimationEnabled:pe,christmasAnimationEnabled:ge,newYearAnimationEnabled:Se})})})),Fa=l=>{const i=te(),s=t((E=>ne(E))),a={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(E,n)=>{Xe(n)&&Me(n.mode)==="dashboard"&&i(se({unreadCount:n.data.unread},"tasks"))}};return B.jsx(Ta,{...l,...a})};export{Fa as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./liveblocks-fvHZHCch.js";import{h as r,l as i}from"./core-CjSjXYyY.js";import{ak as n}from"./index-zhznqeY3.js";import"./mui-Cv0Yu4Hx.js";import"./sentry-5M-_hQEn.js";import"./zeni-epic-state-DbSzv5hl.js";import"./recharts-iN3Tsoxx.js";import"./analytics-C3JIdGJp.js";import"./plaid-B_ZF6XEj.js";import"./dnd-DQdg3jZV.js";import"./stripe-cKAAJElX.js";import"./lottie-Cmgc5pKa.js";import"./lexical-DFfYCN7b.js";import"./pdf-C21rIcNJ.js";import"./utils-CSmUhNCi.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="e1fe4b0b-a509-4443-892f-577d1dfd5036",o._sentryDebugIdIdentifier="sentry-dbid-e1fe4b0b-a509-4443-892f-577d1dfd5036")}catch{}})();const a=i(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(n);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as mt,b as lt,o as ft,j as N}from"./liveblocks-fvHZHCch.js";import ut from"./NotFoundScreen-XYwSCqRV.js";import{a as k}from"./sentry-5M-_hQEn.js";import{h as ht,g as pt,i as kt,u as gt,j as b,l as bt,n as St,o as K}from"./core-CjSjXYyY.js";import{cB as It,Us as Y,fI as z,h5 as Ct,Uw as S,a1s as O,UC as m,Uq as E,AL as F,Gs as Tt,a1t as At,Up as Et,UE as yt,AQ as _t,a1u as $,br as j,gk as x,AU as X,a1v as Nt,cN as Bt,cG as wt}from"./zeni-epic-state-DbSzv5hl.js";import{ao as xt,c as Ut,W as vt,A as Gt,aq as Dt,dI as Rt,p as B,dJ as Pt,w as Mt,dK as $t,i as jt,a2 as Ft}from"./index-zhznqeY3.js";import"./mui-Cv0Yu4Hx.js";import{u as Vt}from"./useAskAiCfoHostNavButtonProps-ClUKa-x1.js";import{u as Lt}from"./useTaskManagerAccess-AyRfKL8F.js";import"./recharts-iN3Tsoxx.js";import"./analytics-C3JIdGJp.js";import"./plaid-B_ZF6XEj.js";import"./dnd-DQdg3jZV.js";import"./stripe-cKAAJElX.js";import"./lottie-Cmgc5pKa.js";import"./lexical-DFfYCN7b.js";import"./pdf-C21rIcNJ.js";import"./utils-CSmUhNCi.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="6601915d-09b4-4730-b1b9-b1b807748240",t._sentryDebugIdIdentifier="sentry-dbid-6601915d-09b4-4730-b1b9-b1b807748240")}catch{}})();const Wt=(t,l)=>new Promise(((n,h)=>{const g=t.map((c=>new Promise((o=>{l(c),o()}))));Promise.all(g).then((()=>{setTimeout((()=>{n()}),2e3)})).catch((c=>{h(c)}))})),qt=bt((function(t,l){const n=Y(t),{signedInUser:h,isDebitCardFeatureEnabled:g,isTaskManagerAccessEnabled:c}=l,o=S(t),f=z(t),{currentTab:I}=o;return{notificationView:o,isNotificationSettingsVisible:h.userEmail!=null&&yt(n.notificationSettings,h.userEmail,g,f,c),isDisabled:o.notificationDetailsByTab[I].fetchState==="In-Progress"?"disabled":void 0}}),(function(t,l){const{location:n,tenantEmailDomain:h,loggedInUserRoleMap:g,externalNotificationsUnreadCount:c,allUnreadCommentsNotificationIds:o,navigate:f,markInboxNotificationAsRead:I,fetchMoreCommentsNotifications:v}=l;return{onNotificationClick:(a,s,d,r)=>{if(r==="task_deleted"){const i=`/${h}/tasks`,C=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:C,message:"triggerBackClick"}})}else{const i=`/${h}/tasks/${s}`,C=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:C,message:"triggerBackClick"}})}d==="unread"&&t(X("task_manager","read",[a],!1))},onCommentNotificationClick:(a,s,d)=>{const r=s.toString().split(`/${h}/`);if(r[1]!=null){d==="unread"&&(I(a),t($([a],j())));let i=`/${h}/${r[1]}`;const C=B(n.state?.pathnameStackToGoBack,n.pathname);r[1].startsWith("reimbursement")&&!Bt(g)&&(i="not-found"),r[1].startsWith("bill")&&!wt(g)&&(i="not-found"),f(i,{state:{pathnameStackToGoBack:C,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,s)=>{t(E(a,s))},onUpdateNotificationTabState:(a,s)=>{t(m(a,s))},onUpdateNotificationViewCurrentTabAndSubTab:(a,s)=>{t(O(a,s));const d=`../${a}`,r=B(n.state?.pathnameStackToGoBack,n.pathname);f(d,{state:{pathnameStackToGoBack:r}})},onUpdateNotificationViewSubTab:a=>{t(Nt(a))},onFetchMoreNotifications:(a,s)=>{if(a==="tasks"){const d=[];s==="all"?d.push("read","unread"):s!=="mentions"&&d.push(s),t(F("task_manager","dashboard",d))}else v?.()},onUpdateNotificationStatus:(a,s,d,r)=>{a==="tasks"?t(X("task_manager",d,r)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(r.map((i=>{d==="read"&&(I(i),t($([i],j())))}))).then((()=>{t(m({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(E({unreadCount:c-r.length>0?c-r.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(m({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Wt(o,I).then((()=>{t($(o,j())),t(m({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(E({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((s=>{t(m({markAsAllReadState:{fetchState:"Error",error:s}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const a=Ft(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../../dashboard";f(s,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=B(n.state?.pathnameStackToGoBack,n.pathname);f("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}}))(Mt($t)),Qt=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:h}=kt(),{areTenantIdsInSync:g}=xt(),c=It(h??""),o=gt(),f=Ut(),[I,v]=k.useState(!1),a=b((e=>Y(e))),s=b((e=>z(e))),{useFeatureGate:d}=vt(),{isFeatureEnabled:r}=d(Gt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:i,onAskAiCfoClick:C}=Vt({mobileExploreReferrer:"Notifications"});Dt({isDataReady:!0});const Z=Ct(s.userRole);if(s==null||n==null||s.companyId==null)throw Error("Can't access notifications page without current tenant...");if(f==null)throw Error("Can't access notifications page without signed in...");const V=b((e=>S(e).notificationDetailsByTab.tasks.fetchState)),L=b((e=>S(e).currentTab)),G=b((e=>S(e).currentSubTab)),tt=b((e=>S(e).notificationDetailsByTab.comments.fetchCountState)),D=b((e=>S(e).notificationDetailsByTab.comments.fetchState)),et=b((e=>S(e).notificationDetailsByTab.comments.uiState.unreadCount)),at=b((e=>S(e).allExternalNotifications)).filter((e=>e.inboxNotification.readAt==null)).map((e=>e.inboxNotification.id)),st=Rt().allUsers,{inboxNotifications:w,isLoading:y,hasFetchedAll:T,isFetchingMore:R,fetchMore:ot}=mt(),{threads:W,isLoading:q,fetchMore:Q,isFetchingMore:H,hasFetchedAll:J}=lt({query:{metadata:{companyId:s.companyId,application:"dashboard"}}});k.useEffect((()=>{if(L!==c&&c!=null&&o(O(c)),c==null){const e=`../${L}`,p=B(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}}),[c]),k.useEffect((()=>{tt.fetchState==="Not-Started"&&o(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(y===!1&&T===!0&&s?.companyId!=null&&w!=null){const e=`dashboard_${s.companyId}`,p=w.filter((A=>A.roomId===e&&A.readAt==null)).length;o(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),o(E({unreadCount:p},"comments"))}}),[y,T]),k.useEffect((()=>{V!=="In-Progress"&&g&&o(F("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const e=setTimeout((()=>ot?.()),0);return()=>clearTimeout(e)}));const P=y||R===!0||T!==!0||y||R===!0||T!==!0;k.useEffect((()=>{P&&D!=="In-Progress"?o(m({fetchState:"In-Progress",error:void 0},"comments")):P||D!=="In-Progress"||o(m({fetchState:"Completed",error:void 0},"comments"))}),[P,D]),k.useEffect((()=>{o(E({hasMore:T!==!0},"comments"))}),[T]),k.useEffect((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&I===!1&&(v(!0),o(Tt()))}),[a.fetchState]),k.useEffect((()=>{if(y===!1&&q===!1&&w!=null&&W!=null){const e=`dashboard_${s.companyId}`,p=w.filter((u=>u.roomId===e)).filter((u=>Pt(u.kind))),A=p.filter((u=>u.readAt==null)),_=p.map((u=>u.id)),ct=p.map((u=>{const M=W.find((dt=>{return dt.id===((U=u).kind==="thread"?U.threadId:"subjectId"in U?U.subjectId:void 0);var U}));return M!=null?{inboxNotification:{...u,threadId:M.id},thread:M}:(H||J===!0||Q==null||Q(),null)})).filter((u=>u!=null));o(m({allNotificationsIds:_},"comments")),o(E({totalCount:_.length,unreadCount:A.length},"comments")),o(At(ct))}}),[y,R,H,T,J,q,w?.length]);const nt={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(jt(p)){const A=Et(p.mode);if(A==="dashboard"&&o(E({unreadCount:p.data.unread},"tasks")),V!=="In-Progress"){const _=[];G==="all"?_.push("read","unread"):G!=="mentions"&&_.push(G),o(F("task_manager",A,_,!0))}}}},it=ft(),{isTaskManagerAccessEnabled:rt}=Lt(f);return N.jsx(qt,{tenantEmailDomain:n,loggedInUserRoleMap:Z,signedInUser:f,externalNotificationsUnreadCount:et,location:l,navigate:t,isDebitCardFeatureEnabled:r,isTaskManagerAccessEnabled:rt,users:st,markInboxNotificationAsRead:it,allUnreadCommentsNotificationIds:at,isAiCfoAccessEnabled:i,onAskAiCfoClick:C,...nt})};function me(){return N.jsxs(St,{children:[N.jsx(K,{path:"/:selectedTab",element:N.jsx(Qt,{})}),N.jsx(K,{path:"*",element:N.jsx(ut,{})})]})}export{me as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-
|
|
1
|
+
import{j as m}from"./liveblocks-fvHZHCch.js";import{a as r}from"./sentry-5M-_hQEn.js";import{u as A,g as j,j as o,N as C}from"./core-CjSjXYyY.js";import{V3 as P,fI as V,gp as x,V4 as z,V5 as D,V6 as M,V7 as R,pW as k,TK as L}from"./zeni-epic-state-DbSzv5hl.js";import{z as h,af as I}from"./index-zhznqeY3.js";import"./mui-Cv0Yu4Hx.js";import"./recharts-iN3Tsoxx.js";import"./analytics-C3JIdGJp.js";import"./plaid-B_ZF6XEj.js";import"./dnd-DQdg3jZV.js";import"./stripe-cKAAJElX.js";import"./lottie-Cmgc5pKa.js";import"./lexical-DFfYCN7b.js";import"./pdf-C21rIcNJ.js";import"./utils-CSmUhNCi.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="d9a51ca8-2af9-4ae3-95b4-dfedd8f57b66",n._sentryDebugIdIdentifier="sentry-dbid-d9a51ca8-2af9-4ae3-95b4-dfedd8f57b66")}catch{}})();function ee(){const n=A(),a=j(),{params:t,error:i}=r.useMemo((()=>P(a.search)),[a.search]),w=r.useMemo((()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application"),[a.search,t]),f=h.isSignedIn(),s=h.getSignedInUser(),p=o((e=>V(e))),l=o((e=>x(e))),d=o((e=>e.tenantState.fetchState)),y=o(z),b=o(D),u=o(M),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(R())}),[n,a.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{f&&s!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(s.userId,s.zeniSessionId??void 0))))}),[f,s,d,n]),r.useEffect((()=>{u!=null&&u!==""&&(window.location.href=u)}),[u]);const U=r.useMemo((()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((T=>T.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[p?.tenantId,l]),c=v??U;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:S,approveError:E??b,isApproving:y==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&s!=null&&c!=null&&n(L(s.userId,s.zeniSessionId??void 0,c,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(C,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as n}from"./liveblocks-fvHZHCch.js";import{h as W,u as Y,g as z,i as X,j as d,l as Z,n as H,o as S}from"./core-CjSjXYyY.js";import{fI as v,Aw as R,vc as J,VX as w,v7 as T,bq as K,c0 as Q,v8 as ee,VY as ae,VF as C,ek as te,Ek as se,VZ as oe,EI as re,e0 as ne,d$ as ce}from"./zeni-epic-state-DbSzv5hl.js";import{ag as ie,z as le,ao as de,aq as fe,V as me,a6 as pe,j as M,aB as ue,p as he,W as Fe,A as ge}from"./index-zhznqeY3.js";import"./mui-Cv0Yu4Hx.js";import Ie from"./NotFoundScreen-XYwSCqRV.js";import{F as be}from"./FeaturePreviewScreen-DNtB8Ogu.js";import{a as F}from"./sentry-5M-_hQEn.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-ClUKa-x1.js";import{u as Ce}from"./useInitialThreadRequest-DvEY1Wx_.js";import{t as Te}from"./routePaths-o_RQZUW0.js";import{M as ye}from"./MobileAppDrawer-B8sARono.js";import"./recharts-iN3Tsoxx.js";import"./analytics-C3JIdGJp.js";import"./plaid-B_ZF6XEj.js";import"./dnd-DQdg3jZV.js";import"./stripe-cKAAJElX.js";import"./lottie-Cmgc5pKa.js";import"./lexical-DFfYCN7b.js";import"./pdf-C21rIcNJ.js";import"./utils-CSmUhNCi.js";import"./InboxNotificationsProvider-BDvEEMzw.js";import"./useTaskManagerAccess-AyRfKL8F.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="5ffc30b6-efa1-46c6-8783-31ccf3313c79",s._sentryDebugIdIdentifier="sentry-dbid-5ffc30b6-efa1-46c6-8783-31ccf3313c79")}catch{}})();const y=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},Ae=Z((function(s){const e=ae(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach((r=>{a[r]=o[r]===!1})),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:M}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(w(a,o)),e.isPandLReportFetched(a)||s(T(a)),y(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(re(a))},onForecastVsActualsCompareToggle:a=>{s(oe(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(se(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=te(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const u=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),f=he(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:f,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(ue);function U(){const s=ie(),e=W(),a=Y(),o=z(),{forecastId:r,tenantEmailDomain:c}=X(),[p,u]=F.useState(!1),[f,A]=F.useState(!1),g=le.getSignedInUser(),k=d((t=>v(t))),V=k.company?.companyInfo.firstMonthOfFY??1,i=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),x=d((t=>t.profitAndLossState)),D=d((t=>t.reportUIOptionsState.selectedForecast)),j=t=>x.pandLByForecastID[t]!=null&&ee(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:I}=de();fe({isDataReady:l});const{isAiCfoAccessEnabled:q,onAskAiCfoClick:B}=Se({mobileExploreReferrer:"Forecast"});F.useEffect((()=>{if(!p&&I)u(!0),l||a(J());else if(l&&!f){A(!0);const t=((m,P,O)=>P!=null?m.forecasts.findIndex((b=>b.id===P)):O!=null?m.forecasts.findIndex((b=>b.id===O)):m.forecasts.length>0?0:-1)(i,r,D?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=D?.index?(a(w(i.forecasts[t].id,t)),y(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&y(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!j(i.forecasts[t].id)&&I&&a(T(i.forecasts[t].id))}}),[p,u,a,l,i,f,A,R,T,I]);const E=me(),_=E?.loggedInUserRole!=null&&K(E.loggedInUserRole),$=Ce(k?.companyId,{clearParams:l&&f}),[N,G]=F.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",g?.firstName??""),h.searchParams.set("lastname",g?.lastName??""),h.searchParams.set("email",g?.userEmail??"");const L=t=>{G(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(pe,{analytics:M,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:N,handleDrawerToggle:L}),n.jsx(Ae,{firstMonthOfFY:V,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:j,meetingUrl:Q(h.toString()),hasTransactionAccess:_,isAiCfoAccessEnabled:q,onAskAiCfoClick:B,initialOpenThreadRequest:$,onClickMenuIcon:()=>{L(!0)}})]})}function Xe(){const s=d((c=>v(c))),{useFeatureGate:e}=Fe(),{isFeatureEnabled:a}=e(ge.isDebitCardFeatureEnabled),o=ne(a,s),r=ce(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(H,{children:[n.jsx(S,{path:"/",element:n.jsx(U,{})}),n.jsx(S,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(S,{path:"/:forecastId/*",element:n.jsx(Ie,{})})]})}export{Xe as default};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-
|
|
1
|
+
import{j as r}from"./liveblocks-fvHZHCch.js";import{a as p}from"./sentry-5M-_hQEn.js";import{E as a,a7 as u,ab as f,ac as h}from"./index-zhznqeY3.js";import{s as d}from"./mui-Cv0Yu4Hx.js";import{i as y}from"./core-CjSjXYyY.js";import"./zeni-epic-state-DbSzv5hl.js";import"./recharts-iN3Tsoxx.js";import"./analytics-C3JIdGJp.js";import"./plaid-B_ZF6XEj.js";import"./dnd-DQdg3jZV.js";import"./stripe-cKAAJElX.js";import"./lottie-Cmgc5pKa.js";import"./lexical-DFfYCN7b.js";import"./pdf-C21rIcNJ.js";import"./utils-CSmUhNCi.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8e7dd9f4-06b5-4f16-8d32-9e3d111e8904",e._sentryDebugIdIdentifier="sentry-dbid-8e7dd9f4-06b5-4f16-8d32-9e3d111e8904")}catch{}})();const g=d("div")`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: 100%;
|
|
5
5
|
min-height: 100vh;
|
|
6
6
|
background-color: ${e=>e.theme.colors.grey4};
|
|
7
|
-
`,k=
|
|
7
|
+
`,k=d("header")`
|
|
8
8
|
flex-shrink: 0;
|
|
9
9
|
padding: ${a.sp3} ${a.sp4};
|
|
10
|
-
`,b=
|
|
10
|
+
`,b=d(u)`
|
|
11
11
|
width: ${a.sp4};
|
|
12
12
|
height: ${a.sp4};
|
|
13
13
|
color: ${e=>e.theme.colors.brandColorJade};
|
|
14
|
-
`,x=
|
|
14
|
+
`,x=d("main")`
|
|
15
15
|
display: flex;
|
|
16
16
|
flex: 1 1 auto;
|
|
17
17
|
flex-direction: column;
|
|
18
18
|
align-items: center;
|
|
19
19
|
justify-content: center;
|
|
20
20
|
padding: ${a.sp4};
|
|
21
|
-
`;function j({children:e}){return r.jsxs(g,{"data-testid":"invoicing-collect-payment-layout",children:[r.jsx(k,{children:r.jsx(b,{"aria-label":"Zeni",role:"img"})}),r.jsx(x,{children:e})]})}class w extends Error{statusCode;constructor(t,o){super(t),this.name="PortalRequestError",this.statusCode=o}}function $(e,t){const o=(function(){const n=h?.invoicingMicroServiceBaseUrl;return`${n!=null&&n.length>0?n:""}/1.0`})(),s={namespace:e,token:t};async function i(n,m){const l=await fetch(`${o}${n}`,{body:JSON.stringify(m),headers:{"Content-Type":"application/json"},method:"POST"}),
|
|
21
|
+
`;function j({children:e}){return r.jsxs(g,{"data-testid":"invoicing-collect-payment-layout",children:[r.jsx(k,{children:r.jsx(b,{"aria-label":"Zeni",role:"img"})}),r.jsx(x,{children:e})]})}class w extends Error{statusCode;constructor(t,o){super(t),this.name="PortalRequestError",this.statusCode=o}}function $(e,t){const o=(function(){const n=h?.invoicingMicroServiceBaseUrl;return`${n!=null&&n.length>0?n:""}/1.0`})(),s={namespace:e,token:t};async function i(n,m){const l=await fetch(`${o}${n}`,{body:JSON.stringify(m),headers:{"Content-Type":"application/json"},method:"POST"}),c=await l.json();if(!l.ok)throw new w(c.status?.message??`Request failed (${l.status}).`,l.status);return c.data}return{checkoutSession:()=>i("/portal/payment-link/checkout-session",s),plaidLinkToken:()=>i("/portal/payment-link/plaid-link-token",s),requestAccess:()=>i("/portal/payment-link/request-access",s),savePaymentMethod:n=>i("/portal/payment-link/payment-methods",{...s,...n}),session:()=>i("/portal/payment-link/session",s),setupIntent:()=>i("/portal/payment-link/setup-intent",s)}}function B(){const{namespace:e="",token:t=""}=y();p.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]);const o=p.useMemo((()=>$(e,t)),[e,t]);return r.jsx(j,{children:r.jsx(f,{portal:o})})}export{B as default};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{j as a}from"./liveblocks-fvHZHCch.js";import{VT as re,fI as N,m3 as _,e0 as Y,d$ as le,SJ as Q,Vg as ce,Df as Pe,VU as J,D4 as je,Dp as Le,Dj as de,D8 as pe,Dn as Te,Dk as ve,VV as ue,sx as Ve,g9 as Ae,gG as Fe,VW as H,Dc as me,Db as ge,Ds as Re,c9 as Oe}from"./zeni-epic-state-DbSzv5hl.js";import{$ as fe,W as X,A as G,z as W,g as he,H as Ce,ad as be,ax as ye,ay as Ze,a9 as Se,E as R,ae as De,G as K,az as Ue,ao as Be,aq as $e,a6 as ze,j as we,N as He,p as Ge,aA as _e,V as We}from"./index-zhznqeY3.js";import{D as xe,n as M,S as Ie}from"./mui-Cv0Yu4Hx.js";import ae from"./NotFoundScreen-XYwSCqRV.js";import{a as c}from"./sentry-5M-_hQEn.js";import{u as ee,i as Ke,j as g,h as Me,g as qe,l as Je,n as se,o as z}from"./core-CjSjXYyY.js";import{u as Ne}from"./useAskAiCfoHostNavButtonProps-ClUKa-x1.js";import{M as Ye}from"./MobileAppDrawer-B8sARono.js";import"./recharts-iN3Tsoxx.js";import"./analytics-C3JIdGJp.js";import"./plaid-B_ZF6XEj.js";import"./dnd-DQdg3jZV.js";import"./stripe-cKAAJElX.js";import"./lottie-Cmgc5pKa.js";import"./lexical-DFfYCN7b.js";import"./pdf-C21rIcNJ.js";import"./utils-CSmUhNCi.js";import"./InboxNotificationsProvider-BDvEEMzw.js";import"./useTaskManagerAccess-AyRfKL8F.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5d4b737b-a47c-48b0-9a5a-f162c145420a",e._sentryDebugIdIdentifier="sentry-dbid-5d4b737b-a47c-48b0-9a5a-f162c145420a")}catch{}})();const Qe={overlayWidth:new Se(100,100,48)},te=K.getLocalizedStrings().peoplePage.invitePage,ne=K.getLocalizedStrings().common,Xe=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const h=fe(),m=ee(),[O,Z]=c.useState(!1),[k,S]=c.useState(!1),{userId:D}=Ke(),r=g((l=>re(l))),p=g((l=>N(l))),E=g((l=>_(l))),{useFeatureGate:x}=X(),{isFeatureEnabled:I}=x(G.isDebitCardFeatureEnabled),P=Y(I,p),T=le(p),v=Q(p),U=ce(p),B=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(J()),y()},V=()=>{O===!0?S(!0):C()},$=d.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(G.isChargeCardFeatureEnabled),L=he(p,j,I),{isCardsHidden:A}=Ce(p?.tenantId),b=!L||A,F=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:v,isAccountingClassesEnabled:E,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:b,isTreasuryDisabled:F===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:C,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(de({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?je(e):Le(v))},onCloseClick:V,isLoading:w||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return c.useEffect((()=>{w===!1&&D!=null&&m(Pe(D))}),[w,D]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:be.overlayDark,cursor:"pointer"}}},onClose:V,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(ye,{titleComponent:a.jsx(ke,{children:te.discardTitle}),descriptionComponent:a.jsx(Ee,{children:te.discardDescription}),primaryButtonText:ne.yes,secondaryButtonText:ne.no,action:o,isEditPopup:!0}):null,a.jsx(Ze,{...s})]})})},ea=M(Ie)`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
`,ke=M(De.H6Regular)`
|
|
6
|
+
margin-top: ${R.sp7};
|
|
7
|
+
padding-left: ${R.sp8};
|
|
8
|
+
padding-right: ${R.sp8};
|
|
9
|
+
color: ${e=>e.theme.colors.primary};
|
|
10
|
+
word-break: break-word;
|
|
11
|
+
`,Ee=M(De.LargeRegularSp)`
|
|
12
|
+
color: ${e=>e.theme.colors.hero};
|
|
13
|
+
padding-left: ${R.sp8};
|
|
14
|
+
padding-right: ${R.sp8};
|
|
15
|
+
margin-bottom: 30px;
|
|
16
|
+
margin-top: ${R.sp4};
|
|
17
|
+
white-space: pre-line;
|
|
18
|
+
`,aa={overlayWidth:new Se(100,100,48)},oe=K.getLocalizedStrings().peoplePage.invitePage,ie=K.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:y})=>{const h=fe(),m=ee(),[O,Z]=c.useState(!1),[k,S]=c.useState(!1),D=g((o=>re(o))),r=g((o=>N(o))),p=g((o=>_(o))),{useFeatureGate:E}=X(),{isFeatureEnabled:x}=E(G.isDebitCardFeatureEnabled),I=Y(x,r),P=le(r),T=Q(r),v=ce(r),U=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const w=()=>{y(),m(J())},C=()=>{O===!0?S(!0):w()},V={onOkClick:()=>{S(!1),w()},onCancelClick:()=>{S(!1)}},$=d.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=E(G.isChargeCardFeatureEnabled),L=he(r,j,x),{isCardsHidden:A}=Ce(r?.tenantId),b=!L||A,F=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,onPeopleLocalDataUpdated:o=>{m(de({peopleLocalData:o})),Z(!0)},onResetClick:w,onSaveClick:()=>{m(f==="zeni_only"?Te(e):ve())},onCloseClick:C,peopleDetails:D,isAccountingClassesEnabled:p,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:b,isTreasuryDisabled:F===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:B};return c.useEffect((()=>{D.invitePersonState.fetchState==="Completed"&&(y(),m(J()))}),[D.invitePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:aa.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:be.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(ye,{titleComponent:a.jsx(ke,{children:oe.discardTitle}),descriptionComponent:a.jsx(Ee,{children:oe.discardDescription}),primaryButtonText:ie.yes,secondaryButtonText:ie.no,action:V}):null,a.jsx(Ue,{...s})]})})},ta=M(Ie)`
|
|
19
|
+
display: flex;
|
|
20
|
+
min-height: 100%;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
`,na=Je((function(e,t){const d=ue(e),n=W.getSignedInUser();return{data:d,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:_(e),analytics:we}}),(function(e,t){const{navigate:d,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,y)=>{e(pe(i,y))},onResendInvite:i=>{e(Re(i))},onReloadPeople:()=>{e(me()),e(ge(n,f))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(H({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(H({searchText:i}))}}}}))(_e);function q({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const d=Me(),n=ee(),f=qe(),{areTenantIdsInSync:i}=Be(),y=W.getSignedInUser(),h=g((s=>N(s))),{useFeatureGate:m}=X(),{isFeatureEnabled:O}=m(G.isDebitCardFeatureEnabled),Z=g((s=>_(s))),k=!Y(O,h)&&Z,S=Q(h),D=h?.tenantId,{tenantEmailDomain:r}=h,[p,E]=c.useState(!1),[x,I]=c.useState(!1),[P,T]=c.useState(!1),[v,U]=c.useState("off"),[B,w]=c.useState(!1),C=s=>{w(s)},{isAiCfoAccessEnabled:V,onAskAiCfoClick:$}=Ne({mobileExploreReferrer:"People"}),u=g((s=>ue(s)));$e({isDataReady:u.fetchState==="Completed"});const j=g((s=>Ve(s.classState,s.classListState))),L=g((s=>Ae(s.userState,s.userRoleState,s.userListViewState,"manager"))),A=g((s=>Fe(s))),b=h?.companyId;c.useEffect((()=>{p&&v===u.uiState.mode||!i||(n(H({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(u.uiState.mode),E(!0),n(me()))}),[p,y,D,n,u.uiState.mode,i]),c.useEffect((()=>{b!=null&&i&&n(ge(b,k))}),[b,k,i]),c.useEffect((()=>{I(e!=null&&e===!0),T(t!=null&&t===!0&&t)}),[e,t]),c.useEffect((()=>{n(H({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const F=()=>{I(!1),T(!1),d("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(ze,{analytics:we,onLoad:s=>s.trackPageLoaded(He.Event.members)}):null,x===!0?a.jsx(sa,{closeDrawerHandler:F,isInvitePeopleDrawerOpen:x,managersListView:L,companyPassportView:A,classListView:j,companyId:b,mode:u.uiState.mode}):null,P===!0?a.jsx(Xe,{closeDrawerHandler:F,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:A,classListView:j,companyId:b,mode:u.uiState.mode}):null,a.jsx(Ye,{isAppContentDrawerOpen:B,handleDrawerToggle:C}),a.jsx(na,{navigate:d,signedInUser:y,isZeni:h.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:b,shouldFetchClasses:k,classList:j,managersView:L,peopleView:u,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(s,o)=>{n(H({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=Ge(f.state?.pathnameStackToGoBack,f.pathname);d(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:V,onAskAiCfoClick:$})]})}function ka(){const e=We();return Oe(e?.loggedInUserRole??[])?a.jsxs(se,{children:[a.jsx(z,{path:"/",element:a.jsx(q,{})}),a.jsx(z,{path:"new",element:a.jsx(q,{isInvitePeopleDrawerOpen:!0})}),a.jsx(z,{path:":userId/edit",element:a.jsx(q,{isEditPeopleDrawerOpen:!0})}),a.jsx(z,{path:"*",element:a.jsx(ae,{})})]}):a.jsx(se,{children:a.jsx(z,{path:"*",element:a.jsx(ae,{})})})}export{ka as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-fvHZHCch.js";import E from"./NotFoundScreen-XYwSCqRV.js";import{a as r}from"./sentry-5M-_hQEn.js";import{h as _,g as v,j as p,i as M,u as P,N as U,l as z,n as O,o as h}from"./core-CjSjXYyY.js";import{fI as B,a1w as b,bo as F,bn as N,iP as V,gk as q}from"./zeni-epic-state-DbSzv5hl.js";import{Z as L,z as I,aq as Z,dL as $}from"./index-zhznqeY3.js";import"./mui-Cv0Yu4Hx.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-ClUKa-x1.js";import{M as H}from"./MobileAppDrawer-B8sARono.js";import"./recharts-iN3Tsoxx.js";import"./analytics-C3JIdGJp.js";import"./plaid-B_ZF6XEj.js";import"./dnd-DQdg3jZV.js";import"./stripe-cKAAJElX.js";import"./lottie-Cmgc5pKa.js";import"./lexical-DFfYCN7b.js";import"./pdf-C21rIcNJ.js";import"./utils-CSmUhNCi.js";import"./InboxNotificationsProvider-BDvEEMzw.js";import"./useTaskManagerAccess-AyRfKL8F.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8b5c7917-87e9-4068-9bce-191f1486ced3",e._sentryDebugIdIdentifier="sentry-dbid-8b5c7917-87e9-4068-9bce-191f1486ced3")}catch{}})();const J=z((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))($),K=()=>{const e=_(),t=v(),c=L(),o=p((a=>B(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:f}=M(),u=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(u(q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),m.current=!0}),[n?.fetchState,d]),j=r.useCallback(((a,i)=>{d(a,i,!1)}),[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return Z({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${f}/dashboard`,replace:!0})};function he(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(K,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{he as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,R as a}from"./sentry
|
|
1
|
+
import{a as h,R as a}from"./sentry-5M-_hQEn.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new r.Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="1e16de4c-304f-4e91-a86b-dc86bcc8d8a2",r._sentryDebugIdIdentifier="sentry-dbid-1e16de4c-304f-4e91-a86b-dc86bcc8d8a2")}catch{}})();const c="64px",u={};var k=({src:r,light:t,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:b})=>{const[p,i]=h.useState(null);h.useEffect((()=>{r&&t&&n&&v({src:r,light:t,oEmbedUrl:n})}),[r,t,n]);const v=async({src:e,light:s,oEmbedUrl:I})=>{if(a.isValidElement(s))return;if(typeof s=="string")return void i(s);if(u[e])return void i(u[e]);i(null);const E=await fetch(I.replace("{url}",e)),f=await E.json();if(f.thumbnail_url){const g=f.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(g),u[e]=g}},d=a.isValidElement(t),y={display:"flex",alignItems:"center",justifyContent:"center"},o={preview:{width:"100%",height:"100%",backgroundImage:p&&!d?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:d?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=a.createElement("div",{style:o.shadow,className:"react-player__shadow"},a.createElement("div",{style:o.playIcon,className:"react-player__play-icon"}));return a.createElement("div",{style:o.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...b?{"aria-label":b}:{}},d?t:null,w||_)};export{k as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as _l}from"./liveblocks-
|
|
1
|
+
import{j as _l}from"./liveblocks-fvHZHCch.js";import{p as te,d as jc,c as an,g as Sl,a as Ol}from"./sentry-5M-_hQEn.js";import{L as ge,c0 as xc,fI as kc,Uo as Tc,Ve as jl,c9 as xl}from"./zeni-epic-state-DbSzv5hl.js";import{a as pe,b as kl,c as Tl,d as Al,e as un,f as Rl,g as Pl,h as Il,i as Ve,j as Ac,k as ot,l as xt,m as Ll,o as ct,p as Nl}from"./utils-CSmUhNCi.js";import{r as cn}from"./empty-CbjHBZe9.js";import{r as $l,a as Ml,b as Cl,c as Dl}from"./pdf-lib-CeyW0y7u.js";import{a as Ye,r as Fl}from"./index-DrKuh0N3.js";import{r as Ul}from"./index-BOFTe1v-.js";import{h as Bl,g as ql,u as Gl,j as _n,l as zl}from"./core-CjSjXYyY.js";import{u as Zl,z as Rc,L as Hl,ai as Vl,aj as Yl,U as Wl,C as Kl}from"./index-zhznqeY3.js";import"./mui-Cv0Yu4Hx.js";import{d as It}from"./decodeURIComponentSafe-CL2ts4bS.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="bcd9c519-0318-4424-92d8-8666821125ad",e._sentryDebugIdIdentifier="sentry-dbid-bcd9c519-0318-4424-92d8-8666821125ad")}catch{}})();var Sn,On={exports:{}},jn,xn,kn,Tn,An,Rn,Pn,In,Ln,Lt,Nn,$n,Mn,Cn,Dn,Fn,Un,Bn,qn,Gn,zn,Nt,Zn,Hn,Vn,Yn,Wn,Kn,Jn,$t,Xn,Qn,eo,to,ro,no,oo,Mt={exports:{}},Ct={exports:{}},Dt={};function Pc(){if(jn)return Dt;function e(r){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(r)}function o(r,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},o(r,t)}function h(r){var t=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var i,l=n(r);if(t){var u=n(this).constructor;i=Reflect.construct(l,arguments,u)}else i=l.apply(this,arguments);return(function(f,b){if(b&&(e(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m})(f)})(this,i)}}function n(r){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(r)}jn=1;var c,p,y={};function g(r,t,i){i||(i=Error);var l=(function(u){(function(a,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(d&&d.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),d&&o(a,d)})(m,u);var f,b=h(m);function m(a,d,v){var _;return(function(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")})(this,m),_=b.call(this,(function(w,S,N){return typeof t=="string"?t:t(w,S,N)})(a,d,v)),_.code=r,_}return f=m,Object.defineProperty(f,"prototype",{writable:!1}),f})(i);y[r]=l}function s(r,t){if(Array.isArray(r)){var i=r.length;return r=r.map((function(l){return String(l)})),i>2?"one of ".concat(t," ").concat(r.slice(0,i-1).join(", "),", or ")+r[i-1]:i===2?"one of ".concat(t," ").concat(r[0]," or ").concat(r[1]):"of ".concat(t," ").concat(r[0])}return"of ".concat(t," ").concat(String(r))}return g("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),g("ERR_INVALID_ARG_TYPE",(function(r,t,i){var l,u,f;if(c===void 0&&(c=it()),c(typeof r=="string","'name' must be a string"),typeof t=="string"&&(u="not ",t.substr(0,u.length)===u)?(l="must not be",t=t.replace(/^not /,"")):l="must be",(function(m,a,d){return(d===void 0||d>m.length)&&(d=m.length),m.substring(d-a.length,d)===a})(r," argument"))f="The ".concat(r," ").concat(l," ").concat(s(t,"type"));else{var b=(function(m,a,d){return typeof d!="number"&&(d=0),!(d+a.length>m.length)&&m.indexOf(a,d)!==-1})(r,".")?"property":"argument";f='The "'.concat(r,'" ').concat(b," ").concat(l," ").concat(s(t,"type"))}return f+=". Received type ".concat(e(i))}),TypeError),g("ERR_INVALID_ARG_VALUE",(function(r,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";p===void 0&&(p=pe());var l=p.inspect(t);return l.length>128&&(l="".concat(l.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(i,". Received ").concat(l)}),TypeError),g("ERR_INVALID_RETURN_VALUE",(function(r,t,i){var l;return l=i&&i.constructor&&i.constructor.name?"instance of ".concat(i.constructor.name):"type ".concat(e(i)),"Expected ".concat(r,' to be returned from the "').concat(t,'"')+" function but got ".concat(l,".")}),TypeError),g("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];c===void 0&&(c=it()),c(t.length>0,"At least one arg needs to be specified");var l="The ",u=t.length;switch(t=t.map((function(f){return'"'.concat(f,'"')})),u){case 1:l+="".concat(t[0]," argument");break;case 2:l+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:l+=t.slice(0,u-1).join(", "),l+=", and ".concat(t[u-1]," arguments")}return"".concat(l," must be specified")}),TypeError),Dt.codes=y,Dt}function Jl(){if(kn)return xn;function e(j,E){var O=Object.keys(j);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(j);E&&(P=P.filter((function(x){return Object.getOwnPropertyDescriptor(j,x).enumerable}))),O.push.apply(O,P)}return O}function o(j){for(var E=1;E<arguments.length;E++){var O=arguments[E]!=null?arguments[E]:{};E%2?e(Object(O),!0).forEach((function(P){h(j,P,O[P])})):Object.getOwnPropertyDescriptors?Object.defineProperties(j,Object.getOwnPropertyDescriptors(O)):e(Object(O)).forEach((function(P){Object.defineProperty(j,P,Object.getOwnPropertyDescriptor(O,P))}))}return j}function h(j,E,O){return(E=c(E))in j?Object.defineProperty(j,E,{value:O,enumerable:!0,configurable:!0,writable:!0}):j[E]=O,j}function n(j,E,O){return E&&(function(P,x){for(var U=0;U<x.length;U++){var L=x[U];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(P,c(L.key),L)}})(j.prototype,E),Object.defineProperty(j,"prototype",{writable:!1}),j}function c(j){var E=(function(O,P){if(l(O)!=="object"||O===null)return O;var x=O[Symbol.toPrimitive];if(x!==void 0){var U=x.call(O,P);if(l(U)!=="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(O)})(j,"string");return l(E)==="symbol"?E:String(E)}function p(j,E){if(E&&(l(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(j)}function y(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}function g(j){var E=typeof Map=="function"?new Map:void 0;return g=function(O){if(O===null||(P=O,Function.toString.call(P).indexOf("[native code]")===-1))return O;var P;if(typeof O!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(O))return E.get(O);E.set(O,x)}function x(){return s(O,arguments,i(this).constructor)}return x.prototype=Object.create(O.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),t(x,O)},g(j)}function s(j,E,O){return s=r()?Reflect.construct.bind():function(P,x,U){var L=[null];L.push.apply(L,x);var A=new(Function.bind.apply(P,L));return U&&t(A,U.prototype),A},s.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function t(j,E){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,P){return O.__proto__=P,O},t(j,E)}function i(j){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},i(j)}function l(j){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},l(j)}kn=1;var u=pe().inspect,f=Pc().codes.ERR_INVALID_ARG_TYPE;function b(j,E,O){return(O===void 0||O>j.length)&&(O=j.length),j.substring(O-E.length,O)===E}var m="",a="",d="",v="",_={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(j){var E=Object.keys(j),O=Object.create(Object.getPrototypeOf(j));return E.forEach((function(P){O[P]=j[P]})),Object.defineProperty(O,"message",{value:j.message}),O}function S(j){return u(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function N(j,E,O){var P="",x="",U=0,L="",A=!1,z=S(j),R=z.split(`
|
|
2
2
|
`),I=S(E).split(`
|
|
3
3
|
`),k=0,C="";if(O==="strictEqual"&&l(j)==="object"&&l(E)==="object"&&j!==null&&E!==null&&(O="strictEqualObject"),R.length===1&&I.length===1&&R[0]!==I[0]){var H=R[0].length+I[0].length;if(H<=10){if(!(l(j)==="object"&&j!==null||l(E)==="object"&&E!==null||j===0&&E===0))return"".concat(_[O],`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-
|
|
1
|
+
import{j as r}from"./liveblocks-fvHZHCch.js";import Z from"./NotFoundScreen-XYwSCqRV.js";import{a as p}from"./sentry-5M-_hQEn.js";import{h as C,g as D,u as V,j as u,N as k,l as N,n as z,o as g}from"./core-CjSjXYyY.js";import{fI as E,ZA as h,ZS as R,O5 as O,O1 as U,O4 as m,NW as L,_f as B,N_ as K,O7 as q}from"./zeni-epic-state-DbSzv5hl.js";import{z as T,w as _,c8 as F,n as $,bR as G,c9 as H}from"./index-zhznqeY3.js";import"./mui-Cv0Yu4Hx.js";import{u as J,R as x}from"./ReimbursementApprovalRuleDetailScreen-BRSlUWFS.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="ca9fe1a4-b378-45bf-8ab7-0c9effe95ad7",e._sentryDebugIdIdentifier="sentry-dbid-ca9fe1a4-b378-45bf-8ab7-0c9effe95ad7")}catch{}})();const j="reimbursement-approval-rule-update",M=N((function(e){return{approvalView:h(e),remiSetupApproverViewUpdateData:R(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(B(!1))},onBackClick:()=>{$(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(L(t,!1))},onEditRuleClick:t=>{t!=null?(e(m(t)),n(`./${t}/edit`)):(e(m()),n("./new"))}}}))(_(F)),P=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,w]=p.useState(!1),S=u((o=>o.remiSetupApproverViewState.fetchState)),c=u((o=>E(o))),d=u((o=>h(o))),b=u((o=>R(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{b?.updateStatus.fetchState==="Completed"&&a(O())}),[b]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(U(!0,!1,!1,!1)))}),[t,S,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(w(!0),a(m())),s("./new"))}),[v,d,a]);const f={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${j}`]:[],eventCallback:(o,y,I)=>{o.endsWith(j)&&I.onApprovalRulesEventReceived(o)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(M,{currentTenant:c,location:n,navigate:s,...f})},A="reimbursement-approval-rule-update",Q=N((function(e){const s=h(e),n=R(e).remiSetupApproverViewUpdateData,a={};for(const l of Object.values(e.vendorState.vendorByID))l?.id!=null&&(a[l.id]=l.name);const t={};for(const l of Object.values(e.classState.classesByKey))l?.classId!=null&&(t[l.classId]=l.className);return{approvalView:s,remiSetupApproverViewUpdateData:n,vendorNamesById:a,departmentNamesById:t}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(A)&&e(B(!1))},onBackClick:()=>{$(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(L(t,!0))},onEditRuleClick:t=>{t!=null?(e(m(t)),n(`./${t}/edit`)):(e(m()),n("./new"))},onReorderRules:t=>{e(q(t,!0))}}}))(_(H)),X=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=G(e?.tenantId);return s?r.jsx(Y,{isLoading:n}):r.jsx(P,{isLoading:n})},Y=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,w]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),b=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),f=u((i=>E(i))),o=u((i=>h(i)));J();const y=u((i=>R(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{y?.updateStatus.fetchState==="Completed"&&a(O())}),[y]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(U(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||b!=="Not-Started"||e||(w(!0),a(K(!1,!0)))}),[v,b,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{o.allApprovalRules.length===0&&o.fetchState==="Completed"&&(S||(c(!0),a(m())),s("./new"))}),[S,o,a]);const I={events:f.companyId!=null?[`private-encrypted-${f.companyId}.${A}`]:[],eventCallback:(i,ee,W)=>{i.endsWith(A)&&W.onApprovalRulesEventReceived(i)}};return f?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(Q,{currentTenant:f,location:n,navigate:s,isLoading:e,...I})};function le(){return r.jsxs(z,{children:[r.jsx(g,{path:"/",element:r.jsx(X,{})}),r.jsx(g,{path:"/new",element:r.jsx(x,{})}),r.jsx(g,{path:"/:approvalRuleId/edit",element:r.jsx(x,{})}),r.jsx(g,{path:"*",element:r.jsx(Z,{})})]})}export{le as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-
|
|
1
|
+
import{j as h}from"./liveblocks-fvHZHCch.js";import{a as f}from"./sentry-5M-_hQEn.js";import{u as O,j as g,h as C,g as _,i as V,l as k}from"./core-CjSjXYyY.js";import{mv as L,ZS as T,ZA as U,NZ as B,Oa as j,O5 as A,O6 as E,ZT as N,fI as z,O4 as K}from"./zeni-epic-state-DbSzv5hl.js";import{z as F,a5 as P,b$ as W,n as $,bR as G,c0 as H}from"./index-zhznqeY3.js";import{u as Z}from"./mui-Cv0Yu4Hx.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="af969338-2fbd-4d74-901b-2b49141cda56",e._sentryDebugIdIdentifier="sentry-dbid-af969338-2fbd-4d74-901b-2b49141cda56")}catch{}})();function J(){const e=O(),s=f.useRef(!1),t=g((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=g((o=>o.vendorListState.allVendorIdsBillsTab.length>0));f.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(L({})))}),[p,t,e])}const M=k((function(e,s){const t=T(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let i=t.allApprovalRules.length===0;return s.approvalRuleId&&(i=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:i,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:i}=s,r=p.remiSetupApproverViewUpdateData?.type,l=$(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const S=[];return v.forEach((u=>{const b=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),I=u.actors.selectedNonUsers.map((m=>{const y=(R=m.value,N(R)==null);var R;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}})),c=b.concat(I);S.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),S},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:i,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(j(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(W);function Q(){const e=C(),s=O(),t=_(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),i=Z(),r=g((n=>T(n))),l=g((n=>U(n))),[a,d]=f.useState(!1);if(f.useEffect((()=>{a||(d(!0),s(B(!0)))})),f.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):h.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t})}function pe(e){return N(e)==null}const X=k((function(e,s){const t=T(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],i={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),i[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:i,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:U(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:i}=s,r=p.remiSetupApproverViewUpdateData?.type,l=$(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((y=>{const R=y.actorKind?.selectedOption,q=y.selectedRole?.selectedNonUsers??[];let D=[];R==="role"?D=q.map((w=>({type:"attribute",subType:w.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):R==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map((w=>({type:"user",subType:void 0,userId:w.userId,idType:"user",isImplicitActor:!1}))));const x=y.action??"require_approval";m.push({action:x,actors:D,operator:D.length>1?x==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,S=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const b=v?.selection.selectedOptions??[];b.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:b});const I=S?.selection.selectedOptions??[];if(I.length>0&&(u.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:I}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:i,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(j(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(K(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(H);function ne(){const e=g((t=>z(t))),{isApprovalRulesV3Enabled:s}=G(e?.tenantId);return s?h.jsx(Y,{}):h.jsx(Q,{})}function Y(){const e=C(),s=O(),t=_(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),i=Z(),r=g((n=>T(n))),l=g((n=>U(n))),[a,d]=f.useState(!1);if(J(),f.useEffect((()=>{a||(d(!0),s(B(!1)))})),f.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):h.jsx(X,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t},p??"new")}export{ne as R,pe as i,J as u};
|